Pfad: Home => AVR-english => Beginner => Hardware

2313-ExperimentalHardware for AVR-Assembler-Programming

Learning assembler requires some simple hardware equipment to test your programs and see, if it works in practice.

This page shows two easy schematics that enable you to homebrew the required hardware and gives you the necessary hints on the required background. This hardware really is easy to build. I know nothing easier than that to test your first software steps. If you like to make more experiments, leave some more space for future extensions on your experimental board.

If you don't like the smell of soldering, you can buy a ready-to-use board, too. The available boards are characterised on this page below.

To the top of this page

The ISP-Interface of the AVR-processor family

Before going into practice, we have to learn a few essentials on the serial programming mode of the AVR family. No, you don't need three different voltages to program and read an AVR flash memory. No, you don't need another microprocessor to program the AVRs. No, you don't need 10 I/O lines to tell the chip what you like it to do. And you don't even have to remove the AVR from your experimental board, before programming it. It's even easier than that.

All this is done by a build-in interface in the AVR chip, that enables you to write and read the content of the program flash and the built-in-EEPROM. This interface works serially and needs three signal lines: These three signal pins are internally connected to the programming machine only if you change the RESET (sometimes also called RST or restart) pin to zero. Otherwise, during normal operation of the AVR, these pins are programmable I/O lines like all the others. If you like to use these pins for other purposes during normal operation, and for in-system-programming, you'll have to take care, that these two purposes do not conflict. Usually you then decouple these by resistors or by use of a multiplexer. What is necessary in your case, depends from your use of the pins in the normal operation mode. ou're lucky, if you can use them for in- system-programming exclusively. ISP6PIN Not necessary, but recommendable for in-system-programming is, that you supply the programming hardware out of the supply voltage of your system. That makes it easy, and requires two additional lines between the programmer and the AVR board. GND is the common ground, VTG (target voltage) the suplly voltage (usually 5.0 volts). This adds up to 6 lines between the programmer and the AVR board. The resulting ISP6 connection is, as defined by AMEL, shown left.

ISP10PIN Standards always have alternative standards, that were used earlier. This is the technical basis that constitutes the adaptor industry. In our case the alternative standard was designed as ISP10 and was used on the STK200 board. It's still a very widespread standard, and even the STK500 is still equipped with it. ISP10 has an additional signal to drive a red LED. This LED signals that the programmer is doing his job. A good idea. Just connect the LED to a resistor and clamp it the positive supply voltage.



To the top of this page

Programmer for the PC-Parallel-Port

Now, heat up your soldering iron and build up your programmer. It is a quite easy schematic and works with standard parts from your well-sorted experiments box.

ISP-Parallel port

ISP-Parallel port Yes, that's all you need to program an AVR. The 25-pin plug goes into the parallel port of your PC, the 10-pin-ISP goes to your AVR experimental board. If your box doesn't have a 74LS245, you can also use a 74HC245 or a 74LS244/74HC244 (by changing some pins and signals). If you use HC, don't forget to tie unused inputs either to GND or the supply voltage, otherwise the buffers might produce extra noise by capacitive switching.

The necessary program algorithm is done by the ISP software, that is available from ATMEL's software download page, by PonyProg2000 or other programmer software. Please be aware that the programmer software must support your device type.

To the top of that page

Experimental board with ATtiny13

This is a very small board that allows experiments with the ATtiny13's internal hardware. Tiny13-scheme

Tiny13-Board The picture shows The ATtiny13 requires no external XTAL or clock generator, because it works with its internal 9.6 Mcs/s RC generator and, by default, with a clock divider of 8 (clock frequency 1.2 Mcs/s). The hardware can be build on a small board like the one shown in the picture. All pins of the tiny13 are accessible, and external hardware components, like the LED shown, can be easily plugged in. This board allows the use of the ATtn13's hardware components like I/O-ports, timers, AD converters, etc.

Experimental board with a AT90S2313/ATtiny2313

For test purposes we use a AT90S2313 or its compatible and more modern ATtiny2313 on an experimental board. The schematic shows
2313-Experimental schematic

So that's what you need to start with. Connect other peripheral add-ons to the numerous free I/O pins of the 2313.

2313-Experimental The easiest output device can be a LED, connected via a resistor to the positive supply voltage. With that, you can start writing your first assembler program switching the LED on and off.

To the top of that page

Ready-to-use commercial programming boards for the AVR-family

If you do not like homebrewed hardware, and if have some extra money left that you don't know what to do with, you can buy a commercial programming board. Easy to get is the STK500 (e.g. from ATMEL. It has the following hardware: Experiments can start with the also supplied AT90S8515. The board is connected to the PC using a serial port (COMx) and is controlled by later versions of AVR studio, available from ATMEL's webpage. This covers all hardware requirements that the beginner might have.

To the top of that page

©2002 by http://www.avr-asm-tutorial.net