Wednesday, February 18, 2009

USBASP Programmer for AVR is working on Windows Vista





Finally I could get my USB programmer to work with windows vista. Firstly, I stripped of the breadboard from all previous connections, and reconnected the circuit. This ofcourse proved fatal to two of my microcontrollers, as I accidentally connected +12V to Vcc rail, instead of the input to the 7805 IC. I connected the programmer to PC, and it said unknown device. I knew I connected the D+ and D- wires from USB port wrong. The final bread board looks like this:


So I swapped them and replugged the USB. This time the device was recognised as usbasp, and windows vista asked for driver. I supplied the libusb driver given with the fischel's package (http://www.fischl.de/usbasp/). Windows said something about device compatibiliy. I chose to ignore, and the device installed successfully.

Now I opened command prompt and typed  avrdude -c usbasp -p t2313

 Command prompt returned  error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc


I tried to search the forums. They suggested to use 2007 build of winavr, I tried that (replaced avrdude.exe in the C:\winavr\bin directory with the 2007 version). Some of them also suggested to use an older version of libusb. So I did that too. After spending an hour, I did some thing I should have done a long time ago. I clicked on the orb (start), typed 'cmd', so Vista start menu searched cmd.exe. I right clicked on it and selected "Run as Administrator". Now when I typed

C:\Windows\system32>avrdude -c usbasp -p t2313
found 8 busses

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e910a

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

Wow, the device actually worked!! I tried several times and it was working. I started the AVR8-Burn-O-Mat and changed some settings.


Burn O Mat seems to work fine too. Just too bad it doesn't have the buffer of ponyprog, and the hex display. It is just great otherwist, and has a lot better fusebit editor.






Researcher and academician by Trade. Hobbyist webdeveloper, photographer and ametuer musician.

3 comments:

  1. Sajid, i'm doing your usbasp programmer right now but i'm a little confused about two things

    1)The libusb i'm not sure what to do on that part. i've read the Readme.txt on fischl but i'm not sure what to do. It says:

    Notes on Windows (Cygwin):
    Download libusb-win32-device-bin-x.x.x.x.tar.gz from
    http://libusb-win32.sourceforge.net/ and unpack it.
    -> copy lib/gcc/libusb.a to lib-path
    -> copy include/usb.h to include-path
    cd avrdude
    ./configure LDFLAGS="-static" --enable-versioned-doc=no
    make

    Which lib & include paths does he mean?

    2)Have you tried using the 5V Supply from the computer?


    Right now, i've done your circuit, flashed the atmega8. Am I missing something rather than the libusb issue?


    Thanks

    ReplyDelete
  2. Hi friends,

    It is open source, so you can download its schematics The only trouble is, it requires an atmega8 in the programmer circuit. So you have to first program it using some other programmer. After that you are all good to go.i have use it & I have purchased from

    Thank you,

    ReplyDelete
  3. Hi friends,

    It is open source, so you can download its schematics The only trouble is, it requires an atmega8 in the programmer circuit. So you have to first program it using some other programmer. After that you are all good to go.i have use it & I have purchased from

    Thank you,

    ReplyDelete

Visit My Official Website at BUET

Contact Me
Sajid Choudhury
+9665650
Dhaka, Bangladesh