| |
| |
Preface | |
| |
| |
| |
Introduction | |
| |
| |
| |
Computers, Microprocessors, Microcomputers, Microcontrollers | |
| |
| |
| |
Moore's Law | |
| |
| |
| |
Microcontrollers | |
| |
| |
| |
Some Basic Definitions | |
| |
| |
| |
Notation | |
| |
| |
| |
Study Plan | |
| |
| |
| |
General Principles of Microcontrollers | |
| |
| |
| |
Introduction | |
| |
| |
| |
A Typical Microcontroller | |
| |
| |
| |
The Picocontroller | |
| |
| |
| |
The Microcontroller's Memory | |
| |
| |
| |
The Central Processor Unit | |
| |
| |
| |
Timing | |
| |
| |
| |
The I/O Interface | |
| |
| |
| |
The Address, Data, and Control Buses | |
| |
| |
| |
Some More Instructions | |
| |
| |
| |
The Final Picocontroller Design | |
| |
| |
| |
Software/Firmware Development | |
| |
| |
| |
The Software Development Tool Set | |
| |
| |
| |
Remaining Questions | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Problems | |
| |
| |
| |
Structured Program Design | |
| |
| |
| |
The Need for Software Design | |
| |
| |
| |
The Software Development Process | |
| |
| |
| |
Top-Down Design | |
| |
| |
| |
Design Partitioning | |
| |
| |
| |
Bottom-Up Design | |
| |
| |
| |
The Real-World Approach | |
| |
| |
| |
Types of Design Activity | |
| |
| |
| |
Design Tools | |
| |
| |
| |
Top-Down Debugging and Testing | |
| |
| |
| |
Structured Programming in Assembly Language | |
| |
| |
| |
Program Comments | |
| |
| |
| |
Software Documentation | |
| |
| |
| |
A Top-Down Design Example | |
| |
| |
| |
Chapter Summary Points | |
| |
| |
| |
Bibliography and Further Reading | |
| |
| |
| |
Problems | |
| |
| |
| |
Introduction to the CPU: Registers and Condition Codes | |
| |
| |
| |
Introduction | |
| |
| |
| |
CPU Registers | |
| |
| |
| |
Register Transfers | |
| |
| |
| |
The Condition Code Register | |
| |
| |
| |
The Programmer's Model | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Problems | |
| |
| |
| |
Memory Addressing Modes | |
| |
| |
| |
Introduction | |
| |
| |
| |
Addressing Terminology | |
| |
| |
| |
Memory Types | |
| |
| |
| |
Computer Types and Memory Maps | |
| |
| |
| |
Memory Architectures | |
| |
| |
| |
Addressing Modes | |
| |
| |
| |
Stack Addressing | |
| |
| |
| |
Chapter Conclusion and Summary Points | |
| |
| |
| |
Problems | |
| |
| |
| |
Assembly Language Programming | |
| |
| |
| |
Assembly Language Programming Style | |
| |
| |
| |
Structured Assembly Language Programming | |
| |
| |
| |
Interprocess Communication | |
| |
| |
| |
Assembly Language Tricks of the Trade | |
| |
| |
| |
Making It Look Pretty | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Bibliography and Further Reading | |
| |
| |
| |
Problems | |
| |
| |
| |
C Programming for Embedded Systems | |
| |
| |
| |
Introduction | |
| |
| |
| |
Major Differences Between C for Embedded and Desktop Applications | |
| |
| |
| |
Architecture of a C Program | |
| |
| |
| |
Assembly Language Interface | |
| |
| |
| |
Bits and Bytes: Accessing I/O Registers | |
| |
| |
| |
Interrupts | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Bibliography and Further Reading | |
| |
| |
| |
Problems | |
| |
| |
| |
Debugging Microcontroller Software and Hardware | |
| |
| |
| |
Introduction | |
| |
| |
| |
Program Debugging | |
| |
| |
| |
Debugging Your Code | |
| |
| |
| |
Debugging Tools | |
| |
| |
| |
Typical Assembly Language Program Bugs | |
| |
| |
| |
Debugging and Testing C Programs | |
| |
| |
| |
Other Debugging Techniques | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Bibliography and Further Reading | |
| |
| |
| |
Problems | |
| |
| |
| |
Computer Buses and Parallel I/O | |
| |
| |
| |
Introduction | |
| |
| |
| |
The Computer Bus | |
| |
| |
| |
I/O Addressing | |
| |
| |
| |
More Bus Ideas | |
| |
| |
| |
Microcontroller I/O | |
| |
| |
| |
More I/O Ideas | |
| |
| |
| |
I/O Software | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Problems | |
| |
| |
| |
Interrupts and Real-Time Events | |
| |
| |
| |
Introduction | |
| |
| |
| |
The Interrupt Process | |
| |
| |
| |
Multiple Sources of Interrupts | |
| |
| |
| |
Simultaneous Interrupts: Priorities | |
| |
| |
| |
Nested Interrupts | |
| |
| |
| |
Other Interrupts | |
| |
| |
| |
The Interrupt Service Routine or Interrupt Handler | |
| |
| |
| |
An Interrupt Program Template | |
| |
| |
| |
Advanced Interrupts | |
| |
| |
| |
Watchdog Timer or Computer Operating Properly (COP) | |
| |
| |
| |
Real-Time Interrupt | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Problems | |
| |
| |
| |
Memory | |
| |
| |
| |
Introduction | |
| |
| |
| |
A Short History of Random Access Memory | |
| |
| |
| |
Semiconductor Memory | |
| |
| |
| |
Memory Timing Requirements | |
| |
| |
| |
Chapter Conclusion and Summary Points | |
| |
| |
| |
Problems | |
| |
| |
| |
Serial I/O | |
| |
| |
| |
Introduction | |
| |
| |
| |
The Asynchronous Serial Communication System | |
| |
| |
| |
Standards for the Asynchronous Serial I/O Interface | |
| |
| |
| |
Asynchronous Serial Hardware Interfaces | |
| |
| |
| |
ASCII Data and Control Codes | |
| |
| |
| |
Asynchronous Data Flow Control | |
| |
| |
| |
Debugging and Trouble Shooting | |
| |
| |
| |
Asynchronous Serial I/O Software | |
| |
| |
| |
Synchronous Serial Peripheral Interface (SPI) | |
| |
| |
| |
SPI Interface Examples | |
| |
| |
| |
Inter-Integrated Circuit (IIC or I2C) | |
| |
| |
| |
The Controller Area Network (CAN) Bus | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Problems | |
| |
| |
| |
Analog Input and Output | |
| |
| |
| |
Introduction | |
| |
| |
| |
Data Acquisition and Conversion | |
| |
| |
| |
Shannon's Sampling Theorem and Aliasing | |
| |
| |
| |
A/D Errors | |
| |
| |
| |
Choosing the A/D Converter | |
| |
| |
| |
The Analog-to-Digital Converter Interface | |
| |
| |
| |
Analog-to-Digital Converter Types | |
| |
| |
| |
Digital-to-Analog Conversion | |
| |
| |
| |
Other Analog I/O Methods | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Problems | |
| |
| |
| |
Counters and Timers | |
| |
| |
| |
Introduction | |
| |
| |
| |
The Timer/Counter | |
| |
| |
| |
Pulse-Width Modulation (PWM) Waveforms | |
| |
| |
| |
"Real" Real-Time Clock: Clock Time | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Problems | |
| |
| |
| |
Single-Chip Microcontroller Interfacing Techniques | |
| |
| |
| |
Microcontroller Chip I/O | |
| |
| |
| |
Simple Input Devices | |
| |
| |
| |
Simple Display Devices | |
| |
| |
| |
Parallel I/O Expansion | |
| |
| |
| |
Parallel I/O Electronics | |
| |
| |
| |
Temperature Measurements | |
| |
| |
| |
Motor Control | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Bibliography and Further Reading | |
| |
| |
| |
Problems | |
| |
| |
| |
Real-Time Operating Systems | |
| |
| |
| |
Introduction | |
| |
| |
| |
The Real-Time Operating System (RTOS) | |
| |
| |
| |
Conclusion and Chapter Summary Points | |
| |
| |
| |
Bibliography and Further Reading | |
| |
| |
| |
Problems | |
| |
| |
Appendix Binary Codes | |
| |
| |
| |
Binary Codes Review | |
| |
| |
| |
Problems | |
| |
| |
Solutions to Selected Problems | |
| |
| |
Index | |