Monthly Archives: September 2013

1.8″ 128*160 TFT via SPI to Teensy 3.0

Using Peter Loveday’s adapted Adafruit GFX library ¬†from the PJRC forums, I was able to test my 1.8″ 128 by 160 pixels at millions of colours for $6 shipped from China. It performed well. I was able to display some text and run through the benchmark program. The TFT is to be used in creating a mini projector.

Leave a comment

Filed under Uncategorized

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