I/O PORTS S3C8245/P8245/C8249/P8249
9-12
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 FAH in set 1, bank 0. P4.0–P4.7 can serve as inputs (with or without pull-
ups), as output (open drain or push-pull). And, they can serve as segment pins for LCD, also.
Port 4 Control Registers
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.
Output mode, push-pull
Port 4 Control Register, High Byte (P4CONH)
ECH, Set 1, Bank 1, R/W
.7 .6 .5 .4 .3 .2 .1 .0MSB LSB
P4.6/SEG22 P4.5/SEG21 P4.4/SEG20
P4CONH bit-pair pin configuration settings:
00
01
10
11
Input mode, pull-up
P4.7/SEG23
Input mode
Opendrain output mode
NOTE:
If LCD is enabled by LCON.5, SEG signal go out
otherwise port 4 I/0 can be selected.
Figure 9-12. Port 4 High-Byte Control Register (P4CONH)