Introduction: Arduino ATtiny2313 Programming Shield

Picture of Arduino ATtiny2313 Programming Shield

Today, I made a small 3x3x3 LED cube with an ATtiny2313 that I had from about 2 weeks ago. Whenever I had to reprogram the LED cube when I thought of more awesome patterns, I had to get out my breadboard and then wire up everything again referring to pin-outs of ATtiny2313 and make sure everything is connected right and then finally upload the new code.

So I went on to eBay and amazon searching for something to program these chips as I was planning on using these chips a lot in the future. After spending about an hour I just realized I was wasting my time as there was no way I was going to spend about 20-30 dollars on a simple shield.

After thinking for a bit, I decided to make a simple and easy to make, ATtiny2313 programming shield, after I made it, all I needed to do to recode any of my attinys' is to just put it in the programming shield and just in a few clicks you have your code uploaded! No need to worry if everything is wired right and make sure there are no short circuits or anything that can short out the chip and fry it or anything else of that sort.

So now in this instructable I will show you how to build one of these shields for yourself!
It costs almost nothing and takes only about 30mins or so to make it.

So lets get started!

Step 1: Materials

Picture of Materials
Materials required for this project;
  1. Protoboard
  2. 10 Micro Farad Capacitor (or similar value)
  3. 2 LED's
  4. A couple of wires
  5. A single row pin header strip
  6. A single row female pin header strip
Tools required for this project;
  1. Soldering Iron
  2. Solder
  3. Glue Gun (Or just good glue)

Step 2: Prototype and Pinout

Picture of Prototype and Pinout

The image shows the pin-out diagram on how to wire up everything, you basically wire up everything as shown in the pin-out but not to the arduino directly but to a protoboard which has headers attached to them which can be attached to the arduino as a shield.

Make sure you keep the pin-out diagram of the ATtiny2313 next to you when wiring up everything to avoid any forgetful errors that may occur.

(Pin-out of ATtiny2313 Taken from

Step 3: Working on the Actual Shield

Picture of Working on the Actual Shield

Start off by attaching the female headers in the center of the protoboard and then put the male headers in the arduino and then put the protoboard on it so as to get the exact position where to solder the male headers.

Then connect the right pins from the male header onto the female headers according to the pin-out (Female headers are going to be used to attach the ATtiny2313 and male headers are going to be used to attach the shield to the arduino)

Then add the 2 LED's and the capacitor and connect them according to the pin-out as well, make sure the capacitor is attached the right way if its a polarized capacitor.

Then once everything has been wired up connect it to the arduino and upload a test code to make sure everything works fine (Instructions on how to do this on the next step), then once the testing is done you can add some hot-glue around the solder joints to make sure they are firm and don't make any sort of wrong connections. You could also use some electrical insulating gel/glue.

Step 4: Installing ATtiny Files

Picture of Installing ATtiny Files

To program the ATtiny2313 there are 3 main steps;

1)Installing the ATtiny files
2)Setting up Arduino as an ISP
3)Connecting the shield and uploading the code

First download this;

This download includes the files that need to be installed on the arduino IDE in order to program and use ATtiny boards with the Arduino programming environment.

By following the read-me, make sure that all the files are installed properly. As soon as they are installed, then when you go to Tools->Board, you should see a whole lot of new ATtiny options (There are ATtiny2313, ATtiny44, ATtiny84 and some ATtiny85 options).

Step 5: Setting Up Arduino As ISP

Picture of Setting Up Arduino As ISP

To set the Arduino as an ISP, first connect your arduino to the computer and open the example sketch 'ArduinoISP' by going to file, examples and ArduinoISP.

Then upload the code to the arduino by selecting the right board and right serial port in the options.

To make sure that you have uploaded the right program, in the next step you will make sure that the "Heartbeat" LED is working as it should (Fading on and off).

Step 6: Connecting the Shield and Uploading the Code

Picture of Connecting the Shield and Uploading the Code

Now once that is done, connect the shield to the arduino and you should see the Heart LED fading at a regular interval. Now once you see the the LED is doing what its supposed to do, then attach the ATtiny2313 to the shield. Now go into the arduino IDE again and then go to Tools->Programmer and select Arduino as ISP.

Then in the Tools->Boards, select the ATtiny2313 1Hz (Factory default sets the clock of the ATtiny2313 to 1Hz)
After selecting those 2 options then just open up your code and then hit Upload to upload the code to the ATtiny2313 with the Arduino as an ISP (Simply put, you are programming the ATtiny2313 by using the Arduino to connect it to the computer)

Once you are done uploading the code, then make sure you change the 2 options you changed back to the original so that you can upload code to the arduino again after doing this.

Step 7: What Next?

Picture of What Next?

So now since you can program and use an ATtiny2313, why not try use these for all your future projects instead of Arduino's?

They are a lot cheaper than the Arduino (by 22-30 dollars) and they are capable of 18 I/O pins and they work with most of the common Arduino coding environment functions. The size of them is much smaller compared to the arduino as well which is very handy when trying to put things into small enclosures etc.

The only drawback of the ATtiny2313 is that some functions are not supported by it, so projects involving them cannot be done and the amount of I/O pins are limited.

But on the bright side, for small/simple projects these are great!

If you make any projects based on the ATtiny2313 or if you make this programmer, then be sure to upload a picture or a video of it and post a comment below :)


SvenF7 (author)2017-05-31

exec: "avr-g++": executable file not found in %PATH%

can someone please help me? :/

Rutviks (author)2017-04-06

I tried all the steps but still attiny2313 is not in boards of arduio. What should i do.

stijn.vdbosch3 (author)Rutviks2017-05-25

Hi Rutviks

I had the same problem but i found a solution.
1) go to your arduino sketch folder
2)open the folder you downloaded in the hardware folder
3)rename the file "Prospective Boards.txt" to Boards.txt
4)restart the Arduino IDE

Normally this should work.

Bullitt4511 (author)2016-07-15

Hi, your tutorial is great. Just one thing which has me stumped. When writing code for the 2313, does one have to change the pin definitions to match those of those of the mpu? I have written progs and uploaded them to the attiny85 and always worked. I am 67 years old and have taken up the Arduino as a hobby, but my knowledge is VERY limited. Maybe you could help me out a bit. Or one of the other people commenting on this.


AhmedJ17 (author)2016-06-18

Replace the led with RGB...

SirBerrus made it! (author)2016-05-17

I made this and followed your instructions. It works great, well done and helpful instructable. I use it to create simple RGB faders when and arduino would be overkill...

Carry on the great work.

vks007 made it! (author)2016-04-30

This is a great post, thanks for this. I made it !! , didnt put the LEDs though yet.

DanR67 made it! (author)2016-02-14

I made one out of a prototyping PCB, and today I designed and ordered PCBs with all the programming LEDs and headers to test the program on the chip.

GeorgeP5 made it! (author)2016-01-26

I made a quick crude implementtation but it works!

duffy2512 (author)2015-02-09

Hi! Do you have the setup for an external clock to put it into the Arduino HW and Board configuration? Would be grat for the 2313 an 4313

cees.baarda.77 (author)2014-09-16

I've made mine with a leftover ZIF socket. It can program the 8-pin Attiny25/45/85 as well (jumper in the lower left). The jumper in the top left is for enabling/disabling the 10 mu capacitor. This type of print has pretty large holes so i could solder the headers nicely.

The images from left to right: component layout; fitted for tiny 25/45/85; fitted for tiny 2313/4313; photo; copper side of the print.

Why never a schematic diagram is given? This is a nice programmer, but first i have to puzzle and draw a schematic diagram before i can build the programmer. Ik see this problem in a lot of Arduino designs.

Since this small thing is just the same thing as this instructable is about, i did not feel the need to draw a schematic as well.

Furthermore Arduino is about hacking and sharing. I just shared here my version of this design.

I've another question for you: Since you seem to have drawn your own schematic of this version, why not share it with this community.

fatalwir (author)2013-12-10

I've done my shield, so there's a photo. :)

israelg (author)fatalwir2014-02-10

Nice, can you upload the PCB design for all?

fatalwir (author)israelg2014-02-10

Here it is:

I've made it in DesignSpark PCB.

israelg (author)fatalwir2014-02-11

thank you

vishalapr (author)fatalwir2013-12-12

Wow :D this looks amazing, a whole lot neater and more marketable, Great job.

bsairam (author)2013-09-19

can u say that wat files i have to be download and how to instal for showing that boards in tools menu

vishalapr (author)bsairam2013-09-22

You can download the files here:

This is what the instructions in the read me say:

Ensure the Arduino IDE is NOT running.

* Download the Arduino-Tiny archive (ZIP-file).

* Locate the Arduino Sketch folder. This is the folder where the Arduino IDE
stores Sketches.

* Ensure the "hardware" folder exists under the Arduino Sketch folder. For
example, if the Arduino Sketch folder is...


Ensure this folder exists...


* Extract the contents of the archive into the "hardware" folder. For example,
if the Arduino Sketch folder is...


After extracting, the following files should exist...



And the following folder should contain the Arduino-Tiny core...


* Create a new file named "boards.txt" in the tiny directory. Following from
the examples above, the file would be here...


* Open the "boards.txt" file and the "Prospective Boards.txt" file using your
favourite text editor.

* Copy board entries of interest from "Prospective Boards.txt" to "boards.txt"
(or copy the entire contents of "Prospective Boards.txt" to "boards.txt").
Board entries are delineated by a long line of pound-signs.

* In the "boards.txt" file, change the "upload.using" entries to the
appropriate value for your setup.

