PART 1 Introduction
1 Introduction to Microcontrollers
1.1 The Microcomputer
1.2 The 68HC11 and 68HC12 Microcontrollers
1.3 Historical Context
1.4 Software and Hardware Development
Summary
Exercises
PART 2 Assembly Language Programming
2 Programming Basics
2.1 Programming Languages
2.2 Types of Program Segments
2.3 Software Construction
Summary
Exercises
3 Simple Assembly Code Construction
3.1 Assembly Source Code
3.2 A Basic Build Process
3.3 Run-Time Debugging-A Tutorial
Summary
Exercises
4 UPU12 Programming Model
4.1 The CPU Register Set
4.2 CPU12 Addressing Modes
4.3 The CPU12 Instruction Set
Summary
Exercises
5 Basic Assembly Programming Techniques
5.1 Data Transfer
5.2 Using the Stack
5.3 Basic Arithmetic Programming
5.4 Shifting and Rotating
5.5 Boolean Logic,Bit Testing,and Bit Manipulation
5.6 Branches and Jumps
5.7 Subrotines
5.8 Position Independence
Summary
Exercises
6 Assembly Program Design and Structure
6.1 Design and Documentation Tools
6.2 Structured Control Constructs
6.3 Data Storage
6.4 Program Structure
6.5 Passing Parameters
Summary
Exercises
7 Assembly Applications
7.1 Software Delay Routines
7.2 I/O Data Conversions
7.3 Basic I/O Routines
7.4 Fixed-Point Arithmetic
Summary
Exercises
PART 3 Microcontroller Hardware and I/O
8 Introduction to Real-Time I/O and Multitasking
8.1 Real-Time Systems
8.2 CPU Loads
8.3 I/O Detection and Response
8.4 Basic Cooperative Multitasking
8.5 Using CPU12 Interrupts
8.6 Basic Real-Time Debugging
Summary
Exercises
9 Microcontroller I/O Resources
9.1 General Purpose I/O
9.2 Timers
9.3 Serial I/O
9.4 A-to-D Conversion
Summary
Exercises
1 The Final Product
1.1 MCU Hardware Design
1.2 Reset Exceptions
1.3 M68HC912B32 Operating Modes
1.4 Configuration and Start-Up Code
1.5 Final Product Development
Summary
Exercises
11 System Expansion
11.1 The Bus Cycle
11.2 Chip-Select Logic
11.3 Bus Timing Analysis
Summary
Exercises
PART 4 Programming Microcontrollers in C
12 Modular and C Code
12.1 C Source Code
12.2 The Modular Build Process
12.3 Source-Level Debugging
Summary
Exercises
13 Creating and Accessing Data in C
13.1 Introduction to Data Types
13.2 ANSI-C Data Types
13.3 Variables and Stored Constants
13.4 Pointers
13.5 Arrays and Strings
13.6 Structures
13.7 Enumerated Types
13.8 Bit Operations
Summary
Exercises
14 C Program Structures
14.1 Control Structures
14.2 Functions
14.3 Modules
14.4 Start-Up and Initialization
Summary
Exercises
PART 5 Real-Time Multitasking Kernels
15 Real-Time Multitasking in C
15.1 Real-Time Programming Review
15.2 Real-Time Kernel Overview
15.3 Cooperative Kernel Design
Summary
Exercises
16 Using the MicroC/OS-II Preenptive Kernel
16.1 Overview
16.2 Tasks and Task Switching
16.3 Interrupt Service Routines
16.4 Timers
16.5 Intertask Communication
16.6 μC/OS-Based Stopwatch Program
Summary
Exercises
APPENDICES
A Programming Conventions
B Basic I/O
C uC/OS Reference
REFERENCES
INDEX