Registers Controlling Port Function; Format Of Port Mode Register - NEC switch User Manual

Nec user's manua switch
Table of Contents

Advertisement

4.3 Registers Controlling Port Function

The following three types of registers control the ports.
• Port mode registers (PM0, PM1, PM2, PM4)
• Pull-up resistor option register (PU0)
• Port output mode registers (POM0, POM1)
(1) Port mode registers (PM0, PM1, PM2, PM4)
These registers are used to set port input/output in 1-bit units.
The port mode registers 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 alternate-function pins, set the port mode register and output latch according to
Table 4-3.
Caution
As P26 can be used as an external interrupt 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.
Symbol
7
6
5
PM0
PM07
PM06
PM05
PM1
PM17 PM16 PM15 PM14 PM13 PM12 PM11 PM10
PM2
1
PM26
PM25
PM4
PM47 PM46 PM45 PM44 PM43 PM42 PM41 PM40
PMmn
0
Output mode (output buffer on)
1
Input mode (output buffer off)
CHAPTER 4
PORT FUNCTIONS
Figure 4-11. Format of Port Mode Register
4
3
2
1
PM04
PM03
PM02
PM01
PM00
PM24
PM23
PM22
PM21
PM20
Pmn pin input/output mode selection
User's Manual U12978EJ3V0UD
0
Address
After reset
FF20H
FFH
FF21H
FFH
FF22H
FFH
FF24H
FFH
R/W
R/W
R/W
R/W
R/W
69

Advertisement

Table of Contents
loading

Table of Contents