NEC PD75402A, PD75P402 user manual Operations with Input/Output Port Handling Instructions

Models: PD75402A PD75P402

1 195
Download 195 pages 45.34 Kb
Page 61
Image 61

CHAPTER 5. PERIPHERAL HARDWARE FUNCTIONS

Table 5-3 Operations with Input/Output Port Handling Instructions

Instruction Executed

Port and Individual Pin Operations

 

 

Input Mode

Output Mode

 

 

 

 

 

 

SKT

PORTn.bit

Tests pin data.

Tests output latch data.

SKF

PORTn.bit

 

 

 

 

 

 

AND1

CY, PORTn.bit

Operation between pin data and

Operation between output latch

OR1

CY, PORTn.bit

CY

data and CY

XOR1

CY, PORTn.bit

 

 

 

 

 

 

IN

A, PORTn

Transfers pin data to accumula-

Transfers output latch data to

MOV

A, PORTn

tor.

accumulator.

 

 

 

 

OUT

PORTn, A

Transfers accumulator data to

Transfers accumulator data to

MOV

PORTn, A

output latches. (Output buffer

output data to output latches,

 

 

remains off.)

and outputs data from pins.

 

 

 

 

XCH

A, PORTn

Transfers pin data to accumula-

Exchanges data between output

 

 

tor, and transfers accumulator

latches and accumulator.

 

 

data to output

 

 

 

latches. (Output buffer remains

 

 

 

off.)

 

 

 

 

 

INCS

PORTn

Latches pin data + 1 in output

Increments output latch contents

 

 

latches.

by 1.

 

 

 

 

SET1

PORTn.bit

Specified bit output latch is

Changes output pin status as per

CLR1

PORTn.bit

rewritten as per instruction,

instruction.

SKTCLR PORTn.bit

but output latches for other bits

 

 

 

are undefined.

 

 

 

 

 

50

Page 61
Image 61
NEC PD75402A, PD75P402 user manual Operations with Input/Output Port Handling Instructions