Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 27, 2024, 02:26:05 02:26


Login with username, password and session length


Pages: [1]
Print
Author Topic: Serial port to USB  (Read 6110 times)
0 Members and 1 Guest are viewing this topic.
lou
Junior Member
**
Offline Offline

Posts: 44

Thank You
-Given: 13
-Receive: 4


« on: December 10, 2012, 09:09:26 21:09 »

I can find all sort of devices that will convert a USB to a serial port.  What I'm looking for is to input data from a USB stick into the computer through a serial port.  Has anyone seen anything like this  ??
thanks , Lou
Logged
sarah90
Active Member
***
Offline Offline

Posts: 111

Thank You
-Given: 7
-Receive: 11



« Reply #1 on: December 10, 2012, 09:22:26 21:22 »

I assume the computer has no usb and only a serial port?  There are microcontrollers with usb on-the-go (OTG) that can be host to an usb stick and have an uart for the serial port. For example the pic24, pic32 and dspic33 from microchip.

May be easier to add an usb expansion card to the pc.
Logged
FTL
Junior Member
**
Offline Offline

Posts: 83

Thank You
-Given: 170
-Receive: 33


« Reply #2 on: December 10, 2012, 11:21:31 23:21 »

As Sarah has hinted, there are two kinds of USB interfaces. The more common USB-Device to serial converter is what you are referring to. That is common because it allows a device to connect to a larger computer. Note that the serial used there is typically 5 or 3.3V TTL style, meaning that the signaling is done via 0 to 5 volt pulses.

The other kind of USB interface is being a USB-host. USB hosts are 'in-charge" of the USB connection to a USB-device. These are not nearly as common because there are fewer devices that want to make use of a USB device.

FTDI (one of the more common USB chipset providers) does make USB host controller (VNC2). They package it up in a couple of modules. VDrive2 is one of them. That allows a USB key to be connected to via a TTL serial interface.

That brings up the third issue. PC's communicate via RS-232, which is a specific serial protocol. The biggest difference between RS-232 and TTL serial is the voltages involved. RS-232 voltage levels are defined as +3-+15V for a logic 0 and -3--15V for a logic 1. +/-12V is a common signaling level that is implemented.
Logged
bigtoy
Active Member
***
Offline Offline

Posts: 238

Thank You
-Given: 337
-Receive: 297


« Reply #3 on: December 13, 2012, 02:37:30 02:37 »

I'll second the suggestion for the FTDI VNC family. I looked into those parts for a similar project a while back, where we wanted to read data from a USB thumbdrive from a processor that had no USB support. Never did proceed with that project but the part looked like a good fit.
Logged
TucoRamirez
Senior Member
****
Offline Offline

Posts: 307

Thank You
-Given: 257
-Receive: 115


Tuco ... dead or Alive


« Reply #4 on: December 13, 2012, 07:50:19 07:50 »

hello, i think there's something like the usb dongle reader in november 2011 edition of elektor as a project with a 18pin pic24f ... at least as i remember it was able to read a file on a usb pen drive and send chars by 232 to another mu
Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
str67
Newbie
*
Offline Offline

Posts: 26

Thank You
-Given: 29
-Receive: 23


« Reply #5 on: December 13, 2012, 09:52:43 09:52 »

In case you are interested, I have attached a link to the article mentioned.
Logged
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 1002

Thank You
-Given: 231
-Receive: 983



« Reply #6 on: December 13, 2012, 11:00:16 11:00 »

A standard USB to serial dongle will work well in your case. These dongles are made to be general devices for any kind of serial equipment. So I would recommend using a RS232 level converter between the dongle and your MCU. Just Google max232. Some of the USB to serial dongles are also made to interface directly without any level converter. They come in both 5 and 3 volt input/output signal level. Be sure to select one that is compatible with your MCU voltage level.
Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
Old_but_Alive
Senior Member
****
Offline Offline

Posts: 331

Thank You
-Given: 746
-Receive: 120


« Reply #7 on: December 13, 2012, 11:43:16 11:43 »

I note  that we have been giving our solutions before we know the problem.

It is strange that Lou hasn't responded since the original question.

"What I'm looking for is to input data from a USB stick into the computer through a serial port"

He/she doesn't say what the "computer" is, and we have all been trying to guess.

any device which is going to link a USB stick to a serial port must be a USB host, so a simple USB to serial converter wont work.

Mike
Logged

I fought Ohm's Law ...  and the law won
I only use Mosfets because I have a Bipolar mental disorder :-)
lou
Junior Member
**
Offline Offline

Posts: 44

Thank You
-Given: 13
-Receive: 4


« Reply #8 on: December 13, 2012, 02:43:12 14:43 »

very good point Old_but_Alive.  I thought about the lack of info after I posted, and I have not been back for a few day.
the problem is that a friend has a CNC milling machine with 2 means of receiving data, a floppy drive, and the other is a serial port. He has been having problems with the floppy portion.  I thought that I would look into USB stick to Serial Port adapter. He does not want to use a serial to serial cable (unknown why). I could not find anything on the net, so I posted here. I will continue continue to search, but so far I have found only USB converted to a serial port. I want to thank everyone for their input and I'll be looking into the suggestions.   Lou
Logged
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 1002

Thank You
-Given: 231
-Receive: 983



« Reply #9 on: December 13, 2012, 04:21:11 16:21 »

If the CNC controller use a windows OS that is not to old. You may perhaps use some virtual floppy software. You could perhaps build someting that can read from a USB memory stick and then output it on the serial port. But it would not be that trivial to do. As for a start the MCU used must be able to work as host controller. I think the least painful solutions in this case. Would be to use some old laptop to transfer the files via RS232 to the CNC machine.
Edit: Then sniffing around on the web. I came by this http://www.floppytousb.com/ It should do what you want
Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
dipchip
Junior Member
**
Offline Offline

Posts: 69

Thank You
-Given: 92
-Receive: 25



« Reply #10 on: December 14, 2012, 12:00:39 00:00 »

After reading the previous posts I am surprised no one has asked the bigger question...
What are you going to use for an executor/interpreter for the USB file system?  What kind of file system are you going to use?
Retrieving data from a USB device through a serial link is all fine and dandy... but your going to need something in between that will interpret serial commands, switch between command mode and data mode, set/get the file name, do error handling, device detection, data to ascii formatting... it goes on and on.

I am not aware of any program that you could run on your computer that would do the above, unless you write it.  And, you'll still need an interpreter for serial end.

If it were me, I might consider something like the Elektor Embedded Linux board or similar.  Last I seen they were going for roughly $75USD.
It could handle all of the above issues, though you might have to rethink your approach.  Most of what you would need to do to get the file off the USB device and onto a serial stream could be scripted in bash.  Possibly even a control/menu program that you could telnet to on a second serial port.

--Chip
Logged
lou
Junior Member
**
Offline Offline

Posts: 44

Thank You
-Given: 13
-Receive: 4


« Reply #11 on: December 14, 2012, 03:22:44 03:22 »

Sideshow Bob
All of the Dongles that I found are for converting a USB to a Serial. I also found the floppy/USB converter and will bring it to his attention.

TucoRamirez & str67
Reading the article that you posted, this also a for converting a USB to Serial, but the author stated that with a little bit software changes it would operate in the reverse.

As I stated before I really appreciate the the input from everyone .  I'm afraid that if it isn't a device that could be "Plugged in and used" my friend would not very receptive.  When I asked him about using the serial port with a laptop "It is a lot of hassle".
I think that everyone has  put enough time into this, and the subject should be dropped.
I hope that this does not offend anyone, I should have stated at the start "off the top of your head do you know" ....  Thanks again, Lou
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC