Page 363 - Introduction to Microcontrollers Architecture, Programming, and Interfacing of The Motorola 68HC12
P. 363
340 Chapter 11 Input/ Output
11.9 Summary and Further Reading
This chapter has introduced you to input-output programming, a somewhat obscure area
because many texts, magazine articles, and courses define input-output to be beyond their
scope while they concentrate on some other topic. But it is not obscure. This chapter
showed that the basic notion of input-output in a microcontroller is really a minor
extension of reading and writing to memory. The input-output integrated circuit was
studied. Synchronization mechanisms were discussed, and the gadfly and interrupt
techniques were detailed. The get and put subroutines were then shown and their
operation explained. You can now see how simple input-output programming can be.
We then looked at simple examples of the use of the A-to-D and D-to-A converters and
the SCI device used for serial I/O. We looked at the last example to understand the way
that the get and put subroutines work, which have been mentioned many times earlier
in this book. The method of outputting several words one after another to the same
device was discussed. This method, using buffers, was seen to be very straightforward,
If input-output programming interests you, we recommend the following books. Of
course, we recommend the accompanying textbook, Single and Multiple Chip
Microcontroller Interfacing for the Motorolla 68HC12 (G. Jack Lipovski). It
emphasizes the software used to control devices, using the 6812 and chips in the 6800
family for concrete examples, experiments, and problems. Two books by P. Garrett,
Analog I/O Design and Analog Systems for Microprocessors and Minicomputers (both
published by Reston Publishing Co., Inc., Reston, Va,, 1981 and 1978, respectively),
give excellent discussions of operational amplifiers and filters used in input-output
devices and also discuss the characteristics of transducers and measurement hardware.
Do You Know These Terms?
See the end of chapter I for instructions.
input routine status port microprocessor is enabled
output routine hardware interrupt enabled disabled
output port I/O interrupt microprocessor is analog-to-digital
output device handling an masked converter
output line interrupt microprocessor is digital-to-analog
input port interrupt handler disabled converter
input device device handler microprocessor r-2r ladder
input line interrupt service sees a request analog
high signal routine request is pending comparator
low signal latency time honors an UART protocol
direction port return from interrupt start bit
control port interrupt handler stop bit
gadfly device requests an arm Serial
synchronization interrupt armed Communication
gadfly loop interrupts are disarmed Interface
enabled enable