How to configure ATmega16 to run with external crystal oscillator

Discussion in 'Embedded Systems and Microcontrollers' started by sinoj, Jun 4, 2007.

  1. sinoj

    Thread Starter New Member

    Jun 4, 2007
    4
    0
    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.
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    The clock source is selected by setting the appropriate built-in fuse. There is no c-language statements that provide access to these fuses. They are set using the downloading tool.

    What hardware tool do you use for downloading the compiled code into the ATMEGA16?

    hgmjr
     
  3. sinoj

    Thread Starter New Member

    Jun 4, 2007
    4
    0
    Hai,

    I am using PonyProg2000 and the burning HW got from http://www.olimex.com/dev which uses PC serial port and a few descrete components.

    With Regards,
    -sinoj-
     
  4. sinoj

    Thread Starter New Member

    Jun 4, 2007
    4
    0
    Hai,

    I am using PonyProg2000 and the burning HW got from http://www.olimex.com/dev(AVR-PG1B) which uses PC serial port and a few descrete components.

    With Regards,
    -sinoj-
     
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    If you happen to have the ponyprog software then you should have access to a control panel that you can use to set the fuses so that the external crystal can be used.

    Link to short article on fuse setting using the PonyProg programmer and associated pony programming software.

    hgmjr
     
Loading...