cop87l88rk National Semiconductor Corporation, cop87l88rk Datasheet - Page 19

no-image

cop87l88rk

Manufacturer Part Number
cop87l88rk
Description
8-bit Cmos Otp Microcontrollers With 8k Or 32k Memory, Comparator, And Single-slope A/d Capability
Manufacturer
National Semiconductor Corporation
Datasheet
Analog Function Block
This device contains an analog function block with the intent
to provide a function which allows for single slope, low cost,
A/D conversion of up to 6 channels.
CMPSL REGISTER (ADDRESS X’00B7)
The CMPSL register contains the following bits:
CMPT2B
CMPISEL0/1/2 Will select one of seven possible sources
CMPOE
CSEN
RESET
The state of the Comparator Block immediately after RESET
is as follows:
1. The CMPSL Register is set to all zeros
2. The Comparator is disabled
3. The Constant Current Source is disabled
4. CMPNEG is turned off
5. The Port I inputs are electrically isolated from the com-
6. The T2B input is as normally selected by the T2CNTRL
7. CMPISEL0–CMPISEL2 are set to zero
8. All Port I inputs are selected to the default digital input
The comparator outputs have the same specification as
Ports L and G except that the rise and fall times are sym-
metrical.
CMPT2B CMPISEL2 CMPISEL1 CMPISEL0 CMPOE CSEN CMPEN CMPNEG
Bit 7
parator
Register
mode
Selects the timer T2B input to be driven di-
rectly by the comparator output. If the com-
parator is disabled (CMPEN = 0), this func-
tion is disabled, i.e., the T2B input is
connected to Port L5.
(I0/I2/I3/I4/I5/I6/internal reference) as a
positive input to the comparator (see Table
3 for more information.) Power savings can
be realized by deselecting the internal ref-
erence when it is not in actual use.
Enables the comparator output to either pin
I3 or pin I7 (“1” = enable) depending on the
value of CMPISEL0/1/2.
Enables the internal constant current
source. This current source provides a
CMPISEL2
0
0
0
0
1
1
1
1
Control Bit
CMPISEL1
0
0
1
1
0
0
1
1
(Continued)
TABLE 3. Comparator Input Selection
CMPISEL0
0
1
0
1
0
1
0
1
Bit 0
I1
I1
I1
I1
I1
I1
I1
I1
Neg. Input
Comparator Input Source
19
CMPEN
CMPNEG
The Comparator Select Register is cleared on RESET (the
comparator is disabled). To save power the program should
also disable the comparator before the µC enters the HALT/
IDLE modes. Disabling the comparator will turn off the con-
stant current source and the V
comparator output from the T2B input and pin I3 or I7 and re-
move the low on I1 caused by CMPNEG.
It is often useful for the user’s program to read the result of
a comparator operation. Since I1 is always selected to be
COMPIN− when the comparator is enabled (CMPEN = 1),
the comparator output can be read internally by reading bit 1
(CMPRD) of register PORTI (RAM address 0 x D7).
The following table lists the comparator inputs and outputs
vs. the value of the CMPISEL0/1/2 bits. The output will only
be driven if the CMPOE bit is set to 1.
Interrupts
Each device supports eleven vectored interrupts. Interrupt
sources include Timer 0, Timer 1, Timer 2, Timer 3, Port L
Wakeup, Software Trap, MICROWIRE/PLUS, and External
Input.
All interrupts force a branch to location 00FF Hex in program
memory. The VIS instruction may be used to vector to the
appropriate service routine from location 00FF Hex.
The Software trap has the highest priority while the default
VIS has the lowest priority.
Each of the 11 maskable inputs has a fixed arbitration rank-
ing and vector.
Figure 13 shows the Interrupt Block Diagram.
I2
I2
I3
I0
I4
I5
I6
V
CC
Pos. Input
/2 Ref.
nominal 20 µA constant current at the I1
pin. This current can be used to ensure a
linear charging rate on an external capaci-
tor. This bit has no affect and the current
source is disabled if the comparator is not
enabled (CMPEN = 0).
Enable the comparator (“1” = enable).
Will drive I1 to a low level. This bit can be
used to discharge an external capacitor.
This bit is disabled if the comparator is not
enabled (CMPEN = 0).
I3
I7
I7
I7
I7
I7
I7
I7
Comparator
CC
Output
/2 reference, disconnect the
www.national.com

Related parts for cop87l88rk