1 /******************************************************************************/
2 /* System Level #define Macros */
3 /******************************************************************************/
5 /* TODO Define system operating frequency */
7 /* Microcontroller MIPs (FCY) */
9 #define _XTAL_FREQ 4000000L
10 #define SYS_FREQ 4000000L
11 #define FCY SYS_FREQ/4
13 #include <pic12f1840.h>
15 /******************************************************************************/
16 /* System Function Prototypes */
17 /******************************************************************************/
20 #if _XTAL_FREQ == 4000000L
21 #define DelayUs(x) _delay(x)
23 #define DelayUs(x) __delay_us(x)
24 #warning "This is slow"
27 /* Custom oscillator configuration funtions, reset source evaluation
28 functions, and other non-peripheral microcontroller initialization functions
31 void ConfigureOscillator(void); /* Handles clock switching/osc initialization */