Home > AVR LEARNING > Blink A LED

Blink A LED

Blink a LED Blink a LED blink a led

Description

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 AT2313 ISP board. The programs are made in assembler with AVR Studio 4 for the ATTiny12 and with the BASCOM complilor 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.
Downloads
File Description File size
Download this file (Blink a LED Tiny12.aps)Blink a LE~.aps AVR Studio 4 project files for ATTiny12 2 Kb
Download this file (Blink a LED Tiny12.HEX)Blink a LE~.HEX hex file ATTiny12 0 Kb
Download this file (Blink a LED Tiny2313.bas)Blink a LE~.bas AVR BASCOM source file ATTiny2313 0 Kb
Download this file (Blink a LED Tiny2313.HEX)Blink a LE~.HEX hex file ATTiny2313 0 Kb
Categories: AVR LEARNING
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment