Tuesday, June 28, 2011

USB 8051 (89 series) & AVR Microcontroller Programmer

About the programmer

         This simple microcontroller programmer can progam most of  the 89 like Atmel's AT89S51, AT89S52, AT89S53, AT89S8252, AT89S8253  including the Atmel AVR series of microcontroller , it does not support 89C series . It simply consists of an ATMega8 and a couple of passive components. The programmer uses a firmware-only USB driver, no special USB controller is needed.

Features
  • Works under multiple platforms. Linux, Mac OS X and Windows are tested.
  • No special controllers or smd components are needed.
  • Programming speed is up to 5kBytes/sec.
  • SCK option to support targets with low clock speed (< 1,5MHz).
if you have all ready have your USBasp programmer, which is previously posted on my blog as USB AVR PROGRAMMER then there is no need build new hardware you just need to change the firmware of the programmer microcontroller.

Simple Steps to made This programmer

Step 1:-
 Step 1:-

Download:Firmware and circuit
The following packages include circuit and firmware.
Firmware is the software which going to be burn into programmer's microcontroller, this firmware have code to enable the programmer to communicate with pc via usb and target microcontroller

Click This link to download the Firmware and circuit
usbasp8051(4 kB )


Please refer to Readme.txt for details on building, installing and using USBasp.

Schematic USB 8051 & AVR Mircrocontroller progammer



Step 2:-

Buy The parts You need

Part Description Qty
ATMEGA8 Microcontroller 1

3.6 Volts Zeaner Diode 2

22pf Capacitor 2

100nf Capacitor 1

4.7uf capacitor 1

12Mhz Crystal 1

10K Resistance 1

1K Resistance 3

68ohm Resistance 2

2.2K Resistance 1

LED Led (Red & Green) 2

USB connector 1

USB Cable 1

3 Way dip switch 1


Step 3:-


PCB and Part Soldering:-

You can create your own pcb using any PCB editor like eagle, OR you can solder the circuit a general purpose pcb, You Can also Use PCB created By me Click here to dwonalod my pcb design
USB AVR Programmer PCB Created by Me For your use


Step 4:-

Getting The Atmega8 Microcontroller Ready To be used as a programmer:-

Getting the atemega8 microcontroller ready to be inserted into the newly soldered pcb ,and start working. you have to burn the firmware which you just downloaded in the Step 1 into the atmega8 microcontroller. you can use the serial avr programmer to get this job done. click here to know about how to make a serial avr progammer and how to program the atmega8 by using a serial avr programmer.

Note:- Make sure you burn the right fuse bit configration along with the firmware into atmega8 microcontroller
for atemega8 the fuse bit are
atmega8 HFUSE=0xC9 LFUSE=0xEF

if you have a problem how to burn those fuse bit use the give serial avr programmer then please visit serial avr progammer page for detailed information

Step 5:-


Driver installation on a PC:-

At the first time when you connect your programmer to the pc your programmer will be dected as usbasp and you have to provide a proper path for drivers to be installed.
this programmer use same driver as my privous usb avr programmer use

USB AVR prorammer Dected By the widnows

Give the Instruction for a specfic location driver installation

Give the path for driver to be installed


USB AVR Programmer installed


USB AVR programmer is being connected and shown in device manager

On Linux and MacOS X no kernel driver is needed.
Windows requires a driver for USBasp: usbasp-windriver.2009-02-28.zip (70 kB)

Note: Windows Vista/7 x64 requires drivers with digital signature. Currently there are no official drivers for libusb (USBasp software is based on it) with such a signature. Users reported that there is a tool named "Driver Signature Enforcement Overrider" to avoid the signature check.

Step 6:-

Programming the other microcontrollers:-

You can use Progisp software to burn the hex file in to the traget microcontrollers.
note:  i don't suggest you to use any other sofware then the progisp. but if this works with any other then you are free to use that.

      click here to download progisp168

Schematic



Connections to the traget microcontroller:-

* you can programe may microcontroller by using this schematic , all you need to do is that find out the data sheet of that mcu you want to program and check the pin configration. and the look for PIN MOSI MISO SCK and Reset , the connection will be as follows





Connectors 

USB B type female Connector




