cop87l88gw National Semiconductor Corporation, cop87l88gw Datasheet - Page 15

no-image

cop87l88gw

Manufacturer Part Number
cop87l88gw
Description
One-time Programmable Otp Microcontroller
Manufacturer
National Semiconductor Corporation
Datasheet
Timers
INITIALIZATION
The user should perform the following initialization prior to
starting the capture timer
1 Reset the CMxRUN bit
2 Configure the corresponding Port bits as inputs
3 Set the edge control bits CMxEC
4 Reset CMxIP1 (CMxIP1
5 Reset CMxIP2 (CMxIP2
6 Load the 8-bit prescaler register CMxPSC with the de-
7 Set CMxIEN (if interrupts are to be used)
8 Set the Global Interrupt Enable (GIE) bit (if interrupts are
9 Set CMxRUN bit to start the capture timer
sired value (from 0 to 255)
to be used)
(Continued)
e
e
0)
0)
FIGURE 12 Pulse Train Generator 1 Block Diagram
15
Figure 12 shows the pulse train generator 1 block diagram
WARNING
In order to avoid erroneous interrupts the capture timer in-
terrupts must be disabled prior to setting resetting the cap-
ture edge control bits (CMxEC) In addition after selecting
the interrupt edge the pending flags must be reset before
the capture interrupts are enabled or re-enabled If the ini-
tialization sequence outlined above is followed each time
the user aIters the edge control bits the user is guaranteed
to avoid erroneous interrupts
Pulse Train Generators
This device contains four independent pulse train genera-
tors Each individual generator is controlled by a corre-
sponding 16-bit counter Each counter has a 16-bit prescal-
er and a 16-bit count register Each counter may be config-
ured to output a selected number of 50% duty cycle pulses
The contents of the prescaler determine the width of the
output pulses and the value of the count register deter-
mines the number of pulses Each counter may be stopped
started under software control and each counter may be
configured to interrupt the microcontroller on an underflow
http
TL DD 12527 – 12
www national com

Related parts for cop87l88gw