Go Down

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

Coding Badly

#40
Nov 18, 2012, 09:00 pm Last Edit: Nov 18, 2012, 09:04 pm by Coding Badly Reason: 1
But how could a 1MHz signal on XTAL1 give rise to a signal of about 12Hz on CLKOUT ?


I suspect witchcraft.  Or possibly a gypsy curse.

dc42


Note: I tried removing the void loop() and just putting on() at the end of setup() and that resulted in no clock signal being output on CKOUT. There was a clock signal being output on the source Arduino, however.


That should have been exactly the right thing to do. Try doing it again, but also reduce REQUIRED_FREQUENCY in case 1MHz is a little high, given that you have the resonator still connected and a 1.5K resistor in series with the clock signal. As the Arduino you are using to generate the clock is also 3.3V, I think you can also safely try it without the 1.5K series resistor. What you are looking for is a signal on CLKOUT at a reasonable frequency.
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.

Aakash

#42
Nov 18, 2012, 09:12 pm Last Edit: Nov 18, 2012, 09:15 pm by Aakash Reason: 1

That should have been exactly the right thing to do. Try doing it again, but also reduce REQUIRED_FREQUENCY in case 1MHz is a little high, given that you have the resonator still connected and a 1.5K resistor in series with the clock signal. As the Arduino you are using to generate the clock is also 3.3V, I think you can also safely try it without the 1.5K series resistor. What you are looking for is a signal on CLKOUT at a reasonable frequency.


So what you're saying is that I should lower the REQUIRED_FREQUENCY to a number until CLKOUT starts showing a steady clock? Right now, at 1MHz, the analyzer doesn't detect anything on CLKOUT at that speed.

dc42

Yes, try that and/or try removing the 1.5K resistor. I'm guessing that turning the clock on/off in loop() is what is actually causing CLKOUT to toggle. Maybe the clock signal is not strong enough to drive XTAL1 @ 1MHz given that 1.5K is on the high side (I suggested 100 ohms originally) and the resonator is still connected. At a lower frequency, the resonator impedance should be higher, judging from the impedance plot in the datasheet, which will result in a stronger signal on XTAL1.
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.

Nick Gammon

Do you have a signal generator? Try pushing through some low frequency like 128 KHz until CLKOUT mirrors it. Or just modify the sketch that outputs a clock to get the same result.

Can you isolate /RESET from the rest of the circuit? Or, put it another way, is /RESET connected to any other devices?

If safe, you should be able to use an AVR Dragon (around $50) in high-voltage programming mode to recover, if the chip isn't actually damaged. High-voltage mode requires around 12V on the /RESET pin, which is why it needs to be isolated from other things (chips).

Go Up