Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Common API for Clocks Control / Example 2 for XPLAIN Documentation

Introduction

This example shows how to initialize the clock system and output the CPU clock on a dedicated pin.

Main files:

Device Info

All AVR XMEGA devices can be used.

Description of the example

Pin 7 (IOPORT_PIN) on a configurable port (CLKOUT_PORT) is used for output of the CPU clock signal.

The main system clock source and prescalers are defined in conf_clock.h. The port to output the clock signal on is defined in conf_example2.h.

Refer to the Clock Management API documentation for further information on the clock configuration, and the port_driver_group API documentation for further information on the pin configuration.

Compilation Info

This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.

Contact Information

For further information, visit Microchip.