25/317
2 - How does a typical microcontroller work?
Features provided may include queueing of interrupt requests, handling requests according to
their priorities, or even modification of priorities to increase the chance that low-priority re-
quests will be eventually processed in a context where there are numerous requests.
2.2.5 Bus
The bus is the set of connections that links all the components of the system and allows all the
data moves, and the distribution of the address and control signals.
2.2.6 Clock Generator
This is the basic coordination circuitry that supplies a set of calibrated clock signals, at a pre-
cise frequency, that schedules all the data movement along the bus and the computations in
the CPU. In some models, the clock frequency can be chosen by software.
2.2.7 Reset Generator
This circuit detects when the system has just been powered up, and resets it in a known state
from which the program execution will start. The reset ensures that each time the system
starts, everything occurs exactly the same way. This is a major condition for the reproducibility
of the behaviour of the system.
2.3 CORE
The main components of the core are:
2.3.1 Arithmetic and Logic Unit (ALU)
This is where all the computations take place. Depending on the microcontroller used, the
ALU provides a different set of operations. Roughly speaking, the basic set of operations
available to all ALUs is the following:
Addition and addition with carry, to provide for multiple precision calculations
Subtraction and subtraction with carry
Increment and decrement
Bitwise shift, leftward or rightward, straight or circular (the outgoing bit in re-injected at the
other end of the data word)
Logical bitwise OR, AND and EXclusive-OR
Logical complement
Some provide additional operations like:
Multiplication
Division
and more