180 likes | 204 Views
Read Me First : Getting Started with MDT - Product Brief & Beginning - Application Development with MDT Simulator - Download & Upload into/from MDT. May 31, 1999. Written by H.Kwon hkwon@infodia.co.kr. Specification of MDT. CPU Memory Real Time Clock LCD Screen Operating System
E N D
Read Me First: Getting Started with MDT - Product Brief & Beginning - Application Development with MDT Simulator - Download & Upload into/from MDT May 31, 1999 Written by H.Kwon hkwon@infodia.co.kr
Specification of MDT CPU Memory Real Time Clock LCD Screen Operating System Built-in Keypad Communications Power Environmental Conditions Dimensions GPS 80386 Compatible Processor (Intel) 33MHz SRAM 512KB Flash Memory 2MB (Optional up to 16MB) ROM 512KB Video 32KB Back-up battery operated 320 (W) x 200 (H) pixels STN LCD Full digital adjustable contrast & Back-light (Optional Touch panel) One Red and Three Green LEDs supported ROM DOS 6.2 Programming PC Environment (Virtual Disk using Flash Memory) High profile & Very convenient 13 Keypad including four function keys (F1..F4), cursor-move, ENTER, and three special keys (MENU, EMERGENCY, and POWER) Three serial RJ-45 Interfaces and additional one TTL On/Off Switch wires The serial port operates at RS-232 electrical levels, ensuring compatibility with PC COM ports without the need for a level shifter. A serial ports provide signals for transmit data, receive data, DTR, and DSR. 12V DC Input with capabilities 8 ~ 24V Range Operating current 250mA typical 200mA ~ 700mA Operating temperature: -20OC ~ +70OC Storage temperature: -30OC ~ +80OC Relative humidity: 5% ~ 90% (non-condensing) 149 (W) x 122 (H) x 37 (D) mm Physically internal plug-in GPS receiver (Optional) DOS & BIOS 128KB 128KB ROM Font Area 256KB RAM 512KB RAM
Equipment Required for End-User Basic Unit Multi-Cable MDT Multi-Cable, can share Power input (12V DC) and two serial communication (RJ 45-10 Type, 10-pin) PORT2 Serial Communication (Ex, Wireless Data Modem) PORT1 Y-Cable Power (12V DC) Fig. End-User Configuration
Equipment Required for Developer Basic Unit Multi-Cable Console Cable Diskette PC MDT A Multi-Cable, can share Power input and two serial communication (RJ 45-10 Type, 10-pin) Console Cable, can communicate with MDT - MDT side: RJ 45-8 Type, 8-pin - PC side: RS-232 Type, 9-pin A 3 1/2-inch 1.44MB diskette. The necessary software for developing are shipped on one diskette. Developer have to provide PC. - IBM or compatible PC with 386 or greater processor. - A serial port configured for at least one COM port. - MS-DOS 6.0 or later. (DOS prompt of Windows 95 is available) - Assume that TURBOC Compiler is already installed Console Cable MS-DOS Console PC PORT2 Up to Two Serial Communication (Ex, Wireless Data Modem) PORT1 and PORT3 Multi-Cable Power (12V DC) Fig. Developer Configuration
Installing S/W in the PC Your Preparing Backup Copy Installing - Assume that Turbo C Compiler is already installed in the directory “C:\TURBOC”. - Assume that your work area directory is “C:\TURBOC\SAMPLE”. Please Make a copy of the diskette when you receive it. This ensures you always have an uncorrupted copy of the software in case the working diskette is damaged for any reason. 1. Create your work area directory on the hard drive (C) in which to install software. If you do not already have a directory “C:/TURBOC/SAMPLE” on your PC, First type MKDIR C:\TURBOC\SAMPLE Or use any other directory name you want. 2. Insert the diskette in Drive A. 3. Enter A: 4. Enter COPY *.* C:\TURBOC\SAMPLE The above procedure will take a few minutes to complete.
Setting Up the PC with the MDT Cable Connection The COMM.EXE software communicates with the MDT via a cable connected between the COM port of the PC and the serial PORT2 of the MDT. To connect the MDT to the PC Plug the power lines of Y-Cable into the 12V DC Power Input Source. Red is for +12V DC Black is for negative or ground Plug the RJ 45 (10-pin) jack of Y-Cable into the PORT1 of the MDT. Plug the RJ 45 (8-pin) jack of console cable into the PORT2 of the MDT. Plug the RS-232 (9-pin) of console cable into the COM port of PC. Console Cable MS-DOS Console PC PORT2 Up to two Serial Communication (Ex, Wireless Data Modem) PORT1 and PORT3 Negative or Ground Multi-Cable +12V DC Fig. Cable Connection
Development of new Application w/ SIM_MDT Preparing Edit SIM_MDT.BAT Run SIM_MDT.BAT - Assume that Turbo C Compiler is already installed in the directory “C:\TURBOC”. - Assume that your work area directory is “C:\TURBOC\SAMPLE”. To develop a application, You require a C Compiler and computer with the following minimum specifications: A 486 running DOS 6.0 or greater Hard drive with at least 10MB of free disk space One serial port (COM1 or COM2) We has tested and supports Turbo C compilers for DOS version 3.0. The main entry point into the application code is referred to as the ApiMain() routine. An application written for the terminal takes the form of a DOS *.EXE file is relocated within the terminal space (about 200KB) when the program is downloaded into the terminal. At first, Following files must be existed in your current working directory of PC: SIM_MDT.BAT LCD2VGA.OBJ GRAPHICS.LIB EGAVGA.BGI FONT.FNT Please edit SIM_MDT.BAT, can be suitable for your PC environment. Following is sample SIM_MDT.BAT file. path=c:\turboc;c:\turboc\bin;c:\turboc\include;c:\turboc\sample;c:\windows;c:\windows\command tcc -c -ml -I\turboc\include APIMAIN.C sysv2p.h apicall.h tcc -ml -eSAMPLE.exe LCD_DISP.obj SYSCOM.obj SYSMAIN.obj APIMAIN.obj GEONET.obj tcc -ml -eSIMMDT.exe LCD2VGAP.obj SYSCOM.obj SYSMAIN.obj APIMAIN.obj GEONET.obj GRAPHICS.LIB After you create new application, please type as following: SIM_MDT After you execute ‘SIM_MDT.BAT’ you can take two files: If compiling is completed successfully, Then SAMPLE.EXE and SIMMDT.EXE will be created. SAMPLE.EXE can be downloaded into MDT and will be running in the MDT. Please Do NOT run this file in your PC. SIMMDT.EXE can be executed in your PC for simulation of your application in PC.
Development of new Application w/ SIM_MDT (Continued) SIMMDT.EXE Notice Please notice that file SAMPLE.EXE is for downloading into MDT, another file SIMMDT.EXE is for simulation in your PC. Please type as like: SIMMDT run SIMMDT.EXE in your PC. If you want to terminate SIMMDT.EXE, Please hit <ESC> key anytime. 1. PORT3 and PORT4 can not be simulated in your PC. So please add comment mark where PORT3 and PORT4 are opened as /* COM_Open(PORT3, BPS19200); - Cannot work in PC */ /* COM_Open(PORT4, BPS9600); - Cannot work in PC */ 2. GPS data from built-in GPS (optional) can not be simulated in your PC. 3. Because SIMMDT open both COM1 and COM2 in your PC, It can happen some conflict with as like mouse, modem, printer or so on, that already installed in your PC. Fig. Run SIMMDT.EXE (Simulation in PC)
Setting Up the PC with the MDT (Continued) Running COMM.EXE After Cable Connection procedures have been completed, enter the following commands to run COMM.EXE. Please press enter after each command. C: CD \TURBOC\SAMPLE COMM /B19200 /COM1 Where the PORT2 of MDT is connected with COM1 port of your PC using console cable. The software of COMM.EXE can be used to connect MDT from your PC as like Hyper Terminal of MS Windows. COMM.EXE includes also file transfer functions. The usage of COMM.EXE is as following: Usage: COMM /B<baud-rate> /COM<COM Port #> <baud-rate> is the speed between your PC and MDT. (MDT operates 19200bps default) <COM Port #> is COM Port number, is used to connect with MDT, in your PC side. After you finish above procedure, The initial menu of COMM.EXE will be displayed on your PC monitor as like below. Fig. Initial menu of COMM.EXE
Setting Up the PC with the MDT (Continued) Power On MDT Power on the MDT. After Cable Connection have been completed and Power on MDT, You can hear beep and show the boot messages on your PC as like below. The beep and message are from MDT to your PC through COMM.exe. If so, the connection between them are all OK. Else, other problem exists between your PC and MDT. After initializing completed in MDT, DOS prompt will be appeared.
Running Sample Application Running SAMPLE After MDT prompt appeared, You can issue several DOS-compatible commands as like 'DIR'. Please type to change directory into B as: B: DIR There are two drives, A: and B:, in MDT. A: drive is ROM (Read-only) and B: drive is flesh memory (Read/Write). Drive A includes several utility programs can be used on MDT. If you issue command 'DIR' on drive A, You can find the used size is very small. It is because other system program and fonts are hidden. At the drive B, the total space will be almost 1.8MB (about 2MB). You can download some your application and data files into this B drive. You can perform several DOS command on drive B as like COPY, CD, DEL and so on. If you meet serious problem on drive B later, you can format B drive flesh memory using command as like 'DLFMT B:' on drive A. After you type ‘DIR’, you can find that there is a file named ‘SAMPLE.EXE’ in drive B:. To run SAMPLE.EXE, Please Type as: SAMPLE Then you can show sample application running in the MDT. The sample menu will be appeared in the LCD screen of MDT. Fig. Running SAMPLE.EXE in MDT
Terminate a Running Sample Application Terminate COMM.EXE APPDOWNP.EXE If you want to terminate a running sample application in the MDT, 1. At first, you have to terminate running COMM.EXE in your PC. 2. Next perform APPDOWNP.EXE in your PC. Please type in both <ALT> and <X> at the same time on your PC keyboard. Then the COMM.exe will be terminated and DOS prompt will be appeared on your PC. The APPDOWNP.EXE can terminate the running program in MDT. Please run APPDOWNP on your PC as like: APPDOWNP 1 9600 (or occasionally APPDOWNP 1 19200) where 1 means COM port number of your PC and It must be same with procedure ‘Running COMM.EXE’. Speed must be 9600. Please notice the baud rate is different with it on procedure ‘Running COMM.EXE. It is because SAMPLE.EXE of MDT changed the baud rate of MDT PORT2 from 19200bps to 9600bps when running. The usage of APPDOWNP.EXE is as following: Usage: APPDOWNP <COM Port #> <baud-rate> <COM Port #> is COM Port number, is used to connect with MDT, in your PC side. <baud-rate> is the speed of current MDT PORT2. After you finish above procedure successfully, The initial menu of APPDOWNP.EXE will be displayed on your PC monitor as like below. Fig. Running APPDOWNP.EXE
Terminate a Running Sample Application (Continued) Terminate APPDOWNP.EXE If you finish previous procedure ‘APPDOWNP.EXE’, The message, 'System console mode', must be appeared on the MDM LCD. This message is happened only when the running program terminated in MDT. At the same time, the message 'Successful connection into MDT...' will be appeared on your PC. Please type in <ESC> key on your PC keyboard. Then the APPDOWNP.EXE will be terminated immediately. Please do not other functions of APPDOWNP.EXE. Other functions of APPDOWNP.EXE are not available.
Downloading Assume Downloading You can download your developed application to the MDT. - You already created a new application named ‘TEST.EXE’. - The file ‘TEST.EXE’ is located at current directory of your PC. To develop a new application, Please refer to manual ‘Basic guidance for MDT S/W developers’. On your PC prompt, please type command in "COMM = /B19200 /COM1" at the same manner on the procedure of ‘Running COMM.EXE’. When the Comm.exe screen is appeared again, Please type <ENTER> in on your PC keyboard. The MDT prompt 'B:\>' will appeared. Please press enter after each command TR TEST.EXE At this time, Press <PageUp> key then Upload which file: TEST.EXE Upload TEST.EXE ASCII or Xmodem (A or X): X Fig. Downloading (1)
Downloading (Continued) Downloading (Continued) Fig. Downloading (2) Fig. Downloading (3)
Downloading (Continued) Downloading (Continued) If downloading is finished successfully, you can show the message 'Done’ and hear beep. Please wait until message ‘Done’ and prompt appeared as like below: Fig. Downloading (4)
Uploading Uploading You can upload a file from MDT to the hard drive of your PC. Let's assume that you want to upload a file named 'sample.exe' from MDM into your PC. Please press enter after each command TS SAMPLE.EXE At this time, Press <PageDown> key then Upload which file: SAMPLE.EXE Upload SAMPLE.EXE ASCII or Xmodem (A or X): X
AUTO.BAT Creation At the drive A, the file named 'AUTOEXEC.BAT' is exist. when power on MDT, MDT will perform some initializing and do jumping into A:autoexec.bat. It is same manner with normal MS-DOS. If issue command 'TYPE AUTOEXEC.BAT' on drive A, you can find that the autoexec.bat call 'B:AUTO.BAT’. If a file ‘AUTO.BAT’ is exist on drive B and auto.bat call another application execution program in drive B, the application execution program will run whenever power on. Otherwise If auto.bat is deleted or not exist on drive B, the MDT will be stayed on prompt A:\> after power on. I recommend that please do not create AUTO.BAT while you do test or under developing with MDT. After you complete your developing, You can create auto.bat as like following steps. Assume your new application is 'sample.exe' and It is already downloaded into MDT. COPY CON AUTO.BAT B: SAMPLE.EXE<CTRL+Z> <ENTER> Fig. Create AUTO.BAT