Hi , I purchased an USB AVR programmer and I can not seem to get it working.
I have tried windows vista and windows XP SP3. The drivers install fine, but when I use AvR studio 4 and click on connect with AVRISP setting and port to Auto it does not want to connect at all.
I tried the same on 2 different machines.
The USB connect light is green when I connect the micro to it one of the other LED become flashing non red , but I soon as I hit connect nothing happens. I tried AVRdude( avrdude -p m168 -P \.\USBSER000 -c avrispv2 -e) same thing , if I look at the config util it says something about sending a programming commend but never got a response and to make sure that the ISP frequency is less than a 1/4.
Sometimes AVR Studio is unable to connect to the programmer’s COM port, so let’s focus on getting avrdude to work.
Please power down the programmer (make sure it’s not connected to your AVR or the computer). Then plug in the programmer, and tell me what programming error it lists in the config utility. It should say “None.”
When you run “avrdude -p m168 -P \\.\USBSER000 -c avrispv2 -e”, what is the output from AVRdude?
What processor are you trying to program? If it’s not a mega168, you should try changing the m168 argument above.
After you run avrdude, does the red led on the programmer come on? Is there an error message in the configuration utility?
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
avrdude done. Thank you.
The light turns red while the yellow is flashing…
And from the Configuration Utility I get:
The SPI command for entering programming mode was sent, but the expected response from the target was not received. Make sure that the ISP frequency setting is less than 1/4th of the target’s clock frequency.
From your description, it sounds like USBSER000 definitely corresponds to the programming COM port, and USBSER001 is probably the TTL serial port.
The error message you received in the configuration utility indicates that the programmer tried to send the enter-programming-mode command to the AVR on the MOSI and SCK lines, and it got the wrong response (or no response) on the MISO line. Make sure that the RST, MOSI, MISO, and SCK lines from the programmer are all connect to the right pins on the AVR, because if any of those connections is bad you would get this error. You should also check the GND and VDD lines, but its unlikely that those are wrong because the programmer is correctly detecting a high voltage on the VDD line.
Do you know what the clock fuse settings are on your mega168? Make sure that the programmer’s ISP frequency is less than 1/4th of the AVR’s clock frequency (1/6th if it’s greater than 12 MHz).
Hi , I tripled checked all the connections with a multimeter to check continuity and also that i got the right pinout.
I also used another programmer and was able to flash it. I tried another MCU and still got the error.
I figured the issue with AVR studio. I used the version 4.17 thats why it did not work. If you use 4.16 you will be able to communicate with the programmer just can not get the identification from the MCu’s.
To be able to flash the MCU ( sorry for my ignorance) you connect all the powers and grounds to the MCU and all the pins from the header ? SO I cconnect VCC , GND , AREF, GND and AVCC and the pins from the header and I should be ok? Sorry I am kind of new at this.
Thank you for letting us know that AVR Studio 4.16 worked for you! This will be useful to other people who have the same problem.
What model is your other programmer? What ISP frequency did this other programmer use? What ISP frequency is your Pololu USB AVR Programmer configured to use (check the config utility rather than AVR Studio for an accurate number)? What is the clock speed of your AVR?
Since you were able to program your AVR with another programmer, your connections are probably good (assuming it was an ISP programmer and not some other type). But let’s go over all of them just in case.
You should connect your AVR’s GND pins to each other and the negative terminal of your 5 V supply and also to the GND pin from the programmer.
You should connect your AVR’s VCC pin to the positive terminal of your 5 V supply and also to the VDD pin from the programmer.
You should connect your AVR’s MOSI/PB3 to the programmer’s MOSI pin.
You should connect your AVR’s MISO/PB4 to the programmer’s MISO pin.
You should connect your AVR’s SCK/PB5 to the programmer’s SCK pin.
You should connect your AVR’s RESET/PC6 to the programmer’s RST pin.
AREF is the analog-to-digital converter’s reference voltage pin. Its connection shouldn’t affect programming.
Regarding AVCC, section 1.1.7 of the ATmega168 data sheet says:
So you should connect AVCC to VCC.
If you check all those connections and can’t make it work, maybe it is a problem with the 6-pin cable that came with your programmer. Did you do a continuity test on the cable?
The problem is that the programmer I used was not of ISP type , The ATMEGA168 supposedly has a bootloader on it.
The programmer was of different type… I was merely trying to check that the MCU is good.
AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P COM4 so type of Avr109??? ( thats the avrdude arguments I used)
The programmer comes with a kit (nerdkits.com).
It has completely different connections… You connect pin2 , pin3 of the MCU power and ground and ground pin 14 of mcu to put the thing in programmer mode. I was merely testing to see maybe my MCU was dead. And it worked , then I said hmm maybe the boatloader is screwing with the device so picked up a blank MEGA16 hooked up everything and tried that…it failed again.
Sorry not to sure on the ISP frequency that the programmer used. I do not remember off hand the Hz but I tried different settings from the config utility. If you need them when I get home I will get them .
Yep I made all the corrections correctly I even checked the ribbon cable for connectivity and its good while I did it. Then i ripped them apart and did check them again. I am pretty sure the connections are good.
I really do not get it…