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
RS232 and Hyperterminal
Further troubleshooting
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.
- 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:
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".
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".
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel