I’d like 328p to run at 8Mhz & 3.3V with external crystal. No bootloader necessary. Sounds straightforward!
New chip is presumably running at 1Mhz as “-B10” or so is required to burn the fuses.
The fuses burn successfully but as soon as it’s done I can no longer communicate with it even at “-B100” :
avrdude: error: programm enable: target doesn't answer. 1
I use the following to burn the fuses:
avrdude -Cavrdude.conf -v -patmega328p -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m -B10
I lifted and swapped 3 chips one after another each time with exactly the same outcome.
The scope reports XTAL1/2 oscillating at 8.00001. I tried feeding 12Mhz external clock to XTAL1 after providing 5V. Also tried swapping the crystals although that doesn’t seem to be the problem.
I’m using usbasp but never had problems at 16Mhz. I used the very same method for 16Mhz fuses and I was very happy with it before. It worked without a fault on 10 chips from the same batch.
Again the method is:
- Put together a board with external oscillator
- Test if it oscillates
- Burn fuses with “-B10”
- Upload sketches etc. Business as usual from now on.
I understand that 99% of the time it’s clock (oscillator) or timing issue.
The question is:
- How do I talk to these chips that don’t respond after setting the fuses (revive the 3 chips)?
- How to proceed with the new chips to avoid this problem?
Many thanks for suggestions.