USB UART Communication

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

In my project , I am intend to see the voltage value on shunt resistor by sending the data to the pc by usb connection. I am using hyperterminal to see it , but the value that hyperterminal shows is not equal to the voltage value on the shunt resistor. Can anyone tell me why this is happening ? How can I fix it ? All data values such as bps , data bit are suitable for uart .

0 Likes
6 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I assume you convert the value to a char string, using sprintf(), then on PC

   

side display as a char string ? What do you see on hyperterminal, what should

   

it be ?

   

 

   

Consider posting a project -

   

 

   

“File”                                                             Creator

   

“Create Workspace Bundle”

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Yes , I used sprintf() . Hyperterminal shows the voltage value 70mV when I am actually measuring 690-700mV and hyperterminal value stays same after 101mV but I am giving 1V and higher.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Did you check your buffer on PSOC side to see if the string is

   

correct in the cases it fails on Hyperterminal view ? Of course

   

all the settings for Hyperterminal correct, baud rate, etc....

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

I will check it thank you but as far as I remember I set the op-amp's gain as 10 by external resistors.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Dana suggested you to use the debugger and inspect the string before sending it to UART. Could be that the value or the conversion goes wrong.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Formatting strings, attached, for sprintf()

   

 

   

Regards, Dana.

0 Likes