USB serial communication?
USB serial communication?
USB serial communication?
USB serial communication?
USB serial communication?
USB serial communication? USB serial communication? USB serial communication? USB serial communication? USB serial communication? USB serial communication? USB serial communication? USB serial communication?
USB serial communication? USB serial communication?
USB serial communication?
Go Back  Xtreme Visual Basic Talk > > > USB serial communication?


Reply
 
Thread Tools Display Modes
  #1  
Old 12-28-2010, 10:04 AM
bonedoc bonedoc is offline
Junior Contributor
 
Join Date: Mar 2006
Posts: 376
Default USB serial communication?


I have been sending data to microchips using the serial port.....which is becoming extinct. So, I want to go to usb for sending serial data. How do I go about this? When I search, I am not seeing anything obvious. I dont see anything in the serial port class that can do this. Thanks!
Reply With Quote
  #2  
Old 12-28-2010, 10:25 AM
dilettante's Avatar
dilettanteUSB serial communication? dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,520
Default

USB adapters are not "serial devices" in the same sense as a COMx: port. They are meant as bus controllers, used for adding devices much like plugging a card into a PCI port.

For that reason only device drivers normally "talk" across the bus to devices, not user programs.

So you'll need a "microchip" supporting USB as a "device" (not a controller) along with an SDK and drivers for it, or one emulating a standard USB device type, or else you'll need to add some intermediate USB device that the standard drivers support. For example you can get COMx: port devices that plug into the Universal Serial Bus instead of as cards that plug into the PCI bus.

The point is that we're talking about a bus here. USB "ports" on your PC are nothing like a "serial port" in the RS-232 sense.


I have no clue why people make this mistake over and over (and over again), but you're not alone.
Reply With Quote
  #3  
Old 12-28-2010, 11:18 AM
bonedoc bonedoc is offline
Junior Contributor
 
Join Date: Mar 2006
Posts: 376
Default

Ok, maybe I should just say my goal. I want to send IR serial data through a USB port.

I may make the IR USB dongle myself. So, I guess that makes my goal to mimic serial communication at the pins of the USB port.

To take it a step deeper.... Is there some windows class that will allow me to set the USB port pins high and low regardless of the USB brand being used? Or will I HAVE to have a driver?

Even though it is not a serial port, seems like windows must have made some standard way to use a USB.

Sorry for the strange questions. I have been to used to programming in assembly.
Reply With Quote
  #4  
Old 01-01-2011, 03:40 PM
AgentSmithers AgentSmithers is offline
Contributor
 
Join Date: Jan 2005
Location: SOCal
Posts: 492
Default

Well dilettante is correct to a extent, HID devices use DeviceIOControl from User applications to talk, And so do a lot of POS devices such as USB RFID scanners and Barcode Scanners. Depending on how they interact it could be as simple as using CreateFile to the handle of the device and sending and recv'ing USB records but as for a Mic I wouldn't know. But I wanted to explain to him dilettante so you don't totally shoot him out of the sky
__________________
Http://ControllingTheInter.Net
My General Computer Forum, From Security To Programming And Back To Troubleshooting.
Reply With Quote
  #5  
Old 01-01-2011, 04:58 PM
dilettante's Avatar
dilettanteUSB serial communication? dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,520
Default

The device needs to be at least somewhat intelligent.

USB ports are nothing at all like a COM port.

Most of the time the exposed ports on a PC aren't even connected to the host adapter, but instead lead to a hub that is connected to the host adapter.

You are not going to "set the pins high and low" because that's not how USB is used. The data pins carry a high speed bus control protocol and are connected to differential transceivers. They are not simple buffered logic level pins.

There are always software drivers involved. Windows comes with a general HID class driver to support keyboards, mice, game controllers, simple character displays, and things that emulate them. Windows also has a generic mass storage class (MSC or UMS) driver. probably a few others.

What you need is a USB IRDA transceiver device. It will probably come with a driver that makes it look like a COM port as well as an advanced driver. They cost around $30US.
Reply With Quote
  #6  
Old 01-07-2011, 10:22 AM
bonedoc bonedoc is offline
Junior Contributor
 
Join Date: Mar 2006
Posts: 376
Default

Ok, so let me see if I can get this right:

-My best route is probably to go HID
-If I use the HID class, it can mimic a COM port

I will look into this. I wish I knew how to create a driver. That looks like another mess.

I want to use a device that is already created....but I would hate to see them become unavailable. Too bad microsoft hasnt made usb usage = serial port usage. What I mean is how easy they are to access.
Reply With Quote
  #7  
Old 01-07-2011, 11:40 AM
dilettante's Avatar
dilettanteUSB serial communication? dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,520
Default

No, "using the HID class" does not turn a USB port into something you can directly wire a device to.

If your device has a USB HID class device controller then it may be used as a HID class device. You still need the smart controller though.


This has nothing to do with Microsoft, it's how USB works no matter what OS is involved. If you want a "dumb" COMx: type serial port then just plug in a USB/RS-232 device. There are tons of them on the market.

Connecting a device to the bus (the B in USB is Bus) is like plugging an add-in PCI card or something. I'm not sure how much clearer this can be.
Reply With Quote
  #8  
Old 01-17-2011, 09:52 PM
danl danl is offline
Newcomer
 
Join Date: Jan 2011
Posts: 1
Default

Use a USB to serial adaptor but make sure that it uses an FTDI USB to RS232 Chip as that will work with VB6 just fine any other chip set will hang up on some systems.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
USB serial communication?
USB serial communication?
USB serial communication? USB serial communication?
USB serial communication?
USB serial communication?
USB serial communication? USB serial communication? USB serial communication? USB serial communication? USB serial communication? USB serial communication? USB serial communication?
USB serial communication?
USB serial communication?
 
USB serial communication?
USB serial communication?
 
-->