Introduction: How to Program ATtiny85 With Raspberry Pi?

Picture of How to Program ATtiny85 With Raspberry Pi?

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 =)

Comments

2022255 (author)2017-02-14

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. :)

hatazzzz (author)2014-02-06

Can i pgogram atmega8 with that setup and using logic level converter?

mikroskeem (author)hatazzzz2014-02-07

never tried, but it should work

prb3333 (author)2013-12-20

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.

mikroskeem (author)prb33332013-12-22

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.

prb3333 (author)mikroskeem2013-12-22

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.

About This Instructable

9,078views

51favorites

License:

Bio: Linux enthusiast Current Instructables are 4-5 years old, I'd rather delete them because of my inconvenient text. ~sigh
More by mikroskeem:How to move Raspberry Pi rootfs to another drive/partition?How to program ATtiny85 with Raspberry Pi?How to program Arduino chips over LPT with c++ code?
Add instructable to: