Page 1 of 1
ATMEGA Microcontroller communicates with PC - USB
Posted: Thu Jul 15, 2010 1:21 am
by Ibanitescu
Hello,
I want to control power (relays- to allow current, LEDs to flag), the prescription will be given from computer (C# program). My only free serial peripheral is USB, my serial RS232 is occupied.
I have 2 alternatives:
- purchasing a microcontroller that has an USB driver incorporated
- using an ATMEGA8/16/32 or other and using a SPI to USB converter (controller).
I ask a professional assesment which choice to make, thinking of attainability and price and complexity and if you have some examples, i would be very happy to share with me.
Thank you
Re: ATMEGA Microcontroller communicates with PC - USB
Posted: Thu Jul 15, 2010 1:54 pm
by Shane
Have a look at USB to serial UART interface chip like
FT232R or
TUSB3410.
As an alternative you can use a Atmel 8051 family microcontroller as said but Atmega with a USB-Serial converter is my choice.
Re: ATMEGA Microcontroller communicates with PC - USB
Posted: Thu Jul 15, 2010 5:52 pm
by SukhdeepMankoo
You can purchase the USB to serial Converter Data Cable and should start writing software for serial port or u can go through the usb to serial converter ICs.
Because for USB, you have to write software for Both microcontroller and PC sides, which seems to be difficult as compare the serial Port for microcontroller and PC .
Second thing, if i r thinking about usb, what type of usb Class (like mass storage, HID Class), u want to design USB.
Re: ATMEGA Microcontroller communicates with PC - USB
Posted: Fri Jul 16, 2010 1:00 am
by Ibanitescu
Thank you.
I simply want my uC to communicate with compulter, I think I'll use USB 2.0. I have documentated on internet and I saw an emulator FT232, which convert serial RS232 (Tx,Rx) into USB standard (D+,D-), and on the computer there is shown a com port (a serial) and Future Technology Device International offers drivers necesarry and support. Have anyone tried this stuff ever?
http://www.ftdichip.com/Products/FT232R.htm
http://www.ftdichip.com/Documents/DataS ... FT232R.pdf
Re: ATMEGA Microcontroller communicates with PC - USB
Posted: Fri Jul 16, 2010 2:19 pm
by Shane
That's the one I told you in my previous post. One of my friends had interfaced the FT chip (USB-Serial converter) with an Atmega128 and it worked perfectly.
See
http://www.ftdichip.com/Products/Evalua ... /ChiPi.htm which utilises the minimum number of components required for a basic USB - RS232 converter.
Also, on the product page there are many examples.