Hardware, Function block operations, 8) program counter (pc) – Renesas 4514 User Manual

Page 32: 9) data pointer (dp)

Advertising
background image

4513/4514 Group User’s Manual

HARDWARE

1-19

FUNCTION BLOCK OPERATIONS

(8) Program counter (PC)

Program counter (PC) is used to specify a ROM address (page and

address). It determines a sequence in which instructions stored in

ROM are read. It is a binary counter that increments the number of

instruction bytes each time an instruction is executed. However,

the value changes to a specified address when branch instructions,

subroutine call instructions, return instructions, or the table refer-

ence instruction (TABP p) is executed.

Program counter consists of PC

H

(most significant bit to bit 7)

which specifies to a ROM page and PC

L

(bits 6 to 0) which speci-

fies an address within a page. After it reaches the last address

(address 127) of a page, it specifies address 0 of the next page

(Figure 7).

Make sure that the PC

H

does not specify after the last page of the

built-in ROM.

(9) Data pointer (DP)

Data pointer (DP) is used to specify a RAM address and consists

of registers Z, X, and Y. Register Z specifies a RAM file group, reg-

ister X specifies a file, and register Y specifies a RAM digit (Figure

8).

Register Y is also used to specify the port D bit position.

When using port D, set the port D bit position to register Y certainly

and execute the SD, RD, or SZD instruction (Figure 9).

Fig. 7 Program counter (PC) structure

Fig. 8 Data pointer (DP) structure

Fig. 9 SD instruction execution example

Z

1

Z

0

X

3

X

2

X

1

X

0

Y

3

Y

2

Y

1

Y

0

Data pointer (DP)

Register Z (2)

Register X (4)

Register Y (4)

Specifying
RAM digit

Specifying RAM file

Specifying RAM file group

0

1

0

1

1

D

7

Set

Specifying bit position

Port D output latch

Register Y (4)

D

5

D

6

D

4

D

0

p

5

p

4

p

3

p

2

p

1

p

0

a

6

a

5

a

4

a

3

a

2

a

1

a

0

Program counter

PC

H

Specifying page

PC

L

Specifying address

p

6

Advertising
This manual is related to the following products: