Microcontrollers in Practice

This chapter is a presentation of the main subsystems of microcontrollers, seen as resources, organized according to one of the fundamental architectures: Von Neumann and Harvard. It also contains a description of the internal CPU registers, the general structure of a peripheral interface, and an overview of the interrupt system.
A microcontroller is a structure that integrates in a single chip a microprocessor, a certain amount of memory, and a number of peripheral interfaces.
The Central Processing Unit (CPU) is connected to the other subsystems of the microcontroller by means of the address and data buses. Depending on how the CPU accesses the program memory, there are two possible architectures for microcontrollers, called Von Neumann, and Harvard.
Figure 1.1 shows the structure of a computer with Von Neumann architecture, where all the resources, including program memory, data memory, and I/O registers, are connected to the CPU by means of a unique address and data bus.
A typical microcontroller having Von Neumann architecture is 68HC11 from Motorola. In HC11, all resources are identified by unique addresses in the same address space, and can be accessed using the same instructions. For example, in case of the instruction:
LDAA ;load accumulator a from
the operand indicated by the label
can be any of the microcontroller's resources, from I/O ports, to ROM constants. This...