Read data form USB and Com port

J

Jason Frazer

I have never done anything like this. How can a read data from a USB port
and a com port and save that data to a record when i click a button.
What I'm enterfacing with is a GPS system Manf: Garmin Model: GPS12. The
following interface formats are supported by the GPS12 for connection to up
to three NMEA devices: NMEA 0180, NMEA 0182, and NMEA 0183 Version 1.5.
Approved sentences: GPRMB, GPRMC, GPWPL. Propierary Sentaences: PGRMM (Map
datum), PGRMZ (altitude), PSLIB (beacon rec. control).

I don't even know where to start on this!

Any help would be great!!

Jason Frazer
 
A

Adrian Jansen

Surprisinly the old Com statements of QB still work in Access VBA.

So you can do:

dim strNMEA as string

Open "Com1:4800,n,8,1" for input as #1

LineInput#1,strNMEA

Close #1


Do whatever you want to parse the string into fields - this takes quite a
bit of work with the mid and split functions.
Assuming you have serial drivers for the USB converter, they will assign a
Com port number for the device, so you just change the "Com1:4800... line
for the correct Com number, eg "Com5,4800....

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top