em78p131a ELAN Microelectronics Corp, em78p131a Datasheet - Page 9

no-image

em78p131a

Manufacturer Part Number
em78p131a
Description
8-bit Microcontroller With Otp Rom
Manufacturer
ELAN Microelectronics Corp
Datasheet
Product Specification (V1.2) 09.16.2009
(This specification is subject to change without further notice)
5.1.3 R2 (Program Counter) and Stack
Depending on the device type, R2 and hardware stack are 10-bit wide. The
structure is depicted in the following figure.
The prescaler is assigned to TCC, if the PAB bit (CONT-3) is reset.
The contents of the prescaler counter will be cleared only when TCC register is
written with a value.
The configuration structure generates 1024×13 bits on-chip OTP ROM addresses
to the relative programming instruction codes. One program page is 1024 words
long.
R2 is set as all "0" when under Reset condition.
"JMP" instruction allows direct loading of the lower 10 program counter bits. Thus,
"JMP" allows the PC to go to any location within a page.
"CALL" instruction loads the lower 10 bits of the PC, and then PC+1 is pushed onto
the stack. Thus, the subroutine entry address can be located anywhere within a
page.
"RET" ("RETLk", "RETI") instruction loads the program counter with the contents
of the top-level stack.
"ADD R2,A" allows the contents of ‘A’ to be added to the current PC, and the ninth
and tenth bits of the PC will increase progressively.
"MOV R2, A" allows loading of an address from the "A" register to the lower 8 bits
of the PC, and the ninth and tenth bits of the PC will remain unchanged.
Any instruction written to R2 (e.g. "MOV R2, A", "BC R2, 6",⋅etc.) will cause the
ninth bit and the tenth bit (A8 ~ A9) of the PC to remain unchanged.
All instructions are single instruction cycle (fclk/2 or fclk/4) except for instructions
that would change the contents of R2. Such instructions will need one more
instruction cycle.
Stack Level 1
Stack Level 2
Stack Level 3
Stack Level 4
Stack Level 5
PC (A9 ~ A0)
Fig 5-2 Program Counter Organization
On-chip Program
8-Bit Microcontroller with OTP ROM
Interrupt Vector
Memory
Reset Vector
000H
008H
3FFH
EM78P131A
• 5

Related parts for em78p131a