ATMEGA Microcontroller communicates with PC - USB

Microcontroller Topics

ATMEGA Microcontroller communicates with PC - USB

Postby Ibanitescu » Wed Jul 14, 2010 7:51 pm

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
Ibanitescu
 
Posts: 7
Joined: Mon Jun 28, 2010 4:55 pm
Cash on hand: 530.90

Invitations sent: 0
Registered friends: 0

Re: ATMEGA Microcontroller communicates with PC - USB

Postby Shane » Thu Jul 15, 2010 8:24 am

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.
User avatar
Shane
 
Posts: 133
Joined: Sun Jul 19, 2009 4:29 pm
Cash on hand: 31,902.20
Location: Jönköping
Medals: 1
EC_Achievment (1)

Invitations sent: 0
Registered friends: 0

Re: ATMEGA Microcontroller communicates with PC - USB

Postby SukhdeepMankoo » Thu Jul 15, 2010 12:22 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.
User avatar
SukhdeepMankoo
Support Team
 
Posts: 64
Joined: Tue Oct 27, 2009 2:20 pm
Cash on hand: 2,291.80

Invitations sent: 0
Registered friends: 0

Re: ATMEGA Microcontroller communicates with PC - USB

Postby Ibanitescu » Thu Jul 15, 2010 7:30 pm

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
Ibanitescu
 
Posts: 7
Joined: Mon Jun 28, 2010 4:55 pm
Cash on hand: 530.90

Invitations sent: 0
Registered friends: 0

Re: ATMEGA Microcontroller communicates with PC - USB

Postby Shane » Fri Jul 16, 2010 8:49 am

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.
User avatar
Shane
 
Posts: 133
Joined: Sun Jul 19, 2009 4:29 pm
Cash on hand: 31,902.20
Location: Jönköping
Medals: 1
EC_Achievment (1)

Invitations sent: 0
Registered friends: 0


Return to Microcontrollers

Who is online

Users browsing this forum: No registered users and 1 guest