Summary of Running LED’s
This project demonstrates how to create a running LED effect using an ATTiny2313 microcontroller. The system lights up eight LEDs sequentially from left to right using BASCOM-AVR software. Hardware connections link the LEDs and current-limiting resistors to PORTB, while the code cycles through specific binary values to control the light sequence with 500ms delays between each step.
Parts used in the Running LED Project:
- ATTiny2313 microcontroller
- 8 LEDs
- 8 resistors
- Breadboard (optional)
- AVR BASCOM compiler
This small project let you make running leds. For this project you need a attiny2313 microcontroller and 8 leds and 8 resistors. The leds can be programmed so that they show differrent patterns.
Hardware
The leds are connected to PORTB of the microcontroller via the resistors that limit the current to 20mA. The project can be build an a small breadboard, but the ATTiny2313 and the LED board can be used also. You can buy them at www.bizztronix.eu.SoftwareThe program is build with the AVR BASCOM compiler. Copy and past the code below, compile the code and write the text to the microcontroller. The leds are running from left the right.’ program name: running led
‘ author: www.avrprojects.net
$regfile = “attiny2313.dat” ‘ set the micro
$crystal = 4000000 ‘ set the clock speed of the micro
Config PortB = Output ‘ make PORTB pins outputs
loop:
Portb = 0
Waitms 500
Portb = 1
Waitms 500
Portb = 2
Waitms 500
Portb = 4
Waitms 500
Portb = 8
Waitms 500
Portb = 16
Waitms 500
Portb = 32
Waitms 500
Portb = 64
Waitms 500
Portb = 128
Waitms 500
Goto loop
For more detail: Running LED’s
- What components are required for this project?
You need an attiny2313 microcontroller, 8 leds, and 8 resistors. - How are the leds connected to the microcontroller?
The leds connect to PORTB of the microcontroller via resistors that limit current to 20mA. - Can I build this on a breadboard?
Yes, the project can be built on a small breadboard or using the ATTiny2313 and LED board. - Which software is used to program the device?
The program is built with the AVR BASCOM compiler. - What pattern do the leds display?
The leds run from left to right in a sequential pattern. - What clock speed is set in the code?
The crystal is set to 4000000 Hz. - How long is the delay between each led change?
The wait time is set to 500 milliseconds. - Where can I buy the specific hardware mentioned?
You can buy them at www.bizztronix.eu.


