LG Semicon
8-bit Microcontrollers
GMS81604/08
Revision History
Rev 1.2 (Dec. 1998)
Redraw package dimension on page 5~6.
Rev 1.1 (Nov. 1998)
Operating Voltage, 2.7~5.5V is extended with 2.4~5.5V.
Operating Temperature, -20~80
°
C is extended with -20~85
°
C.
Add the "Typical Characteristics" on page 16, 17.
Add the unused port guidance on page 48.
Revision the information for the OTP programming guidance, recommand using "Intelligent Mode" on page 49.
Add the chapter for OTP programming specification as an appendix.
Rev 1.0 (Nov. 1997)
First Edition
Second Edition
Published by
MCU Application Team
©
1998 LG Semicon Co., Ltd. All right reserved.
Additional information of this manual may be served by LG Semicon offices in Korea or Distributors and
Representatives listed at address directory.
LG Semicon 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, LG Semicon Co,. Ltd.
is in no way responsible for any violations of patents or other rights of the third party generated by the use of this
manual.
Table of Contents
OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BLOCK DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PIN ASSIGNMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PACKAGES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PIN DESCRIPTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PORT STRUCTURES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
3
4
5
7
9
ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
MEMORY ORGANIZATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Program Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Data Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
I/O PORTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
BASIC INTERVAL TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
TIMER/COUNTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8-bit Timer/Counter Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
16-bit Timer/Counter Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8-bit Capture Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
16-bit Capture Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
ANALOG TO DIGITAL CONVERTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
How to Use A/D Converter
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
BUZZER FUNCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
INTERRUPTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
External Interrupt
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
BRK Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Multiple Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
WATCHDOG TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
STOP MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Release Stop Mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Minimizing Current Consumption in Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . 43
RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
POWER FAIL PROCESSOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
OSCILLATOR CIRCUIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
UNUSED PORTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
GMS81608T (OTP) PROGRAMMING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
1. Using the Universal programmer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2. Using the general EPROM(27C256)
programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
GMS81608T PROGRAMMING MANUAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
APPENDIX
A. INSTRUCTION SET
B. MASK ORDER SHEET
LG Semicon
GMS81604/08
GMS81604 / GMS81608
CMOS SINGLE-CHIP 8-BIT MICROCONTROLLER
OVERVIEW
Description
The GMS81604/08 is a high-performance CMOS 8-bit microcontroller with 4K or 8K bytes of ROM. The device
is one of GMS800 family. The LG Semicon GMS81604/08 is a powerful microcontroller which provides a highly
flexible and cost effective solution to many embedded control applications. The GMS81604/08 provides the
following standard features: 8K bytes of ROM, 256 bytes of RAM, 35 I/O lines(33 lines for 40PDIP), 16-bit or
8-bit timer/counter, a precision analog to digital converter, on-chip oscillator and clock circuitry. In addition, the
GMS81604/08 supports power saving modes to reduce power consumption. The Stop Mode saves the RAM
contents but freezes the oscillator disabling all other chip functions until the next hardware reset or external
interrupt.
Features
4K/ 8K On-chip Program Memory
256 Bytes of On-Chip Data RAM
Instruction execution time: 0.5us at 8MHz
2.4V to 5.5V Operating Range
1~8 MHz Operating frequency
Basic Interval Timer
Four 8-Bit Timer/ Counters (can be used
as two 16-bit)
Four external interrupt ports
Two Programmable Clock Out
One Buzzer Driving port
31 Programmable I/O, 4 Input pins,
Twelve Interrupt Sources
All LED Direct Drive Output Ports
8-Channel 8-Bit On-Chip Analog to Digital
Converter
Power Fail Processor
(Noise immunity circuit)
Power Down Mode (Stop Mode)
Memory Proliferation
Device
ROM Bytes
RAM Bytes
ages permit the user to program them once. In addition
to the program memory, the configuration fuses must
be programmed.
GMS81604, GMS81608
In-Circuit
Emulators
OTP devices
CHOICE-Jr.
T M
GMS81604
GMS81608
GMS81608T
4K
8K
8K EPROM
256
256
256
Development Tools
The GMS800 family is supported by a full-featured
macro assembler, an in-circuit emulators CHOICE-
Jr.
T M
, socket adapters for OTP device.
The availability of OTP devices are especially useful
for customers expecting frequent code changes and
updates. The OTP devices, packaged in plastic pack-
GMS81608T (40 DIP)
GMS81608T K (42 SDIP)
GMS81608T PL (44 pin PLCC)
OA816A-40PD (40 DIP)
OA816A-42SD (42 SDIP)
OA816A-44PL (44 PLCC)
LGS Macro Assembler
Socket
Adapters for
OTP Devices
Assembler
1