Program counter (pc) – NEC PD17062 User Manual

Page 25

Advertising
background image

25

µ

PD17062

3. PROGRAM COUNTER (PC)

The program counter addresses program memory or a program. It is a 12-bit binary counter.

Fig. 3-1 Program Counter

PC

11

PC

9

PC

10

PC

8

PC

6

PC

7

PC

5

PC

3

PC

4

PC

2

PC

0

PC

1

12 bits

Priority

Interrupt cause

Vector address

1

INT

NC

pin

4H

2

Internal timer

3H

3

V

SYNC

pin

2H

4

Serial interface

1H

Normally, the program counter is incremented by 1 each time an instruction is executed. When a branch

instruction or a subroutine call instruction is executed, however, the address specified in the operand field

is loaded into the program counter. If a skip instruction has been executed, the address of the instruction

following the skip instruction is specified, regardless of the contents of the skip instruction. If the specified

address contains a skip condition, the instruction following the skip instruction is regarded as being a NOP

instruction. That is, the NOP instruction is executed, and the address of the next instruction is specified.

If an interrupt request is accepted, one of addresses 1 to 4 (depending on the cause of the interrupt) is loaded

into the PC.

If a power-on reset or a CE reset is performed, the program counter is reset to address 0.

Table 3-1 Vector Addresses upon Interrupt Occurrence

Advertising