Running LED’s

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.
Running LED's
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
AVR Chronograph from concept to
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


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top