I/O PORTS

S3C9228/P9228

 

 

PORT 6

Port 6 is an 4-bit I/O port with individually configurable pins. Port 6 pins are accessed directly by writing or reading the port 6 data register, P6 at location EAH in page 0. P6.0-P6.3 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 (P6.0-P6.3): COM0-COM3

Port 6 Control Register (P6CON)

Port 6 has a 8-bit control register: P6CONH for P6.0-P6.3. A reset clears the P6CON registers to "00H", configuring all pins to input mode. You use control registers setting to select input or output mode.

Port 6 Control Register, Low Byte (P6CON)

FDH, Page 0, R/W

MSB .7

.6

.5

.4

.3

.2

.1

.0

LSB

P6.3/COM0 P6.2/COM1 P6.1/COM2 P6.0/COM3

P6CON 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-23. Port 6 Control Register (P6CON)

9-16

Page 176
Image 176
Samsung S3C9228/P9228, 8-Bit CMOS Microcontroller user manual Port 6 Control Register P6CON