Continue to Site

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.

[SOLVED] How to use internal 8MHZ oscillator in atmega8?

Status
Not open for further replies.

Briez

Member level 5
Member level 5
Joined
Nov 30, 2012
Messages
83
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Visit site
Activity points
1,835
Can anyone tell me how to use an internal RC oscillator as a clock source in atmega8?

I have searched a lot about that and found, there should be configuration bits programmed using ponyprog2000. But when i program configuration bits my program cant be run and when i connect external oscillator between XTAL1 and XTAL2 the program execution speed increases.

Please tell me how to program config bits in proper way....
 

You can find your required information under the "System Clock and Clock Options" section in the datasheet.

Here's a table from there:
5336508200_1361039871.png


The table shows the required fuse bits settings for CLKSEL3..0 that set the oscillator settings. So, you have to select between 0100 and 0001 for CLKSEL3..0 bits. Now, the value you choose - between 0100 and 0001 - determines the frequecy. And here's the table that reveals that:

7307733700_1361040071.png


So for 8MHz, select 0100 which means that CLKSEL3 = 0 (programmed), CLKSEL2 = 1 (unprogrammed), CLKSEL1 = 0 (programmed), CLKSEL0 = 0 (programmed).

Another interesting thing is that the SUT bits select the startup time and here's the table that shows the different options:

8907503000_1361040352.png


Hope this helps.
Tahmid
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top