We hereby introduce the manual for CMOS 4-bit
microcomputer GMS340 Series.
This manual is prepared for the users who should
understand fully the functions and features of
GMS340 Series so that you can utilize this
product to its fullest capacity. A detailed explanations of the specifications and applications regarding the hardware is hereby provided.
INTRODUCTION
The contents of this user`s manual are subject to
change for the reasons of later improvement of
the features.
The information, diagrams, and other data in this
user`s manual are correct and reliable; however,
Hyundai Electronics Indus tries 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
The GMS340 series are remote contol transmitter which uses CMOS technology.
This enables transmission code outputs of different configurations, multiple custom
code output, and double push key output for easy fabrication.
The GMS340 sereis are suitable for remote control of TV, VCR, FANS, Airconditioners, Audio Equipments, Toys and Games etc.
Characteristics
¡ÜProgram memory : 512 bytes for GMS34004/012
1024 bytes for GMS34112/120/140
¡ÜData memory : 32
¡Ü43 types of instruction set
¡Ü3 levels of subroutine nesting
¡Ü1 bit output port for a large current (REMOUT signal)
¡ÜOperating frequency : 300~500KHz or 2.4~4MHz for 300~500KHz operation
(Masked option)
¡ÜInstruction cycle : f
¡ÜCMOS process (Single 3.0V power supply)
¡ÜStop mode (Through internal instruction)
¡ÜReleased stop mode by key input (Masked option)
¡ÜBuilt in capacitor for ceramic oscillation circuit (Masked option)
¡ÜBuilt in a watch dog timer (WDT)
¡ÜLow operating voltage : 2.0~4.0V (at 300~500KHz)
Connected to 2.0~4.0V power supply.
Connected to 0V power supply.
Used to input a manual reset. When the pin goes ¡ÈL¡È, the
D-output ports and REMOUT-output port are initialized to
¡ÈL¡È
, and ROM address is set to address 0 on page 0.
4-bit input port.
Released STOP mode built in pull-up resistor by each pin as
masked option.
(It is released by ¡ÈL¡È input at STOP)
Each can be set and reset independently. The output is in
the form of N-channel-open-drain.
4-bit I/O port. (Input mode is set only when each of them
output ¡ÈH¡È.)
In outputting, each can be set and reset independently(or at
once.)
The output is in the form of N-channel-open-drain.
Pull-up resistor and STOP release mode can be respectively
selected as masked option for each bit. (It is released by
¡ÈL¡È
input at STOP.)
High current output port.
The output is in the form of C-MOS.
The state of large current on is ¡ÈH¡È.
Oscillator input. Input to the oscillator circuit and connection
point for ceramic resonator.
Internal capacitors available as masked option.
A feedback resistor is connected between this pin and OSC2
Connect a ceramic resonator between this pin and OSC1.
1 - 7
I/O circuit types and options
Chapter 1. Introduction
PinI/ONote
ResetI
R0~R3I/O
K0~K3I
¡æ
I/O circuit
¡æ
¡ç
¡æ
¡æ
¡æ
¡ç
¡æ
¡ç
¡æ
¡ç
Hysteresis Input Type
Built in pull-upresistor Typical 400
(option)
Built in pull-up
resistor
Typical 800
Open drain output
¡ÈH¡È
(Option)
Built in MOS Tr for
pull-up About 120
Built in MOS Tr for
pull-up About 120
§Ú
§Ú
output at reset
§Ú
§Ú
D0~D9
REMOUTO
O
¡ç
¡æ
¡ç
1 - 8
Open drain output
¡ÈL¡È
output at reset
CMOS output
¡ÈL¡È
output at reset
High current source
output
Chapter 1. Introduction
PinI/ONote
OSC2O
OSC1I
: Masked option
*. Recommendable circuit
OSC1
OSC2
OSCSTB
OSC1
C1
C2
C1
I/O circuit
¡æ
¡è
¡è
Rf
¡ç
¡æ
¡ç
Rd
C2
OSC2
Built in feedbackResister About 1
Built in dumping-Resister
[No resistor in MHz
operation]
(Option)
Built in resonance
Capacitor
C1/C2 = 100pF
N%
[C1/C2 are not
available for MHz
operation]
§Û
¡¾
FrequencyResonator MakerPart NameLoad Capacitor Operating Voltage
Supply Voltage
Power dissipation
Storage temperature range
Input voltage
Output voltage
* Thermal derating above 25¡É : 6mW per degree ¡É rise in temperature.
Recommended operation condition
Parameter
Supply Voltage
Operating temperature
Symbol
V
DD
Topr
Symbol
V
DD
P
D
Tstg
V
IN
V
OUT
Condition
300 ~ 500KHz
2.4 ~ 4MHz
Max. rating
-0.3 ~ 5.0
¡É
700
-55 ~ 125
-0.3 ~ VDD+0.3
-0.3 ~ VDD+0.3
Rating
2.0 ~ 4.0
2.2 ~ 4.0
-
-20 ~ +70
Unit
V
mW
¡É
V
V
Unit
V
¡É
1 - 10
Electrical characteristics (Ta=25¡É, VDD=3V)
Chapter 1. Introduction
Parameter
Input H current
RESET input L current
K, R input L current
K, R input H voltage
K, R input L voltage
RESET input H voltage
RESET input L voltage
D. R output L voltage
REMOUT output L
voltage
REMOUT output H
voltage
OSC2 output L voltage
OSC2 output H voltage
D, R output leakage
current
Current on STOP mode
Operating supply current
1
Operating supply current
2
System
clock
frequency
f
/6
OSC
f
/48f
OSC
Symbol
I
IH
I
IL2
I
IL1
V
IH1
V
IL1
V
IH2
V
IL2
V
OL2
V
OL1
V
OH1
V
OL3
V
OH3
I
OL
I
STOP
I
DD1
I
DD2
f
OSC
OSC
Limits
Min.Typ.Max.
1
-
-16
-50
-
-
0.9
-
-
-
0.7
5
0.4
5
0.4
5
-
0.9
-
1
1
-
1.0
1.5
500
4
-
-2
-9
2.1
2.2
5
2.1
2.1
300
2.4
-
-7.5
-25
-
-
-
0.1
-
0.1
2.5
-
0.4
2.5
-
-
-
0.3
-
0.5
Unit Condition
uA
VI=V
DD
uA
VI=GND
VI=GND, Output
uA
off, Pull-Up resistor
provided.
V
-
V
-
V
-
V
V
V
IOL=1mA
V
IOL=100uA
V
IOH=8mA
V
IOL=70uA
V
IOH=70uA
uA
V0=VDD, Output
off
uA
At STOP mode
mA
f
=455KHz
OSC
mA
f
=4MHz
OSC
KHz
MHz
1 - 11
INTRODUCTION1
ARCHITECTURE2
INSTRUCTION3
EVALUATION BOARD4
SOFTWARE5
APPENDIX6
CHAPTER 2. Architecture
BLOCK DESCRIPTION
Characteristics
The GMS340 series can incorporate maximum 1024 words (64 words ¡¿ 16
pages ¡¿ 8bits) for program memory. Program counter PC (A0~A5) and page
address register (A6~A9) are used to address the whole area of program
memory having an instruction (8bits) to be next executed.
The program memory consists of 64 words on each page, and thus each page
can hold up to 64 steps of instructions.
The program memory is composed as shown below.
0
1
2
3
4
8
5
6
7
Chapter 2. Architecture
Program capacity (pages)
Page 0Page 1Page 2Page 15
63
A0~A5
Program counter (PC)Page address register (PA)Page buffer (PB)
01215
64
Stack register
(Level ¡È1¡È)
(Level ¡È2¡È)
(Level ¡È3¡È)(PRS)(SR)
A6~A9
Fig 2-1 Configuration of Program Memory
2 - 1
Chapter 2. Architecture
ROM Address Register
The following registers are used to address the ROM.
• Page address register (PA) :
Holds ROM`s page number (0~Fh) to be addressed.
• Page buffer register (PB) :
Value of PB is loaded by an LPBI command when newly addressing a page.
Then it is shifted into the PA when rightly executing a branch instruction (BR)
and a subroutine call (CAL).
• Program counter (PC) :
Available for addressing word on each page.
• Stack register (SR) :
Stores returned-word address in the subroutine call mode.
(1) Page address register and page buffer register :
Address one of pages #0 to #15 in the ROM by the 4-bit binary counter.
Unlike the program counter, the page address register is usually unchanged
so that the program will repeat on the same page unless a page changing
command is issued. To change the page address, take two steps such as
(1) writing in the page buffer what page to jump to (execution of LPBI) and
(2) execution of BR or CAL, because and instruction code is of eight bits so
that page and word cannot be specified at the same time.
In case a return instruction (RTN) is executed within the subroutine that has
been called in the other page, the page address will be changed at the
same time.
(2) Program counter :
This 6-bit binary counter increments for each fetch to address a word in the
currently addressed page having an instruction to be next executed.
For easier programming, at turning on the power, the program counter is
reset to the zero location. The PA is also set to ¡È0¡È. Then the program
counter specifies the next ROM address in random sequence.
When BR, CAL or RTN instructions are decoded, the switches on each step
are turned off not to update the address. Then, for BR or CAL, address
data are taken in from the instruction operands (a0 to a5), or for RTN, and
address is fetched from stack register No. 1.
(3) Stack register :
This stack register provides two stages each for the program counter (6
bits) and the page address register (4bits) so that subroutine nesting can be
mode on two levels.
2 - 2
Chapter 2. Architecture
Data memory (RAM)
Up to 32 nibbles (16 words ¡¿ 2pages ¡¿ 4bits) is incorporated for storing data.
The whole data memory area is indirectly specified by a data pointer (X,Y). Page
number is specified by zero bit of X register, and words in the page by 4 bits in
Y-register. Data memory is composed in 16 nibbles/page. Figure 2.2 shows the
configuration.
X-register (X)
D0D9 R0 R3 REMOUT
Output port
Y-register (Y)X-register (X)
42
Fig 2-2 Composition of Data Memory
Data memory page (0~1)
0
1
2
3
Page 0Page 1
15
0 14 A0~A3
X-register is consist of 2bit, X0 is a data pointer of page in the RAM, X1 is only
used for selecting of D8~D9 with value of Y-register
X1=1X1=0
Y=0
Y=1D1
D0
Table 2-1 Mapping table between X and Y register
2 - 3
D8
D9
Chapter 2. Architecture
Y-register (Y)
Y-register has 4 bits. It operates as a data pointer or a general-purpose register.
Y-register specifies and address (a0~a3) in a page of data memory, as well as it
is used to specify an output port. Further it is used to specify a mode of carrier
signal outputted from the REMOUT port. It can also be treated as a generalpurpose register on a program.
Accumulator (ACC)
The 4-bit register for holding data and calculation results.
Arithmetic and Logic Unit (ALU)
In this unit, 4bits of adder/comparator are connected in parallel as it`s main
components and they are combined with status latch and status logic (flag.)
(1) Operation circuit (ALU) :
The adder/comparator serves fundamentally for full addition and data
comparison. It executes subtraction by making a complement by processing
an inversed output of ACC (ACC+1)
(2) Status logic :
This is to bring an ST, or flag to control the flow of a program. It occurs when
a specified instruction is executed in two cases such as overflow in operation
and two inputs unequal.
2 - 4
Chapter 2. Architecture
State Counter (SC)
A fundamental machine cycle timing chart is shown below. Every instruction is
one byte length. Its execution time is the same. Execution of one instruction
takes 6 clocks for fetch cycle and 6 clocks for execute cycle (12 clocks in total).
Virtually these two cycles proceed simultaneously, and thus it is apparently
completed in 6 clocks (one machine cycle). Exceptionally BR, CAL and RTN
instructions is normal execution time since they change an addressing
sequencially. Therefore, the next instruction is prefetched so that its execution
is completed within the fetch cycle.
T1 T2 T3 T4 T5 T6 T1 T2 T3 T4 T5 T6
Phase
Phase
Phase
Fetch cycle N
Execute cycle N-1
¥°
¥±
¥²
Machine
Cycle
Fig. 2-3 Fundamental timing chart
Execute cycle N
Fetch cycle N-1
Machine
Cycle
2 - 5
Chapter 2. Architecture
Clock Generator
The GMS340 series has an internal clock oscillator. The oscillator circuit is
designed to operate with an external ceramic resonator. Internal capacitors are
available as a masked option. Oscillator circuit is able to organize by connecting
ceramic resonator to outside. (In order to built in capacitor for oscillation as
masked option.)
* It is necessary to connect capacitor to outside in order to change ceramic
resonator, You must examine refer to a manufacturer`s
OSC1OSC2
2322
C1C2
<Circuit 1>
Operating Frequency
f
= 2.4 ~ 4MHz
OSC
f
= 300 ~ 500KHz
OSC
Internal capacitor option
No Internal capacitor optionCircuit 1
OSC1OSC2
2322
<Circuit 2>
Oscillation Circuit
Circuit 1
Circuit 2
2 - 6
Chapter 2. Architecture
Pulse generator
The following frequency and duty ratio are selected for carrier signal outputted
from the REMOUT port depending on a PMR (Pulse Mode Register) value set in
a program.
T
T1
PMR
1
2
3
4
5
6T=1/f
* Default value is ¡È0
T=1/f
= 12/f
PUL
T=1/f
= 12/f
PUL
T=1/f
= 8/f
PUL
OSC
T=1/f
= 8/f
PUL
OSC
T=1/f
= 11/f
PUL
No Pulse (same to D0~D9)
= 12/f
PUL
¡È
REMOUT signal
[96/f
OSC
OSC
[96/f
OSC
OSC
[64/f
], T1/T = 1/2
OSC
[64/f
], T1/T = 1/4
OSC
[88/f
OSC
OSC
[96/f
OSC
OSC
], T1/T = 1/20
], T1/T = 1/3
],T1/T = 4/11
], T1/T = 1/4
* [ ] means the value of ¡ÈT¡È, when Instruction cycle is f
Table 2-2 PMR selection table
OSC
/48
2 - 7
Chapter 2. Architecture
Initial Reset Circuit
RESET pin must be down to ¡ÈL¡È more than 4 machine cycle by outside
capacitor or other for power on reset.
The mean of 1 machine cycle is below. 1 machine cycle is 6/f
operating voltage must be in recommended operating conditions, and clock
oscillating stability.
* It is required to adjust C value depending on rising time of power supply.
(Example shows the case of rising time shorter than 10ms.)
1
RESET
0.1uF
Watch Dog Timer (WDT)
Watch dog timer is organized binary of 14 steps. By the selected oscillation
option, the signal of f
/6 cycle comes in the first step of WDT. If this counter
OSC
was overflowed, come out reset signal automatically, internal circuit is initialized.
The overflow time is 6¡¿2 13/f
8¡¿6¡¿213/f
(108.026ms at f
OSC
(108.026ms at f
OSC
=455KHz.)
OSC
OSC
= 3.64MHz)
Normally, the binary counter must be reset before the overflow by using reset
instruction (WDTR) or / and REMOUT port (Y-reg=8, So instruction execution) at
masked option.
, however,
OSC
* It is constantly reset in STOP mode. When STOP is released, counting is
restarted. (Refer to 2-10 STOP function>)
Binary counter
(14 steps)
Reset
by instruction
REMOUT
output
f
OSC
/6 or f
OSC
/48
RESET (edge-trigger)
Mask Option
2 - 8
CPU reset
Chapter 2. Architecture
STOP Function
Stop mode can be achieved by STOP instructions.
In stop mode :
1. Oscillator is stopped, the operating current is low.
2. Watch dog timer is reset, D8~D9 output and REMOUT output are ¡ÈL¡È.
3. Part other than WDT, D8~D9 output and REMOUT output have a value before
come into stop mode.
¡ÈBut, the state of D0~D7 output in stop mode is able to choose as masked
option. ¡ÈL¡È output or same level before come into stop mode.
The function to release stop mode is able to choose each bit of K or R input.
Stop mode is released when one of K or R input is going to ¡ÈL¡È.
1. State of D0~D7 output and REMOUT output is return to state of before stop mode
is achieved.
2. After 1024¡¿8 enable clocks for stable oscillating. First instruction start to operate.
3. In return to normal operation, WDT is counted from zero again.
But, at executing stop instruction, if one of K or R input is chosen to ¡ÈL¡È, stop
instruction is same to NOP instruction.
Masked options
The GMS340 series offer the following optional features.
These options are masked.
1. Watch dog timer reset by REMOUT output signal.
2. Input terminals having STOP release mode : K0~K3, R0~R3.
3. I/O terminals having pull-up resistor : R0~R3
4. Ceramic oscillation circuit contained (or not contained).
[This option is not available for MHz Ceramic oscillator]
5. Output form at stop mode
D0~D7 : ¡ÈL¡È or keep before stop mode
6. Instruction cycle selection:
T=48/f
OSC
or T=6/f
OSC
2 - 9
INTRODUCTION1
ARCHITECTURE2
INSTRUCTION3
EVALUATION BOARD4
SOFTWARE5
APPENDIX6
CHAPTER 3. Instruction
INSTRUCTION FORMAT
All of the 43 instruction in GMS340 series is format in two fields of OP code and
operand which consist of eight bits. The following formats are available with
different types of operands.
Chapter 3. Instruction
Format
Format
Format
Format
¥°
All eight bits are for OP code without operand.
¥±
Two bits are for operand and six bits for OP code.
Two bits of operand are used for specifying bits of RAM and X-register (bit 1 and
bit 7 are fixed at ¡È0¡È)
¥²
Four bits are for operand and the others are OP code.
Four bits of operand are used for specifying a constant loaded in RAM or Yregister, a comparison value of compare command, or page addressing in ROM.
¥³
Six bits are for operand and the others are OP code.
Six bits of operand are used for word addressing in the ROM.
3 - 1
Chapter 3. Instruction
INSTRUCTION TABLE
The GMS340 series provides the following 43 basic instructions.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Category
Register to
Register
RAM to
Register
Immediate
RAM Bit
Manipulation
ROM
Address
Mnemonic
LAY
LYA
LAZ
LMA
LMAIY
LYM
LAM
XMA
LYI i
LMIIY i
LXI n
SEM n
REM n
TM n
BR a
CAL a
RTN
Function
A ¡ç Y
Y ¡ç A
A ¡ç 0
M(X,Y) ¡ç A
M(X,Y) ¡ç A, Y ¡ç Y+1
Y ¡ç M(X,Y)
A ¡ç M(X,Y)
A ¡ê M(X,Y)
Y ¡ç i
M(X,Y) ¡ç i, Y ¡ç Y+1
X ¡ç n
M(n) ¡ç 1
M(n) ¡ç 0
TEST M(n) = 1
if ST = 1 then Branch
if ST = 1 then Subroutine call
Return from Subroutine
ST
*1
S
S
S
S
S
S
S
S
S
S
S
S
S
E
S
S
S
18LPBI iPB ¡ç iS
19
20
21
22
23
24
25
Arithmetic
AM
SM
IM
DM
IA
IY
DA
A ¡ç A + M(X,Y)
A ¡ç M(X,Y) - A
A ¡ç M(X,Y) + 1
A ¡ç M(X,Y) - 1
A ¡ç A + 1
Y ¡ç Y + 1
A ¡ç A - 1
3 - 2
C
B
C
B
S
C
B
Chapter 3. Instruction
Category
26
Arithmetic
27
28
29
30
31
Comparison
32
33
34
35RNEZTEST R ¡Á 0N
36
37
38
39
40
41
42
Input /
Output
Control
Mnemonic
DY
EORM
NEGA
ALEM
ALEI i
MNEZ
YNEA
YNEI i
KNEZ
LAK
LAR
SO
RO
WDTR
STOP
LPY
Function
Y ¡ç Y - 1
A ¡ç A + M (X,Y)
A ¡ç A + 1
TEST A ¡Â M(X,Y)
TEST A ¡Â i
TEST M(X,Y) ¡Á 0
TEST Y ¡Á A
TEST Y ¡Á i
TEST K ¡Á 0
A ¡ç K
A ¡ç R
Output(Y) ¡ç 1
Output(Y) ¡ç 0
Watch Dog Timer Reset
Stop operation
PMR ¡ç Y
*2
*2
ST
*1
B
S
Z
E
E
N
N
N
N
S
S
S
S
S
S
S
43
NOP
No operation
S
Note) i = 0~f, n = 0~3, a = 6bit PC Address
*1 Column ST indicates conditions for changing status. Symbols have the following
meanings
S : On executing an instruction, status is unconditionally set.
C : Status is only set when carry or borrow has occurred in operation.
B : Status is only set when borrow has not occurred in operation.
E : Status is only set when equality is found in comparison.
N : Status is only set when equality is not found in comparison.
Z : Status is only set when the result is zero.
3 - 3
Loading...
+ 75 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.