Host USB/RS232 converter

USB PICs and the UBW

Moderator: phalanx

Post Reply
jub
Posts: 6
Joined: Sat Dec 22, 2007 6:18 pm

Host USB/RS232 converter

Post by jub » Sat Dec 22, 2007 6:35 pm

Hi,

I have a specific USB device that I want to connect to a serial-port-equipped-only computer. In order to do this, I want to build a converter between USB and RS232-type serial. Equipping the computer with an ordinary USB port through a PCI card, e.g., is not an option.

So the USB/serial converter is not the usual way around. Instead of being a client, the USB part of the design must act as a host. Essentially, you can think of what I want to do is being able to plug a USB mouse or USB keyboard into a serial port (RS232; TTL level is fine).

Are there any chips, modules or projects out there doing that already? I'm looking for low-speed only, so I was thinking about the option of hardcoding the USB standard on a standard Atmel or PIC, but since I'm not so USB-savvy, yet, I was thinking that maybe there is a chip out there that can do everything already.

The next step is software, creating a driver on Windows that fools the OS into thinking that it's talking directly to a USB device. Maybe this exists already as well...

Any help would be greatly appreciated,
Thomas

jub
Posts: 6
Joined: Sat Dec 22, 2007 6:18 pm

USB host chip

Post by jub » Sun Dec 23, 2007 5:34 pm

After traversing Sparkfun and the net in general, it seems to me that there is no overall solution where you don't have to take into account the particular device protocol.

A number of quite high level chips exist such as USBwiz and Vinculum, but they seem to require the protocol to be "standard" (which it is not, the device's USB class is 0x00). So, I'm currently looking at the MAX3421E USB host chip which even has a low-cost evalutation kit.

This will require me to actually implement the particular protocol in some sense, but I'll have to live with that. It is a particular device I want to interface with, and consequently the solution does not have to be general.

I'm still interested in hearing comments especially regarding the choice of USB host chip. I've stumbled upon a couple of other chips that could be useful like the Philips ISP1160 and the Cypress SL811 but the MAX3421E seems more accessible. But please correct me if I'm wrong!

Any plans for nice Sparkfun products or breakout boards for prototyping to handle this USB host scenario?

Thomas

wschrabi
Posts: 2
Joined: Thu Jul 14, 2011 1:39 am

Re: Host USB/RS232 converter

Post by wschrabi » Thu Jul 14, 2011 1:48 am

Hi Thomas,
I would also very interested in this project.
My Device sends 64 byte in Hy-Speed and I am looking for a HOST USB/RS232 Adapter too.
Did you get any recommandations? Have you done this successfully?
Please post your comments or email to me. (wschrabi@gmx.at)
thanks
walter

User avatar
viskr
Posts: 263
Joined: Tue Jun 20, 2006 10:29 am
Location: Lake Tahoe, CA
Contact:

Re: Host USB/RS232 converter

Post by viskr » Thu Jul 14, 2011 9:06 am

This is one of those projects that is a bit of the tail wagging the dog. I say this because PCs with just serial are now getting pretty old. You can pick up a laptop with USB for < $200.

But if you need a USB host, I'd start with a micro with USB builtin (usually OTG these days which means they can be host or client). Something like an LPC17xx series part has this capability. You can get sample USB drivers from NXP.

On the Windows side, writing a driver is definitely non-trivial. A better solution is just to use the COM port and write an application program to communicate to the micro by some serial command protocol you design.
reviving the BASIC stamp http://www.basicchip.com

wschrabi
Posts: 2
Joined: Thu Jul 14, 2011 1:39 am

Re: Host USB/RS232 converter

Post by wschrabi » Thu Jul 14, 2011 10:43 am

Thanks, well I have already a prg with a 3rd party USB driver, which works fine.
THe Problem for the USB HOST is, that it enumerates again with no class driver, (as my device uses no class driver) and
the FTDI supports only class driver in their USB host firmware. And I have no idea how to write the 3rd party USB driver for the FTDI host.
I will use a embedded PC with windows xp on it, so that I can use that 3rd party USB driver again, and with a simply delphi prg I can write
a routine, which stores the recieved packages from the USB device on the USB Stick or SD card.
thanks anyway.

USBDriverGuru
Posts: 12
Joined: Fri Dec 23, 2011 10:50 pm

Re: Host USB/RS232 converter

Post by USBDriverGuru » Sun Dec 25, 2011 12:53 am

I would suggest that you use a Texas Instruments Stellaris development kit, EKC-LM3S9B92. The cost is $99.00. It has three UART's, one USB OTG port, and a Stellaris ARM Cortex 3. Use the StellarisWare library to develop a simple USB Bulk IN/OUT Host driver to communicate with your USB device. There is plenty of example code on the Stellarisware CD. Write a simple C# application using Visual C# Express on the PC to communicate to the serial port on the PC. The PC will communicate with the serial port on the dev kit. Use the Stellarisware example code to create a serial port driver to communicate from the serial port to the USB Host.

I have completed both of these tasks, and you will be surprised how quickly you can develop these tasks. I will post my code if request it.

Vaunix
Posts: 1
Joined: Thu Mar 22, 2012 1:12 pm

Re: Host USB/RS232 converter

Post by Vaunix » Thu Mar 22, 2012 1:18 pm

Oh USBDriverGuru - I would love to have a copy of your code. I'm sure it will save me an immense amount of time!

rknollman
Posts: 1
Joined: Wed Jan 23, 2013 10:26 am

Re: Host USB/RS232 converter

Post by rknollman » Wed Jan 23, 2013 10:31 am

USBDRIVERGURU: Have you ever posted your code for the Stellaris ARM Cortex 3 for the RS232 to USB Host device?

RufusVS
Posts: 1
Joined: Mon Mar 09, 2015 8:56 am

Re: Host USB/RS232 converter

Post by RufusVS » Mon Mar 09, 2015 9:01 am

Old thread but still appropriate. I have a target platform (not a PC) that does not have a USB host port but does have an RS232 port. The device I want to connect to is a USB device. (I have done USB device programming in a prior job and it is not trivial, so this may be complicated to impossible to achieve). I re-opened this thread to see if anything new has surfaced for this sort of thing.

Post Reply