* Save and close "boards.txt". Close "Prospective Boards.txt".

* Start the Arduino IDE and ensure the new boards of interest are listed under
the [Tools] [Board] menu...

"ATtiny84 @ 16 MHz (external crystal; 4.3 V BOD)"
"ATtiny85 @ 8 MHz (internal oscillator; BOD disabled)"

bsairam (author)vishalapr2013-09-22

Thank u very very much ur reply is very useful to me

bsairam (author)2013-09-19

Please help anybody

francisroan (author)2013-06-25

Hi i have a problem here i did everything you said but im getting an error saying that arduino.h is not found and a whole lot of other errors like delay not defined etc..!
Im pretty sure that i did everything correctly and did not delete or change the arduino.h as it is till there..!
Pls help..And good to see young Indians like you doin this with arduino ( im from kerala , 15 yrs)

vishalapr (author)francisroan2013-06-26

Can you post the entire error by either print screen or typing because I am not really sure why that is happening. For the arduino.h is not found error I got the same when I used arduino 1.0.1 use a newer or older version from the one you are using. Preferably the 1.0.4,
Post back if it worked

ybsocurious (author)vishalapr2013-07-13

how many VOLTS capacitor are you using here???

vishalapr (author)ybsocurious2013-07-16

Im not sure if capacitors are rated in volts, but I used a 10 micro farad capacitor, you can use any within 1-10 micro farad range, hope this helps.

francisroan (author)vishalapr2013-06-26

Its okay man i did some other doodoos and the thing worked..!

Thanks anyway.!

vishalapr (author)francisroan2013-06-26

Can you post a picture of it?
I would be happy to see it :D!

francisroan (author)vishalapr2013-06-27

Of what the hardware..?oh its all messy i did it on a breadboard because im busy with a science exhibition at school..Im thinkin of making a automatic arduino GSM intruder system (AAGIS 4 short)...
If u insist illo send u a pic.! ;)

ybsocurious (author)2013-07-13

how many VOLTS capacitor are you using here???

m.moumni (author)2013-06-24

Cool, thank you! keep up the good work :) when i have something ready i will post here

vishalapr (author)m.moumni2013-06-24

That would be great!

clubmenex (author)2013-06-03

This is so useful when you need to program lots of chips either for like small businesses or just for doing it for others like friends etc, I usually program about 20-30 chips whenever I am asked to by the club members I belong to and this helps tremendously as I dont need to check for connections or anything and its just a plug and play type
Thanks for the great instructable!

vishalapr (author)clubmenex2013-06-03

Great to hear that the instructable helped you out, may I ask which club do you belong to? Is it something similar to the MakerShed?

Hammock Boy (author)2013-05-31

You should check out OSHpark to get a PCB made. That is where I get mine made and I am pretty sure they ship internationally. 

vishalapr (author)Hammock Boy2013-05-31

I even know how to use Eagle so it would be pretty easy to get a PCB made but parents don't want to spend 10$ on a PCB.... :(

Edgar (author)2013-05-30

I remember when programming a thing like that was a pain...
Gone to my Blog:

vishalapr (author)Edgar2013-05-30

Thx! I used to program these chips before but always ended up getting either the wiring or the connections were loose or some sort of problem but now its just plug and play type :)

Thx for the post on the blog

Edgar (author)vishalapr2013-05-31

Glad you've liked it.

Tabasko (author)2013-05-30

i would love something similat to program 18 pin pic like de 16f628a

vishalapr (author)Tabasko2013-05-30

what pic is the 16f628a? is it an ATtiny chip or something else? I googled the part number and didnt get an answer, if I have them with me and I know how to use them then I will probably make a shield for it as well :)

Yea I have seen them be used in a lot of things and I thought it was awesome but I didn't have any at the time I was making this shield so I just made it with some headers and it doesn't seem to be hard to use and does not damage the chip, It fits in easily with no force applied :)

Transmisso (author)2013-05-29

Great Tutorial, and simple easy to make project :)

vishalapr (author)Transmisso2013-05-29

Glad you liked it!

anoop vanguru (author)2013-05-28

That look really neat :)
How did you make that wiring diagram though?

vishalapr (author)anoop vanguru2013-05-28

The wiring diagram was made by using Fritzing
(Its a free program which helps you make pin-outs with ease)

EpicLazer (author)2013-05-28

Only one thing to do now, search forever to find where I put my ATtiny's I ordered ages ago.
Thanks for the tutorial

vishalapr (author)EpicLazer2013-05-28

I ought to do the same as well lol, I remember buying some ATtiny's a while ago but don't know where they are

About This Instructable




Bio: A programming enthusiast. I tinker around with everything I see and love to game.
More by vishalapr:Diffused Glue Stick LampATtiny85 POV DisplayArtoo [R2] (ATtiny2313 Wall Avoiding Robot)
Add instructable to: