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

How buffer a string rs232 data ?

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



Joined: 01 Dec 2003
Posts: 21
Location: Milan Italy

View user's profile Send private message Send e-mail

How buffer a string rs232 data ?
PostPosted: Fri Nov 25, 2005 9:43 am     Reply with quote

HI ALL Embarassed


I NEED A EASY EXAMPLE FOR BUFFER IN A CONSTANT STRING IN RS 232

LIKE 0001;1;03H ( TERMINATED WITH CHARACTER 03H )

COMPARE FOR TURN ON A LED

I NEED ONLY COMPARE NOT CODE FOR PORT MANAGEMENT.

Rolling Eyes

THANKS IN ADVANCE
Foppie



Joined: 16 Sep 2005
Posts: 138
Location: The Netherlands

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Mon Nov 28, 2005 1:36 am     Reply with quote

What I advice you to do in the interrupt routine:
Store the incoming characters in an array of characters (global variables). If you receive the terminating character make a flag high.

What I advice you to do in the main-loop:
Poll the flag or wait for the flag to go high. If the flag is compare the buffer.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Mon Nov 28, 2005 7:20 am     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=18974&highlight=buffer+rs232

http://www.ccsinfo.com/forum/viewtopic.php?t=19117&highlight=

Humberto
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