Program Counter (Pc); Configuration Of Program Counter - NEC PD754144 User Manual

4-bit single-chip microcontrollers
Table of Contents

Advertisement

4.2 Program Counter (PC) ··· 12 bits
This is a binary counter that holds an address of the program memory.
PC11
PC10
The value of the program counter (PC) is usually automatically incremented by the number of bytes of an instruction
each time that instruction has been executed.
When a branch instruction (BR, BRA, or BRCB) is executed, immediate data indicating the branch destination
address or the contents of a register pair are loaded to all or some bits of the PC.
When a subroutine call instruction (CALL, CALLA, or CALLF) is executed or when a vector interrupt occurs, the
contents of the PC (a return address already incremented to fetch the next instruction) are saved to the stack memory
(data memory specified by the stack pointer). Then, the jump destination address is loaded to the PC.
When the return instruction (RET, RETS, or RETI) instruction is executed, the contents of the stack memory are
set to the PC.
When the RESET signal is asserted, the contents of the program counter (PC) are initialized to the contents of
address 0000H and 0001H of the program memory, and the program can be started from any address according to
the contents.
← (0000H)
PC
, PC
11-8
3-0
62
CHAPTER 4 INTERNAL CPU FUNCTION
Figure 4-2. Configuration of Program Counter
PC9
PC8
PC7
PC6
← (0001H)
7-0
7-0
User's Manual U10676EJ3V0UM
PC5
PC4
PC3
PC2
PC1
PC0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd754244

Table of Contents