Sending and receiving RS232

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
jollybv
Flowcode v5 User
Posts: 376
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times

Sending and receiving RS232

Post by jollybv »

Hi Guys

What i am trying to do is send data from one chip to another Via RS232 "Which is not a problem" read it the other side, once red send an instruction of sum sort to send the next string of data and so on. Is there any examples of how to do this or can someone tell me how to do this..???

Brian

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: Sending and receiving RS232

Post by Benj »

Hello Brian,

When doing something like this I generally design my own protocol that is fit for purpose.

Normally along the lines of something like this.

One node is Master and one node is slave doesn't matter which way round.

The slave node sits and waits for incoming data.

The master node sends a command byte eg print data to a LCD could be command 1, the master then sends the length of the string and then sends the bytes from the string.

The slave node receives the command byte and then switches to process command 1. Command 1 consists of receiving the size byte and then looping for the specified number of data bytes printing out the byte values to the LCD.

User avatar
jollybv
Flowcode v5 User
Posts: 376
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times

Re: Sending and receiving RS232

Post by jollybv »

Hi Ben

Thanks for the response but now you have totally lost me maybe im having a blond moment but will play around and see what i can come up with.

Post Reply