Usbasp programming - Cannot set sck period error

Go To Last Post
20 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I hav recently purchased a usbasp avr programmer. I have made the connections with the atmega microcontroller using jumper wires as shown in the attachment.. There is no connection problems. Then when i try to burn using avrdude im getting this error message. Cannot set sck period. Need to update firmware version.... and when i tried in extreme burner i got the powering on problem. Images are there in the attachments... i hv gone through the net searching for answers.. i hav connected jp3 using jumpers.. But no use.
Tried -B in avrdude -- no use
Placed a 1k ohm resistor between reset pin and reset line from usbasp.... no use
Added an ext oscillator circuit... No use
Externally powered the microcontroller..No use
And someone said it might be microcontrollers fault and i also bought another one.. But same thing happened.. someone please help

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cannot set SCK is advisory, not error. You usually see it with Chinese supplied USBasp. They set SCK automatically so -B is not required. So just ignore the message. If the real problem here is that you cannot program then SCK may be a red herring. What do you see output from avrdude. If you add multiple "-v" to the command line does it help to show what's wrong?
.
Also what micro?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually looking at the pictures it appears to be both mega16 AND mega32. Which is it really?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I checked it Atmega 32 and also 16...
I have used -v and the result is in the attachment... please help

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It look like a regular Chinese USBASP.   Hence it will set SCK automatically.   Ignore the SCK warning.

 

Only the OP can read the part number on the AVR.   Whatever the AVR,  you would see a Signature saying 1E 9x xx

 

Supply an external clock to XTAL1 pin and the AVR should respond.  Auto SCK should work.

 

If you have set the fuses for a 32kHz Watch crystal,   you need to connect a Watch crystal.   Auto SCK will NOT respond.

So you need to buy/borrow another programmer.   

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have connected xtal 1 and xtal 2 with a crystal oscillator 16mhz but same error occoured. And i just bought the programmer and uC and had done nothing with the fuases.. Factory default uC should be running on internal clock right???

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Goutham Subhash wrote:
I have connected xtal 1 and xtal 2 with a crystal oscillator 16mhz but same error occoured. And i just bought the programmer and uC and had done nothing with the fuases.. Factory default uC should be running on internal clock right???

 

Yes,  a factory AVR should run on internal RC clock.

Yes,  a Chinese USBASP should auto-SCK

 

Extreme Burner and your name suggests that you may be from India.    An Indian AVR or an Indian USBASP will not always follow world conventions.

 

David.

Last Edited: Sun. Oct 29, 2017 - 03:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So then what should i do????

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try to program a known good AVR.

Try to program your AVR with a friend's known good programmer.

 

If your AVR really is virgin,   you should check your wiring.

 

Only you know where you bought the AVR and the USBASP.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can u give me ur whatsapp number so that i can contact u??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are in the UK,  PM me.

 

Old people don't whatsapp.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Im from india... do u have facebook???

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No.    This particular old person does not do any of those things.

 

Seriously.     People in Europe or the U.S. buy things from China.    And have pretty good experience.

 

The Indian marketplace is a complete mystery to us.    But I am sure that Indian websites will know exactly what is sold locally.

If you have bought from a Chinese vendor,    post links to the sale items.   We can probably help you out.

 

Likewise with European, U.S., Australian vendors.    Definitely with "international" Distributors like Digikey or Newark.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In post #1, the first attached image shows your breadboard.

 

I don't see any bypass capacitors.

There should be a 0.1uF cap on each Vcc and AVcc pin to ground.

 

Also, the wires connecting the programmer to the uC are quite long.

This can cause problems.  Try using shorter leads.
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the need for a bypass capacitor?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Goutham Subhash wrote:

What is the need for a bypass capacitor?

 

Wires act like inductors.  They resist a sudden change in current.

Fets in the uC switch on and off causing spikes in current flow used to charge and discharge internal capacitance.

This can cause a sudden drop in voltage at the Vcc (and AVcc) pins which causes the uC to misbehave.

The bypass caps provide the needed current to prevent  the voltage drop.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So how should i connecT the usbasp to uC????

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Goutham Subhash wrote:

So how should i connecT the usbasp to uC????

 

Start by adding a 0.1uF (100nF) capacitor from each Vcc and AVcc pin to the closest Gnd pin on the uC.

Connect the capacitors close to the pins using short leads.

 

Update:

  If adding the capacitors doesn't solve the problem, try using shorter wires from the programmer

  socket to the uC pins.

 

Last Edited: Sun. Oct 29, 2017 - 08:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tried both... Not working...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does it has something to do with the drivers????