English
Language : 

COP8TAB9 Datasheet, PDF (16/59 Pages) National Semiconductor (TI) – 8-Bit CMOS Flash Microcontroller with 2k Byte or 4k Byte Memory
10.0 Functional Description
(Continued)
There are five CPU registers:
A is 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)
B is an 8-bit RAM address pointer, which can be optionally
post auto incremented or decremented.
X is an 8-bit alternate RAM address pointer, which can be
optionally post auto incremented or decremented.
SP is the 8-bit stack pointer, which points to the subroutine/
interrupt stack (in RAM). With reset, the SP is initialized to
RAM address 06F Hex. The SP is decremented as items are
pushed onto the stack. SP points to the next available loca-
tion on the stack.
All the CPU registers are memory mapped with the excep-
tion of the Accumulator (A) and the Program Counter (PC).
10.2 PROGRAM MEMORY
The program memory consists of 4096 bytes of Flash
Memory. These bytes may hold program instructions or con-
stant data (data tables for the LAID instruction, jump vectors
for the JID instruction, and interrupt vectors for the VIS
instruction). The program memory is addressed by the 15-bit
program counter (PC). All interrupts in the device vector to
program memory location 00FF Hex. The program memory
reads 00 Hex in the erased state. Program execution starts
at location 0 after RESET.
If a Return instruction is executed when the SP contains 6F
(hex), instruction execution will continue from Program
Memory location 7FFF (hex). If location 7FFF is accessed by
an instruction fetch, the Flash Memory will return a value of
00. This is the opcode for the INTR instruction and will cause
a Software Trap.
For the purpose of erasing and rewriting the Flash Memory,
it is organized in pages of 512 bytes as shown in Table 1.
TABLE 1. Available Memory Address Ranges
Device
COP8TAB9
COP8TAC9
Program
Memory
Size
(Flash)(Bytes)
2048
4096
Flash Memory
Page Size
(Bytes)
512
Option
Register
Address (Hex)
0x07FF (hex)
0x0FFF (hex)
Data Memory
Size (RAM)
(Bytes)
128
RAM
Segments
Available
Segment 0
Maximum
RAM
Address
(HEX)
06F
10.3 DATA MEMORY
The data memory address space includes the on-chip RAM
and data registers, the I/O registers (Configuration, Data and
Pin), the control registers, the MICROWIRE/PLUS SIO shift
register, ACCESS.Bus Interface and the various registers
and counters associated with the timer, T1. Data memory is
addressed directly by the instruction or indirectly by the B, X
and SP pointers.
The data memory consists of 128 bytes of RAM. Sixteen
bytes of RAM are mapped as “registers” at addresses 0F0 to
0FF Hex. These registers can be loaded immediately, and
also decremented and tested with the DRSZ (decrement
register and skip if zero) instruction. The memory pointer
registers X, SP and B are memory mapped into this space at
address locations 0FC to 0FE Hex respectively, with the
other registers being available for general usage.
The instruction set permits any bit in memory to be set, reset
or tested. All I/O and registers (except A and PC) are
memory mapped; therefore, I/O bits and register bits can be
directly and individually set, reset and tested. The accumu-
lator (A) bits can also be directly and individually tested.
Note: RAM contents are undefined upon power-up.
10.4 OPTION REGISTER
The Option register, located at address 0x0FFF (hex) or
0x07FF (hex) in the Flash Program Memory, is used to
configure the user selectable security, WATCHDOG, HALT
and Oscillator selection options. The register can be pro-
grammed only in external Flash Memory programming or
ISP Programming modes. Therefore, the register must be
programmed at the same time as the program memory. The
contents of the Option register shipped from the factory read
00 Hex.
The format of the Option register is as follows:
Bit 7
LVCMP
Bit 6 Bit 5 Bit 4
Bit 3
Bit 2 Bit 1
CLKSEL2
SEC
CLKSEL1
CLKSEL0
WATCH
DOG
HALT
Bit 0
FLEX
Bit 7
When this bit is set and the ACCESS.Bus is en-
abled, inputs L0, L1 and L2, are compatible with
1.8V logic levels.
Bit 6
This bit defines the most significant bit of the os-
cillator selection. (See Section 10.7 OSCILLATOR
CIRCUITS) for more information on Oscillator
selection.)
Bit 5
= 1 Security enabled. Flash Memory read and write
are not allowed except in User ISP/Virtual E2 com-
mands. Mass Erase is allowed.
= 0 Security disabled. Flash Memory read and write
are allowed.
Bits 4, 3 These bits define the two least significant bits of
the oscillator selection.
Bit 2
= 1 WATCHDOG feature disabled. G1 is a general
purpose I/O.
= 0 WATCHDOG feature enabled. G1 pin is
WATCHDOG output with weak pullup.
Bit 1
= 1 HALT mode disabled.
= 0 HALT mode enabled.
www.national.com
16