RS 232 COMMUNICATION USING RS232 COMPONENT

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
keshav@solus.in
Posts: 19
Joined: Tue Sep 07, 2010 7:03 am
Contact:

RS 232 COMMUNICATION USING RS232 COMPONENT

Post by keshav@solus.in »

HELLO

I am using pic 18f8722 microcontroller in our project.

Microcontroller transmit and receive 10 bytes of data from and to host(computer),

Using flowcode v4 i written code for receive and transmit 10 bytes of data to and from HOST(computer).

Using RS232 component receive and transmit the data to and from HOST,

I have following query about RS232 component macro

1)For transmission its working fine but for Reception microcontroller does not receiving data from Host,

2)If i written Timeout value -1 in RS232 component macro microcontroller receiving fine after some time it will stop transmission and reception.

for your kind reference i have attached TIMEOUT.JPEG FILE,

Please go through give me the suggestion for this one.
Attachments
TIMEOUT.JPG
(149.91 KiB) Downloaded 664 times

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: RS 232 COMMUNICATION USING RS232 COMPONENT

Post by Benj »

Hello,

A timeout of -1 or 255 as it is represented in a unsigned variable forces the receive macro to wait forever for incoming data. What happens if you set the timeout to say 100 or 10? Its good to have a decision directly after the RS232 read to check if the received byte is less then 255 and therefore valid data.

Post Reply