Code Monkey home page Code Monkey logo

learn-avr's Introduction

Learn AVR programming with ATMEGA162 and ATMEGA328p

Equipment / Software

  1. EEPROM Programmer (TL866 II)
  2. minipro
  3. ATMEGA328p MCU (any atmega chip is also fine), datasheet
  4. avr-gcc for compiling C, avra for compiling assembly

How to compile / flash

Checkout src/Makefile.

  • compiles .c file to .hex file
  • using minipro (TL866 II) to upload your code to chip
    • make flash to flash your code to chip
  • make size to check compiled file size
  • make disasm to check generated assembly code

Content (WIP)

  • GPIO: AVR microcontroller has PORTA, PORTB, PORTC IO register. (./src/gpio/gpio.c)
  • timer: AVR microcontroller usually have 1 ~ 3 timers (./src/timer/timer.c)
  • external interrupt: you can trigger external interrupt in AVR microcontroller (./src/ext_int/ext_int.c)
  • pin change interrupt: you can trigger pin change interrupt (PCINT) in AVR microcontroller
  • usart: Rx, Tx communication (./src/usart/usart.c)
  • watchdog: be able to detect if program has hang up or not
  • DHT11: Using pure AVR chip to measure temperature via DHT11 (./src/dht11/dht11.c)
  • flash: AVR microcontroller allows you declare const variable into flash space to save RAM (./src/flash/flash.c)
  • SPI: (wip)
  • I2C: (wip)
  • EEPROM: (wip)

TODOs

  • extract USART functionality

Resources

learn-avr's People

Contributors

kjj6198 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.