CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Sending commands to a serial LCD interface

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
djsb



Joined: 29 Jan 2011
Posts: 36

View user's profile Send private message

Sending commands to a serial LCD interface
PostPosted: Tue Feb 01, 2011 2:30 pm     Reply with quote

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.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 01, 2011 3:43 pm     Reply with quote

Look at this file for an example of an interrupt-driven receive buffer:
Quote:

c:\program files\picc\examples\ex_sisr.c
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group