Joined: 01 Dec 2003 Posts: 21 Location: Milan Italy
How buffer a string rs232 data ?
Posted: Fri Nov 25, 2005 9:43 am
HI ALL
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.
THANKS IN ADVANCE
Foppie
Joined: 16 Sep 2005 Posts: 138 Location: The Netherlands
Posted: Mon Nov 28, 2005 1:36 am
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
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