Page 1 of 1
ADC value to PC
Posted: Wed Jun 02, 2010 3:36 am
by armagon29
Dear All:
I have a problem, may you can help me, I need to send a ADC value to PC Terminal trough RS232 (E-block15), but when pic send ADC value (Byte) to PC, the value is show as a character (Single letter or number) not a Byte value, why?, see the file attached
Thanks
Armagon
Re: ADC value to PC
Posted: Wed Jun 02, 2010 8:31 am
by DavidA
Hi,
The RS232 sends these single ASCII characters as they represent a byte, you can use any lookup table to tell what bytes these characters represent.
Eg:
http://www.asciitable.com/ External link not supported by Matrix Multimedia
Re: ADC value to PC
Posted: Wed Jun 02, 2010 8:47 am
by Benj
If you convert the byte value to a string using a toString string manipulation function then you can send the string down the RS232 a character at a time.
Re: ADC value to PC
Posted: Thu Jun 03, 2010 12:32 am
by armagon29
Dear Sir:
I already dome modification using a string function, but now the question is how to send a string trough RS232 macro, it does not have a sent string option?
Thanks
Armagon
See attachment
Re: ADC value to PC
Posted: Thu Jun 03, 2010 9:18 am
by Benj
Hello,
Sorry its v4 that has the RS232 string send functionality.
You can instead create a simple loop to step through the string until you reach the end or a null character. See the attached example.