17.05.2015 Views

~ National ~ Semiconductor - Al Kossow's Bitsavers

~ National ~ Semiconductor - Al Kossow's Bitsavers

~ National ~ Semiconductor - Al Kossow's Bitsavers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.0 CPU Registers<br />

INTRODUCTION<br />

The CPU can address a total of 44 8-bit registers, providing<br />

access to:<br />

• 20 general purpose registers<br />

• 8 configuration and control registers<br />

• 4 transceiver access registers<br />

• 2 8-bit accumulators<br />

• 4 1 6-bit poi nters<br />

• 16-bit timer<br />

• 16-byte data stack<br />

• address and data stack pointers<br />

The registers are organized as shown in Figure 13. The first<br />

12 locations, RO-R11, are arranged in two groups of<br />

banked registers: Group A (RO-R3) and Group B (R4-R11).<br />

Each group contains a Main and an <strong>Al</strong>ternate bank, only<br />

one of which is active and thus can be accessed in program<br />

execution. Switching between the banks is performed by the<br />

exchange instruction EXX, which uses a two-bit field to select<br />

which registers occupy RO-R3 and R4-R11.<br />

Registers in the RO-R11 address space are allocated in a<br />

manner that minimizes the need to switch between banks:<br />

Main A<br />

CPU control and transceiver<br />

status<br />

<strong>Al</strong>ternate A CPU and transceiver<br />

configuration<br />

Main B<br />

<strong>Al</strong>ternate B<br />

8 general purpose<br />

4 transceiver access,<br />

4 general purpose<br />

The BCP powers-up in <strong>Al</strong>ternate bank A, <strong>Al</strong>ternate bank B.<br />

This allows the initialization registers to be accessed without<br />

bank switching. When running a non-transceiver task, Main<br />

bank A and Main bank B are typically switched in, allowing<br />

access to the CPU control and transceiver status registers<br />

and eight general purpose registers. When the transceiver<br />

needs attention, <strong>Al</strong>ternate bank B can be switched active<br />

which allows access to the transceiver registers.<br />

For those instructions that require two operands, R8, (each<br />

bank) is designated as the accumulator and provides the<br />

second operand. However, the result of such an operation<br />

is stored back in the accumulator only if it is specified as the<br />

destination.<br />

Of the 38 instructions which have direct register access, 28<br />

can address all 32 locations, the remaining 10 instructions<br />

(those with an immediate data field) being limited to<br />

RO-R15. These instructions, however, still have access to<br />

all registers required for transceiver operation, together with<br />

the CPU control and status registers, 12 general purpose<br />

registers and two of the index registers.<br />

In this chapter, two descriptions of the special function registers<br />

are provided. The Register Overview section describes<br />

the function of each bit field arranged by the registers<br />

in which they occur; this section is useful for decoding<br />

register contents and becoming familiar with the register<br />

set. The Bit Definition Table lists the function and power-up<br />

state of each bit field arranged by the function that it is<br />

associated with; this section is useful in programming the<br />

BCP. These sections are prefaced by a Bit Index which<br />

cross references each bit field into both the Register Overview<br />

and Bit Definition Table.<br />

A:<br />

<strong>Al</strong>ternate<br />

OCR<br />

iR CCR<br />

ATR NCr<br />

----<br />

ACR<br />

'FeR ICR<br />

RTR<br />

f-- GPO<br />

TSR<br />

~ GPl<br />

rn;m- GP2<br />

I<br />

Main<br />

RO<br />

Rl<br />

R2<br />

R3<br />

8: f-- GP3<br />

GP4'<br />

f-- GP4 (accumulator)<br />

GP5'<br />

GP5<br />

I GP6'<br />

r;r GP6<br />

~<br />

GP7<br />

W (low byte)<br />

W (high byte)<br />

I X (low byte)<br />

Inde. R eglsters I X (high byte)<br />

(p olnters)<br />

Y (low byte)<br />

Y (high byte)<br />

Z (low byte)<br />

Z (high byte)<br />

GP8<br />

GP9<br />

GP10<br />

GPll<br />

GP12<br />

GP13<br />

GP14<br />

GP15<br />

I<br />

R4<br />

R5<br />

R6<br />

R7<br />

R8<br />

R9<br />

Rl0<br />

Rll<br />

I R12<br />

I R13<br />

R14<br />

R15<br />

R16<br />

R17<br />

R18<br />

R19<br />

R20<br />

R21<br />

R22<br />

R23<br />

R24<br />

R25<br />

R26<br />

R27<br />

_TR_L____ ~ R28<br />

TImer ~ TRH : R29<br />

I R30<br />

Stacks liSP<br />

OS : R31<br />

FIGURE 13. Register Map<br />

TLlF/9336-32<br />

C<br />

"U<br />

00<br />

Co)<br />

.a::o.<br />

.a::o.<br />

~<br />

•<br />

2-131

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!