![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
4-bit single chip microcomputers gms300 series user`s manual ? gms30004 ? gms30012 ? gms30112 ? gms30120 ? gms30140 ? gms30000 eva june. 2001 rev. 3.2
introduction we hereby introduce the manual for cmos 4-bit microcomputer gms300 series. this manual is prepared for the users who should understand fully the functions and features of gms300 series so that you can utilize this product to its fullest capacity. a detailed explana- tions of the specifications and applications regard- ing the hardware is hereby provided. 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, hynix semiconductor, inc. is in no way responsible for any violations of patents or other rights of the third party generated by the use of this manual gms300 series revision history: 1997. apr. previous release: 1994.nov., 1994.jun., 1994.jan., 1995.jan, 1995.aug., 1996.apr., 1996.jul. page subject(change since last revision) appendix modification(magic iia removal) table of contents table of contents chapter 1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 outline of characteristics . . . . . . . . . . . . . . . . . . . . . 1-1 characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 pin assignment and dimension . . . . . . . . . . . . . . . . . . . . 1-3 electrical characteristics of gms300 series . . . . . . . . . . 1-8 i/o circuit types and options . . . . . . . . . . . . . . . . . . . . . . . 1-10 masked options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13 stop function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13 chapter 2 architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 block description . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . . 2-1 program memory (rom). . . . . . . . . . . . . . . . . . . . . . . . . 2-1 rom address register . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 data memory (ram) . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 x-register (x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 y-register (y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 accumulator (acc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 arithmetic and logic unit (alu) . . . . . . . . . . . . . . . . . . . 2-4 i/o circuit . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 state counter (sc) . . . . . . . . . . . .. . . . . . . . . . . . . . . . . 2-5 clock generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 carrier generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 initial reset circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 watch dog timer (wdt) . . . . . . . . . . . . . . . . . . . . . . . . 2-7 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 types used in the simulator . . . . . . . . . . . . . . . . . . . 5-48 error message and troubleshooting . . . . . . . . . . . . . . . . 5-49 appendix magic- . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . a-1 magic- ia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b-1 magic- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . c-1 magic- b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . d-1 magic- ? a .. . . . . . . . . . . . . . . . . . .. . . . . . . . . . . e-1 magic- ? b . . . . . . . . . . . . . . .. . .. . . . . . . . . . . . .. f-1 magic- ? c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . g-1 introduction 1 architecture 2 instruction 3 evaluation board 4 software 5 appendix 6 1 - 1 chapter 1. introduction outline of characteristics the gms300 series is a family of 4-bit, single chip cmos microcomputer. since it can form a system by one chip, it contributes to cost reduction and higher efficiency in system. characteristics 6 program memory : 512 bytes for gms30004/012 1024 bytes for gms30112/120/140 6 data memory : 32 ? 4 bits 6 43 types of instruction set 6 3 levels of subroutine nesting 6 1 bit output port for a large current (remout signal) 6 operating frequency : 300khz to 1mhz 6 instruction cycle : 12.5usec @480khz 6 cmos process (single 3.0v power supply) 6 stop mode (through internal instruction) 6 released stop mode by key input (masked option) 6 built in capacitor for ceramic oscillation circuit (masked option) 6 built in a watch dog timer (wdt) 6 low operating voltage : (2.0~4.0v) table 1-1 gms300 series members chapter 1. introduction series program memory data memory i/o ports input ports output ports package gms30004 512 32 ? 4 - 4 6 d0 ~ d5 16dip/sop gms30012 4 6 d0 ~ d5 20dip/sop gms30112 1024 6 d0 ~ d5 gms30120 8 d0 ~ d7 24dip/sop gms30140 10 d0 ~ d9 1 - 2 block diagram the gms300 series is composed as shown below. these blocks are detailed in chapter2. ram 16word x 2page x 4bit ram word selector y-reg acc st r-latch d-latch pluse generator x-reg mux 08; alu 23 22 7 8 9 4 21 10 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 410 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 (for gms30140) chapter 1. introduction control signal 1 - 3 pin assignment and terminals pin assignment 223 322 421 520 619 718 817 916 10 15 11 14 12 13 124 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 gms30004 pin assignment fig 1-3 gms30012/112 pin assignment fig 1-4 gms30120 pin assignment chapter 1. introduction 215 314 413 512 611 710 89 116 vdd osc1 osc2 remout d5 d4 d3 d2 reset gnd k0 k1 k2 k3 d0 d1 219 318 417 516 615 714 813 912 10 11 120 r3 r2 r1 r0 gnd reset vdd osc1 osc2 remout k0 k1 k2 k3 d0 d1 d2 d3 d4 d5 223 322 421 520 619 718 817 916 10 15 11 14 12 13 124 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-5 gms30140 pin assignment 1 - 4 pin dimension chapter 1. introduction 12345678 16 15 14 13 12 11 10 9 0.785max 0.745min 0.040max 0.020min 0.065max 0,1 0$; 0,1 a a 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-6 16pdip pin dimension 0,1 0$; 0$; outline (unit : inch) 0.392max 0.386min 0.050bsc 0.0200max 0.0138min 0$; 0,1 12345678 16 15 14 13 12 11 10 9 0$; 0,1 a a 0.157max 0.150min 0.244max 0.035max 0.016min 0.230min a ? a 0$; 0,1 fig 1-7 16sop pin dimension (150mil) base plane seating plane 1 - 5 12345678910 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$; 0,1 0$; 0,1 a a 0~15 ? 0.270max 0.250min 0.3typ 0.012max 0.008min outline (unit : inch) fig 1-8 20pdip pin dimension 0.5118max 0.4961min 0.020max 0.014min 0.05typ 0$; 0,1 12345678910 20 19 1 8 17 16 15 14 13 12 11 a a 0.299max 0.292min 0.419max 0.125max 0.0091min 0$; 0,1 0.042max 0.016min outline (unit : inch) 0.398min fig 1-9 20sop pin dimension chapter 1. introduction 1 - 6 1234567891011 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$; 0,1 0$; 0,1 a a 0~15 ? 0.270max 0.250min 0.3typ 0.012max 0.008min outline (unit : inch) fig 1-10 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 a a 0.299max 0.292min 0.419max 0.125max 0.0091min 0$; 0,1 0.042max 0.016min outline (unit : inch) 0.396min fig 1-11 24sop pin dimension chapter 1. introduction 1 - 7 pin description chapter 1. introduction pin vdd gnd reset osc1 osc2 remout r0 ~ r3 k0 ~ k3 d0 ~ d9 name ground reset input oscillator input oscillator output r-port k-port d-port input/output i i o o i/o i o function connected to 2.0~4.0v power supply connected to 0v power supply. reset signal input which is a low active. i/o pins of internal clock oscillating circuit. built in feedback resistor. connect a ceramic resonator to these pins. remocon signal output port which has high current driving capability. 4bit programmable i/o port. 4bit input port with built in pull-up resistor. 10bit output port which can be set or reset pin by pin independently. the output structure is n-channel open drain. 1 - 8 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 ~ v dd +0.3 -0.3 ~ v dd +0.3 * thermal derating above 25 ? : 6mw per degree ? rise in temperature. parameter supply voltage operating temperature unit v ? recommended operation condition rating 2.2 ~ 4.0 -20 ~ +70 chapter 1. introduction symbol v dd topr * in case of using 455khz resonator. 1 - 9 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 operating frequency electrical characteristics (ta=25 ? , v dd =3v) 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 limits unit ua ua ua v v v v v v v v v ua ua ma ma mhz min. - -3 -9 2.1 - 2.25 - - - 2.1 - 2.1 - - - - 0.3 typ. - -7.5 -25 - - - - 0.15 0.15 2.5 0.4 2.5 - - 0.3 0.2 5 - max. 1 -16 -50 - 0.9 - 0.75 0.4 0.4 - 0.9 - 1 1 1.0 - 1 condition v i =v dd v i =gnd v i =gnd, output off, pull-up resistor provided. - - - - i ol =1ma i ol =100ua i oh =-8ma i ol =70ua i oh =70ua v 0 =v dd , output off at stop mode f osc = 455khz f osc = 1mhz - chapter 1. introduction 1 - 10 i/o circuit types and options gms300 series i/o port types chapter 1. introduction pin function 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 - - 1 - 11 i/o circuit types and options hysteresis input type built in pull-up- resistor about 400 ? reset i pin i/o note a a a a open drain output h output at reset (option) built in mos tr for pull-up about 120 ? r0~r3 i/o a a a a built in mos tr for pull-up about 120 ? k0~k3 i open drain output l output at reset d0~d9 o a a cmos output l output at reset high current source output remout o i/o circuit chapter 1. introduction a a a a 1 - 12 built in feedback-resister about 1 e osc2 o pin i/o note (option) built in resonance capacitor c1/c2 = 100pf 2 n% or c1/c2 = 10 ~ 100pf osc1 i i/o circuit a a a a osc2 rd c2 rf c1 osc1 oscstb built in dumping-resister rd : about 6 ? : masked option *. recommendable circuit osc1 osc2 c1 c2 frequency (khz) resonator maker part name load capacitor operating voltage 320 murata csb320d c1=c2=220pf 2.0 ~ 4.0v 455 murata CSB455E35 c1=c2=open 2.0 ~ 4.0v kyocera kbr-455bktl70 c1=c2=open 2.0 ~ 4.0v chapter 1. introduction chequers ztb-455et4c c1=c2=open 2.0 ~ 4.0v tdk fcr455k3 c1=c2=open 2.0 ~ 4.0v murata csb480e35 c1=c2=open 2.0 ~ 4.0v 480 1 - 13 masked options the gms300 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). 5. output form at stop mode d0~d7 : l or keep before stop mode 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. chapter 1. introduction introduction 1 architecture 2 instruction 3 evaluation board 4 software 5 appendix 6 2 - 1 chapter 2. architecture block description characteristics the gms300 series can incorporate maximum 1024 words (64 words ? 16 pages ? 8bits) for program memory. program counter pc (a 0 ~a 5 ) and page address register (a 6 ~a 9 ) 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) 64 (level 1 ) (level 2 ) (level 3 ) (prs) (sr) stack register page 0 page 1 page 2 page 15 a0~a5 01215 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 (a 0 to a 5 ), 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 01 4a0~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 table 2-1 mapping table between x and y register chapter 2. architecture x1=1 x1=0 d8 d9 y=0 y=1 d1 d0 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 (a 0 ~a 3 ) 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 (a cc ) 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 a cc (a cc +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. i/o circuit ports k0~k3 are 4-bit input ports were pulled up by mos tr resistor internally. ports d0~d9 are output ports, each of which can be independently set and reset. the output is in the form of nch-open-drain circuit. the input is in the form of a mos transistor input (mos tr resistor pull-up. masked option). further, the remout port is a large current driven output port. this port is designed for source current to drive a high current device. 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 gms300 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 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 , t1/t = 1/2 0 1 pmr 2 3 4 5 t=1/f pul = 12/f osc , t1/t = 1/3 t=1/f pul = 8/f osc , t1/t = 1/2 t=1/f pul = 8/f osc , t1/t = 1/4 t=1/f pul = 11/f osc , t1/t = 4/11 no pulse (same to d0~d9) * default value is 0 table 2-2 pmr selection table chapter 2. architecture 22 23 osc2 osc1 2 - 7 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.) watch dog timer (wdt) watch dog timer is organized binary counter of 14 steps. the selected of f osc /6 cycle come 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). 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 1-13 stop function>) 1 reset 0.1uf chapter 2. architecture binary counter (14 steps) reset (edge-trigger) f osc /6 cpu reset reset by instruction remout output mask option 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 gms300 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 gms300 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 manipulatio n 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 is 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 3 - 3 category 26 27 28 arithmetic dy eorm nega mnemonic y y - 1 function a a + m (x,y) a a + 1 b s z st *1 29 30 comparison alem alei i test a ? m(x,y) test a ? i e e 31 32 mnez ynea test m(x,y) 0 test y a n n 33 34 ynei i knez test y i test k 0 n n 35 rnez test r 0n 36 37 input / output lak lar a k a r s s 38 39 so ro output(y) 1 *2 output(y) 0 *2 s s 40 41 control wdtr stop watch dog timer reset stop operation s s 42 43 lpy nop pmr y no operation s 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. chapter 3. instruction 3 - 4 value of x-reg 0 or 1 so : d(y) 1, ro : d(y) 0 operation remout port repeats h and l in pulse frequency. (when pmr = 5, it is fixed at h ) so : remout (pmr) 1 ro : remout (pmr) 0 value of y-reg 0~7 0 or 1 8 0 or 1 so : d0 ~ d9 1 (high-z) r0 : d0 ~ d9 0 9 0 or 1 so : r(y-ah) 1, ro : r(y-ah) 0 a ~ d 0 or 1 so : r0 ~ r3 1, ro : r0~r3 0 e 0 or 1 so : d0 ~ d9 1 (high-z) r0~r3 1 r0 : d0 ~ d9 0r0~r3 0 f 2 or 3 so : d(8) 1, ro : d(8) 0 0 2 or 3 so : d(9) 1, ro : d(9) 0 1 *2 operation is settled by a value of y-register. chapter 3. instruction 3 - 5 details of instruction system all 43 basic instructions of the gms300 series are one by one described in detail below. description form each instruction is headlined with its mnemonic symbol according to the instructions table given earlier. then, for quick reference, it is described with basic items as shown below. after that, detailed comment follows. ? items : - naming : full spelling of mnemonic symbol - status : check of status function - format : categorized into to - operand : omitted for format - function chapter 3. instruction 3 - 6 detailed description (1) lay naming : load accumulator from y-register status : set format : i function : a y 3 - 7 (6) lym naming : load y-register form memory status : set format : i function : y m(x,y) 3 - 8 (10) lmiiy i naming : load memory from immediate and increment y-register status : set format : ? operand : constant 0 ? i ? 15 function : m(x,y) i, y y + 1 3 - 9 (14) tm n naming : test memory bit status : comparison results to status format : operand : bit address 0 ? n ? 3 function : m(x,y,n) 1? st 1 when m(x,y,n)=1, st 0 when m(x,y,n)=0 3 - 10 (16) cal a naming : subroutine call on status 1 status : conditional depending on the status format : operand : subroutine code address a(addr) function : when st =1 , pc a(addr) pa pb sr1 pc + 1, psr1 pa sr2 sr1 psr2 psr1 sr3 sr2 psr3 psr2 when st = 0 pc pc + 1 pb ps st 1 note : pc actually has pseudo-random count against the next instruction. 3 - 11 (17) rtn naming : return from subroutine status : set format : function : pc sr1 pa, pb psr1 sr1 sr2 psr1 psr2 sr2 sr3 psr2 psr3 sr3 sr3 psr3 psr2 st 1 3 - 12 (20) sm naming : subtract accumulator to memory and status 1 not borrow status : carry to status format : function : a m(x,y) - a st 1(when a ? m(x,y)) st 0(when a > m(x,y)) 3 - 13 (23) ia naming : increment accumulator status : set format : function : a a+1 3 - 14 (26) dy naming : decrement y-register and status 1 on not borrow status : carry to status format : function : y y -1 st 1 (when y ? 1) st 0 (when y = 0) 3 - 15 (29) alem naming : accumulator less equal memory status : carry to status format : function : a ? m(x,y) st 1 (when a ? m(x,y)) st 0 (when a > m(x,y)) 3 - 16 (32) ynea naming : y-register not equal accumulator status : comparison results to status format : function : y a st 1 (when y a) st 0 (when y = a) 3 - 17 (36) lak naming : load accumulator from k status : set format : function : a k 3 - 18 (39) ro naming : reset output register latch status : set format : function : d(y) 00 ? y ? 7 remout 0 y = 8 d0~d9 0y = 9 r(y) 0ah ? y ? dh r 0y = eh d0~d9, r 0 y = fh 3 - 19 (41) stop naming : stop status : set format : function : operate the stop function introduction 1 architecture 2 instruction 3 evaluation board 4 software 5 appendix 6 4 - 1 chapter 4. evaluation board chapter 4. evaluation board outline the gms 30000 eva is an evaluation board for gms300 series, 4-bit, 1-chip microcomputer. it is designed to evaluate and confirm the operations of the application system in the nearest possible form of final products while it is under development. the major features are as follows : ? the gms 30000 eva is used for the evaluation chip. ? the board is connected to the application system through an connection cable (dip24). ? eprom of 2764, 27128, and 27256 are used for the program memory. ? the instruction system and i/o specifications are basically the same as those of the gms300 series. product specifications ? gms 30000 eva board module dimensions 64 ? 82 (mm) supply voltage 2.5 ~ 5.5 (v) operating temperature 0~50 ( ? ) ? connection cable dip 24 cable 4 - 2 connection perform emulation with the following connectors. [user] connection socket the cable for the target system is connected. pin no. 1 signal reset pin no. 13 signal d9 2 gnd 14 d1 3 r0 15 d2 4 r1 16 d3 5 r2 17 d4 6 r3 18 d5 7 k0 19 d6 8 k1 20 d7 9 k2 21 remout 10 k3 22 osc2 11 d0 23 osc1 12 d8 24 vdd [m1] monitor pin operations inside the gms 30000 eva can be monitored. signals that can be monitored are as follows. ac0~ac3, x0, x1, y0~y3, remdata, ck2, ck5, wdtr, gnd [m2] oscillation monitoring pin the oscillation output signal can be monitored. [t1] d8 output monitoring pin the d8 output signal can be monitored. [t2] d9 output monitoring pin the d9 output signal can be monitored. chapter 4. evaluation board 4 - 3 optional setting the following optional setting in accordance with the application system specifications is required : [s1] optional mask setting optional masks available with gms300 series units can be set by selecting short posts. 1. setting of k-input and r-port for stop release shorting the ksr0 ~ ksr3 and rsr0 ~ rsr3 with the side of h can set the stop releasing function by the corresponding ksr0 ~ ksr3 and rsr0 ~ rsr3. if no stop releasing function is desired, short them with the side of l. setting pin short post k0 ksr0 setting of stop no setting of stop h l k1 ksr1 h l k2 ksr2 h l k3 ksr3 h l r0 rsr0 h l r1 rsr1 h l r2 rsr2 h l r3 rsr3 h l 2. setting of pull-up resistor built-in r-port pull-up resistor can be built in the r-port by shorting the corresponding rpu0 ~ rpu3 with the side of h. if installation of built-in pull-up resistor is not desired, short them with the side of l. setting pin short post built-in pull-up resistor installation no built-in pull-up resistor installation r0 rpu0 h l r1 rpu1 h l r2 rpu2 h l r3 rpu3 h l chapter 4. evaluation board 4 - 4 3. setting of output condition of d0~d7 in stop shorting the dsc0~dsc7 with the side of h can set the output condition of corresponding d-output in stop at l forcibly. to set the condition of usual output (the condition before stop started is maintained), short them with the side of l. setting pin short post d0 dsc0 forced setting at l in stop release usual output in stop released h l d1 dsc1 h l d2 dsc2 h l d3 dsc3 h l d4 dsc4 h l d5 dsc5 h l d6 dsc6 h l d7 dsc7 h l 4. setting of watch dog timer release with remout output the watch dog timer can be reset with remout output signals by shorting the wdtm with the side of l. if the wdt resetting with remout output signals is not desired, short it with the side of h. short post reset timer wdtm l h do not reset timer [s2] external stop setting stop can be set from the outside by shorting the s2 toward the side of h. usually, short it toward the side of l. [s3] power supply connection this selection should be strapped to v dd . chapter 4. evaluation board 4 - 5 short post 2764/128 s4 h l 27256 [s4] eprom 2764/128, and 27256 can be installed by switching over the s4. for eprom, however, right-justify rom chip pin 1 from socket pin 3. short post external clock input s5 & s6 u x internal self-induced oscillation [s5, s6] clock input selection self-induced oscillation with the external clock input and oscillator can be set by switching over the s5 & s6 for internal clock input, install an oscillator on the pcb. since the oscillation circuit constant varies depending on the oscillator, adjust the constant by referring to the oscillator manufacture`s recommendable values. chapter 4. evaluation board short post mhz oscillation s7 & s8 & jp m k khz oscillation [s7, s8, jp] clock input selection mhz and khz oscillation can be selected by switching over the s7, s8 and jp. 4 - 6 caution on operation ? it is required to install a 24dip ic socket in the application system. the connection cable is connected to the socket. ? there is a possibility that the ceramic oscillator on the application system cannot oscillate properly due to the influence of connection cable wiring capacitor or other reasons. in such a case, install the oscillator on the evaluation board. ? since the gms 30000 eva is designed to evaluate the program operations, there is a case where the ac and dc characteristics differ from those of the mass- produced chips chapter 4. evaluation board 3 s3 s5 s6 hl uxuxmk 128 connector (3520 1 80 e v a m1 gnd cx3 cx2 x1 x0 ac3 ac2 ac1 ac0 y3 y2 y1 y0 wdtr rem data s2 hl s1 bkpoint wdtm dsc7 dsc6 dsc5 dsc4 dsc3 dsc2 dsc1 dsc0 hl rsr0 rsr1 rsr2 rsr3 rpu0 rpu1 rpu2 rpu3 ksr0 ksr1 ksr2 ksr3 (80qfp) connector (24pin socket) gsen eva30000 user s1 h l t1 t2 gnd jp s4 s7 s8 h l mk mk fig 4-1 layout diagram introduction 1 architecture 2 instruction 3 evaluation board 4 software 5 appendix 6 5 - 1 chapter 5. software chapter 5. software configuration of assembler execute file ga80.exe description assembler create assembler list file gmslst.exe gmshex.exe create hex.file create cross reference file gmscrf.exe gmstst.exe create instruction check file create rom dump file gmsrom.exe gs.bat batch processing of the above instruction library file gms30k.lib boothing up assembler creating your own source file with the extension name of src and execute batch file (gs.bat). this batch file converts the source code written in mnemonic into machine language and generate a kind of useful file. c> gs source file (.src) input file ex.src content list file hexa file (for eprom, simulator) cross reference file instruction check file rom dump file (for masking data) symbol file output file ex.lst ex.rhx ex.crf ex.tst ex.dmp ex.sym * hex and prn file is intermediate file 5 - 2 configuration of simulator 1. overview the simulator is a program for gms300 series 4-bit one-chip microcomputer. the environment is organized based upon hexa file of *.rhx and cross reference file of *.crf generated by assembling the source program coded by programmer. execution environment system : ibm-pc/at or higher (ms-dos or pc-dos) video : hercules, ega or vga color organizing files gssim.exe : simulator execution file gms30k.gsp : store the simulator environment. it is generated automatically when executing the program initially (selected cpu. store the file names previously loaded.). gms30k.hlp : help file of simulator commands. gms30k.log : record the working history of users. generated by log on and log off commands. *.bat : list a set of simulator command. generated by user. portin.dat : provide the port input-value when executing the simulator. generated by user. supporting cpu gms30004, gms30012, gms30112, gms30120, gms30140 chapter 5. software 5 - 3 2. characteristics of simulator - user-friendly pop-up window menu. select the necessary command and display the screen in windows format so that users can know the execution results. - display always the register window in the right side so that programmer can check easily the change of data memory value as program proceeds. - maintain the previous simulator environment if user does not make the extra changes when re-executing after logging out completely from the simulator previously executed by loading the source program. in other words, the previously- executed file is automatically loaded when the simulator is executed (gms30k.gsp file). - when trace command ([f8] or > t command) is executed, the changed values are noticed easily by displaying the highlighted changed values in register and memory windows, if the contents of each register or data memory is changed as command line is processed. - when trace command ([f8] or > t command) is executed, the current execution line is highlighted. - out of the simulator commands, load or save commands is executable in pop-up windows. in-line command is executable as prompt command in the command window. chapter 5. software 5 - 4 3. screen organization of simulator screen is basically organized with four windows; memory, source, command and register. source and command windows can be enlarged up to the full screen size (ctrl-[f10]). movement between windows is made by [f6]. 3.1 memory window data memory contents of the currently selected micom is displayed. 32 nibble data values of 00~1f(h) addresses are displayed. 3.2 source window the contents of *.rhx file called by load command is displayed in the state of being disassembled. addresses are displayed randomly in the state of polynomial together with instruction code and mnemonic. if *.crf file is called, label is displayed at the corresponding position. display position of source program is adjustable with up/down arrow keys and page up/down keys. 3.3 command window all kinds of commands provided by simulator is executed by in-line command, and the execution results of the commands are displayed. command window size is adjustable with [ctrl]-[f10]. chapter 5. software 5 - 5 3.4 register window display each register value inside micom, i/o port value and machine cycle altogether. when trace command is executed by function key [f8], the register value after the previous command before the current program counter is executed is displayed. all kinds of register and i/o ports displayed in register window are as follows. pc : program counter 2digit 6bit [hexa] acc : accumulator 1digit 4bit [hexa] pa : page address 1digit 4bit [hexa] pb : page buffer 1digit 4bit [hexa] x : x register 1digit 1 or 2 [hexa] y : y register 1digit 4bit [hexa] st : status register 1digit 1bit [binary] pmr : pulse mode register 1digit [hexa] wdt : watch dog timer 1digit 14bit {hexa] sp : stack pointer level 1digit sr0 : stack level 0 4digit sr1 : stack level 1 4digit sr2 : stack level 2 4digit out : remocon out output [binary] k : k port input register 4bit [binary] rin : r port input register [binary] rout : r port output register [binary] d : output port 6or8 10bit [binary] machine cycle : the number of command execution is displayed in decimal. chapter 5. software 5 - 6 4. commands in each menu ^stands for [ctrl] key, while @ stands for [alt] key. 4.1 file menu use the function key behind each command as a hot key or execute each command through selecting [alt]-[f] key and pressing the highlighted character. load rhx f2 : load the file named *.rhx, analyze the selected hexa file and disassemble it. display the program address, assemble code and mnemonic. the order of displayed program addresses follows the polynomial form. even when the extention is not input in case of selection, .rhx extension is presumed to include. load crf @f2 : if cross reference file of loaded file loads the *.crf file, labels and variables assigned by programmer are displayed at accurate position of source window so that programmer can read the program easily. even when the extension is not input in case of file selection, .crf extension is presumed to include. write rhx f3 : when any modifications are made to source program or program memory after the simulator is loaded once, the modifications are stored in the same or new filename as loaded. it has the same command and function as > wp [filename] of in-line command. log on/off f4 : after the simulator is executed, all the input and results are stored in the filename gms30k.log once function key [f4] is pressed, log-in starts, and if the key is pressed one more time, log-in file is closed in a toggling way. the on/off state of log-in is displayed in the upper-right corner. it has the same function as > logon and > logoff of in-line commands. os shell @s : when users want to work temporarily under dos environment, this command is used. when users want to back to windows environment, input > exit. exit @x : used when getting completely out of the simulator environment. chapter 5. software 5 - 7 4.2 window menu use the function key behind each command as a hot key or execute each command through selecting [alt]-[w] key and pressing the highlighted character. function key [f6] provides the return function to each window. command box: position the cursor in command window to make it possible to use in-line command provided by the simulator. source box : position the cursor in source window to make it possible for programmer to see the disassembled source program. it is possible to use up/down arrow keys and page up/down keys. zoom ^f10 : position the cursor in command or source window, and then select zoom or press [ctrl]-[f10] key to enlarge the window to the full screen size. chapter 5. software 5 - 8 4.3 run menu use the function key behind each command as a hot key or execute each command through selecting [alt]-[r] key and pressing the highlighted character. mcu reset ^f9 : initialize the execution environment of the simulator. in other words, initialize the register value to 0 or 1, and machine cycle value is changed to 0. it has the same command and function as > cr command of in-line command. go f5 : program executes from the current value of program counter. press [esc], [enter] or [space] key to stop execution, and display the current register value. animate @5 : program executes from the current value of program counter. the value of data memory or registers are highlighted in the corresponding window. press [esc], [enter] or [space] key to stop execution. because of speed difference among system, the speed is adjustable from 0 to 40. (0 : fastest, 40 : slowest) trace f8 : program executes line by line from the current value of program counter. the changing values of registers and memory are highlighted in register window and memory window respectively. execute batch : when the batch filename consisted of a set of commands made by user using editor is input, each command executes automatically as in-line command is input. it has the same function as > bat command of in-line command. chapter 5. software 5 - 9 4.4 option menu to execute each command, select [alt]-[o] key and press the highlighted character in each command line. or select the menu and press the [enter] key. mcu select : select according to the kind of micom. able to select on of gms30004, 30012, 30112, 30120 or 30140 among gms300 series. once the command is executed, the window indicating the characteristics of each micom is open. press left, right, up down key to select the micom to work. setup : set the execution mode of selected micom. it has the same function as > set command of in-line command. once the function is executed, a small 5 - 10 5. simulator execution 5.1 file load use one of three ways to load the file to run from the simulator. first execute the gssim.exe file from dos and name it as a parameter. >a:\gssim test.rhx (here the extention needs not be input.) the following screen will be displayed. )loh :lqgrz 5xq 2swlrq /rj 2)) *06 5hjlvwhu 6rxufh $?7(675+; & /;, ) /<, ) ' 62 ) /$= ) /0$ ) & '< ) ) %5 ) ( /<, ' & 5 &rppdqg &38 *06 520 %\whv 5$0 1leeohv ,2 ,qsxw >sl@ >@ 3ruw ,qsxw )urp ,2 5hjlvwhu ,2 2xwsxw >sr@ >@ 1r 'lvsod\ 6\pero >@ >@ 6hdufk :dwfk 'rj 7lphu>:g@ >@ 2)) ! 3& $ff 3$ 3% ; < 67 305 :'7 63 65 65 65 ,2 3ruwv 287 . 5lq 5rxw ' 0dfklqh &\foh ) +(/3! &wuo ) =220! ) 6zlwfk! *6(1*06. 6lpxodwru 9hu chapter 5. software 5 - 11 second, execute the gssim.exe file and then the load rhx (hot key is [f2]). the following small window is open at the center of screen waiting for user to input the hexa filename to work. * file name * a : \unnamed.rhx when no file is selected, unnamed.rhx filename is displayed. when the filename to work is input immediately, the file from the current directory is called. if the specific directory is assigned, the file from the assigned directory is called. third, call the file to work through using the >lp [filename] from command window by in-line command. here for example, load the test.rhx file * file name * a : \test.rhx test.rhx file is called and the contents of hexa file is analyzed from the simulator. the source contents in the state of being disassembled is displayed from source window. incase of filename input, although rhx is not input, .rhx extension presumed to include by default. chapter 5. software 5 - 12 also when there is cross reference file of working file, press load crf (hot key [alt]-[f2]). the following small window is open at the center of screen waiting for user to input *.crf filename. * file name * a : \test.crf the filename called by load rhx command is displayed by default as .crf filename. when .crf file is called, the label of source program created by programmer is displayed at the label position of source window for easy reading of program by user. chapter 5. software 5 - 13 5.2 file store when the specific part of source program is changed under the simulator environment by calling the working file, the corresponding hexa file needs to be stored. use one of the following two methods. first, when executing the pop-up command save rhx (hot key is [f3]), the following small window is open at the center of screen waiting for user to input the hexa filename. the filename called by file load command by default is displayed. when the filename is not changed, hit just the [enter] key. when user wants to change the filename to store, input the filename to change. * file name * a : \test.rhx second, store the processed hexa file using > wp [filename] from command window with in-line command. here when the same filename to store already exists in the disk, file already exist message comes up asking user by [yes/no] if user overwrite or not. chapter 5. software 5 - 14 5.3 closing the simulator using the pop-up command exit (hot key [alt]-[x]) or in-line command > q, exit from the simulator environment. when execute the command, the following message comes up for the check- up asking the user`s intention to store, if user does not store the changed file after changing the loaded file to work. use tab key or left, right direction key to select yes/no. also for recording the work contents, even when exiting the simulator without log off, log off is done automatically and gms30k.log file is stored. program have changed. save it ? yes no chapter 5. software 5 - 15 6. simulator commands 6.1 command syntax 1) a (assemble) to assemble what is commanded for every line from the specified and write in the memory. 2) bat (batch) to execute what is commanded in the command file in a batch. when there is a format error, command error is issued and execution is stopped at the error point. 3) bp (break point set), bl (break point list) to set break point. to display the set break point. 4) bs (break point set step) to set break point with no. of steps. 5) bc (break point clear) to clear the specified no. break point. 6) cr (cpu reset) to reset the simulator to the initial state. 7) dpp (dump program memory) to display the content of the memory in the area of the no. of pages specified with 5 - 16 11) eps (exchange program memory) to display and modify the specified data in the program memory. 12) ed (exchange data memory) to display or modify data in the specified data memory. 13) fpp (fill program memory) to fill the area of the program memory specified with 5 - 17 22) mps (move program memory) to transfer data in the memory area to another area. 23) p (port set) to set the specified data at the specified i/o register. 24) q (quit) to return to ms-dos*. 25) r (register dump or change) to display or modify the register data. 26) set (setup) to set the operation mode for the simulator. 27) sl (symbol file load) to load symbol tables from the specified symbol file. 28) st (status) to display the simulator status. 29) t (trace) to execute the program in the specified program memory address a single step. 30) tmt(time) to obtain time from the no. of machine cycles and clock frequency. 31) tmc (time) to obtain no. of machine cycle from the time and clock frequency. 32) u (unassemble) to unassemble data in the area specified with 5 - 18 6.3 description of commands the symbols used in this chapter are defined as in below. 1) xxxx indicates input from the keyboard. 2) ? indicates return key. 3) _ indicates insertion of space characters. 4) in indicates range. 5) [ ] indicates it is omittable. 6) no. used on this system are hexadecimal. however, the machine cycles are decimal. (common items on this simulator) 1) this simulator accepts up to 132 characters per each line. before pressing ` ? ` key, data can be modified in the following procedure. 5 - 19 a (assemble) [function] to assemble commands for each line from the specified and write them in the memory. [format] > a_ [] ? [explanation] with this, the system assembles commands for each line from the specified and writes them in the memory. when is omitted, data is written from the current `pc` address. assemble can be finished by keying in `.`. when `_` is keyed in, the system goes back the address just before the current one. [e.g.] >a 200 ? ? 0200 40 lyi 0 so ? ? 0201 21 lam lma ? ? 0203 77 alei 14 - ? ? 0201 03 lma - ? ? 0200 0d so . ? ? > bat (batch) [function] to execute commands in the command file in a batch. when there is a format error, execution is stopped there and command error is issued. [format] bat_ 5 - 20 bp (break point set), bl (break point list) [function] bp to set the break point. bl to display the set break point bps to set step break point. [format] bp[n]_adr[_m] ? n : set break no. 0~9. adr : set address for setting break m : valid only when n=0, setting no. of times to pass the break point. the m range is 1 ? m ? 255. m value should be set in hexadecimal. bps_st ? st : set no. of steps. st range is 1 ? st ? 2147483647. st value should be set in decimal. bpi ? bpo ? bl ? [explanation] this command is used to the break point. break on this simulator is to stop after executing the command on the specified address. when `bps st` is specified, the system stops when the value on the machine cycle register becomes equal to st. when `bpi` is specified, the system stops before command execution every time command input is made. unassemble displayed in this case is the address with input command. when `bpo` is specified, the system displays the value on that occasion on crt and stops every time output command is made. when `bp` only or `bl` is specified, the state of the currently set break point is displayed. it is possible to used symbols for specifying adr. when `n` is omitted in break setting command, no. shall be allocated from 1 to all empty no. chapter 5. software 5 - 21 [e.g.] 1) example to occur break after passing page 1 address 0 three times. > bp0 100 3 ? ? 2) example to set a break point at page 5 address 0. > bp 500 ? ? > bl ? ? 0 = 0100 ( 3) 1 = 0500 3) example to occur break on the main label (in case the main label is at page 5 address 0.) > bp .main ? ? >bl ? ? 0 = 0100 ( 3) 1 = 0500 .main > 4) example to occur break by no. of steps (50 steps). > bps 50 ? ? >bl ? ? 0 = 0100 ( 3) 1 = 0500 .main s50 > 5) example to occur break with input command. >bpi ? ? >g ? ? run ******** mc step break ******** 0004 00 nop pc=00 pa=09 pb=00 a=0 x=0 y=0 st=1 pmr=0 wd=0000 mc=50 >r r 00 ? ? >g ? ? chapter 5. software 6) example to occur break with output command. >bp0 ? ? >g ? ? run rout=1111 d=11111111 out=0 mc=125 ******** break at port out !! ******** 002f 0d so pc=00 pa=1e pb=00 a=0 x=0 y=f st=1 pmr=0 wd=0000 mc=125 >g ? ? chapter 5. software bc (break point clear) [function] to clear the break point at the specified no. [format] bc_n ? [explanation] with this, the system clear the break point at the specified no. when n is omitted, the state of the currently set break shall be displayed. when n is `*`, all the break points shall be cleared. [e.g] >bl ? ? 0 = 0100 ( 3) 1 = 0200 2 = 0500 s 50 i o > bc 1 ? ? >bc s ? ? >bc i ? ? >bc o ? ? >bc ? ? 0 = 0100 ( 3) 2 = 0500 >bc * ? ? >bl ? ? > 5 - 22 cr (cpu reset) [function] to set simulator to the initial state. [format] cr ? [explanation] when this command is executed, the simulator is set back to the initial state. in this case, the registers are also initialized according to each cpu. however, mc is cleared irregardless of the cpu status. initial state of each register. pa, pc, pb, sp and d port become 0. all the ports of r port become 1. the other registers are undefined. [e.g] > cr ? ? cpu gms30140 rom 1024 byte ram 32 nibble i/o input [pi] = [0] port input i/o register i/o output [po] = [0] no display symbol [1] = [0] search watch dog timer [wd] = [0] off pc=00 pa=00 pb=00 a=0 x=0 y=0 st=0 pmr=0 wd=0000 mc=0 sp=0 sr1=0000 sr2=0000 sr3=0000 i/o reg. rin=1111 rout=1111 d=00000000 out=0 k=0000(0h) > chapter 5. software 5 - 23 dpp (dump program memory) [function] to display data in the program memory area specified with dd (dump data memory) [function] to display data in the data memory in hexadecimal. [format] dd ? [explanation] with this, the system displays all the data in the data memory in hexadecimal. [e.g] > dd ? ? 000 : 6 c 6 0 0 0 0 0 - 0 0 0 0 0 0 0 0 010 : 1 2 3 4 0 0 0 0 - 3 2 1 0 0 1 0 1 > ed (exchange data memory) [function] to display and modify the specified data memory. [format] ed_[ ? [explanation] when this the system displays and modifies the specified data memory. this mode is continuous and processing shall be continued until *.* is pressed. when `_` is pressed, the system goes back to the address immediately before. [e.g] > ed 0 ? ? 00 : 7 > 3 ? ? 01 : 6 > 6 ? ? 02 : 7 > . ? ? > chapter 5. software 5 - 25 epp (exchange program memory) [function] to display and modify the specified program memory. [format] epp_ ? [explanation] with this, the system displays and modifies the specified program memory. this mode is continuous and each time ` ? ` is pressed, the succeeding address shall be displayed, setting operation shall be performed continuously until `.` is pressed. when `_` is pressed, the system goes back to the address immediately before. the address used with this command is polynomial. it is possible to use symbols in . [e.g] >epp_100 ? ? 100 : 0d>37 ? ? 101 : 77>af ? ? 103 : 42> . ? ? > eps (exchange program memory) [function] to display and modify the specified data memory. [format] eps_ ? [explanation] with this, the system displays and modifies the specified program memory. this mode is continuous and each time ` ? ` is pressed, the succeeding address shall be displayed and setting operation shall be performed continuously until `.` is pressed. when `_` is pressed, the system goes back to the address immediately before. the address used with this command is sequential. it is possible to use symbols in . [e.g] >eps_100 ? ? 100 : 48>6 ? ? 101 : 04>45 ? ? 102 : 53>. ? ? > chapter 5. software 5 - 26 fpp (fill program memory) [function] to fill the program memory area specified with fd (fill data memory) [function] to fill the program memory area specified with g (go) [function] to execute the program in the specified program memory [format] g_[][_]...[_] ? [explanation] with this, the system executes the program address specified with =, [=] is omittable. when omitted, the command is executed from the present `pc` address. the system also sets a break point in the specified address after [_ h (hex calculate) [function] to add and subtract hexadecimal no. [format] h_xxxx_xxxx ? [explanation] hexadecimal nos. are added or subtracted. [e.g] >h_e6ab_b7fc ? ? 9ea7 2eaf > logon (login) [function] to log the commands executed after this command. [format] logon ? [explanation] after executing this command, all the information displayed on crt shall be written consecutively until logoff command is given. the file created in this event is log.dat`. [e.g] > logon ? ? > chapter 5. software 5 - 30 logoff (logout) [function] to end logging [format] logoff ? [explanation] logging is finished when this command is executed. [e.g] > logoff ? ? > lp (load program from ms-dos* file) [function] to read `file` on ms-dos* and write it to the program memory of the simulator [format] lp_ mpp (move program memory) [function] to transfer memory area data to other area. [format] mpp_ p (port set) [function] to display and modify the specified i/o set registers. [format] p_aa_bb_c ? (when setting r, d port) aa : i/o set register name bb : specify in or out c : set value (0 or 1) p_aa_cc ? / p_aa_c ? (when setting k) aa : i/o set register name bb : set value (one digit of a hexadecimal no.) c : set value (0 or 1) [explanation] the system sets the value in the specified i/o set register. [e.g] 1) example of setting k > p k 8 ? ? > p ? ? i/o regs. rin=0000 rout=1111 d=00000000 out=0 k=1000(8h) > 2) example of k0-k3 setting > p out 1 ? ? > p k1 1 ? ? > p ? ? i/o regs. rin=0000 rout=1111 d=00000000 out=1 k=0010(2h) > (i/o setting registers used on this simulator) ? dout (d port output register 6 or 8 or 10bit) ? k (k input register 4bit) ? rout (r port output register 4bit) ? rin (r port input register 4bit) ? out (out port output register 10bit( chapter 5. software 5 - 33 q (quit) [function] to return to pc-dos [format] q ? [explanation] when this command is executed on the system with prompt (*display) waiting for a command, the system moves from `simulator` mode to `ms-dos*` mode. [e.g] 1) q ? ? a> r (register dump or change) [function] to display and modify the register data. [format] r ? r_x ? r_a=x ? [explanation] with this, the register data is displayed and modified. when `r ? ` only is executed, all the registers are displayed. [e.g] > r ? ? pc=00 pa=3e pb=00 a=0 x=0 y=1 st=1 pmr=0 wd=0000 mc=10392 sp=0 sr0=0000 sr1=0000 sr2=0000 >r pc=23 ? ? >r pc ? ? pc=23 >r mc =0 ? ? >r mc ? ? mc=0 > chapter 5. software 5 - 34 (registers used on this simulator) simulator setting registers ? mc (machine cycle register 32bit) gms300 series ? pc (program counter 6bit) ? pa (page address register 4bit) ? pb (page buffer register 4bit) ? a (acc register 4bit) ? x (x register 2bit) ? y (y register 4bit) ? sp (stack pointer register 2bit) ? sr (stack register 10bit) ? 3 ? st (status register 1bit) ? pmr (pulse mode register 4bit) ? wd (watch dog timer register 14bit) chapter 5. software 5 - 35 set (setup) [function] to setup the operating mode for the simulator. [format] set_c_x ? [explanation] this is used to setup the simulator. the following commands can be executed with this command. ? when setting symbols for assembler and unassembler. set l x ? here, the range of x is defined as in the below. 0 : symbol shall be used. (default) 1 : symbol shall not be used. ? set po x ? 0 : when i/o write command is executed while executing g command, no display shall be mode. (default) 1 : when i/o write command is executed while executing g command, the values in the event shall be displayed on crt screen. 2 : when i/o write command is executed while executing g command, the values in the event shall be displayed on crt screen and the operating shall be stopped. ? set pi x ? 0 : in case i/o read command is to be executed while simulating, the system reads the value set on the port input register. the port input register setting is to be performed with `r` command. 1 : in case i/o read command is to be executed while simulating, the system stops before the execution. in this case, set the value on the port input register. 2 : value is set on the port input register from i/o file (port.dat). the file is opened when this command is executed and the file shall not be reread. if there is no i/o file, error shall be issued. chapter 5. software 5 - 36 timing for setting port input register is : a) when machine cycle of the file [e.g] 1) example of setting port input i/o file and measure in case of file format error. > set po 1 ? ? > set pi 2 ? ? > set ? ? cpu gms30140 rom 1024 byte ram 32 nibble i/o input [pi] = [2] port input file (port.dat) i/o output [po] = [1] display symbol [1] = [0] search watch dog timer [wd] = [0] off >g ? ? run ******** `portin.dat` file format error ******** 0001 07 da pc=0 pa=01 pb=00 a=0 x=0 y=0 st=1 pmr=0 wd=0000 mc=235 in this case, execute set pi 0 or set pi 1 and cancel the mode. then you can execute the command again. > set pi 1 ? ? > g ? ? run 2) example of setting watch dog timer > set wd 1 ? ? > set ? ? cpu gms30140 rom 1024 byte ram 32 nibble i/o input [pi] = [0] port input i/o register i/o output [po] = [0] no display symbol [1] = [0] search watch dog timer [wd] = [1] on (no option) > chapter 5. software 5 - 38 sl (symbol file load) [function] to load the symbol table from the specified symbol file. [format] sl_ st (status) [function] to display the internal set condition of the simulator. [format] st ? [explanation] the status of the simulator shall be displayed. [e.g] >st ? ? cpu gms30140 rom 1024 byte ram 32 nibble i/o input [pi] = [0] port input i/o register i/o output [po] = [0] no display symbol [1] = [0] search watch dog timer [wd] = [0] off pc=00 pa=00 pb=00 a=0 x=0 y=0 st=0 pmr=0 wd=000 mc=0 sp=0 sr0=0000 sr1=0000 sr2=0000 i/o reg. rin=1111 rout=1111 d=00000000 out=0 k=0000(0h) > chapter 5. software 5 - 40 t (trace) [function] to execute the program in the specified program memory address in a single step. [format] t_[=] [_ tmt (time calculate) [function] to calculate time from no. of machine cycles and clock frequency. [format] tmt_m_c ? m : no. of machine cycles without any calculating factors. c : clock frequency (1k -10m) calculating factors must always be input in small letters. k (kilohertz) m (megahertz) [explanation] with this, the system calculates time from no. of machine cycles and clock frequency. range of obtainable time : 6ns - 7158h 16m 43s 770ms (nano second) (hour) (minute) (second) (millisecond) calculating equation : machine cycle ? (1/clock frequency ? 6) [e.g] >tmt_1000_1m ? ? 6ms 0m 0ns > chapter 5. software 5 - 42 tmc (time calculate) [function] to calculate no. of machine cycles from time and clock frequency. [format] tmc_t_c ? t : time calculating factors must always be input in small letters. h (hour) m (minute) s (second) ms (millisecond) us (microsecond) ns (nano second) c : clock frequency (1k -10m) calculating factor must always be input in small letters. k (kilohertz) m (megahertz) [explanation] with this, the system calculates no. of machine cycles and clock from time and clock frequency. range of obtainable machine cycle : 1-14984999833500 calculating equation : time ? (1/clock frequency ? 6) [e.g] >tmc 6ms 1m ? ? mc=1000 > chapter 5. software 5 - 43 u (unassemble) [function] to unassemble the area specified with ? (help) [function] to display the list of commands of this simulator. [format] ? ? [explanation] with this, the system displays the list of commands of this simulator. [e.g] >? ? ? gsen-gms30k simulator processor is gms30k series version 1.0 a[] - assemble logon - command logging start bat |
Price & Availability of CSB455E35
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |