ATAM510X-ILQY ATMEL [ATMEL Corporation], ATAM510X-ILQY Datasheet - Page 7

no-image

ATAM510X-ILQY

Manufacturer Part Number
ATAM510X-ILQY
Description
MARC4 4-bit MTP Universal Microcontroller
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
2.2.3
2.2.4
2.3
2.3.1
4711B–4BMCU–01/05
Registers
Expression Stack
Return Stack
Program Counter (PC)
The 4-bit wide expression stack is addressed with the expression stack pointer (SP). All arith-
metic, I/O and memory reference operations take their operands from, and return their results to
the expression stack. The MARC4 performs the operations with the top of stack items (TOS and
TOS-1). The TOS register contains the top element of the expression stack and works in the
same way as an accumulator. This stack is also used for passing parameters between subrou-
tines and as a scratch pad area for temporary storage of data.
The 12-bit wide return stack is addressed by the return stack pointer (RP). It is used for storing
return addresses of subroutines, interrupt routines and for keeping loop index counts. The return
stack can also be used as a temporary storage area.
The MARC4 instruction set supports the exchange of data between the top elements of the
expression stack and the return stack. The two stacks, within the RAM, have a user definable
location and maximum depth.
The MARC4 controller has seven programmable registers and one condition code register. They
are shown in the following programming model.
The program counter is a 12-bit register which contains the address of the next instruction to be
fetched from the ROM. Instructions currently being executed are decoded in the instruction
decoder to determine the internal micro-operations. For linear code (no calls or branches) the
program counter is incremented with every instruction cycle. If a branch, call, return instruction
or an interrupt is executed, the program counter is loaded with a new address. The program
counter is also used with the table instruction to fetch 8-bit wide constants.
Figure 2-4.
PC
Programming Model
11
RP
SP
X
Y
7
7
7
7
CCR
TOS
C
3
3
--
B
0
0
I
0
0
0
0
0
0
0
Return stack pointer
Expression stack pointer
RAM address register (X)
RAM address register (Y)
Top of stack register
Condition code register
Program counter
Interrupt enable
Branch
Reserved
Carry/borrow
ATAM510
7

Related parts for ATAM510X-ILQY