Samsung KS57C2308 Manual page 213

Single-chip cmos microcontroller
Table of Contents

Advertisement

KS57C2308/P2308/C2316/P2316
PORT MODE FLAGS (PM FLAGS)
Port mode flags (PM) are used to configure I/O ports to input or output mode by setting or clearing the
corresponding I/O buffer.
For convenient program reference, PM flags are organized into two groups — PMG1 and PMG2 as shown in
Table 10-3. They are addressable by 8-bit write instructions only.
When a PM flag is "0", the port is set to input mode; when it is "1", the port is enabled for output.
port mode flags to logical zero, automatically configuring the corresponding I/O ports to input mode.
PM Group ID
PMG1
PMG2
+ +
PROGRAMMING TIP — Configuring I/O Ports to Input or Output
Configure ports 3 and 6 as an output port:
BITS
SMB
LD
LD
PULL-UP RESISTOR MODE REGISTER (PUMOD)
The pull-up resistor mode registers (PUMOD1 and PUMOD2) are used to assign internal pull-up resistors by
software to specific ports. When a configurable I/O port pin is used as an output pin, its assigned pull-up resistor
is automatically disabled, even though the pin's pull-up is enabled by a corresponding PUMOD bit setting.
PUMOD1 is addressable by 8-bit write instructions only, and PUMOD2 by 4-bit write instruction only.
clears PUMOD register values to logic zero, automatically disconnecting all software-assignable port pull-up
resistors.
Table 10-4. Pull-Up Resistor Mode Register (PUMOD) Organization
PUMOD ID
PUMOD
NOTE: When bit = "1", a pull-up resistor is assigned to the corresponding I/O port: PUR3 for port 3, PUR2 for port 2,
and so on.
Table 10-3. Port Mode Group Flags
Address
Bit 3/7
FE8H
PM3.3
FE9H
PM6.3
FECH
"0"
FEDH
PM7
EMB
15
EA,#0FFH
PMG1,EA
Address
FDCH
FDDH
Bit 2/6
PM3.2
PM6.2
PM2
"0"
; P3 and P6
Bit 3/7
Bit 2/6
PUR3
PUR2
PUR7
PUR6
Bit 1/5
PM3.1
PM6.1
"0"
PM5
Output
Bit 1/5
PUR1
PUR5
I/O PORTS
clears all
RESET
Bit 0/4
PM3.0
PM6.0
"0"
PM4
RESET
Bit 0/4
PUR0
PUR4
10-3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents