First Complete Project - Choosing MCU

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

Hello all!

I joined up a while ago and hail from the PIC side of mcu's but decided to migrate to AVR for many reasons including AVRStudio, pin compatibility, and a very well designed and helpful forum.

My project is to make a control panel for my CNC machine that requires somewhere in the range of 22+ buttons with about 10 having toggle led's and depending on how far I want to go I have a nice 4x40 character LCD I would love to integrate later on.

My goal is to have the device recognized as a USB HID so that I can easily write a wrapper with my CNC's API or even use their generic USB keymapping program.

Since my design requires quite a few pins (40+) Im probably going to be using a TQFP package but have no idea what mcu to choose, I don't need any special features just a nutload of IO. having built in USB and the ability for a bootloader is an added bonus but I can always use an FTDI usb chip and the 109 bootloader.

To save pins I have an idea of using spi/i2c port ex panders for input and then multiplexing the status led's. LCD would be driven off the mcu directly.

My current hardware includes an ATMega16 and STK200 programmer clone. What do you recommend I get as far as programmers, a range of good mcu's to play with and specifically what mcu meet my goals in an all in one package fashion.

Thanks!

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

Quote:
What do you recommend I get as far as programmers, a range of good mcu's to play with and specifically what mcu meet my goals in an all in one package fashion.
I would start by getting a JTAG Ice which you can get very cheaply for older chips like a M16. The Mega64/128 is 64 pins, it this enough? The cheaper JTAG Ice will still work with these too.

Otherwise go for broke and get a JTAG Ice Mk2 which are still on special at about half price and use newer chips like a ATmega1281/2561 or the 100 pin ATmega640/1280/2560.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Thanks for the quick response. I just dug out my old programmer and its actually a Chinese knockoff of the AVRISP mkII mine works well enough but every time you plug it in you need to re-install the drivers for some reason. The JTAG Ice MKII is WAY out of my price range even at half price... Ive been thinking of getting the bootcode that acts like a STK500 and putting one of my ATmega16's and FTDI chips on a board to replace it.

The 64-100pin TQFP chips you list are quite the workhorse, ones even got 32 external interrupts! I could go encoder crazy with that and only $20

With PIC's I'm useto having waaay to many IC's to choose from with hundreds of options but it seems the majority of the AVR line is just increases in memory, io & Interrupts is that right? With pics I had to choose the ic then program as development on one I have on hand would require massive rewrites to port to the new ic. Do avr's have this issue or are they pretty well pin and code compatible? (providing you upgrade that is)

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

Unfortunately there is some variation between various 'groups' of AVRs. To change usually doesn't involve a full rewrite as the compilers will map the required addresses in many cases.

If you want USB, you can try the specific AVRs with usb capability. Along with Dean's LUFA usb stack, the USB side should be taken care of. There is IGORPLUG that fakes up usb functionality of a 'normal' avr with a few tricks.

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

As you want USB HID I'd start by looking at Atmel's AT90USBKEY for $29 - that's a lot of electronics for thirty bucks. You won't be able to find a "cheap" debug solution though so will probably have to resort to debug strings over USB (CDC) or UART

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

Thanks for all the great replies.

The AT90USBKEY is EXACTLY what I want, a usb enabled avr with plenty of external interrupts and LUFA has awesome examples and documentation compared to most of PIC's code 'snippits' that I never got to work once.

With the USBKEY I dont need to worry about my shitty knockoff programmer either and pretty much get free things to play with onboard.

I imagine if I program the board with the wrong fusebits (say remove JATAG and whatever the USB requires) I will still be able to reprogram with my ICSP? (Provided I keep that bit on for safety) Other than that Im gonna order one of them up this weekend!

-------------------------
Kartman: You said there is some variation between various 'groups' of AVRs. Would you mind giving me the quick and short on what are good ones to not mix?

I see their is a kind of organization like: 8/16/32/64/128/256's are the same but with more memory in each. The 48/88 and odd ones are different features, and the 0/1 (128/1281/1280) are the same but more pins. Is this a fair generalization?

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

Do you know the ADC-button trick?

Downside is, that you need to check the ADC periodically.