Electronics > Beginners

How does one get started with Atmel AVRs

(1/4) > >>

Ferroto:
When I got started with micro controllers I went with microchip because they had a diverse inventory of micro controllers and development kits. I got myself the pickit2 starter kit http://www.microchipdirect.com/productsearch.aspx?Keywords=DV164120 because it was the least confusing introductory product available, the uC was a socketed P-DIP PIC16f690 meaning I could remove it and place it on breadboard, you got the whole package (pickit2, dev board, software) for $49.99, and there site was far less confusing then Atmel's.

Now at first I was considering the arduino but got turned off when I found out that it wasn't supported by the Atmel, and I don't like writing code for a 3rd party front end instead of for the uC it's self.

The Microchip solution was the best at the time as I could jump right into it, write my code in C using 100% supported tools.

The reason I'm posting this is because I want to try out AVR's so I don't get stuck with one manufacturer, but I don't really know where to start. Atmel's site more closely resembles an online brochure then a place to shop. The only place I can find Atmel's products is digikey, or mouser.

http://www.digikey.com/ca/en/techzone/microcontroller/category/Atmel.html?tab=0

Here's what I'm talking about there are several programmers ranging from $33 CAD to $600 CAD. I'm not sure which programmers are compatible with which MCU's. I could probably find out but then I have to decide which MCU's I'm going to work with, in advance of getting started with Atmel.

This is driving me crazy, I want to diversify my skills with regards to MCU's, but my god.

andri:

I can recommend the AVR Dragon. It's cheap(ish) and should support most, if not all of the 8-bit uC's and all three programming modes.

One bad thing is that the default Atmel C IDE is rather horrible (why do hardware manufacturers insist people use their sub-par IDE's anyway?), at least if you are used to proper development environments. Luckily, there is a avr-eclipse plugin for Eclipse that integrates nicely with GCC and makes development real breeze.

alm:
No one forces you to use their front-end with Arduino, you can also use the boot loader to program binaries you compiled from C or assembler.

There are basically three official programmers that are of interest to the hobbyist:

* AVRISP Mk. II: basic programmer that will do in-circuit programming with any AVR (except Xmega)
* STK500: This is a development board, but can also do both in-circuit programming and high-voltage programming (useful if you disabled the reset pin to gain an extra pin). It's a bit old (uses RS-232 interface, although a usb-serial cable works fine), but has some useful features as a development board like variable power supply and clock source.
* Dragon: This is the newest and the most full-featured. It will do programming (both in-circuit and high-voltage) and debugging (jtag and debugWire for the smaller chips). There are reports that it's a bit fragile, but the newer revision (by now a year or so old) is supposed to be better.
All are official Atmel products and are supported by AVR studio. There are also clones available of the AVRISP Mk.II, not sure how reliable they are, probably not worth it.

I'd stick with the 8-bit versions to start. This means ATtiny or ATmega. An advantage over PIC is that the architecture is basically the same (the ATtiny lacks some instructions like multiplication). The ATtiny is usually <= 20 pins, ATmega 28-64 pins or so. I like the ATmega 48/88/168/328 series, the latter two are also used by the arduino. The difference between them is amount of RAM/ROM/EEPROM, it's available in 28-pins DIP, and large enough for many applications. The ATmega48 is often quite cheap, cheaper than many ATtiny's.

I'd highly recommend the avrfreaks forum for any information about AVR. There's a lot of information in the archives.

TheDirty:
I think you should try looking into ARM chips and Cortex-M3/Cortex-M0.  I think moving into AVR's is a sideways move and in terms of expanding your diversity ARM's would be a better direction.  I'm only suggesting this, because you are not a beginner.  Even the small and cheap Cortex variants are not really for beginners.

I'll try to type out some overview of your options with the chips and the development environments later tonight when I have some time.

TheDirty:
This turned into a crazy ass novel.  I didn't really read through this or check it, so hope it makes sense.

For those that don't know, ARM doesn't make chips, they just design the cores and sell them to other companies to manufacture.  The core is the actual processing unit and doesn't include peripherals, so even though many manufacturers make ARM7 chips, you can't just swap code between them, because the peripherals are different; timers, UART, SPI, I2C....all the setup and control registers for these are different.  So you generally want to pick a specific manufacturer and stick with them if you can, but changing to another manufacturer is not exceedingly difficult.

One of the benefits of working with ARM's is that a JTAG programmer and a development environment will usually work with just about any of the ARM chips from the small low power Cortex-M0 to the ARM9 or C-A8.  The JTAG connector is a standard 20 pin IDC connector which can be used for in circuit programming/debugging, just like you would with a PICkit.  You can also reduce it to a 14 or 10 pin connector if you want to save space.  ARM has started to implement Serial Wire Debug on their smaller chips with reduced pin count.  SWD is a two wire debug interface that uses a smaller 1.27mm 10 pin header.

I'm just going to focus Cortex-M3.  CM3 has come out fairly recently and it's pretty popular.  Super cheap 32bit with high clock rates.  It's a stripped down ARM core.  Your options for Cortex-M3 development kits are:

Luminary Micro was the first with CM3 parts and has been bought out by Texas Instruments.  They have a nice cheap $50 EKK-LM3S811 development kit with a 64k LM3S811 chip.  The devel kit is also a JTAG programmer and supports SWD, so it can program other chips.  This is a nice development kit and hard to pass up.  LM has a C library called StellarisWare which makes programming pretty easy, but can suck up some memory/performance.  Some of the higher chips have the StellarisWare library in ROM.
http://www.luminarymicro.com/products/ekk-lm3s811_evaluation_kit.html

ST has the STM32.  I don't know much about them.  When I first looked at them, the selection was pretty limited and expensive.  They still seem expensive, but they have a ton of peripherals.  The Primer2 development platform has a big following.
http://www.st.com/mcu/inchtml-pages-stm32.html
http://www.stm32circle.com/hom/index.php

NXP just recently released their CM3 line.  The LPC17XX are powerful large flash and fast chips with crazy peripherals.  Ethernet, CAN, I2C FM+, even USB Host support.  LPT13xx are smaller chips, still fast, with a regular peripheral selection.  Their development kit is the LPCXpresso for the LPC13xx and it comes with it's own JTAG/SWD programmer that can be snapped off the devel board.  It's only $30.  The only downside is that the programmer is proprietary and is only supported by the Code Red development environment.  MBED is also offered, which has a powerful LPC1768, but it has a Arduino style development environment.  The main problem with the LPC13xx chips is that they only support SWD programming and SWD is only supported by a few programmers.
http://ics.nxp.com/lpcxpresso/
http://mbed.org/?gclid=CIDulOjYvqECFZFV2godFDmjAA

Okay, development environment options for C.  This is not an exhaustive list.

GCC is the free compiler.  There are some development packages like YAGARTO that try to pull everything together for you.  The IDE (Eclipse), the compiler (GCC), and the programmer (OpenOCD).  I found OpenOCD to be difficult to deal with and had problems with it at the time with my 64bit OS, but many people use this successfully and it's had a few releases since I last tried it.  Straight Eclipse also has a pretty unintuitive interface.

Keil and IAR are professional development tools that offer limited code size versions for free, but don't offer any unlimited hobby versions.  If you want to use these over the limited code size, it's thousands of dollars for the full versions.

Code Red is a GCC compiler with an Eclipse interface.  They do have a lower cost option, $256 for an update 256k limit compiler, $512 for a 512k limit compiler.  Works with the LPCXpresso programmer.  Says it's limited to NXP chips CM2, ARM7, and ARM9.  Not certain if anything else is supported.

Rowley Crossworks also uses the GCC compiler, but they have their own IDE and it supports just about every ARM chip out there and many different JTAG programmers.  They have an unlimited Personal version available for $100.  The IDE is really nice and the setup and use is very easy.

My own experience is with Stellaris and LPC1xxx chips.  I originally used the Stellaris chips and may go back if they refresh the line a bit, but I'm using the LPC1xxx chips right now.  Real nice and the peripherals are similar to the popular LPC2xxx chips.  I use the Olimex ARM-USB-TINY which is and FTDI based programmer.  $50 from Sparkfun.  For the LPC1xxx chips I use an adapter from Rowley that allows SWD.  Rowley isn't selling these publically yet.  I paid the $150 for the Personal license of Crossworks and consider that it was totally worth it over the Elipse/GCC/OpenOCD combo.

I don't really document the projects I work on, but I've taken some pictures of some of the things I've played with:
http://www.higginstribe.com/lpc1xxx/
http://www.higginstribe.com/stellaris/

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version