Command of MiniOS7
[Index] [Back]
  1. Command line prompt is:
    • 7188x>ЎGI-7188XC/7521/7522/7523
    • 7188xA>ЎGI-7188XAЎC
    • 7188xB>ЎGI-7188XBЎC
    • i7188>ЎGI-7188ЎC
    • 8000>ЎGI-8000ЎC
  2. command is case-insensitiveЎC
  3. Some commands are supported by some special modules only, please refer to the note of command.
Command of MiniOS7
COMMAND | DESCRIPTION
1 LED ON | OFF ON: Set to light the red LED.
note:On I-8000 is to light the LED "L1".
OFF:Set to dark the red LED.
note:On I-8000 is to dark the LED "L1".
2 | LED5 pos value | Set to show digit on someone position of 5DigitLed.
3 USE NVRAM Go into the sub-function for read/write NVRAM.
(The function works only with RTC hardware.)
4 | USE EEPROM | Go into the sub-function for read/write EEPROM.
5 | USE FLASH | Go into the sub-function for read/write/erase FLASH memory.(Also can read SRAM.)
6 USE COM2 /option
USE COM0 /option

(For I-8000 use "use com0" to test 87K board.) 		Go into the sub-function for COM2(RS-485).(Like the function of "echo485.exe" on I-7188.)
option can be as follows:
axx : Set the start address of auto scan.
bxxxx : Set baudrate.
cxxxx : Set direct send command out to COM2.
dx : Set data bits, 7 or 8.
exx : set the end address of auto scan.
px : Set Parity.(0:NONE, 1:EVEN, 2:ODD)
q: Auto quit after send command.
txx : Set Timeout period(ms).
7 | DATE [new_date] | Set/Read system date.(work with RTC.)
8 | TIME [new_time] | Set/Read system time.(work with RTC.)
9 | MCB | Display the amount and status of SARM.
10 | UPLOAD | The 1st step for update MiniOS7.(save the image file to SRAM.)
11 | BIOS1 | The 2nd step for update MiniOS7.(write the image file to FLASH memory.)(After update will reset the system.)
12 | LOAD | DOWNLOAD file to FLASH memory.
13 | DIR [/crc] | Display information about files saved in Flash memory. use the option /crc will also do CRC-16 check.
14 RUN fileno Execute the file that file index is "fileno". (only .BAT .COM .EXE files can be executed.)
File index is begin from 0, use command DIR will show the file index.
15 Execution file name run that file. (if not key-in the full filename, MiniOS7 will search ".BAT" first, then ".COM" and final ".EXE".
If the filename is the same as command of MiniOS7, please use full filename.(For example: "led.exe")
16 DELETE [/y]
DEL [/y] 		DELETE all files saved in Flash memory.(will ask user to press 'y' then DELETE the files.)
(06/07/2000 add) option : /y. Delete files directly.
17 RESET reset the system.
(08/15/2000 add)
The command "RESET" is use software RESET, the hardware signal /RESET will not be send out.
If want the hardware signal /RESET to be send out, please use DIAG WDT or use turn POWER off to reset system.
18 DIAG [option] options are as follows:
ram : check SRAM
eeprom : check EEPROM
nvram : Check NVRAM
led : check LED
led5 : check 5DigitLed
flash : check FLASH MEMORY
wdt : check WatchDog Timer
clock : (check)display system TIMER ticks.
All : Check all items of above.
IO : Go into the sub-function to check I/O port, can use commands: inp, inpw, outp, outpw, "q" to quit.
ON : Set to show the debug message.
OFF : Set to hide the debug message.

If no option will show the INIT* status, SRAM/FLASH size, system reset status,and so on.
19 BAUD baudrate Set new BAUDRATE(300-115200).
(06/07/2000 add):@BAUD baudrate. The same function, but do not send message to COM1.(For use on autoexec.bat)
20 | TYPE filename [/b] | Display the contents of the specified file. use /b will show hex code.
21 | REP [/#] COMMAND | Repeat the COMMAND [#] times. If do not specify the repeat times, it will repeat infinitely.
22 RESERVE [n] (05/25/2000 add)
If use the parameter n, set to reserve n sectors of Flash Memory for user to store data.
Else will show the reserved sector number of Flash Memory.
23 LOADR (06/30/2000 add)
The same function as "LOAD", but the file is stored to SRAM.
Only one file can be stored in SRAM, use LOADR again will overwrite the last file.
Use the command "runr" to run the program stored in SRAM.
24 RUNR [param1 [param2...]] (06/30/2000 add)
Run the program stored in SRAM.(only one file, need not key-in the filename.)
25 I/INP port
IW/INPW port 		(07/25/2000 add)
Read data from Input PORT.
port is the port to read, in HEX.
I/INP read one BYTE(8-BITS mode).
IW/INPW read one WORD(16-BITS mode).
26 O/OUTP port value
OW/OUTPW port value 		(07/25/2000 add)
Output data to the Output PORT.
port is the output port, in HEX.
value is the output data, in HEX.
O/OUTP output one BYTE(8-BITS mode).
OW/OUTPW output one WORD(16-BITS mode).
27 DI (07/25/2000 add)(FOR 7188XC/7521)
Read the status of DI1/2/3 pins. 0:LOW,1:HIGH.
28 DO1 0/1 (07/25/2000 add)(FOR 7188XC/7521)
Set the output value of DO1 pin.[Note 1]
0 : output LOW,1 : output HIGH.
29 DO2 0/1 (07/25/2000 add)(FOR 7188XC/7521)
Set the output value of DO2 pin.[Note 1]
0 : output LOW,1 : output HIGH.
30 DO3 0/1 (07/25/2000 add)(FOR 7188XC/7521)
Set the output value of DO3 pin.[Note 1]
0 : output LOW,1 : output HIGH.
31 OUTWAVE port freq hi lo (07/25/2000 add)(FOR 7188XC/7521/7188e/8000)
Set TO_0/TO_1 to output DUTY CYCLE waveform.[Note 2]
  1. port : 0, set output from TO_0 pin. 1, set output from TO_1 pin.
  2. freq : frequency.
    When CPU clock=40M Hz, Maximun frequency is 5M Hz,Minimun frequency is 77Hz.
    When CPU clock=20M Hz, Maximun frequency is 2.5M Hz, Minimun frequency is 77Hz.
  3. hi/lo : Set the high/low ratio. (Use HI:LO=30:70 is the same as HI:LO=3:7 or HI:LO=6:14)
32 STOPWAVE port (07/25/2000 add)(FOR 7188XC/7521/7188e/8000)
Stop to output DUTY CYCLE waveform from TO_0/TO_1.
port : 0, stop output from TO_0 pin. 1, stop output from TO_1 pin.
33 SETDO pin 0/1 (07/25/2000 add)(FOR 7188XC/7521/7188e/8000)
Set output status for I/O BUS.(only when the PIO pin is set on output mode will work. The PIO pins that user can use please refer to "SETPIO".)
0 : output LOW, 1: output HIGH.
34 SETPIO pin [mode] (07/25/2000 add)(FOR 7188XC/7521/7188e/8000)(Please use it carefully.)
Set the mode of PIO pin.
  1. pin : AM188ES PIO pin number. (Please refer to User'S Manual of AM188ES.)
    User can use are as follows:( pin can be used will be different between modules.)
    1. TO_0(pin=10).
    2. TO_1(pin=1).
    3. TI_0(pin=11).
    4. TI_1(pin=0).
    5. DIO4(pin=4).
    6. DIO9(pin=9).
    7. DIO14(pin=14).
  2. mode =
    0 : NORMAL,
    1 : input with pull up/down,
    2 : output,
    3 : input without pull up/down.
  3. If do not key-in the parameter "mode", will show the current mode of the PIO pin.[12/21/2000]

Note 1 : The output pins(DO1/2/3) of 7188XC series are Open Collector, user maybe add pull up resister to work well.
Note 2 : The DUTY CYCLE wave form output is not for any ratio of HI:LO, and not for any frequency.
The output frequency equal to CPU CLOCK/4/(high+low), and high+low <= 65536, and minimum value of high/low is 1.
[Index] [Back]
[Command of MiniOS7] Ver.1.3.1
Final update date:[01/30/2001], By: Tsai,Kun-Ting.
Any question please E-Mail to:ICPDAS_SERVICE


Connect 7188X/I-8000 series to PC

  1. Please run 7188x.EXE on PC side. (7188.EXE is a DOS exe file, can be run on MS-DOS or the DOS box of WIN9x/WIN-NT/WIN2K).

  2. Please set to use the proper COMPORT (COM1(ALT_1) or COM2(ALT_2)), and the speed & protocol set to 115200,N,8,1.
    3. (If use I-7188, must connect to COM4 of I-7188, and also set to 115200,N,8,1.)

  3. Turn on the power of 7188X/I-8000. One of the following two conditions will occur.
    1. If INIT* pin connect to GND/INIT*COM will show the version message of MiniOs7 and (maybe show)the serial number of the module, then will show the command pormpt 7188x> or 8000>ЎC
    2. If INIT* pin is floatting, MiniOS7 will search the file "AUTOEXEC.BAT", if find it, then run it. After run autoexec.bat also show the command prompt 7188x> or 8000>.

  4. After show the command prompt 7188x> or 8000>, user can send command to 7188X/I-8000.
[Index] [Back]
[Connect 7188X/I-8000 series to PC] Ver.1.3.1
Final update date:[01/29/2001], By: Tsai,Kun-Ting.


I-8000 series basic wiring
  • I-8000 series will attach one cable with both side D-TYPE 9PIN connector. Please connect it between COM1(or COM2) of PC and COM1 of I-8000.
  • And need 10-30V DC power connect to +VS and GND of 7188X/I-8000 series.
  • The detail wiring please refer to the hardware user's manual of individual modules.
[Index] [Back]
[I-8000 series basic wiring] Ver.1.3.1
Final update date:[01/17/2001], By: Tsai,Kun-Ting.


Important Note

  1. Only when the system of 7188XC/8000 with RTC hardware can :
    1. Read or set the system time and date.
    2. Read or write the 31 bytes NVRAM.

  2. INIT* pin can be used as follows:
    1. Program development period. It is better connect INIT* pin to GND(I-8000 is connect to INIT*COM), On this condition, after system boot, MiniOS7 will not search "autoexec.bat" and run it. But jsut send out the OS message to COM1 then wait for user's command come from COM1(The command line mode.). User can download file(s) to Flash, can test the hardware of the system, can delete files, also can update MiniOS7.
    2. Final release period. INIT* pin must be floatting or connect to +VS. After boot the system will search "autoexec.bat" and run it. Before the autoexec.bat is run, system will not send any message to COM1, so user's program also can use COM1 to connect other RS-232/RS-485 device. After run AUTOEXEC.BAT , system will back to command line mode, the same as after boot with INIT* connect to GND.

  3. The system boot time for I-7188(use ROM-DOS) is about 4-5 seconds. Now 7188XC/8000 series use MiniOS7, the system boot time is less then 0.1 second.
    Note:
    1. when CPU clock=20MHz the boot time is about 0.1 second, CPU clock=40MHz is about 0.05 second. But I-8000 series is about 0.5 second (Waiting for some 87K modules).
    2. (The test method please refer to :"DEMO\rsttime\reset.C")
    3. If connect to some device that has longer boot time, USER's program must add some delay to wait the device. [12/21/2000]

  4. Most functions support for I-7188 can be used on 7188XC/I-8000 series, but need re-compile the program. Some functions must use another one to instead, as follows:

    1. If use getch4( ),getch( ), please changed to -->Getch
    2. If use kbhit4( ),kbhit( ), please changed to -->Kbhit
    3. If use putch4( ),putchar( ),please changed to -->Putch
    4. If use ungetch4( ),please changed to -->Ungetch
    5. If use puts( ), please change to -->Puts
    6. If use printf( ),please changed to -->Print
    7. (New)Scanf(instead for C's scanf( ))
    8. If use Is7188( ),please changed to -->Is7188x( )/Is8000( )(Can not use Is7188())
      9. (User also can use kbhit() and getch(), but not suggested.)

  5. When use RS-485 need not software to control the data direction of RS-485 bus. ( The built-in Self-Tuner will auto control it.) ( I-7188 doesn't built-in Self-Tuner, so also need use software to control it.)

  6. Now cannot support the execution file make by MS QuickBASIC.

  7. Note for the file system for MiniOS7:
    1. Files of The same filename can be download many times.(If the Memory space of Flash is enough.)
    2. When user want run the file, OS will search the lastest download file to run. If user want run the early one must use command:"run fileno".

  8. The utility for MiniOS7 on PC side is 7188X.EXE, functions are the same as 7188.EXE. Just add the new DOWNLOAD function. When DOWNLOAD file, just according to the message displayed to press ALT_E.

  9. User's program written for I-7188 need do some modify to be used on 7188X/I-8000 series.

[Index] [Back]
[Important Note] Ver.1.3.1
Final update date:[01/17/2001], By: Tsai,Kun-Ting.


MiniOS7

MiniOS7

MiniOs7 is designed by ICPDAS for 7188X/I-8000 series embeded controller.
Support the following functions:

  1. File download and execute.

  2. System diagnose.

  3. Can update MiniOS7.

  4. Can excute the execution file of DOS (.EXE,.COM), also support .BAT file.

  5. After system boot, OS can auto run "AUTOEXEC.BAT".

NOTE 1:

  • MiniOS7 can run limited DOS excution files.
  • Support the memory management functions of INT 21H.
  • But doesn't support the file I/O functions of INT 21H.(The library support functions to read file.)
  • When one program is running, cannot run another program.(Can not use C's function : system();)

NOTE 2:

  • On PC side, must run "7188X.EXE" to link with MiniOS7 for download file.

NOTE 3:

  • Support special library for each modules that use MiniOS7 as OS.
  • Except the library for C language, also will support library(unit) for Turbo PASCAL.
[Index] [Back]
[MiniOS7] Ver.1.3.1
Final update date:[01/29/2001], By: Tsai,Kun-Ting.


MiniOS7 命令範例說明 LOAD

MiniOS7 COMMAND

LOADR

[Index] [Back]

  1. Command LOADR use to download file to SRAM of MiniOS7 system.
    1. After key-in command LOADR, MiniOS7 will show message want user press ALT_E, after press ALT_E, user must key-in the filename.
    2. After the file is download into the system. Use command dir will don't show the message of the information of this file,because the file is saved on SRAM,not Flash.
    3. If downloading the file wasn't successful, plesae try use any of the following methods to download again:
      • Please use COMMAND reset to reset system, then try again.
      • Use command baud for set to lower communication speed,for example 57600, then try again.
      • Press enter key some times to ensure no more other data in the input buffer of the system.
      • Don't press ALT_E too early, must wait the screen show the message then press ALT_E.
    4. The file had already downloaded to SRAM.If power off or reset the system,the file will disappear .Besides, download the another new file to the system,the old will be replaced by new,because only a file can download to SRAM.If the size of the file is larger,it isn't executed on SRAM,Because it will casue that the memory isn't enough.
    5. Use command LOADR to download the file to SRAM ,only run the command RUNR to execute this file.

    6. Press the F2 to set the file for auto download process,then press ALT+F10.It will auto download the file to SRAM.Run the command RUNR to execute this file.(Press F10 ,It mean after downloading the file,the system will auto run this file right away.)

[Index] [Back]

[MiniOS7 COMMAND_LOAD_DIR] Ver.1.3.1
Final update date:[08/12/2002], By: Tsai,Kun-Ting.


MiniOS7 COMMAND_LED5

MiniOS7 COMMAND
LED5
[Index] [Back]

  1. Command LED5 has two mode:
    1. led5 position[.] value
      • position: range from 1 to 5, if add "." will show the point on the right lower coner.
        (For I-8000 series range is 1 to 7)
      • value: range is 0 to 17. Also can use Hxxxx to use hex value for direct control the ON/OFF status of every segment on LED.
    2. led5 time on | off
      • time on : Turn on update time display.(display format is H.MM.SS)
      • time off : Turn off update time display.
      (update time display is turn on by default on command line mode.)

  2. EXAMPLE:
    7188x>led5 time off    -->Stop update time display
7188x>led5 1 7
7188x>led5 2 1
7188x>led5 3 8
7188x>led5 4. 8
7188x>led5 5 13         -->Display 7188.d
7188x>led5 time on      -->Continue to update time display again.
7188x>
[Index] [Back]
[MiniOS7 COMMAND_LED5] Ver.1.3.1
Final update date:[02/01/2001], By: Tsai,Kun-Ting.


MiniOS7 COMMAND_LOAD_DIR

MiniOS7 COMMAND
LOAD/DIR
[Index] [Back]

  1. Command DIR will show all file information of the files stored in flash memory.
    If use the option /crc, will do the crc16 check.
    If any file show : CRC ERROR , please re-DOWNLOAD that file.

  2. Command LOAD use to download file to Flash Memory of MiniOS7 system.
    1. After key-in command LOAD, MiniOS7 will show message want user press ALT_E, after press ALT_E, user must key-in the filename.
    2. After file is download, use command dir will show the message of that file.
    3. Suggest user use the Auto-DOwnload function of 7188xw.exe[F2/F8/F9/F10].
    4. If cannot download file successfully, plesae try use any of the following methods to download again:
      • Please use COMMAND reset to reset system, then try again.
      • Use command baud for set to lower communication speed,for example 57600, then try again.
      • Press enter key some times to ensure no more other data in the input buffer of the system.
      • Don't press ALT_E too early, must wait the screen show the message then press ALT_E. ( If use function key F2/F8/F9/F10 need not worry about it.)

  3. COMMAND EXAMPLE:
    7188x>dir
( 0)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C000:001C-C321:000A
( 1)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C321:0026-C643:0004
( 2)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C643:0020-C964:000E
Total File number is 3  Free space=158102 bytes
7188x>load
File will save to C964:000E
StartAddr-->C000:964D
Press ALT_E to download file!

FileName:echo485.exe
Size=12544
Download 12798 Bytes OK.
Transfer time is: 2.197802 seconds

Test count=72309
Back to Terminal mode
7188x>dir
 0)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C000:001C-C321:000A
 1)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C321:0026-C643:0004
 2)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C643:0020-C964:000E
 3)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C964:002A-CC86:0008
Total File number is 4  Free space=145276 bytes
7188x>
... ... ... ... ... ... ... ... .... ... ...
7188x>dir
 0)demo6.exe    12/18/1999 11:56:21  10670[029AE]C002:0000-C29C:000E
 1)echo485.exe  02/23/2000 14:20:00  13088[03320]C29E:000E-C5D0:000E
 2)echo485.exe  02/23/2000 14:20:00  13088[03320]C5D2:000E-C904:000E
 3)echo485.exe  02/23/2000 14:20:00  13088[03320]C906:000E-CC38:000E
 4)echo485.exe  02/23/2000 14:20:00  13088[03320]CC3A:000E-CF6C:000E
Total File number is 5  Free space=133394 bytes

7188x>dir /crc
 0)demo6.exe    12/18/1999 11:56:21  10670[029AE]C002:0000-C29C:000E{CRC OK}
 1)echo485.exe  02/23/2000 14:20:00  13088[03320]C29E:000E-C5D0:000E{CRC OK}
 2)echo485.exe  02/23/2000 14:20:00  13088[03320]C5D2:000E-C904:000E{CRC OK}
 3)echo485.exe  02/23/2000 14:20:00  13088[03320]C906:000E-CC38:000E{CRC OK}
 4)echo485.exe  02/23/2000 14:20:00  13088[03320]CC3A:000E-CF6C:000E{CRC OK}
Total File number is 5  Free space=133394 bytes

7188x>
  4. Load Example:
    The Function of the Load and Dir

    The Function of the Auto download [F2/F8/F9/F10〕

    5.

[Index] [Back]

[MiniOS7 COMMAND_LOAD_DIR] Ver.1.3.1

Final update date:[08/12/2002], By: Tsai,Kun-Ting.


MiniOS7 COMMAND_USE EEPROM

MiniOS7 COMMAND
USE EEPROM
[Index] [Back]
  1. After key-in command "USE EEPROM" can use the following commands:
    1. block no: Change to new BLOCK, the range of no is 0-7 .
    2. d[b|w|L] addressЎG
      Dump 64 bytes data from the adrress.
      b:use byte as dump unit. w: use word as dump unit,L: use long(dword) as dump unit.
    3. E[b|w|L] addressЎG
      Input new data to EEPROM from the address of current block.
      b:use byte as dump unit. w: use word as dump unit,L: use long(dword) as dump unit.
      It will display current value first, then waiting user key-in the new value. Then display next address value. user can key-in next value or just key-in '.' to end input.
    4. quit / exit : Exit "USE EEPROM".
  2. Example:
    7188x>use eeprom

    [EEPROM:]block 4
Set Current Block to 4
[EEPROM:]d 0
Block 4
B(000):004[04]. 005[05]. 006[06]. 007[07]. 008[08]. 009[09]. 010[0A]. 011[0B].
B(008):012[0C]. 013[0D]. 014[0E]. 015[0F]. 016[10]. 017[11]. 018[12]. 019[13].
B(016):020[14]. 021[15]. 022[16]. 023[17]. 024[18]. 025[19]. 026[1A]. 027[1B].
B(024):028[1C]. 029[1D]. 030[1E]. 031[1F]. 032[20]  033[21]! 034[22]" 035[23]#
B(032):036[24]$ 037[25]% 038[26]& 039[27]' 040[28]( 041[29]) 042[2A]* 043[2B]+
B(040):044[2C], 045[2D]- 046[2E]. 047[2F]/ 048[30]0 049[31]1 050[32]2 051[33]3
B(048):052[34]4 053[35]5 054[36]6 055[37]7 056[38]8 057[39]9 058[3A]: 059[3B];
B(056):060[3C]< 061[3D]= 062[3E]> 063[3F]? 064[40]@ 065[41]A 066[42]B 067[43]C
[EEPROM:]e 0
Block 4
B(0)=4 --> 0
B(1)=5 --> 1
B(2)=6 --> 2
B(3)=7 --> 3
B(4)=8 --> .
[EEPROM:]ew 4
Block 4
Word(4)=2312 --> 123
Word(6)=2826 --> 124
Word(8)=3340 --> 1255
Word(10)=3854 --> .
[EEPROM:]dw 4
Block 4
W(004):000123[007B] 000124[007C] 001255[04E7] 003854[0F0E]
W(012):004368[1110] 004882[1312] 005396[1514] 005910[1716]
W(020):006424[1918] 006938[1B1A] 007452[1D1C] 007966[1F1E]
W(028):008480[2120] 008994[2322] 009508[2524] 010022[2726]
W(036):010536[2928] 011050[2B2A] 011564[2D2C] 012078[2F2E]
W(044):012592[3130] 013106[3332] 013620[3534] 014134[3736]
W(052):014648[3938] 015162[3B3A] 015676[3D3C] 016190[3F3E]
W(060):016704[4140] 017218[4342] 017732[4544] 018246[4746]
[EEPROM:]dl 0
Block 4
L(000):00050462976[00000100] 00008126587[0000007B]
L(008):00252576999[000004E7] 00319951120[00001110]
L(016):00387323156[00001514] 00454695192[00001918]
L(024):00522067228[00001D1C] 00589439264[00002120]
L(032):00656811300[00002524] 00724183336[00002928]
L(040):00791555372[00002D2C] 00858927408[00003130]
L(048):00926299444[00003534] 00993671480[00003938]
L(056):01061043516[00003D3C] 01128415552[00004140]
[EEPROM:]exit
7188x>
[Index] [Back]
[MiniOS7 COMMAND_USE EEPROM] Ver.1.3.1
Final update date:[01/17/2001], By: Tsai,Kun-Ting.


MiniOS7 COMMAND_USE FLASH

MiniOS7 COMMAND
USE FLASH
[Index] [Back]
  1. After key-in command "USE FLASH" can use the following commands:
    1. segment nnnn: Set new segment(HEX value), range of nnnn is 0-F000.(Both the range of Flash or SRAM can be used.)
    2. d[b|w|L] address：
      Dump 64 bytes data begin from the address.
      b:use byte as dump unit. w: use word as dump unit,L: use long(dword) as dump unit.
    3. E[b|w|L] address：
      Input new data to FLASH from the address of current block.(only when current segment is on FLASH will work.)
      b:use byte as dump unit. w: use word as dump unit,L: use long(dword) as dump unit.
      It will display current value first, then waiting user key-in the new value. Then display next address value. user can key-in next value or just key-in '.' to end input.
    4. erase segment: Erase one SECTOR of Flash memory on the segment.(all 64K data will become 0XFF.)
    5. quit / exit : Exit "USE EEPROM".
  2. COMMAND EXAMPLE:
    7188x>use flash
Manufacturer=C2(MXIC) ID=B0(size=256K) Protect mode=x0000000
[Flash:]segment c000
Set Current Segment to C000
[Flash:]d
Segment C000
0000: 88 71 75 61 72 74 2E 68 00 00 00 00 00 00 14 0C | equart.h      ?♀
0010: 1F 12 18 11 B1 05 00 00 00 00 02 C0 0D 38 FF FF | ▼?↑???    ?└.8??
0020: 0D 0A 23 64 65 66 69 6E 65 20 54 78 62 75 66 09 | ..#define Txbuf○
0030: 20 20 30 78 30 30 09 20 20 20 2F 2A 20 74 78 20 |   0x00○   /* tx
0040: 62 75 66 66 65 72 20 2A 2F 0D 0A 23 64 65 66 69 | buffer */..#defi
0050: 6E 65 20 52 78 62 75 66 09 20 20 30 78 30 30 09 | ne Rxbuf○  0x00○
0060: 20 20 20 2F 2A 20 72 78 20 62 75 66 66 65 72 20 |    /* rx buffer
0070: 2A 2F 0D 0A 23 64 65 66 69 6E 65 20 44 6C 6C 09 | */..#define Dll○

[Flash:]erase e000
Segment E000 is being erased....
Erase Segment E000
success
Loop=-31511
[Flash:]segment e000
Set Current Segment to E000
[Flash:]d
Segment E000
0080: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
0090: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
00A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
00B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
00C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
00D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
00E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
00F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |

[Flash:]e 0
Segment E000
B(0000)=FF --> 30
B(0001)=FF --> 31
B(0002)=FF --> 32
B(0003)=FF --> 33
B(0004)=FF --> 34
B(0005)=FF --> 35
B(0006)=FF --> 36
B(0007)=FF --> 37
B(0008)=FF --> .
[Flash:]d 0
Segment E000
0000: 30 31 32 33 34 35 36 37 FF FF FF FF FF FF FF FF | 01234567
0010: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
0020: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
0030: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
0040: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
0050: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
0060: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |
0070: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |

[Flash:]ew 10
Segment E000
Word(000A)=-1 --> 0123
Word(000C)=-1 --> 4567
Word(000E)=-1 --> 89AB
Word(0010)=-1 --> CDEF
Word(0012)=-1 --> .
[Flash:]d 0
Segment E000
0000: 3130 3332 3534 3736 FFFF 0123 4567 89AB
0010: CDEF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
0020: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
0030: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
0040: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
0050: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
0060: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF
0070: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF

[Flash:]dl 0
Segment E000
0000: 33323130 37363534 0123FFFF 89AB4567
0010: FFFFCDEF FFFFFFFF FFFFFFFF FFFFFFFF
0020: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0030: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0040: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0050: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0060: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0070: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF

[Flash:]exit

7188x>
[Index] [Back]
[MiniOS7 COMMAND_USE FLASH] Ver.1.3.1
Final update date:[01/17/2001], By: Tsai,Kun-Ting.


MiniOS7 COMMAND_USE NVRAM

MiniOS7 COMMAND
USE NVRAM
[Index] [Back]

  1. After key-in command "USE NVRAM" can use the following commands:
    1. address:(0-30) dispaly the data stored in that address.(1 byte)
    2. address value: write new data(value) to the address.
    3. address w: display the data stored in address and address+1 .(1 word,data in address is low byte, in address+1 is high byte.)
    4. address w value: write new data(1 word) to address and address+1.
    5. quit / exit : quit "USE NVRAM" command, back to MiniOS7.

  2. Example:
    7188x>use nvram
[NVRAM:]0
[0]=100(64)
[NVRAM:]1
[1]=200(C8)
[NVRAM:]2
[2]=152(98)
[NVRAM:]3
[3]=255(FF)
[NVRAM:]0 123
Write 123 to [0]
[NVRAM:]1 122
Write 122 to [1]
[NVRAM:]2 w 65535
write -1(FFFF) to Word[02]
[NVRAM:]0
[0]=123(7B)
[NVRAM:]1
[1]=122(7A)
[NVRAM:]2
[2]=255(FF)
[NVRAM:]3
[3]=255(FF)
[NVRAM:]exit
7188x>
[Index] [Back]
[MiniOS7 COMMAND_USE NVRAM] Ver.1.3.1
Final update date:[01/17/2001], By: Tsai,Kun-Ting.


MiniOS7 for 7188x/I-8000 series
Index
  1. I-8000 series basic wiring
  2. Connect to PC
  3. MiniOS7
  4. Command of MiniOs7
  5. Important Note
  6. MiniOS7 library
  7. Using 7188x.EXE
  8. Using 7188xw.EXE
  9. Update MiniOS7
[Index] [Back]
[MiniOS7 for 7188x/I-8000 series] Ver.1.3.1
Final update date:[08/12/2002], By: Tsai,Kun-Ting.


MiniOS7 for I-8000

MiniOS7 for I-8000 入門手冊
〈繁體中文版〉

By:ICPDAS 蔡坤廷(Tsai, Kun-Ting)
E-MAIL:service@icpdas.com
[Index] [Back]
  1. 接線
  2. 與PC連線
  3. MiniOS7
  4. 程式庫
  5. MiniOs7的操作命令
  6. 其他相關說明
  7. 命令範例及說明
  8. 範例程式說明
  9. 7188x.EXE操作說明
  10. MiniOS7更新說明
接線

I-8000系列產品會附上一條兩端 D-TYPE 9PIN 接頭，一公一母的接線。請接到 PC 的 COM1（或COM2）及I-8000的COM1。另外需要10-30VDC電源接到I-8000的+VS及GND。

與PC連線
  1. 請在PC端執行7188x.EXE（這是一個DOS模式的執行檔，可以在純DOS下或WIN9x或WIN-NT或WIN2K的DOS BOX下執行）。
  2. 請將依實際接線將COM PORT設成COM1(ALT_1)或COM2(ALT_2)。傳輸速度設成115200,N,8,1。
    3. (如果是使用7188的話請用原來的接線接到7188的COM4，傳輸速度設成115200,N,8,1。)
  3. 打開I-8000的電源。此時有兩種可能的狀況：
    • 如果INIT*接腳有接到INIT*COM將會出現MiniOs7的版本訊息。然後出現8000>。
    • 如果INIT*接腳不接，I-8000將會開始執行AUTOEXEC.BAT所設定的命令。執行完後一樣出現8000>。
  4. 當出現8000>後就可以下命令給I-8000的MiniOS7了。
MiniOS7

MiniOs7 是 ICPDAS 針對 7188/8000 系列植入式控制器所開發的小型作業系統。
提供下列功能：

  1. 基本的檔案下載及執行功能。
  2. 系統硬體診斷功能。
  3. 可以更新MiniOS7。
  4. 執行DOS格式的執行檔（.EXE，.COM），也支援.BAT。
  5. 可以使用AUTOEXEC.BAT來設定一開機就要執行的程式。

註1：他可以執行有限的DOS執行檔（如果使用ROM-DOS的話相容性會較大）， 提供 INT 21H 記憶體管理的功能，但是沒有 INT 21H 的檔案讀寫功能 (但是可以透過程式庫提供的副程式讀取檔案)。 也沒有 RUN 另外一個 PROCESS 的功能（無法用 C 的 system();）。

註2：PC 端一律執行 7188X.EXE 與 MiniOS7 連線。

程式庫

  1. 延續7188的慣例，7188XC/7521/7522/7523/8000仍提供兩種程式庫給USER使用，SMALL/LARGE兩種MODEL。
    • 7188XC/7521/7522/7523的版本分別是:7188xS.lib是SMALL MODEL的LIB，7188xL.lib是LARGE MODEL的LIB。宣告檔是7188x.h。
    • 7188的版本分別是i7188S.lib及i7188L.lib,i7188.h。[11/17/2000修正]
    • 8000的版本分別是8000S.lib及8000L.lib,8000.h。

  2. 程式庫中提供的FUNCTIONS與7188所提供的大致一樣， 另外有一組副程式可以用來讀取存放在 Flash Memory 內的檔案，可讀但無法寫入。

  3. 另外配合 7188x 系列擴充子板的功能及 8000 的 BUS 提供一些相關的副程式，如I/O方向的設定等。

  4. 詳細內容請看7188Xc/7521/7522/7523/8000的程式庫說明。

MiniOs7的操作命令
    命令列提示為：7188x>（在7188上的是7188>，在8000上的是8000>），命令不分大小寫。
1 | LED ON | 設定紅色LED亮起來。(在8000是RUN_LED亮起來)
2 | LED OFF | 設定紅色LED熄掉。(在8000是RUN_LED熄掉)
3 | LED5 pos value | 設定5DiditLed某個位置顯示某值。
4 | USE NVRAM | 進入設定或讀取NVRAM的子功能。(在8000-485無)
5 | USE EEPROM | 進入設定或讀取EEPROM的子功能。
6 | USE FLASH | 進入設定或讀取FLASH的子功能。（所有記憶體的內容都可讀取）
7 USE COM2 /option 進入使用COM2（RS-485）的子功能。（類似echo485.exe的功能）
option 可以是：
axx:設定Auto scan的起始位址。
bxxxx:設定baudrate。
cxxxx:設定直接由COM2送出的命令。
dx:設定data bits，7或8。
exx:設定Auto scan的結束位址。
px:設定Parity。（0:NONE, 1:EVEN, 2:ODD)
q:自動結束。
txx:設定Timeout時間(ms)。
8 | DATE [日期] | 設定或讀取日期（有RTC時才有效）。(在8000-485無)
9 | TIME [時間] | 設定或讀取時間（有RTC時才有效）。(在8000-485無)
10 | MCB | 檢查目前記憶體的使用情形。（內部測試用）
11 | UPLOAD | 更新MiniOS7的第一步驟。（先將資料存到SRAM）
12 | BIOS1 | 更新MiniOS7的第二步驟。（將SRAM的資料寫到FLASH中）（更新完直接RESET）
13 | LOAD | DOWNLOAD程式到FLASH。Download 檔案時所使用的速度與一般下命令時相同。
14 | DIR [/crc] | 顯示目前所有DOWNLOAD的檔案編號名稱日期大小及放置位置以及FLASH剩餘空間。有加上/crc時還會對檔案作CRC-16的檢查，所以速度慢一些。
15 | RUN fileno | 執行第幾號程式。（只有.BAT.COM.EXE可以執行）
16 | 輸入可執行檔的檔名 | 執行該檔。（不給副檔名時依照.BAT.COM.EXE的順序來找檔案，如果檔名與其他命令一樣時，請加上副檔名就可順利執行。）
17 DELETE（或DEL）[/y] DELETE檔案，一定是全部DELETE掉。（會詢問USER，按'y'之後才DELETE檔案。）
（06/07/2000新增）option : /y 直接DELETE 檔案。
18 RESET reset 7188X(7188,8000)
（08/15/2000新增說明）
使用RESET命令是用軟體的方式來RESET，硬體信號/RESET並不會送出。
如果要有/RESET信號請用DIAG WDT或關掉POWER重開。
19 DIAG [option] option可以是
ram：檢查SRAM
eeprom：檢查EEPROM
nvram：檢查NVRAM
led：檢查LED
led5：檢查5DigitLed
flash：檢查FLASH MEMORY
wdt：檢查WatchDog Timer
clock：（檢查）顯示系統TIMER。
All：代表以上各項全部檢查。
IO：進入可以對IO port下命令的狀態，可用inp, inpw, outp, outpw等命令。
ON：設定顯示除錯訊息。
OFF：設定不顯示除錯訊息。
20 BAUD baudrate 設定新的BAUDRATE（300-115200）。
（06/07/2000新增）：@BAUD baudrate。功能相同，但不送出訊息到COM1。
21 | TYPE filename [/b] | 列印檔案內容。加/b以二進位碼顯示。
22 | REP [/#] 命令 | 重複執行命令[#次]。
23 RESERVE [n] (05/25/2000 新增)
有輸入n時，設定保留 n 個Flash Memory sector給USER的程式使用。
沒有輸入n時，查詢保留的Flash Memory sector個數。
24 LOADR (06/30/2000 新增)
功能與LOAD相同，操作方式也一樣。但檔案是LOAD到SRAM裡頭，而不是存到FLSAH。
目前SRAM只能存放一個檔案，下一次LOAD時會覆蓋掉原先的檔案。
LOAD到SRAM的檔案應該是執行檔（.EXE或.COM）。
25 RUNR [param1 [param2...]] (06/30/2000 新增)
執行存放在SRAM裡頭的執行檔。因為檔案只有一個，不必給檔名。
26 I/INP/IW/INPW port (07/25/2000 新增)
讀入Input PORT的值。
port 為16進制(HEX)。
I/INP為BYTE（8-BITS）模式。
IW/INPW為WORD（16-BITS）模式。
27 O/OUTP/OW/OUTPW port value (07/25/2000 新增)
設定Output PORT的輸出值。
port 為16進制(HEX)。
value 為16進制(HEX)。
O/OUTP為BYTE（8-BITS）模式。
OW/OUTPW為WORD（16-BITS）模式。
28 DI (07/25/2000 新增)(FOR 7188XC/7521)
讀取DI1/2/3的狀態。0為LOW，1為HIGH。
29 DO1 0/1 (07/25/2000 新增)(FOR 7188XC/7521)
設定DO1的輸出值。[註一]
0輸出LOW，1輸出HIGH。
30 DO2 0/1 (07/25/2000 新增)(FOR 7188XC/7521)
設定DO2的輸出值。[註一]
0輸出LOW，1輸出HIGH。
31 DO3 0/1 (07/25/2000 新增)(FOR 7188XC/7521)
設定DO3的輸出值。[註一]
0輸出LOW，1輸出HIGH。
32 OUTWAVE port freq hi lo (07/25/2000 新增)(FOR 7188XC/7521)
由TO_0/TO_1輸出可設定DUTY CYCLE的波形。[註二]
  1. port：0 由TO_0輸出，1 由TO_1輸出。
  2. freq：頻率。最大2.5MHz。
  3. hi/lo：設定HI/LO的比值用。如HI：LO=30:70時，hi=3/lo=7 或hi=6/lo=14是一樣的結果。
33 STOPWAVE port (07/25/2000 新增)(FOR 7188XC/7521)
停止由TO_0/TO_1輸出可設定DUTY CYCLE的波形。
port：0 停止由TO_0輸出，1 停止由TO_1輸出。
34 SETDO pin 0/1 (07/25/2000 新增)(FOR 7188XC/7521)
設定I/O BUS上的輸出信號。（只有相對應的接腳設定在輸出模式時才有效,User會用到請看 35:SETPIO 的說明。）
0輸出LOW，1輸出HIGH。
35 SETPIO pin mode (07/25/2000 新增)(FOR 7188XC/7521)（請小心使用）
設定I/O BUS上接腳的工作模式。
  1. pin：AM188ES PIO接腳的編號。（請參照AM188ES的User'S Manual）
    User會用到的就是：TO_0(pin=10),TO_1(pin=1),TI_0(pin=11),TI_1(pin=0),DIO4(pin=4),DIO9(pin=9),DIO14(pin=14)。
  2. mode：0-NORMAL，1-input with pull up/down，2-output，3-input without pull up/down。

註一：DO1/2/3為Open Collector輸出，USER要加上提升電阻（pull up resister）才能正常使用。
註二：DUTY CYCLE波形的輸出並非所有的HI/LO比例都可以輸出。也不是所有頻率都能輸出。
其他相關說明

  1. 7188XC/8000 有裝 RTC 時才可以讀取或設定系統的時間日期。

  2. INIT*接腳的使用方式如下，
    1. 程式開發階段。應將INIT*接地（在 8000 是接INIT*COM），這時候會從 COM1 送出訊息，並接受命令。不會去執行 AUTOEXEC.BAT 所設定的程式。亦即直接進入操作模式，可以 DOWNLOAD 檔案，可以看記憶體的內容，可以測試 7188X/8000 的硬體。可以 DELETE 檔案（只能全部 DELETE ），可以更新 MiniOs7。
    2. 正式使用的階段。INIT* 接腳應該FLOATTING，亦即不接地。系統會直接執行 AUTOEXEC.BAT，檔案被執行之前不會從 COM1 送出任何訊息，所以拿 COM1 來接其他裝置不會有任何副作用。當 AUTOEXEC.BAT 設定的檔案執行完後，也會回到操作模式，這時候就跟操作模式一樣了。

  3. 原先使用 ROM-DOS 的開機時間約4-5秒，現在應不到 0.1 秒。
    註：CPU clock=20MHz時約0.1秒，CPU clock=40MHz時約0.5秒，8000系列則在power on 時約花0.5 秒的時間。
    （測試時間的方法請看DEMO\rsttime\reset.C）

  4. 大部分在7188可用的FUNCTIONS都可以使用，但一定要重新編譯一次。有些FUNCTION的名稱做一些修改如下：

    1. getch4,getch更改為-->Getch
    2. kbhit4,kbhit更改為-->Kbhit
    3. putch4,putchar更改為-->Putch
    4. ungetch4更改為-->Ungetch
    5. (新增)Puts
    6. printf更改為-->Print
    7. (新增)Scanf(代替原來C的scanf)
    8. Is7188更改為-->Is7188x(原先的Is7188一定無法使用）
      9. (原來C所提供的kbhit()及getch()也已經可以使用)

  5. RS-485的部分不用控制方向（因為有Self-Tuner）

  6. 目前尚待解決的是：
    使用MSC LARGE MODEL產生的程式無法執行。（Ver 1.02(05/18/2000)已經可以用MSC LARGE MODEL了）
    另外QuickBASIC編譯出來的程式也無法執行。

  7. 有關檔案（執行檔與非執行檔都適用）的進一步說明如下：
    1. 相同檔名的檔案可以DOWNLOAD很多次。（如果FLASH Memory的空間夠的話）
    2. 下命令執行時，如果輸入檔名就找最後UPLOAD那一個來執行。如果是檔案編號就是執行該編號的程式。所以可以一個檔案DOWNLOAD進去，測試完後，做了一些修改再DOWNLOAD進去，還是可以使用同樣的檔名。並且執行時會找新DOWNLOAD的檔。而且如果要再執行上次DOWNLOAD的程式也可以（使用RUN FILENO）。

  8. 在PC端的工具程式是7188X.EXE，功能與7188.EXE大致相同。主要加上新的DOWNLOAD功能。DOWNLOAD依照提示按下ALT_E即可。

  9. 原先在7188所寫的程式，需要做一些小修改才可以在7188XC/7521上執行。與第4點有關的都需要做修改。

  10. 原先7188的COM1/2所使用的IC是16C550，但在7188XC/7521並無此IC，故現在7188XC/7521的COM1/2與7188的COM1/2並不相容。如果要相容的話是與原先的COM3/4相容。

命令範例及說明
  1. led5命令範例說明

    2. 命令為led5 position[.] value
    ◆position 為1到5，如果有加上「•」則會顯示'•'，
    ◆value為0到17。也可用Hxxxx輸入16進位值。
    ◆led5 time on重新顯示時間值（只顯示時1位，分2位，秒2位）
    ◆led5 time off可以取消顯示時間。(7188XC/7521的預設狀態會顯示時間在5DigitLed)
    7188x>led5 time off	-->停止顯示時間
7188x>led5 1 7
7188x>led5 2 1
7188x>led5 3 8
7188x>led5 4. 8
7188x>led5 5 13	        -->顯示7188.d
7188x>led5 time on	-->又顯示時間
7188x>
  2. use nvram命令範例說明

    3. ◆直接輸入address(0-30)就顯示該位置現在所存的資料值。
    ◆輸入address value則寫入新的值到該位置。
    ◆輸入address w則顯示address起兩個位置的16位元值。
    ◆輸入address w value則寫入新的16位元值到address起兩個位置內。
    ◆quit或exit回到原先的操作模式。
    7188x>use nvram
[NVRAM:]0
[0]=100(64)
[NVRAM:]1
[1]=200(C8)
[NVRAM:]2
[2]=152(98)
[NVRAM:]3
[3]=255(FF)
[NVRAM:]0 123
Write 123 to [0]
[NVRAM:]1 122
Write 122 to [1]
[NVRAM:]2 w 65535
write -1(FFFF) to Word[02]
[NVRAM:]0
[0]=123(7B)
[NVRAM:]1
[1]=122(7A)
[NVRAM:]2
[2]=255(FF)
[NVRAM:]3
[3]=255(FF)
[NVRAM:]exit
7188x>

  3. use eeprom命令範例說明

    • block no 設定BLOCK（0-7）
    • d[b|w|L] address 從address開始dump 64 bytes資料。
      b:以byte為單位，w：以word為單位，L：以long(dword)為單位。
    • E[b|w|L] address 從address開始dump 64 bytes資料。
      b:以byte為單位，w：以word為單位，L：以long(dword)為單位。
      會先顯示目前的值，在輸入新的值，然後顯示下一位置的值，可繼續輸入，如果不再輸入則輸入'•'結束。
    • Quit 或exit 結束USE EEPROM。
    [EEPROM:]block 4
Set Current Block to 4
[EEPROM:]d 0
Block 4
B(000):004[04]. 005[05]. 006[06]. 007[07]. 008[08]. 009[09]. 010[0A]. 011[0B].
B(008):012[0C]. 013[0D]. 014[0E]. 015[0F]. 016[10]. 017[11]. 018[12]. 019[13].
B(016):020[14]. 021[15]. 022[16]. 023[17]. 024[18]. 025[19]. 026[1A]. 027[1B].
B(024):028[1C]. 029[1D]. 030[1E]. 031[1F]. 032[20]  033[21]! 034[22]" 035[23]#
B(032):036[24]$ 037[25]% 038[26]& 039[27]' 040[28]( 041[29]) 042[2A]* 043[2B]+
B(040):044[2C], 045[2D]- 046[2E]. 047[2F]/ 048[30]0 049[31]1 050[32]2 051[33]3
B(048):052[34]4 053[35]5 054[36]6 055[37]7 056[38]8 057[39]9 058[3A]: 059[3B];
B(056):060[3C]< 061[3D]= 062[3E]> 063[3F]? 064[40]@ 065[41]A 066[42]B 067[43]C
[EEPROM:]e 0
Block 4
B(0)=4 --> 0
B(1)=5 --> 1
B(2)=6 --> 2
B(3)=7 --> 3
B(4)=8 --> .
[EEPROM:]ew 4
Block 4
Word(4)=2312 --> 123
Word(6)=2826 --> 124
Word(8)=3340 --> 1255
Word(10)=3854 --> .
[EEPROM:]dw 4
Block 4
W(004):000123[007B] 000124[007C] 001255[04E7] 003854[0F0E]
W(012):004368[1110] 004882[1312] 005396[1514] 005910[1716]
W(020):006424[1918] 006938[1B1A] 007452[1D1C] 007966[1F1E]
W(028):008480[2120] 008994[2322] 009508[2524] 010022[2726]
W(036):010536[2928] 011050[2B2A] 011564[2D2C] 012078[2F2E]
W(044):012592[3130] 013106[3332] 013620[3534] 014134[3736]
W(052):014648[3938] 015162[3B3A] 015676[3D3C] 016190[3F3E]
W(060):016704[4140] 017218[4342] 017732[4544] 018246[4746]
[EEPROM:]dl 0
Block 4
L(000):00050462976[00000100] 00008126587[0000007B]
L(008):00252576999[000004E7] 00319951120[00001110]
L(016):00387323156[00001514] 00454695192[00001918]
L(024):00522067228[00001D1C] 00589439264[00002120]
L(032):00656811300[00002524] 00724183336[00002928]
L(040):00791555372[00002D2C] 00858927408[00003130]
L(048):00926299444[00003534] 00993671480[00003938]
L(056):01061043516[00003D3C] 01128415552[00004140]
[EEPROM:]exit
7188x>

  4. use flash命令範例說明

    5. 顯示與輸入方式同USE EEPROM。差別在於EEPROM以BLOCK為單位，FLASH以SEGMENT為單位。ADDRESS即該SEGMENT內的OFFSET值。如果指到SRAM的區域無法寫入，只能顯示目前的值。
    ◆segment number設定新的segment(HEX value)
    ◆erase 將目前的SECTOR清除（成為0XFF）。

  5. use com2命令範例說明

    6. 命令為：use com2 [/option]
    option 可以是：
    ◆a# | 設定開始scan的位址
◆b# | 設定baudrate
◆c* | 設定直接送出的命令
◆d# | 設定data bits(7或8)
◆e# | 設定結束scan的位址
◆p# | 設定parity(0:NONE, 1:EVEN, 2:ODD)
◆q | 設定執行完命令自動結束
◆t# | 設定timeout時間
    進入use com2之後可以下的命令有：
    ◆下baud來更改baudrate。
    ◆下scan來自動找尋7000模組。（default從00到FF）
    ◆可以用start設定開始scan的address，
    ◆用end設定結束scan的address。
    ◆也可以直接輸入要送出的命令，例如$01M，$012。
    ◆quit或exit結束use com2。
    7188x>use com2
baudrate=9600 --> timeout=4 ms
StartAddr=0 EndAddr=10
[COM2:]baud 115200
Change baudrate to 115200
[COM2:]start 0
StartAddr=0(00)
EndAddr=10(0A)
[COM2:]end 10
StartAddr=0(00)
EndAddr=10(0A)
[COM2:]scan
Scan 01!017060{1ms}
Scan 0A
[COM2:]$01M
Com2Echo]!017060{2ms}
[COM2:]$012
Com2Echo]!01400A01{2ms}
[COM2:]$02M
Com2Echo]!!! Timeout !!!
[COM2:]exit
7188x>

  6. load/dir命令範例說明

    7. 下命令load後，會有提示訊息指示USER按下ALT_E，按下後再輸入要DOWNLOAD的檔名即可。然後下dir命令就可以看到有該檔案了。
    7188x>dir
