Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I've got an USBASP v2 programmer with 10-pin ICSP output. Could anyone tell me which pins to connect to program my ATTINY2313 with AVRDUDE (under Ubuntu). For some reason, I keep getting:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.
share|improve this question
Is there any particular reason why you haven't accepted answers to any of the questions you asked so far and a the same time haven't provided information why any of the provided answers aren't the solution to your problem? – AndrejaKo Mar 25 '12 at 8:40

2 Answers

I had the same problem trying to program an ATtiny2313 with an USBasp out of the box. The problem is that the 2313's default clock (internal oscillator, CKDIV8 enabled) is way to slow for the SCK used by the USBasp by default. From your error message it seems like the current version of avrdude already adresses this problem and tries to reduce the SCK clock rate, but your USBasp's firmware doesn't support that. You now have two options:

  • updating the USBasp firmware to a version that allows changing SCK frequency through software
  • manually reducing the SCK frequency by setting the "Slow SCK" jumper on the board. Maybe this schematic helps you to find it: http://www.fischl.de/usbasp/bilder/usbasp_circuit.png This is what I did. Note that the actual name may not correspond to the one in the schematic. In my case the jumper was called "J1", not "JP3"
share|improve this answer

It is good practise to start problem finding with the first error message received. Avrdude suggests a firmware update to the USPASP, so there are three things you have to do:

  1. Figure out which version firmware is running on the USPASP;
  2. Figure out what version firmware is current;
  3. Upgrade the firmware and check the new version number

Then retry programming the ATtiny.

share|improve this answer
Hmm .. it says on another site that it probably isn't connected to the chip. Could you tell me exactly which pins to connect to get it to work? Thanks. – user8210 Mar 25 '12 at 22:08
You can easily get this information from the datasheet, but you're lucky I'm writing an article about an ATtiny2313 and I can just copy & paste the required pins: ATtiny2313: 10: GND; 1: !RESET; 17: MOSI; 18: MISO; 19: SCL/SCK; 20: Vcc. I don't know the pinning for your USPASP though. I still think you have to start solving the first error, as this is quite probably the cause for being unble to properly communicate with the device. – jippie Mar 26 '12 at 6:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.