ATMEGA Microcontroller communicates with PC - USB

Microcontroller Topics
Post Reply
Ibanitescu
Corporal
Corporal
Posts: 7
Joined: Mon Jun 28, 2010 10:25 pm

ATMEGA Microcontroller communicates with PC - USB

Post by Ibanitescu » Thu Jul 15, 2010 1:21 am

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
User avatar
Shane
Captain
Captain
Posts: 226
Joined: Sun Jul 19, 2009 9:59 pm
Location: Jönköping, Sweden

Re: ATMEGA Microcontroller communicates with PC - USB

Post by Shane » Thu Jul 15, 2010 1:54 pm

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.
SukhdeepMankoo
Lieutenant
Lieutenant
Posts: 92
Joined: Tue Oct 27, 2009 7:50 pm

Re: ATMEGA Microcontroller communicates with PC - USB

Post by SukhdeepMankoo » Thu Jul 15, 2010 5:52 pm

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.
Ibanitescu
Corporal
Corporal
Posts: 7
Joined: Mon Jun 28, 2010 10:25 pm

Re: ATMEGA Microcontroller communicates with PC - USB

Post by Ibanitescu » Fri Jul 16, 2010 1:00 am

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
User avatar
Shane
Captain
Captain
Posts: 226
Joined: Sun Jul 19, 2009 9:59 pm
Location: Jönköping, Sweden

Re: ATMEGA Microcontroller communicates with PC - USB

Post by Shane » Fri Jul 16, 2010 2:19 pm

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.
Post Reply

Return to “Microcontrollers”