Most viewed

30 Nov 2011

Blink A LED


Blink a LEDBlink a LEDblink 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
FileDescriptionFile size
Download this file (Blink a LED Tiny12.aps)Blink a LE~.apsAVR Studio 4 project files for ATTiny122 Kb
Download this file (Blink a LED Tiny12.HEX)Blink a LE~.HEXhex file ATTiny120 Kb
Download this file (Blink a LED Tiny2313.bas)Blink a LE~.basAVR BASCOM source file ATTiny23130 Kb
Download this file (Blink a LED Tiny2313.HEX)Blink a LE~.HEXhex file ATTiny23130 Kb

No comments:

Post a Comment

Confused? Feel free to ask

Your feedback is always appreciated. I will try to reply to your queries as soon as time allows.

Note:
Please do not spam Spam comments will be deleted immediately upon my review.

 

Based on your view




You have to try this

This is trending now #