cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

Hello,

   

I'm trying to use USB to get the data from PC into this board. On the PC I'm using putty to send and receive data. The code works fine when the pc sends data and receives back the same data through an array. But when I try to send back my own data by adding a new value in the array it doesn't give me a received value on the putty (i.e. on PC). can someone help me out with this problem. 

   

My aim is to receive a value from PC, do some arithmetic on it and then send it back to the PC. That is why I'm trying to alter the values in the array.

   

                    while(USBUART_1_CDCIsReady() == 0u);    /* Wait till component is ready to send more data to the PC */ 
                    buffer[0] = 0x01;
                    //buffer[1] = 0x00;
                    USBUART_1_PutData(buffer, count);  

0 Likes
Reply
1 Solution
Esteemed Contributor II

You are sending an 0x01 which is not a printable character for PuTTY. Try to use ascii characters as 0x31 or '1' which will be printed by PuTTY as the character one (1). Assuming that variable count has the value of 0x01.

   

 

   

Bob

View solution in original post

0 Likes
Reply
5 Replies
Esteemed Contributor II

You are sending an 0x01 which is not a printable character for PuTTY. Try to use ascii characters as 0x31 or '1' which will be printed by PuTTY as the character one (1). Assuming that variable count has the value of 0x01.

   

 

   

Bob

View solution in original post

0 Likes
Reply
Anonymous
Not applicable

Thanks BOb . You were right.

0 Likes
Reply
Anonymous
Not applicable

Hello Bob,

   

I need to replace putty with a .c code for our application. Is there any sample code that I can use for the PC side that works similar to putty. i.e. the .c code should be able to send a value to the cypress development kit using USB(com port)

0 Likes
Reply
Esteemed Contributor II

Have a look at sourceforge, there you might find some com-port communications.

   

 

   

Bob

0 Likes
Reply
Anonymous
Not applicable

Hi Ammar,

   

here you can find a small library (incl. source) doing all you ask for:
http://www.teuniz.net/RS-232/

   

All the Best
Frank