REVISION HISTORY
VERSION 1.3 (SEP. 2004) This book
The company name, Hynix Semiconductor Inc. changed to MagnaChip Semiconductor Ltd.
VERSION 1.2 (JUN. 2004)
Add the difference from the GMS87C1202/1102, guide to replace the GMS87C1202/1102 to the HMS87C1202A/1102A.
Correct RC oscillation characteristics
Fixed some errata.
VERSION 1.1 (MAY. 2003)
The operating temperature is extended to the industrial range.(-40°C ~ +85°C)
Fixed some errata.
Version 1.3
Published by
MCU Application Team
2004
MagnaChip Semiconductor Ltd. All right reserved.
Additional information of this manual may be served by MagnaChip Semiconductor offices in Korea or Distributors and Representatives.
MagnaChip Semiconductor 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, MagnaChip Semiconductor is in no way re-
sponsible for any violations of patents or other rights of the third party generated by the use of this manual.
HMS87C130XA/120XA/110XA
1. OVERVIEW .........................................................1
Description .........................................................1
Features .............................................................1
Replacing the GMS87C1102/1202 with the
HMS87C1102A/1202A .......................................2
Development Tools ............................................3
Ordering Information ..........................................4
2. BLOCK DIAGRAM .............................................5
3. PIN ASSIGNMENT .............................................6
4. PACKAGE DIAGRAM ........................................7
5. PIN FUNCTION .................................................10
6. PORT STRUCTURES .......................................12
7. ELECTRICAL CHARACTERISTICS ................18
Absolute Maximum Ratings .............................18
Recommended Operating Conditions ..............18
A/D Converter Characteristics .........................18
DC Electrical Characteristics ...........................19
AC Characteristics ...........................................20
Typical Characteristics .....................................21
8. MEMORY ORGANIZATION .............................25
Registers ..........................................................25
Program Memory .............................................27
Data Memory ...................................................30
Addressing Mode .............................................33
9. I/O PORTS ........................................................37
RA and RAIO registers ....................................37
RB and RBIO registers ....................................38
RC and RCIO registers ....................................39
RD and RDIO registers ................................... 40
10. CLOCK GENERATOR ................................... 41
Oscillation Circuit ............................................ 41
11. BASIC INTERVAL TIMER ............................. 43
12. TIMER / COUNTER ....................................... 45
8-bit Timer/Counter Mode ............................... 46
16-bit Timer/Counter Mode ............................. 47
8-bit Compare Output (16-bit) ......................... 48
8-bit Capture Mode ......................................... 48
16-bit Capture Mode ....................................... 51
PWM Mode ..................................................... 51
13. BUZZER OUTPUT FUNCTION ..................... 54
14. ANALOG TO DIGITAL CONVERTER ........... 55
15. INTERRUPTS ................................................ 58
Interrupt Sequence .......................................... 60
External Interrupt ............................................. 62
16. WATCHDOG TIMER ...................................... 63
17. POWER SAVING MODE ............................... 65
Minimizing Current Consumption .................... 69
18. RESET ........................................................... 71
19. POWER FAIL PROCESSOR ......................... 72
20. OTP PROGRAMMING ................................... 74
DEVICE CONFIGURATION AREA ................. 74
21. APPENDIX ........................................................ i
A. INSTRUCTION MAP ......................................i
B. INSTRUCTION SET ......................................ii
SEP. 2004 Ver 1.3
HMS87C130XA/120XA/110XA
HMS87C1304A / HMS87C1302A
HMS87C1204A / HMS87C1202A
HMS87C1104A / HMS87C1102A
CMOS SINGLE-CHIP 8-BIT MICROCONTROLLER
1. OVERVIEW
1.1 Description
The HMS87C1X0XA is an advanced CMOS 8-bit microcontroller with 4K/2K bytes of EPROM. The MagnaChip HMS87C1X0XA is a
powerful microcontroller which provide a highly flexible and cost effective solution to many small applications such as controller for bat-
tery charger. The HMS87C1X0XA provides the following standard features: 4K/2K bytes of EPROM, 128bytes of RAM, 8-bit timer/
counter, 8-bit A/D converter, 10-bit high speed PWM output, programmable buzzer driving port, on-chip oscillator and clock circuitry. In
addition, the HMS87C1X0XA supports power saving modes to reduce power consumption.
This document is
only explained for the base of the HMS87C1304A,
the other’s eliminated functions are same as below.
Device name
HMS87C1304A
HMS87C1302A
HMS87C1204A
HMS87C1202A
HMS87C1104A
HMS87C1102A
EPROM
4K bytes
2K bytes
4K bytes
2K bytes
4K bytes
2K bytes
RAM
128bytes
128bytes
128bytes
128bytes
128bytes
128bytes
EXT.INT
2
2
2
2
1
1
BUZ
O
O
O
O
X
X
I/O
19
19
15
15
11
11
Operating
Voltage
2.0 ~ 5.5V
2.0 ~ 5.5V
2.0 ~ 5.5V
2.0 ~ 5.5V
2.0 ~ 5.5V
2.0 ~ 5.5V
Package
24 SKDIP or SOP
24 SKDIP or SOP
20 PDIP or SOP
20 PDIP or SOP
16 PDIP or SOP
16 PDIP or SOP
1.2 Features
• 4K/2K Bytes On-chip Program Memory
• 128 Bytes of On-chip Data RAM
(Included stack memory)
• Instruction Cycle Time:
- 250nS at 8MHz
• Programmable I/O pins
(LED direct driving can be source and sink)
- HMS87C1304A/1302A : 19
- HMS87C1204A/1202A : 15
- HMS87C1104A/1102A : 11
• 2.0V to 5.5V Wide Operating Range
• 8-bit A/D Converter
- 8 channels
• One 8-bit Basic Interval Timer
• Two 8-bit Timer / Counters
• One 10-bit High Speed PWM Outputs
• Watchdog timer
• Seven Interrupt sources
- External input: 2 ( 1 for HMS87C1104/2A )
- A/D Conversion: 1
- Timer: 4
• One Programmable Buzzer Driving port
( except HMS87C1104/2A )
- 500Hz ~ 130kHz
SEP. 2004 Ver 1.3
1