It doesn’t take long to want to move from Arduino to more embedded uses for the Atmel MCU’s. I got an ATTiny85 the other day and a AVR USB ISP MkII as well. Time to see if I can get the leds blinking?!
First off I had to get the Arduino IDE ready for ATTiny’s..
Installing ATtiny support in Arduino
- Download: ATtiny (from this GitHub repository)
- Locate your Arduino sketchbook folder ( ~/sktechbook/)
- Create a new sub-folder called “hardware” (if it doesn’t exist already!) in the sketchbook folder.
- Copy the attiny folder from inside the .zip to the hardware folder.
- Restart the Arduino development environment.
- You should see ATtiny entries in the Tools > Board menu.
Now time to wire up the ISP.. Remembering that Rst (pin 1 on the Tiny85) has to be held high via a 4K7 resister, and the ATTiny85 needs to get power from somewhere. The ISP won’t power the circuit. No KiCAD today, just pen cad!
I has a RGB LED lying around so I hooked it up to the ATTiny. Red to PWM0 (pin 5) and green to PWW1 (pin 6).
Easy and quick.. there is something very cool about a two colour pulsing LED, or is it just me?