English
Language : 

UPD17134A Datasheet, PDF (226/292 Pages) NEC – 4-BIT SINGLE-CHIP MICROCONTROLLER
CHAPTER 19 INSTRUCTION SET
<3> Example 1
1
To add 1 to the 16-bit contents for AR3 through AR0 (address registers) in the system register and store
the result in AR3 through AR0:
2
AR0 ← AR0 + 1
AR1 ← AR1 + CY
3
AR2 ← AR2 + CY
AR3 ← AR3 + CY
INC AR
4
This program can be rewritten as follows, with addition instructions:
ADD AR0, #01H
5
ADDC AR1, #00H
ADDC AR2, #00H
6
ADDC AR3, #00H
Example 2
7
To transfer table data, 16 bits (1 address) at a time, to DBF (data buffer), using the table reference
8
instruction (for details, refer to 10.2.3 Table Reference):
9
; Address
Table data
ORG 10H
10
DW
0F3FFH
DW
0A123H
DW
0FFF1H
11
DW
0FFF5H
DW
0FF11H
12
........
13
MOV AR3, #0H
; Table data address
MOV AR2, #0H
; 0010H in address register
14
MOV AR1, #1H
;
MOV AR0, #0H
15
LOOP:
MOVT DBF, @AR
; Reads table data to DBF
16
:
:
17
:
; Table data reference processing
:
INC
AR
; Increments address register by 1
18
BR
LOOP
19
<4> Caution
20
The numbers of bits, for address registers AR3 through AR0, differ, depending on the microcontroller
model to be used.
• µPD17134A/17135A
: 10 bits
• µPD17136A/17137A/17P136A/17P137A : 11 bits
207