COP8ACC720M9-RE NSC [National Semiconductor], COP8ACC720M9-RE Datasheet - Page 14

no-image

COP8ACC720M9-RE

Manufacturer Part Number
COP8ACC720M9-RE
Description
8-Bit CMOS OTP Microcontroller with 16k Memory and High Resolution A/D
Manufacturer
NSC [National Semiconductor]
www.national.com
Timers
ITMR Register (Address X’0xCF)
TIMER T1
The device has a powerful timer/counter block. The timer
consists of a 16-bit timer, T1, and two supporting 16-bit
autoreload/capture registers, R1A and R1B. The timer block
has two pins associated with it, T1A and T1B. The pin T1A
supports I/O required by the timer block, while the pin T1B is
an input to the timer block. The powerful and flexible timer
block allows the device to easily perform all timer functions
with minimal software overhead. The timer block has three
operating modes: Processor Independent PWM mode, Ex-
ternal Event Counter mode, and Input Capture mode.
The control bits T1C3, T1C2, and T1C1 allow selection of the
different modes of operation.
Mode 1. Processor Independent PWM Mode
As the name suggests, this mode allows the device to gen-
erate a PWM signal with very minimal user intervention. The
user only has to define the parameters of the PWM signal
(ON time and OFF time). Once begun, the timer block will
continuously generate the PWM signal completely indepen-
dent of the microcontroller. The user software services the
timer block only when the PWM parameters require updat-
ing.
In this mode the timer T1 counts down at a fixed rate of t
Upon every underflow the timer is alternately reloaded with
ITSEL2
Bit 7
0
0
0
Reserved
TABLE 3. Idle Timer Window Length
ITSEL1
(Continued)
0
0
1
Bit 3
ITSEL0
0
1
0
ITSEL2
FIGURE 8. Functional Block Diagram for Idle Timer T0
(Instruction Cycles)
Idle Timer Period
ITSEL1
16,384
4,096
8,192
ITSEL0
Bit 0
C
.
14
The ITMR register is cleared on Reset and the Idle Timer pe-
riod is reset to 4,096 instruction cycles.
Any time the IDLE Timer period is changed there is the pos-
sibility of generating a spurious IDLE Timer interrupt by set-
ting the T0PND bit. The user is advised to disable IDLE
Timer interrupts prior to changing the value of the ITSEL bits
of the ITMR Register and then clear the T0PND bit before at-
tempting to synchronize operation to the IDLE Timer.
the contents of supporting registers, R1A and R1B. The very
first underflow of the timer causes the timer to reload from
the register R1A. Subsequent underflows cause the timer to
be reloaded from the registers alternately beginning with the
register R1B.
The T1 Timer control bits, T1C3, T1C2 and T1C1 set up the
timer for PWM mode operation.
shows a block diagram of the timer in PWM mode.
The underflows can be programmed to toggle the T1A output
pin. The underflows can also be programmed to generate in-
terrupts.
Underflows from the timer are alternately latched into two
pending flags, T1PNDA and T1PNDB. The user must reset
these pending flags under software control. Two control en-
able flags, T1ENA and T1ENB, allow the interrupts from the
timer underflow to be enabled or disabled. Setting the timer
enable flag T1ENA will cause an interrupt when a timer un-
derflow causes the R1A register to be reloaded into the
timer. Setting the timer enable flag T1ENB will cause an in-
terrupt when a timer underflow causes the R1B register to be
reloaded into the timer. Resetting the timer enable flags will
disable the associated interrupts.
Either or both of the timer underflow interrupts may be en-
abled. This gives the user the flexibility of interrupting once
ITSEL2
0
1
ITSEL1
1
X
ITSEL0
DS012869-9
1
X
(Instruction Cycles)
Idle Timer Period
32,768
65,536

Related parts for COP8ACC720M9-RE