RS232 and Hyperterminal

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

Moderators: Benj, Mods

Post Reply
Chad528
Posts: 9
Joined: Wed Sep 19, 2007 4:43 pm
Contact:

RS232 and Hyperterminal

Post by Chad528 »

I am having a problem seeing responses from the PIC in Hyperterminal. I have run a test program to send text and that works O.K.

In my program I loop 2 times to receive an "RS" in an array from the com port. I then check for an "R" and then an "S". I then populate a 6 character array and then loop 6 times, sending one character each time out to the com port.

I have had this work intermittently by responding in 1 out of every 4 commands. But mostly when sending the command from Hyperterminal, I do not get a response. In the simulator, when ever there is something in the queue, everything processes perfectly.

Any ideas on what I should do next?

Thanks,
Chad

Chad528
Posts: 9
Joined: Wed Sep 19, 2007 4:43 pm
Contact:

Further troubleshooting

Post by Chad528 »

I believe that I may be having a timing issue. If I input the characters as quick as I can, I increase my success with the response. If I put characters in slow, I do not get a response.

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:

Post by Benj »

Hello

Sounds like you are receiving the timeout value (255) as one of your characters. You can use a desision icon to see if the value coming in is less then 255 (myvar < 255) and if so then append it to your incoming array. Another thing you could do is to make sure that the first character is an 'R'. You can do this with a decision icon (myvar = 'R'). This will stop you from getting values of "SR" instead of "RS".

Post Reply