S3C9228/P9228

I/O PORTS

 

 

PORT 5

Port 5 is an 8-bit I/O port with individually configurable pins. Port 5 pins are accessed directly by writing or reading the port 5 data register, P5 at location E9H in page 0. P5.0-P5.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 (P5.0-P5.3): SEG12-SEG15

High-nibble pins (P5.4-P5.7): SEG16-SEG19, COM4-COM7

Port 5 Control Registers (P5CONH, P5CONL)

Port 5 has two 8-bit control registers: P5CONH for P5.4-P5.7 and P4CONL for P5.0-P5.3. A reset clears the P5CONH and P5CONL registers to "00H", configuring all pins to input mode. You use control registers setting to select input or output mode.

Port 5 Control Register, High Byte (P5CONH)

FBH, Page 0, R/W

MSB

.7

.6

.5

.4

 

.3

.2

.1

.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LSB

P5.6/SEG18/COM5

P5.4/SEG16/COM7

P5.7/SEG19/COM4 P5.5/SEG17/COM6

P5CONH bit-pair pin configuration settings:

00

01

10

11

Input mode

Push-pull output mode

N-channel open-drain output mode Input mode with pull-up

Figure 9-21. Port 5 High-Byte Control Register (P5CONH)

MSB

Port 5 Control Register, Low Byte (P5CONL)

FCH, Page 0, R/W

.7

.6

 

.5

.4

 

.3

.2

 

.1

.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LSB

P5.3/SEG15 P5.2/SEG14 P5.1/SEG13 P5.0/SEG12

P5CONL bit-pair pin configuration settings:

00 Input mode

01 Push-pull output mode

10N-channel open-drain output mode

11Input mode with pull-up

Figure 9-22. Port 5 Low-Byte Control Register (P5CONL)

9-15

Page 395
Image 395
Samsung 8-Bit CMOS Microcontroller, S3C9228/P9228 user manual Port 5 High-Byte Control Register P5CONH