Samsung KS86C6004 Manual page 132

Table of Contents

Advertisement

I/O PORTS
PORT 4
Port 4 is a 4-bit I/O port with individually configurable pins. It can be used for general I/O (Schmitt trigger, N-CH
open drain output mode, push-pull output mode). Or, you can use port 4 pins as external interrupt (INT1) inputs.
In addition, you can configure a pull-up resistor to individual pins using control register settings. All port 4 pins
have noise filters.
A reset configures P4.0–P4.3 to input mode. You address port 4 directly by writing or reading the port 4 data
register, P4 (E4H). The port 4 control register, P4CON, is located at EEH.
A additional registers used for interrupt control: P4INTPND (EFH). By setting bits in the port 4 interrupt enable
and pending register P4INTPND.7–P4INTPND.4, you can configure specific port 4 pins to generate interrupt
requests when falling signal edges are detected. The application program polls the interrupt pending register,
P4INTPND.3–P4INTPND.0, to detect interrupt requests. When an interrupt request is acknowledged, the
corresponding pending bit must be cleared by the interrupt service routine.
MSB
P4CON Pin Configuration Settings:
00
01
10
11
9-8
PORT 4 CONTROL REGISTER (P4CON)
.7
.6
.5
P4.2/INT1
P4.3/INT1
Schmitt trigger input, falling edge external interrupt with pull-up
N-CH open drain output with pull-up register
N-CH open drain output
Push-pull output
Figure 9-8. Port 4 Control Register (P4CON)
KS86C6004/C6008/P6008 MICROCONTROLLER (Preliminary Spec)
EEH, R/W
.4
.3
.2
P4.1/INT1
.1
.0
LSB
P4.0/INT1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ks86c6008Ks86p6008

Table of Contents