Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to configure ATmega16 to run with external crystal osci

Status
Not open for further replies.

sino

Newbie level 3
Joined
Jun 4, 2007
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,314
Hi,

I am an AVR beginner with ATmega16 as the Device. How can an ATmega16 be configured to run with an external crystal oscillator of frequency 7.3728 MHz. Which are the Special Function Registers for this purpose and how they have to be configured? What is the default settings? I am using CodeVisionAVR(2k evaluation) and also IAR Embedded Workbech Kickstart. Kindly help me with example C codes.

with regards
-sino-
 

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,854
Re: How to configure ATmega16 to run with external crystal o

Hai

Selecting External clock should be done with programmer

if you tell me what programmer are you using, then i can help you

It is done by setting clksel bits in fuse bits

Nandhu
 

sino

Newbie level 3
Joined
Jun 4, 2007
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,314
Re: How to configure ATmega16 to run with external crystal o

Hai,

I am using PonyProg2000 and the burning HW(AVR-PG1B. http//www.olimex.com.dev) was designed as per a free download and is using PC serial port.

With Regards
-sino-
 

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,854
Re: How to configure ATmega16 to run with external crystal o

Hi

Run PonyPorgrammer, select the device i.e. AVR => mega16

Press Control+s, You will see a screen with some check boxes

there you have to set cksel3 to cksel0

Please read carefully mega 16 datasheet (page25) before setting

CAUTION : SETTING WRONG BITS MAY LEAD TO CHIP DAMAGE

Take caution in settings

Regards
Nandhu
 

nipun

Member level 2
Joined
Dec 13, 2005
Messages
47
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
1,610
Re: How to configure ATmega16 to run with external crystal o

external clock can be set by setting CKSEL3...0 bits.these bits ve to b manually set using programmer and is done in different ways using the programming software u use.but be carefull not to mess with others bits if u dnt know there functions.read data sheet before setting bits
 

yadegari

Newbie level 6
Joined
Mar 14, 2008
Messages
13
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,283
Activity points
1,343
in codewizard template of codevision software set CKSEL fuse bits
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top