void InitAPP()
{
/* Comment out if using simulator, ICD2, or ICE2000
#asm //Load Factory Calibration Value Into OSCCAL
call 0x3FF
bsf _STATUS,5
movwf _OSCCAL
#endasm
*/
TRISIO=0x00; //Set All I/O's As OUT
VRCON = 0; //参考电压断电
CMCON = 0x07; // configure comparator inputs as digital I/O
ANSEL = 0; // configure A/D inputs as digital I/O
ADON= 0;
GIE = 1;