18C4550 A/D to PC

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
Jack8
Posts: 4
Joined: Wed Feb 04, 2009 5:13 am
Contact:

18C4550 A/D to PC

Post by Jack8 »

Hi Benj
I am looking for a Flowcode example of 18C4550 reading a value from one A/D port and send value to PC(hyper treminal) via USB internal of 18C4550
Regards

User avatar
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: 18C4550 A/D to PC

Post by Benj »

Hello

Im afraid that Flowcode does not support the 18C4550 devices. You can program USB onto 18F4550 devices using the downloadable USBpack or the latest version of Flowcode. Use the USB serial component for transmitting to hyperterminal in Windows.

Jack8
Posts: 4
Joined: Wed Feb 04, 2009 5:13 am
Contact:

Re: 18C4550 A/D to PC

Post by Jack8 »

Hi Benj
ok, what about 18F4455 read avalue from 1 A/D channel and send value to PC (hyper ternimal) OR
how can I modify USB to serial demo Flowcode example
so it can read 1 A/D channel and send value to PC
regards
JackD

User avatar
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: 18C4550 A/D to PC

Post by Benj »

Hi Jack

Yes that should work no problem. My advice would be to create a string variable and an int variable. Read the analogue value into the int variable and then use the string function ToString to convert the number into a string and store into the string variable. You could then send the string using the send string function followed by a (",") comma or a (13) carrage return byte etc. Ignore curly brackets when sending the byte values.

Jack8
Posts: 4
Joined: Wed Feb 04, 2009 5:13 am
Contact:

Re: 18C4550 A/D to PC

Post by Jack8 »

Hi
Can you give me an example?
I am not good at software
that is why I need Flowcode
regrads
JN

User avatar
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: 18C4550 A/D to PC

Post by Benj »

Hi Jack

Ok I have attached an example for you.
Attachments
Flowcode1.fcf
(6 KiB) Downloaded 297 times

Jack8
Posts: 4
Joined: Wed Feb 04, 2009 5:13 am
Contact:

Re: 18C4550 A/D to PC

Post by Jack8 »

Hi Benj
Thank you for the example!
Just a bit more help
How do I Edit what inside Send Carrage return ?
regards
JN

User avatar
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: 18C4550 A/D to PC

Post by Benj »

Hello

You would change it like any other icon. 13 is the value for a carrage return. See here for a full list of Ascii characters.

http://www.asciitable.com/

Post Reply