English
Language : 

SM39A16M1 Datasheet, PDF (29/104 Pages) SyncMOS Technologies,Inc – Additional Baud Rate Generator for Serial port
SM39A16M1
8-Bit Micro-controller
16KB with ISP Flash
& 1K+256B RAM embedded
5. GPIO
The SM39A16M1 has four I/O ports: Port 0, Port 1, Port 2, Port 3. Ports 0, 1, 2 are are 8-bit ports and Ports 2, 3 are
are 7-bit ports. 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 SM39A16M1 may
be configured by software to one fo four types on a pin-by-pin basis, shown as below:
Mnemonic Description
P0M0
P0M1
P1M0
P1M1
P2M0
P2M1
P3M0
P3M1
Port 0 output
mode 0
Port 0 output
mode 1
Port 1 output
mode 0
Port 1 output
mode 1
Port 2 output
mode 0
Port 2 output
mode 1
Port 3 output
mode 0
Port 3 output
mode 1
Direct
D2h
D3h
D4h
D5h
D6h
D7h
DAh
DBh
Bit 7
Bit 6 Bit 5 Bit 4
I/O port function register
Bit 3
P0M0 [7:0]
Bit 2
P0M1[7:0]
P1M0[7:0]
P1M1[7:0]
-
P2M0[6:0]
-
P2M1[6:0]
-
P3M0[6:0]
-
P3M1[6:0]
Bit 1
Bit 0
RESET
~OP18
00H
00H
00H
00H
00H
00H
00H
*OP18 by writer programming set.
PxM1.y
0
0
1
1
PxM0.y
0
1
0
1
Port output mode
Quasi-bidirectional (standard 8051 port outputs) (pull-up)
Push-pull
Input only (high-impedance)
Open drain
The RESET Pin can define as General I/O P3.4 when user use Internal RESET.
The XTAL2 and XTAL1 can define as P3.5 and P3.6 by writer or ISP,when user use internal OSC as system clock;
when user use external OSC as system clock and input into XTAL1,Only XTAL2 can be defined as P3.5.
For general-purpose applications, every pin can be assigned to either high or low independently As shown below:
Mnemonic Description Dir. Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 RST
Ports
Port 3
Port 3
B0h
-
P3.6 P3.5 P3.4 P3.3 P3.2 P3.1 P3.0 7Fh
Port 2
Port 2
A0h
-
P2.6 P2.5 P2.4 P2.3 P2.2 P2.1 P2.0 7Fh
Port 1
Port 1
90h P1.7 P1.6 P1.5 P1.4 P1.3 P1.2 P1.1 P1.0 FFh
Port 0
Port 0
80h P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0 OP19
*OP19 by writer programming set.
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M069
Ver E SM39A16M1 04/20/2015
- 29 -