An ATtiny such as the ATtiny85 can not be connected directly to a computer via a FTDI cable but needs an Arduino (i.e., a ATMega328) in between. I built this little circuit which connects the SCK, MISO, MOSI and RESET of a ATTiny to an ATMega using the latter as an ISP. This small prototyping unit also has some header pins and a small solderless breadboard for prototyping circuits for the ATtiny.
The prerequisite to run this board is that the ATmega328 is preloaded with the Arduino bootloader. You also need to prepare the Arduino ISP for ATtiny microcontrollers.
- Download the zip file from GitHub.
- Unzip the zip-file and place the attiny folder under a "hardware" folder in your Arduino sketchbook directory.
- You should now see the ATtiny entries under the board menu in the Arduino ISP.
- Connect the FTDI adapter (as this one from Sparkfun).
- Select the Arduino Uno from the board menu.
- Upload the ArduinoISP sketch from the examples menu (you only have to do this once).
After that, you are ready to program the ATtiny. Follow this procedure:
- Open the Blink sketch from the examples menu.
- Change the pin number for the LED from 13 to 0.
- Select the ATtiny85 from the tools > board menu.
- Select "Arduino as ISP" from the tools > programmer menu.
- Upload the sketch and watch the LED (you just connected at pin 0 on the ATtiny85) blink.
Female headers are used to break out all the pins on the ATtiny. I also added a DIP switch (not in the diagram) do disconnect the ATMega328 from the ATtiny once it is programmed.
More information about ATtiny Arduino stuff can be found in the links below:
The board can also be used to bootload an ATMega328 by connecting the SCK, MISO, MOSI and RESET pins to the female headers as shown in the above picture. In this case the ATtiny must be removed. You must also add a 16MHz crystal and 22pF decoupling capacitors as well as a 10K pullup on the reset pin. The schematics for such a bootload circuit is shown here.