Programming an ATtiny85 with an Arduino Nano

ATtiny45-85

First question for anyone reading this … why?  Well, I’ve a few ideas for using this tiny microprocessor.  There’ll be a post along very soon after this one.

Here’s the datasheet for this fantastic device.

Just about all the information needed to do this can be found in High-Low Tech’s Programming an ATtiny w/ Arduino 1.0.1.

They describe the process using an Arduino Uno whereas I’m using a Nano.  Very little difference except as follows:

The pinout of the Nano is different.  So here are the SPI connections.

  • ATtiny Pin 2 to Arduino Pin 16 (D13 SCK)
  • ATtiny Pin 1 to Arduino Pin 15 (D12 MISO)
  • ATtiny Pin 0 to Arduino Pin 14 (D11 MOSI)
  • ATtiny Reset Pin to Arduino Pin 28 (RESET)

One other difference I found when following the section called “Configuring the ATtiny to run at 8 MHz (for SoftwareSerial support)”, I needed to set the following:

  • “ATtiny85 (Internal 8MHz clock)” in the Tools > Board menu
  • “Arduino as ISP” in the Tools > Programmer menu

These settings are mentioned later in the tutorial but I found I needed to set them at this stage.

Otherwise, everything worked as stated.

Figure 1 below shows the schematic:

Figure 1 - Schematic

Figure 2 shows the breadboard setup for programming the ATtiny85 plus some LEDs to have a go at programming it:

Figure 2 - Setup for Programming

Leave a Reply

Your email address will not be published. Required fields are marked *