COP820CJ/COP840CJ Family
8-Bit CMOS ROM Based Microcontrollers with 1k or 2k
Memory, Comparator and Brown Out Detector
General Description
The COP820CJ/840CJ Family ROM based microcontrollers
are integrated COP8
memory, an Analog comparator and Brownout detection.
These single-chip CMOS devices are suited for lowerfunctionality applications where power and voltage fluctuations are a consideration. Pin and software compatible (no
Brownout; different Vcc range) 4k/32k OTP versions are
available (COP87LxxCJ/RJ Family) for pre-production, and
for use with a range of COP8 software and hardware development tools.
™
Base core devices with 1k or 2k
July 1999
Family features include an 8-bit memory mapped architecture, 10MHz CKI with 1us instruction cycle, one multifunction 16-bit timer/counter, MICROWIRE/PLUS
I/O, one analog comparator, power saving HALT mode,
MIWU, on-chip R/C oscillator capacitor (COP840CJ), high
current outputs, software selectable I/O options, WATCH-
™
DOG
timer, modulator/timer, Brownout detector, Power on
Reset, 2.5v-6.0v operation, and 16/20/28 pin packages.
In this datasheet, the term COP820CJ refers to packages in-
cluding the COP820CJ, COP822CJ, and COP823CJ; and
COP840CJ refers to COP840CJ, COP842CJ, COP940CJ,
and COP942CJ.
Devices included in this data sheet are:
™
serial
COP820CJ/COP840CJ Family, 8-Bit CMOS ROM Based Microcontrollers with 1k or 2k Memory,
COP820CJ1k ROM642428 DIP/SOIC-40 to +85˚C
COP822CJ1k ROM541620 DIP/SOIC-40 to +85˚C
COP823CJ1k ROM641216 SOIC-40 to +85˚C
COP840CJ2k ROM1282428 DIP/SOIC-40 to +85˚CLow EMI
COP940CJ2k ROM1282428 DIP/SOIC-0 to +70˚C2.5V-4.5V, CJH = 4V-6V
COP842CJ2k ROM1281620 DIP/SOIC-40 to +85˚C
COP942CJ2k ROM1281620 DIP/SOIC-0 to +70˚C2.5V-4.5V, CJH = 4V-6V
Key Features
n Multi-Input Wake Up (on the 8-bit Port L)
n Brown out detector
n Analog comparator
n Modulator/timer (High speed PWM for IR transmission)
n 16-bit multi-function timer supporting
n 1024 or 2048 bytes of ROM
n 64 or 128 bytes of RAM
n Quiet design (low radiated emissions)
n Integrated capacitor for the R/C oscillator for COP840CJ
I/O Features
n Software selectable I/O options (TRI-STATE®output,
push-pull output, weak pull-up input, high impedance
input)
n High current outputs (8 pins)
n Packages
— 16 SO with 12 I/O pins for COP820CJ
— 20 DIP/SO with 16 I/O pins
— 28 DIP/SO with 24 I/O pins
n Schmitt trigger inputs on Port G
n MICROWIRE/PLUS serial I/O
CPU/Instruction Set Feature
n 1 µs instruction cycle time
n Three multi-source vectored interrupts servicing
If Military/Aerospace specified devices are required,
please contact the National Semiconductor Sales Office/
Distributors for availability and specifications.
Supply Voltage (V
Voltage at any Pin−0.3V to V
)7.0V
CC
CC
+ 0.3V
Total Current into V
pin (Source)80 mA
CC
Total Current out of GND pin (sink)80 mA
Storage Temperature Range−65˚C to +150˚C
Note 1:
Absolute maximum ratings indicate limits beyond which damage to
the device may occur.
DC and AC electrical specifications are not ensured when operating the device at absolute maximum ratings.
DC Electrical Characteristics
−0˚C ≤ TA≤ + 70˚C for COP94x and −40˚C ≤ TA≤ +85˚C for all others
ParameterConditionsMinTypMaxUnits
Operating VoltageBrown Out Disabled2.56.0V
COP94xCJBrown Out Disabled2.54.5V
COP94xCJHBrown Out Disabled4.56.0V
Power Supply Ripple 1 (Note 2)Peak to Peak0.1 V
Supply Current (Note 3)
CKI=10 MHzV
CKI=4 MHzV
CKI=4 MHzV
CKI=1 MHzV
HALT Current with Brown Out
Disabled (Note 4)
HALT Current with Brown Out
Enabled
=
6V, tc=1 µs6.0mA
CC
=
6V, tc=2.5 µs3.5mA
CC
=
4.0V, tc=2.5 µs2.0mA
CC
=
4.0V, tc=10 µs1.5mA
CC
=
V
6V, CKI=0 MHz
CC
=
V
6V, CKI=0 MHz
CC
<
110µA
<
50110µA
COP840CJ Supply Current (Note
3)
=
CKI=10 MHz, R = 2.2kV
CKI=4 MHz, R = 4.7kV
CKI=4 MHz, R = 4.7kV
CKI=1 MHz, R = 20kV
HALT Current with Brown Out
Disabled
HALT Current with Brown Out
Enabled
Brown Out Trip Level (Brown Out
Enabled)
COP840CJ Brown Out Trip Level
6V, tc=1 µs8.0mA
CC
=
6V, tc=2.5 µs6.0mA
CC
=
4.5V, tc=2.5 µs2.5mA
CC
=
4.5V, tc=10 µs1.5mA
CC
=
V
6V, CKI=0 MHz
CC
=
V
6V, CKI=0 MHz
CC
<
2.28µA
<
50100µA
1.83.14.2V
1.93.13.9V
(Brown Out Enabled)
INPUT LEVELS (V
IH,VIL
)
Reset, CKI:
Logic High0.8 V
CC
Logic Low0.2 V
All Other Inputs
Logic High0.7 V
CC
Logic Low0.2 V
Hi-Z Input LeakageV
Input Pullup CurrentV
=
6.0V−2+2µA
CC
=
6.0V, V
CC
=
0V−40−250µA
IN
L- and G-Port Hysteresis (Note 6)COP840CJ
0.05 V
CC
0.35 V
CC
CC
CC
CC
V
V
V
V
V
V
www.national.com4
DC Electrical Characteristics (Continued)
−0˚C ≤ TA≤ + 70˚C for COP94x and −40˚C ≤ TA≤ +85˚C for all others
ParameterConditionsMinTypMaxUnits
Output Current Levels
D Outputs:
SourceV
SinkV
L4–L7 Output SinkV
=
4.5V, V
CC
=
V
2.5V, V
CC
=
4.5V, V
CC
=
V
2.5V, V
CC
=
4.5V, V
CC
All Others
Source (Weak Pull-up Mode)V
Source (Push-pull Mode)V
Sink (Push-pull Mode)V
=
4.5V, V
CC
=
V
2.5V, V
CC
=
4.5V, V
CC
=
V
2.5V, V
CC
=
4.5V, V
CC
=
V
2.5V, V
CC
TRI-STATE Leakage−2.0+2.0µA
Allowable Sink/Source
Current Per Pin
D Outputs15mA
L4–L7 (Sink)20mA
All Others3mA
Maximum Input CurrentRoom Temperature
without Latchup (Note 5)
RAM Retention Voltage, V
r
500 ns Rise and2.0V
Fall Time (Min)
Input Capacitance7pF
Load Capacitance on D21000pF
Note 2: Rate of voltage change must be less than 10 V/mS.
Note 3: Supply current is measured after running 2000 cycles with a square wave CKI input, CKO open, inputs at rails and outputs open.
Note 4: The HALT mode will stop CKI from oscillating in the RC and crystal configurations. HALT test conditions: L, and G0..G5 ports configured as outputs and set
high. The D port set to zero. All inputs tied to V
Note 5: Pins G6 and RESET are designed with a high voltage input network. These pins allow input voltages greater than V
to VCCwhen biased at voltages greaterthanVCC(the pins do not havesourcecurrentwhenbiasedata voltage below VCC). The effective resistance to VCCis 750Ω
(typical). These two pins will not latch up. The voltage at the pins must be limited to less than 14V.
. The comparator and the Brown Out circuits are disabled.
CC
=
3.8V−0.4mA
OH
=
1.8V−0.2mA
OH
=
1.0V10mA
OL
=
0.4V2mA
OH
=
2.5V15mA
OL
=
3.2V−10−110µA
OH
=
1.8V−2.5−33µA
OH
=
3.8V−0.4mA
OH
=
1.8V−0.2mA
OH
=
0.4V1.6mA
OL
=
0.4V0.7mA
OL
±
and the pins will have sink current
CC
100mA
www.national.com5
AC Electrical Characteristics
−40˚C ≤ TA≤ +85˚C unless otherwise specified
ParameterConditionsMinTypMaxUnits
Instruction Cycle Time (tc)
Crystal/Resonator4.5V ≤ V
2.5V ≤ V
R/C Oscillator4.5V ≤ V
COP840CJ2DCµs
2.5V ≤ V
COP840CJ5DCµs
V
Rise Time when Using Brown
CC
Out
V
CC
Frequency at Brown Out Reset4MHz
CKI Frequency For Modular Output4MHz
CKI Clock Duty Cycle (Note 6)fr=Max4060
Rise Time (Note 6)fr=10 MHz ext. Clock12ns
Fall Time (Note 6)fr=10 MHz ext. Clock8ns
Inputs
t
Setup
4.5V ≤ VCC≤ 6.0V200ns
2.5V ≤ V
t
Hold
4.5V ≤ VCC≤ 6.0V60ns
2.5V ≤ V
Output Propagation DelayR
t
PD1,tPD0
L
SO, SK4.5V ≤ VCC≤ 6.0V0.7µs
2.5V ≤ V
All Others4.5V ≤ V
2.5V ≤ V
Input Pulse Width
Interrupt Input High Time1tc
Interrupt Input Low Time1tc
Timer Input High Time1tc
Timer Input Low Time1tc
MICROWIRE Setup Time (t
MICROWIRE Hold Time (t
)20ns
µWS
)56ns
µWH
MICROWIRE Output220ns
Propagation Delay (t
µPD
)
Reset Pulse Width1.0µs
Note 6: Parameter characterized but not production tested.
≤ 6.0V1DCµs
CC
≤ 4.5V2.5DCµs
CC
≤ 6.0V3DCµs
CC
≤ 4.5V7.5DCµs
CC
=
0V to 6V50µs
≤ 4.5V500ns
CC
≤ 4.5V150ns
CC
=
2.2k, CL=100 pF
≤ 4.5V1.75µs
CC
≤ 6.0V1µs
CC
≤ 4.5V5µs
CC
%
FIGURE 3. MICROWIRE/PLUS Timing
www.national.com6
DS011208-2
Comparator DC and AC Characteristics
4V ≤ VCC≤ 6V, −40˚C ≤ TA≤ + 85˚C (Note 7)
ParametersConditionsMinTypeMaxUnits
<
<
V
Input Offset Voltage0.4V
IN
VCC− 1.5V
Input Common Mode Voltage Range0.4V
±
10
±
25mV
− 1.5V
CC
Voltage Gain300kV/V
DC Supply Current (when enabled)V
Note 7: For comparator output current characteristics see L-Port specs.
Typical Performance Characteristics for COP820CJ
Dynamic— IDDvs V
(Crystal Clock Option)
CC
Ports L/G Weak
Pull-Up Source Current
Ports L4–L7
Sink Current
DS011208-32
DS011208-35
Halt— IDDvs V
(Brown Out Disabled)
CC
Ports L/G Push-Pull
Source Current
Port D Source Current
DS011208-33
DS011208-36
Halt— IDDvs V
(Brown Out Enabled)
CC
Ports L/G Push-Pull
Sink Current
Port D Sink Current
DS011208-34
DS011208-37
DS011208-38
DS011208-39
DS011208-40
www.national.com7
Typical Performance Characteristics for COP820CJ (Continued)
Brown Out Voltage
vs Temperature
DS011208-41
Typical Performance Characteristics for COP840CJ
Port D Sink current
Halt Current with
Comparator Enabled
DS011208-5
Halt Current with
Brown Out Disabled
Ports L/G Push-Pull
Source Current
DS011208-6
Halt Current with
Brown Out Enabled
DS011208-7
Ports L/G Push-Pull
Sink Current
DS011208-8
www.national.com8
DS011208-9
DS011208-10
Typical Performance Characteristics for COP840CJ (Continued)
Port D Source Current
Brown Out Voltage
vs Temperature
DS011208-11
Port D Sink Current
DS011208-13
DS011208-13
www.national.com9
Pin Description
VCCand GND are the power supply pins.
CKI is the clock input. This can come from an external
source, a R/C generated oscillator or a crystal (in conjunction with CKO). See Oscillator description.
RESET is the master reset input. See Reset description.
PORT I is a 4-bit Hi-Z input port.
PORT L is an 8-bit I/O port.
There are two registers associated with the L port: a data
register and a configuration register. Therefore, each L I/O
bit can be individually configured under software control as
shown below:
Port LPort LPort L
Config.DataSetup
00Hi-Z Input (TRI-STATE)
01Input with Weak Pull-up
10Push-pull Zero Output
11Push-pull One Output
Three data memory address locations are allocated for this
port, one each for data register [00D0], configuration register
[00D1] and the input pins [00D2].
Port L has the following alternate features:
L7 MIWU or MODOUT (high sink current capability)
L6 MIWU (high sink current capability)
L5 MIWU (high sink current capability)
L4 MIWU (high sink current capability)
L3 MIWU
L2 MIWU or CMPIN+
L1 MIWU or CMPIN−
L0 MIWU or CMPOUT
The selection of alternate Port L functions is done through
registers WKEN [00C9] to enable MIWU and CNTRL2
[00CC] to enable comparator and modulator.
All eight L-pins have Schmitt Triggers on their inputs.
PORT G is an 8-bit port with 6 I/O pins (G0–G5) and 2 input
pins (G6, G7).
All eight G-pins have Schmitt Triggers on the inputs.
There are two registers associated with the G port: a data
register and a configuration register. Therefore each G port
bit can be individually configured under software control as
shown below:
Port GPort GPort G
Config.DataSetup
00Hi-Z Input (TRI-STATE)
01Input with Weak Pull-up
10Push-pull Zero Output
11Push-pull One Output
Three data memory address locations are allocated for this
port, one for data register [00D4], one for configuration register [00D5] and one for the input pins [00D6]. Since G6 and
G7 are Hi-Z input only pins, any attempt by the user to configure them as outputs by writing a one to the configuration
register will be disregarded. Reading the G6 and G7 configuration bits will return zeros. Note that the device will be
placed in the Halt mode by writing a “1” to the G7 data bit.
Six pins of Port G have alternate features:
G7 CKO crystal oscillator output (selected by mask option)
or HALT restart input/general purpose input (if clock
option is R/C or external clock)
G6 SI (MICROWIRE serial data input)
G5 SK (MICROWIRE clock I/O)
G4 SO (MICROWIRE serial data output)
G3 TIO (timer/counter input/output)
G0 INTR (an external interrupt)
Pins G2 and G1 currently do not have any alternate func-
tions.
The selection of alternate Port G functions are done through
registers PSW [00EF] to enable external interrupt and CNTRL1 [00EE] to select TIO and MICROWIRE operations.
PORT D is a four bit output port that is preset when RESET
goes low. One data memory address location is allocated for
the data register [00DC].
Note: Care must be exercised with the D2 pin operation. At RESET, the ex-
ternal loads on this pin must ensure that the output voltages stay
above 0.8 V
keep the external loading on D2 to less than 1000 pF.
to prevent the chip from entering special modes. Also
CC
Functional Description
The internal architecture is shown in the block diagram. Data
paths are illustrated in simplified form to depict how the various logic elements communicate with each other in implementing the instruction set of the device.
ALU and CPU Registers
The ALU can do an 8-bit addition, subtraction, logical or shift
operations in one cycle time. There are five CPU registers:
Ais the 8-bit Accumulator register
PC is the 15-bit Program Counter register
PU is the upper 7 bits of the program counter (PC)
PL is the lower 8 bits of the program counter (PC)
Bis the 8-bit address register and can be auto incre-
mented or decremented.
Xis the 8-bit alternate address register and can be auto
incremented or decremented.
SP is the 8-bit stack pointer which points to the subroutine
stack (in RAM).
B, X and SP registers are mapped into the on chip RAM. The
B and X registers are used to address the on chip RAM. The
SP register is used to address the stack in RAM during subroutine calls and returns. The SP must be preset by software
upon initialization.
Memory
The memory is separated into two memory spaces: program
and data.
PROGRAM MEMORY
Program memory consists of 1024 x 8 ROM or 2048 x 8
ROM. These bytes of ROM may be instructions or constant
data. The memory is addressed by the 15-bit program
counter (PC). ROM can be indirectly read by the LAID instruction for table lookup.
DATA MEMORY
The data memory address space includes on chip RAM, I/O
and registers. Data memory is addressed directly by the instruction or indirectly through B, X and SP registers. The device has 64 or 128 bytes of RAM. Sixteen bytes of RAM are
www.national.com10
Memory (Continued)
mapped as “registers”, these can be loaded immediately,
decremented and tested. Three specific registers: X, B, and
SP are mapped into this space, the other registers are available for general usage.
Any bit of data memory can be directly set, reset or tested.
All I/O and registers (exceptA and PC) are memory mapped;
therefore, I/O bits and register bits can be directly and individually set, reset and tested, except the write once only bit
(WDREN, WATCHDOG Reset Enable), and the unused and
read only bits in CNTRL2 and WDREG registers.
Note: RAM contents are undefined upon power-up.
Reset
EXTERNAL RESET
The RESET input pin when pulled low initializes the
micro-controller.The user must insure that the RESET pin is
held low until V
the clock is stabilized. An R/C circuit with a delay 5x greater
than the power supply rise time is recommended (
The device immediately goes into reset state when the RESET input goes low. When the RESET pin goes high the device comes out of reset state synchronously. The device will
be running within two instruction cycles of the RESET pin going high. The following actions occur upon reset:
Port LTRI-STATE
Port GTRI-STATE
Port DHIGH
PCCLEARED
RAM ContentsRANDOM with Power-On-
B, X, SPSame as RAM
PSW, CNTRL1,
CNTRL2
and WDREG Reg.CLEARED
Multi-Input Wakeup
Reg.
WKEDG, WKENCLEARED
WKPNDUNKNOWN
Data and Configuration
Registers forL&GCLEARED
WATCHDOG TimerPrescaler/Counter each
The device comes out of the HALT mode when the RESET
pin is pulled low. In this case, the user has to ensure that the
RESET signal is low long enough to allow the oscillator to restart. An internal 256 t
with the two pin crystal oscillator. When the device comes
out of the HALT mode through Multi-Input Wakeup, this delay allows the oscillator to stabilize.
The following additional actions occur after the device
comes out of the HALT mode through the RESET pin.
is within the specified voltage range and
CC
Figure 4
Reset
UNAFFECTED with external
Reset (power already applied)
loaded with FF
delay is normally used in conjunction
c
If a two pin crystal/resonator oscillator is being used:
RAM ContentsUNCHANGED
Timer T1 and A ContentsUNKNOWN
WATCHDOG Timer Prescaler/CounterALTERED
If the external or RC Clock option is being used:
RAM ContentsUNCHANGED
Timer T1 and A ContentsUNCHANGED
WATCHDOG Timer Prescaler/CounterALTERED
The external RESET takes priority over the Brown Out Reset.
Note: If the RESET pin is pulled low while Brown Out occurs (Brown Out cir-
cuit has detected Brown Out condition), the external reset will not occur until the Brown Out condition is removed. External reset has priority only if V
is greater than the Brown Out voltage.
CC
).
RC>5 x Power Supply Rise Time
FIGURE 4. Recommended Reset Circuit
WATCHDOG RESET
With WATCHDOG enabled, the WATCHDOG logic resets
the device if the user program does not service the WATCHDOG timer within the selected service window. The WATCHDOG reset does not disable the WATCHDOG. Upon
WATCHDOG reset, the WATCHDOGPrescaler and Counter
are each initialized with FF Hex.
The following actions occur upon WATCHDOGreset that are
different from external reset.
WDREN WATCHDOG Reset Enable bitUNCHANGED
WDUDFWATCHDOG Underflow bitUNCHANGED
Additional initialization actions that occur as a result of
WATCHDOG reset are as follows:
Port LTRI-STATE
Port GTRI-STATE
Port DHIGH
PCCLEARED
RAM ContentsUNCHANGED/RANDOM
B, X, SPUNCHANGED
PSW, CNTRL1 and
CLEARED
CNTRL2 (except WDUDF
Bit) Registers
Multi-Input Wakeup
Registers
WKEDG, WKENCLEARED
WKPNDUNKNOWN
Data and Configuration
Registers forL&GCLEARED
WATCHDOG TimerPrescalar/Counter
each loaded with FF
DS011208-5
www.national.com11
Loading...
+ 24 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.