SM39R08A5
8-Bit Micro-controller
with 8KB Flash
& 256B RAM embedded
5. GPIO
The SM39R08A5 has one I/O ports: Port 3. These are quasi-bidirectional (standard 8051 port outputs), push-pull, open
drain, and input-only. Two configuration registers for each port select the output type for each port pin. All I/O port pins on
the SM39R08A5 may be configured by software to one of four types on a pin-by-pin basis, shown as below:
Mnemonic
P3M0
P3M1
Description
Port 3 output mode 0
Port 3 output mode 1
PxM0.y
0
1
0
1
Direct
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3
I/O port function register
DAh
P3M0[7:0]
DBh
P3M1[7:0]
Bit 2
Bit 1
Bit 0
RESET
00H
00H
PxM1.y
0
0
1
1
Port output mode
Quasi-bidirectional (standard 8051 port outputs) (pull-up)
Push-pull
Input only (high-impedance)
Open drain
The RESET Pin can be configured as I/O port P3.6, when the user uses on-chip hardware RESET mechanism.
For general-purpose applications, every pin can be assigned to either high or low independently as given below:
Mnemonic
Port 3
Description
Port 3
Mnemonic: P3
7
6
P3.7
P3.6
Direct
B0h
Bit 7
P3.7
Bit 6 Bit 5
Ports
P3.6 P3.5
Bit 4
P3.4
Bit 3
P3.3
Bit 2
P3.2
Bit 1
P3.1
Bit 0
P3.0
RESET
FFh
5
P3.5
4
P3.4
3
P3.3
2
P3.2
1
P3.1
Address: B0h
0
Reset
P3.0
FFh
P3.7~ 0: Port3 [7] ~ Port3 [0]
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M067
Ver B SM39R08A5 04/22/2013
- 22 -