Tuesday, June 28, 2011

USB 8051 (89 series) & AVR Microcontroller Programmer

About the programmer

         This simple microcontroller programmer can progam most of  the 89 likeAtmel' 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).
Note :-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 buid 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 dwonload the Firware 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 Descirption 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 & Geen) 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

185 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
  5. can it program a 40 pin at89s51 ?

    ReplyDelete
  6. 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
  7. can we attach 1 crystal to both atmeg8 and the target mcu ?

    ReplyDelete
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. + 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
  14. 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
  15. 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
  16. 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
  17. i dont have a db25 or db9 pin in my laptop.
    is there an another way to make the serial avr programmer ?

    ReplyDelete
  18. 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
  19. if you have access to other programmer then there is no need to make the serial port programmer

    ReplyDelete
  20. no i have not burned yet..
    i dont have another programmer to do that. :(

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

    ReplyDelete
  22. 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
  23. i'll see.. here there is access to a lot of programmers .

    so thank you for ur concern.

    ReplyDelete
  24. 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
  25. 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
  26. 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
  27. Thanks, for consideration .There was problem with progisp i redownloaded it and now it's working .

    ReplyDelete
  28. does this supports all 8051 mcu??

    ReplyDelete
  29. 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
  30. 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
  31. if progisp detect the board then it should work fine

    may be led placed wrong

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

    thnx.

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

    ReplyDelete
  34. @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
  35. @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
  36. please try to click verify button

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

    ReplyDelete
  37. 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
  38. 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
  39. please try to set the j3(slow sck) and try reading writing and verification

    ReplyDelete
  40. i tried it, it's not working. :(

    ReplyDelete
  41. 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
  42. yes, i have.
    damn it's testing my patience.

    hmm.. okay i will repeat it.

    lets hope for good.

    ReplyDelete
  43. @Gaurav
    are you on facebook ?

    ReplyDelete
  44. @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
  45. hi,
    i connected the circuit to the pc and it says device not recognized but the green led light is on. What is the problem ?

    ReplyDelete
  46. 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
  47. 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
  48. @nidhin

    i think it should support89s4051

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

    ReplyDelete
  49. 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
  50. hi guys
    i have use this 4 3 year
    but whenever i wrote fusebit bad (write fuse in higher than 8mHZ without crystal)
    i must be program the micro with stk500 to return it to back
    i heart it can back with hivoltag programing (an interface)
    can u attach an hardware to refuse the micro

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

    thanks
    Gina, Indonesia

    ReplyDelete
  52. 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
  53. @PERJALANAN HIDUP
    no 89c51 and 89s51 are different
    89c51 is programmed only serially
    while 89s51 can be programmed both serially and parallel

    ReplyDelete
  54. 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
  55. Sir Can u mail me eagle file of PCB board and Schematic?

    mail-id: mvasimkhatri@live.in

    ReplyDelete
  56. Nice circuit. I have AT89C51.

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

    ReplyDelete
  57. 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
  58. actualy tell me which pin is connected to which one if i remove the x2.
    advance thanks

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

    in schematic and the board u created differ?

    ans pls

    ReplyDelete
  60. 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. This comment has been removed by the author.

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

      Delete
    3. Please reply anyone soon....

      Delete
    4. 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
    5. 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
    6. I have used progisp168 but problem occured remain same..

      Delete
  61. 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
  62. 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
  63. 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
  64. 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
  65. 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
  66. This comment has been removed by the author.

    ReplyDelete
  67. 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
  68. gaurav bro how to burn the firmware to the ATMEGA8 ?? can we burn it in this burner ??

    ReplyDelete
  69. 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
  70. 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
  71. 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
  72. 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
  73. 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
  74. 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
  75. Can I use this programmer to program AT89S8253 with 12MHz crystal?

    ReplyDelete
  76. 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
  77. 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
  78. 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
  79. 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
  80. 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
  81. 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
  82. 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
  83. sir kindly rply us soon... v hav a dead line...

    ReplyDelete
    Replies
    1. dip switch are just being used as jumpers so jp1 jp2 jp3 are replaced by the dip switch.
      you can use jumpers if you like

      Delete
  84. 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
  85. 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
  86. 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
  87. 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
  88. sir plz give me reply... i am waiting for ur response

    ReplyDelete
  89. 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
  90. 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
  91. 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
  92. 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
  93. 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
  94. Give me the link for latest driver.

    ReplyDelete
  95. 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
  96. 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
  97. hi i am new programmer of 8051 series,kindly tell me will it works on windows 7 easily??

    ReplyDelete
  98. 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
  99. does the firmware u have provided in ur link will support programing for at89c51 or should we need different firmware program??

    thnx

    ReplyDelete
  100. 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
  101. 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
  102. pin3 is connected to which pin?

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

    ReplyDelete
  104. 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
  105. Hi sir, Can I use ATmega8L instead of ATmega8? Because they both have different frequency specification.

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

    ReplyDelete
  107. 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
  108. 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
  109. 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
  110. My Programmer works but not program 89s51 see this video and please help me.
    http://www.youtube.com/watch?v=_6iSPmjxs0s

    ReplyDelete
  111. 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
  112. can we use "11.0592 mhz" crystal instead of 4 MHZ for "target micro controller"?

    ReplyDelete
  113. 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
  114. one more doubt gaurav sir
    we have to program atmega8 seperately so it can be used as programmer microcontroller

    ReplyDelete
  115. 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
  116. 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
  117. sir can we burn the atmega 8 by using command prompt without setting fuse . i am using old circuit that u mention above.

    ReplyDelete
  118. 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
  119. Hi Gaurav, I tried to program at89s51 using above circuit, and I have written a program to blink led.
    program is successfully written and verified in progisp168 but the led is not blinking.
    Can you tell why

    program is given below

    ORG 0000H

    HERE:CPL P1.0
    LCALL DELAY
    SJMP HERE

    DELAY: MOV R5,#255
    H3: MOV R4,#255
    H2: MOV R3,#255
    H1: DJNZ R3,H1
    DJNZ R4,H2
    DJNZ R5,H3
    RET
    END

    ReplyDelete
  120. 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
  121. 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
  122. 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
  123. 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
  124. 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
  125. Would this program a AT89LS8252??

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

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

    ReplyDelete
  128. 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
  129. I am having burning hardware for P89V51RD2. Can i use it to burn AT89S52?
    Do i also need software other than flash for burning atmel ic?

    ReplyDelete