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

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

Share

    Recommendations

    • Audio Contest 2018

      Audio Contest 2018
    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge
    • Optics Contest

      Optics Contest

    6 Discussions

    0
    None
    2022255

    1 year ago

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

    0
    None
    prb3333

    4 years ago on Introduction

    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
    0
    None
    mikroskeemprb3333

    Reply 4 years ago on Introduction

    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.

    0
    None
    prb3333mikroskeem

    Reply 4 years ago on Introduction

    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.