djsb
Joined: 29 Jan 2011 Posts: 36
|
Sending commands to a serial LCD interface |
Posted: Tue Feb 01, 2011 2:30 pm |
|
|
Hi,
I'm trying to extract \n , \f and \b from a serial character stream sent from a PC to a 16f628A using the USART module. I'd like to use these sequence of characters as I'm trying to send clear screen, backspace and newline commands to an LCD using Flex_LCD.C. Can someone expand for me on the state machine algorithm. Any examples I can use to get me started.
I've got the RS232 characters echoing to the LCD without problems, just need to be able to send \n etc and have this recognised as a command.
Would buffering the data through an array and searching the array be a way forward? How would I implement a circular buffer?
Any help appreciated. Thanks. |
|