Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] Setting ATMega16 clock options

2009-09-03 by Tim Mitchell

----Original Message----
From: AVR-Chat@yahoogroups.com
[mailto:AVR-Chat@yahoogroups.com] On Behalf Of Chuck
Hackett Sent: 03 September 2009 06:49 To: AVR-Chat
Subject: [AVR-Chat] Setting ATMega16 clock options

> I have an ATMega16 mounted on a Olimex AVR-P40-8535
> prototyping board (Schematic here:
> http://olimex.com/dev/images/avr-p40-8535-sch.gif).  
> 
> My problem is that everything works fine when the clock
> fuses are set for internal 1 MHz (chip default) but, when
> I attempt to set the fuses for operation with the
> board-mounted 8 MHz crystal the chip acts like it does
> not have any clock running.    
> 
> Fuse settings (as shown by AVR Studio on last try):
> 
> OCDEN: chk
> JTAGEN: chk
> SPIEN: chk
> EESAVE: no chk
> BOOTSZ: 512 words
> BOOTRST: no chk
> CKOPT: chk
> BODLEVEL: 2.7v
> BODEN: no chk
> SUT_CKSEL: Ext. Crystal/Resonator High Freq.; Start-up
> time: 16k CK + 64 ms 
> 
> I have also tried another crystal from a second AVR-P40
> board with no luck. 


Strange - the AVR crystal circuit is fairly resilient in my experience.
Your fuse settings look fine.
The only problem I have had is incorrect setting of CKOPT - if CKOPT is
not programmed then the crystal startup becomes uncertain, sometimes it
works and sometimes not.

Have you tried programming your second board with the same fuse settings
to see if that one works? Could be a problem with the Mega16 or the
board?

-- 
Tim Mitchell
tim@sabretechnology.co.uk http://www.sabretechnology.co.uk
Sabre Technology (Hull) Ltd, 3a Newlands Science Park, Hull
HU6 7TQ Registered in England and Wales no.3131504
t:01482 801003 f:01482 801078

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.