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
ADC value to PC
- DavidA
- Matrix Staff
- Posts: 1076
- Joined: Fri Apr 23, 2010 2:18 pm
- Location: Matrix Multimedia Ltd
- Has thanked: 58 times
- Been thanked: 258 times
- Contact:
Re: ADC value to PC
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ADC value to PC
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ADC value to PC
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
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
- Attachments
-
- ADC to PC.fcf
- (7 KiB) Downloaded 386 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ADC value to PC
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.
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.
- Attachments
-
- Flowcode1.fcf
- (5.5 KiB) Downloaded 406 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel