
Real-time without a RTOS 413
read to one of the serial port registers and tests a bit to the existing
instruction flow. If characters are detected these are easily re-
moved before operation but as this should only happen during an
engine shutdown and restart where timing accuracy is not abso-
lutely essential. Indeed, the data logger marks the data log to
indicate that an error has occurred. The sample data collection will
also time out if no data is received. This is detected and again the
sample aborted and a marker inserted to indicate that a timeout
has occurred.
Program listing
The rest of this chapter contains the logging program,
complete with comments ...