31/317
2 - How does a typical microcontroller work?
2.5.1.1 Hardware mechanism
The hardware mechanism is important to understand. It is different for each product, so what
we shall describe here pertains specifically to the ST7.
An interrupt request is a binary signal (a flag) generated by several external sources. Most pe-
ripherals of the ST7 can produce interrupt requests, for example the I/O ports, the timers, the
SPI, the I
2
C interface, and so on. The external cause of the interrupt request depends on the
type of the peripheral: the I/O ports may have some bits configured to generate an interrupt,
either on low-level, falling edge, rising edge, or both. The timer may request an interrupt on
timer overflow, external capture or output comparison. The SPI may request an interrupt on
end of transmission, etc.
2.5.1.2 Hardware sources of interrupt
The hardware interrupt sources are summarized in the diagram below.
02-mec
Input pin
edge detect
circuit
External source
eg : parallel input port pin
Internal source
eg : timer overflow
Status register
of the peripheral
Interrupt flag bit
Control register
of the peripheral
Interrupt enable bit
Other maskable
interrupt sources
Interrupt trigger
to the core
Diagram of the interrupt mechanism
Global interrupt enable bit
Control register
of the CPU
Non maskable
interrupt sources
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...