Blink A LED
For beginners the first thing to try on a new system or in a new programming language is to print out "hello world". The equivalent for microcontrollers and other embedded systems is to blink a LED. When even the target circuit and the programmer are freshly put together it is wise to start even lower, with a blink-a-LED program written by someone else that is known to be working.
On this page you will find a 1 Hz blink-a-LED test programs for the Tiny12 and the AT2313 targets chips and circuits. You can build the circuits on a breadboard or use the ATTiny board that you can buy at www.bizztronix.net. The programs are made in assembler with AVR Studio 4 for the ATTiny12 and with the BASCOM compiler for the AT2313. Look on the AVR Programming Hardware pages for how to make a programming cable and on the AVR Programming Software pages for the software to get the hex file into your device.
Because the ports of the AVR chips can draw 20mA current, only a resistor to limit the current is neccesary to connect a LED to one of the ports. In both the circuits the LED is connected to PortB.0. In the circuit for the ATTiny12 the internal 1.2 MHz oscillator is used, because of that you don't need an external oscillator, but it can be configured also for an external crystal. The ATTiny2313 can also be used with his internal oscillator.