3 port function control registers – NEC uPD78056Y User Manual

Page 150

Advertising
background image

150

CHAPTER 6 PORT FUNCTIONS

6.3 Port Function Control Registers

The following four types of registers control the ports.

• Port mode registers (PM0 to PM3, PM5 to PM7, PM12, PM13)

• Pull-up resistor option register (PUOH, PUOL)

• Memory expansion mode register (MM)

• Key return mode register (KRM)

(1) Port mode registers (PM0 to PM3, PM5 to PM7, PM12, PM13)

These registers are used to set port input/output in 1-bit units.

PM0 to PM3, PM5 to PM7, PM12, and PM13 are independently set with a 1-bit or 8-bit memory manipulation

instruction

RESET input sets registers to FFH.

When port pins are used as the dual-function pins, set the port mode register and output latch according to

Table 6-5.

Cautions 1. Pins P00 and P07 are input-only pins.

2. As port 0 has a dual function as external interrupt request input, when the port function

output mode is specified and the output level is changed, the interrupt request flag is

set. When the output mode is used, therefore, the interrupt mask flag should be set to

1 beforehand.

3. The memory expansion mode register (MM) specifies P40 to P47 as input/output pins.

Advertising