8-Bit CMOS Microcontorller
GMS97C2051/L2051
Features
Compatible with MCS-51 Products
2 Kbytes of programmable EPROM
4.25V to 5.5V Operating Range (GMS97C2051)
2.70V to 3.6V Operating Range (GMS97L2051)
Version for 12MHz / 24 MHz Operating frequency (GMS97C2051)
Only 12MHz Operating frequency (GMS97L2051)
Two-Level Program Memory Lock with encryption array
128 bytes SRAM
15 Programmable I/O Lines
Two 16-Bit Timer/Counters
Programmable serial USART
Five Interrupt Sources
Direct LED Drive Outputs
On-Chip Analog Comparator
Low Power Idle and Power Down Modes
TM
Description
The GMS97C2051/L2051 is a high-performance CMOS 8-bit microcontroller with 2Kbytes of programmable
EPROM. The device is compatible with the industry standard MCS-51
TM
instruction set and pinout. The HYUN-
DAI MicroElectronics GMS97C2051/L2051 is a powerful microcontroller which provides a highly flexible and
cost effective solution to many embedded control applications. The GMS97C2051/L2051 provides the following
standard features: 2Kbytes of EPROM, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector
two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and
clock circuitry. In addition, the GMS97C2051/L2051 supports two software selectable power saving modes. The
Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue
functioning. The Power Down Mode saves the RAM contents but freezes the oscillator disabling all other chip
functions until the next hardware reset.
Pin Configuration
PDIP/SOP
RST
(RXD) P3.0
(TXD) P3.1
XTAL2
XTAL1
(
INT0
)P3.2
(
INT1
) P3.3
(T0) P3.4
(T1) P3.5
GND
1
2
3
4
5
6
7
8
9
10
20
19
18
17
16
15
14
13
12
11
VCC
P1.7
P1.6
P1.5
P1.4
P1.3
P1.2
P1.1 (AIN1)
P1.0 (AIN0)
P3.7
1
HYUNDAI MicroElectonics
8-Bit CMOS Microcontorller
GMS97C2051/L2051
Input to the inverting oscillator amplifier and input to
the internal clock operating circuit.
Pin Description
Vcc
Supply voltage.
XTAL2
Output from the inverting oscillator amplifier.
GND
Ground.
Recommended Oscillator Circuit
XTAL1 and XTAL2 are the input and output, respec-
tively, of an inverting amplifier which can be config-
ured for use as an on-chip oscillator, as shown in
Fig-
ure 1.
To drive the device from an external clock
source, XTAL2 should be left unconnected while
XTAL1 is driven as shown in
Figure 2.
Oscillator Connections
C2
XTAL2
Port 1
Port 1 is an 8-bit bidirectional I/O port. Port pins P1.2
to P1.7 provide internal pullups. P1.0 and P1.1 re-
quire external pullups. P1.0 and P1.1 also serve as the
positive input (AIN0) and the negative input (AIN1),
respectively, of the on-chip precision analog compara-
tor. The Port 1 output buffers can sink 10mA and can
drive LED displays directly. When 1s are written to
Port1 pins, they can be used as inputs. When pins
Figure 1.
P1.2 to P1.7 are used as inputs and are externally pulled
low, they will source current (I
IL
) because of the inter-
nal pullups.
Port 1 also receives code data during EPROM pro-
gramming and program verification.
Port3
Port 3 pins P3.0 to P3.5, P3.7 are seven bidirectional
C1
I/O pins with internal pullups. P3.6 is hard-wired as
XTAL1
an input to the output of the on-chip comparator and is
not accessible as a general purpose I/O pin. The Port
3 output buffers can sink 10mA. When 1s are written
to Port 3 pins they are pulled high by the internal pul-
lups and can be used as inputs. As inputs, Port 3 pins
GND
that are externally being pulled low will source current
(I
IL
) because of the pullups.
Port 3 also serves the functions of various special fea- Notes: C1, C2 = 30pF 10pF for Crystals
ture of the GMS97C2051 as listed below:
( include stray capacitance )
Port Pin
P3.0
P3.1
P3.2
P3.3
P3.4
P3.5
Alternate Functions
RXD ( serial input port )
TXD ( serial output port )
INT0 ( external interrupt 0 )
INT1( external interrupt 1 )
T0 ( timer 0 external input )
T1 ( timer 0 external input )
Figure 2.
External Clock Drive Configuration
NC
XTAL2
Port 3 also receives some control signals for EPROM
programming and programming verification.
EXTERNAL
OSCILLATOR
SIGNAL
XTAL1
RST
Reset input. All I/O pins are reset to 1s as soon as
RST goes high. Holding the RST pin high for two
machine cycles while the oscillator is running resets the
device.
This pin is also receives the 12.75V programming
supply voltage ( Vpp ) during EPROM programming.
GND
XTAL1
3
HYUNDAI MicroElectonics
GMS97C2051/L2051
8-Bit CMOS Microcontroller
Special Function Registers
A map of the on-chip memory area called the Special
Function Register (SFR) space is shown in the
Table1,
Table 2
and
Table 3.
Note that not all of the addresses are occupied, and
unoccupied addresses may not be implemented on the
chip. Read accesses to these addresses will in general
return random data, and write accesses will have an
indeterminate effect.
User software should not write 1s to these unlisted
locations, since they may be used in future products to
invoke new features. In that case, the reset or inactive
values of the new bits will always be 0.
Table 1.
0F8H
0F0H
0E8H
0E0H
0D8H
0D0H
0C8H
0C0H
0B8H
0B0H
0A8H
0A0H
98H
90H
88H
80H
GMS97C2051/L2051 SFR Map and Reset Values
0FFH
B
00000000
0F7H
0EFH
ACC
00000000
0E7H
0DFH
PSW
00000000
0D7H
0CFH
0C7H
IP
XXX00000
P3
11111111
IE
0XX00000
0BFH
0B7H
0AFH
0A7H
SCON
00000000
P1
11111111
TCON
00000000
SBUF
XXXXXXXX
9FH
97H
TMOD
00000000
SP
00000111
TL0
TL1
TH0
TH1
00000000 00000000 00000000 00000000
DPL
DPH
00000000 00000000
8FH
PCON
0XXX0000
87H
HYUNDAI MicroElectronics
4