10 PIN IDC connector (which shown in the schematic as x2

if sombody face any trouble then please let me know

217 comments:

  1. what are the other supported mcu s. does it support atmega 32 or 32a?
    i have a 32a btw :(. what to do if it doesnt support?

    i've a confusion. the 8051asap.rar shows 260 kb. but when dl-ed, its only 4 kb, containing a file "main.hex". am i right?
    thnx 4 this version . i want to build it asap :)

    ReplyDelete
  2. Yes it does support atmega32

    it support all the avr devices supported by usbasp

    including newly added 89 series of devices.


    sorry about error of file size shown that is just a mistake of typeing it actuall 4 kb (a hex file for mcu)

    ReplyDelete
  3. thnx 4 ur reply (& bro,no need to say sorry :D)

    one of my friend build the USBASP of the website "fischl.de" recently. i told him about this programmer last week & he regreted that, he wanted to make this type of allround progrmr.

    now bro,can that usbasp be converted to ur progrmr (8051+AVR) now ? can u show me the way or either it's not possible?

    ReplyDelete
  4. yes that usbasp can be converted into this programmer (8051+avr)

    all you need to do is

    download the firmware take a atmega8 and just burn this fimware into that with fuse bits same as usbasp

    then put this newly burned atmega8 into your usbasp circuit and you are ready to go

    but from now on you should use only avrdude (CUI) or progisp(GUI) pc software for burning other chips.

    i prefer progisp because its gui and it support both the 8051 and avr but avrdude support only avr and not a gui

    ReplyDelete
    Replies
    1. Can I use avrdude (CUI)or progisp(GUI) on Ubuntu OS?

      Delete
  5. Yes
    it can program 80 at89s51 and at 89s52 both

    you just have to locate mosi miso sck and reset pin from the data sheet and connect those pin to programmer

    ReplyDelete
    Replies
    1. sir do we need to perform step 4 i.e. do we have to burn firmware usbasp8051 into at89s51 too.and could you provide me with the fuse bit configuration for at89s51

      Delete
    2. step 4 says :- you have to first burn the firmware (that you have downloaded in setp 1) into the atmega8 mcu to act like a programmer.this firmware enables the programmer device to communicate with the computer usb port and the target chip you gonna program for your own use.
      only after doing this you can program other mcu by this programmer.

      the atmega8 as you purchased is not programmed any firmware. it's blank actually.

      so after step 4 only your programmer is ready to use
      now you can connect it to your 8051 mcu to program your firmware into the 8051 mcu

      if still have any question please feel free to ask

      Delete
    3. and the fuse bit config
      actually have a prog isp usb avr programmer that has an ic base with 40 pins so how do i go about doing things

      Delete
    4. those fuse bit are for atmega8 ""The Programmer MCU""

      all you need to do is that locate MOSI MISO SCK and Reset on that 40 Pin socket and connect them to your target mcu to the target MOSI MISO SCK and Reset.

      Delete
    5. I have an chip enable program error while I was trying to connect with at89c51 in progisp please help me out

      Delete
    6. I have an chip enable program error while I was trying to connect with at89c51 in progisp please help me out

      Delete
  6. can we attach 1 crystal to both atmeg8 and the target mcu ?

    ReplyDelete
  7. no
    the 12mhz crystal is to provide clock to the programmer

    and other crystal may be 4 or 8 mhz will be used to clock the target mcu

    it is not possibe to clock both of them with single crystal

    ReplyDelete
  8. atmega 8 cost 100 to 150 rupee in delhi

    at89s51 &52 cost 40- 50 rupee

    crytal cost around 5-10 rupee

    so i can say cost is not more than 250 INR

    ReplyDelete
  9. hi..,i have a few doubts in the circuits..
    1) we have to set Jumper1, but do we have
    to set Jumper2, and Jumper 3 ?

    2) What is exactly X2 in the circuit. ?

    3) While resting the programmer, do we have to
    reset atmega8 or target mcu and how ?

    Thanks in advance..

    ReplyDelete
  10. j1 is for switch target board power supply on and off which is delivered by the programmer

    j3 is for slowdown programming speed ,, few chips doesn't support fast programming (chip enable program error occur) so set this jumper to slow down programming speed clock

    j2 is set when you want to upgrade firmware of the programmer

    x2 is nothing but a general purpose connector you can use any type of connector may be burg strip as i used and my be polarized header or idc 10 pin connector

    3) no there is no need to do that
    but if you do it's good

    to reset the avr just pull it's reset pin down

    ReplyDelete
  11. where should we connect the LED's in the schematic given ?

    and is it ok if we do not connect the x2 and connect the wires directly ?

    ReplyDelete
  12. + terminal of led goes to a resistor , then Vcc
    - terminal of led goes to mcu pin

    it's fine if you want to connect wires

    ReplyDelete
  13. hi..

    i made this hardware, do i need to make the srial avr programmer hardware too ?

    now, when i conect my hardware to pc, and open ponyprog, i cannot access the COM ports.

    moreover the probe result is shown failed..

    wat can be wrong. the connections are fine.

    ReplyDelete
  14. hi

    have to burn the firmware and fuse bits into programmer's atmega8

    if not then first you have to do this with the help of some kind of programmer


    if you have access to some other programmer then it's fine use that for burning programmer's firmware , if not then you can make the serial port programmer then burn the firmware to the atmega8 first and then plug into the usbasp board


    why are you using ponyprog ,does poneprog support usbasp?

    and it's usb programmer ,it does not connect to COM port

    please use porogisp which is available for download from my blog

    led are not glowing means that you did' burn the programmer's fimware

    ReplyDelete
    Replies
    1. Hi Gaurav

      I've made this usbasp with atmega8 according to the circuit you given and while flashing code into at89s52 microcontroller i am getting "Flash verify error" . Please help me....

      Delete
  15. thnk you for ur reply.

    i'll burn the hex file in my atmega8L through some other programmer. and then will use porogisp for burning the target microcontroller.


    and i used ponyprog as per ur method stated in serial avr programmer.

    ReplyDelete
    Replies
    1. will u please tell me how did u burn ATmega8L?? what programmer did u use for burning..

      Delete
  16. i dont have a db25 or db9 pin in my laptop.
    is there an another way to make the serial avr programmer ?

    ReplyDelete
  17. you have burned the firmware that's good

    have you burned the fuse bits too??


    the ponyprog software is only to use with serial port programmer not with usbasp

    ReplyDelete
  18. if you have access to other programmer then there is no need to make the serial port programmer

    ReplyDelete
  19. then you have to arrange the programmer or make that serial port programmer and use with some older kind of pc

    ReplyDelete
  20. if really have to access then
    you send me a atmega8 i can burn the
    programmer firmware for you and ship it back to you
    for free

    ReplyDelete
  21. i'll see.. here there is access to a lot of programmers .

    so thank you for ur concern.

    ReplyDelete
  22. 1) Can u help me out with that X2 connection,

    what exactly is it showing ??

    As u said X2 is a connecter, should those pins be left open ??

    does it mean '1' is shorted with '2', '3' with '4', '5' with '6', '7' with '8' and '9' with '10'.

    plz explain in detail.

    2) Also what is VCCINT ?

    3) How should the default JUMPER postions be ???

    4) Can i use a Standard Female USB A type connector ?

    I would be glad if u edit the circuit with a connector which you used in PCB or by skiping the connector .

    Please reply as soon as possible to faiz.ahmed321@gmail.com

    ReplyDelete
  23. i madethe programmer and tried to program AT89S52
    with 12MHz xtal . Progisp says write sucessful but actually microcontroll does not perform work when used as nothing is written on it .

    1.I verified the flash ! it say verification sucessfull but it doesn't work .
    2.What is Enabled Xtal option in progisp above Auto command button and what do we have to do with config tab in the same and power on option .

    help!!!!!!!!!.is it mistake in circuit or software or you tell..........plz

    ReplyDelete
  24. hi Faiz

    i use just a burg strip

    you can use any connector you want or just directly solder wires.

    Vccint is pin from where the programmer board supply voltage to the target board (if required by the user).


    jp1 is open or close if you want the programmer to supply voltage to the target.

    jp2 is open if you are using the programmer
    or jp2 is close if you want the programmer firmware to be changed

    jp3 is open in normal condition
    but if the target is at slow clock the jp3 is use to force the programmer to slowly(with slow sck) program the target chip

    ReplyDelete
  25. Thanks, for consideration .There was problem with progisp i redownloaded it and now it's working .

    ReplyDelete
  26. does this supports all 8051 mcu??

    ReplyDelete
  27. Hi
    Is it possible to make a mouse out of it and how much does one of those MCUs cost?
    How many buttons would be possible?
    Greetz Jan

    ReplyDelete
  28. Gaurav
    I have rectified my above error's
    when i connected the board it showed USBasp connected,
    i gave the path and it installed successfully, it is also shown in devices.

    But the LED are not responding and software "progisp168" is unable to detect the board !
    :(

    ReplyDelete
  29. if progisp detect the board then it should work fine

    may be led placed wrong

    ReplyDelete
  30. Hi,
    can u give me ur email id ?
    i want to send u the ATmega 8 as i cannot burn the file.

    thnx.

    ReplyDelete
  31. @Gaurav
    You are right, actually i placed a wrong resistor, which pulled the whole 5 volts, not letting LED blink :)
    Thank you.

    ReplyDelete
  32. @Gaurav
    in the software progisp how should the lock bits be ??
    11 or 00 ??

    I think i have put my controller in locked mode, how to bring it back to normal mode ??

    Thanks in Advance..

    ReplyDelete
  33. @Gaurav

    I cannot write into a IC, I can only read !
    I have checked with 4 to 5 IC, all can be only read but not written into.

    It says write successful
    (when i hit on write flash, the green led blinks for just a fraction of second, the status bar finishes the writing in a second and it displays write successful),
    also after writing when i read it back, the data is not written (it remains unchanged).

    What might have happened !

    ReplyDelete
  34. please try to click verify button

    if the verification complete successfully then it's fine it should work

    ReplyDelete
  35. Thanks for the reply.

    There is problem in erasing, blank check, writing.
    (the software says successful, it does it in milli seconds)
    reading is good..

    do you think there is hardware problem ?
    Some times the progisp works, around once in 100 tries :(

    ReplyDelete
  36. if the firmware that need to written is very small then the time should be very less
    but in reading it always read the whole memory

    what message you got when the proisp doesn't work

    ReplyDelete
  37. please try to set the j3(slow sck) and try reading writing and verification

    ReplyDelete
  38. have you checked the hardware and power connection to the target board

    please try to re download the application and re burn the board mcu firmware

    ReplyDelete
  39. yes, i have.
    damn it's testing my patience.

    hmm.. okay i will repeat it.

    lets hope for good.

    ReplyDelete
  40. @Gaurav

    The problem still persist !
    help me out plz.

    I can only read the IC,
    I cannot write lock bits or ERASE the IC !

    if i erase it says "ERASE SUCCESSFUL" but when i do a blank check it says "FLASH IS NOT EMPTY"

    why is it happening.

    can you mail me the firmware code ?
    my email id is : faiz.ahmed321@gmail.com

    ReplyDelete
  41. Hey Gaurav,
    i made the circuit properly and followed all the steps as shown clearly on this site. I m using progisp for programming AT89S52. I have selected usbasp and AT89S52 in progisp and have loaded the hex file. When I click erase or auto button it says no programmer detected. In device manager it is showing USBasp with the correct icon.
    Is der any way to check connection of programmer. The hardware is completely ok as same hardware with different firmware IC is working for atmega16.
    I am using keil to make hex file. Do I have to make any changes while creating hex file.


    Thanks and Regards,
    Ankur Saxena

    ReplyDelete
  42. hi,
    ur using rxd &txd from atmega8 to programming pins .For programming rxd and txd is it reqiured to connect it to target mcs?.

    ReplyDelete
  43. @nidhin

    i think it should support89s4051

    you have to connect MOSI MISO SCK RESET
    ,,power VCC and GND
    and crystal
    to target mcu

    ReplyDelete
  44. dear gaurav,
    thanx for ur reply,i have made this this is working.i have many mcs (like at89c52,89c4051,89c2051,89c55wd) are not supporting,"CHIP ENABLED PROGRAM ERROR" IS showing,bt 89s52 is programming perfectly,lots of thanks for that.pls help me for previous problem.then i hav to ask u for what purpose red led is using?.

    ReplyDelete
    Replies
    1. @nidhin, I read ur post thnx...
      My query is
      1. did u add the external 5V power supply for ATmega8 or just all VCC pins connect to USB Pin no.1 ?

      2. how to resolved "CHIP ENABLED PROGRAM ERROR" ?

      I am awaiting for ur responce

      Delete
  45. 89C51 is similar with 89S51? is this right? Could I use this usbasp for AT89C51?

    thanks
    Gina, Indonesia

    ReplyDelete
  46. Hello Sir

    whenever i tried to burn the hex file(main.hex) to my atmega 8 with the help of a parellel programmer it gives the following error
    device signature 0xffffff
    yikes: invalid signature
    double check connections and try again


    what may be wrong?

    ReplyDelete
  47. @PERJALANAN HIDUP
    no 89c51 and 89s51 are different
    89c51 is programmed only serially
    while 89s51 can be programmed both serially and parallel

    ReplyDelete
  48. I have some problem with usb asp when i was flashing with atmega 32 microcontroller.It showed the error as target doesnt answer when i was erasing the chip using usbasp programmer.So what may be the problem????

    ReplyDelete
  49. Nice circuit. I have AT89C51.

    Does the circuit support programming of AT89C51/52?
    :-)

    ReplyDelete
  50. please explain the connections of x2, i m confused on it.

    ReplyDelete
    Replies
    1. x2 is nothing but a connector its a 10 Pin IDC connector as shown in the image at the end of the Post.

      if you want to use the same go ahead and use it if you don't want to use then use any connector use like. n if you don't like any connector directly solder wires on the PCB

      Delete
  51. actualy tell me which pin is connected to which one if i remove the x2.
    advance thanks

    ReplyDelete
  52. Total how many capacitors are ther in ckt?

    in schematic and the board u created differ?

    ans pls

    ReplyDelete
  53. I have follow all step carefully to make this programmer. i have burned fireware successfully. and this programmer work fine with AVR like atmega8,16 etc. but it not working with at89s52. an error massage display every time when i hit erase and auto button this massage is "CHIP ENABLE PROGRAM ERROR".
    i have made this connection between Programmer and At89s52.
    MOSI=>PIN6
    MISO=>PIN7
    SCK =>PIN8
    RST =>PIN9
    VCC =>PIN40
    GND =>PIN20
    crystal of 11.0592 MHz is connected with PIN 18 & 19 with 22p capacitor with GND.

    Please give me correct connection details
    of 8052 and programmer.

    Thank You.

    ReplyDelete
    Replies
    1. ANWEJ have you burned the correct firmware into atmega8 i mean the firmware which do support 8051.
      and which software you are using to burn the firmware in to the target 8051 i recommend you to use progisp1.68 download link is there

      n try to short the jumper jp3 on pin25 for slow programming.

      n also check whether the target device is faulty.

      n i also recomond you to keep the mosi miso sck are reset like as sort as possible between the target and the programmer

      Delete
    2. Hi Gaurav Chaudhary..!

      Thank you for reply. I have burned firmware as you provided in above post.and i have write correct fuse bit Low=0xFF and high=0xC9. I m using progisp 1.72.
      Its working fine on atmega8. but not working on AT89s52.
      My connection between AT89s52 and Programmer is

      MOSI=>PIN6
      MISO=>PIN7
      SCK =>PIN8
      RST =>PIN9
      VCC =>PIN40
      GND =>PIN20

      And jumper J3 is also closed in programmer for slow SCK.
      I m getting error massage "CHIP ENABLE PROGRAM ERROR" when ever i pressed erase and auto button. i have already selected the CHIP as AT89S52.

      Please Provide me Correct firmware for atmega based USBASP.I also need C code of AVR+AT89 series usbasp prgrammer.

      thank you.

      Delete
    3. I have used progisp168 but problem occured remain same..

      Delete
  54. Hello Gaurav..!! you are patience enough to develop your blog..!! Hope you are the right person to meet..! Thank you for your patience..!!!

    ~:.krish.:~

    ReplyDelete
  55. HI,
    I am having one problem in scematic you have not connected pin 21 but in your pcb you have I think shorted it with pin 20 what should I do...?

    ReplyDelete
    Replies
    1. pin20 is vcc and 21 is vref so you can short them if you like
      its not necessary but i recommend you do that

      Delete
  56. Also can I use usb A type connector instead of B type as you shown in the picture ?

    ReplyDelete
    Replies
    1. use any connector you like or just don't use any one of then you are free to directly solder the usb cable wire on the the PCB

      Delete
  57. hello..!!
    I did everything with the images above given,
    when i connect the USB cable it pops up with the message "Unknown device connected"..!! I used ATMEGA 8L instead of ATMEGA8 which operates at 8-10MHz but i connected 12 MHz crystal Osc..!! is it makes any difference???

    ReplyDelete
    Replies
    1. as per the datasheet atmega8L can't work up 12Mhz,
      but i have tested this circuit with atmega8 and atmega8L and it works fine
      contradiction to the datasheet the atmega8L works upto 12Mhz , so don't worry about that,
      may be you did some other mistake like , test zener the voltage on the usb D+ and D- wire it should not be more then the 3.6V .
      thank you

      Delete
  58. My PC successfully detected the USBasp but I am using Win7 and it says driver is not digitally signed and it encountered an error while installing.

    ReplyDelete
    Replies
    1. download the latest driver from the link blow , i have tested them to work with windows 7

      https://sites.google.com/site/microembededfiles/filejune2011/usbasp-windriver.2011-05-28.zip?attredirects=0&d=1

      Delete
  59. This comment has been removed by the author.

    ReplyDelete
  60. hai Gauav... i also make this programmer to connect the system "usb drive not recognized" please help me...........
    my e-mail id is kumarmohan7@gmail.com

    ReplyDelete
  61. gaurav bro how to burn the firmware to the ATMEGA8 ?? can we burn it in this burner ??

    ReplyDelete
  62. sir i want to know what is the use of fuse bit?? and when we burn firmwear in to ATMEGA8 through the usbasp then why we write fuse bit??? how can jugde atmega8 "HFUSE=0xC9 LFUSE=0xEF"...plz help me .

    ReplyDelete
  63. hello gaurav i m using ur ckt of usbasp for programming at89s52.the programmer is detected by the win7 laptop i m using,but whenver i click on auto it shows chip enable error.what can be the possible causes for this?(for detail-i m using 4mhz crystal along with 33pf capacitors,nd hav just connected the appropriate pins like RST,MISO,.... to the ports of at89s52.also i have connected pin 40 and 31 of at89s52 to vcc and pin 20 to gnd.)pls suggest asap!!!!!!!!

    ReplyDelete
    Replies
    1. chip enable error usually occur when there is some problem with the reset line. so keep it as short as possible. don't have have big load on this line

      Delete
    2. will i connect the reset of atmega8 to the reset pin of at89s52?nd what shud be the max size of the reset wire?(pls mention in cm).reply asap!!!

      Delete
  64. no you don't have to connect target reset to the host reset

    the target reset will be connected as per the schematic

    and there is no discrete value for reset wire in cm it depend on too many factors like your pcb and the target

    i recommend you to try once about 3-5cm wire ..
    good luck

    ReplyDelete
  65. thanx.i have done that but still it shows chip enable error.wht to do now?i forgot to tell u that i have connected 4.7k to all the 3 ports(MISO,MOSI,SCK) and 1k to RST port of atmega8 and the other end to the appropriate at89s52 ports.if possible pls give me the schematic of exactly how to connect the at89s52 to atmega8 (obviously in usbasp) for programming it!!!!pls mail me at subhasisbanik@gmail.com...reply asap!!!!

    ReplyDelete
  66. Hi Gaurav

    I bought one avr isp programmer from a local shop and it's given that it's a progisp 7 programmer which contains two boards - one for atmel 89s51,89s52,....
    and other for avr atmega16,atmega32,.... and there is even a cd given which contains progisp 1.72 package.....
    but I am not knowing how to burn the code into at89s52 using this programmer using progisp 1.72
    Can u help me with this regard

    Thanks
    Sairam

    ReplyDelete
  67. I tried dumping into at89s52 microcontroller using this programmer but it's showing a Chip Enable Program Error .....
    Can u please help me with this regard to how to solve this issue......

    ReplyDelete
  68. Can I use this programmer to program AT89S8253 with 12MHz crystal?

    ReplyDelete
  69. hai gaurav....very nice post.....:)
    i have a USB programmer for 89S series from electronics for you...this is the link..http://kitsnspares.com/admin/pdffiles/8051pocket.pdf
    my question is that is it possible to program AVR with this???I tried to program atmega8 but it didn't worked...already ICSP connection pins are available in this board, but they are telling it is 89series programmer, can i program AVR with this?? for AVR programming with this is it needed to change the firmware???

    ReplyDelete
  70. by the looks of it , hardware seems to be same . but i guess there may a little difference in the firmware. so the only thing i can suggest you is try changing the firmware.

    ReplyDelete
  71. respected sir,

    i am a btech student and learning embedded. i have seen your projects on circuit valley.

    i am trying to make avr/8051 usb programer. i think there are some capacitors missing so can u please help me.

    i want to learn how to make programers and boards of 8051,pic,arduino. so can u please suggest me any institute in delhi.

    i am waiting for your reply.

    ReplyDelete
    Replies
    1. i have gone though it, no components are missing.

      i don't know any embedded system institute in Delhi sorry for that.
      but i will advice you to chose self learning using book and internet instead off some stupid institute.

      Delete
  72. thanks sir for your reply

    i want to know is there is any capacitor c2.

    what r fuse bits for atmega8L

    11.0895mhz crystal with at89s52 will work or not.

    how to connect reset switch (with four terminals) , what should be its position(open or closed)

    can u email me its simplest pcb layout

    pradeepgoel044@gmail.com

    waiting for ur reply

    very thanks in advance

    ReplyDelete
    Replies
    1. there is no capacitor with name c2 , don't worry about this

      atmega8 fuse bits HFUSE=0xC9 LFUSE=0xEF , it is given up there on the page

      yes it will workout with AT89S52

      for switch please check with a multimeter for continuity.

      pcb layout is up there on this page , please at least take a look.

      Delete
  73. dear Gaurav sir, I made this programmer and works fine. I can program 89s52 in high speed with slow sck jumper open.but for atmega8 or atmega16,it requires that jumper close.what is the reason?

    ReplyDelete
  74. hello bro.
    i am the avr beginner. would you pleas do me a favor? because i have built this circuit following the step to configure the fuse into the atmega8 already. but it doesn't work.
    i use the programing software named "progisp".i can program atmega16 with this.

    yet when i want to program 89s51 with this, always shows "chip enable program error occur"

    do you know what's up?

    i have hear about it that is because the reset delay time is not enough.if you can modify it, it should be ok.
    for s51xx chip, after setting RST high, put some more delay for being more stable. after RST(high) is stable, keep going next commands.
    reversely for mega series chip, after clear RST low, put some more delay for being more stable. after RST(low) is stable, keep going next commands.

    would you please try to modify the source code and complier it, then get the hex file for us?

    i really want this programmer to be able to program 89s** and mega series.

    because i only can program atmega16 with this, but 89s series.

    thanks a lot~~


    ReplyDelete
  75. hello sir
    we r students of 3rd year eletronics and telecommunication v hav tried building d citcuit and v dnt get where to connect d 3 way dip switch mentioned in d components. and can u please tell us wat is the flow of d working of the circuit..

    ReplyDelete
  76. can u please tell us wat is the flow of d working of the circuit.... means wat is to b done after v make d hardware

    ReplyDelete
  77. and pls tell us wat r those leds used for?? wat do it signify??

    ReplyDelete
    Replies
    1. at least read the post and comments before you ask some question

      Delete
  78. Hello Gaurav,
    Thanks for providing such wonderful details about usbasp

    I had done this programmer ,Working well...
    I programmed 89s52. Thats No problem. But I had a doubt that what is the need of TxD and RxD.

    ReplyDelete
  79. sir i have make usbasp burner according to ur circuit diagram.i have problem when i want to transfer hexfile in target micro-controller 89s52,progisp give error "CHIP SIGNATURE DOESNOT MATCH" that cause i am not able to transfer my hexfile to 89s52.can any body help me

    ReplyDelete
    Replies
    1. I too have the same problem. The hex file is not properly flashed onto the controller.... :-(

      Delete
  80. sir plz give me reply... i am waiting for ur response

    ReplyDelete
  81. Hello Gaurau the circuit attached in step1 contains atmega48, does the same circuit will work for atmega8 with same pin numbers?
    If not please attach the circuit

    ReplyDelete
  82. Thankyou sir,your site is very clear and has unique way to Express things.sir i like this post even i should say this site is amazing.
    sir i have a request to you please send me source code(.c file) of this hex file,sir i make project based on touchscreen (Through ADC channel of ATmega16) in engineering,i need to publish project's code as well as programmer code in Project's thesis so please sir send me (.c) file on dubeyhariom4@gmail.com.
    sir i am waiting for mail.
    Thankyou sir.

    ReplyDelete
  83. hello sir....i want to learn how to burn fuse bits in atmega8 but ur link "http://microembeded.blogspot.com/2011/04/avr-serial-port-programmer.html" is not working...do u have some link frm where i can learn ????

    ReplyDelete
  84. Hi Gaurav,

    This USB based avr + 8051 programmer is not working in windows 7 64 bit. I have windows 7 home premium OS. After loading the firmware for this USB based programmer in ATMEGA 8 red LED is glowing after connecting to my lappi but not able to detect the driver. Even though I am giving the path for the driver but not detecting. One more thing, what is the requirement of fuse bits?

    Please Help me.

    ReplyDelete
    Replies
    1. if the hardware is detected by the PC as USBasp then i guess firmware and fuse bits are fine.

      you have to install proper driver for the USBasp please download proper driver (latest version ) and then install that.

      Delete
  85. No, Its not detecting as USBasp. when I connect this programmer with my laptop, it says USB not recognized. One more thing after burning fuse bits, Red led is not glowing & not at all able to erase the controller nor burn. I thing now controller got damaged. That's why I asked you the purpose of burning the fuse bits. Is it necessary to burn the fuse bits? If I don't burn what will happen?

    One more thing when install the driver it says driver is successfully installed & it installed as Unknown Device not USBasp.

    What to do?

    ReplyDelete
  86. Give me the link for latest driver.

    ReplyDelete
  87. m doin a project on AT89c51..suggest me a programmer where i can connect even connect input and output port to it...
    thank u in advance

    ReplyDelete
  88. Hello Gaurav,

    i just made the USBasp and trying to program my AT89C51 with it. The problem is with the user interface. It is not allowing me to select the specific microcontroller. Especially the complete AT89 series. The cursor stops over AVR or Atmega and doesn't go beyond that. Even if i select the 51 it will be ultimately replaced.
    Please help me out on this.

    ReplyDelete
  89. hi i am new programmer of 8051 series,kindly tell me will it works on windows 7 easily??

    ReplyDelete
  90. please, the link for the tutorial on atmega8 fuse burning is not good again. can you provide another link .Secondly, my desktop serial port is suppling negative voltage instead of positive voltage . I mean pin 5 of the serial port is suppling positive voltage while other pins are supply negative voltage . Can you please tell me the solution to this ?

    ReplyDelete
  91. Hello gaurav,

    I went to purchase ATMEGA8L. But I am confused as there as four following types of ATMETGA8L are available.

    1 ATMEGA8L-8AU IC AVR MCU 8K 8MHZ 3V 32TQFP
    2 ATMEGA8L-8MU IC AVR MCU 8K 8MHZ 3V 32-QFN
    3 ATMEGA8L-8MUR MCU AVR 8KB FLASH 8MHZ 32QFN
    4 ATMEGA8L-8PU IC AVR MCU 8K 8MHZ 3V 28DIP

    Now please guide me which one to buy for making this your USB programmer and why

    Prashant Gautam

    ReplyDelete
  92. Hi...
    I build that usbasp kit.
    Pc recognized my programer and progisp detected ic and any thing.
    i was programed my AT89S51 ic.
    progisp say all successful.
    but my program is not woking properly.
    After i programed that my hex file using SP200 programmer.
    it is working perfectly.
    What is the wrong one?????
    Please help me solve that problem..
    Thank you.

    ReplyDelete
  93. Sir, can the USBasp 8051 programmer work with at89s51 target mcu clocked at 11.0592 Mhz ? Thanks in advance...

    ReplyDelete
  94. hi!
    i downloaded firmware main.hex (first step).but its size is 10.6KB
    but i used Atmega8 for programmer but ist memory is 8kb only.what should i do?

    ReplyDelete
    Replies
    1. hex file contains lost of other information too like address, check-sum setting the actual program would be much less then the hex file size do't worry about it

      Delete
    2. hi i just completed circuit and also programmed my Atmega8 at my college with "universal programmer".now when i connect it to pc LED will blink but programmer can not recognize. is it necessary to write 'FUSEBIT'?

      Delete
    3. yep fuse bits are 100% necessary

      Delete
  95. Hi sir, Can I use ATmega8L instead of ATmega8? Because they both have different frequency specification.

    ReplyDelete
  96. sure you can use ATmega8L instead of ATmega8 for usbasp it will work i have tested.

    ReplyDelete
  97. Actually in datasheet it is written that max frequency for ATmega8L is 8 MHz and for ATmega8 is 16 MHz. But as you already have tested it, so I hope it will also work for me. Thanks for solving my problem.

    ReplyDelete
    Replies
    1. Hi sayyed,
      I am in same confusion about operating frequency, Is it really works with mega8L? I have some mega8L not mega8 and i want to make this programmer. which crystal do you use 12mhz or 8mhz ? please replay asap.

      Delete
  98. Sir, while programming the at89s52 with (MISO,MOSI,SCK,RST) pins in accordance with the manufacturer datasheet with your usbasp isp interface, the green light flashes & the progisp pops up a message "chip enable program error". I have tested both versions of progISP 1.68 & 1.72. How to fix it ?

    ReplyDelete
  99. hello sir,
    i am getting chip enable program error when trying to program at89s52 ,
    i have tried using 11.0592mhz and 4mhz with target device but nothing worked.
    can self programming jp2 be used to program programmer ic(atmega8) using progisp?
    plz help

    ReplyDelete
  100. Hello Friends

    i am new to use ISP Programmer for 8051 target controller,can i give external voltage to target micro controller ,is that required or The isp itself supply the power,please help me,

    Regards
    Raju

    ReplyDelete
  101. can we use "11.0592 mhz" crystal instead of 4 MHZ for "target micro controller"?

    ReplyDelete
  102. Replies
    1. please at least read the previous comments , answer is there and i guess i have also mentioned same in the post too.

      Delete
  103. one more doubt gaurav sir
    we have to program atmega8 seperately so it can be used as programmer microcontroller

    ReplyDelete
  104. yahoooooooooooooooooo.........
    its works with 89s51 !!!!!!!!!!!!Thanx @Gaurav Chaudhary!
    see my video.
    http://www.youtube.com/watch?v=6RT2T9zXtq8

    ReplyDelete
    Replies
    1. plzz tell me what was crystal value for target microcontroller

      Delete
    2. crystal value for target microcontroller is 4 mhz.

      Delete
  105. Gaurav sir, can you please give me the eagle board(.brd) file or just give me the above board image with copper part as white and rest as black?
    my email: sayyed.shoaib993@gmail.com

    ReplyDelete
  106. sir can we burn the atmega 8 by using command prompt without setting fuse . i am using old circuit that u mention above.

    ReplyDelete
  107. Hello! first of all, i would like to thank you for what you are doing for the community :)

    i have some questions regarding the circuit of the programmer.
    http://www.circuitvalley.com/2011/06/usb-8051-avr-microcontroller-programmer.html

    1. does the jumper J1 need to be switched on (circuit closed) when burning hex onto target?

    2. if yes, should it be turned on before connecting target, after connecting target, before connecting the programmer to usb, after connecting or what?

    3. what is the use of pins RXD and TXD in the 10-pin IDC connector? according to my limited knowledge, some microcontrollers can be programmed with 6 pin IDC connector as well, implying there is no RXD and TXD pins.

    4.Can 89S (89S51,89S52 etc) series be programmed with only 6 pin IDC connector? (not using the RXD TXD pins)

    sorry for my lack of knowledge, please answer my questions.

    Thanks alot!

    eagerly waiting for your reply.

    ReplyDelete
    Replies
    1. 1. j1 is used to switch the power to the target from usb port on/off ,
      2. you have to provide power to the target may be from the the programmer(shorting j1) or other external source.
      3 only 6 will do the job.
      4 same as 3


      Delete
    2. What is the actual purpose of pins RXD and TXD? if i dont connect them in my PCB layout, will it affect the burning process in any way? And one more question, is it possible somehow to make a UNIVERSAL TARGET BOARD using ZIF SOCKET for all AVR MCs (8 pin, 28 pin, 32 pin and 40 pin)? thanks.

      Delete
    3. rxd txd pins are not used for programming the target in ISP mode only MOSI MISO SCK RESET power and ground pin are required. please google usbasp zif socket if you wanted to make zif socket,
      i advice not to go for zif , zif socket are not very useful these days, you need very few pins to program the target and almost all of the mcu support ICSP , and it's smd word now , so i believe zif socket have a very little use. lot other things are there .

      even if you are breadboarding some thing then with zif socket you have to every time plug off the target from breadboard and plug in to zif socket , no good.
      if you just have ICSP then directly connect the ICSP wire to breadboard , you will save time , no hassle , no pin damage in the process

      Delete
  108. Hi Gaurav,
    your circuit is working fine with avr controllers, but when i try it with at89s51 then programm is getting written successfully in progisp168, but i am not getting the output of that program. Help me

    ReplyDelete
    Replies
    1. Hi Rahul,
      I am getting flash verify errors while flashing the code into at89s52 through the progisp software. At the stage of flash verify am getting error.If you have any idea regarding this, please help me out.

      Delete
  109. hi gaurav, your circuit is working fine with at89s51 but, what problem I am facing is that I have to reset the chip each time I power it up to run the program

    ReplyDelete
  110. Hi Gaurav ji,
    I've made this programmer and flashed the firmware of 8051. The programmer was detected in progisp, it is reading the signature id and erasing the chip(AT89S52) successfully. But the thing is after clicking the auto button blank checking, program flash completed, at the stage of verify flash am getting flash verify errors. Please tell me the reasons behind this problem.
    Thanks in advance...

    ReplyDelete
  111. Hi, Gaurav I made this programmer i have encountered two problems,
    1. fix voltage on d- d+ pins of usb i.e. 2.25 and 0 respectively
    2. unknown device and when i try to update the device driver it says unable to update driver i use windows 7 64 bit i have downloaded the latest usbasp drivers

    please give some suggestion
    Thanks

    ReplyDelete
  112. hi sir,
    i can't find the atmega8 and 88 in the market so can i use atmega328 instead, will it work? if it will, send me the fuse bit settings. you can send any further axplanation to my email ; npaul511@gmail.com .
    hope you reply soon thanks.

    ReplyDelete
  113. Thanks!! the Tutorial was helpful for me. I used ArduinoISP to program the Atmega8.

    ReplyDelete
  114. Thanks a lot. The circuit worked for me. The tutorial was very helpful.. I used ArduinoISP to program the Atmega8..

    ReplyDelete
  115. Hello Gaurav,
    out of my curiosity, i am planing to develop few embedded projects; so started looking for different projects to start with, but then realized for any chip based project i would need the chip programmer!!!
    with limited knowledge of hardware, can i develop this chip programmer by following your instructions? i also have few questions in my mind like,
    1) can we have a programmer which can flash all the available chips (like Atmel AVR, pic, ...)!!!
    2) how to flash the firmware in to the programming ic, for the first time? i mean can we get the
    pre-programmed ic?

    please guide me on this,
    Thanks,
    Anuradha.

    ReplyDelete
    Replies
    1. 1) there are many universal programmer available for purchase on ebay dot com which will program quite a many of microcontroller from many manufacturer .
      but as the number of supported device and manufacturer grow then tend to get a bit costly.
      a cheap which will support few avr few PIC and few ST parts would be around 25-30 USD
      but a big programmer which support hundreds of microcontroller manufacturer then are quite costly like max up to 200 USD. price vary according to device support

      but i don't' recommend you to get one of those universal programmer , they are not good for various reasons. as an hobbyist you have 2-3 different good programmer for different vendor.

      2) there are many ways to achieve first programming.
      1. you could buy programmed chip from some online shop. if you could find source what you are looking for . or few sites what they do when you purchase a microcontroller IC from them they will ask you to provide some hex file so that they will program it first before shipping. or may be on few programming service provider site you have to ship your micro to them they will ship you back programmed of course they gonna charge for it but charge is as low as INR 200
      2. you ask you college or some friend in the industry.
      3. or you can ask me i can send you preprogrammed mcu or you send me your mcu i will send it back to you programmed.

      Delete
    2. Thank you very much for the reply. For now i will start to develop this programmer and mean while i will check with local vendors for pre-programmed chip. if necessary will contact you again.
      Once again thanks for the response, this forum is a great support for beginners like me.

      Anuradha.

      Delete
    3. Hello Gaurav,
      while searching for the, so called, universal programmers, i came across 2 products. can you please tell me the difference between these two,

      1) http://www.ebay.com/itm/SP300U-USB-Universal-Programmer-Fo-51-AVR-ATMEL-MICROCHIP-SST-STC-IC-Chip-Device-/271441337515

      2) http://www.aliexpress.com/item/New-Ep51-AT89-STC-MCU-ATMEL-CHIP-Burner-Programmer-2-in-1-with-USB-Cable/1622156509.html

      the detailed description is available for the 2nd product but no such details for the first one.

      waiting for the reply,
      thanks,
      Anuradha.

      Delete
    4. if i were you i would love to go with the ebay one as second one have very less number of device support

      but it look like the first one also does not support only 1 type of PIC microcontroller which is really bad.

      Delete
    5. Ok, let me make an attempt to build the PIC programmer (Pickit 2 clone The Universal Microchip PIC Programmer /Debugger) provided by you. In that case i can flash the PIC 18F2550 using "Microchip PIC Serial Port Programmer"

      Delete
  116. ca v use flash tool progisp for installing program in pic 16f84 microcontroller

    ReplyDelete
    Replies
    1. i am really not sure about the software progisp but , the hardware shown in this page can not be used to program to any PIC micro
      on this link you have serial port based hardware and required software to program PIC microcontrollers
      http://www.circuitvalley.com/2011/05/microchip-pic-serial-port-programmer.html

      Delete
  117. thank u sir for ur reply..
    sir my project is propeller clock using pic 16f84a..
    am not able to understand what software should be used for programming it..
    i used proteus isis and designed the circuit but unable to program it using keil uvision..
    and even flash tool progisp do not show the required component..
    soo plzzz help me out in choosing software for programming and dumping the program into controller....

    ReplyDelete
    Replies
    1. you wanted to program a real hardware micrcontroller or that software simulation model ?

      Delete
  118. real hardware microcontroller sir

    ReplyDelete
    Replies
    1. so you gonna need a real hardware programmer with a associated software , i have posted two microchip PIC microcontroller programmers one serial and one USB you can use any one you like . refer to these two link
      serial port based , needed software and hardware is mentioned on the page itself.
      http://www.circuitvalley.com/2011/05/microchip-pic-serial-port-programmer.html

      USB port based , needed software and hardware is mentioned on the page itself.
      http://www.circuitvalley.com/2011/07/pickit-2-clone-universal-microchip-pic.html

      Delete
  119. Hi, would an atmega328P-Pu work instead of the atmega8. Thank you

    ReplyDelete
    Replies
    1. directly it will not work , but some with some changes in the software it many actually work.

      Delete
    2. Thank you Gaurav for your swift reply. Do you have any tips on what to do because I have 3 atmega 328P-Pu chips on hand and I really want to incorporate an 8051 into a project.

      Delete
    3. i would not recommend doing such thing as it may require lots of things to be modified which lead to consumption of time. go with atmega8

      Delete
  120. sir is this right '''ATMEGA8-16PU PDIP 28P3 28 ''' ???

    ReplyDelete
  121. sir if i burn the atmega8 by a market readymade burner is it necessary to think about fuse bit ?

    ReplyDelete
  122. dear
    sir,can i use atmega8L instead of atmega8

    ReplyDelete
    Replies
    1. please read the post and comments ,this question is already answered.

      Delete
  123. Nice share.
    Sir what cables have you used for right angle connector?

    ReplyDelete
  124. Thanks a lot. I have make this programmer and it is working 100% fine..

    ReplyDelete
  125. Nice place for the elex enthusiast.
    Actually I am seeking help from someone who can program my Atmega8 . Well I tried with a cheap programmer with zif socket from a local shop, also tried with the ISP circuit but to no avail.
    I've already lost a week in this.

    Can somebody from Delhi help me out with the hex file burning ?
    Or maybe can direct me to a suitable place for a kinda paid service ? like Nehru place or somewhere.

    I am really hopeful with this forum.
    Thanks in advance

    ReplyDelete
  126. I have tried and almost complete and when i connect the programmer with PC it's shows "USB not recognized" on board red Led is ON . how can i rectify this one.

    Thanks in advance.

    ReplyDelete
    Replies
    1. I have tried to connect in ubuntu 12.04 and here also i am getting error. i have given the error below,
      [ 3215.156031] usb 3-1: new low-speed USB device number 2 using uhci_hcd
      [ 3215.280024] usb 3-1: device descriptor read/64, error -71
      [ 3215.508036] usb 3-1: device descriptor read/64, error -71
      [ 3215.724029] usb 3-1: new low-speed USB device number 3 using uhci_hcd
      [ 3215.848023] usb 3-1: device descriptor read/64, error -71
      [ 3216.132032] usb 3-1: device descriptor read/64, error -71
      [ 3216.348076] usb 3-1: new low-speed USB device number 4 using uhci_hcd
      [ 3216.760025] usb 3-1: device not accepting address 4, error -71
      [ 3216.872022] usb 3-1: new low-speed USB device number 5 using uhci_hcd

      Delete
  127. Sir,
    I have a Arduino UNO R3 China made clone (ATmega328P with ATmega16U2) board. Can I upload the firmware via this Arduino? If yes, the please provide some instruction. This will save me from finding a machine with serial port. ATMega328 is cheaper than ATMega8 in some stores in Calcutta, so I need ATMega328 instead of ATMega8, can I use ATMega328?
    I also need on-board voltage regulator equipped power supply like my UNO R3 so please give me the detail of power supply.
    ProgISP is good but unavailable on linux, how can I use this programmer in linux? Is this programmer STK500 compatible? How can I use it to upload Arduino UNO R3 compatible codes right from the arduino IDE?

    ReplyDelete
  128. hi..Gaurav,
    please help me out about the
    1. x2 connector
    2.jp1
    3.jp2
    4.jp3

    i have read all your posts but i cant figure it out .So,please help me.

    thnks in advance...

    ReplyDelete
  129. Sir,
    i have made the above stated circuit. but when i try to program my AT89S51 it says error "CHIP ENABLE PROGRAM ERROR".
    please help me out as early as possible as it a part of my project.
    thanks in advance........

    ReplyDelete
  130. hiii
    i program atmega8 avr with given hex file and my led is glowing but when i connect my programmer to computer then it shows usb device is not recognized i am using Windows 7 ,32 bit operating system . i install the all driver .what to do i ?......

    ReplyDelete
  131. Dear Mr. Gaurav
    I am studying your blogs from last few days.I understand all the thing but one small thing i cant understand.
    Here the voltage (+5V) and GND coming from the external 5V power adaptor and Target MCU's voltage (+5V) coming from the USB pin no.1 and GND come from Pin no.4. My question is that the voltage source is different I know but can I join the both GND's togather ?


    Subhendu Mondal
    subhendu.mndl83@gmail.com

    ReplyDelete
    Replies
    1. if you want to power the traget MCU from USB Power supply , connect USB +5V to target MCU's +5v.

      if you want to power target From external Power supply , connect target MCU's +5v to external supply.

      in every condition , all GND will be shorted together.

      Delete
  132. Hi Mr. Gaurav,
    I have done the circuit as per ur diagram. configure fuse bit and burn main.hex to ATmega8. but Still I found "chip enable programme error"
    I replace the cristal,put a new at89s52 controller. But error not resolved.
    please guide me the positivly.

    ReplyDelete
    Replies
    1. Also I woul like to inform u that I have not used any external 5V power source. the voltage coming from USB

      Delete