| |
| |
Preface | |
| |
| |
List of Figures | |
| |
| |
List of Tables | |
| |
| |
Acknowledgments | |
| |
| |
About the Author | |
| |
| |
Microcomputer Architecture | |
| |
| |
An Introduction to the Microcomputer | |
| |
| |
Computer Architecture | |
| |
| |
The Instruction | |
| |
| |
Microcomputers | |
| |
| |
The 6812 Instruction Set | |
| |
| |
6812 Addressing Modes | |
| |
| |
6812 Data Operator Instructions | |
| |
| |
6812 Control Instructions | |
| |
| |
Assembly-Language Directives | |
| |
| |
Organization of 6812 Microcontrollers | |
| |
| |
Notation for Block Diagrams | |
| |
| |
6812 Microcontroller I/O and Memory Organization | |
| |
| |
The MC68HC812A4 and MC68HC912B32 Memory Maps | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
Programming Microcomputers | |
| |
| |
Introduction to C | |
| |
| |
Data Structures | |
| |
| |
Indexable Data Structures | |
| |
| |
Sequential Data Structures | |
| |
| |
Writing Clear C Programs | |
| |
| |
C Procedures and Their Arguments | |
| |
| |
Programming Style | |
| |
| |
Object-Oriented Programming | |
| |
| |
Optimizing C Programs Using Declarations | |
| |
| |
Optimizing C Programs with Assembly Language | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
Bus Hardware and Signals | |
| |
| |
Digital Hardware | |
| |
| |
Modules and Signals | |
| |
| |
Drivers, Registers, and Memories | |
| |
| |
Address and Control Signals in 6812 Microcontrollers | |
| |
| |
Address and Control Timing | |
| |
| |
Address and Control Signal Decoding | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
Parallel and Serial Input/Output | |
| |
| |
I/O Devices and Ports | |
| |
| |
Generic Port Architecture | |
| |
| |
Generic Port Classes | |
| |
| |
Debugging Tools | |
| |
| |
6812 Parallel Ports | |
| |
| |
MC68HC812A4 Port Architecture | |
| |
| |
MC68HC912B32 Port Architecture | |
| |
| |
Programming of PORTA | |
| |
| |
A Class for Ports with Direction Control | |
| |
| |
Input/Output Software | |
| |
| |
A Wire | |
| |
| |
A Movie | |
| |
| |
A Traffic Light Controller | |
| |
| |
A Sequential Machine | |
| |
| |
An IC Tester | |
| |
| |
Object-oriented Vector Functions and Interpreters | |
| |
| |
Input/Output Indirection | |
| |
| |
Indirect Input/Output | |
| |
| |
LCD Interfacing | |
| |
| |
Synchronous Serial Input/Output | |
| |
| |
The 6812 SPI Module | |
| |
| |
Accessing Devices Using Vectors and structs | |
| |
| |
Vector Access to Ports | |
| |
| |
Vector Pointer Access to Ports | |
| |
| |
Using #defines to Name Ports | |
| |
| |
Struct Pointer Access to Ports | |
| |
| |
Struct Access to Ports | |
| |
| |
Indirect and Serial I/O Objects | |
| |
| |
A Designer's Selection of I/O Ports and Software | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
Interrupts and Alternatives | |
| |
| |
Programmed Synchronization | |
| |
| |
Real-time Synchronization | |
| |
| |
Gadfly Synchronization | |
| |
| |
MC68HC812A4 Gadfly Synchronization | |
| |
| |
MC68HC912B32 Gadfly Synchronization | |
| |
| |
Gadfly Synchronization Characteristics | |
| |
| |
Handshaking | |
| |
| |
Some Examples of Programmed I/O | |
| |
| |
Object-oriented Classes for Programmed I/O | |
| |
| |
Interrupt Synchronization | |
| |
| |
Steps in an Interrupt | |
| |
| |
Steps in an Interrupt in the MC68HC812A4 | |
| |
| |
Steps in an Interrupt in the MC68HC912B32 | |
| |
| |
Properties of Interrupt Synchronization | |
| |
| |
Interrupt Handlers and Critical Sections | |
| |
| |
A Handler That Changes a Global Variable | |
| |
| |
A Handler That Fills or Empties a Buffer | |
| |
| |
A Handler That Uses a Queue for Input | |
| |
| |
A Handler That Uses a Queue for Output | |
| |
| |
Critical Sections | |
| |
| |
Polled Interrupts | |
| |
| |
Polled Interrupts in the MC68HC812A4 | |
| |
| |
Polled Interrupts in the MC68HC912B32 | |
| |
| |
Service Routines | |
| |
| |
Round-robin Handlers | |
| |
| |
Vectored Interrupts | |
| |
| |
Vectored Interrupts in the MC68HC812A4 | |
| |
| |
Vectored Interrupts in the MC68HC912B32 | |
| |
| |
Vectored Interrupts for Other Devices | |
| |
| |
Examples of Interrupt Synchronization | |
| |
| |
Keyboard Handling | |
| |
| |
Interrupts for SPI Systems | |
| |
| |
Histograms and Histories for the MC68HC812A4 | |
| |
| |
Object-oriented Classes for Interrupts | |
| |
| |
An IQFPort Class | |
| |
| |
An OQFPort Class | |
| |
| |
Polling IQFPort and OQFPort Classes | |
| |
| |
Bar-code Class | |
| |
| |
An X-10 Class | |
| |
| |
Time-Sharing | |
| |
| |
Real-time Interrupts | |
| |
| |
Multithread Scheduling | |
| |
| |
Threads for Time-sharing | |
| |
| |
An Efficient Time Schedular | |
| |
| |
Special Instructions for Time-sharing | |
| |
| |
Object-oriented Classes for Time-sharing | |
| |
| |
Fast Synchronization Mechanisms | |
| |
| |
Direct Memory Access | |
| |
| |
Context Switching | |
| |
| |
Memory Buffer Synchronization | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
System Control | |
| |
| |
6812 Chip Modes | |
| |
| |
MODE Control Port | |
| |
| |
Port E Assignment | |
| |
| |
6812 Memory Map Control | |
| |
| |
Internal Memory Map Control | |
| |
| |
MC68HC812A4 Chip Selects | |
| |
| |
MC68HC812A4 Memory Expansion | |
| |
| |
Object-oriented Programming of Memory Expansion | |
| |
| |
EEPROM and Flash Memory Programming | |
| |
| |
MC68HC812A4 Timing Control | |
| |
| |
An External Memory for the MC68HC812A4 | |
| |
| |
The 6812 Background Debug Module | |
| |
| |
6812 Reset Handler | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
Analog Interfacing | |
| |
| |
Input and Output Transducers | |
| |
| |
Positional Transducers | |
| |
| |
Radiant Energy Transducers | |
| |
| |
Other Transducers | |
| |
| |
Basic Analog Processing Components | |
| |
| |
Transistors and Silicon Controlled Rectifiers | |
| |
| |
Basic Linear Integrated Circuits | |
| |
| |
Practical Linear Integrated Circuits | |
| |
| |
OP AMP and Analog Switch Signal Conditioning | |
| |
| |
Filters | |
| |
| |
Selection of Inputs and Control of Gain | |
| |
| |
Nonlinear Amplification | |
| |
| |
Converters | |
| |
| |
Digital-to-Analog Converters | |
| |
| |
Analog-to-Digital Converters | |
| |
| |
Voltage Conversion to or from Frequency | |
| |
| |
Data Acquisition Systems | |
| |
| |
Basic Operation of a Data Acquisition System | |
| |
| |
The MC145040 A-to-D Converter | |
| |
| |
The MC68HC812A4 A-to-D Converter | |
| |
| |
Object-oriented Programming of Converters | |
| |
| |
Applications in Control Systems | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
Counters and Timers | |
| |
| |
The MC68HC812A4 Counter/Timer Subsystem | |
| |
| |
Signal Generation | |
| |
| |
Output Compare Logic | |
| |
| |
The Counter/Timer Square-Wave Generator | |
| |
| |
The MC68HC912B32 PWM Signal Generator | |
| |
| |
A Touch-tone Signal Generator | |
| |
| |
The Pulse Generator | |
| |
| |
A Rotary Dialer | |
| |
| |
Real-Time Clock and Trace Mechanism | |
| |
| |
Output Compare 7 | |
| |
| |
Object-oriented Square-wave and Pulse Generation | |
| |
| |
Frequency and Period Measurement | |
| |
| |
The Input Capture Mechanism and Period Measurement | |
| |
| |
Pulse-width Measurement | |
| |
| |
Triac Control | |
| |
| |
Pulse Accumulation and Frequency Measurement | |
| |
| |
Object-oriented Period, Pulse-width, and Frequency Measurements | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
Communications Systems | |
| |
| |
Communications Principles | |
| |
| |
Signal Transmission | |
| |
| |
Voltage and Current Linkages | |
| |
| |
Frequency Shift-Keyed Links Using Modems | |
| |
| |
Infrared Links | |
| |
| |
UART Link Protocol | |
| |
| |
UART Transmission and Reception by Software | |
| |
| |
The UART | |
| |
| |
The ACIA | |
| |
| |
The M14469 | |
| |
| |
The Serial Communication Interface System in the 6812 | |
| |
| |
Object-oriented Interfacing to the SCI | |
| |
| |
Other Protocols | |
| |
| |
Synchronous Bit-oriented Protocols | |
| |
| |
MC68HC912B32 BDLC Device | |
| |
| |
IEEE-488 Bus Standard | |
| |
| |
The Small Computer System Interface (SCSI) | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
Display and Storage Systems | |
| |
| |
Display Systems | |
| |
| |
NTSC Television Signals | |
| |
| |
A 6812 SPI Display | |
| |
| |
A Bitmapped Display | |
| |
| |
An Object-oriented Display | |
| |
| |
Storage Systems | |
| |
| |
Floppy Disk Format | |
| |
| |
The Western Digital 37C65C Floppy Disk Controller | |
| |
| |
Floppy Disk Interfacing Procedures | |
| |
| |
Personal Computer Disk Data Organization | |
| |
| |
Object-oriented Disk I/O | |
| |
| |
Conclusions | |
| |
| |
Problems | |
| |
| |
Appendix. Using the HIWAVE CD-ROM | |
| |
| |
Index | |