KeyPad Interface to Xmega-A3BU Xplained board

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

Question - I would like to get views regarding the efficient(time conscious) approach of interfacing my proprietory USB keypad to the Xmega-A3BU Xplained board. What would be the best Atmel code examples to use as a basis for my project and any essential modifications that come to mind.

Background - I am embarking on my first USB interfacing project so very inexperienced. I have been reading about USB and looked at various app notes on the Atmel web-site for the past week and still have little confidence to take the plunge into the application code.I know I shall find it hard to make ground on this project as I have mainly hardware skills, able to put together reasonable assembler programs and limited knowledge of C-language programming, having said that I am happy to learn and of course make mistakes along the way.

1st Stage - To interface a low cost USB keypad(19-keys)with the Xmega-A3BU Xplained board, I want to use this keypad as the HID to configure and setup my application with visual feedback coming from the on-board 128 x 32 LCD.

I will also like to retain the ability to program the Xmega-A3BU Xplained board over USB using FLIP i.e. disconnect USB keypad and connect to Xmega-A3BU Xplained board to PC.

Later stage - To download configuration profiles via a USB flash memory stick into the Xmega-A3BU Xplained board.

Thanks in advance for your comments :? Ray

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

No model of Xmega has OTG let alone host mode so you cannot implement a host, only device. As such you cannot host any USB device such as a keypad or whatever. There are only two AVR8's that could do this, the AT90USB647 or AT90USB1287 which are the two models of AVR8 with OTG.

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

Well I have learnt something already, thats put a spanner in my works already. Anyway I do have a USBKEY2 board which I believe uses the AT90USB1287 so I guess thats a good start. So, can I ask the same question using this board and I'll see if I can interface a similar LCD with similar interface as was done on the Xmega-A3BU Xplained board.

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

Once you move from X-U to plain mega-U the choice gets real easy as there only is one: LUFA every time. Dean has examples and support code for OTG hosting on the 647/1287

I cannot remember if there's an example of hosting HID but there's certainly examples of hosting MSD which should make the config from memory stick do-able. Remember you also need FAT for that, use FatFs for that.

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

The main reason I looked at the xmega USB parts was that I thought the X meant that there would be plenty of Xplained how-to videos and app notes that might make life easier for me. So, LUFA means Lightweight USB for AVR, learnt something else.

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

How do I get started using LUFA, can it be used via AS6 environment? where should the LUFA directories be located when using AS6?

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

I think Dean said that finally with AS6.1B being released it's finally possible for LUFA to be integrated within AS6.

However, for the time being, I'd build at the command line as has always been the plan then just use AS6 for editing and debugging.

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

Quote:

I think Dean said that finally with AS6.1B being released it's finally possible for LUFA to be integrated within AS6.

http://fourwalledcubicle.com/blo...

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

How can I get a handle on using with the new AS6.1 beta version.Is there a getting started idiots guide somewhere?

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

Quote:

How can I get a handle on using with the new AS6.1 beta version.Is there a getting started idiots guide somewhere?

For LUFA? I still need to make one. Basically, install the extension, and it will integrate itself like ASF. That means you can make a "New Example Project" from the File menu and create the LUFA demos/projects/etc. automatically. It also means you can open the ASF wizard for a generated LUFA project and add/remove/configure LUFA modules via the GUI.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

What do you mean by "install the extension", I have AS6.1 beta installed, so where do I find a nice simple LUFA based demo?

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

Oh, I thought you read the blog post I linked. You can download the extension either through the Extension Manager inside Atmel Studio 6.1, or from here.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

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

I'm pretty inexperienced using AS6 so you have to bare with me, actually I'm inexperienced in most things software - could be a problem but I'll give it a shot.

Worked it out eventually - used the extension manager in ASF wizard and can now see folder as "fourwalledcubicle" which I guess is all the LUFA stuff.