XMEGA - A1U Xplained Pro - Looking for USB Tips & Advice

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hello,

 

Background: I'm a beginner with the XMEGA (ATXMEGA128A1U - Xplained Pro) and I'm trying to figure out how to start using the USB module. Here are my questions:

 

  1. How detailed/in-depth does my knowledge of USB protocol need to be in order to transfer data from the microcontroller SRAM to my PC?
  2. What is the easiest way for a beginner to implement and test a simple (XMEGA A1U<----> PC) USB data transfer program? The LUFA library contains a lot of example applications, but I'm not sure what exactly they do/how to check whether they're doing what they are supposed to do).

 

Any help would be awesome, I've just been reading through datasheets, tutorials and manuals but they aren't yet clicking together.

 

-BY98

 

P.S. I have played around with and gotten EBI (2-port SRAM LPC) and UART to carry out some basic functions, so I do have some knowledge of how XMEGAs work.

Last Edited: Tue. May 16, 2017 - 07:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I adapt the GenericHID Demo to my needs. A main thing is to define a working USB Descriptor. For that is is good if you read http://www.beyondlogic.org/usbnutshell

To test the communication I wrote a program for linux to test the HID communication. Maybe it helps you.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1
  1. How detailed/in-depth does my knowledge of USB protocol need to be in order to transfer data from the microcontroller SRAM to my PC?
  2. What is the easiest way for a beginner to implement and test a simple (XMEGA A1U<----> PC) USB data transfer program? The LUFA library contains a lot of example applications, but I'm not sure what exactly they do/how to check whether they're doing what they are supposed to do).

 

1. If you are considering writing your own driver, the answer is VERY detailed.

2. CDC.  The Xmega appears as a COM port on the PC.

3. Your choices are LUFA, ASF, or write your own.   I believe LUFA is still "experimental" with regards to the Xmega family.  ASF is a big, fat pig, but it will work and has example projects.

Greg Muth

Portland, OR, US

Xplained Boards mostly

Atmel Studio 7.0 on Windows 10

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Thanks hamtam & Greg! I used the CDC Virtual Serial Example from LUFA and was able to get a simple USB Echo going between the A1U XPRO and PC through a COMn port.

 

Now to try sending data from the SRAM to the PC!

Last Edited: Thu. May 25, 2017 - 09:03 PM