General-Purpose Input And Output Ports - NEC UPD98413 User Manual

Table of Contents

Advertisement

4.6 General-Purpose Input and Output Ports

The µPD98413 has general-purpose output / input port pins. It is possible to change to input or output with the
GPIOM [7:0] bits of MDDGEN register setting. Changes in the input level of a general-purpose input port pin can
be used as the cause of an interrupt that is reported to the CPU.
General-Purpose Output
The output levels of these ports change according to the GPOUT register bit settings. When a certain bit is set
to 1, the output level of the corresponding port becomes high. When the bit is set to 0, the output level becomes
low. (By default, the register bits are set to 0.)
General-Purpose Input
The input levels of these ports are reflected on the status of the GPIN register of
purpose input port, the GPIN register provides a pair of bits, one representing the actual input level and the other
indicating the reversed input level. This pair of status bits and the mask setting of the GPIN_M register can be
used to specify both negative transition (from high to low) and positive transition (from low to high) of the general-
purpose input port as an interrupt cause.
GPIN and GPIN_M registers
D15 - D8
PIN7L - PIN0L
GPIN register status
Caution: Note that the GPIN register bits are not latched.
[Example]
To report negative transition of the PIN0 pin as an interrupt
PIN0 = L → PI0L bit = 0
PI0H bit = 1
When the PI0H bit is set to 1 by masking the PI0L bit and unmasking the PI0H bit with the GPIN_M register, the
GPIN bit of the INT register is set to 1. As a result, an interrupt is reported. The PIN0L and PIN0H bits of the
GPIN register are not latched.
146
CHAPTER 4 INTERFACES
D7 - D0
PIN7H – PIN0H
Input level
PIN0H-PIN7H
L
0
H
1
PRELIMINARY
µ
PD98413. For each general-
PIN0L-PIN7L
1
0
NEC confidential and Proprietary

Advertisement

Table of Contents
loading

This manual is also suitable for:

Neascot-p65

Table of Contents