Clock Settings, XTAL1 and OSCSEL



Atmel STK500 includes several clock options for the target Atmel AVR. Setting the jumpers XTAL1 and OSCSEL controls the clock selections. OSCSEL determines what signal to route to the XTAL1 pin of the AVR.

When XTAL1 jumper is connected, the STK500 internal clock system is used as main clock to the target AVR. When XTAL1 jumper is not mounted, the internal clock system is disconnected. This allows external clock signals or crystals to be used as target clock source for the AVR.

When the XTAL1 jumper is not mounted, an external clock source or crystal can be connected to the PORTE header. This is shown in the figure on the bottom of the page.

When the XTAL1 jumper is mounted, the STK500 internal clock system is used as main clock to the target AVR. The internal clock system can either use a crystal in the on-board crystal socket, or a software generated clock from the master MCU. The frequency of the software generated clock can be set from 0 to 3.68Mhz. The default value is 3.68Mhz. Section "Oscillator" explains how to set the clock frequency from Atmel Studio.

When using the STK500 software generated clock system as main clock, the target AVR microcontroller fuses should be configured for "external clock" as clock source. This gives shortest start-up time for the microcontroller. For details of start-up time, see the datasheet for the AVR microcontroller. Explanation of clock source fuses configuration, see "Fuse settings". Not all AVR devices have fuses for selection between using a crystal or oscillator as clock source.

The internal clock system is selected with the OSCSEL jumper.

Figure 1. OSCSEL jumper options

Figure 2. Clock settings block diagram

The On-board oscillator will work with ceramic resonators or crystals between 2-20MHz (AT-cut, fundamental, and parallel resonant crystals).

When programming AVR in High-Voltage programming mode, OSCSEL should be mounted on pin 1 and 2 to give the master MCU control of the target clock. This is explained in detail in High Voltage Programming.

Note:

In a real application with only one AVR connected to the crystal, there is no need for an external oscillator circuit. The STK500 has 8 different AVR sockets connected to the same clock system. The long signal lines in this system makes it difficult to drive a crystal with the on-chip oscillators on the AVR. The oscillator on STK500 is designed to operate on all target voltages from 1,8 to 6,0 V.