Skip to content

FrenkenFlores/led-garland-avr-microcontroller

Repository files navigation

LED garland programming on AVR microcontoller

The goal of this project was to study the AVR microcontollers. The following is a CodeVisionAVR project that can be used to build a new firmware for the microcontroller. As a SPICE system to simulate the circute you can use the Proteus project that is already configured.

Components

The circute consists of 8 red LED (2.2V, 10mA), 8 resistors (300 OHM), power source (5V), button, ground and a ATtiny2313 microcontroller. attiny2313.png

Demo

The program should simulate a loop of running lights, pushing the button makes it change the direction.

demo.gif

Compile

The most optimal way is to use the CodeVisionAVR or AVR Studio to build the project, but you can still compile it in Linux. You must install the following libs:

apt-get install avr-libc
apt-get install gcc-avr

After installation execute the following commands:

# Create ELF executable
avr-gcc -mmcu=attiny2313 -Os -DF_CPU=1000000UL -Wall -std=gnu99 -o main.elf main.c
# Convert it to HEX firmware
avr-objcopy -O ihex -R .eeprom main.elf main.hex

Resources

About

LED garland programming in C on ATtiny AVR microcontroller. A Moscow State University of Technology "Stankin" laboratory project on AVR microcontrollers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors