Skip to content


AVR Simple-to-build Programmer – HARDWARE

This is my first tutorial on electronics in English (I have wrote some more in the past but in Romanian) so I hope it will be ok ;)
What is a programmer? .. a device that can be connected to a computer (through parallel, serial or usb port) and be used to program chips using a software.So this should be the first project to be made by any beginner unless you already have a programmer because you can’t make anything without one.
I searched about 6h on the Internet to find the best simple programmer for ATTiny2313 and I found it on Serasidis Vasilis’s website. It was designed for AT90S1200 and AT90S2313 but as I studied a little it is also compatible with the newer version of 90S2313 which is Tiny2313. The only problem was the software as I didn’t find at first any software (I tried with BASCOM, IC-Prog …. ) compatible with the hardware but this is another story, in the next article ;)


Enough for introduction, let’s start ….
The easiest way to program a microcontroller is by doing In-System Programming (ISP), you can find more details on it if you look at the bibliography at the end of the article.
What components do you need?

  • a simple or prototype board (about 4×5cm or even less, depends on you)
  • 3 x 330 Ohms resistors
  • a 20 pins IC socket
  • a parallel (25 pins) port connector (male or female, depends on what you have on the mainboard or what cables you have)

Because some mainboards can’t provide enough voltage at the parallel port you may need an external power source. In this case you’ll need a +5V supply which you can build very simple with a 78L05 (click to see schematics) and connect it to pin 10 (GND – ) and pin 20 (GCC + ).For this way you need to strip the 3 resistors + the GND wire.
For the common schematic (which takes the voltage from the computer’s parallel port) use :

Below are some photos I took while I build it.




If you have any questions feel free to send a comment using the bottom form.

Bibliography :






Posted in AVR projects.


