ATAM894X-TNQY ATMEL [ATMEL Corporation], ATAM894X-TNQY Datasheet - Page 7

no-image

ATAM894X-TNQY

Manufacturer Part Number
ATAM894X-TNQY
Description
8k-flash Microcontroller
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
5.2.3.2
5.2.3.3
5.2.3.4
5.2.3.5
4679D–4BMCU–05/05
ROM Banking Register (RBR)
RAM Address Registers
Expression Stack Pointer (SP)
Return Stack Pointer (RP)
Figure 5-4.
The ROM banking register is a 4-bit register whereby the ATAM894 only uses 2 bit. This register
indicates which ROM bank is presently being addressed. The RBR is accessed with a standard
qFORTH peripheral read or write instruction (IN or OUT, port address 'D' hex).
The RAM is addressed with the four 8-bit wide RAM address registers: SP, RP, X and Y. These
registers allow access to any of the 256 RAM nibbles.
The stack pointer contains the address of the next-to-top 4-bit item (TOS-1) of the expression
stack. The pointer is automatically pre-incremented if a nibble is moved onto the stack or post-
decremented if a nibble is removed from the stack. Every post-decrement operation moves the
item (TOS-1) to the TOS register before the SP is decremented. After a reset the stack pointer
has to be initialized with “>SP S0” to allocate the start address of the expression stack area.
The return stack pointer points to the top element of the 12-bit wide return stack. The pointer
automatically pre-increments if an element is moved onto the stack, or it post-decrements if an
element is removed from the stack. The return stack pointer increments and decrements in
steps of 4. This means that every time a 12-bit element is stacked, a 4-bit RAM location is left
unwritten. This location is used by the qFORTH compiler to allocate 4-bit variables. After a reset
the return stack pointer has to be initialized via “>RP FCh”.
PC
Programming Model
11
RP
SP
X
Y
7
7
7
7
RBR
CCR
TOS
3
C
3
3
--
--
B
0
--
I
0
0
0
0
0
0
0
0
0
ROM banking register
Program counter
Return stack pointer
Expression stack pointer
RAM address register (X)
RAM address register (Y)
Top of stack register
Condition code register
Interrupt enable
Branch
Reserved
Carry/borrow
ATAM894
7

Related parts for ATAM894X-TNQY