![background image](http://html1.mh-extra.com/html/national-semiconductor/cop820cj/cop820cj_manual_710393020.webp)
M e m o ry M ap
All RAM, ports and registers (except A and PC) are mapped
into data memory address space.
TABLE IX. Memory Map
Address
Contents
00 to 2F
On-chip RAM bytes (48 bytes)
30 to 7F
Unused RAM Address Space (Reads as All
Ones)
80 to BF
Expansion Space for On-Chip EERAM
(Reads Undefined Data)
CO to C7
Reserved
C8
MIWU Edge Select Register (Reg:WKEDG)
C9
MIWU Enable Register (Reg:WKEN)
CA
MIWU Pending Register (Reg:WKPND)
CB
Reserved
CC
C ontrol Register (CNTRL2)
CD
WATCHDOG Register (WDREG)
CE
WATCHDOG Counter (WDCNT)
CF
Modulator Reload (MODRL)
DO
Port L Data Register
D1
Port L Configuration Register
D2
Port L Input Pins (Read Only)
D3
Reserved for Port L
D4
Port G Data Register
D5
Port G Configuration Register
D6
Port G Input Pins (Read Only)
D7
Port I Input Pins (Read Only)
D8 to DB
Reserved for Port C
DC
Port D Data Register
DD to DF
Reserved for Port D
E0 to EF
On-Chip Functions and Registers
E0 to E7
Reserved for Future Parts
F8
Reserved
E9
MICROWIRE Shift Register
EA
Timer Lower Byte
EB
Timer Upper Byte
EC
Timerl Autoreload Register Lower Byte
ED
Timerl Autoreload Register Upper Byte
EE
CNTRL1 Control Register
EF
PSW Register
F0 to FF
On-Chip RAM Mapped as Registers
FC
X Register
FD
SP Register
FE
B Register
Reading other unused memory locations will return unde
fined data.
A d d re s s in g M o d e s
There are ten addressing modes, six for operand address
ing and four for transfer of control.
OPERAND ADDRESSING MODES
REGISTER INDIRECT
This is the “ normal” addressing mode for the chip. The op
erand is the data memory addressed by the
B
or
X
pointer.
REGISTER INDIRECT WITH AUTO POST INCREMENT OR
DECREMENT
This addressing mode is used with the LD and X instruc
tions. The operand is the data memory addressed by the
B
or
X
pointer. This is a register indirect mode that automati
cally post increments or post decrements the
B
or
X
pointer
after executing the instruction.
DIRECT
The instruction contains an 8-bit address field that directly
points to the data memory for the operand.
IMMEDIATE
The instruction contains an 8-bit immediate field as the op
erand.
SHORT IMMEDIATE
This addressing mode issued with the LD B,# instruction,
where the immediate # is less than 16. The instruction con
tains a 4-bit immediate field as the operand.
INDIRECT
This addressing mode is used with the LAID instruction. The
contents of the accumulator are used as a partial address
(lower 8 bits of PC) for accessing a data operand from the
program memory.
TRANSFER OF CONTROL ADDRESSING MODES
RELATIVE
This mode is used for the JP instruction with the instruction
field being added to the program counter to produce the
next instruction address. JP has a range from -3 1 to + 32
to cllc'.v a cr.c byte relative jump (JP I 1 is implemented by
a NOP instruction). There are no “ blocks” or “ pages” when
using JP since all 15 bits of the PC are used.
ABSOLUTE
This mode is used with the JMP and JSR instructions with
the instruction field of 12 bits replacing the lower 12 bits of
the program counter (PC). This allows jumping to any loca
tion in the current 4k program memory segment.
ABSOLUTE LONG
This mode is used with the JMPL and JSRL instructions with
the instruction field of 15 bits replacing the entire 15 bits of
the program counter (PC). This allows jumping to any loca
tion in the entire 32k program memory space.
INDIRECT
This mode is used with the JID instruction. The contents of
the accumulator are used as a partial address (lower 8 bits
of PC) for accessing a location in the program memory. The
contents of this program memory location serves as a par
tial address (lower 8 bits of PC) for the jump to the next
instruction.
1-69
COP82
0CJ
/COP
822
CJ/C
OP8
23C
J