background image
HYUNDAI MICRO ELECTRONICS
8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS81C2012
GMS81C2020
User’s Manual
+ < 8 1 ' $ ,
MicroElectronics
Semiconductor Group of Hyundai Electronics Industrial Co., Ltd.
MAR. 2000 Ver 1.00
background image
HYUNDAI MICRO ELECTRONICS
8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS81C2012
GMS81C2020
+ < 8 1 ' $ ,
MicroElectronics
Semiconductor Group of Hyundai Electronics Industrial Co., Ltd.
User’s Manual (Ver. 1.00)
background image
Version 1.00
Published by
MCU Application Team
©
©
©
©
2000 HYUNDAI Micro Electronics All right reserved.
Additional information of this manual may be served by HYUNDAI Micro Electronics offices in Korea or Distributors and
Representatives listed at address directory.
HYUNDAI Micro Electronics reserves the right to make changes to any information here in at any time without notice.
The information, diagrams and other data in this manual are correct and reliable; however, HYUNDAI Micro Electronics is
in no way responsible for any violations of patents or other rights of the third party generated by the use of this manual.
background image
Table of Contents
1. OVERVIEW ...........................................1
Description ......................................................... 1
Features .............................................................1
Development Tools ............................................2
Ordering Information ..........................................2
2. BLOCK DIAGRAM ................................3
3. PIN ASSIGNMENT ...............................4
4. PACKAGE DIAGRAM
.............................. 6
5. PIN FUNCTION .....................................8
6. PORT STRUCTURES .........................11
7. ELECTRICAL CHARACTERISTICS ... 14
Absolute Maximum Ratings ............................. 14
Recommended Operating Conditions.............. 14
A/D Converter Characteristics ......................... 14
DC Electrical Characteristics for Standard Pins(5V)
..........................................................................15
DC Electrical Characteristics for High-Voltage Pins
..........................................................................16
AC Characteristics ...........................................17
AC Characteristics ...........................................18
Typical Characteristics .....................................19
8. MEMORY ORGANIZATION................ 21
Registers .......................................................... 21
Program Memory ............................................. 24
Data Memory ...................................................27
Addressing Mode .............................................31
9. I/O PORTS ..........................................35
10. BASIC INTERVAL TIMER .................39
11. WATCHDOG TIMER......................... 41
12. TIMER/EVENT COUNTER ............... 44
8-bit Timer / Counter Mode .............................. 46
16-bit Timer / Counter Mode ............................50
8-bit Compare Output (16-bit) ..........................51
8-bit Capture Mode ..........................................51
16-bit Capture Mode ........................................54
PWM Mode ......................................................55
13. ANALOG DIGITAL CONVERTER ....58
14. SERIAL PERIPHERAL INTERFACE 61
Transmission/Receiving Timing ...................... 63
The method of Serial I/O ................................. 64
The Method to Test Correct Transmission ...... 64
15. BUZZER FUNCTION ........................65
16. INTERRUPTS ...................................67
Interrupt Sequence .......................................... 69
Multi Interrupt .................................................. 71
External Interrupt ............................................. 72
17. Power Saving Mode.......................... 74
Operating Mode .............................................. 75
Stop Mode ....................................................... 76
Wake-up Timer Mode ...................................... 77
Internal RC-Oscillated Watchdog Timer Mode 78
Minimizing Current Consumption .................... 79
18. OSCILLATOR CIRCUIT ....................81
19. RESET .............................................. 82
External Reset Input ........................................ 82
Watchdog Timer Reset ................................... 82
20. POWER FAIL PROCESSOR ............83
21. OTP PROGRAMMING...................... 85
DEVICE CONFIGURATION AREA ...................... 85
A. CONTROL REGISTER LIST ................. i
B. INSTRUCTION .................................... iii
Terminology List................................................ iii
Instruction Map ..................................................iv
Instruction Set .................................................... v
C.MASK ORDER SHEET ........................ xi
background image
HYUNDAI MicroElectronics
GMS81C2012/GMS81C2020
MAR. 2000 Ver 1.00
5
GMS81C2012/GMS81C2020
CMOS Single-Chip 8-Bit Microcontroller
with A/D Converter & VFD Driver
1. OVERVIEW
1.1 Description
The GMS81C2012 and GMS81C2020 are advanced CMOS 8-bit microcontroller with 12K/20K bytes of ROM. These are a
powerful microcontroller which provides a highly flexible and cost effective solution to many VFD applications. These pro-
vide the following standard features: 12K/20K bytes of ROM, 448 bytes of RAM, 8-bit timer/counter, 8-bit A/D converter,
10-bit High Speed PWM Output, Programmable Buzzer Driving Port, 8-bit Basic Interval Timer, 7-bit Watch dog Timer,
Serial Peripheral Interface, on-chip oscillator and clock circuitry. They also come with high voltage I/O pins that can directly
drive a VFD (Vacuum Fluorescent Display). In addition, the GMS81C2012 and GMS81C2020 support power saving modes
to reduce power consumption.
1.2 Features
• 20K/12K bytes ROM(EPROM)
• 448 Bytes of On-Chip Data RAM
(Including STACK Area)
• Minimum Instruction Execution time:
- 1uS at 4MHz (2cycle NOP Instruction)
• One 8-bit Basic Interval Timer
• One 7-bit Watch Dog Timer
• Two 8-bit Timer/Counters
• 10-bit High Speed PWM Output
• One 8-bit Serial Peripheral Interface
• Two External Interrupt Ports
• One Programmable 6-bit Buzzer Driving Port
• 60 I/O Lines
- 56 Programmable I/O pins
(Included 30 high-voltage pins Max. 40V)
- Three Input Only pins: 1 high-voltage pin
- One Output Only pin
• Eight Interrupt Sources
- Two External Sources (INT0, INT1)
- Two Timer/Counter Sources (Timer0, Timer1)
- Four Functional Sources (SPI,ADC,WDT,BIT)
• 12-Channel 8-bit On-Chip Analog to Digital
Converter
• Oscillator:
- Crystal
- Ceramic Resonator
- External R Oscillator
• Low Power Dissipation Modes
- STOP mode
- Wake-up Timer Mode
- Standby Mode
- Watch Mode
- Sub-active Mode
• Operating Voltage: 2.7V ~ 5.5V (at 4.5MHz)
• Operating Frequency: 1MHz ~ 4.5MHz
• Sub-clock: 32.768KHz Crystal Oscillator
• Enhanced EMS Improvement
Power Fail Processor
(Noise Immunity Circuit)
Device name
ROM Size
RAM Size
OTP
Package
GMS81C2012
12K bytes
448 bytes
-
64SDIP, 64MQFP,
64LQFP
GMS81C2020
20K bytes
GMS87C2020
background image
GMS81C2012/GMS81C2020
HYUNDAI MicroElectronics
6
MAR. 2000 Ver 1.00
1.3 Development Tools
The GMS81C20xx are supported by a full-featured macro
assembler, an in-circuit emulator CHOICE-Jr.
TM
and OTP
programmers. There are third different type programmers
such as emulator add-on board type, single type, gang type.
For mode detail, Refer to “21. OTP PROGRAMMING” on
page 89. Macro assembler operates under the MS-Win-
dows 95/98
TM
.
Please contact sales part of Hyundai MicroElectronics.
1.4 Ordering Information
In Circuit
Emulators
CHOICE-Dr.
Socket Adapter
for OTP
CHPOD81C20D-64SD (64SDIP)
CHPOD81C20D-64QFP (64MQFP)
CHPOD81C20D-64LQFP (64LQFP)
Assembler
HME Macro Assembler
Device name
ROM Size
RAM size
Package
Mask version
GMS81C2012 K
GMS81C2012 Q
GMS81C2012 LQ
GMS81C2020 K
GMS81C2020 Q
GMS81C2020 LQ
12K bytes
12K bytes
12K bytes
20K bytes
20K bytes
20K bytes
448 bytes
448 bytes
448 bytes
448 bytes
448 bytes
448 bytes
64SDIP
64MQFP
64LQFP
64SDIP
64MQFP
64LQFP
OTP version
GMS87C2020 K
GMS87C2020 Q
GMS87C2020 LQ
20K bytes OTP
20K bytes OTP
20K bytes OTP
448 bytes
448 bytes
448 bytes
64SDIP
64MQFP
64LQFP
background image
HYUNDAI MicroElectronics
GMS81C2012/GMS81C2020
MAR. 2000 Ver 1.00
7
2. BLOCK DIAGRAM
ALU
Interrupt Controller
Data Memory
8-bit
ADC
8-bit
Counter
Timer/
Program
Memory
Data Table
PC
8-b it B a sic
Tim er
In terval
Watchdog
Timer
PC
R4
R5
R2
PSW
S yste m co n tro lle r
T im in g g e ne ra to r
S yste m
C lock C o n tro lle r
C lo ck
G en e ra to r
RESET
X
IN
X
OU
T
R40 / T0O
R41
R50
R20~R27
V
DD
V
SS
Power
Supply
8-bit serial
R51
R52
R53 / SCLK
R54 / SIN
R55 / SOUT
R56 / PWM1O/T1O
R57
R1
R10~R17
R3
R30~R35
Interface
Buzzer
Driver
R6
R60 / AN0
R61 / AN1
R62 / AN2
R63 / AN3
R64 / AN4
R65 / AN5
R66 / AN6
R67 / AN7
(448 bytes)
10-bit
AV
DD
AV
SS
ADC Power
Supply
Stack Pointer
R0
R04
R03/BUZO
R02/EC0
R00/INT0
Vdisp/RA
R7
R70 / AN8
R71 / AN9
R72 / AN10
R42
R43
R73 / AN11
S u b S yste m
C lock C o n tro lle r
SX
IN
SX
OU
T
R05
R06
R07
R01/INT1
RA
PWM
A
X
Y
High Voltage Port
background image
GMS81C2012/GMS81C2020
HYUNDAI MicroElectronics
8
MAR. 2000 Ver 1.00
3. PIN ASSIGNMENT
R40
R42
R43
R50
R51
R52
R53
R54
R55
R56
R57
RESET
XI
XO
V
SS
SCLK
SIN
SOUT
PWM1O/T1O
SXIN
SXOUT
AN0
R74
R75
AV
SS
R60
R61
R62
R63
R64
R65
R66
R67
R70
R71
R72
R73
AV
DD
AN1
AN2
AN3
AN4
AN5
AN6
AN7
AN8
AN9
AN10
AN11
RA
R35
R34
R33
R32
R31
R30
R27
R26
R25
R24
R23
R22
R21
R20
R17
R16
R15
R14
R13
R12
R11
R10
R07
R06
R05
R04
R03
R02
R01
R00
V
DD
R51
R30
R31
R32
R33
R34
R35
RA
R40
R41
R42
R43
R50
T0O
V
disp
R66
R04
R03
R02
R01
R00
V
DD
AV
DD
R73
R72
R71
R70
R67
AN6
AN8
AN7
R2
7
R2
5
R2
4
R2
3
R2
2
R2
1
R2
0
R1
7
R1
6
R1
5
R1
4
R1
3
R1
2
R1
1
R1
0
R0
7
R2
6
R0
6
R0
5
R5
2
R5
4
R5
5
R5
6
R5
7
RESET
XI
XO
V
SS
R7
4
R7
5
AV
SS
R6
0
R6
1
R6
2
R6
3
R5
3
R6
4
R6
5
SI
N
SO
UT
PWM
1
O
/T
1
O
SXI
SXO
AN
0
AN
1
AN
2
AN
3
SCL
K
AN
4
AN
5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
51
50
49
32
31
30
29
28
27
26
25
24
23
22
21
20
52
53
54
55
56
57
58
59
60
61
62
63
64
64MQFP
64SDIP
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
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
BUZO
EC0
INT1
INT0
V
disp
R41
T0O
AN9
AN11
AN10
INT0
EC0
INT1
BUZO
High Voltage Port
G
M
S
8
1
C
20
12/
20
GMS81C2012/20
background image
HYUNDAI MicroElectronics
GMS81C2012/GMS81C2020
MAR. 2000 Ver 1.00
9
R06
R05
R04
R03
R02
R01
R00
V
DD
AV
DD
R73
R72
R71
R70
R67
R66
R65
R2
6
R2
5
R2
4
R2
3
R2
2
R2
1
R2
0
R1
7
R1
6
R1
5
R1
4
R1
3
R1
2
R1
1
R1
0
R0
7
R5
4
R5
5
R5
6
R5
7
RESE
T
XI
N
XO
UT
V
SS
R7
4
R7
5
AV
SS
R6
0
R6
1
R6
2
R6
3
R6
4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
R27
R30
R31
R32
R33
R34
R35
R40
R41
R42
R43
R50
R51
R52
R53
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
64LQFP
SI
N
SO
UT
PWM
1
O
/T
1
O
SXI
N
SXO
UT
AN0
AN1
AN2
AN3
AN4
AN6
AN8
AN7
AN5
V
disp
T0O
SCLK
RA
AN10
AN11
AN9
INT1
BUZO
EC0
INT0
High Voltage Port
GMS81C2012/20
background image
GMS81C2012/GMS81C2020
HYUNDAI MicroElectronics
10
MAR. 2000 Ver 1.00
4. PACKAGE DIAGRAM
UNIT: INCH
2.280
2.260
0.022
0.016
0.050
0.030
0.070 BSC
0.1
4
0
0.1
2
0
mi
n
. 0.
015
0.680
0.660
0.750 BSC
0-15
°
64SDIP
0.012
0.008
0
.20
5 m
a
x.
20.10
19.90
24.15
23.65
18.1
5
17.6
5
14.1
0
13.9
0
3.18 max.
0.50
0.35
1.00 BSC
SEE DETAIL "A"
1.03
0.73
0-7
°
0.
36
0.
10
0.
23
0.
13
1.95
REF
DETAIL "A"
UNIT: MM
64MQFP
background image
HYUNDAI MicroElectronics
GMS81C2012/GMS81C2020
MAR. 2000 Ver 1.00
11
1.60 max.
SEE DETAIL "A"
0.75
0.45
0-7
°
0.1
5
0.0
5
1.00
REF
DETAIL "A"
UNIT: MM
10.00 BSC
12.00 BSC
1
2
.0
0
BSC
1
0
.0
0
BSC
0.38
0.22
0.50 BSC
1.4
5
1.3
5
64LQFP
background image
GMS81C2012/GMS81C2020
HYUNDAI MicroElectronics
12
MAR. 2000 Ver 1.00
5. PIN FUNCTION
V
DD
: Supply voltage.
V
SS
: Circuit ground.
AV
DD
: Supply voltage to the ladder resistor of ADC cir-
cuit. To enhance the resolution of analog to digital convert-
er, use independent power source as well as possible, other
than digital power source.
AV
SS
: ADC circuit ground.
RESET: Reset the MCU.
X
IN
: Input to the inverting oscillator amplifier and input to
the internal clock operating circuit.
X
OUT
: Output from the inverting oscillator amplifier.
RA(V
disp
): RA is one-bit high-voltage input only port pin.
In addition, RA serves the functions of the V
disp
special
features. V
disp
is used as a high-voltage input power supply
pin when selected by the mask option.
R00~R07: R0 is an 8-bit high-voltage CMOS bidirectional
I/O port. R0 pins 1 or 0 written to the Port Direction Reg-
ister can be used as outputs or inputs. In addition, R0
serves the functions of the various following special fea-
tures.
R10~R17: R1 is an 8-bit high-voltage CMOS bidirectional
I/O port. R1 pins 1 or 0 written to the Port Direction Reg-
ister can be used as outputs or inputs.
R20~R27: R2 is an 8-bit high-voltage CMOS bidirectional
I/O port. R2 pins 1 or 0 written to the Port Direction Reg-
ister can be used as outputs or inputs.
R30~R35: R3 is a 6-bit high-voltage CMOS bidirectional
I/O port. R3 pins 1 or 0 written to the Port Direction Reg-
ister can be used as outputs or inputs.
R40~R43: R4 is a 4-bit CMOS bidirectional I/O port. R4
pins 1 or 0 written to the Port Direction Register can be
used as outputs or inputs. In addition, R4 serves the func-
tions of the following special features.
R50~R57: R5 is an 8-bit CMOS bidirectional I/O port. R5
pins 1 or 0 written to the Port Direction Register can be
used as outputs or inputs. In addition, R5 serves the func-
tions of the various following special features.
R60~R67: R6 is an 8-bit CMOS bidirectional I/O port. R6
pins 1 or 0 written to the Port Direction Register can be
used as outputs or inputs. In addition, R6 is shared with the
ADC input.
R70~R73: R7 is a 4-bit CMOS bidirectional I/O port. R6
pins 1 or 0 written to the Port Direction Register can be
used as outputs or inputs. In addition, R7 is shared with the
ADC input.
SX
IN
: Input to the internal subsystem clock operating cir-
cuit. In addition, SXIN serves the R74 pin when selected
by the code option. *R74 has a Pull-up circuit.
SX
OUT
: Output from the inverting subsystem oscillator
amplifier. In addition, SXOUT serves the R75 pin when
Port pin
Alternate function
RA
V
disp
(High-voltage input power supply)
Port pin
Alternate function
R00
R01
R02
R03
INT0 (External interrupt 0)
INT1 (External interrupt 1)
EC0 (Event counter input)
BUZO (Buzzer driver output)
Port pin
Alternate function
R40
T0O (Timer/Counter 0 output)
Port pin
Alternate function
R53
R54
R55
R56
SCLK (Serial clock)
SIN (Serial data input)
SOUT (Serial data output)
PWM1O (PWM1 Output)
T1O (Timer/Counter 1 output)
Port pin
Alternate function
R60
R61
R62
R63
R64
R66
R66
R67
AN0 (Analog Input 0)
AN1 (Analog Input 1)
AN2 (Analog Input 2)
AN3 (Analog Input 3)
AN4 (Analog Input 4)
AN5 (Analog Input 5)
AN6 (Analog Input 6)
AN7 (Analog Input 7)
Port pin
Alternate function
R70
R71
R72
R73
AN8 (Analog Input 8)
AN9 (Analog Input 9)
AN10 (Analog Input 10)
AN11 (Analog Input 11)