HYNIX GMS34140, GMS34120, GMS34004, GMS34112, GMS34012 Datasheet

...
4-BIT SINGLE CHIP MICROCOMPUTERS
GMS340 SERIES
USER`S MANUAL
• GMS34004
• GMS34012
• GMS34112
• GMS34120
• GMS34140
• GMS30000 EVA
JUNE. 2001 Rev. 3.0
INTRODUCTION
The contents of this user`s manual are subject to change for the reasons of later improvement of the features. The information, diag ram s, a nd other data in this user`s manual are correct and reliable; however, HYNIX Semicond uctor Inc. is in no way res ponsible for any violations of patents or other rights of the third party generated by the use of this manual
Table of Contents
Table of Conten ts
Chapter 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Outline of Characteristics . . . . . . . . . . . . . . . . . . . . . 1-1
Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Pin Assignment and Dimension . . . . . . . . . . . . . . . . . . . . 1-3
I/O circuit types and options . . . . . . . . . . . . . . . . . . . . . . . 1-7
Electrical Characteristics of GMS300 Series . . . . . . . . . . 1-10
Chapter 2
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Block Description . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . . 2-1
Program Memory (ROM). . . . . . . . . . . . . . . . . . . . . . . . . 2-1
ROM Address Register . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Data Me m o ry (RAM) . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
X-Register (X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Y-Register (Y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Accumulator (Acc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
State Counter (SC) . . . . . . . . . . . .. . . . . . . . . . . . . . . . . 2-5
Clock Ge nerato r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Pulse Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Initial Reset Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Internal Power On Reset . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Watch Dog Timer (WDT) . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Stop Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Maske d Op tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Chapter 3
Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Instruction format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Instruction Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Details of Instruction System . . . . . . . . . . . . . . . . . . . . 3-5
Detailed Description . . . . . . . . . . . . . . . . . . . . . . . 3-6
Table of Contents
Chapter 4
Evaluation Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
Product Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Optional Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Caution of Operation . . . . . . . . . . . . . . . . . . . . . .. . . . . 4-6
Chapter 5
Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Configuration of Assembler . . . . . . . . . . . . . . . . . . . . . . 5-1
Booting up Assembler . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Configuration of Simulator . . . . . . . . . . . . . . . . . . . . . . . 5-2
Booting up Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Simulator commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
Description of commands . . . . . . . . . . . . . . . . . . . . . . . . 5-18
File typ es used in th e simulato r . . . . . . . . . . . . . . . . . . . 5-48
Error message and troubleshooting . . . . . . . . . . . . . . . . 5-49
Appendix
Mask option list
INTRODUCTION 1
ARCHITECTURE 2
INSTRUCTION 3
EVALUATION BOARD 4
SOFTWARE 5
APPENDIX 6
1 - 1
CHAPTER 1. Introduction
OUTLINE OF CHARACTERISTICS
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, Air­conditioners, Audio Equipments, Toys and Games etc.
Characteristics
¡Ü Program memory : 512 bytes for GMS34004/012
1024 bytes for GMS34112/120/140
¡Ü Data memory : 32
¡¿
4 bits
¡Ü 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
OSC
/6 (at 300~500KHz)
f
OSC
/48 (at 2.4~4MHz)
¡Ü 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)
2.2~4.0V (at 2.4~4MHz)
Series
Program memory Data memory I/O ports
Input ports
Output ports
Package
GMS34004
512
32 ¡¿ 4
-
4 6
D0 ~ D5
16DIP/SOP
GMS34012
¡ç ¡ç
4
¡ç
6
D0 ~ D5
20DIP/SOP
GMS34112
1024
¡ç ¡ç
¡ç
6
D0 ~ D5
¡ç
GMS34120
¡ç ¡ç ¡ç
¡ç
8
D0 ~ D7
24DIP/SOP
GMS34140
¡ç ¡ç ¡ç
¡ç
10
D0 ~ D9
¡ç
Table 1-1 GMS340 series members
Chapter 1. Introduction
1 - 2
Block Diagram
RAM
16word x
2page x 4bit
RAM Word
Selector
Y-Reg
ACC
ST
R-Latch D-Latch
Pluse
Generator
X-Reg
MUX
MUX
ALU
23 22 7 8 9 4 2110 3 5 6 11 12 13 14 15 16 17 18 19 20
Instruction
Decoder
Program counter
Stack
Reset
Watchdog
timer
1 24
2
10
10
8
ROM
64word ¡¿
16page
¡¿
8bit
8
4
4
2
4 10
4
10
4
4
4
16
4
4
4
4
4
OSC1 OSC2 K0 ~ K3 R0 ~ R3 D0 ~ D9 REMOUT
RESET VDD GND
OSC
Fig 1-1 Block Diagram (In case of GMS34140)
Chapter 1. Introduction
Control Signal
1 - 3
Pin Assignment and terminals
Pin Assignment
2 23 3 22 4 21 5 20 6 19 7 18 8 17 9 16 10 15 11 14 12 13
1 24
VDD OSC1
OSC2 REMOUT
D7 D6 D5 D4 D3 D2 D1 NC
RESET
GND
R0 R1 R2 R3 K0 K1 K2 K3 D0
NC
Fig 1-2 GMS34004 Pin Assignment Fig 1-3 GMS34012/112 Pin Assignment
Fig 1-5 GMS34120 Pin Assignment
Chapter 1. Introduction
2 15 3 14 4 13 5 12 6 11 7 10 8 9
1 16
VDD OSC1
OSC2 REMOUT
D5 D4 D3 D2
RESET
GND
K0 K1 K2 K3 D0 D1
2 19 3 18 4 17 5 16 6 15 7 14 8 13 9 12 10 11
1 20
R3 R2
R1 R0
GND RESET VDD OSC1 OSC2 REMOUT
K0 K1
K2 K3 D0 D1 D2 D3 D4 D5
2 23 3 22 4 21 5 20 6 19 7 18 8 17 9 16 10 15 11 14 12 13
1 24
VDD OSC1
OSC2 REMOUT
D7 D6 D5 D4 D3 D2 D1 D9
RESET
GND
R0 R1 R2 R3 K0 K1 K2 K3 D0 D8
Fig 1-6 GMS34140 Pin Assignment
1 - 4
Chapter 1. Introduction
Pin Dimension
1 2 3 4 5 6 7 8
16 15 14 13 12 11 10 9
0.785MAX
0.745MIN
0.040MAX
0.020MIN
0.065MAX
0.015MIN
0.140MAX
0.120MIN
¡æ ¡ç
¡æ ¡ç
0~15¡Ç
0.280MAX
0.240MIN
0.300BSC
0.014MAX
0.008MIN
Outline (Unit:Inch)
0.050MIN
0.022MAX
0.015MIN
0.100BSC
Fig 1-7 16PDIP Pin Dimension
0.125MIN
0.135MAX
0.170MAX
Outline (Unit : Inch)
0.392MAX
0.386MIN
0.050BSC
0.0200MAX
0.0098MAX
0.0040MIN
1 2 3 4 5 6 7 8
16 15 14 13 12 11 10 9
0.0688MAX
0.0600MIN
¡æ ¡ç
¡æ
¡ç
0.157MAX
0.150MIN
0.244MAX
0.035MAX
0.016MIN
0.230MIN
0 ~ 8
¡Ç
¡æ ¡ç
0.0098MAX
0.0075MIN
Fig 1-8 16SOP Pin Dimension (150Mil)
Base Plane
Seating Plane
1 - 5
1 2 3 4 5 6 7 8 9 10
20 19 18 17 16 15 14 13 12 11
0.984MAX
0.968MIN
0.065MAX
0.055MIN
0.022MAX
0.015MIN
0.1TYP
0.170MAX
0.015MIN
0.135MAX
0.125MIN
¡æ ¡ç
¡æ ¡ç
0~15¡Ç
0.270MAX
0.250MIN
0.3TYP
0.012MAX
0.008MIN
Outline (Unit : Inch)
Fig 1-10 20PDIP Pin Dimension
0.5118MAX
0.4961MIN
0.020MAX
0.014MIN
0.05TYP
0.0118MAX
0.004MIN
1 2 3 4 5 6 7 8 9 10
20 19 1 8 17 16 15 14 13 12 11
¡æ ¡ç
¡æ
¡ç
0.299MAX
0.292MIN
0.419MAX
0.125MAX
0.0091MIN
0.104MAX
0.093MIN
0.042MAX
0.016MIN
Outline (Unit : Inch)
0.398MIN
Fig 1-11 20SOP Pin Dimension
Chapter 1. Introduction
1 - 6
1 2 3 4 5 6 7 8 9 10 11
12
24 23 22 21 20 19 18 17 16 15 14
13
1.255MAX
1.245MIN
0.065MAX
0.055MIN
0.022MAX
0.015MIN
0.1TYP
0.170MAX
0.015MIN
0.135MAX
0.125MIN
¡æ ¡ç
¡æ ¡ç
0~15¡Ç
0.270MAX
0.250MIN
0.3TYP
0.012MAX
0.008MIN
Outline (Unit : Inch)
Fig 1-12 24PDIP Pin Dimension
0.618MAX
0.595MIN
0.020MAX
0.014MIN
0.05TYP
0.018MAX
0.004MIN
1 2 3 4 5 6 7 8 9 10 11 12
24 23 22 21 20 19 18 17 16 15 14
13
¡æ ¡ç
¡æ
¡ç
0.299MAX
0.292MIN
0.419MAX
0.125MAX
0.0091MIN
0.104MAX
0.093MIN
0.042MAX
0.016MIN
Outline (Unit : Inch)
0.396MIN
Fig 1-13 24SOP Pin Dimension
Chapter 1. Introduction
1 - 7
Pin Function
I/O circuit types and options
GMS340 series I/O port types
I/O
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.
V
DD
GND
RESET
K0~K3
D0~D9
R0~R3
REMOUT
OSC1
OSC2
Input
Input
Output
I/O
Output
Input
Output
-
-
Chapter 1. Introduction
1 - 8
I/O circuit types and options
Hysteresis Input Type Built in pull-up­resistor Typical 400
§Ú
(option) Built in pull-up resistor Typical 800
§Ú
Reset I
Pin I/O Note
¡æ ¡ç
¡æ ¡ç
Open drain output
¡ÈH¡È
output at reset
(Option) Built in MOS Tr for pull-up About 120
§Ú
R0~R3 I/O
Built in MOS Tr for pull-up About 120
§Ú
K0~K3 I
Open drain output
¡ÈL¡È
output at reset
D0~D9
O
¡æ ¡ç
CMOS output
¡ÈL¡È
output at reset High current source output
REMOUT O
I/O circuit
Chapter 1. Introduction
¡æ ¡ç
¡æ
¡æ
¡ç
¡æ ¡ç
¡æ
1 - 9
Built in feedback­Resister About 1
§Û
OSC2 O
Pin I/O Note
(Option) Built in resonance Capacitor C1/C2 = 100pF
¡¾
N% [C1/C2 are not available for MHz operation]
OSC1 I
I/O circuit
¡æ
¡ç
¡æ
¡ç
¡è ¡è
OSC2
Rd
C2
Rf
C1
OSC1
OSCSTB
Built in dumping-Resister [No resistor in MHz operation]
: Masked option
Chapter 1. Introduction
*. Recommendable circuit
Frequency Resonator Maker Part Name Load Capacitor Operating Voltage
455KHz
Murata CSB455E C1=C2=Open 2.0 ~ 4.0V
Kyocera KBR-455BKTL70 C1=C2=Open 2.0 ~ 4.0V
OSC1
C1
C2
OSC2
TDK FCR455K3 C1=C2=Open 2.0 ~ 4.0V
CSB480E C1=C2=Open 2.0 ~ 4.0V
TDK FCR480K3 C1=C2=Open 2.0 ~ 4.0V
480KHz
Murata
3.64MHz
Murata CSA3.64MG C1=C2=30pF 2.2 ~ 4.0V Murata CST3.64MGW C1=C2=Open 2.2 ~ 4.0V
TDK FCR3.64MC5 C1=C2=Open 2.2 ~ 4.0V
3.84MHz
Murata CSA3.84MG C1=C2=30pF 2.2 ~ 4.0V Murata CST3.84MGW C1=C2=Open 2.2 ~ 4.0V
TDK FCR3.84MC5 C1=C2=Open 2.2 ~ 4.0V
¡Ø
CST type is building in load capacitior
1 - 10
Parameter
Supply Voltage Power dissipation Storage temperature range
Input voltage Output voltage
Unit
V
mW
¡É
V V
Electrical Characteristics for GMS300 series
Absolute maximum ratings (Ta = 25¡É)
Symbol
V
DD
P
D
Tstg
V
IN
V
OUT
Max. rating
-0.3 ~ 5.0 700
¡É
-55 ~ 125
-0.3 ~ VDD+0.3
-0.3 ~ VDD+0.3
* Thermal derating above 25¡É : 6mW per degree ¡É rise in temperature.
Parameter
Supply Voltage
Operating temperature
Unit
V
¡É
Recommended operation condition
Rating
2.0 ~ 4.0
2.2 ~ 4.0
-20 ~ +70
Chapter 1. Introduction
Condition
300 ~ 500KHz
2.4 ~ 4MHz
-
Symbol
V
DD
Topr
1 - 11
Parameter
Electrical characteristics (Ta=25Î, VDD=3V)
Symbol
Limits
Unit Condition
Chapter 1. Introduction
f
OSC
/6
f
OSC
/48 f
OSC
Input H current
RESET input L current
K, R input L current
K, R input H voltage
RESET in p ut H voltage RESET input L voltage D. R output L voltage
REMOUT output L voltage
REMOUT output H current OSC2 output L voltage
OSC2 output H voltage D, R output leak age
current Current on STOP mode Operating supply current 1
Operating supply current 2 System
clock frequency
K, R input L voltag e
f
OSC
I
DD2
*2
I
DD1
*2
I
STOP
I
OL
V
OH3
V
OL3
I
OH1
*1
V
OL2
V
IL2
V
IH2
V
IL1
V
IH1
I
IL1
I
IL2
I
IH
V
OL1
2.4
300
-
-
-
-
2.1
-
-32
-
-
2.25
-
2.1
-9
-2
-
-
-
-
0.5
0.3
-
-
2.5
0.4
-23
0.15
-
-
-
-
-25
-7.5
-
0.15
Min. Typ. Max.
4
500
1.5
1.0
1
1
-
0.9
-17
0.4
0.75
-
0.9
-
-50
-16
1
0.4
MHz
KHz
mA
mA
uA
uA
V
V
mA
V
V
V
V
V
uA
uA
uA
V
f
OSC
=4MHz
f
OSC
=455KHz
At STOP mode
V
0=VDD
, Output off
I
OH
=70uA
I
OL
=70uA
V
OH1
=0V
I
OL
=1mA
V
-
-
-
VI=GND, Output off, Pull-Up resistor provided.
VI=GND
VI=V
DD
IOL=100uA
*1 Refer to
¹
Fig.1-14 I
OH1
vs. V
OH1
Graph
º
*2 I
DD1
, I
DD2
, is measured at RESET mode.
1 - 12
Chapter 1. Introduction
Fig 1-14. I
OH1
vs V
OH1
Graph (REMOUT Port)
OVW
OVR
OUW
OUR
OTW
OTR
OSW
OSR
OW
R
RPR RPW SPR SPW TPR TPW UPR UPW VPR
xqjS JxK
kq j S J
c
xee _ TPRx
xee _ UPRx
xee _ VPRx
v _ TW
Î
INTRODUCTION 1
ARCHITECTURE 2
INSTRUCTION 3
EVALUATION BOARD 4
SOFTWARE 5
APPENDIX 6
2 - 1
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
5
6
7
8
63
Program counter (PC) Page address register (PA) Page buffer (PB)
6 4
(Level ¡È1¡È)
(Level ¡È2¡È)
(Level ¡È3¡È)(PRS)(SR)
Stack register
Page 0 Page 1 Page 2 Page 15
A0~A5
0 1 2 15
A6~A9
Program capacity (pages)
Fig 2-1 Configuration of Program Memory
Chapter 2. Architecture
2 - 2
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.
Chapter 2. Architecture
2 - 3
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.
0
1
2
3
15
Output port
Y-register (Y) X-register (X)
D0 D9 R0 R3 REMOUT
Page 0 Page 1
0 14 A0~A3
Data memory page (0~1)
X-register (X)
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
Fig 2-2 Composition of Data Memory
X1=1X1=0
D8 D9
Y=0 Y=1 D1
D0
Table 2-1 Mapping table between X and Y register
Chapter 2. Architecture
4 2
2 - 4
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 general­purpose 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.
Chapter 2. Architecture
2 - 5
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
Fetch cycle N
Execute cycle N-1
Execute cycle N
Fetch cycle N-1
Machine
Cycle
Machine
Cycle
Phase
¥°
Phase
¥±
Phase
¥²
Fig. 2-3 Fundamental timing chart
Chapter 2. Architecture
2 - 6
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
OSC1 OSC2
C1 C2
<Circuit 1>
23 22
OSC1 OSC2
<Circuit 2>
23 22
Oscillation Circuit
Operating Frequency
Circuit 1 Circuit 2
f
OSC
= 2.4 ~ 4MHz
f
OSC
= 300 ~ 500KHz
Internal capacitor option
No Internal capacitor option Circuit 1
Chapter 2. Architecture
2 - 7
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
REMOUT signal
T=1/f
PUL
= 12/f
OSC
[96/f
OSC
], T1/T = 1/20
1
PMR
2 3 4 5
T=1/f
PUL
= 12/f
OSC
[96/f
OSC
], T1/T = 1/3
T=1/f
PUL
= 8/f
OSC
[64/f
OSC
], T1/T = 1/2
T=1/f
PUL
= 8/f
OSC
[64/f
OSC
], T1/T = 1/4
T=1/f
PUL
= 11/f
OSC
[88/f
OSC
], T1/T = 4/11
No Pulse (same to D0~D9)
* Default value is ¡È0
¡È
* [ ] means the value of ¡ÈT¡È, when Instruction cycle is f
OSC
/48
Table 2-2 PMR selection table
6 T=1/f
PUL
= 12/f
OSC
[96/f
OSC
], T1/T = 1/4
Chapter 2. Architecture
2 - 8
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
OSC
, however, 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
Chapter 2. Architecture
Watch Dog Timer (WDT)
Watch dog timer is organized binary of 14 steps. By the selected oscillation option, the signal of f
OSC
/6 cycle comes in the first step of WDT. If this counter was overflowed, come out reset signal automatically, internal circuit is initialized. The overflow time is 6¡¿2 13/f
OSC
(108.026ms at f
OSC
=455KHz.)
8¡¿6¡¿213/f
OSC
(108.026ms at f
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.
* 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 (edge-trigger)
f
OSC
/6 or f
OSC
/48
CPU reset
Reset by instruction
REMOUT output
Mask Option
2 - 9
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
Chapter 2. Architecture
INTRODUCTION 1
ARCHITECTURE 2
INSTRUCTION 3
EVALUATION BOARD 4
SOFTWARE 5
APPENDIX 6
3 - 1
Chapter 3. Instruction
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.
Format
¥°
All eight bits are for OP code without operand.
Format
¥±
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¡È)
Format
¥²
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 Y­register, a comparison value of compare command, or page addressing in ROM.
Format
¥³
Six bits are for operand and the others are OP code. Six bits of operand are used for word addressing in the ROM.
3 - 2
INSTRUCTION TABLE
The GMS340 series provides the following 43 basic instructions.
Category
1 2 3
Register to
Register
LAY LYA LAZ
Mnemonic
A ¡ç Y
Function
Y ¡ç A A ¡ç 0
S S S
ST
*1
4 5 6
RAM to
Register
LMA
LMAIY
LYM
M(X,Y) ¡ç A M(X,Y) ¡ç A, Y ¡ç Y+1 Y ¡ç M(X,Y)
S S
S 7 8
LAM
XMA
A ¡ç M(X,Y) A ¡ê M(X,Y)
S
S 9
10 11
Immediate
LYI i
LMIIY i
LXI n
Y ¡ç i M(X,Y) ¡ç i, Y ¡ç Y+1 X ¡ç n
S
S
S
12 13 14
RAM Bit
Manipulation
SEM n
REM n
TM n
M(n) ¡ç 1 M(n) ¡ç 0 TEST M(n) = 1
S
S
E
15 16 17
ROM
Address
BR a
CAL a
RTN
if ST = 1 then Branch if ST = 1 then Subroutine call Return from Subroutine
S
S
S
18 LPBI i PB ¡ç i S 19 20 21
Arithmetic
AM SM
IM
A ¡ç A + M(X,Y) A ¡ç M(X,Y) - A A ¡ç M(X,Y) + 1
C
B
C
22 23
DM
IA
A ¡ç M(X,Y) - 1 A ¡ç A + 1
B
S
24 25
IY
DA
Y ¡ç Y + 1 A ¡ç A - 1
C
B
Chapter 3. Instruction
Loading...
+ 76 hidden pages