cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

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
Esteemed Contributor

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
Esteemed Contributor

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
Expert II

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
ETRO_SSN583
Esteemed Contributor

Formatting strings, attached, for sprintf()

   

 

   

Regards, Dana.

0 Likes