Author Topic: Using USBASP for ATMEGA48 Without Being Able to Set SCK Period  (Read 2191 times)

0 Members and 1 Guest are viewing this topic.

Offline firworksTopic starter

  • Supporter
  • ****
  • Posts: 22
  • Country: us
    • Firworks
I've got a USBASP programmer off eBay that has old firmware on it. When I use avrdude it gives the following error:
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.

I don't have another programmer to try to program the firmware on this one with. However, I was able to connect and program an ATTINY2313A just fine with it. I'm wondering because I'm contemplating soldering some headers onto a consumer electronic that I found the 6 ICSP pins on but I am not sure if I should bother if I won't be able to communicate with the microprocessor. Is there any reason I would be able to communicate with a Tiny2313 but not an Atmega48A without setting SCK on the programmer?
For fun, for information? http://firworks.net
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3079
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Using USBASP for ATMEGA48 Without Being Able to Set SCK Period
« Reply #1 on: April 19, 2016, 05:13:36 am »
Most likely your USBAsp actually has the auto-speed firmware on it, it's not necessarily "old", the error about not being able to explicitly set the clock rate in such case is innocuous, provided it works.

However this firmware won't work for chips setup to clock very slowly (less than 1MHz from memory). 

There are some reasons you might not be able to communicate with a functioning chip, most commonly it might have RESET disabled, or SPI programming disabled, or be setup for a crystal when you don't have one connected, or be setup for a clock when you are not feeding it one,  the first two cases are not recoverable without high voltage programming, the last two cases you can recover by injecting an 8MHz square wave into XTAL1 pin which will get it able to talk enough to re-burn the fuses with avrdude appropriate for your situation.

If you have an Arduino handy you can always load up the ArduinoISP sketch and break out your soldering iron to re-burn the "official" USBAsp firmware which doesn't auto-speed but does allow you to set the bit clock ( -Bx option to avrdude ).
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf