User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 402,593 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,319 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 820 | Replies: 0
Reply
Join Date: May 2008
Posts: 1
Reputation: fredyip is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
fredyip fredyip is offline Offline
Newbie Poster

CreateFile() Serial Communication with USB device

  #1  
May 16th, 2008
Hi guys,

I have written a program to read streaming GPS data from a GPS usb device. I am using CreateFile() and all seems to be all right except for time synchronization.

The Usb device, once connected, will continuously stream GPS data. No initialization is required, i.e. even using Hyperterminal, once the baudrate, stop bit etc are set, the GPS will continuously send the data.

I wrote a C++ program using CreateFile(), and I can collect the data streamed from the GPS. Problem is the GPS sends a new data every 1 second (it has its own clock) and my laptop has its own processor clock. So after reading say 10 seconds of data, the 11th sec data won't be read due to time synchronization. Then when the clocks on both devices (GPS and laptop) synchronized again, data is collected.

What can I do to rectify this problem? The GPS device comes with a .exe program and running it does not gives this problem. Every sec data is collected with it. But not for my program.

Cheers!
Frederick
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the C++ Forum

All times are GMT -4. The time now is 11:48 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC