Programming with ATtiny85

This week was my first attempt working with the ATtiny microcontroller. In the past I've worked with many of the Arduino development boards, but for this experiment I was able to start programming the microchip directly.
The ATtiny85 is a type of integrated circuit (IC) from the Atmel AVR family. Below is a digram of the pins.

ATtiny85 pinout diagram

In class we learned to use an Arduino Uno as an AVR ISP (in-system programmer) for the ATtiny. I also happened to have the Sparkfun Tiny AVR Programmer, which made troubleshooting with the chip much easier.

My first circuit was a simple blinking LED. I used the Ardiuno blink example code.

Next I tried to replace the LED with a Neopixel. I used some example code, which is supposed to result in a bright green color, but instead resulted in a dim orange. I was surprised by the color, though the circuit did seem to work.

ATtiny85 on breadboard with Neopixel

My next idea was to work with a circuit I had previously created for another project. I attached an electret mic amplifier to an analog input pin, and attached an LED each to two digital output pins. The results were very confusing. The LEDs were blinking in a bizarre pattern, and I could not tell if it was in any way related to the input. I am wondering if this is related to the sample rate of the mic and the internal clock of the chip.

For my final experiment I played with the PWM pins of the ATtiny85. I wrote a program to dim and brighten an LED to resemble breathing. I am interested in soft circuitry, and how to integrate components and circuits into textiles. I added my circuit to a tapestry I have been weaving.

It is my goal to eventually create interactive tapestries, which is a huge reason why I enrolled in Homemade Hardware. Though this circuit was not interactive, I can already see the potential for working directly with ICs and switching away from development boards.