28/317
2 - How does a typical microcontroller work?
push-pull or open drain. Some outputs also allow for a higher current to directly drive relays,
LEDs or opto-isolators.
In addition, these pins can also be used at the same time as the input-output pins of other pe-
ripherals like Timers, Serial to Parallel Interfaces, or as inputs to the interrupt circuitry or an
Analog to Digital Converter.
The configurability of these pins helps reduce the number of components in the schematic di-
agram, and thus the size of the circuit board.
2.4.2 Analog to Digital Converter
The ADC is a way of converting an incoming voltage into a number. The ADC is calibrated so
that the relationship between the voltage and the number is well known, which allows the pro-
gram to process a representative measurement of the signal.
2.4.3 Programmable Timer
This is a complex block based on a counter that can be used in many ways, so that it can ei-
ther count pulses, or measure the duration of pulses or frequencies, or produce precisely
timed output pulses. This peripheral is so flexible that it is virtually impossible to describe all its
possible applications. In addition, the presence of a programmable timer leads the circuit de-
signer to use it intensively, since it is the peripheral that provides the highest accuracy, when
taken as a measuring device. Thus, when the measurement of a physical parameter (like a
temperature, a level, a pressure, etc.) is needed, instead of designing a sensor that outputs an
analog voltage, it is easier and more accurate to design it to produce a square signal with a
frequency that reflects the parameter. Such signals are also easier to transport than voltages
that may suffer from electromagnetic interference.
2.4.4 Serial Peripheral Interface
This interface is based on a shift register that can perform serial to parallel conversion and
vice-versa. It transmits eight bits at a time, using only two or three pins. This saves pins on the
the chip, and also simplifies multiplexing when connecting a number of microcontrollers to-
gether.
It can also be used to interface serial-access memory chips that provide non-volatile storage
at low cost.
2.4.5 Watchdog Timer
The watchdog timer is a supplementary timer that can be used to protect the system against
failures either due to the program itself (e.g. when a certain case has not been considered and
the program cannot process it correctly); or a power supply brownout or electromagnetic inter-
ference has disturbed the normal working of the microcontroller. In both cases, the program
may crash and the system that is built on it will no longer be stable. This can have conse-
Содержание 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 ...