Sample Basic Language Test Program - Microcomputer Systems MSI-P602 User Manual

Trimble lassen iq gps & digital i/o card
Table of Contents

Advertisement

IV. SAMPLE BASIC LANGUAGE TEST PROGRAM
The BASIC language program below illustrates software sequences
for TSIP and NMEA protocols that are displayed on a video monitor.
Also provided are simple routines for inputting the /IN1 thru /
IN4 digital inputs and writing to the /OUT1_BUFFERED output.
The program can be run under DOS using a BASIC interpreter
such as QBASIC by Microsoft Corporation. An interpreter can be
provided at no charge upon request.
'GPS terminal program for MSI-P602 with Lassen iQ primary
'port at 9600 BAUD and secondary port at 4800 BAUD (default mode)
COM1 = &H3F8: COM2 = &H2F8: COM3 = &H3E8: COM4 = &H2E8
primary = COM3 'set default for primary port (U4) to COM3
secondary = COM4 'set default for secondary port (U5) to COM4
BAUD = 12 '9600 BAUD divisor
BAUD1 = 24 '4800 BAUD divisor
CLS
PRINT ""
PRINT "Default address is COM3 for primary port and COM4 for secondary"
PRINT "port. No address jumper for JP1 should be installed."
PRINT "": PRINT "Strike any key to continue!"
WHILE INKEY$ = "": WEND
begin:
CLS
NMEA = 1
GOSUB init
PRINT ""
PRINT "(1) Display NMEA Protocol."
PRINT "(2) Display TSIP Protocol."
PRINT "(3) Set digital outputs of J1 to hexadecimal 55."
PRINT "(4) Set digital outputs of J1 to hexadecimal AA."
PRINT "(5) Display digital inputs of J1 /IN1 thru /IN4."
PRINT "(6) Set Primary port to COM1 and Secodary port to COM2."
PRINT "(7) Set Primary port to COM3 and Secodary port to COM4."
PRINT "(8) Enable Interrupts."
PRINT "(9) Set NMEA Protocol to RMC."
PRINT "(10) Set NMEA Protocol to Factory Default (GGA + VTG)."
PRINT "(11) Exit program"
PRINT ""
INPUT "Enter selection - ", GP$
SELECT CASE GP$
Page 15
CASE "1"
NMEA = 1: GOSUB init: GOTO start
CASE "2"
NMEA = 0: GOSUB init: GOTO start
CASE "3" 'set /OUT1_BUFFERED = 0
z = 0
MSI-P602 User Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MSI-P602 and is the answer not in the manual?

Table of Contents