AVR Selection Help

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

Hi,

I'm building an amplifier with an arbitrary wave form generator and I need some help selecting the right AVR chip for me.

What I would like to do is

1. drive a LCD, preferably QVGA or VGA resolution (but could be a segment display if it's much easier),

2. drive a keypad with up to 24 keys

3. implement a user interface that would use the LCD and keypad to let someone set the parameters of the arbitrary wave form generator.

And being easy and fast to program is important.

Should I use an AVR8 or AVR32 for this application?

And if the AVR8 is my best choice, which version of it should I chose. There seem to be many for specific purposes.

Thanks,

Waspinator

Last Edited: Mon. Feb 16, 2009 - 11:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

2. drive a keypad with up to 24 keys

Sure sounds like a lot. I guess I'd go for endless-encoder knobs like on my 'scope. But I guess that has a lot of buttons as well.

Quote:
1. drive a LCD, preferably QVGA or VGA resolution (but could be a segment display if it's much easier),

Waveform display, eh? Note that my Tek TDS200 does a perfectly fine job with mono and 8-bit res and about 100x100.

Quote:

3. implement a user interface that would use the LCD and keypad to let someone set the parameters of the arbitrary wave form generator.

That's up to you. It ain't Programming 101 but it ain't a graduate course either. And no one is going to agree with >>my<< method/layout; and proof by extrapolation that you ain't gonna completely like mine or any other method. You are on your own.

Quote:

Should I use an AVR8 or AVR32 for this application?

You haven't said anything yet about what you need to do besides "waveform generation. In particular, how fast are you going to go? What are the voltage and current draw requirements?

If it were me, I'd do it as my toy project with the Xmega to learn how to use the DMA. That should be good for several MHz; higher for simpler square waves/PWM.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

The amount of work that goes into a project like this depends a lot on your previous programming and hardware development experience.

Forgive me for asking, but if this is your first major development project besides getting the AVR and its peripherals flashing LEDs and sending chars to a PC, then this is too much to do at one time.

To paraphrase Malthus, as your project's specifications grow linearly, the amount of coding grows exponentially. And as your program's code grows linearly, your debugging time to get the thing to actually work right grows exponentially.

Good Advice: Start small and simple. Get it working more or less, dumb and slow. Improve it in sections.

Not-so-good advice: Make elaborate specifications for a 'dream machine'. Start coding. Get hopeless lost trying to debug a 10,000 line program that you have invested 1000 hours of work. Discover on the web that some company sells nearly the same machine that you have been trying to build/program for the equivalent of 100 hours of minimum-wage labor. Buy the machine. Post the thousands of lines of slightly documented, un-debugged code to the AVRfreaks.net Projects section.

Best advice: Find a programmable Arbitrary Waveform Generator (that retails for $5000) being offered on eBay by a bankrupt electronics development start-up. Be the winning bidder with your $201.39 (+ $44 shipping) best offer.

But if you simply must code this with an AVR...(because it's a senior electrical engineering team development project that's due at finals, and it's mid-term already and you haven't even started, ...or... because you're a borderline obsessive/compulsive who, if not building an Arb out of an APR, would be building a two-meter high model of the Taj Mahal out of matchsticks)...please allow me to address your questions in the original post.

-- How to drive a VGA class LCD display. Use a pre-coded library for an advanced high-end expensive AVR. Since this may not exist, I suggest using the Cortex-M3 ARM microcontroller instead of an AVR. Or an embedded PC with a tiny form factor.

--- 24 key pad. Forget it. Use a standard PS-2 keyboard instead. They are easy to program, comfortable to use, interchangeable, inexpensive, widely available throughout the world, and less hassle for the user than any keypad. Better yet, go with two buttons and two unlimited-spin encoder knobs. Simpler is better. Who wants to learn to use a user-interface with 24 buttons? Do you?

How many of these are you planning to make? 1? 10? 1000? 1000000?

What is going to differentiate your Arb from all the others in the market? Price? Ruggedness? Size? Waveform complexity and repetition length?

If you absolutely must do this project, I wouldn't recommend an AVR8 or AVR32. Look into the Cortex M3 ARM. Better yet, contact the people who made the $5000 Arb that is selling for $201.44 and see if you can do a co-development deal with them. They have all the skills, experience, and (hopefully) financing to get the project to market faster, cheaper, and better than you probably could.

Unless, of course, this actually is a senior project..

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

Keypad - not a problem. Multiplexing lets you use many more keys.

User interface - not a problem. Changing settings of the waveform generator - not a problem. AVRs are good for that.

The waveform generator itself is a problem for an AVR. If you have a (hardware) waveform generator that you need to control/program using an AVR, great, but if you want to use the AVR to synthesise the waveform using DDS techniques, you'll get very modest performance - a few kHz.

As for the display, seven segment is not a problem. The graphics LCD will need a lot of resources, but note that this is not an oscilloscope - the waveform doesn't need to be changed in real time, only when the user makes a settings change. If you have plenty of memory (FLASH) you could store several template screen data that you could modify and send to the LCD. You should look at an LCD screen that has its own controller and buffer memory.

If you think education is expensive, try ignorance.

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

A software DDS on the AVR will work up to 200 kHz or so, with a 12 MHz clock.

Leon

Leon Heller G1HSM

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

Thanks for all your replies.

I forgot to mention that the waveform generation will not be done by the AVR, but by a separate chip from Analog Devices. The AD chip uses a 32 bit address and I wasn't sure if it would be easier to send inputs from an AVR32 or AVR8.

So the AVR would only be responsible for the UI and sending input into the AD chip.

From what I understand the AVR8 should be able to do what I want. Are there downsides to using the AVR32 instead of the AVR8? (besides cost, and having more pins to worry about?)

I'm only making one of these since the device is experimental.

Is the Xmega the chip to go with here?

Thanks,

Waspinator

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

If you plan to drive a LCD with the VGA resolutions colour, then I would recommend the AVR32 for a better UI. I could comment more, if you could provide a link of the waveform generator chip that you plan to use.

Simonetta wrote:

-- How to drive a VGA class LCD display. Use a pre-coded library for an advanced high-end expensive AVR. Since this may not exist, I suggest using the Cortex-M3 ARM microcontroller instead of an AVR. Or an embedded PC with a tiny form factor.

--- 24 key pad. Forget it. Use a standard PS-2 keyboard instead. They are easy to program, comfortable to use, interchangeable, inexpensive, widely available throughout the world, and less hassle for the user than any keypad. Better yet, go with two buttons and two unlimited-spin encoder knobs. Simpler is better. Who wants to learn to use a user-interface with 24 buttons? Do you?

The AVR32 could do this. The AP700X has an in-built LCD/TFT controller and also a PS/2 peripheral.

-drt