/AVR_Advent_Calendar

Learn how to program AVR 8-bit microcontrollers in 24 days.

Primary LanguageCThe UnlicenseUnlicense

AVR Advent Calendar

About

In this repository I will host the code for my AVR Advent calendar. You can learn how to use the most important interfaces of the AVR 8-bit microcontrollers in 24 days. Even if it is not Advent, this repository can be used as a tutorial to learn how to code with AVR 8-bit microcontrollers.

What you need

  • Atmega Microcontroller (e.g. Atmega48, Atmega88, Atmega168, Atmega328)
  • Attiny44 microcontroller
  • three LEDs (green, yellow, red)
  • three 480 Ohm resistors
  • push button for breadboard
  • four 10kOhm resistors
  • 7 segment display
  • 74HC595 Shift Register Serial In, Parallel Out
  • 74HC165 Shift Register Parallel In, Serial Out
  • 20 MHz Crystal
  • LM75A temperature sensor board
  • Breadboard
  • Wires
  • Potentiometer 10kOhm
  • DIP Switch (at least 4 positions)

If you already own a Raspberry Pi, you can use it to program the AVR controllers and use the interfaces to interact with it (UART, I2C, SPI, ...). In case you don't own a RPi and you don't want to buy one, you need the following items to follow my tutorial:

  • USBASP programmer
  • UART to USB converter

Watch it here

You can watch videos to this tutorials on Youtube or Odysse.

Support my work

If you want to support my work, you can buy me a coffee or send a tip over PayPal.

What you will learn

  1. How to install the needed software
  2. How to write and compile a simple program
  3. How to flash the program to the target controller
  4. Bit Operations
  5. LED Traffic light
  6. Button control
  7. 7 Segment Display
  8. External Interrupt
  9. Using an external crystal
  10. UART serial Loopback
  11. UART Interrupt
  12. Analog comperat
  13. Analog Digital Converter
  14. SPI Master 75HC595
  15. SPI Master 74HC165
  16. SPI Slave
  17. SPI Master with USI
  18. EEPROM for non volatile data
  19. I2C Master with LM75A Temperatur sensor
  20. I2C Slave
  21. Attiny44 USI I2C Master
  22. Timer
  23. PWM
  24. Watchdogs