Giter Site home page Giter Site logo

benwattsjones / avr-microcontroller-tutorial Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 82 KB

A series of lessons on programming AVR MCUs using GCC-AVR on linux

Assembly 100.00%
avr atmega atmel-avr atmega32 microcontroller mcu assembly assembly-language

avr-microcontroller-tutorial's Introduction

AVR microcontroller programming with avr-gcc

This repository is split into a series of lessons intended to be followed in order as a tutorial series. The tutorials cover embedded systems programming using the AVR atmega32 microcontroller (though is also applicable to other AVR MCUs). The toolchain used is Linux with gcc-avr for compilation/ assembly and avrdude for flashing the MCU. A Raspberry Pi is used as a programmer in lesson 1, though other programmers are available.

These tutorials assume knowledge of C and assembly programming, as well as basic electronics knowledge. Regarding parts, a Raspberry Pi (or other linux PC and an external AVR programmer); an ATmega32-16PU (or other 8-bit Atmel MCU); a breadboard plus basic electronic components (wires, resistors, LEDs...) and a 5V AC adaptor (e.g. phone charger) are required.

Topics covered

Lesson 1: Setup and LED on. toolchain installation; desktop vs. MCU programming; gcc-avr basics; programming the MCU with avrdude; make an LED turn on.

Lesson 2: Inputs, Interrupts and LED Button. SREG and conditional execution; loops; interrupts; controlling and LED with a button.

Useful Resources

Another AVR tutorial series, in C: http://newbiehack.com/MicrocontrollerTutorial.aspx

Instruction set summary for AVR MCUs: http://avr-tutorials.com/sites/default/files/Instruction%20Set%20Summary.pdf

ATmega32 datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/doc2503.pdf

AVR-libc user manual: http://cs.ou.edu/~fagg/classes/general/atmel/avr-libc-user-manual-1.7.1.pdf

All circuit diagrams were drawn using EasyEDA: http://easyeda.com

avr-microcontroller-tutorial's People

Contributors

benwattsjones avatar

Stargazers

 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.