Go Down

Topic: [SOLVED] Set Low Fuse Bit, Now Can't Program over ISP (Read 6 times) previous topic - next topic

Aakash

#45
Nov 18, 2012, 09:59 pm Last Edit: Nov 18, 2012, 10:32 pm by Aakash Reason: 1
dc42:

I set REQUIRED_FREQUENCY  (128000) and connected the logic analyzer to CLKOUT.

When connecting the source to XTAL1 nothing happens to CLKOUT. But when connecting it to XTAL2 the attached screenshot is the output.

EDIT: When D9 is connected to XTAL2, I ran this command "avrdude -c avrispmkII -p m328p -P usb -B250" and also -B500 and it still failed to initialize.

Nick:

The reset pin is connected to VCC through a 10k resistor. Would this pose issues?

Also, will I be able to use the existing ICSP header to reprogram it?

Nick Gammon


The reset pin is connected to a 10k resistor connected to VCC. Would this pose issues?


You would need to cut or remove that. As you can imagine.


Also, will I be able to use the existing ICSP header to reprogram it?



No. There are about 20 jumpers you have to run from the programmer to the chip. You would need access to most of the pins on the Atmega328.

Aakash

#47
Nov 18, 2012, 10:19 pm Last Edit: Nov 18, 2012, 10:28 pm by Aakash Reason: 1


The reset pin is connected to a 10k resistor connected to VCC. Would this pose issues?


You would need to cut or remove that. As you can imagine.


Also, will I be able to use the existing ICSP header to reprogram it?


No. There are about 20 jumpers you have to run from the programmer to the chip. You would need access to most of the pins on the Atmega328.


Unfortunately for me, the latter won't be possible. I'll probably just send it out tomorrow and just get the resonator/avr replaced.

For future reference, what fuses should I be using in order to make the atmega328p use the 8MHz resonator?

Nick Gammon

The Uno has 0xFF as the low fuse in the boards.txt file, and it uses a resonator. I would be tempted to leave it at that.

dc42


I set REQUIRED_FREQUENCY  (128000) and connected the logic analyzer to CLKOUT.

When connecting the source to XTAL1 nothing happens to CLKOUT. But when connecting it to XTAL2 the attached screenshot is the output.

EDIT: When D9 is connected to XTAL2, I ran this command "avrdude -c avrispmkII -p m328p -P usb -B250" and it still failed to initialize.


Very strange on several counts:

1. XTAL1 is the oscillator input, XTAL2 is the output. So it should be much easier to get a clock by injecting a signal into XTAL1 than into XTAL2. Are you sure you have nothing apart from the resonator connected to XTAL1? Is the 1.5K resistor still in place, or did you remove it?

2. Your photo suggests that you have a 128KHz signal on CLKOUT. However, you have the CKDIV fuse in place, according to your earlier post. So the CLKOUT frequency should be 1/8 of the input clock frequency, not equal to it.

3. With a 128KHz clock, you should be able to program the device via ICSP, as long as the high fuse byte hasn't been changed to disable ICSP programming.


For future reference, what fuses should I be using in order to make the atmega328p use the 8MHz resonator?


I use http://www.engbedded.com/fusecalc in conjunction with the data sheet to work out the fuse bytes. For an 8MHz resonator I use a low fuse byte of 0xEE.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up