Advertisement
Guest User

main.c

a guest
Mar 11th, 2013
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.54 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"         //System funct/params, like osc/peripheral config
  15. #include "user.h"           //User funct/params, such as InitApp
  16. #include "globals.h"        //vars used across various source files
  17.  
  18. /******************************************************************************/
  19. /* User Global Variable Declaration                                           */
  20. /******************************************************************************/
  21.  
  22. //unsigned short int ANALOG_VAL = 0;
  23.  
  24. /******************************************************************************/
  25. /* Main Program                                                               */
  26. /******************************************************************************/
  27. void main(void)
  28. {
  29.     /* Configure the oscillator for the device */
  30.     ConfigureOscillator();
  31.  
  32.     /* Initialize I/O and Peripherals for application */
  33.     InitApp();
  34.  
  35.     //assume 0 to 5.5 volts as Vref range
  36.     for(;;)
  37.     {
  38.         GO_DONE = 1; //start conversion
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement