SyncMOS Technologies Inc.
June 2002
SM79164
8 - Bit Micro-controller
with 64KB flash & 4KB RAM embedded
Product List
SM79164V16J/Q,16MHz 64KB internal flash MCU
SM79164L20P, 20MHz 64KB internal flash MCU
SM79164L25J/Q, 25MHz 64KB internal flash MCU
SM79164C25P, 25MHz 64KB internal flash MCU
SM79164C35J/Q, 35MHz 64KB internal flash MCU
Features
2.4V ~ 3.0V For V Version
Working voltage: 3.0V ~ 3.6V For L Version
4.5V ~ 5.5V For C Version
General 8052 family compatible
12 clocks per machine cycle
64K byte on chip program flash
4096 byte on-chip data RAM
Three 16 bit Timers/Counters
One Watch Dog Timer
Four 8-bit I/O ports for PDIP package
Four 8-bit I/O ports + one 4-bit I/O ports for PLCC or QFP package
Full duplex serial channel
Bit operation instruction
Industrial Level
8-bit Unsigned Division
8-bit Unsigned Multiply
BCD arithmetic
Direct Addressing
Indirect Addressing
Nested Interrupt
Two priority level interrupt
A serial I/O port
Power save modes: Idle mode and Power down mode
Code protection function
Low EMI (inhibit ALE)
Bank mapping direct addressing mode for access on-chip RAM
8 channel PWM function with P1.0 ~ P1.7
Description
The SM79164 series product is an 8 - bit single chip micro
controller with 64KB on-chip flash and 4K byte RAM
embedded. It is a derivative of the 8052 micro controller
family. It has 8-channel PWM build-in. User can access
on-chip expanded RAM with easier and faster way by its
‘bank mapping direct addressing mode’ scheme. With its
hardware features and powerful instruction set, it’s
straight forward to make it a versatile and cost effective
controller for those applications which demand up to 32
I/O pins for PDIP package or up to 36 I/O pins for
PLCC/QFP package, or applications which need up to
64K byte flash memory for program data.
To program the on-chip flash memory, a commercial writer
is available to do it in parallel programming method.
Ordering Information
yywwv
SM79164ihhk
yy: year, ww:week
v: version identifier {, A, B,...}
i:process identifier {V=2.4V~3.0V, L=3.0V ~ 3.6V, C=4.5V
~ 5.5V}
hh: working clock in MHz {20, 25, 35}
k: package type postfix {as below table}
Postfix
P
J
Q
Package
40L PDIP
44L PLCC
44L QFP
Pin/Pad
Configuration
page 2
page 2
page 2
Dimension
page 21
page 22
page 23
Taiwan
4F, No. 1 Creation Road 1,
Science-based Industrial Park,
Hsinchu, Taiwan 30077
TEL: 886-3-578-3344 #2667
886-3-579-2987
FAX: 886-3-5792960
886-3-5780493
Web site: http://www.syncmos.com.tw
Specifications subject to change without notice,contact your sales representatives for the most recent information.
1/26
Ver 1.4
SM79164 06/02
SyncMOS Technologies Inc.
June 2002
SM79164
Pin Configurations
P1.1/T2EX/PWM1
P1.0/T2/PWM0
P4.2
VDD
P0.0/AD0
P0.1/AD1
P0.7/AD7
#EA
P2.7/A15
P1.4/PWM4
P1.3/PWM3
P1.2/PWM2
P0.2/AD2
P0.3/AD3
6
5
4
3
2
1 44 43 42 41 40
PWM5/P1.5
PWM6/P1.6
PWM7/P1.7
RES
RXD/P3.0
P4.3
TXD/P3.1
#INT0/P3.2
#INT1/P3.3
T0/P3.4
T1/P3.5
7
8
9
10
11
12
13
39
38
37
36
35
34
33
32
31
30
29
P0.4/AD4
P0.5/AD5
P0.6/AD6
P0.7/AD7
#EA
P4.1
ALE
#PSEN
P2.7/A15
P2.6/A14
P2.5/A13
AD3/P0.3
AD2/P0.2
AD1/P0.1
AD0/P0.0
VDD
P4.2
T2/PWM0/P1.0
T2EX/PWM1/P1.1
PWM2/P1.2
PWM3/P1.3
PWM4/P1.4
34
35
36
37
38
39
40
41
42
43
44
33 32 31 30 29 28 27 26 25 24 23
22
21
ALE
P2.6/A14
P2.5/A13
P0.4/AD4
P0.5/AD5
P0.6/AD6
P4.1
#PSEN
P2.4/A12
P2.3/A11
P2.2/A10
P2.1/A9
P2.0/A8
P4.0
VSS
XTAL1
XTAL2
P3.7/#RD
P3.6/#WR
SM79164
ihhJ
44L PLCC
SM79164
ihhQ
44L QFP
(Top View)
20
19
18
17
16
15
14
13
12
14
(Top View)
15
16
17
18 19 20 21 22 23 24 25 26 27 28
1
2
3
4
5
6
7
8
9
10 11
#WR/P3.6
#RD/P3.7
XTAL2
XTAL1
VSS
A10/P2.2
A11/P2.3
A12/P2.4
A8/P2.0
A9/P2.1
P4.0
TXD/P3.1
T0/P3.4
P4.3
PWM5/P1.5
PWM6/P1.6
PWM7/P1.7
RES
RXD/P3.0
PWM0/T2/P1.0
PWM1/T2EX/P1.1
PWM2/P1.2
PWM3/P1.3
PWM4/P1.4
PWM5/P1.5
PWM6/P1.6
PWM7/P1.7
RES
RXD/P3.0
TXD/P3.1
#INT0/P3.2
#INT1/P3.3
T0/P3.4
T1/P3.5
#WR/P3.6
#RD/P3.7
XTAL2
XTAL1
VSS
1
2
3
4
5
6
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
VDD
P0.0/AD0
P0.1/AD1
P0.2/AD2
P0.3/AD3
P0.4/AD4
P0.5/AD5
P0.6/AD6
P0.7/AD7
#EA
ALE
#PSEN
P2.7/A15
P2.6/A14
P2.5/A13
P2.4/A12
P2.3/A11
P2.2/A10
P2.1/A9
P2.0/A8
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Specifications subject to change without notice,contact your sales representatives for the most recent information.
2/26
#INT0/P3.2
#INT1/P3.3
T1/P3.5
SM79164ihhP
40L PDIP
(Top View)
Ver 1.4
SM79164 06/02
SyncMOS Technologies Inc.
June 2002
Block Diagram
Timer 2
Timer 1
Timer 0
Stack
Pointer
Decoder &
Register
4096 bytes
RAM
SM79164
WDT
RES
Reset
Circuit
to pertinent blocks
Acc
to whole chip
Buffer2
Buffer1
Buffer
DPTR
Vdd
Vss
Power
Circuit
PC
Incrementer
Interrupt
Circuit
to pertinent blocks
ALU
Program
Counter
XTAL2
XTAL1
#EA
ALE
#PSEN
Timing
Generator
to whole system
PSW
Register
FFFFH
Instruction
Register
64K
bytes
Flash
Memory
Port 0
Latch
8
Port 1
Latch
Port 2
Latch
Port 3
Latch
Port 4
Latch
PWM
0000H
Port 0
Driver & Mux
8
Port 1
Driver & Mux
8
Port 2
Driver & Mux
8
Port 3
Driver & Mux
8
Port 4
Driver & Mux
4
Specifications subject to change without notice,contact your sales representatives for the most recent information.
3/26
Ver 1.4
SM79164 06/02
SyncMOS Technologies Inc.
June 2002
SM79164
Pin Descriptions
40L 44L 44L
PDIP QFP PLCC
Pin# Pin# Pin#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
40
41
42
43
44
1
2
3
4
5
7
8
9
10
11
12
13
14
15
16
18
19
20
21
22
23
24
25
26
27
29
30
31
32
33
34
35
36
37
38
17
28
39
6
2
3
4
5
6
7
8
9
10
11
13
14
15
16
17
18
19
20
21
22
24
25
26
27
28
29
30
31
32
33
35
36
37
38
39
40
41
42
43
44
23
34
1
12
Symbol
P1.0/T2/PWM0
P1.1/T2EX/PWM1
P1.2/PWM2
P1.3/PWM3
P1.4/PWM4
P1.5/PWM5
P1.6/PWM6
P1.7/PWM7
RES
P3.0/RXD
P3.1/TXD
P3.2/#INT0
P3.3/#INT1
P3.4/T0
P3.5/T1
P3.6/#WR
P3.7/#RD
XTAL2
XTAL1
VSS
P2.0/A8
P2.1/A9
P2.2/A10
P2.3/A11
P2.4/A12
P2.5/A13
P2.6/A14
P2.7/A15
#PSEN
ALE
#EA
P0.7/AD7
P0.6/AD6
P0.5/AD5
P0.4/AD4
P0.3/AD3
P0.2/AD2
P0.1/AD1
P0.0/AD0
VDD
P4.0
P4.1
P4.2
P4.3
Active I/O
i/o
i/o
i/o
i/o
i/o
i/o
i/o
i/o
i
i/o
i/o
i/o
i/o
i/o
i/o
i/o
i/o
o
i
i/o
i/o
i/o
i/o
i/o
i/o
i/o
i/o
o
o
i
i/o
i/o
i/o
i/o
i/o
i/o
i/o
i/o
i/o
i/o
i/o
i/o
Names
bit 0 of port 1 & timer 2 clock out , PWM channel 0
bit 1 of port 1 & timer 2 control , PWM channel 1
bit 2 of port 1 & PWM channel 2
bit 3 of port 1 & PWM channel 3
bit 4 of port 1 & PWM channel 4
bit 5 of port 1 & PWM channel 5
bit 6 of port 1 & PWM channel 6
bit 7 of port 1 & PWM channel 7
Reset
bit 0 of port 3 & Receive data
bit 1 of port 3 & Transmit data
bit 2 of port 3 & low true interrupt 0
bit 3 of port 3 & low true interrupt 1
bit 4 of port 3 & Timer 0
bit 5 of port 3 & Timer 1
bit 6 of port 3 & ext. memory write
bit 7 of port 3 & ext. mem. read
Crystal out
Crystal in
Sink Voltage, Ground
bit 0 of port 2 & bit 8 of ext. memory address
bit 1 of port 2 & bit 9 of ext. memory address
bit 2 of port 2 & bit 10 of ext. memory address
bit 3 of port 2 & bit 11 of ext. memory address
bit 4 of port 2 & bit 12 of ext. memory address
bit 5 of port 2 & bit 13 of ext. memory address
bit 6 of port 2 & bit 14 of ext. memory address
bit 7 of port 2 & bit 15 of ext. memory address
program storage enable
address latch enable
external access
bit 7 of port 0 & data/address bit 7 of ext. memory
bit 6 of port 0 & data/address bit 6 of ext. memory
bit 5 of port 0 & data/address bit 5 of ext. memory
bit 4 of port 0 & data/address bit 4 of ext. memory
bit 3 of port 0 & data/address bit 3 of ext. memory
bit 2 of port 0 & data/address bit 2 of ext. memory
bit 1 of port 0 & data/address bit 1 of ext. memory
bit 0 of port 0 & data/address bit 0 of ext. memory
Drive Voltage, +5 Vcc
bit 0 of Port 4
bit 1 of Port 4
bit 2 of Port 4
bit 3 of Port 4
H
L/ -
L/ -
L
Specifications subject to change without notice,contact your sales representatives for the most recent information.
4/26
Ver 1.4
SM79164 06/02
SyncMOS Technologies Inc.
June 2002
Special Function Register (SFR)
The address $80 to $FF can be accessed by direct addressing mode only.
Address $80 to $FF is SFR area.
The following table lists the SFRs which are identical to general 8052, as well as SM79164 Extension SFRs.
SM79164
Special Function Register (SFR) Memory Map
$F8
$F0
$E8
$E0
$D8
$D0
$C8
$C0
$B8
$B0
$A8
$A0
$98
$90
$88
$80
ACC
P4
PSW
T2CON
IP
P3
IE
P2
SCON
P1
TCON
P0
TMOD
SP
TL0
DPL
TL1
DPH
TH0
(Reserved)
TH1
RCON
DBANK
PCON
SBUF
P1CON
WDTC
WDTKET
T2MOD
RCAP2L
PWMC4
PWMC0
RCAP2H
PWMD4
PWMD0
PWMC5
PWMC1
TL2
PWMD5
PWMD1
PWMC6
PWMC2
TH2
PWMD6
PWMD2
PWMD7
PWMD3
SCONF
PWMC7
PWMC3
B
$FF
$F7
$EF
$E7
$DF
$D7
$CF
$C7
$BF
$B7
$AF
$A7
$9F
$97
$8F
$87
Note: The text of SFRs with bold type characters are Extension Special Function Registers for SM79164
Addr
85H
86H
97H
9BH
9FH
B3H
B4H
B5H
B6H
BBH
BCH
BDH
BEH
SFR
RCON
DBANK
WDTKEY
P1CON
WDTC
PWMD0
PWMD1
PWMD2
PWMD3
PWMD4
PWMD5
PWMD6
PWMD7
Reset
00H
0*000001
00H
00H
0*0**000
00H
00H
00H
00H
00H
00H
00H
00H
BSE
PWME7
WDTE
PWMD07
PWMD17
PWMD27
PWMD37
PWMD47
PWMD57
PWMD67
PWMD77
PWME6
Reserve
PWMD06
PWMD16
PWMD26
PWMD36
PWMD46
PWMD56
PWMD66
PWMD76
BS5
PWME5
CLEAR
PWMD05
PWMD15
PWMD25
PWMD35
PWMD45
PWMD55
PWMD65
PWMD75
PWMD04
PWMD14
PWMD24
PWMD34
PWMD44
PWMD54
PWMD64
PWMD74
PWMD03
PWMD13
PWMD23
PWMD33
PWMD43
PWMD53
PWMD63
PWMD73
BS4
PWME4
7
6
5
4
3
RAMS3
BS3
PWME3
2
RAMS2
BS2
PWME2
PS2
PWMD02
PWMD12
PWMD22
PWMD32
PWMD42
PWMD52
PWMD62
PWMD72
1
RAMS1
BS1
PWME1
PS1
PWMD11
0
RAMS0
BS0
PWME0
PS0
PWMD10
WDTKEY7 WDTKEY6 WDTKEY5 WDTKEY4 WDTKEY3 WDTKEY2 WDTKEY1 WDTKEY0
PWMD01 PWMD00
PWMD21 PWMD20
PWMD31 PWMD30
PWMD41 PWMD40
PWMD51 PWMD50
PWMD61 PWMD60
PWMD71 PWMD70
Specifications subject to change without notice,contact your sales representatives for the most recent information.
5/26
Ver 1.4
SM79164 06/02