ADC value to PC

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Contact:

ADC value to PC

Post 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
Attachments
ADC to PC.fcf
FC v3 File
(7 KiB) Downloaded 234 times

User avatar
DavidA
Matrix Staff
Posts: 1066
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Contact:

Re: ADC value to PC

Post 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

User avatar
Benj
Matrix Staff
Posts: 14929
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: ADC value to PC

Post 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.

armagon29
Posts: 56
Joined: Thu May 07, 2009 4:40 pm
Contact:

Re: ADC value to PC

Post 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
Attachments
ADC to PC.fcf
(7 KiB) Downloaded 204 times

User avatar
Benj
Matrix Staff
Posts: 14929
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: ADC value to PC

Post 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.
Attachments
Flowcode1.fcf
(5.5 KiB) Downloaded 245 times

Post Reply