AVR Notes 2: Define F_CPU

Publisher:快乐微笑Latest update time:2015-09-16 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1.warning: #warning "F_CPU not defined for "

2.warning: "F_CPU" redefined

3.c:/winavr-20100110/lib/gcc/../../avr/include/util/delay.h:86:1: warning: this is the location of the previous definition

The solution to the above three errors is to #define F_CPU 1000000

Put it before the #include  statement, as follows:

#define F_CPU 1000000
#include
#include

Reference address:AVR Notes 2: Define F_CPU

Previous article:AVR Notes 3: Detailed explanation and application examples of AVRmega MCU fuse settings
Next article:AVR Note 1: AVR studio cannot compile

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号