Operation Of Port Function; Writing To I/O Port; Reading From I/O Port; Operations On I/O Port - NEC 78K0S/KA1+ Preliminary User's Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KA1+:
Table of Contents

Advertisement

www.DataSheet4U.com
4.4

Operation of Port Function

The operation of a port differs, as follows, depending on the setting of the I/O mode.
Caution Although a 1-bit memory manipulation instruction manipulates 1 bit, it accesses a port in 8-bit
4.4.1
(1) In output mode
www.DataSheet4U.com
A value can be written to the output latch by a transfer instruction. In addition, the contents of the output latch are
output from the pin. Once data is written to the output latch, it is retained until new data is written to the output
latch.
Reset input cleans the data in the output latch.
(2) In input mode
A value can be written to the output latch by a transfer instruction. Because the output buffer is off, however, the
pin status remains unchanged.
Once data is written to the output latch, it is retained until new data is written to the output latch.
4.4.2
(1) In output mode
The contents of the output latch can be read by a transfer instruction. The contents of the output latch remain
unchanged.
(2) In input mode
The pin status can be read by a transfer instruction. The contents of the output latch remain unchanged.
4.4.3
(1) In output mode
An operation is performed on the contents of the output latch and the result is written to the output latch. The
contents of the output latch are output from the pin.
Once data is written to the output latch, it is retained until new data is written to the output latch.
Reset input clears the data in the output latch.
(2) In input mode
The pin level is read and an operation is performed on its contents. The operation result is written to the output
latch. However, the pin status remains unchanged because the output buffer is off.
units. Therefore, the contents of the output latch of a pin in the input mode, even if it is not
subject to manipulation by the instruction, are undefined in a port with a mixture of inputs and
outputs.

Writing to I/O port

Reading from I/O port

Operations on I/O port

CHAPTER 4 PORT FUNCTIONS
Preliminary User's Manual U16898EJ1V0UD
61

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd78f9221Mpd78f9222

Table of Contents