Sorry for the previous blank post.
I am using usbuart in my project to display the ADC output data on hyperterminal using usbuart.
Now ,i wish to know the format of the data that comes through usbuart.(Is it hex,ASCII?)
This is because i am trying to plot the data from usbuart on labview.However when i try to convert the string read from usbuart to a number using <decimal string to number function> ,i get zero as the output each time.So please guide me about this strange problem.
Thanks in advance.
Sending data via USBUART implies no data conversion at all. What you send is bit-by bit retrieved at the receiver side.
So when data should be interpreted on the receiver side as float, bytes or ints it would be safer to convert the data at the sender's side to ascii using sprintf().
Thanks for the reply Bob.
So if get an integer as adc output using adc_getresult32() then using sprintf() ,should i convert it to ascii?
This is because till now i was converting it to decimal using %d.
Also could you please tell me format for using sprintf to convert an integer to ascii.
Sorry ,for so many questions at once.
When using sprintf() the format specifier %d converts 16-bit integers to an ascii string.
Have a look here publications.gbdirect.co.uk/c_book/chapter9/formatted_io.html
I know this is a bit out of scope of the psoc forum ,but could you tell me what could be the possible reason for the ascii string not getting converted to number in labview when i use <string to number vi> ,even though i use %d format specifier.
Difficult without seeing the project to understand your problem.
In the topic ADC -> USB is my project USB_16bit_ADC.cywrk.Archive01.zip
Unfortunately I have a very ancient LabVIEW_5.0 but maybe you can help
LabVIEW project attached below.