![background image](http://html1.mh-extra.com/html/national-semiconductor/cop820cj/cop820cj_manual_710393019.webp)
COP820CJ
/COP
822
CJ/C
OP8
23C
J
C o n tro l R e g is te rs
CNTRL1 REGISTER (ADDRESS OOEE)
The Timer and MICROWIRE control register contains the
following bits:
SL1 and SLO Select the MICROWIRE clock divide-by
(00 = 2, 01 = 4, 1x = 8)
IEDG
External interrupt edge polarity select
MSEL
Selects G5 and G4 as MICROWIRE signals
SK and SO respectively
TRUN
Used to start and stop the timer/counter
(1 = run, 0 = stop)
TC1
Timer T1 Mode Control Bit
TC2
Timer T1 Mode Control Bit
TC3
Timer T1 Mode Control Bit
Bit 7
Bit 0
TC1
| TC2
TC3 | TRUN | MSEL | IEDG | SL1
SLO |
PSW REGISTER (ADDRESS OOEF)
The PSW register contains the following select bits:
GIE
Global interrupt enable (enables interrupts)
ENI
External interrupt enable
BUSY MICROWIRE busy shifting flag
PND
External interrupt pending
ENTI
Timer T1 interrupt enable
TPND Timer T1 interrupt pending
(timer Underflow or capture edge)
C
Carry Flip/Flop
HC
Half-Carry Flip/Flop
Bit 7
BitO
HC
l
C
TPND | ENTI | IPND | BUSY
ENI
GIE |
The Half-Carry bit is also effected by all the instructions that
effect the Carry flag. The flag values depend upon the in
struction. For example, after executing the ADC instruction
the values of the Carry and the Half-Carry flag depend upon
the operands involved. However, instructions like SET C
and RESET C will set and clear both the carry flags. Table
XIII lists the instructions that effect the HC and the C flags.
TABLE XIII. Instructions Effecting HC and C Flags
Instr.
HC Flag
C Flag
ADC
Depends on Operands Depends on Operands
SUBC
Depends on Operands Depends on Operands
SETC
Set
Set
RESETC Set
Set
RRC
Depends on Operands Depends on Operands
CNTRL2 REGISTER (ADDRESS 00CC)
Bit 7
BitO
MC3
MC2
MC1
CMPEN CMPRD CMPOE WDUDF
unused
R /W
R /W
R /W
R /W
R /O
R /W
R /O
MC3
Modulator/Timer Control Bit
MC2
Modulator/Timer Control Bit
MC1
Modulator/Timer Control Bit
CMPEN Comparator Enable Bit
CMPRD Comparator Read Bit
CMPOE Comparator Output Enable Bit
WDUDF WATCHDOG Timer Underflow Bit (Read Only)
WDREG REGISTER (ADDRESS OOCD)
WDREN WATCHDOG Reset Enable Bit (Write Once Only)
Bit 7
BltO
I
I
UNUSED
I
WDREN
j
1-68