Hi
I am not sure this is the exact place to ask this, but i wanted to learn AVR programming, and i was wondering which is the best arduino to learn AVR programming, if there are better ways can anyone advise me, ?? Currently i have managed to get my hands on AVR pocket programmer from a friend with an atmega32A chip, but i am not sure where to start,, Any advice would be greatly appreciated..
Start here
As far as which general AVR to start programming, I don't think there's one that's more beginner than another. If you use Arduino, you're familiar with the atmega328. But when you start programming, and especially when you start changing fuses, almost everyone bricks some of their chips. Bricking a cheap ATtiny13 (I started a small collection of them) hurts a little less than bricking an atmega328. Programming bare AVRs can also require more concentration on hardware like power supply, bypass caps, and oscillators (optional).
I took a different path when I moved from arduino to general avr programming, and it turned out to be pretty fun.
There are ATmegas that have built-in USB support, like the ATmega32u2 and ATmega32u4. If you buy a break-out board with one of these, you don't need a separate device to perform most general programming on them. You just need a regular USB cable. The chip comes pre-programmed with a DFU bootloader, and there are other bootloaders (like av109) that the board maker can put on the board. Using a breakout board means the hardware stuff mentioned above (oscillators, etc) is taken care of.
You write programs using the avr-gcc tool chain and use avrdude (for av109), or a dfu program (for DFU) to load your .hex file to the AVR. For windows, DFU uses the FLIP software, for Linux, DFU uses the dfu_programmer package.
At first, your programs themselves don't need to have USB functionality, you just use the USB bootloader to get them in to the chip. You can start with just blinking LEDs, and evolve up to whatever a regular AVR can do (XXu2 chips don't really do analog though). But later, you can download the LUFA libraries, and reprogram to emulate a USB keyboard, USB mouse, USB serial port, USB joystick, or USB whatever.
But there's more... The breakout board can also be AN AVR PROGRAMMER! LUFA includes code that emulates an AVRISP MKII programmer, and it's easy to hookup. Just 6 wires, and BAM your programming ATmegas (and most ATtinys). With a little more you can program 6pin-Tiny and (I think) Xmega chips.
I've bought a few of these boards, and I change them from a USB project to programmer and back, just by reprogramming. I have a 32u2 board that I can switch to either program AVRs or program Arduino Pros (they don't have a USB to serial interface).
I've listed a few board makers below, but a Google search will find more:
32u2 Boards:
http://www.mattairtech.com/index.php/atmega32u2-usb-development-board-arduino-compatible.html
http://www.ebay.com/itm/NooGroove-USB-Board-ATMEGA32U2-AT90USB162-AVR-Stick-/160588387998 <- I've used this one.
32u4 Boards:
SparkFun ATMEGA32U4 Breakout - DEV-11117 - SparkFun Electronics <- I've used this one.
AVR pocket programmer from a friend with an atmega32A chip
I'm not sure I understand. Is this "I have a pocket programmer" and "I also have an atmega32a chip"? Or do you have some kind of programmer that includes the 32a as part of the programmer? The chip used by the programmer is usually irrelevant.
If you expect to ask questions here, you should get some variety of Arduino, and expect to upload your programs using the bootloader. (An Arduino is a fine development/learning platform for the non-Arduino aspects of AVRs, and the bootloader won't have any problems uploading non-sketch "real programs.")
If you expect to use Arduino Studio (on windows) for your programming, your life would probably be made easier by getting an official Atmel programmer with debugging capabilities, like a JTAGICE3 ($99): http://store.atmel.com/PartDetail.aspx?q=p:10500269#tc:description
If you'd like to use what you have, and spend a minimum of additional funds, that's probably possible too. If you have the programmer only, you just need a chip of some kind. An ATMEGA328 would be a fine choice. If you have the programmer and an ATmega32a "target" chip, you can make that work as well.
Bigger chips that have a JTAG interface - 328 & 328P do not.
JTAGICE3 also supports the "debugwire" protocol that IS on the smaller devices.
AFAIK, debugwire is not documented in sufficient detail to be supported by anything other than official Atmel programmers.
(nor are the JTAG higher-level debugging commands. I have never understood why Atmel would be so open-source "friendly" WRT their compilers/etc, while keeping their debugging so proprietary.)
Ah. Never used debugwire.
Nor JTAG for that matter.
Debugging with serial prints has always been enough for me.
I recently managed to use JTAG to debug some problems with "64k data" issues on a 1284 system. (the first time I've used JTAG to debug an actual "field" problem, as opposed to just part of some class.) It was pretty cool.
It turns out that the current arduino code has quite a few problems, if you wanted to have >64k of PGMSPACE data
(Now that I'm back from my vacation, I'm supposed to be writing those up as bug reports ...)
CrossRoads:
Bigger chips that have a JTAG interface - 328 & 328P do not.
Sorry for the confusion i have found this programmer
and Atmega 328p chip,
i was looking for some basics programmer to start since these are not mine i am planning to get some into my hands, and such i was asking where i can get some basics stuff, for general case programming.
Can anyone tell me how can types of chip i can program with the Arduino Duemilanove