List Of Input/Output Pin Handling Instructions - NEC PD75402A User Manual

4-bit single-chip microcomputer
Table of Contents

Advertisement

(1) Bit handling instructions
Direct addressing of specific address bits (fmem.bit) can be used on all digital input/output ports.
Example
To OR P50 and P31 and output the result to P61.
SET1
AND1
OR1
SKT
BR
SET1
CLRP : CLR1
(2) 4-bit handling instructions
All 4-bit memory handling instructions can be used, such as MOV, XCH, ADDS and INCS, in addition to the IN/
OUT instructions.
Example
1.
To output accumulator contents to port 3.
OUT
2.
To add the accumulator value to the data output to port 5, and output the result.
MOV
ADDS
NOP
MOV
IN A,
PORTn
OUT
PORTn, A
SET1
PORTn.bit
CLR1
PORTn.bit
SKT
PORTn.bit
SKF
PORTn.bit
AND1 CY, PORTn.bit
OR1
CY, PORTn.bit
XOR1 CY, PORTn.bit
48
CHAPTER 5. PERIPHERAL HARDWARE FUNCTIONS
CY
CY, PORT5.0
CY, PORT3.1
CY
CLRP
PORT6.1
PORT6.1
PORT3, A
HL, #PORT5
A, @HL
; A
A + PORT5
@HL, A
; PORT5
Table 5-2 List of Input/Output Pin Handling Instructions
PORT 0
PORT 1
; CY
1
; CY
CY
P50
; CY
CY
P31
; P61
1
; P61
0
A
PORT2
PORT 3
PORT5
PORT 6

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd75p402

Table of Contents