Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to communicate from PC to AVR microcontroller with USB controller.

Status
Not open for further replies.

sp

Full Member level 6
Joined
Jan 1, 2004
Messages
395
Helped
23
Reputation
46
Reaction score
2
Trophy points
1,298
Location
Floating Garden
Activity points
4,044
Hi all, thanks a millions times in advance for the helps.

I am using a 8 bits AVR microcontroller with USB controller, I want to send data to the AVR microcontroller via USB.

I read through multiple documents but I don't understand them, maybe because I am FPGA engineer, no software background (but i can write C). What i read is mostly using software approach to do the USB communication, but I want to use the USB hardware which comes with the uC.

I would like to know how to send data from PC to my AVR uC, and also using what software to do that on a PC.

the atmel microcontroller --> AT90USB162

datasheet:
http://www.atmel.com/images/doc7707.pdf
 
Last edited:

I would like to know how to send data from PC to my AVR uC, and also using what software to do that on a PC.

the atmel microcontroller --> AT90USB162

You will have to use USB-UART module for making connection between the USB port on the PC to the input data port.You will also need to install a driver on your PC to handle the data communication.The module looks like this.. usb-uart.jpg
There should be a bootloader installed in your PC to burn the hex code generated from the compilation,onto the microcontroller IC..A software named flashmagic,does that kind of job and should be useful for this..
 
  • Like
Reactions: sp

    sp

    Points: 2
    Helpful Answer Positive Rating
actually I already can program the AT90USB162, it has bootloader support.
I am using Atmel Flip program to program the hex into it.

What I would like to know is how to use the USB hardware built in it (to communicate with PC).
And also is there any simple standalone software, that I can write some bit patterns from PC to the uC?

thanks.
 

try CDC (communication device class) implement on AT90USB162 for data send and receive .

actually i have never try on Atmel devise but in pic32 i have completely receive and transmit bit or some command pc to micro controller.
 
  • Like
Reactions: sp

    sp

    Points: 2
    Helpful Answer Positive Rating
Probably not so user-friendly as the Microchip application library, but Atmel has some downloadable examples for AT90USB processors, including CDC implementation. e.g. AVR272: USB CDC Demonstration or AVR276: USB Software Library for megaAVR with USB
 
  • Like
Reactions: sp

    sp

    Points: 2
    Helpful Answer Positive Rating
thank you all.

Actually I am testing out this, but I couldn't get it through compilation on Studio6.
AVR328: USB Generic HID Implementation on megaAVR devices
(file size: 4013212, 13 pages, revision C, updated: 07/2008)

I also follow the document on how to migrate Studio4 to Studio6 document.
------- Atmel AVR544: Migrating megaAVR USB projects to Atmel AVR Studio 5/6
(file size: 955KB, 10 pages, revision A, updated: 04/2012)

Error 1 variable 'usb_dev_desc' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Error 2 variable 'usb_conf_desc' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Error 3 variable 'usb_user_manufacturer_string_descriptor' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Error 4 variable 'usb_user_product_string_descriptor' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Error 5 variable 'usb_user_language_id' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

- - - Updated - - -

I am trying on the older version now (Studio4).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top