- Code: Select all
#define _XTAL_FREQ = 20000000;
should probably be
- Code: Select all
#define _XTAL_FREQ 20000000UL
I dont know what the intention of the other define, will it even compile?
#define _XTAL_FREQ = 20000000;
#define _XTAL_FREQ 20000000UL
define _delay_ms();
#define SOMETHING = 20;
unsigned char test = SOMETHING;
unsigned char test = = 20;;
if you read the posting I already included xc.h__delay_ms() is part of the library, you just need to include xc.h to use it.
As the others mentioned thats really basic stuff, get a tutorial/book and follow it.
user2009 wrote:Without reading that configuration, your defines are wrong.
- Code: Select all
#define _XTAL_FREQ = 20000000;
should probably be
- Code: Select all
#define _XTAL_FREQ 20000000UL
There is nothing wrong with the original version.
It is used as part of a calculation inside another compiler defined macro.I dont know what the intention of the other define, will it even compile?
Users browsing this forum: No registered users and 2 guests