Instructables

How to Program ATtiny2313 (Mac) (Current and Updated!!!)

Picture of How to Program ATtiny2313 (Mac) (Current and Updated!!!)

Howdy folks!

When I first got my ATtiny2313 it took me the better part of 4 hours to finally get it programmed. I went through countless tutorials online that were old and outdated. I was never able to get the correct files from one website. I had to combine the files from several websites before I was finally able to program my ATtiny.


The goal of my (Current and Updated!!!) series is to find tutorials online that are old, outdated, or nonworking and make a new tutorial that I have tested and used myself.
My first i'ble in this series is how to use IR remotes to control your Arduino.
I will keep updating my i'bles in this series to work with new Arduino boards, IDEs and the like.

Now I've never tested this process on a windows but I know that it works on a mac. It should be the same for windows, just delete any mac content in the zip.

 
Remove these adsRemove these ads by Signing Up

Step 1: Download the Files

First you need to download the boards information for the Arduino IDE. This file will need to be downloaded in order to program a ATtiny2313. http://www.mediafire.com/download/ju012s124w4gbl2/tiny.zip

Once you have downloaded that you will need to extract the 'tiny' folder to your Arduino hardware folder. Now if you don't know where that is or if you don't have it here are the steps.

  • Go to your Arduino documents. This is where all the sketches are saved (by default).
  • For mac users it's Macintosh HD>Users>username>documents>Arduino.
  • Create a new folder and name it "hardware", just like that. Into this folder you will put the 'tiny' folder that you downloaded.
  • For PC users Program Files(x86)=>Arduino=>hardware. Copy the 'tiny' folder into it and restart the Arduino IDE.Delete the extra mac content.
sawala16 days ago

Nice write up-even a newcomer like me can understand it.I have a question- Is it essential that attiny 2313 first needs to be boot loaded before programming it? sureshparanjape

FoamboardRC (author)  sawala14 days ago
Not sure. I never had any problems with bootloading one. I just bought it, connected it up to my arduino and it worked fine.

Sorry, I couldn't follow: you didn't have any problem with bootloading or using without bootloading? I purchase my first 4313 and studying it.I am familiar in writing small sketches for atmega 328.May I ask a question related to 4313-can a sketch work with same language on 4313? I have written a sketch for controlling heater and want to use 4313 for the purpose.Thanking you.Sawala

FoamboardRC (author)  sawala13 days ago

Sorry it was confusing :D . I didn't have to any boot loading or anything. I was able to program it (using the methods in my i'ble) straight from the manufacturer.

If you are just using inputs (i.e. light sensor) and output to like a relay your code will work. Just be aware there are certain functions that don't work such as using servos, melody, or quite a few other functions. Try googling attiny master slave and you should find some things that will allow you to use servos with the attunes.

But if you aren't doing anything complicated then you can just upload the same code for your 328 to the 4313.

Hope that helps. . .

Good luck.

AhamedF3 months ago

(OR) please send me programming area around MADURAI. i am weighting for your better reply.

AhamedF3 months ago

Dear friend, i have doing my project, i am using ATtiny 2313, i have program and Hex.code, i have no programmer kit, so i want your help. My mail id is welcomeahamed@gmail.com

baecker033 months ago

works great, for clarifications sake... it's sometimes easy to get mixed up between digital pin 7 and the hardware 1-20 "7". before chucking it in frustration, digital pin 7 is actually pin 9, just for people like me who make easy mistakes :)

bobby1348 months ago
Thanks a ton for this i was about to lose it before where I was on all of these confusing sites for this board