English
Language : 

COP888GW Datasheet, PDF (13/44 Pages) National Semiconductor (TI) – 8-Bit Microcontroller with Pulse Train Generators
Timers (Continued)
TIMER CONTROL FLAGS
The timers T1 and T2 have identical control structures The
control bits and their functions are summarized below
TxC0
Timer Start Stop controI in Modes 1 and 2 (Proc-
essor Independent PWM and External Event
Counter) where 1 e Start 0 e Stop Timer Un-
derfIow Interrupt Pending Flag in Mode 3 (Input
Capture)
TxPNDA Timer Interrupt Pending Flag
TxPNDB Timer Interrupt Pending Flag
TxENA Timer Interrupt Enable FIag
TxENB Timer Interrupt Enable Flag
1 e Timer Interrupt EnabIed
0 e Timer Interrupt Disabled
TxC3 Timer mode controI
TxC2 Timer mode control
TxC1 Timer mode controI
The timer mode controI bits (TxC3 TxC2 and TxC1) are
detailed beIow
Capture Timer
This device contains two independent capture timers Cap-
ture Timer 1 and Capture Timer 2 Each capture timer con-
tains an 8-bit programmable prescaler register a 16-bit
down counter a 16-bit input capture register and capture
edge select Iogic The 16-bit down counter is clocked at a
specific frequency determined by the value loaded into the
prnscaler register A selected positive or negative edge
transition on the capture input causes the contents of the
down counter to be latched into the capture register The
values captured in the registers reflect the eIapsed time be-
tween two positive or two negative transitions on the cap-
ture input The time between a positive and negative edge
(a pulse width) may be measured if the selected capture
edge is switched after the first edge is captured Each cap-
ture timer may be stopped started under software control
and each capture timer may be configured to interrupt the
microcontroller on an underflow or input capture
Figure 10 shows the capture timer 1 block diagram
TABLE II Timer Mode Control
TxC3
0
0
1
1
0
1
0
1
TxC2
0
0
0
0
1
1
1
1
TxC1
0
1
1
0
0
0
1
1
Timer Mode
MODE 2 (External Event Counter)
MODE 2 (External Event Counter)
MODE 1 (PWM) TxA Toggle
MODE 1 (PWM) No TxA Toggle
MODE 3 (Capture) Captures
TxA Positive Edge
TxB Positive Edge
MODE 3 (Capture) Captures
TxA Positive Edge
TxB Negative Edge
MODE 3 (Capture) Captures
TxA Negative Edge
TxB Positive Edge
MODE 3 (Capture) Captures
TxA Negative Edge
TxB Negative Edge
Interrupt A
Source
Timer Underflow
Timer Underflow
Autoreload RA
Autoreload RA
Positive TxA Edge or
Timer Underflow
Positive TxA Edge or
Timer Underflow
Negative TxA Edge or
Timer Underflow
Negative TxA Edge or
Timer Underflow
Interrupt B
Source
Positive TxB Edge
Positive TxB Edge
Autoreload RB
Autoreload RB
Positive TxB Edge
Negative TxB Edge
Positive TxB Edge
Negative TxB Edge
Timer
Counts On
TxA Positive Edge
TxA Negative Edge
tc
tc
tc
tc
tc
tc
13
http www national com