HMS81C2012A/2020A
Table of Contents
1. 1. OVERVIEW......................................................1
Description .........................................................1
Features .............................................................1
Development Tools ............................................2
Ordering Information
........................................2
2. 2. BLOCK DIAGRAM ..........................................3
3. 3. PIN ASSIGNMENT ..........................................4
4. 4. PACKAGE DIAGRAM .....................................6
5. 5. PIN FUNCTION................................................8
6. 6. PORT STRUCTURES....................................11
7. 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. 8. MEMORY ORGANIZATION ..........................21
Registers ..........................................................21
Program Memory .............................................24
Data Memory ...................................................27
Addressing Mode .............................................31
9. 9. I/O PORTS .....................................................35
10. 10. BASIC INTERVAL TIMER.........................39
11. 11. WATCHDOG TIMER .................................41
12. 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. 13. ANALOG DIGITAL CONVERTER............ 58
14. 14. SERIAL PERIPHERAL INTERFACE ....... 61
Transmission/Receiving Timing ...................... 63
The method of Serial I/O ................................. 64
The Method to Test Correct Transmission ...... 64
15. 15. BUZZER FUNCTION ................................ 65
16. 16. INTERRUPTS ........................................... 67
Interrupt Sequence .......................................... 69
Multi Interrupt .................................................. 71
External Interrupt ............................................. 72
17. 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. 18. OSCILLATOR CIRCUIT ........................... 81
19. 19. RESET ...................................................... 82
External Reset Input ........................................ 82
Watchdog Timer Reset ................................... 82
20. 20. POWER FAIL PROCESSOR.................... 83
21. 21. OTP PROGRAMMING.............................. 85
DEVICE CONFIGURATION AREA ................. 85
22. A. CONTROL REGISTER LIST......................... i
23. B. INSTRUCTION ............................................ iii
Terminology List ................................................ iii
Instruction Map ..................................................iv
Instruction Set ....................................................v
24. C. MASK ORDER SHEET ............................... xi
SEP. 2004 Ver 2.00
HMS81C2012A/2020A
HMS81C2012A/HMS81C2020A
CMOS Single-Chip 8-Bit Microcontroller
with A/D Converter & VFD Driver
1. OVERVIEW
1.1 Description
The HMS81C2012A and HMS81C2020Aare 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
provide the following standard features: 12K/20K bytes of ROM, 448 bytes of RAM, 8-bit timer/counter, 8-bit A/D convert-
er, 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 HMS81C2012A and HMS81C2020A support power saving
modes to reduce power consumption.
Device name
HMS81C2012A
HMS81C2020A
ROM Size
12K bytes
20K bytes
RAM Size
448 bytes
OTP
-
GMS87C2020
Package
64SDIP, 64MQFP,
64LQFP
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
• 57 I/O Lines
- 56 Programmable I/O pins
(Included 30 high-voltage pins Max. 40V)
- 1 Input only pin (high-voltage 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 (@ 1M ~ 6MHz)
4.5V ~ 5.5V (@ 1M ~ 8MHz)
• Sub-clock: 32.768KHz Crystal Oscillator
• Enhanced EMS Improvement
Power Fail Processor
(Noise Immunity Circuit)
SEP. 2004 Ver 2.00
1