|
The Easy Way
by Charles Kosina
Start ý An
Example ý State Machine Control ý Keyboard
Scanning ý Receive Serial Data ý LCD
Module ý Transmit Data ý Debugging
Techniques ý Other Options ý Sources
and PDF
RECEIVE SERIAL DATA
Some tasks cannot afford the luxury
of waiting around for servicing. The serial port of the 8051 chip
is one such example. To avoid losing incoming characters, the
entire task is within an ISR.
When a character is received, it is stored
in a circular buffer in RAM. A carriage return terminator sets a flag
for Task 3, which then transfers the buffer to the LCD module. Listing
5 shows a compact and relatively
simple routine to do this.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |