Advertisement
Guest User

system.c

a guest
Mar 11th, 2013
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.06 KB | None | 0 0
  1. /******************************************************************************/
  2. /*Files to Include                                                            */
  3. /******************************************************************************/
  4.  
  5. #if defined(__XC)
  6.     #include <xc.h>         /* XC8 General Include File */
  7. #elif defined(HI_TECH_C)
  8.     #include <htc.h>        /* HiTech General Include File */
  9. #endif
  10.  
  11. #include <stdint.h>        /* For uint8_t definition */
  12. #include <stdbool.h>       /* For true/false definition */
  13.  
  14. #include "system.h"
  15.  
  16. #pragma config FOSC = INTOSCIO      //internal ocsillator
  17. #pragma config WDTE = OFF           //turn off WDT
  18. #pragma config LVP = OFF            //turn off LVP
  19. #pragma config BOREN = ON           //enable brownout reset
  20. #pragma config MCLRE = ON          //tie MCLR to Vdd, free up
  21. #pragma config CPD = ON             //eprom protect
  22.  
  23. /* Refer to the device datasheet for information about available
  24. oscillator configurations. */
  25. void ConfigureOscillator(void)
  26. {
  27.     OSCCON = 0b01110100;  //8mhz stable
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement