Author Topic: ATMEGA 328P not responding to USBasp  (Read 1828 times)

0 Members and 1 Guest are viewing this topic.

Offline bharatcsTopic starter

  • Contributor
  • Posts: 16
  • Country: in
ATMEGA 328P not responding to USBasp
« on: February 24, 2017, 03:53:56 pm »
I tried to program an ATMEGA 328P using an USBasp with arduino IDE .But I forgot to burn the boot loader instead I uploaded the  led blink sketch.
Now the ATMEGA 328P does not respond.Is it due to incorrect fuses?
I even tried low speed programming 
Error message :
avrdude:error:programm enable : target doesn't answer.1
avrdude:initialisation failed,rc=-1
  :palm:
 

Offline beenosam

  • Regular Contributor
  • *
  • Posts: 65
  • Country: ca
Re: ATMEGA 328P not responding to USBasp
« Reply #1 on: February 25, 2017, 12:09:33 am »
It could possibly be an incorrect fuse for the clock. I've encountered this before when burning stuff on Atmegas. What you want to do is hook up an external clock signal to the controller then try to reprogram the fuses.

For the external clock signal I used another microcontroller and just toggled the pins on and off in the main loop.  It may not work for you but it worked for me every Atmega I've had issues with so I can reprogram the fuses.
 
The following users thanked this post: bharatcs

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3024
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: ATMEGA 328P not responding to USBasp
« Reply #2 on: February 25, 2017, 12:34:17 am »
By the nomenclature, sounds like you are using the Arduino IDE.

I assume you attempted to burn the (standard) bootloader, in doing so the first thing that does is set the fuses to expect a (16MHz) crystal/oscillator on it's pins, and you will need to provide that, or inject a square wave into XTAL1 in order to program again or change the fuses.  Note that the bootloader won't have actually been burnt in, only the fuses will be changed at which point the bootloader could not be uploaded due to no clock.




~~~
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 :-)
 
The following users thanked this post: bharatcs

Offline bharatcsTopic starter

  • Contributor
  • Posts: 16
  • Country: in
Re: ATMEGA 328P not responding to USBasp
« Reply #3 on: February 27, 2017, 06:00:48 pm »
Thanks Guys.I will try to hook up an external clock.
 

Offline bharatcsTopic starter

  • Contributor
  • Posts: 16
  • Country: in
Re: ATMEGA 328P not responding to USBasp
« Reply #4 on: March 01, 2017, 08:46:32 am »
It Worked. :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf