3 * pic18f6520.c - PIC18F6520 Device Library Source
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 #include <pic18f6520.h>
17 __sfr __at (0xf6b) RCSTA2;
18 volatile __RCSTA2bits_t __at (0xf6b) RCSTA2bits;
20 __sfr __at (0xf6c) TXSTA2;
21 volatile __TXSTA2bits_t __at (0xf6c) TXSTA2bits;
23 __sfr __at (0xf6d) TXREG2;
24 __sfr __at (0xf6e) RCREG2;
25 __sfr __at (0xf6f) SPBRG2;
26 __sfr __at (0xf70) CCP5CON;
27 volatile __CCP5CONbits_t __at (0xf70) CCP5CONbits;
29 __sfr __at (0xf71) CCPR5L;
30 __sfr __at (0xf72) CCPR5H;
31 __sfr __at (0xf73) CCP4CON;
32 volatile __CCP4CONbits_t __at (0xf73) CCP4CONbits;
34 __sfr __at (0xf74) CCPR4L;
35 __sfr __at (0xf75) CCPR4H;
36 __sfr __at (0xf76) T4CON;
37 volatile __T4CONbits_t __at (0xf76) T4CONbits;
39 __sfr __at (0xf77) PR4;
40 __sfr __at (0xf78) TMR4;
41 __sfr __at (0xf80) PORTA;
42 volatile __PORTAbits_t __at (0xf80) PORTAbits;
44 __sfr __at (0xf81) PORTB;
45 volatile __PORTBbits_t __at (0xf81) PORTBbits;
47 __sfr __at (0xf82) PORTC;
48 volatile __PORTCbits_t __at (0xf82) PORTCbits;
50 __sfr __at (0xf83) PORTD;
51 volatile __PORTDbits_t __at (0xf83) PORTDbits;
53 __sfr __at (0xf84) PORTE;
54 volatile __PORTEbits_t __at (0xf84) PORTEbits;
56 __sfr __at (0xf85) PORTF;
57 volatile __PORTFbits_t __at (0xf85) PORTFbits;
59 __sfr __at (0xf86) PORTG;
60 volatile __PORTGbits_t __at (0xf86) PORTGbits;
62 __sfr __at (0xf89) LATA;
63 volatile __LATAbits_t __at (0xf89) LATAbits;
65 __sfr __at (0xf8a) LATB;
66 volatile __LATBbits_t __at (0xf8a) LATBbits;
68 __sfr __at (0xf8b) LATC;
69 volatile __LATCbits_t __at (0xf8b) LATCbits;
71 __sfr __at (0xf8c) LATD;
72 volatile __LATDbits_t __at (0xf8c) LATDbits;
74 __sfr __at (0xf8d) LATE;
75 volatile __LATEbits_t __at (0xf8d) LATEbits;
77 __sfr __at (0xf8e) LATF;
78 volatile __LATFbits_t __at (0xf8e) LATFbits;
80 __sfr __at (0xf8f) LATG;
81 volatile __LATGbits_t __at (0xf8f) LATGbits;
83 __sfr __at (0xf92) TRISA;
84 volatile __TRISAbits_t __at (0xf92) TRISAbits;
86 __sfr __at (0xf93) TRISB;
87 volatile __TRISBbits_t __at (0xf93) TRISBbits;
89 __sfr __at (0xf94) TRISC;
90 volatile __TRISCbits_t __at (0xf94) TRISCbits;
92 __sfr __at (0xf95) TRISD;
93 volatile __TRISDbits_t __at (0xf95) TRISDbits;
95 __sfr __at (0xf96) TRISE;
96 volatile __TRISEbits_t __at (0xf96) TRISEbits;
98 __sfr __at (0xf97) TRISF;
99 volatile __TRISFbits_t __at (0xf97) TRISFbits;
101 __sfr __at (0xf98) TRISG;
102 volatile __TRISGbits_t __at (0xf98) TRISGbits;
104 __sfr __at (0xf9c) MEMCON;
105 volatile __MEMCONbits_t __at (0xf9c) MEMCONbits;
107 __sfr __at (0xf9d) PIE1;
108 volatile __PIE1bits_t __at (0xf9d) PIE1bits;
110 __sfr __at (0xf9e) PIR1;
111 volatile __PIR1bits_t __at (0xf9e) PIR1bits;
113 __sfr __at (0xf9f) IPR1;
114 volatile __IPR1bits_t __at (0xf9f) IPR1bits;
116 __sfr __at (0xfa0) PIE2;
117 volatile __PIE2bits_t __at (0xfa0) PIE2bits;
119 __sfr __at (0xfa1) PIR2;
120 volatile __PIR2bits_t __at (0xfa1) PIR2bits;
122 __sfr __at (0xfa2) IPR2;
123 volatile __IPR2bits_t __at (0xfa2) IPR2bits;
125 __sfr __at (0xfa3) PIE3;
126 volatile __PIE3bits_t __at (0xfa3) PIE3bits;
128 __sfr __at (0xfa4) PIR3;
129 volatile __PIR3bits_t __at (0xfa4) PIR3bits;
131 __sfr __at (0xfa5) IPR3;
132 volatile __IPR3bits_t __at (0xfa5) IPR3bits;
134 __sfr __at (0xfa6) EECON1;
135 volatile __EECON1bits_t __at (0xfa6) EECON1bits;
137 __sfr __at (0xfa7) EECON2;
138 __sfr __at (0xfa8) EEDATA;
139 __sfr __at (0xfa9) EEADR;
140 __sfr __at (0xfaa) EEADRH;
141 __sfr __at (0xfab) RCSTA1;
142 volatile __RCSTA1bits_t __at (0xfab) RCSTA1bits;
144 __sfr __at (0xfac) TXSTA1;
145 volatile __TXSTA1bits_t __at (0xfac) TXSTA1bits;
147 __sfr __at (0xfad) TXREG1;
148 __sfr __at (0xfae) RCREG1;
149 __sfr __at (0xfaf) SPBRG1;
150 __sfr __at (0xfb0) PSPCON;
151 volatile __PSPCONbits_t __at (0xfb0) PSPCONbits;
153 __sfr __at (0xfb1) T3CON;
154 volatile __T3CONbits_t __at (0xfb1) T3CONbits;
156 __sfr __at (0xfb2) TMR3L;
157 __sfr __at (0xfb3) TMR3H;
158 __sfr __at (0xfb4) CMCON;
159 volatile __CMCONbits_t __at (0xfb4) CMCONbits;
161 __sfr __at (0xfb5) CVRCON;
162 volatile __CVRCONbits_t __at (0xfb5) CVRCONbits;
164 __sfr __at (0xfb7) CCP3CON;
165 volatile __CCP3CONbits_t __at (0xfb7) CCP3CONbits;
167 __sfr __at (0xfb8) CCPR3L;
168 __sfr __at (0xfb9) CCPR3H;
169 __sfr __at (0xfba) CCP2CON;
170 volatile __CCP2CONbits_t __at (0xfba) CCP2CONbits;
172 __sfr __at (0xfbb) CCPR2L;
173 __sfr __at (0xfbc) CCPR2H;
174 __sfr __at (0xfbd) CCP1CON;
175 volatile __CCP1CONbits_t __at (0xfbd) CCP1CONbits;
177 __sfr __at (0xfbe) CCPR1L;
178 __sfr __at (0xfbf) CCPR1H;
179 __sfr __at (0xfc0) ADCON2;
180 volatile __ADCON2bits_t __at (0xfc0) ADCON2bits;
182 __sfr __at (0xfc1) ADCON1;
183 volatile __ADCON1bits_t __at (0xfc1) ADCON1bits;
185 __sfr __at (0xfc2) ADCON0;
186 volatile __ADCON0bits_t __at (0xfc2) ADCON0bits;
188 __sfr __at (0xfc3) ADRESL;
189 __sfr __at (0xfc4) ADRESH;
190 __sfr __at (0xfc5) SSPCON2;
191 volatile __SSPCON2bits_t __at (0xfc5) SSPCON2bits;
193 __sfr __at (0xfc6) SSPCON1;
194 volatile __SSPCON1bits_t __at (0xfc6) SSPCON1bits;
196 __sfr __at (0xfc7) SSPSTAT;
197 volatile __SSPSTATbits_t __at (0xfc7) SSPSTATbits;
199 __sfr __at (0xfc8) SSPADD;
200 __sfr __at (0xfc9) SSPBUF;
201 __sfr __at (0xfca) T2CON;
202 volatile __T2CONbits_t __at (0xfca) T2CONbits;
204 __sfr __at (0xfcb) PR2;
205 __sfr __at (0xfcc) TMR2;
206 __sfr __at (0xfcd) T1CON;
207 volatile __T1CONbits_t __at (0xfcd) T1CONbits;
209 __sfr __at (0xfce) TMR1L;
210 __sfr __at (0xfcf) TMR1H;
211 __sfr __at (0xfd0) RCON;
212 volatile __RCONbits_t __at (0xfd0) RCONbits;
214 __sfr __at (0xfd1) WDTCON;
215 volatile __WDTCONbits_t __at (0xfd1) WDTCONbits;
217 __sfr __at (0xfd2) LVDCON;
218 volatile __LVDCONbits_t __at (0xfd2) LVDCONbits;
220 __sfr __at (0xfd3) OSCCON;
221 volatile __OSCCONbits_t __at (0xfd3) OSCCONbits;
223 __sfr __at (0xfd5) T0CON;
224 __sfr __at (0xfd6) TMR0L;
225 __sfr __at (0xfd7) TMR0H;
226 __sfr __at (0xfd8) STATUS;
227 volatile __STATUSbits_t __at (0xfd8) STATUSbits;
229 __sfr __at (0xfd9) FSR2L;
230 __sfr __at (0xfda) FSR2H;
231 __sfr __at (0xfdb) PLUSW2;
232 __sfr __at (0xfdc) PREINC2;
233 __sfr __at (0xfdd) POSTDEC2;
234 __sfr __at (0xfde) POSTINC2;
235 __sfr __at (0xfdf) INDF2;
236 __sfr __at (0xfe0) BSR;
237 __sfr __at (0xfe1) FSR1L;
238 __sfr __at (0xfe2) FSR1H;
239 __sfr __at (0xfe3) PLUSW1;
240 __sfr __at (0xfe4) PREINC1;
241 __sfr __at (0xfe5) POSTDEC1;
242 __sfr __at (0xfe6) POSTINC1;
243 __sfr __at (0xfe7) INDF1;
244 __sfr __at (0xfe8) WREG;
245 __sfr __at (0xfe9) FSR0L;
246 __sfr __at (0xfea) FSR0H;
247 __sfr __at (0xfeb) PLUSW0;
248 __sfr __at (0xfec) PREINC0;
249 __sfr __at (0xfed) POSTDEC0;
250 __sfr __at (0xfee) POSTINC0;
251 __sfr __at (0xfef) INDF0;
252 __sfr __at (0xff0) INTCON3;
253 volatile __INTCON3bits_t __at (0xff0) INTCON3bits;
255 __sfr __at (0xff1) INTCON2;
256 volatile __INTCON2bits_t __at (0xff1) INTCON2bits;
258 __sfr __at (0xff2) INTCON;
259 volatile __INTCONbits_t __at (0xff2) INTCONbits;
261 __sfr __at (0xff3) PRODL;
262 __sfr __at (0xff4) PRODH;
263 __sfr __at (0xff5) TABLAT;
264 __sfr __at (0xff6) TBLPTRL;
265 __sfr __at (0xff7) TBLPTRH;
266 __sfr __at (0xff8) TBLPTRU;
267 __sfr __at (0xff9) PCL;
268 __sfr __at (0xffa) PCLATH;
269 __sfr __at (0xffb) PCLATU;
270 __sfr __at (0xffc) STKPTR;
271 volatile __STKPTRbits_t __at (0xffc) STKPTRbits;
273 __sfr __at (0xffd) TOSL;
274 __sfr __at (0xffe) TOSH;
275 __sfr __at (0xfff) TOSU;