RS232 to USB converter

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Rotac
Posts: 54
Joined: Fri Oct 02, 2009 1:41 pm
Been thanked: 1 time
Contact:

RS232 to USB converter

Post by Rotac »

Hello,

I want to built a RS232 to USB converter. in this case the PC will connected to RS232 port and the USB port will be connected to a device!
(The most of these converters works with the USB connected to the PC)

Does somebody experimence with this item?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS232 to USB converter

Post by Benj »

Hello,

You can have this up and running in about 5 minutes using Flowcode.

If you also need hardware then an ECIO, an Application board and a RS232 board will do the job for you.

User avatar
Steve
Matrix Staff
Posts: 3421
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: RS232 to USB converter

Post by Steve »

You will need to use a device with USB "on the go". This allows an embedded device to communicate with USB peripherals. You can't do this with Flowcode (at least, not at the moment).

Rotac
Posts: 54
Joined: Fri Oct 02, 2009 1:41 pm
Been thanked: 1 time
Contact:

Re: RS232 to USB converter

Post by Rotac »

Hello Steve and Benj

I have the e-block EB039 and the EB015. in combination with the PIC programmer (MCU) is this possible?
for try-out and USB on the Go is the software already availble?

Rob

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS232 to USB converter

Post by Benj »

Hello Rob

Yes this is possible, however you will need to use a chip that has two hardware UARTs or manually create a software UART by toggling pins. If you are using Flowcode v3 then there is an example macro showing you ghow to bitbang a UART. This is available from the Flowcode main product page. Otherwise Flowcode 4 has this feature built into the RS232 component allowing you to add one hardware UART and one software.

Edit: Sorry this is incorrect unless you are making a PC to PC RS232 to USB connection.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS232 to USB converter

Post by Benj »

Hello Rob,

Sorry I think I misread your previous post. a USB device is not the same as a USB host. The USB232 board is a USB device and as such is not capable of hosting a USB connection. If you are interested inthis technology then Microchip do some devices with USB on the go but this is not supported by Flowcode. Vinculum also do a nice piece of kit to do USB hosting and is quite easy to setup. This may be perfect for your needs depending on what kind of USB devices you need to be able to support.

Rotac
Posts: 54
Joined: Fri Oct 02, 2009 1:41 pm
Been thanked: 1 time
Contact:

Re: RS232 to USB converter

Post by Rotac »

Hello Benj,

I need Rs232 to USB, beacuse the control program runs under DOS and the device (like a PLC) has only a USB connection.
So I thougt is is possible with the flowcode and E-bloks?
I have looked on the site of "Vinculum" but it's for me not really claer of this IC solved my problem!

Kindly regards

Rob

RobOnk
Posts: 37
Joined: Mon Jan 11, 2010 12:16 am
Been thanked: 1 time
Contact:

Re: RS232 to USB converter

Post by RobOnk »

Hello, Different Rob here.

I'm trying to make use out of my RS232 board (eb015).
I discovered after I purchased it that my laptop does not have a serial port connector.
I see there is a USB converter (eb039), however I needed something quick so I bought a USB to serial converter (from Elecom).
I can see the converter listed in the device manager, however I cannot send or retrieve data from (to) my ver. 3 development board via eb015.
Is there a fundamental reason why this wouldn't work?

Thanks, Rob O

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS232 to USB converter

Post by Benj »

Hello Rob,

As long as your USB to serial converter is using +/- 12V and not TTL logic then you should be fine using these two products together.

Have you done the standards set of tests like running a 1 second flasher program to confirm all your clock and configuration settings etc are correct.

RobOnk
Posts: 37
Joined: Mon Jan 11, 2010 12:16 am
Been thanked: 1 time
Contact:

Re: RS232 to USB converter

Post by RobOnk »

Thanks Ben,

I tried to run the eb015 test "Hello world" program, however I get no data transfer in either direction.
Using the hyperterminal and checking all the settings, still nothing..The hyperterminal program crashed a few times while trying to send data.???

How would I go about confirming the 12V/TTL possibility?

Thanks Ben, Rob O

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS232 to USB converter

Post by Benj »

The hyperterminal program crashed a few times while trying to send data.
This seems strange. Does your USB to serial device expect Flowcontrol to be active? You may have to provide these extra RTS and CTS signals and enable Flowcontrol in the RS232 component of Flowcode if this is the case.

TTL signal levels are 0V or 5V whereas RS232 signals levels are -12V or +12V.

RobOnk
Posts: 37
Joined: Mon Jan 11, 2010 12:16 am
Been thanked: 1 time
Contact:

Re: RS232 to USB converter

Post by RobOnk »

Hello there again.

My problem seems to be a unwillingness for the port to open.
I made all the settings and used the test file for the RS 232 board, but...
I started getting a "unable to open port" message. The device manager does indicate the usb to serial device as being connected though.
I still have no transfer of data between pc and pic board.

Still lost. Rob

singhdeol
Posts: 30
Joined: Sat Dec 18, 2010 6:07 am
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: RS232 to USB converter

Post by singhdeol »

http://www.eleccircuit.com/usb-to-rs232 ... ic-max235/

i came across this circuit A usb to serial converter using the max235 IC

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS232 to USB converter

Post by Benj »

Hello,

If the COM port is not opening correctly then first I would go into device manager and confirm that the Port is up and running as expected.

Right click computer -> Propeties -> Device manager -> Ports

If the COM port is available in device manager and drivers etc have been installed then unplug and replug the device and try opening the connection in hyperterminal again.

If you say reprogram your device while hyperterminal has an open connection then the connection will be lost and you will have to close the connection in hyperterminal and unplug / replug the device before the connection becomes valid and usable again.

Post Reply