( 0)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C000:001C-C321:000A
( 1)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C321:0026-C643:0004
( 2)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C643:0020-C964:000E
Total File number is 3  Free space=158102 bytes
7188x>load
File will save to C964:000E
StartAddr-->C000:964D
Press ALT_E to download file!

FileName:echo485.exe
Size=12544
Download 12798 Bytes OK.
Transfer time is: 2.197802 seconds

Test count=72309
Back to Terminal mode
7188x>dir
 0)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C000:001C-C321:000A
 1)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C321:0026-C643:0004
 2)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C643:0020-C964:000E
 3)echo485.exe  12/20/1999 15:49:38  12798(0x031FE) C964:002A-CC86:0008
Total File number is 4  Free space=145276 bytes
7188x>
... ... ... ... ... ... ... ... .... ... ...
7188x>dir
 0)demo6.exe    12/18/1999 11:56:21  10670[029AE]C002:0000-C29C:000E
 1)echo485.exe  02/23/2000 14:20:00  13088[03320]C29E:000E-C5D0:000E
 2)echo485.exe  02/23/2000 14:20:00  13088[03320]C5D2:000E-C904:000E
 3)echo485.exe  02/23/2000 14:20:00  13088[03320]C906:000E-CC38:000E
 4)echo485.exe  02/23/2000 14:20:00  13088[03320]CC3A:000E-CF6C:000E
Total File number is 5  Free space=133394 bytes

7188x>dir /crc
 0)demo6.exe    12/18/1999 11:56:21  10670[029AE]C002:0000-C29C:000E{CRC OK}
 1)echo485.exe  02/23/2000 14:20:00  13088[03320]C29E:000E-C5D0:000E{CRC OK}
 2)echo485.exe  02/23/2000 14:20:00  13088[03320]C5D2:000E-C904:000E{CRC OK}
 3)echo485.exe  02/23/2000 14:20:00  13088[03320]C906:000E-CC38:000E{CRC OK}
 4)echo485.exe  02/23/2000 14:20:00  13088[03320]CC3A:000E-CF6C:000E{CRC OK}
Total File number is 5  Free space=133394 bytes

7188x>
範例程式說明
  1. HELLO.C

    2. 這個程式只用到Print一個function。可以在PC上執行，也可以在7188X上執行。寫7188XC/7521的程式就是如此簡單。

  2. HELLO1.C

    3. 這個程式除了用到Print外還用到Is7188X這一個function。可以在PC上執行，也可以在7188XC/7521上執行。
    Is7188X用來判斷這個程式是否在7188XC/7521上執行。並可以判斷7188XC/7521上的FLASH MEMORY是256K BYTES或是512K BYTES。

  3. ECHO485.C

    4. 這個程式是使用COM2（RS-485）連接I-7000模組的範例。
    可以設定不同的BAUDRATE，可以自動找尋7000模組。可以Enable/Disable CHECKSUM。更可以直接下命令給7000模組。當然要拿來連其他的RS-485元件應該也不成問題。

  4. 7521.C

    5. 這個範例將7188XC/7521拿來當RS-232與RS-485的轉換介面，因為RS-485可以設定位址 （ADDRESS），所以加上他可以將無法設定位址的RS-232轉換成可以設定位址。 User也可以自行加上對RS-232端的訊息作一番處理，例如過濾不要的資料等。
