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 Distributo rs 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 a nd reliable; however, LG Sem icon Co.,
Ltd. is in no way responsible for any viol ations of patents or oth er right s of the third party gene rated by the use
of this manual.
Note: The ROM version products in this data book will be applied to new masking version. (From Dec., 1998)
In case that you have old p roducts, please refer to previ ous data book (prior to this).
Dec. 1998 Ver 3.0
GMS90 Series
GMS90C31/51, 97C51
GMS90L31/51, 97L51 (Low voltage versions)
• Fully compatible to standard MCS-51 microcontroller
• Wide operating frequency up to 40MHz (for more detail, see “GMS90 Series Selection Guide”)
•4K × 8 (EP)ROM
• 128 × 8 RAM
• 64K external program memory space
• 64K external data memory space
• Four 8-bit ports
• Two 16-bit Timers / Counters
• USART
• Five interrupt sources, two priority levels
• Power saving Idle and power down mode
• Quick pulse programming algorithm (in the OTP devices)
• 2-level program memory lock (in the OTP devices)
• 2.7Volt low voltage version available
• P-DIP-40, P-LCC-44, P-MQFP-44 package
Block Diagram
128 × 8
T 0
T 1
ROM / EPROM
RAM
CPU
4K × 8
8-BIT
USART
PORT 0
PORT 1
PORT 2
PORT 3
I/O
I/O
I/O
I/O
Dec. 1998 Ver 3.01
GMS90 Series
GMS90C32/52, 97C52
GMS90L32/52, 97L52 (Low voltage versions)
• Fully compatible to standard MCS-51 microcontroller
• Wide operating frequency up to 40MHz (for more detail, see “GMS90 Series Selection Guide”)
•8K × 8 (EP)ROM
• 256 × 8 RAM
• 64K external program memory space
• 64K external data memory space
• Four 8-bit ports
• Three 16-bit Timers / Counters (Timer2 with up/down counter feature)
• USART
• Six interrupt sources, two priority levels
• Power saving Idle and power down mode
• Quick pulse programming algorithm (in the OTP devices)
• 2-level program memory lock (in the OTP devices)
• 2.7Volt low voltage version available
• P-DIP-40, P-LCC-44, P-MQFP-44 package
Block Diagram
T 2
T 0
T 1
ROM / EPROM
RAM
256 × 8
CPU
8K × 8
8-BIT
USART
PORT 0
PORT 1
PORT 2
PORT 3
I/O
I/O
I/O
I/O
2Dec. 1998 Ver 3.0
GMS90 Series
GMS90C54/56/58, 97C54/56/58
GMS90L54/56/58, 97L54/56/58 (Low voltage versions)
• Fully compatible to standard MCS-51 microcontroller
• Wide operating frequency up to 40MHz (for more detail, see “GMS90 Series Selection Guide”)
• 16K/24K/32K bytes (EP)ROM
• 256 × 8 RAM
• 64K external program memory space
• 64K external data memory space
• Four 8-bit ports
• Three 16-bit Timers / Counters (Timer2 with up/down counter feature)
• USART
• One clock output port
• Programmable ALE pin enable / disable
• Six interrupt sources, two priority levels
• Power saving Idle and power down mode
• Quick pulse programming algorithm (in the OTP devices)
• 2-level program memory lock (in the OTP devices)
Port 1 is an 8-bit bidirectional I/O port with internal
pull-ups. Port 1 pins that have 1s written to them are
pulled high by the interna l pul l- up re si stor s a nd ca n b e
used as inputs. As inputs, port 1 pins that are
externally pulled low will source current because of
the pulls-ups (IIL, in the DC characteristics). Pins P1.0
and P1.1 also. Port1 also receives the low-order
address byte during program memory verification.
Port1 also serves alternate functions of Timer 2.
P1.0 / T2 :Timer/counter 2 external count input
P1.1 / T2EX : Timer/counter 2 trigger input
In GMS9XC54/56/58:
P1.0 / T2, Clock Out : Timer/counter 2 external count
input, Clock Out
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal
pull-ups. Port 3 pins that have 1s written to them are
pulled high by the interna l pul l- up re si stor s a nd ca n b e
used as inputs. As inputs, port 3 pins that are
externally pulled low will source current because of
the pulls-ups (IIL, in the DC characteristics). Port 3 also
serves the special features of the 80C51 family, as
listed below.
11
13
14
15
16
17
18
19
XTAL2201814O
10
11
12
13
14
15
16
17
10
11
12
13
5
7
8
9
P3.0 / RxD
P3.1 / TxD
P3.2 /INT0
P 3 .3 / INT 1
P3.4 /T0
P3.5 /T1
P3.6 / WR
P3.7 /RD
XTAL2
Output of the inverting oscillator amplifier.
receiver data input (asynchronous) or
data input output(synch rono us) of serial
interface 0
transmitter data output (asynchronous)
or clock output (synchronous) of the
serial interface 0
interrupt 0 input/timer 0 gate control
interrupt 1 input/timer 1 gate control
counter 0 input
counter 1 input
the write control signal latches the data
byte from port 0 into the external data
memory
the read control signal enables the
external data memory to port 0
8Dec. 1998 Ver 3.0
GMS90 Series
Pin Number
Symbol
XTAL1211915I
P2.0-P2.724-3121-2818-25I/O
PSEN322926O
RESET1094I
PLCC-44PDIP-40MQFP-
44
Input/
Output
Function
XTAL1
Input to the inverting oscillator amplifier and input to
the internal clock generator circuits.To drive the
device from an external clock source, XTAL1 should
be driven, while XTA L2 is le ft un con nec ted . There are
no requirements on the duty cycle of the external
clock signal, since the input to the internal clocking
circuitry is divided down by a divide-by-two flip-flop.
Minimum and maximum high an d low times as well as
rise fall times specified in the AC characteristics must
be observed.
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal
pull-ups. Port 2 pins that have 1s written to them are
pulled high by the internal pull-up resistors and can be
used as inputs. As inputs, port 2 pins that are
externally pulled low will source current because of
the pulls-ups (IIL, in the DC characteristics).Port 2
emits the high-order addr ess by te d uring fetch es fro m
external program memory and during accesses to
external data memory that use 16-bit addresses
(MOVX @DPTR). In this application it uses strong
internal pull-ups when emitting 1s. During accesses to
external data memory that use 8-bit addresses
(MOVX @Ri), port 2 emits the contents of the P2
special function register.
The Program Store Enable
The read strobe to external program memory when
the device is executing code from the external
program memory. PSEN is activated twice each
machine cycle, except that two PSEN activations are
skipped during each access to external data memory.
PSEN is not activated during fetches from internal
program memory.
RESET
A high level on this pin for two machine cycles while
the oscillator is running resets the device. An inter nal
diffused resistor to VSS permits power-on reset us ing
only an external capaci tor to VCC.
Dec. 1998 Ver 3.09
GMS90 Series
Symbol
ALE /
PROG
EA / V
Pin Number
PLCC-44PDIP-40MQFP-
333027O
PP
353129IExternal Access Enable / Program Supply Voltage
44
Input/
Output
Function
The Address Latch Enable / Program pulse
Output pulse for latching the low byte of the address
during an access to external memory. In normal
operation, ALE is emitted at a constant rate of 1/6 the
oscillator frequency, and can be used for external
timing or clocking. Note that one ALE pulse is skipped
during each access to external data memor y. This pin
is also the program pulse input (PROG) during
EPROM programming.
In GMS9XC54/56/58:
If desired, ALE operation can be disabled by setting
bit 0 of SFR locat ion 8EH. With this bit set, the pin is
weakly pulled high. The ALE disable feature will be
terminated by reset. Setting the ALE-disable bit has
no affect if the microcont roller is in ex ternal execut ion
mode.
EA must be external held low to enable the device to
fetch code from external program memory locations
0000H to FFFFH. If EA is held high, the device
executes from internal program memory unless the
program counter contai ns an address greater than its
internal memory size. This pin also receives the
12.75V programming supply voltage (VPP) during
EPROM programming.
Note; however, that if any of the Lock bits are
programmed, EA will be internally
latched on reset.
P0.0-P0.736-4332-3930-37I/O
Port 0
Port 0 is an 8-bit open-drain bidirectional I/O port.
Port 0 pins that have 1s wri tten to them f loat and can
be used as high-impedan ce inputs.
Port 0 is also the multiplexed low-order address and
data bus during accesses to external program and
data memory. In this application it uses strong internal
pull-ups when emitting 1s. Port 0 also outputs the
code bytes during program verification in the
GMS97X5X. External pull-up resistors are required
during program verification.
V
SS
V
CC
N.C.1,12
222016444038-
-6,17
23,34
28,39
Circuit ground potential
Supply terminal
-
No connection
for all operating modes
10Dec. 1998 Ver 3.0
GMS90 Series
FUNCTIONAL DESCRIPTION
The GMS90 series is fully compatible to the standard 8051 microcontroller family.
It is compatible with the general 8051 family. While maintaining all architectural and operational characteristics
of the general 8051 family.
Figure 1 shows a block diagram of the GMS90 series
XTAL1
XTAL2
RESET
/V
EA
ALE/PROG
PSEN
PP
OSC & TIMING
CPU
Timer 0
Timer 1
Timer 2
Interrupt Unit
Serial Channel
Figure 1. Block Diagram of the GMS90 series
RAM
128/256×8
ROM/EPROM
4K/8K/16K
24K/32K
Port 0
Port 1
Port 2
Port 3
Port 0
8-bit Digit. I/O
Port 1
8-bit Digit. I/O
Port 2
8-bit Digit. I/O
Port 3
8-bit Digit. I/O
Dec. 1998 Ver 3.011
GMS90 Series
CPU
The GMS90 series is efficient both as a controller and as an arithmetic processor. It has extensive facilities for
binary and BCD arithmetic and excels in its bit-handling capabilities. Efficient use of program memory results
from an instruction set consisting of 44% one-byte, 41% two-byte, and 15% three-byte instructions. With a 12
MHz crystal, 58% of the instructions are executed in 1.0µs (40MHz: 300ns).
Special Function Register PSW
LSB
PSW
Bit No.
Addr. D0
MSB
76543210
H
CYACF0 RS1 RS0 OVF1P
BitFunction
Carry Flag
Auxiliary Carry Flag
(for BCD operations)
General Purpose Flag
Register Bank select control bits
Bank 0 selected, data address 00H - 07
Bank 1 selected, data address 08H - 0F
Bank 2 selected, data address 10H - 17
Bank 3 selected, data address 18H - 1F
H
H
H
H
Overflow Flag
General Purpose Flag
Parity Flag
Set/cleared by hardware each instruction cycle to indicate an odd/even
number of "one" bits in the accumulator, i.e. ev en parity.
RS1
0
0
1
1
CY
AC
F0
RS0
0
1
0
1
OV
F1
P
Reset value of PSW is 00H.
12Dec. 1998 Ver 3.0
GMS90 Series
SPECIAL FUNCTION REGISTERS
All registers, except the progra m coun ter and th e four ge neral purp ose regi ster bank s, resi de in the s pecial fun ction register area.
The 28 special function registers (SFR) include pointers and registers that provide an interface between the CPU
and the other on-chip peripherals. There are also 128 directly addressable bits within the SFR area.
All SFRs are listed in Table 1, Table 1, and Table 3.
In Table 1 they are organized in nume ric order of their addr esses. In Tabl e 2 they are organ ized in groups wh ich
refer to the functional blocks of the GMS90 series. Table 3 illustrates the contents of the SFRs.
Table 1. Special Function Registers in Numeric Order of their Addresses
AddressRegister
80H
81H
82H
83H
84H
85H
86H
87H
88H
89H
8AH
8BH
8CH
8DH
3)
8EH
8FH
1) Bit-addressable Special Function Regis ter.
2) X means that the value is indeterminate and the location is reserved.
3) The GMS9XX54/56/58 have the AUXR0 reg iste r at ad dr ess 8EH.