[Picture shamelessly stolen without permission from the SIMM100 page.]
The aim of this page is to be a guide to the quickest way to get from ground zero to a useful working construction in the least amount of time and money [estimate total cost ~$25].
The motivation for this page came from the personal observation that there are many very good AVR pages around, but none uniquely focused on getting the newbie from ground zero to a working project in the least amount of time and money. This page is very explicit about not listing every option possible, but only a carefully selected subset that has proven successful to the author.
No real attempts is made to motivate the use of AVRs. The mere existence of these pages should be taken as an token of appreciation.
For a starters project taking the most powerful version of the family first will provide with the richest experience. The AVR AT90S8535 is the current top of the line in the AVR family. A few highlights from the AT90S8535:
Assuming you go with the SIMM100, configure it with at least the XTAL, ISP connector, the three leds, and all their support components. Including the voltage regulator might also be a good idea if 5V isn't readily available. There is much more detail available on the SIMM100 page.
One thing to keep in mind when connecting things to the pins of the AVR is that for In System Programming (ISP) to work even with stuff connected, the MOSI, MISO, and SCK pins must be connected to an input device, that is, must be configured as outputs in normal operations. On the AT90S8535 used in this project (and if I'm not mistaken all of the AVRs), these pins corresponds to PB5, PB6, and PB7 (the three highest bits of port B).
|1 MOSI||2 +5V|
|3 Prog on||4 GND|
|5 RES||6 GND|
|7 SCK||8 GND|
|9 MISO||10 GND|
Notice, that the application should be powered while being programmed (the programmer doesn't supply power).
The simplest and cheapest programmer use just the parallel port of the PC and is trivial to make with snapon connectors (adapted from Alexey Lapshin and Sergey Larins simple AVR programmer):
It works nicely under Linux with uisp (read below), but there is no software support for Windows. The only drawback of this simple programmer is that it, unlike the ISP Dongle (mentioned below), doesn't have the software controlled connections to MISO, SCK, and MOSI, thus might interfere with what ever is connected to these pin, even when not programming. For this this reason I've added 1K resistors and patched uisp to leave the outputs high. With this in place, I haven't had any problems. [Picture of my version].Connect AVR with parallel port ISP connector Parallel Port Signal name Pin Pin Signal name MOSI 1 ----\/\/\--- 2 Data 0 GND 4 ------------ 19 GND Reset 5 ------------ 16 Init GND 6 ------------ 21 GND SCK 7 ----\/\/\--- 1 Strobe MISO 9 ----\/\/\--- 11 Busy This scheme works with all parallel port modes (EPP,ECP, classic).Copyright (C) 1998 by Alexey Lapshin and Sergey Larin.This scheme can be modifyed as described in send_byte.s
The "official" AVR programmer is the ISP Dongle that also connects to the printer port. Claudio Lanconelli has the schematics for a cheap and reliable clone that can be build quickly, but beware that the ISP connector is wired wrongly in his diagram. If it is to be compatible the SIMM100 platform (and the STK200 starters kit), it must be wired as according to the the description given above.
To develop under Windows, the standard Atmel assembler might suffice. There is also a windows version of the AVR GCC C Compiler, but I have no experience with this. It look like the most current stuff (as of Marts 16th, 2000) can be found at http://www.gwdg.de/~mrickma/avr.
For any serious development, I'd recommend using Linux and programming in C. Denis Chertykov has extended GCC with support for the AVR (known as the AVR GCC, included in future official GCC distributions). The AVR GCC works really well, but it can be very hard to find the mix of latest releases and set up the tools as they are scattered out over the web and partly in the mailing list. Most of it could be found at the Micro Tools for Linux page and at http://www.gwdg.de/~mrickma/avr.
[Include links to examples with code snippets for LCD (lcd.h, lcd.c, test_lcd.c), keyboards (keymatrix.h, keymatrix.c, test_kbd.c. I've just discovered that AVR240 a similar method, but IMHO it's vastly harder to understand.), serial, ibm-pc keyboard, I2C, Hall-effect sensor (trivial), servos, CNC controller, the onboard ADC, the gameboy camera, ...
AVR's application notes are full of valuable examples and information. Don't miss it!
The Microchip's PIC application notes is also a valuable source of good idea, most of which can be adapted to the AVR with a much nicer result.]