How to Program ATtiny85 With Raspberry Pi?

Published

Introduction: How to Program ATtiny85 With Raspberry Pi?

About: Linux enthusiast Current Instructables are 4-5 years old, I'd rather delete them because of my inconvenient text. ~sigh

A long time ago i wrote "How to program ATtiny85 with parallel port", but parallel port is OUT
So i decided to make a new tutorital!
You need:
    - Raspberry Pi(any)
    - Some jumper cables(pins to breadboard)
    - one gpio pin(optional, but it makes your life simpler)
    - Breadboard
    - ATtiny(25/45/85)
    - maybe 4 x 400 ohm resistors(to avoid errors)
I used Arch Linux on my rpi

Now do the following commands:
I MADE STUFF EASYER FOR ARCH LINUX USERS, YOU CAN USE YAOURT NOW(yaourt -S avrdude-rpi)
[mark@berryterminal ~]$ sudo pacman -S bison automake autoconf flex git gcc
[mark@berryterminal ~]$ sudo pacman -S avr-binutils avr-gcc avr-libc
and clone custom avrdude from https://github.com/kcuzner/avrdude
[mark@berryterminal ~]$ git clone https://github.com/kcuzner/avrdude
[mark@berryterminal ~/avrdude]$ ./bootstrap && ./configure && sudo make install



Now download Makefile from here: http://db.tt/W0MyDOXn
and now connect cables to breadboard. I use this pinout: http://elinux.org/File:GPIOs.png(yeah, 1-26)
Try to probe attiny85:
sudo avrdude -p t85 -P /dev/spidev0.0 -c linuxspi -b 10000
If it works then you're done! Happy programming =)

Share

    Recommendations

    • Creative Misuse Contest

      Creative Misuse Contest
    • Oil Contest

      Oil Contest
    • Clocks Contest

      Clocks Contest

    6 Discussions

    Cool! I am new to the raspberry pi and coding so I am trying to find simple projects like this as my first coding projects. :)

    This is great, it has given me a good start. Probing the attiny85 seems to work for me with Raspbian.
    But I am a novice at programming microcontrollers and I do not know what to do with the Makefile you supply.
    Any chance you can post an example c file that I can compile and run? All examples out there seem to use the Arduino.
    Cheers.

    2 replies

    Hi,
    You just need to put that makefile to directory(e.g where you want to have attiny85 program code) and run command 'make'
    to get sample program, google 'attiny85 blink avr-gcc'
    Makefile makes stuff simpler.

    Thanks, a bit of googling and I got it to work.
    I will probably make a more detailed instructable for the beginner. Thanks for the help.