Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************/
- /* Files to Include */
- /******************************************************************************/
- #if defined(__XC)
- #include <xc.h> /* XC8 General Include File */
- #elif defined(HI_TECH_C)
- #include <htc.h> //HiTech General Include File
- #endif
- #include <stdint.h> //For uint8_t definition
- #include <stdbool.h> //For true/false definition
- #include "system.h" //System funct/params, like osc/peripheral config
- #include "user.h" //User funct/params, such as InitApp
- #include "globals.h" //vars used across various source files
- /******************************************************************************/
- /* User Global Variable Declaration */
- /******************************************************************************/
- //unsigned short int ANALOG_VAL = 0;
- /******************************************************************************/
- /* Main Program */
- /******************************************************************************/
- void main(void)
- {
- /* Configure the oscillator for the device */
- ConfigureOscillator();
- /* Initialize I/O and Peripherals for application */
- InitApp();
- //assume 0 to 5.5 volts as Vref range
- for(;;)
- {
- GO_DONE = 1; //start conversion
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement