Port 4 - Samsung S3C9228 User Manual

8-bit cmos microcontrollers
Table of Contents

Advertisement

I/O PORTS

PORT 4

Port 4 is an 8-bit I/O port with individually configurable pins. Port 4 pins are accessed directly by writing or reading
the port 4 data register, P4 at location E8H in page 0. P4.0-P4.7 can serve as inputs or as push-pull, open-drain
outputs. You can configure the following alternative functions with LCD port control register, LPOT:
— Low-nibble pins (P4.0-P4.3): SEG4-SEG7
— High-nibble pins (P4.4-P4.7): SEG8-SEG11
Port 4 Control Registers (P4CONH, P4CONL)
Port 4 has two 8-bit control registers: P4CONH for P4.4-P4.7 and P4CONL for P4.0-P4.3. A reset clears the
P4CONH and P4CONL registers to "00H", configuring all pins to input mode. You use control registers setting to
select input or output mode.
9-14
Port 4 Control Register, High Byte (P4CONH)
MSB
.7
.6
.5
P4.7/SEG11
P4.6/SEG10
P4CONH bit-pair pin configuration settings:
00
Input mode
01
Push-pull output mode
10
N-channel open-drain output mode
11
Input mode with pull-up
Figure 9-19. Port 4 High-Byte Control Register (P4CONH)
Port 4 Control Register, Low Byte (P4CONL)
MSB
.7
.6
.5
P4.3/SEG7
P4.2/SEG6
P4CONL bit-pair pin configuration settings:
00
Input mode
01
Push-pull output mode
10
N-channel open-drain output mode
11
Input mode with pull-up
Figure 9-20. Port 4 Low-Byte Control Register (P4CONL)
F9H, Page 0, R/W
.4
.3
.2
P4.5/SEG9
FAH, Page 0, R/W
.4
.3
.2
P4.1/SEG5
S3C9228/P9228_UM_REV1.10
.1
.0
LSB
P4.4/SEG8
.1
.0
LSB
P4.0/SEG4

Advertisement

Table of Contents
loading

This manual is also suitable for:

S3p9228

Table of Contents