23 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. ahmed says

    it didn’t work at all
    i saw what you wrote in that greek site

    plz help

    i did exactly the schematic and icprog didn’t recognize it

  2. Trimbitas Sorin says

    Hi Ahmed
    … yes, you are right … it doesn’t work with icprog, it works with AVReal.
    Go to http://www.ln.com.ua/~real/avreal/index_e.html for downloading it.
    For instructions … just read all my posts from the greek site you mentioned :
    http://www.ln.com.ua/~real/avreal/index_e.html

    Does it work now?
    Regards
    Sorin

  3. tuna says

    so ? , this program work for all plataforms example WIN2000 or XP

  4. Trimbitas Sorin says

    yes, as long as you install the Win32 driver

  5. tuna says

    hi, i test this program on at90s1200, attiny2313 and atmega8515, work fine

    thanks, but

    I need more speed for that reason i need program the fuse bits

    do you kown how program the fuse bits ?

  6. Trimbitas Sorin says

    Hi tuna,
    To program the fuse bits you can use AVReAl (look at the second comment for the link), its option description can be found on http://www.ln.com.ua/~real/avreal/descr_e.html
    Please write us your experience after you manage to set the fuse bits.
    Thanks
    Best wishes

  7. tuna says

    ok,
    but i don’t kwon if this can be done because in the datasheets of atmel it mentions that to program the fuse bits is necessary to program micro parallelly, so i don’t kwon if i must to change interface of the programmer like stk200 ,stk300 or use the same

    let me try whit the same

  8. tuna says

    hi everybody

    i program the fuse bits whit this program and work fine, i test on attiny2313

    thanks

  9. addy says

    Hello Sir,
    I saw your project AVRsimple-to-build programmer hardware which is useful to me.I used your Attiny programmer circuit diagram.I work on one project in which i control stepper motor through PC parallel port.I done programming in turbo C.Now i want to control stepper motor through USB port insted of parallel port.
    In your project circuit diagram controller ic ATtiny 2313 is used.So,this ic is controller ic so programmer is also required.In which language you done programming? After programmer i used this ic in USb to LPT circuit diagram & i want to take input from USB port. Give me the proper idea.

    Thank you.

    With Regards,
    Ankur

  10. Dominik says

    Which resistors do I need? 3x 330 Ohm (like in text) or 3x 220 Ohm (like in graphic)?

  11. mircik says

    Hi,
    very good advice. I’m beginer and I think I finally programmed the microcontroller (but no LEDs blink)- I made the Ladyada’s POV project:
    I used that DB25 porgramming board and AVReal software for DOS (just for programming the microcontroller)
    command:
    avreal32.exe +TINY2313 -p1 -ap -o0 -e -w -v -c minipov.hex
    and appeared:

    … Power ON
    Device connected, TINY3213 detected
    Lock state unknown
    Device erased
    Device connected, TINY2313 detected
    Fuses
    OSCCAL =65, 68
    CKDIV =1
    CKOUT =1
    SUT =2
    CKSEL =4
    DWEN =1
    EESAVE =1
    WDTON = 1
    BODLEVEL =7
    RSTDISBL = 1
    SELFPRGEN = 0
    Programming CODE memory
    done
    Verifying CODE memory
    passed
    done
    Reset pin released
    Power OFF

    it looks fine to me, but i can’t make the LEDs blink

    What do you think?
    PS I’m romanian too.:P

  12. Petr O. says

    Hey,

    Thanks, it works for me fine! I used the 380 ohm resistors, their value does not matter much, only used as a safety measure as i understand..

  13. tayyeb says

    hi,
    i need USB Avr programmer to connect Avr to notebook.
    please help me.
    can i build it?
    thanks.

  14. SANJEET says

    hi
    THIS IS SANJEET,
    SIR I WANT TO KNOW THAT HOW TO COPY A 64PIN BLNK MICROPROCESSOR ICS WITH A 64PIN PROGRAMME ICS (how i can read and write the programmer ics)
    PLEASE REPLY

  15. JohnC says

    Hey,

    This thing worked like a charm for me using Windows XP once I installed the proper driver and .dll file for the AVReal software. I used it ot program a tiny2313 chip for a project of mine.

    To the OP, thanks for sharing this information you’ve saved me the cost of purchasing an expensive programmer!

  16. A. S. Bhasker Raj says

    Trimbitas Sorin

    Your project is really useful for beginners.

    I am from India and working on a project ‘Light Following Robot’.

    The circuit uses AT90S4433 microcontroller.

    I need your help.

    How to build a programmer for this microcontroller?

    Waiting for your reply

    Regards

    A. S. Bhasker Raj

  17. Tomislav says

    hello,

    is it possible to programme ATTINY12 with this programmer? can you please answer on my email?

    TNX PAL

  18. Trimbitas Sorin says

    For ATTiny12 I suggest this schematic : http://www.serasidis.gr/circuits/avr_isp/avr_isp.htm

    Hope this helps

    Sorin

  19. Ronnie says

    For the attiny2313-20pi from sparkfun electronics. i tried this but my modern computer doesnt have a parallel port so i used a usb counter and neither of the programs work. avreal or lcprog on windows vista. they both just close after they open. even in admininstrator privelages.

  20. WILLIAM says

    IM LOOKING FOR AN INDIVIDUAL THAT WILL BE WILLING TO MAKE SOME CASH! I HAVE AN “AT-TINY45″ 8PIN CHIP, AND I NEED SOMEONE TO MAKE DUPLICATES. THE CHIP I HAVE IS USED FOR MAKING RAPID FIRE XBOX CONTROLLERS. IF YOU ARE QUALIFIED, PLEASE SEND AN EMAIL TO: ATILLAZBADBOY@GMAIL.COM IF LOCK BITS ARE PRESENT, I WILL NEED A NEW CODE DEVELOPED, SO “C” CODING EXPERIENCE IS A MUST!

  21. Adam says

    Hi there, some time ago i made a programmer for nearly every AVR that has 8, 20 or 40 pins, complete with lpt isp connector. And as far as i remember it took me 4 resistors (instead of 3 in Your project ;) ) – 3x 330ohm, 1x 100ohm and 1 capacitor for power smoothing (powered via USB). I used it many times with WinAvr and AVRdude so its working correctly.

  22. Gábor says

    Hi folks,
    Does this schematic work with ATtiny25?
    Thanks
    Gábor

Continuing the Discussion

  1. POV(Persistence of vision) kit using AVR » Dedication to DIY and programming linked to this post on September 26, 2006

    [...] To load it on the chip you need 3 things : the hardware programmer, the compiler (you need to compile the code to HEX format) and a software programmer (to burn the HEX file to your chip). —For the first issue : I have build an extremly simple AVR programmer.To access it click here. —For the second issue : go to http://www.mcselec.com and download the trial for Bascom AVR (it is limited to 4kb of code so it is PERFECT for our purpose), install it, create a new file (it will have .BAS extension) and compile the code (press F7 in the program window). —And now the last issue : if you build the hardware I presented above them please go to AVReal homepage and download that software (don’t forget to install also the Win32 driver). [...]



Some HTML is OK

or, reply to this post via trackback.


Get Adobe Flash playerPlugin by wpburn.com wordpress themes