Go Down

Topic: Could the Atmega 32u be used for USB to RS232? (Read 3564 times) previous topic - next topic

cyclegadget

 I would like to have a UC that could run a program then, when needed could act as a USB to RS232 converter. The connections would be, "computer >> standard USB cable >> Atmega board >> wires >> RS232 device".  I want to avoid using any inverter, or RS232 chips if possible.

 The voltage would be 0v=logic 1, and 5v+ = logic 0 and I would need it to act just like this cable from FTDI.
http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_USB_RS232_CABLES.pdf

I would need these outputs just like the cable specified.
1 GND
2 CTS#
3 POWER*
4 TXD
5 RXD
6 RTS#
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

cyclegadget


To help the thought process, I have found that the ATMEGA8U2-MU found on the Uno and the Mega nearly does what I am trying to describe. Although, it is probably not RS232 but rather TTL.

I have never seen the code or hex for the ATMEGA8U2-MU so, I don't know if I can use it for a base to other processors or not.

Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

Coding Badly


If you are willing to give up RS232 or add a TTL-to-RS232 converter, a Teensy would work very nicely.

cyclegadget



If you are willing to give up RS232 or add a TTL-to-RS232 converter, a Teensy would work very nicely.


Thanks for the suggestion.

 I am wanting to use enough pins, and memory that I think I need an Atmega 328 or 32u.

However, if you could direct me to the code to run the Teensy as you mentioned, maybe I could adapt it to another UC.


....woops the teensy has the 32u now that I think of it. I still need code though.
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

cyclegadget

Thanks to Coding Badly!!!

  I got to looking, and I may have found what I need!

http://www.pjrc.com/teensy/usb_serial.html

I may still need an inverter to make RS232 but, I can live with that.
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

putyn

you can make an virtual serial port with most of  atmel micros http://www.recursion.jp/avrcdc/cdc-232.html#schematic its based on vusb - software implementation of usb port on atmel micro http://www.obdev.at/products/vusb/index.html

:D

cyclegadget


Thank you Putyn. They do have a set-up similar to what I was describing. However, I want the USB to RS232 feature to act as a function. The Teensy seems to be easier for the job as they have the code made in a way I think I can understand. My plan is to have the micro controller run a code that would be using serial and I/O pins then, with a flip of a switch or the connection of a computer the UC would become a serial port to my computer. This would allow the computer to connect to the device without needing addition boxes or connectors to be made-up.
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

Go Up