Teensy 3.0 programs an Atmel ATTiny85

With the Adafruit Ultimate GPS at the heart of the cat tracker (post(s) forthcoming), the on-chip logging requires a few strings on its 2-pin serial to start. The cheapest and simplest solution to this seemed to be the ATTiny85. What made this most attractive was the fact that they are easily programmable using the ArduinoISP, which works (with a few tweaks) on the Teensy 3.0. This was my first project that dealt with the Teensy 3.0’s SPI pins, which most projects documented online have yet to address. Please bear in mind that I am writing this 2 months later, so if I forget a detail, please ask me in the comments and I’ll fill in the blanks!

Using DorkbotPDX’s Teensy 2.0 as AVR ISP Programmer as a base, I applied the articles from Roger Parkison and Hobbytronics, and determined the proper Serial Peripheral Interface Bus (SPI) pins for Teensy 3.0. ArduinoISP was easy enough to configure once the pins were matched up.  This proved a minor challenge, as simple variations in the naming of SPI pins between blog/forum posts and the Teensy pin-out diagram were not immediately apparent to a newbie like me.

#include “pins_arduino.h”

#define RESET SS

#define LED_HB 6

#define LED_ERR 8
#define LED_PMODE 7
#define PROG_FLICKER true

#define HWVER 2
#define SWMAJ 1
#define SWMIN 18

The programming procedure is quite simple, and has been outlined in detail by others. The arduino-tiny project‘s definitions for the ATTiny85 and programming through the Arduino IDE worked out best for me. YMMV. The other option is the definitions from MIT’s High Low Tech, which some seem to have had luck with in the past.



Filed under DIY, Hacking, micro-controllers, Teensy

4 responses to “Teensy 3.0 programs an Atmel ATTiny85

  1. piotrjustyna

    Tried it with Teensy 3.1 and unfortunately it doesn’t work. Avrdude complains about attiny’s missing signature. Glad you got it working though!

  2. Thanks for your reply. I tried that but unfortunately with no luck. As a result, I started a thread on PJRC forum, we’ll see where this takes me: http://forum.pjrc.com/threads/26363-Teensy-3-1-as-an-ISP-programmer-for-Attiny85-missing-signature

  3. piotrjustyna

    Apologies for my late comment, but I got it working some time ago and forgot to post a link here. Hope it helps somebody: http://forum.pjrc.com/threads/26363-Teensy-3-1-as-an-ISP-programmer-for-Attiny85-missing-signature

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s