Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f1526.h
blobf2dee3b0920c2ea92849c0cc4bba47d80895629e
1 /*
2 * This declarations of the PIC16F1526 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:07 UTC.
9 * SDCC is licensed under the GNU Public license (GPL) v2. Note that
10 * this license covers the code to the compiler and other executables,
11 * but explicitly does not cover any code or objects generated by sdcc.
13 * For pic device libraries and header files which are derived from
14 * Microchip header (.inc) and linker script (.lkr) files Microchip
15 * requires that "The header files should state that they are only to be
16 * used with authentic Microchip devices" which makes them incompatible
17 * with the GPL. Pic device libraries and header files are located at
18 * non-free/lib and non-free/include directories respectively.
19 * Sdcc should be run with the --use-non-free command line option in
20 * order to include non-free header files and libraries.
22 * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
25 #ifndef __PIC16F1526_H__
26 #define __PIC16F1526_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF0_ADDR 0x0000
37 #define INDF1_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR0_ADDR 0x0004
41 #define FSR0L_ADDR 0x0004
42 #define FSR0H_ADDR 0x0005
43 #define FSR1_ADDR 0x0006
44 #define FSR1L_ADDR 0x0006
45 #define FSR1H_ADDR 0x0007
46 #define BSR_ADDR 0x0008
47 #define WREG_ADDR 0x0009
48 #define PCLATH_ADDR 0x000A
49 #define INTCON_ADDR 0x000B
50 #define PORTA_ADDR 0x000C
51 #define PORTB_ADDR 0x000D
52 #define PORTC_ADDR 0x000E
53 #define PORTD_ADDR 0x000F
54 #define PORTE_ADDR 0x0010
55 #define PIR1_ADDR 0x0011
56 #define PIR2_ADDR 0x0012
57 #define PIR3_ADDR 0x0013
58 #define PIR4_ADDR 0x0014
59 #define TMR0_ADDR 0x0015
60 #define TMR1_ADDR 0x0016
61 #define TMR1L_ADDR 0x0016
62 #define TMR1H_ADDR 0x0017
63 #define T1CON_ADDR 0x0018
64 #define T1GCON_ADDR 0x0019
65 #define TMR2_ADDR 0x001A
66 #define PR2_ADDR 0x001B
67 #define T2CON_ADDR 0x001C
68 #define TRISA_ADDR 0x008C
69 #define TRISB_ADDR 0x008D
70 #define TRISC_ADDR 0x008E
71 #define TRISD_ADDR 0x008F
72 #define TRISE_ADDR 0x0090
73 #define PIE1_ADDR 0x0091
74 #define PIE2_ADDR 0x0092
75 #define PIE3_ADDR 0x0093
76 #define PIE4_ADDR 0x0094
77 #define OPTION_REG_ADDR 0x0095
78 #define PCON_ADDR 0x0096
79 #define WDTCON_ADDR 0x0097
80 #define OSCCON_ADDR 0x0099
81 #define OSCSTAT_ADDR 0x009A
82 #define ADRES_ADDR 0x009B
83 #define ADRESL_ADDR 0x009B
84 #define ADRESH_ADDR 0x009C
85 #define ADCON0_ADDR 0x009D
86 #define ADCON1_ADDR 0x009E
87 #define LATA_ADDR 0x010C
88 #define LATB_ADDR 0x010D
89 #define LATC_ADDR 0x010E
90 #define LATD_ADDR 0x010F
91 #define LATE_ADDR 0x0110
92 #define BORCON_ADDR 0x0116
93 #define FVRCON_ADDR 0x0117
94 #define APFCON_ADDR 0x011D
95 #define ANSELA_ADDR 0x018C
96 #define ANSELB_ADDR 0x018D
97 #define ANSELD_ADDR 0x018F
98 #define ANSELE_ADDR 0x0190
99 #define PMADR_ADDR 0x0191
100 #define PMADRL_ADDR 0x0191
101 #define PMADRH_ADDR 0x0192
102 #define PMDAT_ADDR 0x0193
103 #define PMDATL_ADDR 0x0193
104 #define PMDATH_ADDR 0x0194
105 #define PMCON1_ADDR 0x0195
106 #define PMCON2_ADDR 0x0196
107 #define VREGCON_ADDR 0x0197
108 #define RC1REG_ADDR 0x0199
109 #define RCREG_ADDR 0x0199
110 #define RCREG1_ADDR 0x0199
111 #define TX1REG_ADDR 0x019A
112 #define TXREG_ADDR 0x019A
113 #define TXREG1_ADDR 0x019A
114 #define SP1BRG_ADDR 0x019B
115 #define SP1BRGL_ADDR 0x019B
116 #define SPBRG_ADDR 0x019B
117 #define SPBRGL_ADDR 0x019B
118 #define SPBRGL1_ADDR 0x019B
119 #define SP1BRGH_ADDR 0x019C
120 #define SPBRGH_ADDR 0x019C
121 #define SPBRGH1_ADDR 0x019C
122 #define RC1STA_ADDR 0x019D
123 #define RCSTA_ADDR 0x019D
124 #define RCSTA1_ADDR 0x019D
125 #define TX1STA_ADDR 0x019E
126 #define TXSTA_ADDR 0x019E
127 #define TXSTA1_ADDR 0x019E
128 #define BAUD1CON_ADDR 0x019F
129 #define BAUDCON_ADDR 0x019F
130 #define BAUDCON1_ADDR 0x019F
131 #define WPUB_ADDR 0x020D
132 #define WPUD_ADDR 0x020F
133 #define WPUE_ADDR 0x0210
134 #define SSP1BUF_ADDR 0x0211
135 #define SSPBUF_ADDR 0x0211
136 #define SSP1ADD_ADDR 0x0212
137 #define SSPADD_ADDR 0x0212
138 #define SSP1MSK_ADDR 0x0213
139 #define SSPMSK_ADDR 0x0213
140 #define SSP1STAT_ADDR 0x0214
141 #define SSPSTAT_ADDR 0x0214
142 #define SSP1CON1_ADDR 0x0215
143 #define SSPCON_ADDR 0x0215
144 #define SSPCON1_ADDR 0x0215
145 #define SSP1CON2_ADDR 0x0216
146 #define SSPCON2_ADDR 0x0216
147 #define SSP1CON3_ADDR 0x0217
148 #define SSPCON3_ADDR 0x0217
149 #define SSP2BUF_ADDR 0x0219
150 #define SSP2ADD_ADDR 0x021A
151 #define SSP2MSK_ADDR 0x021B
152 #define SSP2STAT_ADDR 0x021C
153 #define SSP2CON1_ADDR 0x021D
154 #define SSP2CON2_ADDR 0x021E
155 #define SSP2CON3_ADDR 0x021F
156 #define PORTF_ADDR 0x028C
157 #define PORTG_ADDR 0x028D
158 #define CCPR1_ADDR 0x0291
159 #define CCPR1L_ADDR 0x0291
160 #define CCPR1H_ADDR 0x0292
161 #define CCP1CON_ADDR 0x0293
162 #define CCPR2_ADDR 0x0298
163 #define CCPR2L_ADDR 0x0298
164 #define CCPR2H_ADDR 0x0299
165 #define CCP2CON_ADDR 0x029A
166 #define CCPTMRS0_ADDR 0x029D
167 #define CCPTMRS1_ADDR 0x029E
168 #define CCPTMRS2_ADDR 0x029F
169 #define TRISF_ADDR 0x030C
170 #define TRISG_ADDR 0x030D
171 #define CCPR3_ADDR 0x0311
172 #define CCPR3L_ADDR 0x0311
173 #define CCPR3H_ADDR 0x0312
174 #define CCP3CON_ADDR 0x0313
175 #define CCPR4_ADDR 0x0318
176 #define CCPR4L_ADDR 0x0318
177 #define CCPR4H_ADDR 0x0319
178 #define CCP4CON_ADDR 0x031A
179 #define CCPR5_ADDR 0x031C
180 #define CCPR5L_ADDR 0x031C
181 #define CCPR5H_ADDR 0x031D
182 #define CCP5CON_ADDR 0x031E
183 #define LATF_ADDR 0x038C
184 #define LATG_ADDR 0x038D
185 #define IOCBP_ADDR 0x0394
186 #define IOCBN_ADDR 0x0395
187 #define IOCBF_ADDR 0x0396
188 #define ANSELF_ADDR 0x040C
189 #define ANSELG_ADDR 0x040D
190 #define TMR3_ADDR 0x0411
191 #define TMR3L_ADDR 0x0411
192 #define TMR3H_ADDR 0x0412
193 #define T3CON_ADDR 0x0413
194 #define T3GCON_ADDR 0x0414
195 #define TMR4_ADDR 0x0415
196 #define PR4_ADDR 0x0416
197 #define T4CON_ADDR 0x0417
198 #define TMR5_ADDR 0x0418
199 #define TMR5L_ADDR 0x0418
200 #define TMR5H_ADDR 0x0419
201 #define T5CON_ADDR 0x041A
202 #define T5GCON_ADDR 0x041B
203 #define TMR6_ADDR 0x041C
204 #define PR6_ADDR 0x041D
205 #define T6CON_ADDR 0x041E
206 #define WPUG_ADDR 0x048D
207 #define RC2REG_ADDR 0x0491
208 #define RCREG2_ADDR 0x0491
209 #define TX2REG_ADDR 0x0492
210 #define TXREG2_ADDR 0x0492
211 #define SP2BRG_ADDR 0x0493
212 #define SP2BRGL_ADDR 0x0493
213 #define SPBRGL2_ADDR 0x0493
214 #define SP2BRGH_ADDR 0x0494
215 #define SPBRGH2_ADDR 0x0494
216 #define RC2STA_ADDR 0x0495
217 #define RCSTA2_ADDR 0x0495
218 #define TX2STA_ADDR 0x0496
219 #define TXSTA2_ADDR 0x0496
220 #define BAUD2CON_ADDR 0x0497
221 #define BAUDCON2_ADDR 0x0497
222 #define TMR8_ADDR 0x0595
223 #define PR8_ADDR 0x0596
224 #define T8CON_ADDR 0x0597
225 #define TMR10_ADDR 0x059C
226 #define PR10_ADDR 0x059D
227 #define T10CON_ADDR 0x059E
228 #define CCPR6_ADDR 0x0611
229 #define CCPR6L_ADDR 0x0611
230 #define CCPR6H_ADDR 0x0612
231 #define CCP6CON_ADDR 0x0613
232 #define CCPR7_ADDR 0x0614
233 #define CCPR7L_ADDR 0x0614
234 #define CCPR7H_ADDR 0x0615
235 #define CCP7CON_ADDR 0x0616
236 #define CCPR8_ADDR 0x0617
237 #define CCPR8L_ADDR 0x0617
238 #define CCPR8H_ADDR 0x0618
239 #define CCP8CON_ADDR 0x0619
240 #define CCPR9_ADDR 0x061A
241 #define CCPR9L_ADDR 0x061A
242 #define CCPR9H_ADDR 0x061B
243 #define CCP9CON_ADDR 0x061C
244 #define CCPR10_ADDR 0x061D
245 #define CCPR10L_ADDR 0x061D
246 #define CCPR10H_ADDR 0x061E
247 #define CCP10CON_ADDR 0x061F
248 #define STATUS_SHAD_ADDR 0x0FE4
249 #define WREG_SHAD_ADDR 0x0FE5
250 #define BSR_SHAD_ADDR 0x0FE6
251 #define PCLATH_SHAD_ADDR 0x0FE7
252 #define FSR0L_SHAD_ADDR 0x0FE8
253 #define FSR0H_SHAD_ADDR 0x0FE9
254 #define FSR1L_SHAD_ADDR 0x0FEA
255 #define FSR1H_SHAD_ADDR 0x0FEB
256 #define STKPTR_ADDR 0x0FED
257 #define TOSL_ADDR 0x0FEE
258 #define TOSH_ADDR 0x0FEF
260 #endif // #ifndef NO_ADDR_DEFINES
262 //==============================================================================
264 // Register Definitions
266 //==============================================================================
268 extern __at(0x0000) __sfr INDF0;
269 extern __at(0x0001) __sfr INDF1;
270 extern __at(0x0002) __sfr PCL;
272 //==============================================================================
273 // STATUS Bits
275 extern __at(0x0003) __sfr STATUS;
277 typedef struct
279 unsigned C : 1;
280 unsigned DC : 1;
281 unsigned Z : 1;
282 unsigned NOT_PD : 1;
283 unsigned NOT_TO : 1;
284 unsigned : 1;
285 unsigned : 1;
286 unsigned : 1;
287 } __STATUSbits_t;
289 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
291 #define _C 0x01
292 #define _DC 0x02
293 #define _Z 0x04
294 #define _NOT_PD 0x08
295 #define _NOT_TO 0x10
297 //==============================================================================
299 extern __at(0x0004) __sfr FSR0;
300 extern __at(0x0004) __sfr FSR0L;
301 extern __at(0x0005) __sfr FSR0H;
302 extern __at(0x0006) __sfr FSR1;
303 extern __at(0x0006) __sfr FSR1L;
304 extern __at(0x0007) __sfr FSR1H;
306 //==============================================================================
307 // BSR Bits
309 extern __at(0x0008) __sfr BSR;
311 typedef union
313 struct
315 unsigned BSR0 : 1;
316 unsigned BSR1 : 1;
317 unsigned BSR2 : 1;
318 unsigned BSR3 : 1;
319 unsigned BSR4 : 1;
320 unsigned : 1;
321 unsigned : 1;
322 unsigned : 1;
325 struct
327 unsigned BSR : 5;
328 unsigned : 3;
330 } __BSRbits_t;
332 extern __at(0x0008) volatile __BSRbits_t BSRbits;
334 #define _BSR0 0x01
335 #define _BSR1 0x02
336 #define _BSR2 0x04
337 #define _BSR3 0x08
338 #define _BSR4 0x10
340 //==============================================================================
342 extern __at(0x0009) __sfr WREG;
343 extern __at(0x000A) __sfr PCLATH;
345 //==============================================================================
346 // INTCON Bits
348 extern __at(0x000B) __sfr INTCON;
350 typedef union
352 struct
354 unsigned IOCIF : 1;
355 unsigned INTF : 1;
356 unsigned TMR0IF : 1;
357 unsigned IOCIE : 1;
358 unsigned INTE : 1;
359 unsigned TMR0IE : 1;
360 unsigned PEIE : 1;
361 unsigned GIE : 1;
364 struct
366 unsigned : 1;
367 unsigned : 1;
368 unsigned T0IF : 1;
369 unsigned : 1;
370 unsigned : 1;
371 unsigned T0IE : 1;
372 unsigned : 1;
373 unsigned : 1;
375 } __INTCONbits_t;
377 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
379 #define _IOCIF 0x01
380 #define _INTF 0x02
381 #define _TMR0IF 0x04
382 #define _T0IF 0x04
383 #define _IOCIE 0x08
384 #define _INTE 0x10
385 #define _TMR0IE 0x20
386 #define _T0IE 0x20
387 #define _PEIE 0x40
388 #define _GIE 0x80
390 //==============================================================================
393 //==============================================================================
394 // PORTA Bits
396 extern __at(0x000C) __sfr PORTA;
398 typedef struct
400 unsigned RA0 : 1;
401 unsigned RA1 : 1;
402 unsigned RA2 : 1;
403 unsigned RA3 : 1;
404 unsigned RA4 : 1;
405 unsigned RA5 : 1;
406 unsigned RA6 : 1;
407 unsigned RA7 : 1;
408 } __PORTAbits_t;
410 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
412 #define _RA0 0x01
413 #define _RA1 0x02
414 #define _RA2 0x04
415 #define _RA3 0x08
416 #define _RA4 0x10
417 #define _RA5 0x20
418 #define _RA6 0x40
419 #define _RA7 0x80
421 //==============================================================================
424 //==============================================================================
425 // PORTB Bits
427 extern __at(0x000D) __sfr PORTB;
429 typedef struct
431 unsigned RB0 : 1;
432 unsigned RB1 : 1;
433 unsigned RB2 : 1;
434 unsigned RB3 : 1;
435 unsigned RB4 : 1;
436 unsigned RB5 : 1;
437 unsigned RB6 : 1;
438 unsigned RB7 : 1;
439 } __PORTBbits_t;
441 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
443 #define _RB0 0x01
444 #define _RB1 0x02
445 #define _RB2 0x04
446 #define _RB3 0x08
447 #define _RB4 0x10
448 #define _RB5 0x20
449 #define _RB6 0x40
450 #define _RB7 0x80
452 //==============================================================================
455 //==============================================================================
456 // PORTC Bits
458 extern __at(0x000E) __sfr PORTC;
460 typedef struct
462 unsigned RC0 : 1;
463 unsigned RC1 : 1;
464 unsigned RC2 : 1;
465 unsigned RC3 : 1;
466 unsigned RC4 : 1;
467 unsigned RC5 : 1;
468 unsigned RC6 : 1;
469 unsigned RC7 : 1;
470 } __PORTCbits_t;
472 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
474 #define _RC0 0x01
475 #define _RC1 0x02
476 #define _RC2 0x04
477 #define _RC3 0x08
478 #define _RC4 0x10
479 #define _RC5 0x20
480 #define _RC6 0x40
481 #define _RC7 0x80
483 //==============================================================================
486 //==============================================================================
487 // PORTD Bits
489 extern __at(0x000F) __sfr PORTD;
491 typedef struct
493 unsigned RD0 : 1;
494 unsigned RD1 : 1;
495 unsigned RD2 : 1;
496 unsigned RD3 : 1;
497 unsigned RD4 : 1;
498 unsigned RD5 : 1;
499 unsigned RD6 : 1;
500 unsigned RD7 : 1;
501 } __PORTDbits_t;
503 extern __at(0x000F) volatile __PORTDbits_t PORTDbits;
505 #define _RD0 0x01
506 #define _RD1 0x02
507 #define _RD2 0x04
508 #define _RD3 0x08
509 #define _RD4 0x10
510 #define _RD5 0x20
511 #define _RD6 0x40
512 #define _RD7 0x80
514 //==============================================================================
517 //==============================================================================
518 // PORTE Bits
520 extern __at(0x0010) __sfr PORTE;
522 typedef struct
524 unsigned RE0 : 1;
525 unsigned RE1 : 1;
526 unsigned RE2 : 1;
527 unsigned RE3 : 1;
528 unsigned RE4 : 1;
529 unsigned RE5 : 1;
530 unsigned RE6 : 1;
531 unsigned RE7 : 1;
532 } __PORTEbits_t;
534 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
536 #define _RE0 0x01
537 #define _RE1 0x02
538 #define _RE2 0x04
539 #define _RE3 0x08
540 #define _RE4 0x10
541 #define _RE5 0x20
542 #define _RE6 0x40
543 #define _RE7 0x80
545 //==============================================================================
548 //==============================================================================
549 // PIR1 Bits
551 extern __at(0x0011) __sfr PIR1;
553 typedef union
555 struct
557 unsigned TMR1IF : 1;
558 unsigned TMR2IF : 1;
559 unsigned CCP1IF : 1;
560 unsigned SSP1IF : 1;
561 unsigned TX1IF : 1;
562 unsigned RC1IF : 1;
563 unsigned ADIF : 1;
564 unsigned TMR1GIF : 1;
567 struct
569 unsigned : 1;
570 unsigned : 1;
571 unsigned : 1;
572 unsigned SSPIF : 1;
573 unsigned TXIF : 1;
574 unsigned RCIF : 1;
575 unsigned : 1;
576 unsigned : 1;
578 } __PIR1bits_t;
580 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
582 #define _TMR1IF 0x01
583 #define _TMR2IF 0x02
584 #define _CCP1IF 0x04
585 #define _SSP1IF 0x08
586 #define _SSPIF 0x08
587 #define _TX1IF 0x10
588 #define _TXIF 0x10
589 #define _RC1IF 0x20
590 #define _RCIF 0x20
591 #define _ADIF 0x40
592 #define _TMR1GIF 0x80
594 //==============================================================================
597 //==============================================================================
598 // PIR2 Bits
600 extern __at(0x0012) __sfr PIR2;
602 typedef union
604 struct
606 unsigned CCP2IF : 1;
607 unsigned TMR8IF : 1;
608 unsigned TMR10IF : 1;
609 unsigned BCL1IF : 1;
610 unsigned : 1;
611 unsigned TMR3GIF : 1;
612 unsigned TMR5GIF : 1;
613 unsigned OSFIF : 1;
616 struct
618 unsigned : 1;
619 unsigned : 1;
620 unsigned : 1;
621 unsigned BCLIF : 1;
622 unsigned : 1;
623 unsigned : 1;
624 unsigned : 1;
625 unsigned : 1;
627 } __PIR2bits_t;
629 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
631 #define _CCP2IF 0x01
632 #define _TMR8IF 0x02
633 #define _TMR10IF 0x04
634 #define _BCL1IF 0x08
635 #define _BCLIF 0x08
636 #define _TMR3GIF 0x20
637 #define _TMR5GIF 0x40
638 #define _OSFIF 0x80
640 //==============================================================================
643 //==============================================================================
644 // PIR3 Bits
646 extern __at(0x0013) __sfr PIR3;
648 typedef struct
650 unsigned TMR3IF : 1;
651 unsigned TMR4IF : 1;
652 unsigned TMR5IF : 1;
653 unsigned TMR6IF : 1;
654 unsigned CCP3IF : 1;
655 unsigned CCP4IF : 1;
656 unsigned CCP5IF : 1;
657 unsigned CCP6IF : 1;
658 } __PIR3bits_t;
660 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
662 #define _TMR3IF 0x01
663 #define _TMR4IF 0x02
664 #define _TMR5IF 0x04
665 #define _TMR6IF 0x08
666 #define _CCP3IF 0x10
667 #define _CCP4IF 0x20
668 #define _CCP5IF 0x40
669 #define _CCP6IF 0x80
671 //==============================================================================
674 //==============================================================================
675 // PIR4 Bits
677 extern __at(0x0014) __sfr PIR4;
679 typedef struct
681 unsigned SSP2IF : 1;
682 unsigned BCL2IF : 1;
683 unsigned CCP7IF : 1;
684 unsigned CCP8IF : 1;
685 unsigned TX2IF : 1;
686 unsigned RC2IF : 1;
687 unsigned CCP9IF : 1;
688 unsigned CCP10IF : 1;
689 } __PIR4bits_t;
691 extern __at(0x0014) volatile __PIR4bits_t PIR4bits;
693 #define _SSP2IF 0x01
694 #define _BCL2IF 0x02
695 #define _CCP7IF 0x04
696 #define _CCP8IF 0x08
697 #define _TX2IF 0x10
698 #define _RC2IF 0x20
699 #define _CCP9IF 0x40
700 #define _CCP10IF 0x80
702 //==============================================================================
704 extern __at(0x0015) __sfr TMR0;
705 extern __at(0x0016) __sfr TMR1;
706 extern __at(0x0016) __sfr TMR1L;
707 extern __at(0x0017) __sfr TMR1H;
709 //==============================================================================
710 // T1CON Bits
712 extern __at(0x0018) __sfr T1CON;
714 typedef union
716 struct
718 unsigned TMR1ON : 1;
719 unsigned : 1;
720 unsigned NOT_T1SYNC : 1;
721 unsigned SOSCEN : 1;
722 unsigned T1CKPS0 : 1;
723 unsigned T1CKPS1 : 1;
724 unsigned TMR1CS0 : 1;
725 unsigned TMR1CS1 : 1;
728 struct
730 unsigned : 1;
731 unsigned : 1;
732 unsigned : 1;
733 unsigned T1OSCEN : 1;
734 unsigned : 1;
735 unsigned : 1;
736 unsigned : 1;
737 unsigned : 1;
740 struct
742 unsigned : 4;
743 unsigned T1CKPS : 2;
744 unsigned : 2;
747 struct
749 unsigned : 6;
750 unsigned TMR1CS : 2;
752 } __T1CONbits_t;
754 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
756 #define _TMR1ON 0x01
757 #define _NOT_T1SYNC 0x04
758 #define _SOSCEN 0x08
759 #define _T1OSCEN 0x08
760 #define _T1CKPS0 0x10
761 #define _T1CKPS1 0x20
762 #define _TMR1CS0 0x40
763 #define _TMR1CS1 0x80
765 //==============================================================================
768 //==============================================================================
769 // T1GCON Bits
771 extern __at(0x0019) __sfr T1GCON;
773 typedef union
775 struct
777 unsigned T1GSS0 : 1;
778 unsigned T1GSS1 : 1;
779 unsigned T1GVAL : 1;
780 unsigned T1GGO_NOT_DONE : 1;
781 unsigned T1GSPM : 1;
782 unsigned T1GTM : 1;
783 unsigned T1GPOL : 1;
784 unsigned TMR1GE : 1;
787 struct
789 unsigned T1GSS : 2;
790 unsigned : 6;
792 } __T1GCONbits_t;
794 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
796 #define _T1GSS0 0x01
797 #define _T1GSS1 0x02
798 #define _T1GVAL 0x04
799 #define _T1GGO_NOT_DONE 0x08
800 #define _T1GSPM 0x10
801 #define _T1GTM 0x20
802 #define _T1GPOL 0x40
803 #define _TMR1GE 0x80
805 //==============================================================================
807 extern __at(0x001A) __sfr TMR2;
808 extern __at(0x001B) __sfr PR2;
810 //==============================================================================
811 // T2CON Bits
813 extern __at(0x001C) __sfr T2CON;
815 typedef union
817 struct
819 unsigned T2CKPS0 : 1;
820 unsigned T2CKPS1 : 1;
821 unsigned TMR2ON : 1;
822 unsigned T2OUTPS0 : 1;
823 unsigned T2OUTPS1 : 1;
824 unsigned T2OUTPS2 : 1;
825 unsigned T2OUTPS3 : 1;
826 unsigned : 1;
829 struct
831 unsigned T2CKPS : 2;
832 unsigned : 6;
835 struct
837 unsigned : 3;
838 unsigned T2OUTPS : 4;
839 unsigned : 1;
841 } __T2CONbits_t;
843 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
845 #define _T2CKPS0 0x01
846 #define _T2CKPS1 0x02
847 #define _TMR2ON 0x04
848 #define _T2OUTPS0 0x08
849 #define _T2OUTPS1 0x10
850 #define _T2OUTPS2 0x20
851 #define _T2OUTPS3 0x40
853 //==============================================================================
856 //==============================================================================
857 // TRISA Bits
859 extern __at(0x008C) __sfr TRISA;
861 typedef struct
863 unsigned TRISA0 : 1;
864 unsigned TRISA1 : 1;
865 unsigned TRISA2 : 1;
866 unsigned TRISA3 : 1;
867 unsigned TRISA4 : 1;
868 unsigned TRISA5 : 1;
869 unsigned TRISA6 : 1;
870 unsigned TRISA7 : 1;
871 } __TRISAbits_t;
873 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
875 #define _TRISA0 0x01
876 #define _TRISA1 0x02
877 #define _TRISA2 0x04
878 #define _TRISA3 0x08
879 #define _TRISA4 0x10
880 #define _TRISA5 0x20
881 #define _TRISA6 0x40
882 #define _TRISA7 0x80
884 //==============================================================================
887 //==============================================================================
888 // TRISB Bits
890 extern __at(0x008D) __sfr TRISB;
892 typedef struct
894 unsigned TRISB0 : 1;
895 unsigned TRISB1 : 1;
896 unsigned TRISB2 : 1;
897 unsigned TRISB3 : 1;
898 unsigned TRISB4 : 1;
899 unsigned TRISB5 : 1;
900 unsigned TRISB6 : 1;
901 unsigned TRISB7 : 1;
902 } __TRISBbits_t;
904 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
906 #define _TRISB0 0x01
907 #define _TRISB1 0x02
908 #define _TRISB2 0x04
909 #define _TRISB3 0x08
910 #define _TRISB4 0x10
911 #define _TRISB5 0x20
912 #define _TRISB6 0x40
913 #define _TRISB7 0x80
915 //==============================================================================
918 //==============================================================================
919 // TRISC Bits
921 extern __at(0x008E) __sfr TRISC;
923 typedef struct
925 unsigned TRISC0 : 1;
926 unsigned TRISC1 : 1;
927 unsigned TRISC2 : 1;
928 unsigned TRISC3 : 1;
929 unsigned TRISC4 : 1;
930 unsigned TRISC5 : 1;
931 unsigned TRISC6 : 1;
932 unsigned TRISC7 : 1;
933 } __TRISCbits_t;
935 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
937 #define _TRISC0 0x01
938 #define _TRISC1 0x02
939 #define _TRISC2 0x04
940 #define _TRISC3 0x08
941 #define _TRISC4 0x10
942 #define _TRISC5 0x20
943 #define _TRISC6 0x40
944 #define _TRISC7 0x80
946 //==============================================================================
949 //==============================================================================
950 // TRISD Bits
952 extern __at(0x008F) __sfr TRISD;
954 typedef struct
956 unsigned TRISD0 : 1;
957 unsigned TRISD1 : 1;
958 unsigned TRISD2 : 1;
959 unsigned TRISD3 : 1;
960 unsigned TRISD4 : 1;
961 unsigned TRISD5 : 1;
962 unsigned TRISD6 : 1;
963 unsigned TRISD7 : 1;
964 } __TRISDbits_t;
966 extern __at(0x008F) volatile __TRISDbits_t TRISDbits;
968 #define _TRISD0 0x01
969 #define _TRISD1 0x02
970 #define _TRISD2 0x04
971 #define _TRISD3 0x08
972 #define _TRISD4 0x10
973 #define _TRISD5 0x20
974 #define _TRISD6 0x40
975 #define _TRISD7 0x80
977 //==============================================================================
980 //==============================================================================
981 // TRISE Bits
983 extern __at(0x0090) __sfr TRISE;
985 typedef struct
987 unsigned TRISE0 : 1;
988 unsigned TRISE1 : 1;
989 unsigned TRISE2 : 1;
990 unsigned TRISE3 : 1;
991 unsigned TRISE4 : 1;
992 unsigned TRISE5 : 1;
993 unsigned TRISE6 : 1;
994 unsigned TRISE7 : 1;
995 } __TRISEbits_t;
997 extern __at(0x0090) volatile __TRISEbits_t TRISEbits;
999 #define _TRISE0 0x01
1000 #define _TRISE1 0x02
1001 #define _TRISE2 0x04
1002 #define _TRISE3 0x08
1003 #define _TRISE4 0x10
1004 #define _TRISE5 0x20
1005 #define _TRISE6 0x40
1006 #define _TRISE7 0x80
1008 //==============================================================================
1011 //==============================================================================
1012 // PIE1 Bits
1014 extern __at(0x0091) __sfr PIE1;
1016 typedef union
1018 struct
1020 unsigned TMR1IE : 1;
1021 unsigned TMR2IE : 1;
1022 unsigned CCP1IE : 1;
1023 unsigned SSP1IE : 1;
1024 unsigned TX1IE : 1;
1025 unsigned RC1IE : 1;
1026 unsigned ADIE : 1;
1027 unsigned TMR1GIE : 1;
1030 struct
1032 unsigned : 1;
1033 unsigned : 1;
1034 unsigned : 1;
1035 unsigned SSPIE : 1;
1036 unsigned TXIE : 1;
1037 unsigned RCIE : 1;
1038 unsigned : 1;
1039 unsigned : 1;
1041 } __PIE1bits_t;
1043 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
1045 #define _TMR1IE 0x01
1046 #define _TMR2IE 0x02
1047 #define _CCP1IE 0x04
1048 #define _SSP1IE 0x08
1049 #define _SSPIE 0x08
1050 #define _TX1IE 0x10
1051 #define _TXIE 0x10
1052 #define _RC1IE 0x20
1053 #define _RCIE 0x20
1054 #define _ADIE 0x40
1055 #define _TMR1GIE 0x80
1057 //==============================================================================
1060 //==============================================================================
1061 // PIE2 Bits
1063 extern __at(0x0092) __sfr PIE2;
1065 typedef union
1067 struct
1069 unsigned CCP2IE : 1;
1070 unsigned TMR8IE : 1;
1071 unsigned TMR10IE : 1;
1072 unsigned BCL1IE : 1;
1073 unsigned : 1;
1074 unsigned TMR3GIE : 1;
1075 unsigned TMR5GIE : 1;
1076 unsigned OSFIE : 1;
1079 struct
1081 unsigned : 1;
1082 unsigned : 1;
1083 unsigned : 1;
1084 unsigned BCLIE : 1;
1085 unsigned : 1;
1086 unsigned : 1;
1087 unsigned : 1;
1088 unsigned : 1;
1090 } __PIE2bits_t;
1092 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
1094 #define _CCP2IE 0x01
1095 #define _TMR8IE 0x02
1096 #define _TMR10IE 0x04
1097 #define _BCL1IE 0x08
1098 #define _BCLIE 0x08
1099 #define _TMR3GIE 0x20
1100 #define _TMR5GIE 0x40
1101 #define _OSFIE 0x80
1103 //==============================================================================
1106 //==============================================================================
1107 // PIE3 Bits
1109 extern __at(0x0093) __sfr PIE3;
1111 typedef struct
1113 unsigned TMR3IE : 1;
1114 unsigned TMR4IE : 1;
1115 unsigned TMR5IE : 1;
1116 unsigned TMR6IE : 1;
1117 unsigned CCP3IE : 1;
1118 unsigned CCP4IE : 1;
1119 unsigned CCP5IE : 1;
1120 unsigned CCP6IE : 1;
1121 } __PIE3bits_t;
1123 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
1125 #define _TMR3IE 0x01
1126 #define _TMR4IE 0x02
1127 #define _TMR5IE 0x04
1128 #define _TMR6IE 0x08
1129 #define _CCP3IE 0x10
1130 #define _CCP4IE 0x20
1131 #define _CCP5IE 0x40
1132 #define _CCP6IE 0x80
1134 //==============================================================================
1137 //==============================================================================
1138 // PIE4 Bits
1140 extern __at(0x0094) __sfr PIE4;
1142 typedef struct
1144 unsigned SSP2IE : 1;
1145 unsigned BCL2IE : 1;
1146 unsigned CCP7IE : 1;
1147 unsigned CCP8IE : 1;
1148 unsigned TX2IE : 1;
1149 unsigned RC2IE : 1;
1150 unsigned CCP9IE : 1;
1151 unsigned CCP10IE : 1;
1152 } __PIE4bits_t;
1154 extern __at(0x0094) volatile __PIE4bits_t PIE4bits;
1156 #define _SSP2IE 0x01
1157 #define _BCL2IE 0x02
1158 #define _CCP7IE 0x04
1159 #define _CCP8IE 0x08
1160 #define _TX2IE 0x10
1161 #define _RC2IE 0x20
1162 #define _CCP9IE 0x40
1163 #define _CCP10IE 0x80
1165 //==============================================================================
1168 //==============================================================================
1169 // OPTION_REG Bits
1171 extern __at(0x0095) __sfr OPTION_REG;
1173 typedef union
1175 struct
1177 unsigned PS0 : 1;
1178 unsigned PS1 : 1;
1179 unsigned PS2 : 1;
1180 unsigned PSA : 1;
1181 unsigned TMR0SE : 1;
1182 unsigned TMR0CS : 1;
1183 unsigned INTEDG : 1;
1184 unsigned NOT_WPUEN : 1;
1187 struct
1189 unsigned : 1;
1190 unsigned : 1;
1191 unsigned : 1;
1192 unsigned : 1;
1193 unsigned T0SE : 1;
1194 unsigned T0CS : 1;
1195 unsigned : 1;
1196 unsigned : 1;
1199 struct
1201 unsigned PS : 3;
1202 unsigned : 5;
1204 } __OPTION_REGbits_t;
1206 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
1208 #define _PS0 0x01
1209 #define _PS1 0x02
1210 #define _PS2 0x04
1211 #define _PSA 0x08
1212 #define _TMR0SE 0x10
1213 #define _T0SE 0x10
1214 #define _TMR0CS 0x20
1215 #define _T0CS 0x20
1216 #define _INTEDG 0x40
1217 #define _NOT_WPUEN 0x80
1219 //==============================================================================
1222 //==============================================================================
1223 // PCON Bits
1225 extern __at(0x0096) __sfr PCON;
1227 typedef struct
1229 unsigned NOT_BOR : 1;
1230 unsigned NOT_POR : 1;
1231 unsigned NOT_RI : 1;
1232 unsigned NOT_RMCLR : 1;
1233 unsigned NOT_RWDT : 1;
1234 unsigned : 1;
1235 unsigned STKUNF : 1;
1236 unsigned STKOVF : 1;
1237 } __PCONbits_t;
1239 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1241 #define _NOT_BOR 0x01
1242 #define _NOT_POR 0x02
1243 #define _NOT_RI 0x04
1244 #define _NOT_RMCLR 0x08
1245 #define _NOT_RWDT 0x10
1246 #define _STKUNF 0x40
1247 #define _STKOVF 0x80
1249 //==============================================================================
1252 //==============================================================================
1253 // WDTCON Bits
1255 extern __at(0x0097) __sfr WDTCON;
1257 typedef union
1259 struct
1261 unsigned SWDTEN : 1;
1262 unsigned WDTPS0 : 1;
1263 unsigned WDTPS1 : 1;
1264 unsigned WDTPS2 : 1;
1265 unsigned WDTPS3 : 1;
1266 unsigned WDTPS4 : 1;
1267 unsigned : 1;
1268 unsigned : 1;
1271 struct
1273 unsigned : 1;
1274 unsigned WDTPS : 5;
1275 unsigned : 2;
1277 } __WDTCONbits_t;
1279 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1281 #define _SWDTEN 0x01
1282 #define _WDTPS0 0x02
1283 #define _WDTPS1 0x04
1284 #define _WDTPS2 0x08
1285 #define _WDTPS3 0x10
1286 #define _WDTPS4 0x20
1288 //==============================================================================
1291 //==============================================================================
1292 // OSCCON Bits
1294 extern __at(0x0099) __sfr OSCCON;
1296 typedef union
1298 struct
1300 unsigned SCS0 : 1;
1301 unsigned SCS1 : 1;
1302 unsigned : 1;
1303 unsigned IRCF0 : 1;
1304 unsigned IRCF1 : 1;
1305 unsigned IRCF2 : 1;
1306 unsigned IRCF3 : 1;
1307 unsigned : 1;
1310 struct
1312 unsigned SCS : 2;
1313 unsigned : 6;
1316 struct
1318 unsigned : 3;
1319 unsigned IRCF : 4;
1320 unsigned : 1;
1322 } __OSCCONbits_t;
1324 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1326 #define _SCS0 0x01
1327 #define _SCS1 0x02
1328 #define _IRCF0 0x08
1329 #define _IRCF1 0x10
1330 #define _IRCF2 0x20
1331 #define _IRCF3 0x40
1333 //==============================================================================
1336 //==============================================================================
1337 // OSCSTAT Bits
1339 extern __at(0x009A) __sfr OSCSTAT;
1341 typedef union
1343 struct
1345 unsigned HFIOFS : 1;
1346 unsigned LFIOFR : 1;
1347 unsigned : 1;
1348 unsigned : 1;
1349 unsigned HFIOFR : 1;
1350 unsigned OSTS : 1;
1351 unsigned : 1;
1352 unsigned SOSCR : 1;
1355 struct
1357 unsigned : 1;
1358 unsigned : 1;
1359 unsigned : 1;
1360 unsigned : 1;
1361 unsigned : 1;
1362 unsigned : 1;
1363 unsigned : 1;
1364 unsigned T1OSCR : 1;
1366 } __OSCSTATbits_t;
1368 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1370 #define _HFIOFS 0x01
1371 #define _LFIOFR 0x02
1372 #define _HFIOFR 0x10
1373 #define _OSTS 0x20
1374 #define _SOSCR 0x80
1375 #define _T1OSCR 0x80
1377 //==============================================================================
1379 extern __at(0x009B) __sfr ADRES;
1380 extern __at(0x009B) __sfr ADRESL;
1381 extern __at(0x009C) __sfr ADRESH;
1383 //==============================================================================
1384 // ADCON0 Bits
1386 extern __at(0x009D) __sfr ADCON0;
1388 typedef union
1390 struct
1392 unsigned ADON : 1;
1393 unsigned GO_NOT_DONE : 1;
1394 unsigned CHS0 : 1;
1395 unsigned CHS1 : 1;
1396 unsigned CHS2 : 1;
1397 unsigned CHS3 : 1;
1398 unsigned CHS4 : 1;
1399 unsigned : 1;
1402 struct
1404 unsigned : 1;
1405 unsigned ADGO : 1;
1406 unsigned : 1;
1407 unsigned : 1;
1408 unsigned : 1;
1409 unsigned : 1;
1410 unsigned : 1;
1411 unsigned : 1;
1414 struct
1416 unsigned : 1;
1417 unsigned GO : 1;
1418 unsigned : 1;
1419 unsigned : 1;
1420 unsigned : 1;
1421 unsigned : 1;
1422 unsigned : 1;
1423 unsigned : 1;
1426 struct
1428 unsigned : 2;
1429 unsigned CHS : 5;
1430 unsigned : 1;
1432 } __ADCON0bits_t;
1434 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1436 #define _ADON 0x01
1437 #define _GO_NOT_DONE 0x02
1438 #define _ADGO 0x02
1439 #define _GO 0x02
1440 #define _CHS0 0x04
1441 #define _CHS1 0x08
1442 #define _CHS2 0x10
1443 #define _CHS3 0x20
1444 #define _CHS4 0x40
1446 //==============================================================================
1449 //==============================================================================
1450 // ADCON1 Bits
1452 extern __at(0x009E) __sfr ADCON1;
1454 typedef union
1456 struct
1458 unsigned ADPREF0 : 1;
1459 unsigned ADPREF1 : 1;
1460 unsigned : 1;
1461 unsigned : 1;
1462 unsigned ADCS0 : 1;
1463 unsigned ADCS1 : 1;
1464 unsigned ADCS2 : 1;
1465 unsigned ADFM : 1;
1468 struct
1470 unsigned ADPREF : 2;
1471 unsigned : 6;
1474 struct
1476 unsigned : 4;
1477 unsigned ADCS : 3;
1478 unsigned : 1;
1480 } __ADCON1bits_t;
1482 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1484 #define _ADPREF0 0x01
1485 #define _ADPREF1 0x02
1486 #define _ADCS0 0x10
1487 #define _ADCS1 0x20
1488 #define _ADCS2 0x40
1489 #define _ADFM 0x80
1491 //==============================================================================
1494 //==============================================================================
1495 // LATA Bits
1497 extern __at(0x010C) __sfr LATA;
1499 typedef struct
1501 unsigned LATA0 : 1;
1502 unsigned LATA1 : 1;
1503 unsigned LATA2 : 1;
1504 unsigned LATA3 : 1;
1505 unsigned LATA4 : 1;
1506 unsigned LATA5 : 1;
1507 unsigned LATA6 : 1;
1508 unsigned LATA7 : 1;
1509 } __LATAbits_t;
1511 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1513 #define _LATA0 0x01
1514 #define _LATA1 0x02
1515 #define _LATA2 0x04
1516 #define _LATA3 0x08
1517 #define _LATA4 0x10
1518 #define _LATA5 0x20
1519 #define _LATA6 0x40
1520 #define _LATA7 0x80
1522 //==============================================================================
1525 //==============================================================================
1526 // LATB Bits
1528 extern __at(0x010D) __sfr LATB;
1530 typedef struct
1532 unsigned LATB0 : 1;
1533 unsigned LATB1 : 1;
1534 unsigned LATB2 : 1;
1535 unsigned LATB3 : 1;
1536 unsigned LATB4 : 1;
1537 unsigned LATB5 : 1;
1538 unsigned LATB6 : 1;
1539 unsigned LATB7 : 1;
1540 } __LATBbits_t;
1542 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1544 #define _LATB0 0x01
1545 #define _LATB1 0x02
1546 #define _LATB2 0x04
1547 #define _LATB3 0x08
1548 #define _LATB4 0x10
1549 #define _LATB5 0x20
1550 #define _LATB6 0x40
1551 #define _LATB7 0x80
1553 //==============================================================================
1556 //==============================================================================
1557 // LATC Bits
1559 extern __at(0x010E) __sfr LATC;
1561 typedef struct
1563 unsigned LATC0 : 1;
1564 unsigned LATC1 : 1;
1565 unsigned LATC2 : 1;
1566 unsigned LATC3 : 1;
1567 unsigned LATC4 : 1;
1568 unsigned LATC5 : 1;
1569 unsigned LATC6 : 1;
1570 unsigned LATC7 : 1;
1571 } __LATCbits_t;
1573 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1575 #define _LATC0 0x01
1576 #define _LATC1 0x02
1577 #define _LATC2 0x04
1578 #define _LATC3 0x08
1579 #define _LATC4 0x10
1580 #define _LATC5 0x20
1581 #define _LATC6 0x40
1582 #define _LATC7 0x80
1584 //==============================================================================
1587 //==============================================================================
1588 // LATD Bits
1590 extern __at(0x010F) __sfr LATD;
1592 typedef struct
1594 unsigned LATD0 : 1;
1595 unsigned LATD1 : 1;
1596 unsigned LATD2 : 1;
1597 unsigned LATD3 : 1;
1598 unsigned LATD4 : 1;
1599 unsigned LATD5 : 1;
1600 unsigned LATD6 : 1;
1601 unsigned LATD7 : 1;
1602 } __LATDbits_t;
1604 extern __at(0x010F) volatile __LATDbits_t LATDbits;
1606 #define _LATD0 0x01
1607 #define _LATD1 0x02
1608 #define _LATD2 0x04
1609 #define _LATD3 0x08
1610 #define _LATD4 0x10
1611 #define _LATD5 0x20
1612 #define _LATD6 0x40
1613 #define _LATD7 0x80
1615 //==============================================================================
1618 //==============================================================================
1619 // LATE Bits
1621 extern __at(0x0110) __sfr LATE;
1623 typedef struct
1625 unsigned LATE0 : 1;
1626 unsigned LATE1 : 1;
1627 unsigned LATE2 : 1;
1628 unsigned LATE3 : 1;
1629 unsigned LATE4 : 1;
1630 unsigned LATE5 : 1;
1631 unsigned LATE6 : 1;
1632 unsigned LATE7 : 1;
1633 } __LATEbits_t;
1635 extern __at(0x0110) volatile __LATEbits_t LATEbits;
1637 #define _LATE0 0x01
1638 #define _LATE1 0x02
1639 #define _LATE2 0x04
1640 #define _LATE3 0x08
1641 #define _LATE4 0x10
1642 #define _LATE5 0x20
1643 #define _LATE6 0x40
1644 #define _LATE7 0x80
1646 //==============================================================================
1649 //==============================================================================
1650 // BORCON Bits
1652 extern __at(0x0116) __sfr BORCON;
1654 typedef struct
1656 unsigned BORRDY : 1;
1657 unsigned : 1;
1658 unsigned : 1;
1659 unsigned : 1;
1660 unsigned : 1;
1661 unsigned : 1;
1662 unsigned BORFS : 1;
1663 unsigned SBOREN : 1;
1664 } __BORCONbits_t;
1666 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1668 #define _BORRDY 0x01
1669 #define _BORFS 0x40
1670 #define _SBOREN 0x80
1672 //==============================================================================
1675 //==============================================================================
1676 // FVRCON Bits
1678 extern __at(0x0117) __sfr FVRCON;
1680 typedef union
1682 struct
1684 unsigned ADFVR0 : 1;
1685 unsigned ADFVR1 : 1;
1686 unsigned : 1;
1687 unsigned : 1;
1688 unsigned TSRNG : 1;
1689 unsigned TSEN : 1;
1690 unsigned FVRRDY : 1;
1691 unsigned FVREN : 1;
1694 struct
1696 unsigned ADFVR : 2;
1697 unsigned : 6;
1699 } __FVRCONbits_t;
1701 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1703 #define _ADFVR0 0x01
1704 #define _ADFVR1 0x02
1705 #define _TSRNG 0x10
1706 #define _TSEN 0x20
1707 #define _FVRRDY 0x40
1708 #define _FVREN 0x80
1710 //==============================================================================
1713 //==============================================================================
1714 // APFCON Bits
1716 extern __at(0x011D) __sfr APFCON;
1718 typedef struct
1720 unsigned CCP2SEL : 1;
1721 unsigned T3CKISEL : 1;
1722 unsigned : 1;
1723 unsigned : 1;
1724 unsigned : 1;
1725 unsigned : 1;
1726 unsigned : 1;
1727 unsigned : 1;
1728 } __APFCONbits_t;
1730 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1732 #define _CCP2SEL 0x01
1733 #define _T3CKISEL 0x02
1735 //==============================================================================
1738 //==============================================================================
1739 // ANSELA Bits
1741 extern __at(0x018C) __sfr ANSELA;
1743 typedef struct
1745 unsigned ANSA0 : 1;
1746 unsigned ANSA1 : 1;
1747 unsigned ANSA2 : 1;
1748 unsigned ANSA3 : 1;
1749 unsigned : 1;
1750 unsigned ANSA5 : 1;
1751 unsigned : 1;
1752 unsigned : 1;
1753 } __ANSELAbits_t;
1755 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1757 #define _ANSA0 0x01
1758 #define _ANSA1 0x02
1759 #define _ANSA2 0x04
1760 #define _ANSA3 0x08
1761 #define _ANSA5 0x20
1763 //==============================================================================
1766 //==============================================================================
1767 // ANSELB Bits
1769 extern __at(0x018D) __sfr ANSELB;
1771 typedef union
1773 struct
1775 unsigned ANSB0 : 1;
1776 unsigned ANSB1 : 1;
1777 unsigned ANSB2 : 1;
1778 unsigned ANSB3 : 1;
1779 unsigned ANSB4 : 1;
1780 unsigned ANSB5 : 1;
1781 unsigned : 1;
1782 unsigned : 1;
1785 struct
1787 unsigned ANSB : 6;
1788 unsigned : 2;
1790 } __ANSELBbits_t;
1792 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1794 #define _ANSB0 0x01
1795 #define _ANSB1 0x02
1796 #define _ANSB2 0x04
1797 #define _ANSB3 0x08
1798 #define _ANSB4 0x10
1799 #define _ANSB5 0x20
1801 //==============================================================================
1804 //==============================================================================
1805 // ANSELD Bits
1807 extern __at(0x018F) __sfr ANSELD;
1809 typedef union
1811 struct
1813 unsigned ANSD0 : 1;
1814 unsigned ANSD1 : 1;
1815 unsigned ANSD2 : 1;
1816 unsigned ANSD3 : 1;
1817 unsigned : 1;
1818 unsigned : 1;
1819 unsigned : 1;
1820 unsigned : 1;
1823 struct
1825 unsigned ANSD : 4;
1826 unsigned : 4;
1828 } __ANSELDbits_t;
1830 extern __at(0x018F) volatile __ANSELDbits_t ANSELDbits;
1832 #define _ANSD0 0x01
1833 #define _ANSD1 0x02
1834 #define _ANSD2 0x04
1835 #define _ANSD3 0x08
1837 //==============================================================================
1840 //==============================================================================
1841 // ANSELE Bits
1843 extern __at(0x0190) __sfr ANSELE;
1845 typedef union
1847 struct
1849 unsigned ANSE0 : 1;
1850 unsigned ANSE1 : 1;
1851 unsigned ANSE2 : 1;
1852 unsigned : 1;
1853 unsigned : 1;
1854 unsigned : 1;
1855 unsigned : 1;
1856 unsigned : 1;
1859 struct
1861 unsigned ANSE : 3;
1862 unsigned : 5;
1864 } __ANSELEbits_t;
1866 extern __at(0x0190) volatile __ANSELEbits_t ANSELEbits;
1868 #define _ANSE0 0x01
1869 #define _ANSE1 0x02
1870 #define _ANSE2 0x04
1872 //==============================================================================
1874 extern __at(0x0191) __sfr PMADR;
1875 extern __at(0x0191) __sfr PMADRL;
1876 extern __at(0x0192) __sfr PMADRH;
1877 extern __at(0x0193) __sfr PMDAT;
1878 extern __at(0x0193) __sfr PMDATL;
1879 extern __at(0x0194) __sfr PMDATH;
1881 //==============================================================================
1882 // PMCON1 Bits
1884 extern __at(0x0195) __sfr PMCON1;
1886 typedef struct
1888 unsigned RD : 1;
1889 unsigned WR : 1;
1890 unsigned WREN : 1;
1891 unsigned WRERR : 1;
1892 unsigned FREE : 1;
1893 unsigned LWLO : 1;
1894 unsigned CFGS : 1;
1895 unsigned : 1;
1896 } __PMCON1bits_t;
1898 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1900 #define _RD 0x01
1901 #define _WR 0x02
1902 #define _WREN 0x04
1903 #define _WRERR 0x08
1904 #define _FREE 0x10
1905 #define _LWLO 0x20
1906 #define _CFGS 0x40
1908 //==============================================================================
1910 extern __at(0x0196) __sfr PMCON2;
1912 //==============================================================================
1913 // VREGCON Bits
1915 extern __at(0x0197) __sfr VREGCON;
1917 typedef struct
1919 unsigned : 1;
1920 unsigned VREGPM : 1;
1921 unsigned : 1;
1922 unsigned : 1;
1923 unsigned : 1;
1924 unsigned : 1;
1925 unsigned : 1;
1926 unsigned : 1;
1927 } __VREGCONbits_t;
1929 extern __at(0x0197) volatile __VREGCONbits_t VREGCONbits;
1931 #define _VREGPM 0x02
1933 //==============================================================================
1935 extern __at(0x0199) __sfr RC1REG;
1936 extern __at(0x0199) __sfr RCREG;
1937 extern __at(0x0199) __sfr RCREG1;
1938 extern __at(0x019A) __sfr TX1REG;
1939 extern __at(0x019A) __sfr TXREG;
1940 extern __at(0x019A) __sfr TXREG1;
1941 extern __at(0x019B) __sfr SP1BRG;
1942 extern __at(0x019B) __sfr SP1BRGL;
1943 extern __at(0x019B) __sfr SPBRG;
1944 extern __at(0x019B) __sfr SPBRGL;
1945 extern __at(0x019B) __sfr SPBRGL1;
1946 extern __at(0x019C) __sfr SP1BRGH;
1947 extern __at(0x019C) __sfr SPBRGH;
1948 extern __at(0x019C) __sfr SPBRGH1;
1950 //==============================================================================
1951 // RC1STA Bits
1953 extern __at(0x019D) __sfr RC1STA;
1955 typedef struct
1957 unsigned RX9D : 1;
1958 unsigned OERR : 1;
1959 unsigned FERR : 1;
1960 unsigned ADDEN : 1;
1961 unsigned CREN : 1;
1962 unsigned SREN : 1;
1963 unsigned RX9 : 1;
1964 unsigned SPEN : 1;
1965 } __RC1STAbits_t;
1967 extern __at(0x019D) volatile __RC1STAbits_t RC1STAbits;
1969 #define _RX9D 0x01
1970 #define _OERR 0x02
1971 #define _FERR 0x04
1972 #define _ADDEN 0x08
1973 #define _CREN 0x10
1974 #define _SREN 0x20
1975 #define _RX9 0x40
1976 #define _SPEN 0x80
1978 //==============================================================================
1981 //==============================================================================
1982 // RCSTA Bits
1984 extern __at(0x019D) __sfr RCSTA;
1986 typedef struct
1988 unsigned RX9D : 1;
1989 unsigned OERR : 1;
1990 unsigned FERR : 1;
1991 unsigned ADDEN : 1;
1992 unsigned CREN : 1;
1993 unsigned SREN : 1;
1994 unsigned RX9 : 1;
1995 unsigned SPEN : 1;
1996 } __RCSTAbits_t;
1998 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
2000 #define _RCSTA_RX9D 0x01
2001 #define _RCSTA_OERR 0x02
2002 #define _RCSTA_FERR 0x04
2003 #define _RCSTA_ADDEN 0x08
2004 #define _RCSTA_CREN 0x10
2005 #define _RCSTA_SREN 0x20
2006 #define _RCSTA_RX9 0x40
2007 #define _RCSTA_SPEN 0x80
2009 //==============================================================================
2012 //==============================================================================
2013 // RCSTA1 Bits
2015 extern __at(0x019D) __sfr RCSTA1;
2017 typedef struct
2019 unsigned RX9D : 1;
2020 unsigned OERR : 1;
2021 unsigned FERR : 1;
2022 unsigned ADDEN : 1;
2023 unsigned CREN : 1;
2024 unsigned SREN : 1;
2025 unsigned RX9 : 1;
2026 unsigned SPEN : 1;
2027 } __RCSTA1bits_t;
2029 extern __at(0x019D) volatile __RCSTA1bits_t RCSTA1bits;
2031 #define _RCSTA1_RX9D 0x01
2032 #define _RCSTA1_OERR 0x02
2033 #define _RCSTA1_FERR 0x04
2034 #define _RCSTA1_ADDEN 0x08
2035 #define _RCSTA1_CREN 0x10
2036 #define _RCSTA1_SREN 0x20
2037 #define _RCSTA1_RX9 0x40
2038 #define _RCSTA1_SPEN 0x80
2040 //==============================================================================
2043 //==============================================================================
2044 // TX1STA Bits
2046 extern __at(0x019E) __sfr TX1STA;
2048 typedef struct
2050 unsigned TX9D : 1;
2051 unsigned TRMT : 1;
2052 unsigned BRGH : 1;
2053 unsigned SENDB : 1;
2054 unsigned SYNC : 1;
2055 unsigned TXEN : 1;
2056 unsigned TX9 : 1;
2057 unsigned CSRC : 1;
2058 } __TX1STAbits_t;
2060 extern __at(0x019E) volatile __TX1STAbits_t TX1STAbits;
2062 #define _TX9D 0x01
2063 #define _TRMT 0x02
2064 #define _BRGH 0x04
2065 #define _SENDB 0x08
2066 #define _SYNC 0x10
2067 #define _TXEN 0x20
2068 #define _TX9 0x40
2069 #define _CSRC 0x80
2071 //==============================================================================
2074 //==============================================================================
2075 // TXSTA Bits
2077 extern __at(0x019E) __sfr TXSTA;
2079 typedef struct
2081 unsigned TX9D : 1;
2082 unsigned TRMT : 1;
2083 unsigned BRGH : 1;
2084 unsigned SENDB : 1;
2085 unsigned SYNC : 1;
2086 unsigned TXEN : 1;
2087 unsigned TX9 : 1;
2088 unsigned CSRC : 1;
2089 } __TXSTAbits_t;
2091 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2093 #define _TXSTA_TX9D 0x01
2094 #define _TXSTA_TRMT 0x02
2095 #define _TXSTA_BRGH 0x04
2096 #define _TXSTA_SENDB 0x08
2097 #define _TXSTA_SYNC 0x10
2098 #define _TXSTA_TXEN 0x20
2099 #define _TXSTA_TX9 0x40
2100 #define _TXSTA_CSRC 0x80
2102 //==============================================================================
2105 //==============================================================================
2106 // TXSTA1 Bits
2108 extern __at(0x019E) __sfr TXSTA1;
2110 typedef struct
2112 unsigned TX9D : 1;
2113 unsigned TRMT : 1;
2114 unsigned BRGH : 1;
2115 unsigned SENDB : 1;
2116 unsigned SYNC : 1;
2117 unsigned TXEN : 1;
2118 unsigned TX9 : 1;
2119 unsigned CSRC : 1;
2120 } __TXSTA1bits_t;
2122 extern __at(0x019E) volatile __TXSTA1bits_t TXSTA1bits;
2124 #define _TXSTA1_TX9D 0x01
2125 #define _TXSTA1_TRMT 0x02
2126 #define _TXSTA1_BRGH 0x04
2127 #define _TXSTA1_SENDB 0x08
2128 #define _TXSTA1_SYNC 0x10
2129 #define _TXSTA1_TXEN 0x20
2130 #define _TXSTA1_TX9 0x40
2131 #define _TXSTA1_CSRC 0x80
2133 //==============================================================================
2136 //==============================================================================
2137 // BAUD1CON Bits
2139 extern __at(0x019F) __sfr BAUD1CON;
2141 typedef struct
2143 unsigned ABDEN : 1;
2144 unsigned WUE : 1;
2145 unsigned : 1;
2146 unsigned BRG16 : 1;
2147 unsigned SCKP : 1;
2148 unsigned : 1;
2149 unsigned RCIDL : 1;
2150 unsigned ABDOVF : 1;
2151 } __BAUD1CONbits_t;
2153 extern __at(0x019F) volatile __BAUD1CONbits_t BAUD1CONbits;
2155 #define _ABDEN 0x01
2156 #define _WUE 0x02
2157 #define _BRG16 0x08
2158 #define _SCKP 0x10
2159 #define _RCIDL 0x40
2160 #define _ABDOVF 0x80
2162 //==============================================================================
2165 //==============================================================================
2166 // BAUDCON Bits
2168 extern __at(0x019F) __sfr BAUDCON;
2170 typedef struct
2172 unsigned ABDEN : 1;
2173 unsigned WUE : 1;
2174 unsigned : 1;
2175 unsigned BRG16 : 1;
2176 unsigned SCKP : 1;
2177 unsigned : 1;
2178 unsigned RCIDL : 1;
2179 unsigned ABDOVF : 1;
2180 } __BAUDCONbits_t;
2182 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2184 #define _BAUDCON_ABDEN 0x01
2185 #define _BAUDCON_WUE 0x02
2186 #define _BAUDCON_BRG16 0x08
2187 #define _BAUDCON_SCKP 0x10
2188 #define _BAUDCON_RCIDL 0x40
2189 #define _BAUDCON_ABDOVF 0x80
2191 //==============================================================================
2194 //==============================================================================
2195 // BAUDCON1 Bits
2197 extern __at(0x019F) __sfr BAUDCON1;
2199 typedef struct
2201 unsigned ABDEN : 1;
2202 unsigned WUE : 1;
2203 unsigned : 1;
2204 unsigned BRG16 : 1;
2205 unsigned SCKP : 1;
2206 unsigned : 1;
2207 unsigned RCIDL : 1;
2208 unsigned ABDOVF : 1;
2209 } __BAUDCON1bits_t;
2211 extern __at(0x019F) volatile __BAUDCON1bits_t BAUDCON1bits;
2213 #define _BAUDCON1_ABDEN 0x01
2214 #define _BAUDCON1_WUE 0x02
2215 #define _BAUDCON1_BRG16 0x08
2216 #define _BAUDCON1_SCKP 0x10
2217 #define _BAUDCON1_RCIDL 0x40
2218 #define _BAUDCON1_ABDOVF 0x80
2220 //==============================================================================
2223 //==============================================================================
2224 // WPUB Bits
2226 extern __at(0x020D) __sfr WPUB;
2228 typedef struct
2230 unsigned WPUB0 : 1;
2231 unsigned WPUB1 : 1;
2232 unsigned WPUB2 : 1;
2233 unsigned WPUB3 : 1;
2234 unsigned WPUB4 : 1;
2235 unsigned WPUB5 : 1;
2236 unsigned WPUB6 : 1;
2237 unsigned WPUB7 : 1;
2238 } __WPUBbits_t;
2240 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2242 #define _WPUB0 0x01
2243 #define _WPUB1 0x02
2244 #define _WPUB2 0x04
2245 #define _WPUB3 0x08
2246 #define _WPUB4 0x10
2247 #define _WPUB5 0x20
2248 #define _WPUB6 0x40
2249 #define _WPUB7 0x80
2251 //==============================================================================
2254 //==============================================================================
2255 // WPUD Bits
2257 extern __at(0x020F) __sfr WPUD;
2259 typedef struct
2261 unsigned WPUD0 : 1;
2262 unsigned WPUD1 : 1;
2263 unsigned WPUD2 : 1;
2264 unsigned WPUD3 : 1;
2265 unsigned WPUD4 : 1;
2266 unsigned WPUD5 : 1;
2267 unsigned WPUD6 : 1;
2268 unsigned WPUD7 : 1;
2269 } __WPUDbits_t;
2271 extern __at(0x020F) volatile __WPUDbits_t WPUDbits;
2273 #define _WPUD0 0x01
2274 #define _WPUD1 0x02
2275 #define _WPUD2 0x04
2276 #define _WPUD3 0x08
2277 #define _WPUD4 0x10
2278 #define _WPUD5 0x20
2279 #define _WPUD6 0x40
2280 #define _WPUD7 0x80
2282 //==============================================================================
2285 //==============================================================================
2286 // WPUE Bits
2288 extern __at(0x0210) __sfr WPUE;
2290 typedef struct
2292 unsigned WPUE0 : 1;
2293 unsigned WPUE1 : 1;
2294 unsigned WPUE2 : 1;
2295 unsigned WPUE3 : 1;
2296 unsigned WPUE4 : 1;
2297 unsigned WPUE5 : 1;
2298 unsigned WPUE6 : 1;
2299 unsigned WPUE7 : 1;
2300 } __WPUEbits_t;
2302 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
2304 #define _WPUE0 0x01
2305 #define _WPUE1 0x02
2306 #define _WPUE2 0x04
2307 #define _WPUE3 0x08
2308 #define _WPUE4 0x10
2309 #define _WPUE5 0x20
2310 #define _WPUE6 0x40
2311 #define _WPUE7 0x80
2313 //==============================================================================
2315 extern __at(0x0211) __sfr SSP1BUF;
2316 extern __at(0x0211) __sfr SSPBUF;
2317 extern __at(0x0212) __sfr SSP1ADD;
2318 extern __at(0x0212) __sfr SSPADD;
2319 extern __at(0x0213) __sfr SSP1MSK;
2320 extern __at(0x0213) __sfr SSPMSK;
2322 //==============================================================================
2323 // SSP1STAT Bits
2325 extern __at(0x0214) __sfr SSP1STAT;
2327 typedef struct
2329 unsigned BF : 1;
2330 unsigned UA : 1;
2331 unsigned R_NOT_W : 1;
2332 unsigned S : 1;
2333 unsigned P : 1;
2334 unsigned D_NOT_A : 1;
2335 unsigned CKE : 1;
2336 unsigned SMP : 1;
2337 } __SSP1STATbits_t;
2339 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2341 #define _BF 0x01
2342 #define _UA 0x02
2343 #define _R_NOT_W 0x04
2344 #define _S 0x08
2345 #define _P 0x10
2346 #define _D_NOT_A 0x20
2347 #define _CKE 0x40
2348 #define _SMP 0x80
2350 //==============================================================================
2353 //==============================================================================
2354 // SSPSTAT Bits
2356 extern __at(0x0214) __sfr SSPSTAT;
2358 typedef struct
2360 unsigned BF : 1;
2361 unsigned UA : 1;
2362 unsigned R_NOT_W : 1;
2363 unsigned S : 1;
2364 unsigned P : 1;
2365 unsigned D_NOT_A : 1;
2366 unsigned CKE : 1;
2367 unsigned SMP : 1;
2368 } __SSPSTATbits_t;
2370 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2372 #define _SSPSTAT_BF 0x01
2373 #define _SSPSTAT_UA 0x02
2374 #define _SSPSTAT_R_NOT_W 0x04
2375 #define _SSPSTAT_S 0x08
2376 #define _SSPSTAT_P 0x10
2377 #define _SSPSTAT_D_NOT_A 0x20
2378 #define _SSPSTAT_CKE 0x40
2379 #define _SSPSTAT_SMP 0x80
2381 //==============================================================================
2384 //==============================================================================
2385 // SSP1CON1 Bits
2387 extern __at(0x0215) __sfr SSP1CON1;
2389 typedef union
2391 struct
2393 unsigned SSPM0 : 1;
2394 unsigned SSPM1 : 1;
2395 unsigned SSPM2 : 1;
2396 unsigned SSPM3 : 1;
2397 unsigned CKP : 1;
2398 unsigned SSPEN : 1;
2399 unsigned SSPOV : 1;
2400 unsigned WCOL : 1;
2403 struct
2405 unsigned SSPM : 4;
2406 unsigned : 4;
2408 } __SSP1CON1bits_t;
2410 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2412 #define _SSPM0 0x01
2413 #define _SSPM1 0x02
2414 #define _SSPM2 0x04
2415 #define _SSPM3 0x08
2416 #define _CKP 0x10
2417 #define _SSPEN 0x20
2418 #define _SSPOV 0x40
2419 #define _WCOL 0x80
2421 //==============================================================================
2424 //==============================================================================
2425 // SSPCON Bits
2427 extern __at(0x0215) __sfr SSPCON;
2429 typedef union
2431 struct
2433 unsigned SSPM0 : 1;
2434 unsigned SSPM1 : 1;
2435 unsigned SSPM2 : 1;
2436 unsigned SSPM3 : 1;
2437 unsigned CKP : 1;
2438 unsigned SSPEN : 1;
2439 unsigned SSPOV : 1;
2440 unsigned WCOL : 1;
2443 struct
2445 unsigned SSPM : 4;
2446 unsigned : 4;
2448 } __SSPCONbits_t;
2450 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2452 #define _SSPCON_SSPM0 0x01
2453 #define _SSPCON_SSPM1 0x02
2454 #define _SSPCON_SSPM2 0x04
2455 #define _SSPCON_SSPM3 0x08
2456 #define _SSPCON_CKP 0x10
2457 #define _SSPCON_SSPEN 0x20
2458 #define _SSPCON_SSPOV 0x40
2459 #define _SSPCON_WCOL 0x80
2461 //==============================================================================
2464 //==============================================================================
2465 // SSPCON1 Bits
2467 extern __at(0x0215) __sfr SSPCON1;
2469 typedef union
2471 struct
2473 unsigned SSPM0 : 1;
2474 unsigned SSPM1 : 1;
2475 unsigned SSPM2 : 1;
2476 unsigned SSPM3 : 1;
2477 unsigned CKP : 1;
2478 unsigned SSPEN : 1;
2479 unsigned SSPOV : 1;
2480 unsigned WCOL : 1;
2483 struct
2485 unsigned SSPM : 4;
2486 unsigned : 4;
2488 } __SSPCON1bits_t;
2490 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2492 #define _SSPCON1_SSPM0 0x01
2493 #define _SSPCON1_SSPM1 0x02
2494 #define _SSPCON1_SSPM2 0x04
2495 #define _SSPCON1_SSPM3 0x08
2496 #define _SSPCON1_CKP 0x10
2497 #define _SSPCON1_SSPEN 0x20
2498 #define _SSPCON1_SSPOV 0x40
2499 #define _SSPCON1_WCOL 0x80
2501 //==============================================================================
2504 //==============================================================================
2505 // SSP1CON2 Bits
2507 extern __at(0x0216) __sfr SSP1CON2;
2509 typedef struct
2511 unsigned SEN : 1;
2512 unsigned RSEN : 1;
2513 unsigned PEN : 1;
2514 unsigned RCEN : 1;
2515 unsigned ACKEN : 1;
2516 unsigned ACKDT : 1;
2517 unsigned ACKSTAT : 1;
2518 unsigned GCEN : 1;
2519 } __SSP1CON2bits_t;
2521 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2523 #define _SEN 0x01
2524 #define _RSEN 0x02
2525 #define _PEN 0x04
2526 #define _RCEN 0x08
2527 #define _ACKEN 0x10
2528 #define _ACKDT 0x20
2529 #define _ACKSTAT 0x40
2530 #define _GCEN 0x80
2532 //==============================================================================
2535 //==============================================================================
2536 // SSPCON2 Bits
2538 extern __at(0x0216) __sfr SSPCON2;
2540 typedef struct
2542 unsigned SEN : 1;
2543 unsigned RSEN : 1;
2544 unsigned PEN : 1;
2545 unsigned RCEN : 1;
2546 unsigned ACKEN : 1;
2547 unsigned ACKDT : 1;
2548 unsigned ACKSTAT : 1;
2549 unsigned GCEN : 1;
2550 } __SSPCON2bits_t;
2552 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2554 #define _SSPCON2_SEN 0x01
2555 #define _SSPCON2_RSEN 0x02
2556 #define _SSPCON2_PEN 0x04
2557 #define _SSPCON2_RCEN 0x08
2558 #define _SSPCON2_ACKEN 0x10
2559 #define _SSPCON2_ACKDT 0x20
2560 #define _SSPCON2_ACKSTAT 0x40
2561 #define _SSPCON2_GCEN 0x80
2563 //==============================================================================
2566 //==============================================================================
2567 // SSP1CON3 Bits
2569 extern __at(0x0217) __sfr SSP1CON3;
2571 typedef struct
2573 unsigned DHEN : 1;
2574 unsigned AHEN : 1;
2575 unsigned SBCDE : 1;
2576 unsigned SDAHT : 1;
2577 unsigned BOEN : 1;
2578 unsigned SCIE : 1;
2579 unsigned PCIE : 1;
2580 unsigned ACKTIM : 1;
2581 } __SSP1CON3bits_t;
2583 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2585 #define _DHEN 0x01
2586 #define _AHEN 0x02
2587 #define _SBCDE 0x04
2588 #define _SDAHT 0x08
2589 #define _BOEN 0x10
2590 #define _SCIE 0x20
2591 #define _PCIE 0x40
2592 #define _ACKTIM 0x80
2594 //==============================================================================
2597 //==============================================================================
2598 // SSPCON3 Bits
2600 extern __at(0x0217) __sfr SSPCON3;
2602 typedef struct
2604 unsigned DHEN : 1;
2605 unsigned AHEN : 1;
2606 unsigned SBCDE : 1;
2607 unsigned SDAHT : 1;
2608 unsigned BOEN : 1;
2609 unsigned SCIE : 1;
2610 unsigned PCIE : 1;
2611 unsigned ACKTIM : 1;
2612 } __SSPCON3bits_t;
2614 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2616 #define _SSPCON3_DHEN 0x01
2617 #define _SSPCON3_AHEN 0x02
2618 #define _SSPCON3_SBCDE 0x04
2619 #define _SSPCON3_SDAHT 0x08
2620 #define _SSPCON3_BOEN 0x10
2621 #define _SSPCON3_SCIE 0x20
2622 #define _SSPCON3_PCIE 0x40
2623 #define _SSPCON3_ACKTIM 0x80
2625 //==============================================================================
2627 extern __at(0x0219) __sfr SSP2BUF;
2628 extern __at(0x021A) __sfr SSP2ADD;
2629 extern __at(0x021B) __sfr SSP2MSK;
2631 //==============================================================================
2632 // SSP2STAT Bits
2634 extern __at(0x021C) __sfr SSP2STAT;
2636 typedef struct
2638 unsigned BF : 1;
2639 unsigned UA : 1;
2640 unsigned R_NOT_W : 1;
2641 unsigned S : 1;
2642 unsigned P : 1;
2643 unsigned D_NOT_A : 1;
2644 unsigned CKE : 1;
2645 unsigned SMP : 1;
2646 } __SSP2STATbits_t;
2648 extern __at(0x021C) volatile __SSP2STATbits_t SSP2STATbits;
2650 #define _SSP2STAT_BF 0x01
2651 #define _SSP2STAT_UA 0x02
2652 #define _SSP2STAT_R_NOT_W 0x04
2653 #define _SSP2STAT_S 0x08
2654 #define _SSP2STAT_P 0x10
2655 #define _SSP2STAT_D_NOT_A 0x20
2656 #define _SSP2STAT_CKE 0x40
2657 #define _SSP2STAT_SMP 0x80
2659 //==============================================================================
2662 //==============================================================================
2663 // SSP2CON1 Bits
2665 extern __at(0x021D) __sfr SSP2CON1;
2667 typedef union
2669 struct
2671 unsigned SSPM0 : 1;
2672 unsigned SSPM1 : 1;
2673 unsigned SSPM2 : 1;
2674 unsigned SSPM3 : 1;
2675 unsigned CKP : 1;
2676 unsigned SSPEN : 1;
2677 unsigned SSPOV : 1;
2678 unsigned WCOL : 1;
2681 struct
2683 unsigned SSPM : 4;
2684 unsigned : 4;
2686 } __SSP2CON1bits_t;
2688 extern __at(0x021D) volatile __SSP2CON1bits_t SSP2CON1bits;
2690 #define _SSP2CON1_SSPM0 0x01
2691 #define _SSP2CON1_SSPM1 0x02
2692 #define _SSP2CON1_SSPM2 0x04
2693 #define _SSP2CON1_SSPM3 0x08
2694 #define _SSP2CON1_CKP 0x10
2695 #define _SSP2CON1_SSPEN 0x20
2696 #define _SSP2CON1_SSPOV 0x40
2697 #define _SSP2CON1_WCOL 0x80
2699 //==============================================================================
2702 //==============================================================================
2703 // SSP2CON2 Bits
2705 extern __at(0x021E) __sfr SSP2CON2;
2707 typedef struct
2709 unsigned SEN : 1;
2710 unsigned RSEN : 1;
2711 unsigned PEN : 1;
2712 unsigned RCEN : 1;
2713 unsigned ACKEN : 1;
2714 unsigned ACKDT : 1;
2715 unsigned ACKSTAT : 1;
2716 unsigned GCEN : 1;
2717 } __SSP2CON2bits_t;
2719 extern __at(0x021E) volatile __SSP2CON2bits_t SSP2CON2bits;
2721 #define _SSP2CON2_SEN 0x01
2722 #define _SSP2CON2_RSEN 0x02
2723 #define _SSP2CON2_PEN 0x04
2724 #define _SSP2CON2_RCEN 0x08
2725 #define _SSP2CON2_ACKEN 0x10
2726 #define _SSP2CON2_ACKDT 0x20
2727 #define _SSP2CON2_ACKSTAT 0x40
2728 #define _SSP2CON2_GCEN 0x80
2730 //==============================================================================
2733 //==============================================================================
2734 // SSP2CON3 Bits
2736 extern __at(0x021F) __sfr SSP2CON3;
2738 typedef struct
2740 unsigned DHEN : 1;
2741 unsigned AHEN : 1;
2742 unsigned SBCDE : 1;
2743 unsigned SDAHT : 1;
2744 unsigned BOEN : 1;
2745 unsigned SCIE : 1;
2746 unsigned PCIE : 1;
2747 unsigned ACKTIM : 1;
2748 } __SSP2CON3bits_t;
2750 extern __at(0x021F) volatile __SSP2CON3bits_t SSP2CON3bits;
2752 #define _SSP2CON3_DHEN 0x01
2753 #define _SSP2CON3_AHEN 0x02
2754 #define _SSP2CON3_SBCDE 0x04
2755 #define _SSP2CON3_SDAHT 0x08
2756 #define _SSP2CON3_BOEN 0x10
2757 #define _SSP2CON3_SCIE 0x20
2758 #define _SSP2CON3_PCIE 0x40
2759 #define _SSP2CON3_ACKTIM 0x80
2761 //==============================================================================
2764 //==============================================================================
2765 // PORTF Bits
2767 extern __at(0x028C) __sfr PORTF;
2769 typedef struct
2771 unsigned RF0 : 1;
2772 unsigned RF1 : 1;
2773 unsigned RF2 : 1;
2774 unsigned RF3 : 1;
2775 unsigned RF4 : 1;
2776 unsigned RF5 : 1;
2777 unsigned RF6 : 1;
2778 unsigned RF7 : 1;
2779 } __PORTFbits_t;
2781 extern __at(0x028C) volatile __PORTFbits_t PORTFbits;
2783 #define _RF0 0x01
2784 #define _RF1 0x02
2785 #define _RF2 0x04
2786 #define _RF3 0x08
2787 #define _RF4 0x10
2788 #define _RF5 0x20
2789 #define _RF6 0x40
2790 #define _RF7 0x80
2792 //==============================================================================
2795 //==============================================================================
2796 // PORTG Bits
2798 extern __at(0x028D) __sfr PORTG;
2800 typedef union
2802 struct
2804 unsigned RG0 : 1;
2805 unsigned RG1 : 1;
2806 unsigned RG2 : 1;
2807 unsigned RG3 : 1;
2808 unsigned RG4 : 1;
2809 unsigned RG5 : 1;
2810 unsigned : 1;
2811 unsigned : 1;
2814 struct
2816 unsigned RG : 6;
2817 unsigned : 2;
2819 } __PORTGbits_t;
2821 extern __at(0x028D) volatile __PORTGbits_t PORTGbits;
2823 #define _RG0 0x01
2824 #define _RG1 0x02
2825 #define _RG2 0x04
2826 #define _RG3 0x08
2827 #define _RG4 0x10
2828 #define _RG5 0x20
2830 //==============================================================================
2832 extern __at(0x0291) __sfr CCPR1;
2833 extern __at(0x0291) __sfr CCPR1L;
2834 extern __at(0x0292) __sfr CCPR1H;
2836 //==============================================================================
2837 // CCP1CON Bits
2839 extern __at(0x0293) __sfr CCP1CON;
2841 typedef union
2843 struct
2845 unsigned CCP1M0 : 1;
2846 unsigned CCP1M1 : 1;
2847 unsigned CCP1M2 : 1;
2848 unsigned CCP1M3 : 1;
2849 unsigned DC1B0 : 1;
2850 unsigned DC1B1 : 1;
2851 unsigned : 1;
2852 unsigned : 1;
2855 struct
2857 unsigned CCP1M : 4;
2858 unsigned : 4;
2861 struct
2863 unsigned : 4;
2864 unsigned DC1B : 2;
2865 unsigned : 2;
2867 } __CCP1CONbits_t;
2869 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2871 #define _CCP1M0 0x01
2872 #define _CCP1M1 0x02
2873 #define _CCP1M2 0x04
2874 #define _CCP1M3 0x08
2875 #define _DC1B0 0x10
2876 #define _DC1B1 0x20
2878 //==============================================================================
2880 extern __at(0x0298) __sfr CCPR2;
2881 extern __at(0x0298) __sfr CCPR2L;
2882 extern __at(0x0299) __sfr CCPR2H;
2884 //==============================================================================
2885 // CCP2CON Bits
2887 extern __at(0x029A) __sfr CCP2CON;
2889 typedef union
2891 struct
2893 unsigned CCP2M0 : 1;
2894 unsigned CCP2M1 : 1;
2895 unsigned CCP2M2 : 1;
2896 unsigned CCP2M3 : 1;
2897 unsigned DC2B0 : 1;
2898 unsigned DC2B1 : 1;
2899 unsigned : 1;
2900 unsigned : 1;
2903 struct
2905 unsigned CCP2M : 4;
2906 unsigned : 4;
2909 struct
2911 unsigned : 4;
2912 unsigned DC2B : 2;
2913 unsigned : 2;
2915 } __CCP2CONbits_t;
2917 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2919 #define _CCP2M0 0x01
2920 #define _CCP2M1 0x02
2921 #define _CCP2M2 0x04
2922 #define _CCP2M3 0x08
2923 #define _DC2B0 0x10
2924 #define _DC2B1 0x20
2926 //==============================================================================
2929 //==============================================================================
2930 // CCPTMRS0 Bits
2932 extern __at(0x029D) __sfr CCPTMRS0;
2934 typedef union
2936 struct
2938 unsigned C1TSEL0 : 1;
2939 unsigned C1TSEL1 : 1;
2940 unsigned C2TSEL0 : 1;
2941 unsigned C2TSEL1 : 1;
2942 unsigned C3TSEL0 : 1;
2943 unsigned C3TSEL1 : 1;
2944 unsigned C4TSEL0 : 1;
2945 unsigned C4TSEL1 : 1;
2948 struct
2950 unsigned C1TSEL : 2;
2951 unsigned : 6;
2954 struct
2956 unsigned : 2;
2957 unsigned C2TSEL : 2;
2958 unsigned : 4;
2961 struct
2963 unsigned : 4;
2964 unsigned C3TSEL : 2;
2965 unsigned : 2;
2968 struct
2970 unsigned : 6;
2971 unsigned C4TSEL : 2;
2973 } __CCPTMRS0bits_t;
2975 extern __at(0x029D) volatile __CCPTMRS0bits_t CCPTMRS0bits;
2977 #define _C1TSEL0 0x01
2978 #define _C1TSEL1 0x02
2979 #define _C2TSEL0 0x04
2980 #define _C2TSEL1 0x08
2981 #define _C3TSEL0 0x10
2982 #define _C3TSEL1 0x20
2983 #define _C4TSEL0 0x40
2984 #define _C4TSEL1 0x80
2986 //==============================================================================
2989 //==============================================================================
2990 // CCPTMRS1 Bits
2992 extern __at(0x029E) __sfr CCPTMRS1;
2994 typedef union
2996 struct
2998 unsigned C5TSEL0 : 1;
2999 unsigned C5TSEL1 : 1;
3000 unsigned C6TSEL0 : 1;
3001 unsigned C6TSEL1 : 1;
3002 unsigned C7TSEL0 : 1;
3003 unsigned C7TSEL1 : 1;
3004 unsigned C8TSEL0 : 1;
3005 unsigned C8TSEL1 : 1;
3008 struct
3010 unsigned C5TSEL : 2;
3011 unsigned : 6;
3014 struct
3016 unsigned : 2;
3017 unsigned C6TSEL : 2;
3018 unsigned : 4;
3021 struct
3023 unsigned : 4;
3024 unsigned C7TSEL : 2;
3025 unsigned : 2;
3028 struct
3030 unsigned : 6;
3031 unsigned C8TSEL : 2;
3033 } __CCPTMRS1bits_t;
3035 extern __at(0x029E) volatile __CCPTMRS1bits_t CCPTMRS1bits;
3037 #define _C5TSEL0 0x01
3038 #define _C5TSEL1 0x02
3039 #define _C6TSEL0 0x04
3040 #define _C6TSEL1 0x08
3041 #define _C7TSEL0 0x10
3042 #define _C7TSEL1 0x20
3043 #define _C8TSEL0 0x40
3044 #define _C8TSEL1 0x80
3046 //==============================================================================
3049 //==============================================================================
3050 // CCPTMRS2 Bits
3052 extern __at(0x029F) __sfr CCPTMRS2;
3054 typedef union
3056 struct
3058 unsigned C9TSEL0 : 1;
3059 unsigned C9TSEL1 : 1;
3060 unsigned C10TSEL0 : 1;
3061 unsigned C10TSEL1 : 1;
3062 unsigned : 1;
3063 unsigned : 1;
3064 unsigned : 1;
3065 unsigned : 1;
3068 struct
3070 unsigned C9TSEL : 2;
3071 unsigned : 6;
3074 struct
3076 unsigned : 2;
3077 unsigned C10TSEL : 2;
3078 unsigned : 4;
3080 } __CCPTMRS2bits_t;
3082 extern __at(0x029F) volatile __CCPTMRS2bits_t CCPTMRS2bits;
3084 #define _C9TSEL0 0x01
3085 #define _C9TSEL1 0x02
3086 #define _C10TSEL0 0x04
3087 #define _C10TSEL1 0x08
3089 //==============================================================================
3092 //==============================================================================
3093 // TRISF Bits
3095 extern __at(0x030C) __sfr TRISF;
3097 typedef struct
3099 unsigned TRISF0 : 1;
3100 unsigned TRISF1 : 1;
3101 unsigned TRISF2 : 1;
3102 unsigned TRISF3 : 1;
3103 unsigned TRISF4 : 1;
3104 unsigned TRISF5 : 1;
3105 unsigned TRISF6 : 1;
3106 unsigned TRISF7 : 1;
3107 } __TRISFbits_t;
3109 extern __at(0x030C) volatile __TRISFbits_t TRISFbits;
3111 #define _TRISF0 0x01
3112 #define _TRISF1 0x02
3113 #define _TRISF2 0x04
3114 #define _TRISF3 0x08
3115 #define _TRISF4 0x10
3116 #define _TRISF5 0x20
3117 #define _TRISF6 0x40
3118 #define _TRISF7 0x80
3120 //==============================================================================
3123 //==============================================================================
3124 // TRISG Bits
3126 extern __at(0x030D) __sfr TRISG;
3128 typedef union
3130 struct
3132 unsigned TRISG0 : 1;
3133 unsigned TRISG1 : 1;
3134 unsigned TRISG2 : 1;
3135 unsigned TRISG3 : 1;
3136 unsigned TRISG4 : 1;
3137 unsigned : 1;
3138 unsigned : 1;
3139 unsigned : 1;
3142 struct
3144 unsigned TRISG : 5;
3145 unsigned : 3;
3147 } __TRISGbits_t;
3149 extern __at(0x030D) volatile __TRISGbits_t TRISGbits;
3151 #define _TRISG0 0x01
3152 #define _TRISG1 0x02
3153 #define _TRISG2 0x04
3154 #define _TRISG3 0x08
3155 #define _TRISG4 0x10
3157 //==============================================================================
3159 extern __at(0x0311) __sfr CCPR3;
3160 extern __at(0x0311) __sfr CCPR3L;
3161 extern __at(0x0312) __sfr CCPR3H;
3163 //==============================================================================
3164 // CCP3CON Bits
3166 extern __at(0x0313) __sfr CCP3CON;
3168 typedef union
3170 struct
3172 unsigned CCP3M0 : 1;
3173 unsigned CCP3M1 : 1;
3174 unsigned CCP3M2 : 1;
3175 unsigned CCP3M3 : 1;
3176 unsigned DC3B0 : 1;
3177 unsigned DC3B1 : 1;
3178 unsigned : 1;
3179 unsigned : 1;
3182 struct
3184 unsigned CCP3M : 4;
3185 unsigned : 4;
3188 struct
3190 unsigned : 4;
3191 unsigned DC3B : 2;
3192 unsigned : 2;
3194 } __CCP3CONbits_t;
3196 extern __at(0x0313) volatile __CCP3CONbits_t CCP3CONbits;
3198 #define _CCP3M0 0x01
3199 #define _CCP3M1 0x02
3200 #define _CCP3M2 0x04
3201 #define _CCP3M3 0x08
3202 #define _DC3B0 0x10
3203 #define _DC3B1 0x20
3205 //==============================================================================
3207 extern __at(0x0318) __sfr CCPR4;
3208 extern __at(0x0318) __sfr CCPR4L;
3209 extern __at(0x0319) __sfr CCPR4H;
3211 //==============================================================================
3212 // CCP4CON Bits
3214 extern __at(0x031A) __sfr CCP4CON;
3216 typedef union
3218 struct
3220 unsigned CCP4M0 : 1;
3221 unsigned CCP4M1 : 1;
3222 unsigned CCP4M2 : 1;
3223 unsigned CCP4M3 : 1;
3224 unsigned DC4B0 : 1;
3225 unsigned DC4B1 : 1;
3226 unsigned : 1;
3227 unsigned : 1;
3230 struct
3232 unsigned CCP4M : 4;
3233 unsigned : 4;
3236 struct
3238 unsigned : 4;
3239 unsigned DC4B : 2;
3240 unsigned : 2;
3242 } __CCP4CONbits_t;
3244 extern __at(0x031A) volatile __CCP4CONbits_t CCP4CONbits;
3246 #define _CCP4M0 0x01
3247 #define _CCP4M1 0x02
3248 #define _CCP4M2 0x04
3249 #define _CCP4M3 0x08
3250 #define _DC4B0 0x10
3251 #define _DC4B1 0x20
3253 //==============================================================================
3255 extern __at(0x031C) __sfr CCPR5;
3256 extern __at(0x031C) __sfr CCPR5L;
3257 extern __at(0x031D) __sfr CCPR5H;
3259 //==============================================================================
3260 // CCP5CON Bits
3262 extern __at(0x031E) __sfr CCP5CON;
3264 typedef union
3266 struct
3268 unsigned CCP5M0 : 1;
3269 unsigned CCP5M1 : 1;
3270 unsigned CCP5M2 : 1;
3271 unsigned CCP5M3 : 1;
3272 unsigned DC5B0 : 1;
3273 unsigned DC5B1 : 1;
3274 unsigned : 1;
3275 unsigned : 1;
3278 struct
3280 unsigned CCP5M : 4;
3281 unsigned : 4;
3284 struct
3286 unsigned : 4;
3287 unsigned DC5B : 2;
3288 unsigned : 2;
3290 } __CCP5CONbits_t;
3292 extern __at(0x031E) volatile __CCP5CONbits_t CCP5CONbits;
3294 #define _CCP5M0 0x01
3295 #define _CCP5M1 0x02
3296 #define _CCP5M2 0x04
3297 #define _CCP5M3 0x08
3298 #define _DC5B0 0x10
3299 #define _DC5B1 0x20
3301 //==============================================================================
3304 //==============================================================================
3305 // LATF Bits
3307 extern __at(0x038C) __sfr LATF;
3309 typedef struct
3311 unsigned LATF0 : 1;
3312 unsigned LATF1 : 1;
3313 unsigned LATF2 : 1;
3314 unsigned LATF3 : 1;
3315 unsigned LATF4 : 1;
3316 unsigned LATF5 : 1;
3317 unsigned LATF6 : 1;
3318 unsigned LATF7 : 1;
3319 } __LATFbits_t;
3321 extern __at(0x038C) volatile __LATFbits_t LATFbits;
3323 #define _LATF0 0x01
3324 #define _LATF1 0x02
3325 #define _LATF2 0x04
3326 #define _LATF3 0x08
3327 #define _LATF4 0x10
3328 #define _LATF5 0x20
3329 #define _LATF6 0x40
3330 #define _LATF7 0x80
3332 //==============================================================================
3335 //==============================================================================
3336 // LATG Bits
3338 extern __at(0x038D) __sfr LATG;
3340 typedef union
3342 struct
3344 unsigned LATG0 : 1;
3345 unsigned LATG1 : 1;
3346 unsigned LATG2 : 1;
3347 unsigned LATG3 : 1;
3348 unsigned LATG4 : 1;
3349 unsigned : 1;
3350 unsigned : 1;
3351 unsigned : 1;
3354 struct
3356 unsigned LATG : 5;
3357 unsigned : 3;
3359 } __LATGbits_t;
3361 extern __at(0x038D) volatile __LATGbits_t LATGbits;
3363 #define _LATG0 0x01
3364 #define _LATG1 0x02
3365 #define _LATG2 0x04
3366 #define _LATG3 0x08
3367 #define _LATG4 0x10
3369 //==============================================================================
3372 //==============================================================================
3373 // IOCBP Bits
3375 extern __at(0x0394) __sfr IOCBP;
3377 typedef struct
3379 unsigned IOCBP0 : 1;
3380 unsigned IOCBP1 : 1;
3381 unsigned IOCBP2 : 1;
3382 unsigned IOCBP3 : 1;
3383 unsigned IOCBP4 : 1;
3384 unsigned IOCBP5 : 1;
3385 unsigned IOCBP6 : 1;
3386 unsigned IOCBP7 : 1;
3387 } __IOCBPbits_t;
3389 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
3391 #define _IOCBP0 0x01
3392 #define _IOCBP1 0x02
3393 #define _IOCBP2 0x04
3394 #define _IOCBP3 0x08
3395 #define _IOCBP4 0x10
3396 #define _IOCBP5 0x20
3397 #define _IOCBP6 0x40
3398 #define _IOCBP7 0x80
3400 //==============================================================================
3403 //==============================================================================
3404 // IOCBN Bits
3406 extern __at(0x0395) __sfr IOCBN;
3408 typedef struct
3410 unsigned IOCBN0 : 1;
3411 unsigned IOCBN1 : 1;
3412 unsigned IOCBN2 : 1;
3413 unsigned IOCBN3 : 1;
3414 unsigned IOCBN4 : 1;
3415 unsigned IOCBN5 : 1;
3416 unsigned IOCBN6 : 1;
3417 unsigned IOCBN7 : 1;
3418 } __IOCBNbits_t;
3420 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
3422 #define _IOCBN0 0x01
3423 #define _IOCBN1 0x02
3424 #define _IOCBN2 0x04
3425 #define _IOCBN3 0x08
3426 #define _IOCBN4 0x10
3427 #define _IOCBN5 0x20
3428 #define _IOCBN6 0x40
3429 #define _IOCBN7 0x80
3431 //==============================================================================
3434 //==============================================================================
3435 // IOCBF Bits
3437 extern __at(0x0396) __sfr IOCBF;
3439 typedef struct
3441 unsigned IOCBF0 : 1;
3442 unsigned IOCBF1 : 1;
3443 unsigned IOCBF2 : 1;
3444 unsigned IOCBF3 : 1;
3445 unsigned IOCBF4 : 1;
3446 unsigned IOCBF5 : 1;
3447 unsigned IOCBF6 : 1;
3448 unsigned IOCBF7 : 1;
3449 } __IOCBFbits_t;
3451 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3453 #define _IOCBF0 0x01
3454 #define _IOCBF1 0x02
3455 #define _IOCBF2 0x04
3456 #define _IOCBF3 0x08
3457 #define _IOCBF4 0x10
3458 #define _IOCBF5 0x20
3459 #define _IOCBF6 0x40
3460 #define _IOCBF7 0x80
3462 //==============================================================================
3465 //==============================================================================
3466 // ANSELF Bits
3468 extern __at(0x040C) __sfr ANSELF;
3470 typedef struct
3472 unsigned ANSF0 : 1;
3473 unsigned ANSF1 : 1;
3474 unsigned ANSF2 : 1;
3475 unsigned ANSF3 : 1;
3476 unsigned ANSF4 : 1;
3477 unsigned ANSF5 : 1;
3478 unsigned ANSF6 : 1;
3479 unsigned ANSF7 : 1;
3480 } __ANSELFbits_t;
3482 extern __at(0x040C) volatile __ANSELFbits_t ANSELFbits;
3484 #define _ANSF0 0x01
3485 #define _ANSF1 0x02
3486 #define _ANSF2 0x04
3487 #define _ANSF3 0x08
3488 #define _ANSF4 0x10
3489 #define _ANSF5 0x20
3490 #define _ANSF6 0x40
3491 #define _ANSF7 0x80
3493 //==============================================================================
3496 //==============================================================================
3497 // ANSELG Bits
3499 extern __at(0x040D) __sfr ANSELG;
3501 typedef struct
3503 unsigned : 1;
3504 unsigned ANSG1 : 1;
3505 unsigned ANSG2 : 1;
3506 unsigned ANSG3 : 1;
3507 unsigned ANSG4 : 1;
3508 unsigned : 1;
3509 unsigned : 1;
3510 unsigned : 1;
3511 } __ANSELGbits_t;
3513 extern __at(0x040D) volatile __ANSELGbits_t ANSELGbits;
3515 #define _ANSG1 0x02
3516 #define _ANSG2 0x04
3517 #define _ANSG3 0x08
3518 #define _ANSG4 0x10
3520 //==============================================================================
3522 extern __at(0x0411) __sfr TMR3;
3523 extern __at(0x0411) __sfr TMR3L;
3524 extern __at(0x0412) __sfr TMR3H;
3526 //==============================================================================
3527 // T3CON Bits
3529 extern __at(0x0413) __sfr T3CON;
3531 typedef union
3533 struct
3535 unsigned TMR3ON : 1;
3536 unsigned : 1;
3537 unsigned NOT_T3SYNC : 1;
3538 unsigned SOSCEN : 1;
3539 unsigned T3CKPS0 : 1;
3540 unsigned T3CKPS1 : 1;
3541 unsigned TMR3CS0 : 1;
3542 unsigned TMR3CS1 : 1;
3545 struct
3547 unsigned : 1;
3548 unsigned : 1;
3549 unsigned : 1;
3550 unsigned T3OSCEN : 1;
3551 unsigned : 1;
3552 unsigned : 1;
3553 unsigned : 1;
3554 unsigned : 1;
3557 struct
3559 unsigned : 4;
3560 unsigned T3CKPS : 2;
3561 unsigned : 2;
3564 struct
3566 unsigned : 6;
3567 unsigned TMR3CS : 2;
3569 } __T3CONbits_t;
3571 extern __at(0x0413) volatile __T3CONbits_t T3CONbits;
3573 #define _T3CON_TMR3ON 0x01
3574 #define _T3CON_NOT_T3SYNC 0x04
3575 #define _T3CON_SOSCEN 0x08
3576 #define _T3CON_T3OSCEN 0x08
3577 #define _T3CON_T3CKPS0 0x10
3578 #define _T3CON_T3CKPS1 0x20
3579 #define _T3CON_TMR3CS0 0x40
3580 #define _T3CON_TMR3CS1 0x80
3582 //==============================================================================
3585 //==============================================================================
3586 // T3GCON Bits
3588 extern __at(0x0414) __sfr T3GCON;
3590 typedef union
3592 struct
3594 unsigned T3GSS0 : 1;
3595 unsigned T3GSS1 : 1;
3596 unsigned T3GVAL : 1;
3597 unsigned T3GGO_NOT_DONE : 1;
3598 unsigned T3GSPM : 1;
3599 unsigned T3GTM : 1;
3600 unsigned T3GPOL : 1;
3601 unsigned TMR3GE : 1;
3604 struct
3606 unsigned T3GSS : 2;
3607 unsigned : 6;
3609 } __T3GCONbits_t;
3611 extern __at(0x0414) volatile __T3GCONbits_t T3GCONbits;
3613 #define _T3GSS0 0x01
3614 #define _T3GSS1 0x02
3615 #define _T3GVAL 0x04
3616 #define _T3GGO_NOT_DONE 0x08
3617 #define _T3GSPM 0x10
3618 #define _T3GTM 0x20
3619 #define _T3GPOL 0x40
3620 #define _TMR3GE 0x80
3622 //==============================================================================
3624 extern __at(0x0415) __sfr TMR4;
3625 extern __at(0x0416) __sfr PR4;
3627 //==============================================================================
3628 // T4CON Bits
3630 extern __at(0x0417) __sfr T4CON;
3632 typedef union
3634 struct
3636 unsigned T4CKPS0 : 1;
3637 unsigned T4CKPS1 : 1;
3638 unsigned TMR4ON : 1;
3639 unsigned T4OUTPS0 : 1;
3640 unsigned T4OUTPS1 : 1;
3641 unsigned T4OUTPS2 : 1;
3642 unsigned T4OUTPS3 : 1;
3643 unsigned : 1;
3646 struct
3648 unsigned T4CKPS : 2;
3649 unsigned : 6;
3652 struct
3654 unsigned : 3;
3655 unsigned T4OUTPS : 4;
3656 unsigned : 1;
3658 } __T4CONbits_t;
3660 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
3662 #define _T4CKPS0 0x01
3663 #define _T4CKPS1 0x02
3664 #define _TMR4ON 0x04
3665 #define _T4OUTPS0 0x08
3666 #define _T4OUTPS1 0x10
3667 #define _T4OUTPS2 0x20
3668 #define _T4OUTPS3 0x40
3670 //==============================================================================
3672 extern __at(0x0418) __sfr TMR5;
3673 extern __at(0x0418) __sfr TMR5L;
3674 extern __at(0x0419) __sfr TMR5H;
3676 //==============================================================================
3677 // T5CON Bits
3679 extern __at(0x041A) __sfr T5CON;
3681 typedef union
3683 struct
3685 unsigned TMR5ON : 1;
3686 unsigned : 1;
3687 unsigned NOT_T5SYNC : 1;
3688 unsigned SOSCEN : 1;
3689 unsigned T5CKPS0 : 1;
3690 unsigned T5CKPS1 : 1;
3691 unsigned TMR5CS0 : 1;
3692 unsigned TMR5CS1 : 1;
3695 struct
3697 unsigned : 1;
3698 unsigned : 1;
3699 unsigned : 1;
3700 unsigned T5OSCEN : 1;
3701 unsigned : 1;
3702 unsigned : 1;
3703 unsigned : 1;
3704 unsigned : 1;
3707 struct
3709 unsigned : 4;
3710 unsigned T5CKPS : 2;
3711 unsigned : 2;
3714 struct
3716 unsigned : 6;
3717 unsigned TMR5CS : 2;
3719 } __T5CONbits_t;
3721 extern __at(0x041A) volatile __T5CONbits_t T5CONbits;
3723 #define _T5CON_TMR5ON 0x01
3724 #define _T5CON_NOT_T5SYNC 0x04
3725 #define _T5CON_SOSCEN 0x08
3726 #define _T5CON_T5OSCEN 0x08
3727 #define _T5CON_T5CKPS0 0x10
3728 #define _T5CON_T5CKPS1 0x20
3729 #define _T5CON_TMR5CS0 0x40
3730 #define _T5CON_TMR5CS1 0x80
3732 //==============================================================================
3735 //==============================================================================
3736 // T5GCON Bits
3738 extern __at(0x041B) __sfr T5GCON;
3740 typedef union
3742 struct
3744 unsigned T5GSS0 : 1;
3745 unsigned T5GSS1 : 1;
3746 unsigned T5GVAL : 1;
3747 unsigned T5GGO_NOT_DONE : 1;
3748 unsigned T5GSPM : 1;
3749 unsigned T5GTM : 1;
3750 unsigned T5GPOL : 1;
3751 unsigned TMR5GE : 1;
3754 struct
3756 unsigned T5GSS : 2;
3757 unsigned : 6;
3759 } __T5GCONbits_t;
3761 extern __at(0x041B) volatile __T5GCONbits_t T5GCONbits;
3763 #define _T5GSS0 0x01
3764 #define _T5GSS1 0x02
3765 #define _T5GVAL 0x04
3766 #define _T5GGO_NOT_DONE 0x08
3767 #define _T5GSPM 0x10
3768 #define _T5GTM 0x20
3769 #define _T5GPOL 0x40
3770 #define _TMR5GE 0x80
3772 //==============================================================================
3774 extern __at(0x041C) __sfr TMR6;
3775 extern __at(0x041D) __sfr PR6;
3777 //==============================================================================
3778 // T6CON Bits
3780 extern __at(0x041E) __sfr T6CON;
3782 typedef union
3784 struct
3786 unsigned T6CKPS0 : 1;
3787 unsigned T6CKPS1 : 1;
3788 unsigned TMR6ON : 1;
3789 unsigned T6OUTPS0 : 1;
3790 unsigned T6OUTPS1 : 1;
3791 unsigned T6OUTPS2 : 1;
3792 unsigned T6OUTPS3 : 1;
3793 unsigned : 1;
3796 struct
3798 unsigned T6CKPS : 2;
3799 unsigned : 6;
3802 struct
3804 unsigned : 3;
3805 unsigned T6OUTPS : 4;
3806 unsigned : 1;
3808 } __T6CONbits_t;
3810 extern __at(0x041E) volatile __T6CONbits_t T6CONbits;
3812 #define _T6CKPS0 0x01
3813 #define _T6CKPS1 0x02
3814 #define _TMR6ON 0x04
3815 #define _T6OUTPS0 0x08
3816 #define _T6OUTPS1 0x10
3817 #define _T6OUTPS2 0x20
3818 #define _T6OUTPS3 0x40
3820 //==============================================================================
3823 //==============================================================================
3824 // WPUG Bits
3826 extern __at(0x048D) __sfr WPUG;
3828 typedef struct
3830 unsigned : 1;
3831 unsigned : 1;
3832 unsigned : 1;
3833 unsigned : 1;
3834 unsigned : 1;
3835 unsigned WPUG5 : 1;
3836 unsigned : 1;
3837 unsigned : 1;
3838 } __WPUGbits_t;
3840 extern __at(0x048D) volatile __WPUGbits_t WPUGbits;
3842 #define _WPUG5 0x20
3844 //==============================================================================
3846 extern __at(0x0491) __sfr RC2REG;
3847 extern __at(0x0491) __sfr RCREG2;
3848 extern __at(0x0492) __sfr TX2REG;
3849 extern __at(0x0492) __sfr TXREG2;
3850 extern __at(0x0493) __sfr SP2BRG;
3851 extern __at(0x0493) __sfr SP2BRGL;
3852 extern __at(0x0493) __sfr SPBRGL2;
3853 extern __at(0x0494) __sfr SP2BRGH;
3854 extern __at(0x0494) __sfr SPBRGH2;
3856 //==============================================================================
3857 // RC2STA Bits
3859 extern __at(0x0495) __sfr RC2STA;
3861 typedef struct
3863 unsigned RX9D : 1;
3864 unsigned OERR : 1;
3865 unsigned FERR : 1;
3866 unsigned ADDEN : 1;
3867 unsigned CREN : 1;
3868 unsigned SREN : 1;
3869 unsigned RX9 : 1;
3870 unsigned SPEN : 1;
3871 } __RC2STAbits_t;
3873 extern __at(0x0495) volatile __RC2STAbits_t RC2STAbits;
3875 #define _RC2STA_RX9D 0x01
3876 #define _RC2STA_OERR 0x02
3877 #define _RC2STA_FERR 0x04
3878 #define _RC2STA_ADDEN 0x08
3879 #define _RC2STA_CREN 0x10
3880 #define _RC2STA_SREN 0x20
3881 #define _RC2STA_RX9 0x40
3882 #define _RC2STA_SPEN 0x80
3884 //==============================================================================
3887 //==============================================================================
3888 // RCSTA2 Bits
3890 extern __at(0x0495) __sfr RCSTA2;
3892 typedef struct
3894 unsigned RX9D : 1;
3895 unsigned OERR : 1;
3896 unsigned FERR : 1;
3897 unsigned ADDEN : 1;
3898 unsigned CREN : 1;
3899 unsigned SREN : 1;
3900 unsigned RX9 : 1;
3901 unsigned SPEN : 1;
3902 } __RCSTA2bits_t;
3904 extern __at(0x0495) volatile __RCSTA2bits_t RCSTA2bits;
3906 #define _RCSTA2_RX9D 0x01
3907 #define _RCSTA2_OERR 0x02
3908 #define _RCSTA2_FERR 0x04
3909 #define _RCSTA2_ADDEN 0x08
3910 #define _RCSTA2_CREN 0x10
3911 #define _RCSTA2_SREN 0x20
3912 #define _RCSTA2_RX9 0x40
3913 #define _RCSTA2_SPEN 0x80
3915 //==============================================================================
3918 //==============================================================================
3919 // TX2STA Bits
3921 extern __at(0x0496) __sfr TX2STA;
3923 typedef struct
3925 unsigned TX9D : 1;
3926 unsigned TRMT : 1;
3927 unsigned BRGH : 1;
3928 unsigned SENDB : 1;
3929 unsigned SYNC : 1;
3930 unsigned TXEN : 1;
3931 unsigned TX9 : 1;
3932 unsigned CSRC : 1;
3933 } __TX2STAbits_t;
3935 extern __at(0x0496) volatile __TX2STAbits_t TX2STAbits;
3937 #define _TX2STA_TX9D 0x01
3938 #define _TX2STA_TRMT 0x02
3939 #define _TX2STA_BRGH 0x04
3940 #define _TX2STA_SENDB 0x08
3941 #define _TX2STA_SYNC 0x10
3942 #define _TX2STA_TXEN 0x20
3943 #define _TX2STA_TX9 0x40
3944 #define _TX2STA_CSRC 0x80
3946 //==============================================================================
3949 //==============================================================================
3950 // TXSTA2 Bits
3952 extern __at(0x0496) __sfr TXSTA2;
3954 typedef struct
3956 unsigned TX9D : 1;
3957 unsigned TRMT : 1;
3958 unsigned BRGH : 1;
3959 unsigned SENDB : 1;
3960 unsigned SYNC : 1;
3961 unsigned TXEN : 1;
3962 unsigned TX9 : 1;
3963 unsigned CSRC : 1;
3964 } __TXSTA2bits_t;
3966 extern __at(0x0496) volatile __TXSTA2bits_t TXSTA2bits;
3968 #define _TXSTA2_TX9D 0x01
3969 #define _TXSTA2_TRMT 0x02
3970 #define _TXSTA2_BRGH 0x04
3971 #define _TXSTA2_SENDB 0x08
3972 #define _TXSTA2_SYNC 0x10
3973 #define _TXSTA2_TXEN 0x20
3974 #define _TXSTA2_TX9 0x40
3975 #define _TXSTA2_CSRC 0x80
3977 //==============================================================================
3980 //==============================================================================
3981 // BAUD2CON Bits
3983 extern __at(0x0497) __sfr BAUD2CON;
3985 typedef struct
3987 unsigned ABDEN : 1;
3988 unsigned WUE : 1;
3989 unsigned : 1;
3990 unsigned BRG16 : 1;
3991 unsigned SCKP : 1;
3992 unsigned : 1;
3993 unsigned RCIDL : 1;
3994 unsigned ABDOVF : 1;
3995 } __BAUD2CONbits_t;
3997 extern __at(0x0497) volatile __BAUD2CONbits_t BAUD2CONbits;
3999 #define _BAUD2CON_ABDEN 0x01
4000 #define _BAUD2CON_WUE 0x02
4001 #define _BAUD2CON_BRG16 0x08
4002 #define _BAUD2CON_SCKP 0x10
4003 #define _BAUD2CON_RCIDL 0x40
4004 #define _BAUD2CON_ABDOVF 0x80
4006 //==============================================================================
4009 //==============================================================================
4010 // BAUDCON2 Bits
4012 extern __at(0x0497) __sfr BAUDCON2;
4014 typedef struct
4016 unsigned ABDEN : 1;
4017 unsigned WUE : 1;
4018 unsigned : 1;
4019 unsigned BRG16 : 1;
4020 unsigned SCKP : 1;
4021 unsigned : 1;
4022 unsigned RCIDL : 1;
4023 unsigned ABDOVF : 1;
4024 } __BAUDCON2bits_t;
4026 extern __at(0x0497) volatile __BAUDCON2bits_t BAUDCON2bits;
4028 #define _BAUDCON2_ABDEN 0x01
4029 #define _BAUDCON2_WUE 0x02
4030 #define _BAUDCON2_BRG16 0x08
4031 #define _BAUDCON2_SCKP 0x10
4032 #define _BAUDCON2_RCIDL 0x40
4033 #define _BAUDCON2_ABDOVF 0x80
4035 //==============================================================================
4037 extern __at(0x0595) __sfr TMR8;
4038 extern __at(0x0596) __sfr PR8;
4040 //==============================================================================
4041 // T8CON Bits
4043 extern __at(0x0597) __sfr T8CON;
4045 typedef union
4047 struct
4049 unsigned T8CKPS0 : 1;
4050 unsigned T8CKPS1 : 1;
4051 unsigned TMR8ON : 1;
4052 unsigned T8OUTPS0 : 1;
4053 unsigned T8OUTPS1 : 1;
4054 unsigned T8OUTPS2 : 1;
4055 unsigned T8OUTPS3 : 1;
4056 unsigned : 1;
4059 struct
4061 unsigned T8CKPS : 2;
4062 unsigned : 6;
4065 struct
4067 unsigned : 3;
4068 unsigned T8OUTPS : 4;
4069 unsigned : 1;
4071 } __T8CONbits_t;
4073 extern __at(0x0597) volatile __T8CONbits_t T8CONbits;
4075 #define _T8CKPS0 0x01
4076 #define _T8CKPS1 0x02
4077 #define _TMR8ON 0x04
4078 #define _T8OUTPS0 0x08
4079 #define _T8OUTPS1 0x10
4080 #define _T8OUTPS2 0x20
4081 #define _T8OUTPS3 0x40
4083 //==============================================================================
4085 extern __at(0x059C) __sfr TMR10;
4086 extern __at(0x059D) __sfr PR10;
4088 //==============================================================================
4089 // T10CON Bits
4091 extern __at(0x059E) __sfr T10CON;
4093 typedef union
4095 struct
4097 unsigned T10CKPS0 : 1;
4098 unsigned T10CKPS1 : 1;
4099 unsigned TMR10ON : 1;
4100 unsigned T10OUTPS0 : 1;
4101 unsigned T10OUTPS1 : 1;
4102 unsigned T10OUTPS2 : 1;
4103 unsigned T10OUTPS3 : 1;
4104 unsigned : 1;
4107 struct
4109 unsigned T10CKPS : 2;
4110 unsigned : 6;
4113 struct
4115 unsigned : 3;
4116 unsigned T10OUTPS : 4;
4117 unsigned : 1;
4119 } __T10CONbits_t;
4121 extern __at(0x059E) volatile __T10CONbits_t T10CONbits;
4123 #define _T10CKPS0 0x01
4124 #define _T10CKPS1 0x02
4125 #define _TMR10ON 0x04
4126 #define _T10OUTPS0 0x08
4127 #define _T10OUTPS1 0x10
4128 #define _T10OUTPS2 0x20
4129 #define _T10OUTPS3 0x40
4131 //==============================================================================
4133 extern __at(0x0611) __sfr CCPR6;
4134 extern __at(0x0611) __sfr CCPR6L;
4135 extern __at(0x0612) __sfr CCPR6H;
4137 //==============================================================================
4138 // CCP6CON Bits
4140 extern __at(0x0613) __sfr CCP6CON;
4142 typedef union
4144 struct
4146 unsigned CCP6M0 : 1;
4147 unsigned CCP6M1 : 1;
4148 unsigned CCP6M2 : 1;
4149 unsigned CCP6M3 : 1;
4150 unsigned DC6B0 : 1;
4151 unsigned DC6B1 : 1;
4152 unsigned : 1;
4153 unsigned : 1;
4156 struct
4158 unsigned CCP6M : 4;
4159 unsigned : 4;
4162 struct
4164 unsigned : 4;
4165 unsigned DC6B : 2;
4166 unsigned : 2;
4168 } __CCP6CONbits_t;
4170 extern __at(0x0613) volatile __CCP6CONbits_t CCP6CONbits;
4172 #define _CCP6M0 0x01
4173 #define _CCP6M1 0x02
4174 #define _CCP6M2 0x04
4175 #define _CCP6M3 0x08
4176 #define _DC6B0 0x10
4177 #define _DC6B1 0x20
4179 //==============================================================================
4181 extern __at(0x0614) __sfr CCPR7;
4182 extern __at(0x0614) __sfr CCPR7L;
4183 extern __at(0x0615) __sfr CCPR7H;
4185 //==============================================================================
4186 // CCP7CON Bits
4188 extern __at(0x0616) __sfr CCP7CON;
4190 typedef union
4192 struct
4194 unsigned CCP7M0 : 1;
4195 unsigned CCP7M1 : 1;
4196 unsigned CCP7M2 : 1;
4197 unsigned CCP7M3 : 1;
4198 unsigned DC7B0 : 1;
4199 unsigned DC7B1 : 1;
4200 unsigned : 1;
4201 unsigned : 1;
4204 struct
4206 unsigned CCP7M : 4;
4207 unsigned : 4;
4210 struct
4212 unsigned : 4;
4213 unsigned DC7B : 2;
4214 unsigned : 2;
4216 } __CCP7CONbits_t;
4218 extern __at(0x0616) volatile __CCP7CONbits_t CCP7CONbits;
4220 #define _CCP7M0 0x01
4221 #define _CCP7M1 0x02
4222 #define _CCP7M2 0x04
4223 #define _CCP7M3 0x08
4224 #define _DC7B0 0x10
4225 #define _DC7B1 0x20
4227 //==============================================================================
4229 extern __at(0x0617) __sfr CCPR8;
4230 extern __at(0x0617) __sfr CCPR8L;
4231 extern __at(0x0618) __sfr CCPR8H;
4233 //==============================================================================
4234 // CCP8CON Bits
4236 extern __at(0x0619) __sfr CCP8CON;
4238 typedef union
4240 struct
4242 unsigned CCP8M0 : 1;
4243 unsigned CCP8M1 : 1;
4244 unsigned CCP8M2 : 1;
4245 unsigned CCP8M3 : 1;
4246 unsigned DC8B0 : 1;
4247 unsigned DC8B1 : 1;
4248 unsigned : 1;
4249 unsigned : 1;
4252 struct
4254 unsigned CCP8M : 4;
4255 unsigned : 4;
4258 struct
4260 unsigned : 4;
4261 unsigned DC8B : 2;
4262 unsigned : 2;
4264 } __CCP8CONbits_t;
4266 extern __at(0x0619) volatile __CCP8CONbits_t CCP8CONbits;
4268 #define _CCP8M0 0x01
4269 #define _CCP8M1 0x02
4270 #define _CCP8M2 0x04
4271 #define _CCP8M3 0x08
4272 #define _DC8B0 0x10
4273 #define _DC8B1 0x20
4275 //==============================================================================
4277 extern __at(0x061A) __sfr CCPR9;
4278 extern __at(0x061A) __sfr CCPR9L;
4279 extern __at(0x061B) __sfr CCPR9H;
4281 //==============================================================================
4282 // CCP9CON Bits
4284 extern __at(0x061C) __sfr CCP9CON;
4286 typedef union
4288 struct
4290 unsigned CCP9M0 : 1;
4291 unsigned CCP9M1 : 1;
4292 unsigned CCP9M2 : 1;
4293 unsigned CCP9M3 : 1;
4294 unsigned DC9B0 : 1;
4295 unsigned DC9B1 : 1;
4296 unsigned : 1;
4297 unsigned : 1;
4300 struct
4302 unsigned CCP9M : 4;
4303 unsigned : 4;
4306 struct
4308 unsigned : 4;
4309 unsigned DC9B : 2;
4310 unsigned : 2;
4312 } __CCP9CONbits_t;
4314 extern __at(0x061C) volatile __CCP9CONbits_t CCP9CONbits;
4316 #define _CCP9M0 0x01
4317 #define _CCP9M1 0x02
4318 #define _CCP9M2 0x04
4319 #define _CCP9M3 0x08
4320 #define _DC9B0 0x10
4321 #define _DC9B1 0x20
4323 //==============================================================================
4325 extern __at(0x061D) __sfr CCPR10;
4326 extern __at(0x061D) __sfr CCPR10L;
4327 extern __at(0x061E) __sfr CCPR10H;
4329 //==============================================================================
4330 // CCP10CON Bits
4332 extern __at(0x061F) __sfr CCP10CON;
4334 typedef union
4336 struct
4338 unsigned CCP10M0 : 1;
4339 unsigned CCP10M1 : 1;
4340 unsigned CCP10M2 : 1;
4341 unsigned CCP10M3 : 1;
4342 unsigned DC10B0 : 1;
4343 unsigned DC10B1 : 1;
4344 unsigned : 1;
4345 unsigned : 1;
4348 struct
4350 unsigned CCP10M : 4;
4351 unsigned : 4;
4354 struct
4356 unsigned : 4;
4357 unsigned DC10B : 2;
4358 unsigned : 2;
4360 } __CCP10CONbits_t;
4362 extern __at(0x061F) volatile __CCP10CONbits_t CCP10CONbits;
4364 #define _CCP10M0 0x01
4365 #define _CCP10M1 0x02
4366 #define _CCP10M2 0x04
4367 #define _CCP10M3 0x08
4368 #define _DC10B0 0x10
4369 #define _DC10B1 0x20
4371 //==============================================================================
4374 //==============================================================================
4375 // STATUS_SHAD Bits
4377 extern __at(0x0FE4) __sfr STATUS_SHAD;
4379 typedef struct
4381 unsigned C_SHAD : 1;
4382 unsigned DC_SHAD : 1;
4383 unsigned Z_SHAD : 1;
4384 unsigned : 1;
4385 unsigned : 1;
4386 unsigned : 1;
4387 unsigned : 1;
4388 unsigned : 1;
4389 } __STATUS_SHADbits_t;
4391 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
4393 #define _C_SHAD 0x01
4394 #define _DC_SHAD 0x02
4395 #define _Z_SHAD 0x04
4397 //==============================================================================
4399 extern __at(0x0FE5) __sfr WREG_SHAD;
4400 extern __at(0x0FE6) __sfr BSR_SHAD;
4401 extern __at(0x0FE7) __sfr PCLATH_SHAD;
4402 extern __at(0x0FE8) __sfr FSR0L_SHAD;
4403 extern __at(0x0FE9) __sfr FSR0H_SHAD;
4404 extern __at(0x0FEA) __sfr FSR1L_SHAD;
4405 extern __at(0x0FEB) __sfr FSR1H_SHAD;
4406 extern __at(0x0FED) __sfr STKPTR;
4407 extern __at(0x0FEE) __sfr TOSL;
4408 extern __at(0x0FEF) __sfr TOSH;
4410 //==============================================================================
4412 // Configuration Bits
4414 //==============================================================================
4416 #define _CONFIG1 0x8007
4417 #define _CONFIG2 0x8008
4419 //----------------------------- CONFIG1 Options -------------------------------
4421 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
4422 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
4423 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
4424 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
4425 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
4426 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
4427 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
4428 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pin.
4429 #define _WDTE_OFF 0x3FE7 // WDT disabled.
4430 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
4431 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
4432 #define _WDTE_ON 0x3FFF // WDT enabled.
4433 #define _PWRTE_ON 0x3FDF // PWRT enabled.
4434 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
4435 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
4436 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
4437 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
4438 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
4439 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
4440 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
4441 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
4442 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
4443 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
4444 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
4445 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
4446 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
4447 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
4448 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
4450 //----------------------------- CONFIG2 Options -------------------------------
4452 #define _WRT_ALL 0x3FFC // 000h to 3FFFh write protected, no addresses may be modified by PMCON control.
4453 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 2000h to 3FFFh may be modified by PMCON control.
4454 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 3FFFh may be modified by PMCON control.
4455 #define _WRT_OFF 0x3FFF // Write protection off.
4456 #define _VCAPEN_ON 0x3FEF // VCAP pin function enabled.
4457 #define _VCAPEN_OFF 0x3FFF // VCAP pin function disabled.
4458 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
4459 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
4460 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
4461 #define _BORV_270 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
4462 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
4463 #define _BORV_245 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
4464 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
4465 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
4466 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
4467 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
4468 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
4469 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
4471 //==============================================================================
4473 #define _DEVID1 0x8006
4475 #define _IDLOC0 0x8000
4476 #define _IDLOC1 0x8001
4477 #define _IDLOC2 0x8002
4478 #define _IDLOC3 0x8003
4480 //==============================================================================
4482 #ifndef NO_BIT_DEFINES
4484 #define ADON ADCON0bits.ADON // bit 0
4485 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
4486 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
4487 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
4488 #define CHS0 ADCON0bits.CHS0 // bit 2
4489 #define CHS1 ADCON0bits.CHS1 // bit 3
4490 #define CHS2 ADCON0bits.CHS2 // bit 4
4491 #define CHS3 ADCON0bits.CHS3 // bit 5
4492 #define CHS4 ADCON0bits.CHS4 // bit 6
4494 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
4495 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
4496 #define ADCS0 ADCON1bits.ADCS0 // bit 4
4497 #define ADCS1 ADCON1bits.ADCS1 // bit 5
4498 #define ADCS2 ADCON1bits.ADCS2 // bit 6
4499 #define ADFM ADCON1bits.ADFM // bit 7
4501 #define ANSA0 ANSELAbits.ANSA0 // bit 0
4502 #define ANSA1 ANSELAbits.ANSA1 // bit 1
4503 #define ANSA2 ANSELAbits.ANSA2 // bit 2
4504 #define ANSA3 ANSELAbits.ANSA3 // bit 3
4505 #define ANSA5 ANSELAbits.ANSA5 // bit 5
4507 #define ANSB0 ANSELBbits.ANSB0 // bit 0
4508 #define ANSB1 ANSELBbits.ANSB1 // bit 1
4509 #define ANSB2 ANSELBbits.ANSB2 // bit 2
4510 #define ANSB3 ANSELBbits.ANSB3 // bit 3
4511 #define ANSB4 ANSELBbits.ANSB4 // bit 4
4512 #define ANSB5 ANSELBbits.ANSB5 // bit 5
4514 #define ANSD0 ANSELDbits.ANSD0 // bit 0
4515 #define ANSD1 ANSELDbits.ANSD1 // bit 1
4516 #define ANSD2 ANSELDbits.ANSD2 // bit 2
4517 #define ANSD3 ANSELDbits.ANSD3 // bit 3
4519 #define ANSE0 ANSELEbits.ANSE0 // bit 0
4520 #define ANSE1 ANSELEbits.ANSE1 // bit 1
4521 #define ANSE2 ANSELEbits.ANSE2 // bit 2
4523 #define ANSF0 ANSELFbits.ANSF0 // bit 0
4524 #define ANSF1 ANSELFbits.ANSF1 // bit 1
4525 #define ANSF2 ANSELFbits.ANSF2 // bit 2
4526 #define ANSF3 ANSELFbits.ANSF3 // bit 3
4527 #define ANSF4 ANSELFbits.ANSF4 // bit 4
4528 #define ANSF5 ANSELFbits.ANSF5 // bit 5
4529 #define ANSF6 ANSELFbits.ANSF6 // bit 6
4530 #define ANSF7 ANSELFbits.ANSF7 // bit 7
4532 #define ANSG1 ANSELGbits.ANSG1 // bit 1
4533 #define ANSG2 ANSELGbits.ANSG2 // bit 2
4534 #define ANSG3 ANSELGbits.ANSG3 // bit 3
4535 #define ANSG4 ANSELGbits.ANSG4 // bit 4
4537 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
4538 #define T3CKISEL APFCONbits.T3CKISEL // bit 1
4540 #define ABDEN BAUD1CONbits.ABDEN // bit 0
4541 #define WUE BAUD1CONbits.WUE // bit 1
4542 #define BRG16 BAUD1CONbits.BRG16 // bit 3
4543 #define SCKP BAUD1CONbits.SCKP // bit 4
4544 #define RCIDL BAUD1CONbits.RCIDL // bit 6
4545 #define ABDOVF BAUD1CONbits.ABDOVF // bit 7
4547 #define BORRDY BORCONbits.BORRDY // bit 0
4548 #define BORFS BORCONbits.BORFS // bit 6
4549 #define SBOREN BORCONbits.SBOREN // bit 7
4551 #define BSR0 BSRbits.BSR0 // bit 0
4552 #define BSR1 BSRbits.BSR1 // bit 1
4553 #define BSR2 BSRbits.BSR2 // bit 2
4554 #define BSR3 BSRbits.BSR3 // bit 3
4555 #define BSR4 BSRbits.BSR4 // bit 4
4557 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
4558 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
4559 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
4560 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
4561 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
4562 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
4564 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
4565 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
4566 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
4567 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
4568 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
4569 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
4571 #define CCP3M0 CCP3CONbits.CCP3M0 // bit 0
4572 #define CCP3M1 CCP3CONbits.CCP3M1 // bit 1
4573 #define CCP3M2 CCP3CONbits.CCP3M2 // bit 2
4574 #define CCP3M3 CCP3CONbits.CCP3M3 // bit 3
4575 #define DC3B0 CCP3CONbits.DC3B0 // bit 4
4576 #define DC3B1 CCP3CONbits.DC3B1 // bit 5
4578 #define CCP4M0 CCP4CONbits.CCP4M0 // bit 0
4579 #define CCP4M1 CCP4CONbits.CCP4M1 // bit 1
4580 #define CCP4M2 CCP4CONbits.CCP4M2 // bit 2
4581 #define CCP4M3 CCP4CONbits.CCP4M3 // bit 3
4582 #define DC4B0 CCP4CONbits.DC4B0 // bit 4
4583 #define DC4B1 CCP4CONbits.DC4B1 // bit 5
4585 #define CCP5M0 CCP5CONbits.CCP5M0 // bit 0
4586 #define CCP5M1 CCP5CONbits.CCP5M1 // bit 1
4587 #define CCP5M2 CCP5CONbits.CCP5M2 // bit 2
4588 #define CCP5M3 CCP5CONbits.CCP5M3 // bit 3
4589 #define DC5B0 CCP5CONbits.DC5B0 // bit 4
4590 #define DC5B1 CCP5CONbits.DC5B1 // bit 5
4592 #define CCP6M0 CCP6CONbits.CCP6M0 // bit 0
4593 #define CCP6M1 CCP6CONbits.CCP6M1 // bit 1
4594 #define CCP6M2 CCP6CONbits.CCP6M2 // bit 2
4595 #define CCP6M3 CCP6CONbits.CCP6M3 // bit 3
4596 #define DC6B0 CCP6CONbits.DC6B0 // bit 4
4597 #define DC6B1 CCP6CONbits.DC6B1 // bit 5
4599 #define CCP7M0 CCP7CONbits.CCP7M0 // bit 0
4600 #define CCP7M1 CCP7CONbits.CCP7M1 // bit 1
4601 #define CCP7M2 CCP7CONbits.CCP7M2 // bit 2
4602 #define CCP7M3 CCP7CONbits.CCP7M3 // bit 3
4603 #define DC7B0 CCP7CONbits.DC7B0 // bit 4
4604 #define DC7B1 CCP7CONbits.DC7B1 // bit 5
4606 #define CCP8M0 CCP8CONbits.CCP8M0 // bit 0
4607 #define CCP8M1 CCP8CONbits.CCP8M1 // bit 1
4608 #define CCP8M2 CCP8CONbits.CCP8M2 // bit 2
4609 #define CCP8M3 CCP8CONbits.CCP8M3 // bit 3
4610 #define DC8B0 CCP8CONbits.DC8B0 // bit 4
4611 #define DC8B1 CCP8CONbits.DC8B1 // bit 5
4613 #define CCP9M0 CCP9CONbits.CCP9M0 // bit 0
4614 #define CCP9M1 CCP9CONbits.CCP9M1 // bit 1
4615 #define CCP9M2 CCP9CONbits.CCP9M2 // bit 2
4616 #define CCP9M3 CCP9CONbits.CCP9M3 // bit 3
4617 #define DC9B0 CCP9CONbits.DC9B0 // bit 4
4618 #define DC9B1 CCP9CONbits.DC9B1 // bit 5
4620 #define CCP10M0 CCP10CONbits.CCP10M0 // bit 0
4621 #define CCP10M1 CCP10CONbits.CCP10M1 // bit 1
4622 #define CCP10M2 CCP10CONbits.CCP10M2 // bit 2
4623 #define CCP10M3 CCP10CONbits.CCP10M3 // bit 3
4624 #define DC10B0 CCP10CONbits.DC10B0 // bit 4
4625 #define DC10B1 CCP10CONbits.DC10B1 // bit 5
4627 #define C1TSEL0 CCPTMRS0bits.C1TSEL0 // bit 0
4628 #define C1TSEL1 CCPTMRS0bits.C1TSEL1 // bit 1
4629 #define C2TSEL0 CCPTMRS0bits.C2TSEL0 // bit 2
4630 #define C2TSEL1 CCPTMRS0bits.C2TSEL1 // bit 3
4631 #define C3TSEL0 CCPTMRS0bits.C3TSEL0 // bit 4
4632 #define C3TSEL1 CCPTMRS0bits.C3TSEL1 // bit 5
4633 #define C4TSEL0 CCPTMRS0bits.C4TSEL0 // bit 6
4634 #define C4TSEL1 CCPTMRS0bits.C4TSEL1 // bit 7
4636 #define C5TSEL0 CCPTMRS1bits.C5TSEL0 // bit 0
4637 #define C5TSEL1 CCPTMRS1bits.C5TSEL1 // bit 1
4638 #define C6TSEL0 CCPTMRS1bits.C6TSEL0 // bit 2
4639 #define C6TSEL1 CCPTMRS1bits.C6TSEL1 // bit 3
4640 #define C7TSEL0 CCPTMRS1bits.C7TSEL0 // bit 4
4641 #define C7TSEL1 CCPTMRS1bits.C7TSEL1 // bit 5
4642 #define C8TSEL0 CCPTMRS1bits.C8TSEL0 // bit 6
4643 #define C8TSEL1 CCPTMRS1bits.C8TSEL1 // bit 7
4645 #define C9TSEL0 CCPTMRS2bits.C9TSEL0 // bit 0
4646 #define C9TSEL1 CCPTMRS2bits.C9TSEL1 // bit 1
4647 #define C10TSEL0 CCPTMRS2bits.C10TSEL0 // bit 2
4648 #define C10TSEL1 CCPTMRS2bits.C10TSEL1 // bit 3
4650 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
4651 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
4652 #define TSRNG FVRCONbits.TSRNG // bit 4
4653 #define TSEN FVRCONbits.TSEN // bit 5
4654 #define FVRRDY FVRCONbits.FVRRDY // bit 6
4655 #define FVREN FVRCONbits.FVREN // bit 7
4657 #define IOCIF INTCONbits.IOCIF // bit 0
4658 #define INTF INTCONbits.INTF // bit 1
4659 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
4660 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
4661 #define IOCIE INTCONbits.IOCIE // bit 3
4662 #define INTE INTCONbits.INTE // bit 4
4663 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
4664 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
4665 #define PEIE INTCONbits.PEIE // bit 6
4666 #define GIE INTCONbits.GIE // bit 7
4668 #define IOCBF0 IOCBFbits.IOCBF0 // bit 0
4669 #define IOCBF1 IOCBFbits.IOCBF1 // bit 1
4670 #define IOCBF2 IOCBFbits.IOCBF2 // bit 2
4671 #define IOCBF3 IOCBFbits.IOCBF3 // bit 3
4672 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
4673 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
4674 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
4675 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
4677 #define IOCBN0 IOCBNbits.IOCBN0 // bit 0
4678 #define IOCBN1 IOCBNbits.IOCBN1 // bit 1
4679 #define IOCBN2 IOCBNbits.IOCBN2 // bit 2
4680 #define IOCBN3 IOCBNbits.IOCBN3 // bit 3
4681 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
4682 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
4683 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
4684 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
4686 #define IOCBP0 IOCBPbits.IOCBP0 // bit 0
4687 #define IOCBP1 IOCBPbits.IOCBP1 // bit 1
4688 #define IOCBP2 IOCBPbits.IOCBP2 // bit 2
4689 #define IOCBP3 IOCBPbits.IOCBP3 // bit 3
4690 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
4691 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
4692 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
4693 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
4695 #define LATA0 LATAbits.LATA0 // bit 0
4696 #define LATA1 LATAbits.LATA1 // bit 1
4697 #define LATA2 LATAbits.LATA2 // bit 2
4698 #define LATA3 LATAbits.LATA3 // bit 3
4699 #define LATA4 LATAbits.LATA4 // bit 4
4700 #define LATA5 LATAbits.LATA5 // bit 5
4701 #define LATA6 LATAbits.LATA6 // bit 6
4702 #define LATA7 LATAbits.LATA7 // bit 7
4704 #define LATB0 LATBbits.LATB0 // bit 0
4705 #define LATB1 LATBbits.LATB1 // bit 1
4706 #define LATB2 LATBbits.LATB2 // bit 2
4707 #define LATB3 LATBbits.LATB3 // bit 3
4708 #define LATB4 LATBbits.LATB4 // bit 4
4709 #define LATB5 LATBbits.LATB5 // bit 5
4710 #define LATB6 LATBbits.LATB6 // bit 6
4711 #define LATB7 LATBbits.LATB7 // bit 7
4713 #define LATC0 LATCbits.LATC0 // bit 0
4714 #define LATC1 LATCbits.LATC1 // bit 1
4715 #define LATC2 LATCbits.LATC2 // bit 2
4716 #define LATC3 LATCbits.LATC3 // bit 3
4717 #define LATC4 LATCbits.LATC4 // bit 4
4718 #define LATC5 LATCbits.LATC5 // bit 5
4719 #define LATC6 LATCbits.LATC6 // bit 6
4720 #define LATC7 LATCbits.LATC7 // bit 7
4722 #define LATD0 LATDbits.LATD0 // bit 0
4723 #define LATD1 LATDbits.LATD1 // bit 1
4724 #define LATD2 LATDbits.LATD2 // bit 2
4725 #define LATD3 LATDbits.LATD3 // bit 3
4726 #define LATD4 LATDbits.LATD4 // bit 4
4727 #define LATD5 LATDbits.LATD5 // bit 5
4728 #define LATD6 LATDbits.LATD6 // bit 6
4729 #define LATD7 LATDbits.LATD7 // bit 7
4731 #define LATE0 LATEbits.LATE0 // bit 0
4732 #define LATE1 LATEbits.LATE1 // bit 1
4733 #define LATE2 LATEbits.LATE2 // bit 2
4734 #define LATE3 LATEbits.LATE3 // bit 3
4735 #define LATE4 LATEbits.LATE4 // bit 4
4736 #define LATE5 LATEbits.LATE5 // bit 5
4737 #define LATE6 LATEbits.LATE6 // bit 6
4738 #define LATE7 LATEbits.LATE7 // bit 7
4740 #define LATF0 LATFbits.LATF0 // bit 0
4741 #define LATF1 LATFbits.LATF1 // bit 1
4742 #define LATF2 LATFbits.LATF2 // bit 2
4743 #define LATF3 LATFbits.LATF3 // bit 3
4744 #define LATF4 LATFbits.LATF4 // bit 4
4745 #define LATF5 LATFbits.LATF5 // bit 5
4746 #define LATF6 LATFbits.LATF6 // bit 6
4747 #define LATF7 LATFbits.LATF7 // bit 7
4749 #define LATG0 LATGbits.LATG0 // bit 0
4750 #define LATG1 LATGbits.LATG1 // bit 1
4751 #define LATG2 LATGbits.LATG2 // bit 2
4752 #define LATG3 LATGbits.LATG3 // bit 3
4753 #define LATG4 LATGbits.LATG4 // bit 4
4755 #define PS0 OPTION_REGbits.PS0 // bit 0
4756 #define PS1 OPTION_REGbits.PS1 // bit 1
4757 #define PS2 OPTION_REGbits.PS2 // bit 2
4758 #define PSA OPTION_REGbits.PSA // bit 3
4759 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
4760 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
4761 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
4762 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
4763 #define INTEDG OPTION_REGbits.INTEDG // bit 6
4764 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
4766 #define SCS0 OSCCONbits.SCS0 // bit 0
4767 #define SCS1 OSCCONbits.SCS1 // bit 1
4768 #define IRCF0 OSCCONbits.IRCF0 // bit 3
4769 #define IRCF1 OSCCONbits.IRCF1 // bit 4
4770 #define IRCF2 OSCCONbits.IRCF2 // bit 5
4771 #define IRCF3 OSCCONbits.IRCF3 // bit 6
4773 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
4774 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
4775 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
4776 #define OSTS OSCSTATbits.OSTS // bit 5
4777 #define SOSCR OSCSTATbits.SOSCR // bit 7, shadows bit in OSCSTATbits
4778 #define T1OSCR OSCSTATbits.T1OSCR // bit 7, shadows bit in OSCSTATbits
4780 #define NOT_BOR PCONbits.NOT_BOR // bit 0
4781 #define NOT_POR PCONbits.NOT_POR // bit 1
4782 #define NOT_RI PCONbits.NOT_RI // bit 2
4783 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
4784 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
4785 #define STKUNF PCONbits.STKUNF // bit 6
4786 #define STKOVF PCONbits.STKOVF // bit 7
4788 #define TMR1IE PIE1bits.TMR1IE // bit 0
4789 #define TMR2IE PIE1bits.TMR2IE // bit 1
4790 #define CCP1IE PIE1bits.CCP1IE // bit 2
4791 #define SSP1IE PIE1bits.SSP1IE // bit 3, shadows bit in PIE1bits
4792 #define SSPIE PIE1bits.SSPIE // bit 3, shadows bit in PIE1bits
4793 #define TX1IE PIE1bits.TX1IE // bit 4, shadows bit in PIE1bits
4794 #define TXIE PIE1bits.TXIE // bit 4, shadows bit in PIE1bits
4795 #define RC1IE PIE1bits.RC1IE // bit 5, shadows bit in PIE1bits
4796 #define RCIE PIE1bits.RCIE // bit 5, shadows bit in PIE1bits
4797 #define ADIE PIE1bits.ADIE // bit 6
4798 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
4800 #define CCP2IE PIE2bits.CCP2IE // bit 0
4801 #define TMR8IE PIE2bits.TMR8IE // bit 1
4802 #define TMR10IE PIE2bits.TMR10IE // bit 2
4803 #define BCL1IE PIE2bits.BCL1IE // bit 3, shadows bit in PIE2bits
4804 #define BCLIE PIE2bits.BCLIE // bit 3, shadows bit in PIE2bits
4805 #define TMR3GIE PIE2bits.TMR3GIE // bit 5
4806 #define TMR5GIE PIE2bits.TMR5GIE // bit 6
4807 #define OSFIE PIE2bits.OSFIE // bit 7
4809 #define TMR3IE PIE3bits.TMR3IE // bit 0
4810 #define TMR4IE PIE3bits.TMR4IE // bit 1
4811 #define TMR5IE PIE3bits.TMR5IE // bit 2
4812 #define TMR6IE PIE3bits.TMR6IE // bit 3
4813 #define CCP3IE PIE3bits.CCP3IE // bit 4
4814 #define CCP4IE PIE3bits.CCP4IE // bit 5
4815 #define CCP5IE PIE3bits.CCP5IE // bit 6
4816 #define CCP6IE PIE3bits.CCP6IE // bit 7
4818 #define SSP2IE PIE4bits.SSP2IE // bit 0
4819 #define BCL2IE PIE4bits.BCL2IE // bit 1
4820 #define CCP7IE PIE4bits.CCP7IE // bit 2
4821 #define CCP8IE PIE4bits.CCP8IE // bit 3
4822 #define TX2IE PIE4bits.TX2IE // bit 4
4823 #define RC2IE PIE4bits.RC2IE // bit 5
4824 #define CCP9IE PIE4bits.CCP9IE // bit 6
4825 #define CCP10IE PIE4bits.CCP10IE // bit 7
4827 #define TMR1IF PIR1bits.TMR1IF // bit 0
4828 #define TMR2IF PIR1bits.TMR2IF // bit 1
4829 #define CCP1IF PIR1bits.CCP1IF // bit 2
4830 #define SSP1IF PIR1bits.SSP1IF // bit 3, shadows bit in PIR1bits
4831 #define SSPIF PIR1bits.SSPIF // bit 3, shadows bit in PIR1bits
4832 #define TX1IF PIR1bits.TX1IF // bit 4, shadows bit in PIR1bits
4833 #define TXIF PIR1bits.TXIF // bit 4, shadows bit in PIR1bits
4834 #define RC1IF PIR1bits.RC1IF // bit 5, shadows bit in PIR1bits
4835 #define RCIF PIR1bits.RCIF // bit 5, shadows bit in PIR1bits
4836 #define ADIF PIR1bits.ADIF // bit 6
4837 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
4839 #define CCP2IF PIR2bits.CCP2IF // bit 0
4840 #define TMR8IF PIR2bits.TMR8IF // bit 1
4841 #define TMR10IF PIR2bits.TMR10IF // bit 2
4842 #define BCL1IF PIR2bits.BCL1IF // bit 3, shadows bit in PIR2bits
4843 #define BCLIF PIR2bits.BCLIF // bit 3, shadows bit in PIR2bits
4844 #define TMR3GIF PIR2bits.TMR3GIF // bit 5
4845 #define TMR5GIF PIR2bits.TMR5GIF // bit 6
4846 #define OSFIF PIR2bits.OSFIF // bit 7
4848 #define TMR3IF PIR3bits.TMR3IF // bit 0
4849 #define TMR4IF PIR3bits.TMR4IF // bit 1
4850 #define TMR5IF PIR3bits.TMR5IF // bit 2
4851 #define TMR6IF PIR3bits.TMR6IF // bit 3
4852 #define CCP3IF PIR3bits.CCP3IF // bit 4
4853 #define CCP4IF PIR3bits.CCP4IF // bit 5
4854 #define CCP5IF PIR3bits.CCP5IF // bit 6
4855 #define CCP6IF PIR3bits.CCP6IF // bit 7
4857 #define SSP2IF PIR4bits.SSP2IF // bit 0
4858 #define BCL2IF PIR4bits.BCL2IF // bit 1
4859 #define CCP7IF PIR4bits.CCP7IF // bit 2
4860 #define CCP8IF PIR4bits.CCP8IF // bit 3
4861 #define TX2IF PIR4bits.TX2IF // bit 4
4862 #define RC2IF PIR4bits.RC2IF // bit 5
4863 #define CCP9IF PIR4bits.CCP9IF // bit 6
4864 #define CCP10IF PIR4bits.CCP10IF // bit 7
4866 #define RD PMCON1bits.RD // bit 0
4867 #define WR PMCON1bits.WR // bit 1
4868 #define WREN PMCON1bits.WREN // bit 2
4869 #define WRERR PMCON1bits.WRERR // bit 3
4870 #define FREE PMCON1bits.FREE // bit 4
4871 #define LWLO PMCON1bits.LWLO // bit 5
4872 #define CFGS PMCON1bits.CFGS // bit 6
4874 #define RA0 PORTAbits.RA0 // bit 0
4875 #define RA1 PORTAbits.RA1 // bit 1
4876 #define RA2 PORTAbits.RA2 // bit 2
4877 #define RA3 PORTAbits.RA3 // bit 3
4878 #define RA4 PORTAbits.RA4 // bit 4
4879 #define RA5 PORTAbits.RA5 // bit 5
4880 #define RA6 PORTAbits.RA6 // bit 6
4881 #define RA7 PORTAbits.RA7 // bit 7
4883 #define RB0 PORTBbits.RB0 // bit 0
4884 #define RB1 PORTBbits.RB1 // bit 1
4885 #define RB2 PORTBbits.RB2 // bit 2
4886 #define RB3 PORTBbits.RB3 // bit 3
4887 #define RB4 PORTBbits.RB4 // bit 4
4888 #define RB5 PORTBbits.RB5 // bit 5
4889 #define RB6 PORTBbits.RB6 // bit 6
4890 #define RB7 PORTBbits.RB7 // bit 7
4892 #define RC0 PORTCbits.RC0 // bit 0
4893 #define RC1 PORTCbits.RC1 // bit 1
4894 #define RC2 PORTCbits.RC2 // bit 2
4895 #define RC3 PORTCbits.RC3 // bit 3
4896 #define RC4 PORTCbits.RC4 // bit 4
4897 #define RC5 PORTCbits.RC5 // bit 5
4898 #define RC6 PORTCbits.RC6 // bit 6
4899 #define RC7 PORTCbits.RC7 // bit 7
4901 #define RD0 PORTDbits.RD0 // bit 0
4902 #define RD1 PORTDbits.RD1 // bit 1
4903 #define RD2 PORTDbits.RD2 // bit 2
4904 #define RD3 PORTDbits.RD3 // bit 3
4905 #define RD4 PORTDbits.RD4 // bit 4
4906 #define RD5 PORTDbits.RD5 // bit 5
4907 #define RD6 PORTDbits.RD6 // bit 6
4908 #define RD7 PORTDbits.RD7 // bit 7
4910 #define RE0 PORTEbits.RE0 // bit 0
4911 #define RE1 PORTEbits.RE1 // bit 1
4912 #define RE2 PORTEbits.RE2 // bit 2
4913 #define RE3 PORTEbits.RE3 // bit 3
4914 #define RE4 PORTEbits.RE4 // bit 4
4915 #define RE5 PORTEbits.RE5 // bit 5
4916 #define RE6 PORTEbits.RE6 // bit 6
4917 #define RE7 PORTEbits.RE7 // bit 7
4919 #define RF0 PORTFbits.RF0 // bit 0
4920 #define RF1 PORTFbits.RF1 // bit 1
4921 #define RF2 PORTFbits.RF2 // bit 2
4922 #define RF3 PORTFbits.RF3 // bit 3
4923 #define RF4 PORTFbits.RF4 // bit 4
4924 #define RF5 PORTFbits.RF5 // bit 5
4925 #define RF6 PORTFbits.RF6 // bit 6
4926 #define RF7 PORTFbits.RF7 // bit 7
4928 #define RG0 PORTGbits.RG0 // bit 0
4929 #define RG1 PORTGbits.RG1 // bit 1
4930 #define RG2 PORTGbits.RG2 // bit 2
4931 #define RG3 PORTGbits.RG3 // bit 3
4932 #define RG4 PORTGbits.RG4 // bit 4
4933 #define RG5 PORTGbits.RG5 // bit 5
4935 #define RX9D RC1STAbits.RX9D // bit 0
4936 #define OERR RC1STAbits.OERR // bit 1
4937 #define FERR RC1STAbits.FERR // bit 2
4938 #define ADDEN RC1STAbits.ADDEN // bit 3
4939 #define CREN RC1STAbits.CREN // bit 4
4940 #define SREN RC1STAbits.SREN // bit 5
4941 #define RX9 RC1STAbits.RX9 // bit 6
4942 #define SPEN RC1STAbits.SPEN // bit 7
4944 #define SSPM0 SSP1CON1bits.SSPM0 // bit 0
4945 #define SSPM1 SSP1CON1bits.SSPM1 // bit 1
4946 #define SSPM2 SSP1CON1bits.SSPM2 // bit 2
4947 #define SSPM3 SSP1CON1bits.SSPM3 // bit 3
4948 #define CKP SSP1CON1bits.CKP // bit 4
4949 #define SSPEN SSP1CON1bits.SSPEN // bit 5
4950 #define SSPOV SSP1CON1bits.SSPOV // bit 6
4951 #define WCOL SSP1CON1bits.WCOL // bit 7
4953 #define SEN SSP1CON2bits.SEN // bit 0
4954 #define RSEN SSP1CON2bits.RSEN // bit 1
4955 #define PEN SSP1CON2bits.PEN // bit 2
4956 #define RCEN SSP1CON2bits.RCEN // bit 3
4957 #define ACKEN SSP1CON2bits.ACKEN // bit 4
4958 #define ACKDT SSP1CON2bits.ACKDT // bit 5
4959 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
4960 #define GCEN SSP1CON2bits.GCEN // bit 7
4962 #define DHEN SSP1CON3bits.DHEN // bit 0
4963 #define AHEN SSP1CON3bits.AHEN // bit 1
4964 #define SBCDE SSP1CON3bits.SBCDE // bit 2
4965 #define SDAHT SSP1CON3bits.SDAHT // bit 3
4966 #define BOEN SSP1CON3bits.BOEN // bit 4
4967 #define SCIE SSP1CON3bits.SCIE // bit 5
4968 #define PCIE SSP1CON3bits.PCIE // bit 6
4969 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
4971 #define BF SSP1STATbits.BF // bit 0
4972 #define UA SSP1STATbits.UA // bit 1
4973 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
4974 #define S SSP1STATbits.S // bit 3
4975 #define P SSP1STATbits.P // bit 4
4976 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
4977 #define CKE SSP1STATbits.CKE // bit 6
4978 #define SMP SSP1STATbits.SMP // bit 7
4980 #define C STATUSbits.C // bit 0
4981 #define DC STATUSbits.DC // bit 1
4982 #define Z STATUSbits.Z // bit 2
4983 #define NOT_PD STATUSbits.NOT_PD // bit 3
4984 #define NOT_TO STATUSbits.NOT_TO // bit 4
4986 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
4987 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
4988 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
4990 #define TMR1ON T1CONbits.TMR1ON // bit 0
4991 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
4992 #define SOSCEN T1CONbits.SOSCEN // bit 3, shadows bit in T1CONbits
4993 #define T1OSCEN T1CONbits.T1OSCEN // bit 3, shadows bit in T1CONbits
4994 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
4995 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
4996 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
4997 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
4999 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
5000 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
5001 #define T1GVAL T1GCONbits.T1GVAL // bit 2
5002 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
5003 #define T1GSPM T1GCONbits.T1GSPM // bit 4
5004 #define T1GTM T1GCONbits.T1GTM // bit 5
5005 #define T1GPOL T1GCONbits.T1GPOL // bit 6
5006 #define TMR1GE T1GCONbits.TMR1GE // bit 7
5008 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
5009 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
5010 #define TMR2ON T2CONbits.TMR2ON // bit 2
5011 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
5012 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
5013 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
5014 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
5016 #define T3GSS0 T3GCONbits.T3GSS0 // bit 0
5017 #define T3GSS1 T3GCONbits.T3GSS1 // bit 1
5018 #define T3GVAL T3GCONbits.T3GVAL // bit 2
5019 #define T3GGO_NOT_DONE T3GCONbits.T3GGO_NOT_DONE // bit 3
5020 #define T3GSPM T3GCONbits.T3GSPM // bit 4
5021 #define T3GTM T3GCONbits.T3GTM // bit 5
5022 #define T3GPOL T3GCONbits.T3GPOL // bit 6
5023 #define TMR3GE T3GCONbits.TMR3GE // bit 7
5025 #define T4CKPS0 T4CONbits.T4CKPS0 // bit 0
5026 #define T4CKPS1 T4CONbits.T4CKPS1 // bit 1
5027 #define TMR4ON T4CONbits.TMR4ON // bit 2
5028 #define T4OUTPS0 T4CONbits.T4OUTPS0 // bit 3
5029 #define T4OUTPS1 T4CONbits.T4OUTPS1 // bit 4
5030 #define T4OUTPS2 T4CONbits.T4OUTPS2 // bit 5
5031 #define T4OUTPS3 T4CONbits.T4OUTPS3 // bit 6
5033 #define T5GSS0 T5GCONbits.T5GSS0 // bit 0
5034 #define T5GSS1 T5GCONbits.T5GSS1 // bit 1
5035 #define T5GVAL T5GCONbits.T5GVAL // bit 2
5036 #define T5GGO_NOT_DONE T5GCONbits.T5GGO_NOT_DONE // bit 3
5037 #define T5GSPM T5GCONbits.T5GSPM // bit 4
5038 #define T5GTM T5GCONbits.T5GTM // bit 5
5039 #define T5GPOL T5GCONbits.T5GPOL // bit 6
5040 #define TMR5GE T5GCONbits.TMR5GE // bit 7
5042 #define T6CKPS0 T6CONbits.T6CKPS0 // bit 0
5043 #define T6CKPS1 T6CONbits.T6CKPS1 // bit 1
5044 #define TMR6ON T6CONbits.TMR6ON // bit 2
5045 #define T6OUTPS0 T6CONbits.T6OUTPS0 // bit 3
5046 #define T6OUTPS1 T6CONbits.T6OUTPS1 // bit 4
5047 #define T6OUTPS2 T6CONbits.T6OUTPS2 // bit 5
5048 #define T6OUTPS3 T6CONbits.T6OUTPS3 // bit 6
5050 #define T8CKPS0 T8CONbits.T8CKPS0 // bit 0
5051 #define T8CKPS1 T8CONbits.T8CKPS1 // bit 1
5052 #define TMR8ON T8CONbits.TMR8ON // bit 2
5053 #define T8OUTPS0 T8CONbits.T8OUTPS0 // bit 3
5054 #define T8OUTPS1 T8CONbits.T8OUTPS1 // bit 4
5055 #define T8OUTPS2 T8CONbits.T8OUTPS2 // bit 5
5056 #define T8OUTPS3 T8CONbits.T8OUTPS3 // bit 6
5058 #define T10CKPS0 T10CONbits.T10CKPS0 // bit 0
5059 #define T10CKPS1 T10CONbits.T10CKPS1 // bit 1
5060 #define TMR10ON T10CONbits.TMR10ON // bit 2
5061 #define T10OUTPS0 T10CONbits.T10OUTPS0 // bit 3
5062 #define T10OUTPS1 T10CONbits.T10OUTPS1 // bit 4
5063 #define T10OUTPS2 T10CONbits.T10OUTPS2 // bit 5
5064 #define T10OUTPS3 T10CONbits.T10OUTPS3 // bit 6
5066 #define TRISA0 TRISAbits.TRISA0 // bit 0
5067 #define TRISA1 TRISAbits.TRISA1 // bit 1
5068 #define TRISA2 TRISAbits.TRISA2 // bit 2
5069 #define TRISA3 TRISAbits.TRISA3 // bit 3
5070 #define TRISA4 TRISAbits.TRISA4 // bit 4
5071 #define TRISA5 TRISAbits.TRISA5 // bit 5
5072 #define TRISA6 TRISAbits.TRISA6 // bit 6
5073 #define TRISA7 TRISAbits.TRISA7 // bit 7
5075 #define TRISB0 TRISBbits.TRISB0 // bit 0
5076 #define TRISB1 TRISBbits.TRISB1 // bit 1
5077 #define TRISB2 TRISBbits.TRISB2 // bit 2
5078 #define TRISB3 TRISBbits.TRISB3 // bit 3
5079 #define TRISB4 TRISBbits.TRISB4 // bit 4
5080 #define TRISB5 TRISBbits.TRISB5 // bit 5
5081 #define TRISB6 TRISBbits.TRISB6 // bit 6
5082 #define TRISB7 TRISBbits.TRISB7 // bit 7
5084 #define TRISC0 TRISCbits.TRISC0 // bit 0
5085 #define TRISC1 TRISCbits.TRISC1 // bit 1
5086 #define TRISC2 TRISCbits.TRISC2 // bit 2
5087 #define TRISC3 TRISCbits.TRISC3 // bit 3
5088 #define TRISC4 TRISCbits.TRISC4 // bit 4
5089 #define TRISC5 TRISCbits.TRISC5 // bit 5
5090 #define TRISC6 TRISCbits.TRISC6 // bit 6
5091 #define TRISC7 TRISCbits.TRISC7 // bit 7
5093 #define TRISD0 TRISDbits.TRISD0 // bit 0
5094 #define TRISD1 TRISDbits.TRISD1 // bit 1
5095 #define TRISD2 TRISDbits.TRISD2 // bit 2
5096 #define TRISD3 TRISDbits.TRISD3 // bit 3
5097 #define TRISD4 TRISDbits.TRISD4 // bit 4
5098 #define TRISD5 TRISDbits.TRISD5 // bit 5
5099 #define TRISD6 TRISDbits.TRISD6 // bit 6
5100 #define TRISD7 TRISDbits.TRISD7 // bit 7
5102 #define TRISE0 TRISEbits.TRISE0 // bit 0
5103 #define TRISE1 TRISEbits.TRISE1 // bit 1
5104 #define TRISE2 TRISEbits.TRISE2 // bit 2
5105 #define TRISE3 TRISEbits.TRISE3 // bit 3
5106 #define TRISE4 TRISEbits.TRISE4 // bit 4
5107 #define TRISE5 TRISEbits.TRISE5 // bit 5
5108 #define TRISE6 TRISEbits.TRISE6 // bit 6
5109 #define TRISE7 TRISEbits.TRISE7 // bit 7
5111 #define TRISF0 TRISFbits.TRISF0 // bit 0
5112 #define TRISF1 TRISFbits.TRISF1 // bit 1
5113 #define TRISF2 TRISFbits.TRISF2 // bit 2
5114 #define TRISF3 TRISFbits.TRISF3 // bit 3
5115 #define TRISF4 TRISFbits.TRISF4 // bit 4
5116 #define TRISF5 TRISFbits.TRISF5 // bit 5
5117 #define TRISF6 TRISFbits.TRISF6 // bit 6
5118 #define TRISF7 TRISFbits.TRISF7 // bit 7
5120 #define TRISG0 TRISGbits.TRISG0 // bit 0
5121 #define TRISG1 TRISGbits.TRISG1 // bit 1
5122 #define TRISG2 TRISGbits.TRISG2 // bit 2
5123 #define TRISG3 TRISGbits.TRISG3 // bit 3
5124 #define TRISG4 TRISGbits.TRISG4 // bit 4
5126 #define TX9D TX1STAbits.TX9D // bit 0
5127 #define TRMT TX1STAbits.TRMT // bit 1
5128 #define BRGH TX1STAbits.BRGH // bit 2
5129 #define SENDB TX1STAbits.SENDB // bit 3
5130 #define SYNC TX1STAbits.SYNC // bit 4
5131 #define TXEN TX1STAbits.TXEN // bit 5
5132 #define TX9 TX1STAbits.TX9 // bit 6
5133 #define CSRC TX1STAbits.CSRC // bit 7
5135 #define VREGPM VREGCONbits.VREGPM // bit 1
5137 #define SWDTEN WDTCONbits.SWDTEN // bit 0
5138 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
5139 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
5140 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
5141 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
5142 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
5144 #define WPUB0 WPUBbits.WPUB0 // bit 0
5145 #define WPUB1 WPUBbits.WPUB1 // bit 1
5146 #define WPUB2 WPUBbits.WPUB2 // bit 2
5147 #define WPUB3 WPUBbits.WPUB3 // bit 3
5148 #define WPUB4 WPUBbits.WPUB4 // bit 4
5149 #define WPUB5 WPUBbits.WPUB5 // bit 5
5150 #define WPUB6 WPUBbits.WPUB6 // bit 6
5151 #define WPUB7 WPUBbits.WPUB7 // bit 7
5153 #define WPUD0 WPUDbits.WPUD0 // bit 0
5154 #define WPUD1 WPUDbits.WPUD1 // bit 1
5155 #define WPUD2 WPUDbits.WPUD2 // bit 2
5156 #define WPUD3 WPUDbits.WPUD3 // bit 3
5157 #define WPUD4 WPUDbits.WPUD4 // bit 4
5158 #define WPUD5 WPUDbits.WPUD5 // bit 5
5159 #define WPUD6 WPUDbits.WPUD6 // bit 6
5160 #define WPUD7 WPUDbits.WPUD7 // bit 7
5162 #define WPUE0 WPUEbits.WPUE0 // bit 0
5163 #define WPUE1 WPUEbits.WPUE1 // bit 1
5164 #define WPUE2 WPUEbits.WPUE2 // bit 2
5165 #define WPUE3 WPUEbits.WPUE3 // bit 3
5166 #define WPUE4 WPUEbits.WPUE4 // bit 4
5167 #define WPUE5 WPUEbits.WPUE5 // bit 5
5168 #define WPUE6 WPUEbits.WPUE6 // bit 6
5169 #define WPUE7 WPUEbits.WPUE7 // bit 7
5171 #define WPUG5 WPUGbits.WPUG5 // bit 5
5173 #endif // #ifndef NO_BIT_DEFINES
5175 #endif // #ifndef __PIC16F1526_H__