3 * pic18f248.h - 18F248 Device Library Header
5 * This file is part of the GNU PIC Library.
8 * The GNU PIC Library is maintained by,
9 * Vangelis Rokas <vrokas@otenet.gr>
15 #ifndef __PIC18F248_H__
16 #define __PIC18F248_H__
18 extern sfr at 0xf00 RXF0SIDH;
32 extern volatile RXF0SIDHbits_t at 0xf00 RXF0SIDHbits;
34 extern sfr at 0xf01 RXF0SIDL;
48 extern volatile RXF0SIDLbits_t at 0xf01 RXF0SIDLbits;
50 extern sfr at 0xf02 RXF0EIDH;
64 extern volatile RXF0EIDHbits_t at 0xf02 RXF0EIDHbits;
66 extern sfr at 0xf03 RXF0EIDL;
80 extern volatile RXF0EIDLbits_t at 0xf03 RXF0EIDLbits;
82 extern sfr at 0xf04 RXF1SIDH;
96 extern volatile RXF1SIDHbits_t at 0xf04 RXF1SIDHbits;
98 extern sfr at 0xf05 RXF1SIDL;
112 extern volatile RXF1SIDLbits_t at 0xf05 RXF1SIDLbits;
114 extern sfr at 0xf06 RXF1EIDH;
128 extern volatile RXF1EIDHbits_t at 0xf06 RXF1EIDHbits;
130 extern sfr at 0xf07 RXF1EIDL;
144 extern volatile RXF1EIDLbits_t at 0xf07 RXF1EIDLbits;
146 extern sfr at 0xf08 RXF2SIDH;
160 extern volatile RXF2SIDHbits_t at 0xf08 RXF2SIDHbits;
162 extern sfr at 0xf09 RXF2SIDL;
176 extern volatile RXF2SIDLbits_t at 0xf09 RXF2SIDLbits;
178 extern sfr at 0xf0a RXF2EIDH;
192 extern volatile RXF2EIDHbits_t at 0xf0a RXF2EIDHbits;
194 extern sfr at 0xf0b RXF2EIDL;
208 extern volatile RXF2EIDLbits_t at 0xf0b RXF2EIDLbits;
210 extern sfr at 0xf0c RXF3SIDH;
224 extern volatile RXF3SIDHbits_t at 0xf0c RXF3SIDHbits;
226 extern sfr at 0xf0d RXF3SIDL;
240 extern volatile RXF3SIDLbits_t at 0xf0d RXF3SIDLbits;
242 extern sfr at 0xf0e RXF3EIDH;
256 extern volatile RXF3EIDHbits_t at 0xf0e RXF3EIDHbits;
258 extern sfr at 0xf0f RXF3EIDL;
272 extern volatile RXF3EIDLbits_t at 0xf0f RXF3EIDLbits;
274 extern sfr at 0xf10 RXF4SIDH;
288 extern volatile RXF4SIDHbits_t at 0xf10 RXF4SIDHbits;
290 extern sfr at 0xf11 RXF4SIDL;
304 extern volatile RXF4SIDLbits_t at 0xf11 RXF4SIDLbits;
306 extern sfr at 0xf12 RXF4EIDH;
320 extern volatile RXF4EIDHbits_t at 0xf12 RXF4EIDHbits;
322 extern sfr at 0xf13 RXF4EIDL;
336 extern volatile RXF4EIDLbits_t at 0xf13 RXF4EIDLbits;
338 extern sfr at 0xf14 RXF5SIDH;
352 extern volatile RXF5SIDHbits_t at 0xf14 RXF5SIDHbits;
354 extern sfr at 0xf15 RXF5SIDL;
368 extern volatile RXF5SIDLbits_t at 0xf15 RXF5SIDLbits;
370 extern sfr at 0xf16 RXF5EIDH;
384 extern volatile RXF5EIDHbits_t at 0xf16 RXF5EIDHbits;
386 extern sfr at 0xf17 RXF5EIDL;
400 extern volatile RXF5EIDLbits_t at 0xf17 RXF5EIDLbits;
402 extern sfr at 0xf18 RXM0SIDH;
416 extern volatile RXM0SIDHbits_t at 0xf18 RXM0SIDHbits;
418 extern sfr at 0xf19 RXM0SIDL;
432 extern volatile RXM0SIDLbits_t at 0xf19 RXM0SIDLbits;
434 extern sfr at 0xf1a RXM0EIDH;
448 extern volatile RXM0EIDHbits_t at 0xf1a RXM0EIDHbits;
450 extern sfr at 0xf1b RXM0EIDL;
464 extern volatile RXM0EIDLbits_t at 0xf1b RXM0EIDLbits;
466 extern sfr at 0xf1c RXM1SIDH;
480 extern volatile RXM1SIDHbits_t at 0xf1c RXM1SIDHbits;
482 extern sfr at 0xf1d RXM1SIDL;
496 extern volatile RXM1SIDLbits_t at 0xf1d RXM1SIDLbits;
498 extern sfr at 0xf1e RXM1EIDH;
512 extern volatile RXM1EIDHbits_t at 0xf1e RXM1EIDHbits;
514 extern sfr at 0xf1f RXM1EIDL;
528 extern volatile RXM1EIDLbits_t at 0xf1f RXM1EIDLbits;
530 extern sfr at 0xf20 TXB2CON;
544 extern volatile TXB2CONbits_t at 0xf20 TXB2CONbits;
546 extern sfr at 0xf21 TXB2SIDH;
560 extern volatile TXB2SIDHbits_t at 0xf21 TXB2SIDHbits;
562 extern sfr at 0xf22 TXB2SIDL;
576 extern volatile TXB2SIDLbits_t at 0xf22 TXB2SIDLbits;
578 extern sfr at 0xf23 TXB2EIDH;
592 extern volatile TXB2EIDHbits_t at 0xf23 TXB2EIDHbits;
594 extern sfr at 0xf24 TXB2EIDL;
608 extern volatile TXB2EIDLbits_t at 0xf24 TXB2EIDLbits;
610 extern sfr at 0xf25 TXB2DLC;
619 unsigned TXB2TXRTR:1;
624 extern volatile TXB2DLCbits_t at 0xf25 TXB2DLCbits;
626 extern sfr at 0xf26 TXB2D0;
640 extern volatile TXB2D0bits_t at 0xf26 TXB2D0bits;
642 extern sfr at 0xf27 TXB2D1;
656 extern volatile TXB2D1bits_t at 0xf27 TXB2D1bits;
658 extern sfr at 0xf28 TXB2D2;
672 extern volatile TXB2D2bits_t at 0xf28 TXB2D2bits;
674 extern sfr at 0xf29 TXB2D3;
688 extern volatile TXB2D3bits_t at 0xf29 TXB2D3bits;
690 extern sfr at 0xf2a TXB2D4;
704 extern volatile TXB2D4bits_t at 0xf2a TXB2D4bits;
706 extern sfr at 0xf2b TXB2D5;
720 extern volatile TXB2D5bits_t at 0xf2b TXB2D5bits;
722 extern sfr at 0xf2c TXB2D6;
736 extern volatile TXB2D6bits_t at 0xf2c TXB2D6bits;
738 extern sfr at 0xf2d TXB2D7;
752 extern volatile TXB2D7bits_t at 0xf2d TXB2D7bits;
754 extern sfr at 0xf2e CANSTATRO4;
768 extern volatile CANSTATRO4bits_t at 0xf2e CANSTATRO4bits;
770 extern sfr at 0xf30 TXB1CON;
784 extern volatile TXB1CONbits_t at 0xf30 TXB1CONbits;
786 extern sfr at 0xf31 TXB1SIDH;
800 extern volatile TXB1SIDHbits_t at 0xf31 TXB1SIDHbits;
802 extern sfr at 0xf32 TXB1SIDL;
816 extern volatile TXB1SIDLbits_t at 0xf32 TXB1SIDLbits;
818 extern sfr at 0xf33 TXB1EIDH;
832 extern volatile TXB1EIDHbits_t at 0xf33 TXB1EIDHbits;
834 extern sfr at 0xf34 TXB1EIDL;
848 extern volatile TXB1EIDLbits_t at 0xf34 TXB1EIDLbits;
850 extern sfr at 0xf35 TXB1DLC;
864 extern volatile TXB1DLCbits_t at 0xf35 TXB1DLCbits;
866 extern sfr at 0xf36 TXB1D0;
880 extern volatile TXB1D0bits_t at 0xf36 TXB1D0bits;
882 extern sfr at 0xf37 TXB1D1;
896 extern volatile TXB1D1bits_t at 0xf37 TXB1D1bits;
898 extern sfr at 0xf38 TXB1D2;
912 extern volatile TXB1D2bits_t at 0xf38 TXB1D2bits;
914 extern sfr at 0xf39 TXB1D3;
928 extern volatile TXB1D3bits_t at 0xf39 TXB1D3bits;
930 extern sfr at 0xf3a TXB1D4;
944 extern volatile TXB1D4bits_t at 0xf3a TXB1D4bits;
946 extern sfr at 0xf3b TXB1D5;
960 extern volatile TXB1D5bits_t at 0xf3b TXB1D5bits;
962 extern sfr at 0xf3c TXB1D6;
976 extern volatile TXB1D6bits_t at 0xf3c TXB1D6bits;
978 extern sfr at 0xf3d TXB1D7;
992 extern volatile TXB1D7bits_t at 0xf3d TXB1D7bits;
994 extern sfr at 0xf3e CANSTATRO3;
1008 extern volatile CANSTATRO3bits_t at 0xf3e CANSTATRO3bits;
1010 extern sfr at 0xf40 TXB0CON;
1024 extern volatile TXB0CONbits_t at 0xf40 TXB0CONbits;
1026 extern sfr at 0xf41 TXB0SIDH;
1040 extern volatile TXB0SIDHbits_t at 0xf41 TXB0SIDHbits;
1042 extern sfr at 0xf42 TXB0SIDL;
1056 extern volatile TXB0SIDLbits_t at 0xf42 TXB0SIDLbits;
1058 extern sfr at 0xf43 TXB0EIDH;
1072 extern volatile TXB0EIDHbits_t at 0xf43 TXB0EIDHbits;
1074 extern sfr at 0xf44 TXB0EIDL;
1088 extern volatile TXB0EIDLbits_t at 0xf44 TXB0EIDLbits;
1090 extern sfr at 0xf45 TXB0DLC;
1104 extern volatile TXB0DLCbits_t at 0xf45 TXB0DLCbits;
1106 extern sfr at 0xf46 TXB0D0;
1120 extern volatile TXB0D0bits_t at 0xf46 TXB0D0bits;
1122 extern sfr at 0xf47 TXB0D1;
1136 extern volatile TXB0D1bits_t at 0xf47 TXB0D1bits;
1138 extern sfr at 0xf48 TXB0D2;
1152 extern volatile TXB0D2bits_t at 0xf48 TXB0D2bits;
1154 extern sfr at 0xf49 TXB0D3;
1163 unsigned TXBD0D36:1;
1168 extern volatile TXB0D3bits_t at 0xf49 TXB0D3bits;
1170 extern sfr at 0xf4a TXB0D4;
1184 extern volatile TXB0D4bits_t at 0xf4a TXB0D4bits;
1186 extern sfr at 0xf4b TXB0D5;
1200 extern volatile TXB0D5bits_t at 0xf4b TXB0D5bits;
1202 extern sfr at 0xf4c TXB0D6;
1216 extern volatile TXB0D6bits_t at 0xf4c TXB0D6bits;
1218 extern sfr at 0xf4d TXB0D7;
1232 extern volatile TXB0D7bits_t at 0xf4d TXB0D7bits;
1234 extern sfr at 0xf4e CANSTATRO2;
1248 extern volatile CANSTATRO2bits_t at 0xf4e CANSTATRO2bits;
1250 extern sfr at 0xf50 RXB1CON;
1264 extern volatile RXB1CONbits_t at 0xf50 RXB1CONbits;
1266 extern sfr at 0xf51 RXB1SIDH;
1280 extern volatile RXB1SIDHbits_t at 0xf51 RXB1SIDHbits;
1282 extern sfr at 0xf52 RXB1SIDL;
1296 extern volatile RXB1SIDLbits_t at 0xf52 RXB1SIDLbits;
1298 extern sfr at 0xf53 RXB1EIDH;
1312 extern volatile RXB1EIDHbits_t at 0xf53 RXB1EIDHbits;
1314 extern sfr at 0xf54 RXB1EIDL;
1328 extern volatile RXB1EIDLbits_t at 0xf54 RXB1EIDLbits;
1330 extern sfr at 0xf55 RXB1DLC;
1344 extern volatile RXB1DLCbits_t at 0xf55 RXB1DLCbits;
1346 extern sfr at 0xf56 RXB1D0;
1360 extern volatile RXB1D0bits_t at 0xf56 RXB1D0bits;
1362 extern sfr at 0xf57 RXB1D1;
1376 extern volatile RXB1D1bits_t at 0xf57 RXB1D1bits;
1378 extern sfr at 0xf58 RXB1D2;
1392 extern volatile RXB1D2bits_t at 0xf58 RXB1D2bits;
1394 extern sfr at 0xf59 RXB1D3;
1408 extern volatile RXB1D3bits_t at 0xf59 RXB1D3bits;
1410 extern sfr at 0xf5a RXB1D4;
1424 extern volatile RXB1D4bits_t at 0xf5a RXB1D4bits;
1426 extern sfr at 0xf5b RXB1D5;
1440 extern volatile RXB1D5bits_t at 0xf5b RXB1D5bits;
1442 extern sfr at 0xf5c RXB1D6;
1456 extern volatile RXB1D6bits_t at 0xf5c RXB1D6bits;
1458 extern sfr at 0xf5d RXB1D7;
1472 extern volatile RXB1D7bits_t at 0xf5d RXB1D7bits;
1474 extern sfr at 0xf5e CANSTATRO1;
1488 extern volatile CANSTATRO1bits_t at 0xf5e CANSTATRO1bits;
1490 extern sfr at 0xf60 RXB0CON;
1494 unsigned RXB0DBEN_R:1;
1495 unsigned RXB0DBEN:1;
1504 extern volatile RXB0CONbits_t at 0xf60 RXB0CONbits;
1506 extern sfr at 0xf61 RXB0SIDH;
1520 extern volatile RXB0SIDHbits_t at 0xf61 RXB0SIDHbits;
1522 extern sfr at 0xf62 RXB0SIDL;
1536 extern volatile RXB0SIDLbits_t at 0xf62 RXB0SIDLbits;
1538 extern sfr at 0xf63 RXB0EIDH;
1552 extern volatile RXB0EIDHbits_t at 0xf63 RXB0EIDHbits;
1554 extern sfr at 0xf64 RXB0EIDL;
1568 extern volatile RXB0EIDLbits_t at 0xf64 RXB0EIDLbits;
1570 extern sfr at 0xf65 RXB0DLC;
1584 extern volatile RXB0DLCbits_t at 0xf65 RXB0DLCbits;
1586 extern sfr at 0xf66 RXB0D0;
1587 extern sfr at 0xf67 RXB0D1;
1588 extern sfr at 0xf68 RXB0D2;
1589 extern sfr at 0xf69 RXB0D3;
1590 extern sfr at 0xf6a RXB0D4;
1591 extern sfr at 0xf6b RXB0D5;
1592 extern sfr at 0xf6c RXB0D6;
1593 extern sfr at 0xf6d RXB0D7;
1594 extern sfr at 0xf6e CANSTAT;
1608 extern volatile CANSTATbits_t at 0xf6e CANSTATbits;
1610 extern sfr at 0xf6f CANCON;
1624 extern volatile CANCONbits_t at 0xf6f CANCONbits;
1626 extern sfr at 0xf70 BRGCON1;
1640 extern volatile BRGCON1bits_t at 0xf70 BRGCON1bits;
1642 extern sfr at 0xf71 BRGCON2;
1652 unsigned SEG2PHTS:1;
1656 extern volatile BRGCON2bits_t at 0xf71 BRGCON2bits;
1658 extern sfr at 0xf72 BRGCON3;
1672 extern volatile BRGCON3bits_t at 0xf72 BRGCON3bits;
1674 extern sfr at 0xf73 CIOCON;
1688 extern volatile CIOCONbits_t at 0xf73 CIOCONbits;
1690 extern sfr at 0xf74 COMSTAT;
1699 unsigned RXB1OVFL:1;
1700 unsigned RXB0OVFL:1;
1704 extern volatile COMSTATbits_t at 0xf74 COMSTATbits;
1706 extern sfr at 0xf75 RXERRCNT;
1720 extern volatile RXERRCNTbits_t at 0xf75 RXERRCNTbits;
1722 extern sfr at 0xf76 TXERRCNT;
1736 extern volatile TXERRCNTbits_t at 0xf76 TXERRCNTbits;
1738 extern sfr at 0xf80 PORTA;
1785 extern volatile PORTAbits_t at 0xf80 PORTAbits;
1787 extern sfr at 0xf81 PORTB;
1812 extern volatile PORTBbits_t at 0xf81 PORTBbits;
1814 extern sfr at 0xf82 PORTC;
1850 extern volatile PORTCbits_t at 0xf82 PORTCbits;
1852 extern sfr at 0xf89 LATA;
1866 extern volatile LATAbits_t at 0xf89 LATAbits;
1868 extern sfr at 0xf8a LATB;
1882 extern volatile LATBbits_t at 0xf8a LATBbits;
1884 extern sfr at 0xf8b LATC;
1898 extern volatile LATCbits_t at 0xf8b LATCbits;
1900 extern sfr at 0xf92 TRISA;
1914 extern volatile TRISAbits_t at 0xf92 TRISAbits;
1916 extern sfr at 0xf93 TRISB;
1930 extern volatile TRISBbits_t at 0xf93 TRISBbits;
1932 extern sfr at 0xf94 TRISC;
1946 extern volatile TRISCbits_t at 0xf94 TRISCbits;
1948 extern sfr at 0xf9d PIE1;
1962 extern volatile PIE1bits_t at 0xf9d PIE1bits;
1964 extern sfr at 0xf9e PIR1;
1978 extern volatile PIR1bits_t at 0xf9e PIR1bits;
1980 extern sfr at 0xf9f IPR1;
1994 extern volatile IPR1bits_t at 0xf9f IPR1bits;
1996 extern sfr at 0xfa0 PIE2;
2010 extern volatile PIE2bits_t at 0xfa0 PIE2bits;
2012 extern sfr at 0xfa1 PIR2;
2026 extern volatile PIR2bits_t at 0xfa1 PIR2bits;
2028 extern sfr at 0xfa2 IPR2;
2042 extern volatile IPR2bits_t at 0xfa2 IPR2bits;
2044 extern sfr at 0xfa3 PIE3;
2058 extern volatile PIE3bits_t at 0xfa3 PIE3bits;
2060 extern sfr at 0xfa4 PIR3;
2074 extern volatile PIR3bits_t at 0xfa4 PIR3bits;
2076 extern sfr at 0xfa5 IPR3;
2090 extern volatile IPR3bits_t at 0xfa5 IPR3bits;
2092 extern sfr at 0xfa6 EECON1;
2106 extern volatile EECON1bits_t at 0xfa6 EECON1bits;
2108 extern sfr at 0xfa7 EECON2;
2109 extern sfr at 0xfa8 EEDATA;
2110 extern sfr at 0xfa9 EEADR;
2111 extern sfr at 0xfab RCSTA;
2125 extern volatile RCSTAbits_t at 0xfab RCSTAbits;
2127 extern sfr at 0xfac TXSTA;
2141 extern volatile TXSTAbits_t at 0xfac TXSTAbits;
2143 extern sfr at 0xfad TXREG;
2144 extern sfr at 0xfae RCREG;
2145 extern sfr at 0xfaf SPBRG;
2146 extern sfr at 0xfb1 T3CON;
2160 extern volatile T3CONbits_t at 0xfb1 T3CONbits;
2162 extern sfr at 0xfb2 TMR3L;
2163 extern sfr at 0xfb3 TMR3H;
2164 extern sfr at 0xfbd CCP1CON;
2178 extern volatile CCP1CONbits_t at 0xfbd CCP1CONbits;
2180 extern sfr at 0xfbe CCPR1L;
2181 extern sfr at 0xfbf CCPR1H;
2182 extern sfr at 0xfc1 ADCON1;
2196 extern volatile ADCON1bits_t at 0xfc1 ADCON1bits;
2198 extern sfr at 0xfc2 ADCON0;
2212 extern volatile ADCON0bits_t at 0xfc2 ADCON0bits;
2214 extern sfr at 0xfc3 ADRESL;
2215 extern sfr at 0xfc4 ADRESH;
2216 extern sfr at 0xfc5 SSPCON2;
2230 extern volatile SSPCON2bits_t at 0xfc5 SSPCON2bits;
2232 extern sfr at 0xfc6 SSPCON1;
2246 extern volatile SSPCON1bits_t at 0xfc6 SSPCON1bits;
2248 extern sfr at 0xfc7 SSPSTAT;
2262 extern volatile SSPSTATbits_t at 0xfc7 SSPSTATbits;
2264 extern sfr at 0xfc8 SSPADD;
2265 extern sfr at 0xfc9 SSPBUF;
2266 extern sfr at 0xfca T2CON;
2280 extern volatile T2CONbits_t at 0xfca T2CONbits;
2282 extern sfr at 0xfcb PR2;
2283 extern sfr at 0xfcc TMR2;
2284 extern sfr at 0xfcd T1CON;
2289 unsigned NOT_T1SYNC:1;
2298 extern volatile T1CONbits_t at 0xfcd T1CONbits;
2300 extern sfr at 0xfce TMR1L;
2301 extern sfr at 0xfcf TMR1H;
2302 extern sfr at 0xfd0 RCON;
2316 extern volatile RCONbits_t at 0xfd0 RCONbits;
2318 extern sfr at 0xfd1 WDTCON;
2343 extern volatile WDTCONbits_t at 0xfd1 WDTCONbits;
2345 extern sfr at 0xfd2 LVDCON;
2370 extern volatile LVDCONbits_t at 0xfd2 LVDCONbits;
2372 extern sfr at 0xfd3 OSCCON;
2386 extern volatile OSCCONbits_t at 0xfd3 OSCCONbits;
2388 extern sfr at 0xfd5 T0CON;
2389 extern sfr at 0xfd6 TMR0L;
2390 extern sfr at 0xfd7 TMR0H;
2391 extern sfr at 0xfd8 STATUS;
2405 extern volatile STATUSbits_t at 0xfd8 STATUSbits;
2407 extern sfr at 0xfd9 FSR2L;
2408 extern sfr at 0xfda FSR2H;
2409 extern sfr at 0xfdb PLUSW2;
2410 extern sfr at 0xfdc PREINC2;
2411 extern sfr at 0xfdd POSTDEC2;
2412 extern sfr at 0xfde POSTINC2;
2413 extern sfr at 0xfdf INDF2;
2414 extern sfr at 0xfe0 BSR;
2415 extern sfr at 0xfe1 FSR1L;
2416 extern sfr at 0xfe2 FSR1H;
2417 extern sfr at 0xfe3 PLUSW1;
2418 extern sfr at 0xfe4 PREINC1;
2419 extern sfr at 0xfe5 POSTDEC1;
2420 extern sfr at 0xfe6 POSTINC1;
2421 extern sfr at 0xfe7 INDF1;
2422 extern sfr at 0xfe8 WREG;
2423 extern sfr at 0xfe9 FSR0L;
2424 extern sfr at 0xfea FSR0H;
2425 extern sfr at 0xfeb PLUSW0;
2426 extern sfr at 0xfec PREINC0;
2427 extern sfr at 0xfed POSTDEC0;
2428 extern sfr at 0xfee POSTINC0;
2429 extern sfr at 0xfef INDF0;
2430 extern sfr at 0xff0 INTCON3;
2455 extern volatile INTCON3bits_t at 0xff0 INTCON3bits;
2457 extern sfr at 0xff1 INTCON2;
2471 extern volatile INTCON2bits_t at 0xff1 INTCON2bits;
2473 extern sfr at 0xff2 INTCON;
2487 extern volatile INTCONbits_t at 0xff2 INTCONbits;
2489 extern sfr at 0xff3 PRODL;
2490 extern sfr at 0xff4 PRODH;
2491 extern sfr at 0xff5 TABLAT;
2492 extern sfr at 0xff6 TBLPTRL;
2493 extern sfr at 0xff7 TBLPTRH;
2494 extern sfr at 0xff8 TBLPTRU;
2495 extern sfr at 0xff9 PCL;
2496 extern sfr at 0xffa PCLATH;
2497 extern sfr at 0xffb PCLATU;
2498 extern sfr at 0xffc STKPTR;
2512 extern volatile STKPTRbits_t at 0xffc STKPTRbits;
2514 extern sfr at 0xffd TOSL;
2515 extern sfr at 0xffe TOSH;
2516 extern sfr at 0xfff TOSU;