Microchip® Advanced Software Framework

conf_clock.h File Reference

megaAVR STK600 Clock Example

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

Macros

#define F_CPU   8000000UL
 Define the current CPU clock speed based on device settings. More...
 

#define F_CPU   8000000UL

Define the current CPU clock speed based on device settings.

This define is used by e.g. the libc delay functions to calculate the correct amount of cycles to busy wait for a given delay.

Note
This value needs to reflect the device fuse settings, that is it needs to be the correct value for either the current internal RC setting or external clock or crystal settings. Functions that rely on this define will not work correctly with an incorrect value.