EmbeddedRelated.com
Forums

Changing clock source in AVR?

Started by Lord Vain April 10, 2006
"Lord Vain" <die@vain.com> wrote in message 
news:443a72cf$0$14523$6d36acad@titian.nntpserver.com...
>I have a Olimex devboard AVR-P28B with a ATMEGA8 on it. I programmed and > used it just fine when it was running on the internal RC oscillator. But I > wanted to try to get it working on the 4Mhz crystal so I set the fuse bits > and wrote those. Problem is, now it doesn't work anymore and I can't get > it > to respond and change the fuse bits. > > How can I program the fuse bits in this situation? I assumed that the > programming interface always runs off the RC-clock otherwise a wrong write > could render the device useless but I think that's not the case.
you set the wrong fuse. You will need a external function generator or something like that to run the pins directly.
On Wed, 12 Apr 2006 10:52:51 +0200, "Lord Vain" <die@vain.com> wrote:

>On the Olimex forum I read that I need to apply a clock (or square wave) to >the XTAL1 input to get the thing going. Otherwise I'll need a HVPP >programmer (such as Atmel's STK500 Starter Kit) to program the device. > >However, I also remember that setting the 'Startup time' to 'fast' and I >wonder if that could be the problem since I can't understand that me setting >the oscillator to external crystal will hang the device that's not logical. > >Why didn't Atmel just let the ISP interface *always* run off the internal >oscillilator, thereby elliminating these problems?
Because this wouldn't rule out other user errors. Example: Some devices allow to switch /reset to a normale port pin, disabling ISP programming. There is even a fuse for disabling ISP completely, which cannot be set by ISP itself, but through user software. It's not Atmel's fault if users buy unsuitable tools just for saving some $$$/&#4294967295;&#4294967295;&#4294967295;/&#4294967295;&#4294967295;&#4294967295;/&#4294967295;&#4294967295;&#4294967295;. Remember: HVPP always work no matter how the fuses are set. Mit freundlichen Gr&#4294967295;&#4294967295;en Frank-Christian Kr&#4294967295;gel