/* * Header file for the Microchip PIC 16c71 chip */ static unsigned char RTCC @ 0x01; static unsigned char TMR0 @ 0x01; static unsigned char PCL @ 0x02; static unsigned char STATUS @ 0x03; static unsigned char FSR @ 0x04; static unsigned char PORTA @ 0x05; static unsigned char PORTB @ 0x06; static unsigned char ADCON0 @ 0x08; static unsigned char ADRES @ 0x09; static unsigned char PCLATH @ 0x0A; static unsigned char INTCON @ 0x0B; static unsigned char bank1 OPTION @ 0x81; static unsigned char bank1 TRISA @ 0x85; static unsigned char bank1 TRISB @ 0x86; static unsigned char bank1 ADCON1 @ 0x88; /* INTCON bits */ static bit GIE @ (unsigned)&INTCON*8+7; static bit ADIE @ (unsigned)&INTCON*8+6; static bit T0IE @ (unsigned)&INTCON*8+5; static bit INTE @ (unsigned)&INTCON*8+4; static bit RBIE @ (unsigned)&INTCON*8+3; static bit T0IF @ (unsigned)&INTCON*8+2; static bit INTF @ (unsigned)&INTCON*8+1; static bit RBIF @ (unsigned)&INTCON*8+0; /* ADCON0 bits */ static bit ADCS1 @ (unsigned)&ADCON0*8+7; static bit ADCS0 @ (unsigned)&ADCON0*8+6; static bit CHS1 @ (unsigned)&ADCON0*8+4; static bit CHS0 @ (unsigned)&ADCON0*8+3; static bit ADGO @ (unsigned)&ADCON0*8+2; static bit ADIF @ (unsigned)&ADCON0*8+1; static bit ADON @ (unsigned)&ADCON0*8+0; #define CONFIG_ADDR 0x2007 #define FOSC0 0x01 #define FOSC1 0x02 #define WDTE 0x04 #define PWRTE 0x08 #define CP0 0x10