7188x.EXE操作說明

  1. 7188x.exe要在PC端執行。

  2. ALT_1選擇使用PC的COM1

  3. ALT_2選擇使用PC的COM2

  4. ALT_C設定baudrate及data format。設定時按ENTER確認，左右方向鍵在欄位間切換，其他按鍵更改設定值，在最後一個欄位按下ENTER結束設定。

  5. ALT_D下DATE命令，並送出PC的日期。（將7188X與PC日期設成一樣）

  6. ALT_T下TIME命令，並送出PC的時間。（將7188X與PC時間設成一樣）

  7. ALT_E要傳程式時用。需要用到時，MiniOS7會送出訊息要USER按下ALT_E，按下後要輸入檔名才開始傳檔。(MiniOS7尚未送出訊息要USER按下ALT_E之前請勿按ALT_E)

  8. ALT_L切換成行輸入模式。在行輸入模式要等到按下CR才送出一行資料，主要是用來測試7000模組時下命令用。再按一次ALT_L回到原先的狀態。

  9. ALT_X結束7188X.EXE。

  10. F2設定自動傳檔的檔名。

  11. F5自動執行F2設定的檔名。

  12. F6設定執行時所下的參數，最多可以設定四個（不滿四個請以'*'結束設定）。

  13. F8自動傳檔並執行。

  14. F9自動傳檔。

  15. ALT_F2設定多檔自動傳檔的檔名（最多可以設定十個檔名，不滿十個請以'*'結束設定）。(04/14/2000)

  16. ALT_F9多檔自動傳檔。(04/14/2000)

  17. CTRL_F2同時間看COM1及COM2。（方便測試）按ALT_X回到原先的狀態。在此模式上面各項功能都可使用。也可以按TAB來切換兩視窗的游標。

  18. F10自動傳檔並執行，與F8功能相同，但檔案是存放在SRAM，會覆蓋掉前一次DOWNLOAD的檔案。(06/30/2000)

  19. F12配合7521/7522/7523做RS-232端的測試用。(07/04/2000)

MiniOS7更新說明

  1. 取得最新版本的MiniOS7
    2. ：
    1. 最新版的MiniOS7可以在底下的網址找到：

      2. http://w3.icpdas.com/tkt/7188xdl.htm
      （新舊版本都可以找到）
      IMAGE檔名格式為：ttyymmdd.img。tt為TYPE（"xc":7188XC/7521，"80"：8000），yy為西元年，mm為月，dd為日。

  2. 使用7188X.EXE更新
    3. ：
    1. PC端請將目錄切換到放MiniOS7的IMAGE檔所在的目錄，然後執行7188X.EXE連線到7188XC/7521/8000等使用MiniOS7的系統。
    2. 下 UPLOAD 命令，依照畫面回應指示按下 ALT_E。

      然後輸入IMAGE檔的檔名（格式為：ttyymmdd.img）並按下ENTER。
    3. 等待UPLOAD動作完成。（IMAGE檔會先存放在SRAM裡頭）

    4. 接這下bios1命令。（會先檢查IMAGE檔案，並顯示版本，日期。如果IMAGE檔無誤，就將資料寫到FLASH MEMORY）
    5. 更新的時間約十幾秒，更新完成後，應該會自動RESET，如果沒有請自行重新開機。然後可以下ver命令來確認版本已經更新。

  3. 使用萬用燒錄器來更新
    4. ：
    1. 將7188X/7521/8000的FLASH Memory拆下。256K的編號是29F002T，512K的編號是29F040。
    2. 請將IMAGE檔寫入到FLASH MEMORY的最後64K。（256K為OFFSET 30000起的64K，512K為OFFSET 70000起的64K。）
MiniOS7 for 7188/7188X/8000入門手冊 Ver.1.3.1
最後訂正日期：2000.11.22(22/11/2000)


MiniOS7 library

  1. The libraries for all modules use MiniOS7 will support two memory model, SMALL/LARGE MODEL.
    Modules | LARGE MODEL library | SMALL MODEL library | include file
    7188 | I7188L.LIB | I7188S.LIB | I7188.H
    7188XC
    7521
    7522
    7523     		7188XL.LIB 7188XS.LIB 7188X.H
    8000 | 8000L.LIB | 8000S.LIB | 8000.H
    7188XA | 7188XAL.LIB | 7188XAS.LIB | 7188XA.H
    7188XB | 7188XBL.LIB | 7188XBS.LIB | 7188XB.H

  2. The functions supported by the MiniOS7 library are the same as the functions supported by I-7188(ROM-DOS), and add some special functions for the file system of MiniOS7.(Files are read only.)

  3. Also with some functions for the I/O expansion bus of 7188x series and the bus of I-8000 series.

  4. The detail please refer to MiniOS7 library reference for 7188X/I-8000 series.

[ Index] [Back]
[MiniOS7 library] Ver.1.3.1
Final update date:[01/17/2001], By: Tsai,Kun-Ting.


Update MiniOS7

  1. Getting the newest version of MiniOS7
    2. :
    1. The newest version of MiniOS7 can be found on the web-site:

      2. http://w3.icpdas.com/tkt/7188xdl.htm
      (All released version.)
      The image file name is "ttyymmdd.img".
      tt is module type.("xc":7188XC/7521, "80":8000),
      yy is year(00 for 2000,01 for 2001...),
      mm is month,
      dd is day.

  2. Using 7188X.EXE to update MiniOS7
    3. :
    1. On PC side, please change to the directory that the image file is saved. Then run "7188X.EXE" and link to 7188X/I-8000 series.
    2. Use command UPLOAD, according to the messages please press ALT_E.

      then key-in the image filename(for example:xc000522.img) and press ENTER.
    3. Waitting UPLOAD finished.(IMAGE file will be saved in SRAM.)

    4. Then use command bios1.(OS will check the image file saved in SRAM, then display the version information. If the image file is OK, then it will be write to FLASH MEMORY.)
    5. The update time is about 10 seconds. After update finished, the system will reset, if not, Please reset by power off. Now, user can use command ver to check the new version.

  3. Using EEPROM programmer to update:
    1. Please unplug the FLASH Memory. If flash is 256K, the number type is 29F002T, 512K is 29F040.
    2. Please write the IMAGE file to the last 64K of FLASH MEMORY.(For 256K, write to OFFSET 30000H, for 512K write to OFFSET 70000H.)
[Index] [Back]
[Update MiniOS7] Ver.1.3.1
Final update date:[01/17/2001], By: Tsai,Kun-Ting.


Using 7188x.EXE
7188x.exe is the PC side utility for modules using MiniOS7. Using RS-232(COM1/2) of PC link to the modules using MiniOS7. 7188x.exe in basically is a terminal program. It send out the data that user key-in to COM1 or COM2, and show the data received from COM1/2 on the screen of PC. The main function for 7188x.exe is to DOWNLAOD files to the system using MiniOS7.
F1 | Show the help message of 7188X.exe.
ALT_1 | Select use COM1.
ALT_2 | Select use COM2.
ALT_C | Setting baudrate and data format. When setting, use "ENTER" key to confirm, left or right arrow key to toggle between field, other key to toggle value, and must on the last field press ENTER to finish the setting.
ALT_D | Send out "DATE"+CR, then send out the system date read from PC .(That is set the date of PC to 7188X/I-8000 series.)
ALT_T | Send out "TIME"+CR, then send out the system time read from PC.(That is set the date of PC to 7188X/I-8000 series.)
ALT_E | For download files to MiniOS7 system. (only after the message "Press ALT_E to download file!" is show on screen, then user can press ALT_E.)
ALT_L | Switch to LINE mode. In LINE mode, wait user key-in one line message, then send it out. The major function for LINE mode is to test I-7000 modules. Press ALT_L again back to normal mode.
ALT_X | Exit 7188X.EXE.
F2 | Set the filename for auto downlaod process.
F5 | Auto send out the filename(setting by function F2) +[parameter set by function F6] +CR.
F6 | Set the parameters for auto run. Maximum can set 4 parameters.(If less then 4 item, please use '*' to end.)
F8 | Auto download and run.(=F9 + F5)
F9 | Auto download file.(=command "LOAD"+CR, then press ALT_E, then key-in the filename.)
ALT_F2 | Set the filenames for multi-files auto download.(10 files maximum. If less then 10 files, please use '*' to end.)(04/14/2000)
ALT_F9 | Multi files auto downlaod.(04/14/2000)
CTRL_F2 | Show COM1 AND COM2 message (for test COM port easily). Press ALT_X back to normal mode. Use TAB or ALT_1/ALT_2 to toggle between two windows.
F10 | Auto download and run file. The same function as F8, but save file in SRAM.(use commands "LOADR" and "RUNR")(06/30/2000)
F12 | For 7521/7522/7523 to test RS-232 node.(07/04/2000)
[Index] [Back]
[Using 7188x.EXE] Ver.1.3.1
Final update date:[01/17/2001], By: Tsai,Kun-Ting.


Using 7188xw.EXE
7188xw.exe is the PC side utility for modules using MiniOS7. 7188xw.exe is the Win32 version of 7188x.exe. For 7188x.exe just can use the standard COM PORT(RS-232) of PC, But on Win32 systems(WIN95/98/ME/NT/2K) also have RS-232 port use PCMCIA or USB interface, 7188x.exe can not use these devices, so need the program 7188xw.exe. Using RS-232 ports of PC link to the modules using MiniOS7. 7188xw.exe in basically is a terminal program. It send out the data that user key-in to COM port, and show the data received from COM port on the screen of PC. The main function for 7188xw.exe is to DOWNLAOD files to the system using MiniOS7.
Command line parameter | /c# : Set to use COM#. /b# : Set use baud rate #. (Default baud rate is 115200 ) /s# : Set the screen display rows. ( default is 25, max is 50.)
F1 | Show the help message of 7188XW.exe.
ALT_F1 | Show the Chinese(Big5) help message of 7188XW.exe.
ALT_F2 | Set the filenames for auto downlaod process.(Maximum files:10 files)
ALT_F9 | Auto download all of the files that set by ALT_F2 to FlashROM.
ALT_F10 | Auto download a file that set by F2 to SRAM.
CTRL_F1 | Show the Chinese(GB2312) help message of 7188XW.exe.
ALT_1 | Select use COM1 if it can be used.
ALT_2 | Select use COM2 if it can be used.
ALT_3 | Select use COM3 if it can be used.
ALT_4 | Select use COM4 if it can be used.
ALT_5 | Select use COM5 if it can be used.
ALT_6 | Select use COM6 if it can be used.
ALT_7 | Select use COM7 if it can be used.
ALT_8 | Select use COM8 if it can be used.
ALT_9 | Select use COM9 if it can be used.
ALT_A | Toggle between normal mode and ANSI Escape code support mode
ALT_C | Go into COMMAND MODE, can use following commands. b# : set new baudrate. c# : set new comport.#=1 to 256. n/e/o : set to None/Even/Odd Parity. 8/7/6/5: set to 8/7/6/5 data bits. 1/2: set to 1/2 stop bits. p#: set new work directory. q: quit command mode.
ALT_D | Send out "DATE "+ system date read from PC+ CR. (That is set the date of PC to 7188X/I-8000 series.)
ALT_T | Send out "TIME "+ system time read from PC+ CR. (That is set the date of PC to 7188X/I-8000 series.)
ALT_E | For download files to MiniOS7 system. (only after the message "Press ALT_E to download file!" is show on screen, then user can press ALT_E.)
ALT_H | Toggle between Hex/ASCII display mode.
ALT_L | Switch to LINE mode. In LINE mode, wait user key-in one line message, then send it out. The major function for LINE mode is to test I-7000 modules. Press ALT_L again back to normal mode.
ALT_X | Exit 7188XW.EXE.
F2 | Set the filename for auto downlaod process.
F5 | Auto send out the filename(setting by function F2) +[parameter set by function F6] +CR.
ALT_F5 | Auto send out the "runr "+[parameter set by function F6] +CR.(run the program saved in sram.)
F6 | Set the parameters for auto run. Maximum can set 10 parameters.(If less then 10 item, please use '*' to end.)
CTRL_F6 | Clear screen.
F8 | Auto download and run.(=F9 + F5)
F9 | Auto download file.(=command "LOAD"+CR, then press ALT_E, then key-in the filename.)
F10 | Auto download and run file. The same function as F8, but save file in SRAM.(use commands "LOADR" and "RUNR")

NoteЎG
Use the F2/ALT_F2 to set the filename that will save in the 7188xw.ini ЎCNext time run the 7188xw.exe in this folder.It will autoload the filename from 7188xw.ini,and you don't need to set them again.

[Index] [Back]
[Using 7188xw.EXE] Ver.1.3.1
Final update date:[08/12/2002], By: Tsai,Kun-Ting.