Re-Programming the LilyTiny / LilyTwinkle

Pages
Contributors: bri_huang
Favorited Favorite 4

Notes on Programming the ATtiny85

The ATtiny85 isn’t your everyday Arduino microcontroller. It packs a lot of punch for its small size.

ATmega85 Pin Reference

The following Arduino commands should be supported:

All 5 pins are general purpose digital I/Os (GPIO). This means that they can be used with both digitalWrite() and digitalRead().

Pins 0 and 1 support PWM output (analogWrite).

Pins 2, 3, & 4 are tied to A/D on the chip (analogRead).

While the ATtiny85 supports most of the things you need, there are some things it can’t do.

No Hardware Serial (UART)

The ATtiny85 does not have a built in hardware UART. If you try to compile any Arduino code with Serial.begin() or Serial.print() you’ll get an error. However, there is a work around for this -- using Software Serial. This tutorial shows an example of how to do this: