/* 1. Compiler: TC 2.0 2. Mode: Large 3. Project: Reset.prj Reset.c ..\lib\8000l.lib ..\lib\tcpipl.lib 4. Explain: (1) To use command "diag io", then keyin "outpw 0xffd4 0" to reset the value on the unused register. (2) To download autoexec.bat & rsttime.exe to 8831. (3) To disconnect INIT* pin from GND. (4) To use command "reset", and start to count time.(use watch,stopwatch,...) (5) To wait the "End Test" message. And the total time is reset 200 times. (6) The time for reset 200 times is about 7 seconds, so the reset time is about 0.035 sec. (< 0.1 second) 5. Hordware: 8831 It's compiled by Tony ----------------------------------------------------------------------------------------- */ #include #include #include #include #include #include"..\LIB\8000.h" #include"..\LIB\vxcomm.h" /*---------------------------------------------------------------------------------------*/ main(void) { unsigned timer=200; unsigned curt; int type; int ver; type=Is8000(); /*detect the current operation system*/ if(type) { ver=GetLibVersion(); /*if it used in minios7*/ Print("Hello 8831! (Flash memory is %d K)\n\r",type); Print("Library version is %d.%02d",ver>>8,ver&0xff); } else /*if it used in dos*/ { Print("Hello PC!, this program is not run under 8831."); return; } curt=inpw(0xffd4); if(curt