USB Specific Programming
-
Hey all, I've been wanting to start a project for a while that involves several topics I have no knowledge on. One of those topics is communicating with a USB device in windows. I have a Matrix Orbital 503c wich has a VK204-24-USB (manual: http://www.matrixorbital.ca/manuals/VK\_series/VK204-24-USB/) Screen and im looking to build a small program to communicate with it. So I have found several articles on this site about serial communications and my question is this: Is USB just another serial device or does it require a special kind of communication? Secondly since I have no experience with Hardware I/O does anyone have any suggested readings to give me some good beginners knowledge on the topic? Thanks -legit
-
Hey all, I've been wanting to start a project for a while that involves several topics I have no knowledge on. One of those topics is communicating with a USB device in windows. I have a Matrix Orbital 503c wich has a VK204-24-USB (manual: http://www.matrixorbital.ca/manuals/VK\_series/VK204-24-USB/) Screen and im looking to build a small program to communicate with it. So I have found several articles on this site about serial communications and my question is this: Is USB just another serial device or does it require a special kind of communication? Secondly since I have no experience with Hardware I/O does anyone have any suggested readings to give me some good beginners knowledge on the topic? Thanks -legit
legit wrote:
Is USB just another serial device or does it require a special kind of communication?
No, USB doesn't work the same way as a serial port. Every USB device is shipped with a device driver. What you need to do is get a handle on this driver (with CreateFile) and then you'll be able to communicate with your device by sending IO codes to your driver (using DeviceIOControl) these codes should normally be documented with the driver (there are specific to your device). Now, if the device you are using is a USB-to-serial module, then the driver simulate a COM port and you can use it the same way as a standard COM port.
Cédric Moonen Software developer
Charting control [Updated - v1.1] -
legit wrote:
Is USB just another serial device or does it require a special kind of communication?
No, USB doesn't work the same way as a serial port. Every USB device is shipped with a device driver. What you need to do is get a handle on this driver (with CreateFile) and then you'll be able to communicate with your device by sending IO codes to your driver (using DeviceIOControl) these codes should normally be documented with the driver (there are specific to your device). Now, if the device you are using is a USB-to-serial module, then the driver simulate a COM port and you can use it the same way as a standard COM port.
Cédric Moonen Software developer
Charting control [Updated - v1.1]