Quote:
|
Originally Posted by edmondli Hi folks,
Can anyone help me on this?
I am trying to build a gadget to accept a command and output another command via RS232. The input command may consist of 18 Ascii characters and the output will be consist of 10 Ascii characters.
I am using 16F84 for this purpose but I don't know how to read a series of characters via RS232, then store and check them and determine which command I should output. My program now can receive character at 9600 baud.
Can anyone suggest some readings or sample for me?
Thanks!
Edmond |
Have a look at my RS232 tutorial at
http://www.winpicprog.co.uk/pic_tutorial7.htm, which does all the RS232 parts - all you need to do is read the ASCII bytes into a buffer, then test them. If you look at tutorial9.2 (hex keypad) this stores 4 key presses in a buffer, and checks for the correct code.