English
Language : 

ST7FLCD1_05 Datasheet, PDF (80/95 Pages) STMicroelectronics – 8-bit MCU for LCD Monitors with 60 KBytes Flash,2 KBytes RAM, 2 DDC Ports and Infrared Controller
8-bit Timer with External Trigger (TIMB)
14 8-bit Timer with External Trigger (TIMB)
ST7FLCD1
14.1 Introduction
Timer B is an 8 bit-programmable free-running downcounter, driven by a programmable prescaler.
An external signal can also trigger the countdown. The Timer B block diagram is shown in
Figure 42.
14.2 Main Features
● Programmable Prescaler: fCPU divided by 1, 8 or 16
● Overflow status flag and maskable interrupt
● Auto reload capability
● An external signal with programmable polarity can trigger the count-down
Figure 42: External Timer Block Diagram
EXTRIG
fCPU
Fixed
Prescaler
% 128
fTIMER Prescaler
1 / 8 / 16
Preload register
TIMCPRB
EDG EXT EEF 8
Control Logic
8-bit downcounter
Auto reload
OVF interrupt request
Interrupt
TIMCSRB TB1 TB0 OVF OVFE TAR EXT EDG EEF
14.3 Functional Description
The 8 bit-downcounter timer counts from a start value down to 00h. The start value is preloaded
from the associated 8-bit TIMCPRB register every time it is written, or when the counter has
reached the 00h value (Auto Reload feature) if the TAR bit is set. The OVF flag is set when the
downcounter reaches 00h. An interrupt is generated if the OVFE bit is set.
When the EXT bit is set, an external signal edge triggers the countdown start. The EDG bit controls
the rising or falling signal edge. Once detected, the selected edge sets the EEF flag, preloads the
downcounter with the start value and starts the countdown as usual.
During the countdown, the downcounter cannot be retriggered and subsequent pulses occurring
after the countdown has started are ignored until the counter reaches 00h.
80/95