Problem with using 32 Khz crystal on Atmega 328 (avrdude : device signature : 0x000000)

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

I am trying to build a digital watch.I intend to use the 32 kHz crystal for timer2 in async mode.  I know I should have used a 328P instead of a regular 328 for lower power consumption but I didn't have one on hand and buying stuff during the coronavirus lockdown is difficult. So I decided to go with the 328 for prototyping. I am using an Arduino Uno board as ISP. I loaded the Pro mini 8Mhz bootloader on it and it worked fine. Then I moved ahead with changing the fuse bits. I set the fuse bits to HIGH : 0xDA  LOW: 0xE2  Extended: 0xFF. After changing the fuse bits I rechecked the chip using avrdude command and it had the desired fuse bits. The chip previously had a Blink sketch prior to change the fuse bits and it was working fine. But when I tried to upload another program using Arduino IDE i got the avrdude : device signature : 0x000000 error. The blink sketch had also been erased. Afterwards when I rechecked using command line it showed the same error message and the showed that the fuse bits were all 0x00.

 

I have tried :-

1. Using a different power supply other than the Uno.

2. changing the clock crystal

3. Lowering the baud rates 

4. Attaching decoupling caps on power pins and loading caps on the crystal pins (although for a 32 KHz, I am told that these are not necessary)

 

Avrdude also gives the error message programmer not responding whenever any other command is passed.

I can confirm that there is a bootloader on the chip as any LED connected from SCK pin to ground will flash whenever I reset the chip.

 

I have to tell this beforehand: I do not have an oscilloscope & I do not have any other ISP.

 

Please help.

Thank you.

This topic has a solution.

Barbaric_Baboon

Last Edited: Tue. Sep 15, 2020 - 09:10 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to AVRFreaks!

 

Your fuses look ok and are the same for the m328 and m328p, it should be using the internal RC at 8MHz, although the internal R/C is not recommended for serial comms (USART) so your boot loader may fail.   But you are reporting that you can not read the device sig using ISP, is that correct?

 

See how to recover your AVR after it has been bricked here in the tutorial forum and see if injecting at least a 1MHz clock into the xtal1 pin will help you recover and set fuses to default values, so your ISP operations work again.

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

Last Edited: Tue. Sep 15, 2020 - 07:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, that is true I cannot read the device signature using the Uno I'm using as ISP. I will try the tutorial and giving a 1Mhz clock signal into the xtal 1 pin. Thank you

 

Barbaric_Baboon

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

Thank you so much. Feeding a 1 Mhz clock signal allowed me to re-program the chip. I used the modified Arduino ISP code that outputs 1 Mhz on PWM pin 3(Digital pin 3). The code can be found at https://www.avrfreaks.net/comment/885850#comment-885850.

Barbaric_Baboon