Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16lf1513.h
blobb05796f7c1ec114c2693d8fedb833619eec9823c
1 /*
2 * This declarations of the PIC16LF1513 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:06 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 __PIC16LF1513_H__
26 #define __PIC16LF1513_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 PORTE_ADDR 0x0010
54 #define PIR1_ADDR 0x0011
55 #define PIR2_ADDR 0x0012
56 #define TMR0_ADDR 0x0015
57 #define TMR1_ADDR 0x0016
58 #define TMR1L_ADDR 0x0016
59 #define TMR1H_ADDR 0x0017
60 #define T1CON_ADDR 0x0018
61 #define T1GCON_ADDR 0x0019
62 #define TMR2_ADDR 0x001A
63 #define PR2_ADDR 0x001B
64 #define T2CON_ADDR 0x001C
65 #define TRISA_ADDR 0x008C
66 #define TRISB_ADDR 0x008D
67 #define TRISC_ADDR 0x008E
68 #define TRISE_ADDR 0x0090
69 #define PIE1_ADDR 0x0091
70 #define PIE2_ADDR 0x0092
71 #define OPTION_REG_ADDR 0x0095
72 #define PCON_ADDR 0x0096
73 #define WDTCON_ADDR 0x0097
74 #define OSCCON_ADDR 0x0099
75 #define OSCSTAT_ADDR 0x009A
76 #define ADRES_ADDR 0x009B
77 #define ADRES0_ADDR 0x009B
78 #define ADRES0L_ADDR 0x009B
79 #define ADRESL_ADDR 0x009B
80 #define ADRES0H_ADDR 0x009C
81 #define ADRESH_ADDR 0x009C
82 #define ADCON0_ADDR 0x009D
83 #define ADCON1_ADDR 0x009E
84 #define LATA_ADDR 0x010C
85 #define LATB_ADDR 0x010D
86 #define LATC_ADDR 0x010E
87 #define BORCON_ADDR 0x0116
88 #define FVRCON_ADDR 0x0117
89 #define APFCON_ADDR 0x011D
90 #define ANSELA_ADDR 0x018C
91 #define ANSELB_ADDR 0x018D
92 #define ANSELC_ADDR 0x018E
93 #define PMADR_ADDR 0x0191
94 #define PMADRL_ADDR 0x0191
95 #define PMADRH_ADDR 0x0192
96 #define PMDAT_ADDR 0x0193
97 #define PMDATL_ADDR 0x0193
98 #define PMDATH_ADDR 0x0194
99 #define PMCON1_ADDR 0x0195
100 #define PMCON2_ADDR 0x0196
101 #define RCREG_ADDR 0x0199
102 #define TXREG_ADDR 0x019A
103 #define SP1BRG_ADDR 0x019B
104 #define SP1BRGL_ADDR 0x019B
105 #define SPBRG_ADDR 0x019B
106 #define SPBRGL_ADDR 0x019B
107 #define SP1BRGH_ADDR 0x019C
108 #define SPBRGH_ADDR 0x019C
109 #define RCSTA_ADDR 0x019D
110 #define TXSTA_ADDR 0x019E
111 #define BAUDCON_ADDR 0x019F
112 #define WPUB_ADDR 0x020D
113 #define WPUE_ADDR 0x0210
114 #define SSP1BUF_ADDR 0x0211
115 #define SSPBUF_ADDR 0x0211
116 #define SSP1ADD_ADDR 0x0212
117 #define SSPADD_ADDR 0x0212
118 #define SSP1MSK_ADDR 0x0213
119 #define SSPMSK_ADDR 0x0213
120 #define SSP1STAT_ADDR 0x0214
121 #define SSPSTAT_ADDR 0x0214
122 #define SSP1CON1_ADDR 0x0215
123 #define SSPCON_ADDR 0x0215
124 #define SSPCON1_ADDR 0x0215
125 #define SSP1CON2_ADDR 0x0216
126 #define SSPCON2_ADDR 0x0216
127 #define SSP1CON3_ADDR 0x0217
128 #define SSPCON3_ADDR 0x0217
129 #define CCPR1_ADDR 0x0291
130 #define CCPR1L_ADDR 0x0291
131 #define CCPR1H_ADDR 0x0292
132 #define CCP1CON_ADDR 0x0293
133 #define CCPR2_ADDR 0x0298
134 #define CCPR2L_ADDR 0x0298
135 #define CCPR2H_ADDR 0x0299
136 #define CCP2CON_ADDR 0x029A
137 #define IOCBP_ADDR 0x0394
138 #define IOCBN_ADDR 0x0395
139 #define IOCBF_ADDR 0x0396
140 #define AADCON0_ADDR 0x0711
141 #define AADCON1_ADDR 0x0712
142 #define AADCON2_ADDR 0x0713
143 #define AADCON3_ADDR 0x0714
144 #define AADSTAT_ADDR 0x0715
145 #define AADPRE_ADDR 0x0716
146 #define AADACQ_ADDR 0x0717
147 #define AADGRD_ADDR 0x0718
148 #define AADCAP_ADDR 0x0719
149 #define AADRES0_ADDR 0x071A
150 #define AADRES0L_ADDR 0x071A
151 #define AD1RES0_ADDR 0x071A
152 #define AADRES0H_ADDR 0x071B
153 #define AADRES1_ADDR 0x071C
154 #define AADRES1L_ADDR 0x071C
155 #define AD1RES1_ADDR 0x071C
156 #define AADRES1H_ADDR 0x071D
157 #define STATUS_SHAD_ADDR 0x0FE4
158 #define WREG_SHAD_ADDR 0x0FE5
159 #define BSR_SHAD_ADDR 0x0FE6
160 #define PCLATH_SHAD_ADDR 0x0FE7
161 #define FSR0L_SHAD_ADDR 0x0FE8
162 #define FSR0H_SHAD_ADDR 0x0FE9
163 #define FSR1L_SHAD_ADDR 0x0FEA
164 #define FSR1H_SHAD_ADDR 0x0FEB
165 #define STKPTR_ADDR 0x0FED
166 #define TOSL_ADDR 0x0FEE
167 #define TOSH_ADDR 0x0FEF
169 #endif // #ifndef NO_ADDR_DEFINES
171 //==============================================================================
173 // Register Definitions
175 //==============================================================================
177 extern __at(0x0000) __sfr INDF0;
178 extern __at(0x0001) __sfr INDF1;
179 extern __at(0x0002) __sfr PCL;
181 //==============================================================================
182 // STATUS Bits
184 extern __at(0x0003) __sfr STATUS;
186 typedef struct
188 unsigned C : 1;
189 unsigned DC : 1;
190 unsigned Z : 1;
191 unsigned NOT_PD : 1;
192 unsigned NOT_TO : 1;
193 unsigned : 1;
194 unsigned : 1;
195 unsigned : 1;
196 } __STATUSbits_t;
198 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
200 #define _C 0x01
201 #define _DC 0x02
202 #define _Z 0x04
203 #define _NOT_PD 0x08
204 #define _NOT_TO 0x10
206 //==============================================================================
208 extern __at(0x0004) __sfr FSR0;
209 extern __at(0x0004) __sfr FSR0L;
210 extern __at(0x0005) __sfr FSR0H;
211 extern __at(0x0006) __sfr FSR1;
212 extern __at(0x0006) __sfr FSR1L;
213 extern __at(0x0007) __sfr FSR1H;
215 //==============================================================================
216 // BSR Bits
218 extern __at(0x0008) __sfr BSR;
220 typedef union
222 struct
224 unsigned BSR0 : 1;
225 unsigned BSR1 : 1;
226 unsigned BSR2 : 1;
227 unsigned BSR3 : 1;
228 unsigned BSR4 : 1;
229 unsigned : 1;
230 unsigned : 1;
231 unsigned : 1;
234 struct
236 unsigned BSR : 5;
237 unsigned : 3;
239 } __BSRbits_t;
241 extern __at(0x0008) volatile __BSRbits_t BSRbits;
243 #define _BSR0 0x01
244 #define _BSR1 0x02
245 #define _BSR2 0x04
246 #define _BSR3 0x08
247 #define _BSR4 0x10
249 //==============================================================================
251 extern __at(0x0009) __sfr WREG;
252 extern __at(0x000A) __sfr PCLATH;
254 //==============================================================================
255 // INTCON Bits
257 extern __at(0x000B) __sfr INTCON;
259 typedef union
261 struct
263 unsigned IOCIF : 1;
264 unsigned INTF : 1;
265 unsigned TMR0IF : 1;
266 unsigned IOCIE : 1;
267 unsigned INTE : 1;
268 unsigned TMR0IE : 1;
269 unsigned PEIE : 1;
270 unsigned GIE : 1;
273 struct
275 unsigned : 1;
276 unsigned : 1;
277 unsigned T0IF : 1;
278 unsigned : 1;
279 unsigned : 1;
280 unsigned T0IE : 1;
281 unsigned : 1;
282 unsigned : 1;
284 } __INTCONbits_t;
286 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
288 #define _IOCIF 0x01
289 #define _INTF 0x02
290 #define _TMR0IF 0x04
291 #define _T0IF 0x04
292 #define _IOCIE 0x08
293 #define _INTE 0x10
294 #define _TMR0IE 0x20
295 #define _T0IE 0x20
296 #define _PEIE 0x40
297 #define _GIE 0x80
299 //==============================================================================
302 //==============================================================================
303 // PORTA Bits
305 extern __at(0x000C) __sfr PORTA;
307 typedef struct
309 unsigned RA0 : 1;
310 unsigned RA1 : 1;
311 unsigned RA2 : 1;
312 unsigned RA3 : 1;
313 unsigned RA4 : 1;
314 unsigned RA5 : 1;
315 unsigned RA6 : 1;
316 unsigned RA7 : 1;
317 } __PORTAbits_t;
319 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
321 #define _RA0 0x01
322 #define _RA1 0x02
323 #define _RA2 0x04
324 #define _RA3 0x08
325 #define _RA4 0x10
326 #define _RA5 0x20
327 #define _RA6 0x40
328 #define _RA7 0x80
330 //==============================================================================
333 //==============================================================================
334 // PORTB Bits
336 extern __at(0x000D) __sfr PORTB;
338 typedef struct
340 unsigned RB0 : 1;
341 unsigned RB1 : 1;
342 unsigned RB2 : 1;
343 unsigned RB3 : 1;
344 unsigned RB4 : 1;
345 unsigned RB5 : 1;
346 unsigned RB6 : 1;
347 unsigned RB7 : 1;
348 } __PORTBbits_t;
350 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
352 #define _RB0 0x01
353 #define _RB1 0x02
354 #define _RB2 0x04
355 #define _RB3 0x08
356 #define _RB4 0x10
357 #define _RB5 0x20
358 #define _RB6 0x40
359 #define _RB7 0x80
361 //==============================================================================
364 //==============================================================================
365 // PORTC Bits
367 extern __at(0x000E) __sfr PORTC;
369 typedef struct
371 unsigned RC0 : 1;
372 unsigned RC1 : 1;
373 unsigned RC2 : 1;
374 unsigned RC3 : 1;
375 unsigned RC4 : 1;
376 unsigned RC5 : 1;
377 unsigned RC6 : 1;
378 unsigned RC7 : 1;
379 } __PORTCbits_t;
381 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
383 #define _RC0 0x01
384 #define _RC1 0x02
385 #define _RC2 0x04
386 #define _RC3 0x08
387 #define _RC4 0x10
388 #define _RC5 0x20
389 #define _RC6 0x40
390 #define _RC7 0x80
392 //==============================================================================
395 //==============================================================================
396 // PORTE Bits
398 extern __at(0x0010) __sfr PORTE;
400 typedef struct
402 unsigned : 1;
403 unsigned : 1;
404 unsigned : 1;
405 unsigned RE3 : 1;
406 unsigned : 1;
407 unsigned : 1;
408 unsigned : 1;
409 unsigned : 1;
410 } __PORTEbits_t;
412 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
414 #define _RE3 0x08
416 //==============================================================================
419 //==============================================================================
420 // PIR1 Bits
422 extern __at(0x0011) __sfr PIR1;
424 typedef struct
426 unsigned TMR1IF : 1;
427 unsigned TMR2IF : 1;
428 unsigned CCP1IF : 1;
429 unsigned SSPIF : 1;
430 unsigned TXIF : 1;
431 unsigned RCIF : 1;
432 unsigned ADIF : 1;
433 unsigned TMR1GIF : 1;
434 } __PIR1bits_t;
436 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
438 #define _TMR1IF 0x01
439 #define _TMR2IF 0x02
440 #define _CCP1IF 0x04
441 #define _SSPIF 0x08
442 #define _TXIF 0x10
443 #define _RCIF 0x20
444 #define _ADIF 0x40
445 #define _TMR1GIF 0x80
447 //==============================================================================
450 //==============================================================================
451 // PIR2 Bits
453 extern __at(0x0012) __sfr PIR2;
455 typedef struct
457 unsigned CCP2IF : 1;
458 unsigned : 1;
459 unsigned : 1;
460 unsigned BCLIF : 1;
461 unsigned : 1;
462 unsigned : 1;
463 unsigned : 1;
464 unsigned OSFIF : 1;
465 } __PIR2bits_t;
467 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
469 #define _CCP2IF 0x01
470 #define _BCLIF 0x08
471 #define _OSFIF 0x80
473 //==============================================================================
475 extern __at(0x0015) __sfr TMR0;
476 extern __at(0x0016) __sfr TMR1;
477 extern __at(0x0016) __sfr TMR1L;
478 extern __at(0x0017) __sfr TMR1H;
480 //==============================================================================
481 // T1CON Bits
483 extern __at(0x0018) __sfr T1CON;
485 typedef union
487 struct
489 unsigned TMR1ON : 1;
490 unsigned : 1;
491 unsigned NOT_T1SYNC : 1;
492 unsigned T1OSCEN : 1;
493 unsigned T1CKPS0 : 1;
494 unsigned T1CKPS1 : 1;
495 unsigned TMR1CS0 : 1;
496 unsigned TMR1CS1 : 1;
499 struct
501 unsigned : 4;
502 unsigned T1CKPS : 2;
503 unsigned : 2;
506 struct
508 unsigned : 6;
509 unsigned TMR1CS : 2;
511 } __T1CONbits_t;
513 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
515 #define _TMR1ON 0x01
516 #define _NOT_T1SYNC 0x04
517 #define _T1OSCEN 0x08
518 #define _T1CKPS0 0x10
519 #define _T1CKPS1 0x20
520 #define _TMR1CS0 0x40
521 #define _TMR1CS1 0x80
523 //==============================================================================
526 //==============================================================================
527 // T1GCON Bits
529 extern __at(0x0019) __sfr T1GCON;
531 typedef union
533 struct
535 unsigned T1GSS0 : 1;
536 unsigned T1GSS1 : 1;
537 unsigned T1GVAL : 1;
538 unsigned T1GGO_NOT_DONE : 1;
539 unsigned T1GSPM : 1;
540 unsigned T1GTM : 1;
541 unsigned T1GPOL : 1;
542 unsigned TMR1GE : 1;
545 struct
547 unsigned T1GSS : 2;
548 unsigned : 6;
550 } __T1GCONbits_t;
552 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
554 #define _T1GSS0 0x01
555 #define _T1GSS1 0x02
556 #define _T1GVAL 0x04
557 #define _T1GGO_NOT_DONE 0x08
558 #define _T1GSPM 0x10
559 #define _T1GTM 0x20
560 #define _T1GPOL 0x40
561 #define _TMR1GE 0x80
563 //==============================================================================
565 extern __at(0x001A) __sfr TMR2;
566 extern __at(0x001B) __sfr PR2;
568 //==============================================================================
569 // T2CON Bits
571 extern __at(0x001C) __sfr T2CON;
573 typedef union
575 struct
577 unsigned T2CKPS0 : 1;
578 unsigned T2CKPS1 : 1;
579 unsigned TMR2ON : 1;
580 unsigned T2OUTPS0 : 1;
581 unsigned T2OUTPS1 : 1;
582 unsigned T2OUTPS2 : 1;
583 unsigned T2OUTPS3 : 1;
584 unsigned : 1;
587 struct
589 unsigned T2CKPS : 2;
590 unsigned : 6;
593 struct
595 unsigned : 3;
596 unsigned T2OUTPS : 4;
597 unsigned : 1;
599 } __T2CONbits_t;
601 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
603 #define _T2CKPS0 0x01
604 #define _T2CKPS1 0x02
605 #define _TMR2ON 0x04
606 #define _T2OUTPS0 0x08
607 #define _T2OUTPS1 0x10
608 #define _T2OUTPS2 0x20
609 #define _T2OUTPS3 0x40
611 //==============================================================================
614 //==============================================================================
615 // TRISA Bits
617 extern __at(0x008C) __sfr TRISA;
619 typedef struct
621 unsigned TRISA0 : 1;
622 unsigned TRISA1 : 1;
623 unsigned TRISA2 : 1;
624 unsigned TRISA3 : 1;
625 unsigned TRISA4 : 1;
626 unsigned TRISA5 : 1;
627 unsigned TRISA6 : 1;
628 unsigned TRISA7 : 1;
629 } __TRISAbits_t;
631 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
633 #define _TRISA0 0x01
634 #define _TRISA1 0x02
635 #define _TRISA2 0x04
636 #define _TRISA3 0x08
637 #define _TRISA4 0x10
638 #define _TRISA5 0x20
639 #define _TRISA6 0x40
640 #define _TRISA7 0x80
642 //==============================================================================
645 //==============================================================================
646 // TRISB Bits
648 extern __at(0x008D) __sfr TRISB;
650 typedef struct
652 unsigned TRISB0 : 1;
653 unsigned TRISB1 : 1;
654 unsigned TRISB2 : 1;
655 unsigned TRISB3 : 1;
656 unsigned TRISB4 : 1;
657 unsigned TRISB5 : 1;
658 unsigned TRISB6 : 1;
659 unsigned TRISB7 : 1;
660 } __TRISBbits_t;
662 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
664 #define _TRISB0 0x01
665 #define _TRISB1 0x02
666 #define _TRISB2 0x04
667 #define _TRISB3 0x08
668 #define _TRISB4 0x10
669 #define _TRISB5 0x20
670 #define _TRISB6 0x40
671 #define _TRISB7 0x80
673 //==============================================================================
676 //==============================================================================
677 // TRISC Bits
679 extern __at(0x008E) __sfr TRISC;
681 typedef struct
683 unsigned TRISC0 : 1;
684 unsigned TRISC1 : 1;
685 unsigned TRISC2 : 1;
686 unsigned TRISC3 : 1;
687 unsigned TRISC4 : 1;
688 unsigned TRISC5 : 1;
689 unsigned TRISC6 : 1;
690 unsigned TRISC7 : 1;
691 } __TRISCbits_t;
693 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
695 #define _TRISC0 0x01
696 #define _TRISC1 0x02
697 #define _TRISC2 0x04
698 #define _TRISC3 0x08
699 #define _TRISC4 0x10
700 #define _TRISC5 0x20
701 #define _TRISC6 0x40
702 #define _TRISC7 0x80
704 //==============================================================================
706 extern __at(0x0090) __sfr TRISE;
708 //==============================================================================
709 // PIE1 Bits
711 extern __at(0x0091) __sfr PIE1;
713 typedef struct
715 unsigned TMR1IE : 1;
716 unsigned TMR2IE : 1;
717 unsigned CCP1IE : 1;
718 unsigned SSPIE : 1;
719 unsigned TXIE : 1;
720 unsigned RCIE : 1;
721 unsigned ADIE : 1;
722 unsigned TMR1GIE : 1;
723 } __PIE1bits_t;
725 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
727 #define _TMR1IE 0x01
728 #define _TMR2IE 0x02
729 #define _CCP1IE 0x04
730 #define _SSPIE 0x08
731 #define _TXIE 0x10
732 #define _RCIE 0x20
733 #define _ADIE 0x40
734 #define _TMR1GIE 0x80
736 //==============================================================================
739 //==============================================================================
740 // PIE2 Bits
742 extern __at(0x0092) __sfr PIE2;
744 typedef struct
746 unsigned CCP2IE : 1;
747 unsigned : 1;
748 unsigned : 1;
749 unsigned BCLIE : 1;
750 unsigned : 1;
751 unsigned : 1;
752 unsigned : 1;
753 unsigned OSFIE : 1;
754 } __PIE2bits_t;
756 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
758 #define _CCP2IE 0x01
759 #define _BCLIE 0x08
760 #define _OSFIE 0x80
762 //==============================================================================
765 //==============================================================================
766 // OPTION_REG Bits
768 extern __at(0x0095) __sfr OPTION_REG;
770 typedef union
772 struct
774 unsigned PS0 : 1;
775 unsigned PS1 : 1;
776 unsigned PS2 : 1;
777 unsigned PSA : 1;
778 unsigned TMR0SE : 1;
779 unsigned TMR0CS : 1;
780 unsigned INTEDG : 1;
781 unsigned NOT_WPUEN : 1;
784 struct
786 unsigned : 1;
787 unsigned : 1;
788 unsigned : 1;
789 unsigned : 1;
790 unsigned T0SE : 1;
791 unsigned T0CS : 1;
792 unsigned : 1;
793 unsigned : 1;
796 struct
798 unsigned PS : 3;
799 unsigned : 5;
801 } __OPTION_REGbits_t;
803 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
805 #define _PS0 0x01
806 #define _PS1 0x02
807 #define _PS2 0x04
808 #define _PSA 0x08
809 #define _TMR0SE 0x10
810 #define _T0SE 0x10
811 #define _TMR0CS 0x20
812 #define _T0CS 0x20
813 #define _INTEDG 0x40
814 #define _NOT_WPUEN 0x80
816 //==============================================================================
819 //==============================================================================
820 // PCON Bits
822 extern __at(0x0096) __sfr PCON;
824 typedef struct
826 unsigned NOT_BOR : 1;
827 unsigned NOT_POR : 1;
828 unsigned NOT_RI : 1;
829 unsigned NOT_RMCLR : 1;
830 unsigned NOT_RWDT : 1;
831 unsigned : 1;
832 unsigned STKUNF : 1;
833 unsigned STKOVF : 1;
834 } __PCONbits_t;
836 extern __at(0x0096) volatile __PCONbits_t PCONbits;
838 #define _NOT_BOR 0x01
839 #define _NOT_POR 0x02
840 #define _NOT_RI 0x04
841 #define _NOT_RMCLR 0x08
842 #define _NOT_RWDT 0x10
843 #define _STKUNF 0x40
844 #define _STKOVF 0x80
846 //==============================================================================
849 //==============================================================================
850 // WDTCON Bits
852 extern __at(0x0097) __sfr WDTCON;
854 typedef union
856 struct
858 unsigned SWDTEN : 1;
859 unsigned WDTPS0 : 1;
860 unsigned WDTPS1 : 1;
861 unsigned WDTPS2 : 1;
862 unsigned WDTPS3 : 1;
863 unsigned WDTPS4 : 1;
864 unsigned : 1;
865 unsigned : 1;
868 struct
870 unsigned : 1;
871 unsigned WDTPS : 5;
872 unsigned : 2;
874 } __WDTCONbits_t;
876 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
878 #define _SWDTEN 0x01
879 #define _WDTPS0 0x02
880 #define _WDTPS1 0x04
881 #define _WDTPS2 0x08
882 #define _WDTPS3 0x10
883 #define _WDTPS4 0x20
885 //==============================================================================
888 //==============================================================================
889 // OSCCON Bits
891 extern __at(0x0099) __sfr OSCCON;
893 typedef union
895 struct
897 unsigned SCS0 : 1;
898 unsigned SCS1 : 1;
899 unsigned : 1;
900 unsigned IRCF0 : 1;
901 unsigned IRCF1 : 1;
902 unsigned IRCF2 : 1;
903 unsigned IRCF3 : 1;
904 unsigned : 1;
907 struct
909 unsigned SCS : 2;
910 unsigned : 6;
913 struct
915 unsigned : 3;
916 unsigned IRCF : 4;
917 unsigned : 1;
919 } __OSCCONbits_t;
921 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
923 #define _SCS0 0x01
924 #define _SCS1 0x02
925 #define _IRCF0 0x08
926 #define _IRCF1 0x10
927 #define _IRCF2 0x20
928 #define _IRCF3 0x40
930 //==============================================================================
933 //==============================================================================
934 // OSCSTAT Bits
936 extern __at(0x009A) __sfr OSCSTAT;
938 typedef union
940 struct
942 unsigned HFIOFS : 1;
943 unsigned LFIOFR : 1;
944 unsigned : 1;
945 unsigned : 1;
946 unsigned HFIOFR : 1;
947 unsigned OSTS : 1;
948 unsigned : 1;
949 unsigned SOSCR : 1;
952 struct
954 unsigned : 1;
955 unsigned : 1;
956 unsigned : 1;
957 unsigned : 1;
958 unsigned : 1;
959 unsigned : 1;
960 unsigned : 1;
961 unsigned T1OSCR : 1;
963 } __OSCSTATbits_t;
965 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
967 #define _HFIOFS 0x01
968 #define _LFIOFR 0x02
969 #define _HFIOFR 0x10
970 #define _OSTS 0x20
971 #define _SOSCR 0x80
972 #define _T1OSCR 0x80
974 //==============================================================================
976 extern __at(0x009B) __sfr ADRES;
977 extern __at(0x009B) __sfr ADRES0;
978 extern __at(0x009B) __sfr ADRES0L;
979 extern __at(0x009B) __sfr ADRESL;
980 extern __at(0x009C) __sfr ADRES0H;
981 extern __at(0x009C) __sfr ADRESH;
983 //==============================================================================
984 // ADCON0 Bits
986 extern __at(0x009D) __sfr ADCON0;
988 typedef union
990 struct
992 unsigned ADON : 1;
993 unsigned GO_NOT_DONE : 1;
994 unsigned CHS0 : 1;
995 unsigned CHS1 : 1;
996 unsigned CHS2 : 1;
997 unsigned CHS3 : 1;
998 unsigned CHS4 : 1;
999 unsigned : 1;
1002 struct
1004 unsigned : 1;
1005 unsigned ADGO : 1;
1006 unsigned : 1;
1007 unsigned : 1;
1008 unsigned : 1;
1009 unsigned : 1;
1010 unsigned : 1;
1011 unsigned : 1;
1014 struct
1016 unsigned : 1;
1017 unsigned GO : 1;
1018 unsigned : 1;
1019 unsigned : 1;
1020 unsigned : 1;
1021 unsigned : 1;
1022 unsigned : 1;
1023 unsigned : 1;
1026 struct
1028 unsigned : 2;
1029 unsigned CHS : 5;
1030 unsigned : 1;
1032 } __ADCON0bits_t;
1034 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1036 #define _ADCON0_ADON 0x01
1037 #define _ADCON0_GO_NOT_DONE 0x02
1038 #define _ADCON0_ADGO 0x02
1039 #define _ADCON0_GO 0x02
1040 #define _ADCON0_CHS0 0x04
1041 #define _ADCON0_CHS1 0x08
1042 #define _ADCON0_CHS2 0x10
1043 #define _ADCON0_CHS3 0x20
1044 #define _ADCON0_CHS4 0x40
1046 //==============================================================================
1049 //==============================================================================
1050 // ADCON1 Bits
1052 extern __at(0x009E) __sfr ADCON1;
1054 typedef union
1056 struct
1058 unsigned ADPREF0 : 1;
1059 unsigned ADPREF1 : 1;
1060 unsigned : 1;
1061 unsigned : 1;
1062 unsigned ADCS0 : 1;
1063 unsigned ADCS1 : 1;
1064 unsigned ADCS2 : 1;
1065 unsigned ADFM : 1;
1068 struct
1070 unsigned ADPREF : 2;
1071 unsigned : 6;
1074 struct
1076 unsigned : 4;
1077 unsigned ADCS : 3;
1078 unsigned : 1;
1080 } __ADCON1bits_t;
1082 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1084 #define _ADCON1_ADPREF0 0x01
1085 #define _ADCON1_ADPREF1 0x02
1086 #define _ADCON1_ADCS0 0x10
1087 #define _ADCON1_ADCS1 0x20
1088 #define _ADCON1_ADCS2 0x40
1089 #define _ADCON1_ADFM 0x80
1091 //==============================================================================
1094 //==============================================================================
1095 // LATA Bits
1097 extern __at(0x010C) __sfr LATA;
1099 typedef struct
1101 unsigned LATA0 : 1;
1102 unsigned LATA1 : 1;
1103 unsigned LATA2 : 1;
1104 unsigned LATA3 : 1;
1105 unsigned LATA4 : 1;
1106 unsigned LATA5 : 1;
1107 unsigned LATA6 : 1;
1108 unsigned LATA7 : 1;
1109 } __LATAbits_t;
1111 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1113 #define _LATA0 0x01
1114 #define _LATA1 0x02
1115 #define _LATA2 0x04
1116 #define _LATA3 0x08
1117 #define _LATA4 0x10
1118 #define _LATA5 0x20
1119 #define _LATA6 0x40
1120 #define _LATA7 0x80
1122 //==============================================================================
1125 //==============================================================================
1126 // LATB Bits
1128 extern __at(0x010D) __sfr LATB;
1130 typedef struct
1132 unsigned LATB0 : 1;
1133 unsigned LATB1 : 1;
1134 unsigned LATB2 : 1;
1135 unsigned LATB3 : 1;
1136 unsigned LATB4 : 1;
1137 unsigned LATB5 : 1;
1138 unsigned LATB6 : 1;
1139 unsigned LATB7 : 1;
1140 } __LATBbits_t;
1142 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1144 #define _LATB0 0x01
1145 #define _LATB1 0x02
1146 #define _LATB2 0x04
1147 #define _LATB3 0x08
1148 #define _LATB4 0x10
1149 #define _LATB5 0x20
1150 #define _LATB6 0x40
1151 #define _LATB7 0x80
1153 //==============================================================================
1156 //==============================================================================
1157 // LATC Bits
1159 extern __at(0x010E) __sfr LATC;
1161 typedef struct
1163 unsigned LATC0 : 1;
1164 unsigned LATC1 : 1;
1165 unsigned LATC2 : 1;
1166 unsigned LATC3 : 1;
1167 unsigned LATC4 : 1;
1168 unsigned LATC5 : 1;
1169 unsigned LATC6 : 1;
1170 unsigned LATC7 : 1;
1171 } __LATCbits_t;
1173 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1175 #define _LATC0 0x01
1176 #define _LATC1 0x02
1177 #define _LATC2 0x04
1178 #define _LATC3 0x08
1179 #define _LATC4 0x10
1180 #define _LATC5 0x20
1181 #define _LATC6 0x40
1182 #define _LATC7 0x80
1184 //==============================================================================
1187 //==============================================================================
1188 // BORCON Bits
1190 extern __at(0x0116) __sfr BORCON;
1192 typedef struct
1194 unsigned BORRDY : 1;
1195 unsigned : 1;
1196 unsigned : 1;
1197 unsigned : 1;
1198 unsigned : 1;
1199 unsigned : 1;
1200 unsigned BORFS : 1;
1201 unsigned SBOREN : 1;
1202 } __BORCONbits_t;
1204 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1206 #define _BORRDY 0x01
1207 #define _BORFS 0x40
1208 #define _SBOREN 0x80
1210 //==============================================================================
1213 //==============================================================================
1214 // FVRCON Bits
1216 extern __at(0x0117) __sfr FVRCON;
1218 typedef union
1220 struct
1222 unsigned ADFVR0 : 1;
1223 unsigned ADFVR1 : 1;
1224 unsigned : 1;
1225 unsigned : 1;
1226 unsigned TSRNG : 1;
1227 unsigned TSEN : 1;
1228 unsigned FVRRDY : 1;
1229 unsigned FVREN : 1;
1232 struct
1234 unsigned ADFVR : 2;
1235 unsigned : 6;
1237 } __FVRCONbits_t;
1239 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1241 #define _ADFVR0 0x01
1242 #define _ADFVR1 0x02
1243 #define _TSRNG 0x10
1244 #define _TSEN 0x20
1245 #define _FVRRDY 0x40
1246 #define _FVREN 0x80
1248 //==============================================================================
1251 //==============================================================================
1252 // APFCON Bits
1254 extern __at(0x011D) __sfr APFCON;
1256 typedef struct
1258 unsigned CCP2SEL : 1;
1259 unsigned SSSEL : 1;
1260 unsigned : 1;
1261 unsigned : 1;
1262 unsigned : 1;
1263 unsigned : 1;
1264 unsigned : 1;
1265 unsigned : 1;
1266 } __APFCONbits_t;
1268 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1270 #define _CCP2SEL 0x01
1271 #define _SSSEL 0x02
1273 //==============================================================================
1276 //==============================================================================
1277 // ANSELA Bits
1279 extern __at(0x018C) __sfr ANSELA;
1281 typedef struct
1283 unsigned ANSA0 : 1;
1284 unsigned ANSA1 : 1;
1285 unsigned ANSA2 : 1;
1286 unsigned ANSA3 : 1;
1287 unsigned : 1;
1288 unsigned ANSA5 : 1;
1289 unsigned : 1;
1290 unsigned : 1;
1291 } __ANSELAbits_t;
1293 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1295 #define _ANSA0 0x01
1296 #define _ANSA1 0x02
1297 #define _ANSA2 0x04
1298 #define _ANSA3 0x08
1299 #define _ANSA5 0x20
1301 //==============================================================================
1304 //==============================================================================
1305 // ANSELB Bits
1307 extern __at(0x018D) __sfr ANSELB;
1309 typedef union
1311 struct
1313 unsigned ANSB0 : 1;
1314 unsigned ANSB1 : 1;
1315 unsigned ANSB2 : 1;
1316 unsigned ANSB3 : 1;
1317 unsigned ANSB4 : 1;
1318 unsigned ANSB5 : 1;
1319 unsigned : 1;
1320 unsigned : 1;
1323 struct
1325 unsigned ANSB : 6;
1326 unsigned : 2;
1328 } __ANSELBbits_t;
1330 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1332 #define _ANSB0 0x01
1333 #define _ANSB1 0x02
1334 #define _ANSB2 0x04
1335 #define _ANSB3 0x08
1336 #define _ANSB4 0x10
1337 #define _ANSB5 0x20
1339 //==============================================================================
1342 //==============================================================================
1343 // ANSELC Bits
1345 extern __at(0x018E) __sfr ANSELC;
1347 typedef struct
1349 unsigned : 1;
1350 unsigned : 1;
1351 unsigned ANSC2 : 1;
1352 unsigned ANSC3 : 1;
1353 unsigned ANSC4 : 1;
1354 unsigned ANSC5 : 1;
1355 unsigned ANSC6 : 1;
1356 unsigned ANSC7 : 1;
1357 } __ANSELCbits_t;
1359 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1361 #define _ANSC2 0x04
1362 #define _ANSC3 0x08
1363 #define _ANSC4 0x10
1364 #define _ANSC5 0x20
1365 #define _ANSC6 0x40
1366 #define _ANSC7 0x80
1368 //==============================================================================
1370 extern __at(0x0191) __sfr PMADR;
1371 extern __at(0x0191) __sfr PMADRL;
1372 extern __at(0x0192) __sfr PMADRH;
1373 extern __at(0x0193) __sfr PMDAT;
1374 extern __at(0x0193) __sfr PMDATL;
1375 extern __at(0x0194) __sfr PMDATH;
1377 //==============================================================================
1378 // PMCON1 Bits
1380 extern __at(0x0195) __sfr PMCON1;
1382 typedef struct
1384 unsigned RD : 1;
1385 unsigned WR : 1;
1386 unsigned WREN : 1;
1387 unsigned WRERR : 1;
1388 unsigned FREE : 1;
1389 unsigned LWLO : 1;
1390 unsigned CFGS : 1;
1391 unsigned : 1;
1392 } __PMCON1bits_t;
1394 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1396 #define _RD 0x01
1397 #define _WR 0x02
1398 #define _WREN 0x04
1399 #define _WRERR 0x08
1400 #define _FREE 0x10
1401 #define _LWLO 0x20
1402 #define _CFGS 0x40
1404 //==============================================================================
1406 extern __at(0x0196) __sfr PMCON2;
1407 extern __at(0x0199) __sfr RCREG;
1408 extern __at(0x019A) __sfr TXREG;
1409 extern __at(0x019B) __sfr SP1BRG;
1410 extern __at(0x019B) __sfr SP1BRGL;
1411 extern __at(0x019B) __sfr SPBRG;
1412 extern __at(0x019B) __sfr SPBRGL;
1413 extern __at(0x019C) __sfr SP1BRGH;
1414 extern __at(0x019C) __sfr SPBRGH;
1416 //==============================================================================
1417 // RCSTA Bits
1419 extern __at(0x019D) __sfr RCSTA;
1421 typedef struct
1423 unsigned RX9D : 1;
1424 unsigned OERR : 1;
1425 unsigned FERR : 1;
1426 unsigned ADDEN : 1;
1427 unsigned CREN : 1;
1428 unsigned SREN : 1;
1429 unsigned RX9 : 1;
1430 unsigned SPEN : 1;
1431 } __RCSTAbits_t;
1433 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1435 #define _RX9D 0x01
1436 #define _OERR 0x02
1437 #define _FERR 0x04
1438 #define _ADDEN 0x08
1439 #define _CREN 0x10
1440 #define _SREN 0x20
1441 #define _RX9 0x40
1442 #define _SPEN 0x80
1444 //==============================================================================
1447 //==============================================================================
1448 // TXSTA Bits
1450 extern __at(0x019E) __sfr TXSTA;
1452 typedef struct
1454 unsigned TX9D : 1;
1455 unsigned TRMT : 1;
1456 unsigned BRGH : 1;
1457 unsigned SENDB : 1;
1458 unsigned SYNC : 1;
1459 unsigned TXEN : 1;
1460 unsigned TX9 : 1;
1461 unsigned CSRC : 1;
1462 } __TXSTAbits_t;
1464 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
1466 #define _TX9D 0x01
1467 #define _TRMT 0x02
1468 #define _BRGH 0x04
1469 #define _SENDB 0x08
1470 #define _SYNC 0x10
1471 #define _TXEN 0x20
1472 #define _TX9 0x40
1473 #define _CSRC 0x80
1475 //==============================================================================
1478 //==============================================================================
1479 // BAUDCON Bits
1481 extern __at(0x019F) __sfr BAUDCON;
1483 typedef struct
1485 unsigned ABDEN : 1;
1486 unsigned WUE : 1;
1487 unsigned : 1;
1488 unsigned BRG16 : 1;
1489 unsigned SCKP : 1;
1490 unsigned : 1;
1491 unsigned RCIDL : 1;
1492 unsigned ABDOVF : 1;
1493 } __BAUDCONbits_t;
1495 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
1497 #define _ABDEN 0x01
1498 #define _WUE 0x02
1499 #define _BRG16 0x08
1500 #define _SCKP 0x10
1501 #define _RCIDL 0x40
1502 #define _ABDOVF 0x80
1504 //==============================================================================
1507 //==============================================================================
1508 // WPUB Bits
1510 extern __at(0x020D) __sfr WPUB;
1512 typedef struct
1514 unsigned WPUB0 : 1;
1515 unsigned WPUB1 : 1;
1516 unsigned WPUB2 : 1;
1517 unsigned WPUB3 : 1;
1518 unsigned WPUB4 : 1;
1519 unsigned WPUB5 : 1;
1520 unsigned WPUB6 : 1;
1521 unsigned WPUB7 : 1;
1522 } __WPUBbits_t;
1524 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
1526 #define _WPUB0 0x01
1527 #define _WPUB1 0x02
1528 #define _WPUB2 0x04
1529 #define _WPUB3 0x08
1530 #define _WPUB4 0x10
1531 #define _WPUB5 0x20
1532 #define _WPUB6 0x40
1533 #define _WPUB7 0x80
1535 //==============================================================================
1538 //==============================================================================
1539 // WPUE Bits
1541 extern __at(0x0210) __sfr WPUE;
1543 typedef struct
1545 unsigned : 1;
1546 unsigned : 1;
1547 unsigned : 1;
1548 unsigned WPUE3 : 1;
1549 unsigned : 1;
1550 unsigned : 1;
1551 unsigned : 1;
1552 unsigned : 1;
1553 } __WPUEbits_t;
1555 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
1557 #define _WPUE3 0x08
1559 //==============================================================================
1561 extern __at(0x0211) __sfr SSP1BUF;
1562 extern __at(0x0211) __sfr SSPBUF;
1563 extern __at(0x0212) __sfr SSP1ADD;
1564 extern __at(0x0212) __sfr SSPADD;
1565 extern __at(0x0213) __sfr SSP1MSK;
1566 extern __at(0x0213) __sfr SSPMSK;
1568 //==============================================================================
1569 // SSP1STAT Bits
1571 extern __at(0x0214) __sfr SSP1STAT;
1573 typedef struct
1575 unsigned BF : 1;
1576 unsigned UA : 1;
1577 unsigned R_NOT_W : 1;
1578 unsigned S : 1;
1579 unsigned P : 1;
1580 unsigned D_NOT_A : 1;
1581 unsigned CKE : 1;
1582 unsigned SMP : 1;
1583 } __SSP1STATbits_t;
1585 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
1587 #define _BF 0x01
1588 #define _UA 0x02
1589 #define _R_NOT_W 0x04
1590 #define _S 0x08
1591 #define _P 0x10
1592 #define _D_NOT_A 0x20
1593 #define _CKE 0x40
1594 #define _SMP 0x80
1596 //==============================================================================
1599 //==============================================================================
1600 // SSPSTAT Bits
1602 extern __at(0x0214) __sfr SSPSTAT;
1604 typedef struct
1606 unsigned BF : 1;
1607 unsigned UA : 1;
1608 unsigned R_NOT_W : 1;
1609 unsigned S : 1;
1610 unsigned P : 1;
1611 unsigned D_NOT_A : 1;
1612 unsigned CKE : 1;
1613 unsigned SMP : 1;
1614 } __SSPSTATbits_t;
1616 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
1618 #define _SSPSTAT_BF 0x01
1619 #define _SSPSTAT_UA 0x02
1620 #define _SSPSTAT_R_NOT_W 0x04
1621 #define _SSPSTAT_S 0x08
1622 #define _SSPSTAT_P 0x10
1623 #define _SSPSTAT_D_NOT_A 0x20
1624 #define _SSPSTAT_CKE 0x40
1625 #define _SSPSTAT_SMP 0x80
1627 //==============================================================================
1630 //==============================================================================
1631 // SSP1CON1 Bits
1633 extern __at(0x0215) __sfr SSP1CON1;
1635 typedef union
1637 struct
1639 unsigned SSPM0 : 1;
1640 unsigned SSPM1 : 1;
1641 unsigned SSPM2 : 1;
1642 unsigned SSPM3 : 1;
1643 unsigned CKP : 1;
1644 unsigned SSPEN : 1;
1645 unsigned SSPOV : 1;
1646 unsigned WCOL : 1;
1649 struct
1651 unsigned SSPM : 4;
1652 unsigned : 4;
1654 } __SSP1CON1bits_t;
1656 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
1658 #define _SSPM0 0x01
1659 #define _SSPM1 0x02
1660 #define _SSPM2 0x04
1661 #define _SSPM3 0x08
1662 #define _CKP 0x10
1663 #define _SSPEN 0x20
1664 #define _SSPOV 0x40
1665 #define _WCOL 0x80
1667 //==============================================================================
1670 //==============================================================================
1671 // SSPCON Bits
1673 extern __at(0x0215) __sfr SSPCON;
1675 typedef union
1677 struct
1679 unsigned SSPM0 : 1;
1680 unsigned SSPM1 : 1;
1681 unsigned SSPM2 : 1;
1682 unsigned SSPM3 : 1;
1683 unsigned CKP : 1;
1684 unsigned SSPEN : 1;
1685 unsigned SSPOV : 1;
1686 unsigned WCOL : 1;
1689 struct
1691 unsigned SSPM : 4;
1692 unsigned : 4;
1694 } __SSPCONbits_t;
1696 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
1698 #define _SSPCON_SSPM0 0x01
1699 #define _SSPCON_SSPM1 0x02
1700 #define _SSPCON_SSPM2 0x04
1701 #define _SSPCON_SSPM3 0x08
1702 #define _SSPCON_CKP 0x10
1703 #define _SSPCON_SSPEN 0x20
1704 #define _SSPCON_SSPOV 0x40
1705 #define _SSPCON_WCOL 0x80
1707 //==============================================================================
1710 //==============================================================================
1711 // SSPCON1 Bits
1713 extern __at(0x0215) __sfr SSPCON1;
1715 typedef union
1717 struct
1719 unsigned SSPM0 : 1;
1720 unsigned SSPM1 : 1;
1721 unsigned SSPM2 : 1;
1722 unsigned SSPM3 : 1;
1723 unsigned CKP : 1;
1724 unsigned SSPEN : 1;
1725 unsigned SSPOV : 1;
1726 unsigned WCOL : 1;
1729 struct
1731 unsigned SSPM : 4;
1732 unsigned : 4;
1734 } __SSPCON1bits_t;
1736 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
1738 #define _SSPCON1_SSPM0 0x01
1739 #define _SSPCON1_SSPM1 0x02
1740 #define _SSPCON1_SSPM2 0x04
1741 #define _SSPCON1_SSPM3 0x08
1742 #define _SSPCON1_CKP 0x10
1743 #define _SSPCON1_SSPEN 0x20
1744 #define _SSPCON1_SSPOV 0x40
1745 #define _SSPCON1_WCOL 0x80
1747 //==============================================================================
1750 //==============================================================================
1751 // SSP1CON2 Bits
1753 extern __at(0x0216) __sfr SSP1CON2;
1755 typedef struct
1757 unsigned SEN : 1;
1758 unsigned RSEN : 1;
1759 unsigned PEN : 1;
1760 unsigned RCEN : 1;
1761 unsigned ACKEN : 1;
1762 unsigned ACKDT : 1;
1763 unsigned ACKSTAT : 1;
1764 unsigned GCEN : 1;
1765 } __SSP1CON2bits_t;
1767 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
1769 #define _SEN 0x01
1770 #define _RSEN 0x02
1771 #define _PEN 0x04
1772 #define _RCEN 0x08
1773 #define _ACKEN 0x10
1774 #define _ACKDT 0x20
1775 #define _ACKSTAT 0x40
1776 #define _GCEN 0x80
1778 //==============================================================================
1781 //==============================================================================
1782 // SSPCON2 Bits
1784 extern __at(0x0216) __sfr SSPCON2;
1786 typedef struct
1788 unsigned SEN : 1;
1789 unsigned RSEN : 1;
1790 unsigned PEN : 1;
1791 unsigned RCEN : 1;
1792 unsigned ACKEN : 1;
1793 unsigned ACKDT : 1;
1794 unsigned ACKSTAT : 1;
1795 unsigned GCEN : 1;
1796 } __SSPCON2bits_t;
1798 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
1800 #define _SSPCON2_SEN 0x01
1801 #define _SSPCON2_RSEN 0x02
1802 #define _SSPCON2_PEN 0x04
1803 #define _SSPCON2_RCEN 0x08
1804 #define _SSPCON2_ACKEN 0x10
1805 #define _SSPCON2_ACKDT 0x20
1806 #define _SSPCON2_ACKSTAT 0x40
1807 #define _SSPCON2_GCEN 0x80
1809 //==============================================================================
1812 //==============================================================================
1813 // SSP1CON3 Bits
1815 extern __at(0x0217) __sfr SSP1CON3;
1817 typedef struct
1819 unsigned DHEN : 1;
1820 unsigned AHEN : 1;
1821 unsigned SBCDE : 1;
1822 unsigned SDAHT : 1;
1823 unsigned BOEN : 1;
1824 unsigned SCIE : 1;
1825 unsigned PCIE : 1;
1826 unsigned ACKTIM : 1;
1827 } __SSP1CON3bits_t;
1829 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
1831 #define _DHEN 0x01
1832 #define _AHEN 0x02
1833 #define _SBCDE 0x04
1834 #define _SDAHT 0x08
1835 #define _BOEN 0x10
1836 #define _SCIE 0x20
1837 #define _PCIE 0x40
1838 #define _ACKTIM 0x80
1840 //==============================================================================
1843 //==============================================================================
1844 // SSPCON3 Bits
1846 extern __at(0x0217) __sfr SSPCON3;
1848 typedef struct
1850 unsigned DHEN : 1;
1851 unsigned AHEN : 1;
1852 unsigned SBCDE : 1;
1853 unsigned SDAHT : 1;
1854 unsigned BOEN : 1;
1855 unsigned SCIE : 1;
1856 unsigned PCIE : 1;
1857 unsigned ACKTIM : 1;
1858 } __SSPCON3bits_t;
1860 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
1862 #define _SSPCON3_DHEN 0x01
1863 #define _SSPCON3_AHEN 0x02
1864 #define _SSPCON3_SBCDE 0x04
1865 #define _SSPCON3_SDAHT 0x08
1866 #define _SSPCON3_BOEN 0x10
1867 #define _SSPCON3_SCIE 0x20
1868 #define _SSPCON3_PCIE 0x40
1869 #define _SSPCON3_ACKTIM 0x80
1871 //==============================================================================
1873 extern __at(0x0291) __sfr CCPR1;
1874 extern __at(0x0291) __sfr CCPR1L;
1875 extern __at(0x0292) __sfr CCPR1H;
1877 //==============================================================================
1878 // CCP1CON Bits
1880 extern __at(0x0293) __sfr CCP1CON;
1882 typedef union
1884 struct
1886 unsigned CCP1M0 : 1;
1887 unsigned CCP1M1 : 1;
1888 unsigned CCP1M2 : 1;
1889 unsigned CCP1M3 : 1;
1890 unsigned DC1B0 : 1;
1891 unsigned DC1B1 : 1;
1892 unsigned : 1;
1893 unsigned : 1;
1896 struct
1898 unsigned CCP1M : 4;
1899 unsigned : 4;
1902 struct
1904 unsigned : 4;
1905 unsigned DC1B : 2;
1906 unsigned : 2;
1908 } __CCP1CONbits_t;
1910 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
1912 #define _CCP1M0 0x01
1913 #define _CCP1M1 0x02
1914 #define _CCP1M2 0x04
1915 #define _CCP1M3 0x08
1916 #define _DC1B0 0x10
1917 #define _DC1B1 0x20
1919 //==============================================================================
1921 extern __at(0x0298) __sfr CCPR2;
1922 extern __at(0x0298) __sfr CCPR2L;
1923 extern __at(0x0299) __sfr CCPR2H;
1925 //==============================================================================
1926 // CCP2CON Bits
1928 extern __at(0x029A) __sfr CCP2CON;
1930 typedef union
1932 struct
1934 unsigned CCP2M0 : 1;
1935 unsigned CCP2M1 : 1;
1936 unsigned CCP2M2 : 1;
1937 unsigned CCP2M3 : 1;
1938 unsigned DC2B0 : 1;
1939 unsigned DC2B1 : 1;
1940 unsigned : 1;
1941 unsigned : 1;
1944 struct
1946 unsigned CCP2M : 4;
1947 unsigned : 4;
1950 struct
1952 unsigned : 4;
1953 unsigned DC2B : 2;
1954 unsigned : 2;
1956 } __CCP2CONbits_t;
1958 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
1960 #define _CCP2M0 0x01
1961 #define _CCP2M1 0x02
1962 #define _CCP2M2 0x04
1963 #define _CCP2M3 0x08
1964 #define _DC2B0 0x10
1965 #define _DC2B1 0x20
1967 //==============================================================================
1970 //==============================================================================
1971 // IOCBP Bits
1973 extern __at(0x0394) __sfr IOCBP;
1975 typedef struct
1977 unsigned IOCBP0 : 1;
1978 unsigned IOCBP1 : 1;
1979 unsigned IOCBP2 : 1;
1980 unsigned IOCBP3 : 1;
1981 unsigned IOCBP4 : 1;
1982 unsigned IOCBP5 : 1;
1983 unsigned IOCBP6 : 1;
1984 unsigned IOCBP7 : 1;
1985 } __IOCBPbits_t;
1987 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
1989 #define _IOCBP0 0x01
1990 #define _IOCBP1 0x02
1991 #define _IOCBP2 0x04
1992 #define _IOCBP3 0x08
1993 #define _IOCBP4 0x10
1994 #define _IOCBP5 0x20
1995 #define _IOCBP6 0x40
1996 #define _IOCBP7 0x80
1998 //==============================================================================
2001 //==============================================================================
2002 // IOCBN Bits
2004 extern __at(0x0395) __sfr IOCBN;
2006 typedef struct
2008 unsigned IOCBN0 : 1;
2009 unsigned IOCBN1 : 1;
2010 unsigned IOCBN2 : 1;
2011 unsigned IOCBN3 : 1;
2012 unsigned IOCBN4 : 1;
2013 unsigned IOCBN5 : 1;
2014 unsigned IOCBN6 : 1;
2015 unsigned IOCBN7 : 1;
2016 } __IOCBNbits_t;
2018 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
2020 #define _IOCBN0 0x01
2021 #define _IOCBN1 0x02
2022 #define _IOCBN2 0x04
2023 #define _IOCBN3 0x08
2024 #define _IOCBN4 0x10
2025 #define _IOCBN5 0x20
2026 #define _IOCBN6 0x40
2027 #define _IOCBN7 0x80
2029 //==============================================================================
2032 //==============================================================================
2033 // IOCBF Bits
2035 extern __at(0x0396) __sfr IOCBF;
2037 typedef struct
2039 unsigned IOCBF0 : 1;
2040 unsigned IOCBF1 : 1;
2041 unsigned IOCBF2 : 1;
2042 unsigned IOCBF3 : 1;
2043 unsigned IOCBF4 : 1;
2044 unsigned IOCBF5 : 1;
2045 unsigned IOCBF6 : 1;
2046 unsigned IOCBF7 : 1;
2047 } __IOCBFbits_t;
2049 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
2051 #define _IOCBF0 0x01
2052 #define _IOCBF1 0x02
2053 #define _IOCBF2 0x04
2054 #define _IOCBF3 0x08
2055 #define _IOCBF4 0x10
2056 #define _IOCBF5 0x20
2057 #define _IOCBF6 0x40
2058 #define _IOCBF7 0x80
2060 //==============================================================================
2063 //==============================================================================
2064 // AADCON0 Bits
2066 extern __at(0x0711) __sfr AADCON0;
2068 typedef union
2070 struct
2072 unsigned ADON : 1;
2073 unsigned GO_NOT_DONE : 1;
2074 unsigned CHS0 : 1;
2075 unsigned CHS1 : 1;
2076 unsigned CHS2 : 1;
2077 unsigned CHS3 : 1;
2078 unsigned CHS4 : 1;
2079 unsigned : 1;
2082 struct
2084 unsigned : 2;
2085 unsigned CHS : 5;
2086 unsigned : 1;
2088 } __AADCON0bits_t;
2090 extern __at(0x0711) volatile __AADCON0bits_t AADCON0bits;
2092 #define _ADON 0x01
2093 #define _GO_NOT_DONE 0x02
2094 #define _CHS0 0x04
2095 #define _CHS1 0x08
2096 #define _CHS2 0x10
2097 #define _CHS3 0x20
2098 #define _CHS4 0x40
2100 //==============================================================================
2103 //==============================================================================
2104 // AADCON1 Bits
2106 extern __at(0x0712) __sfr AADCON1;
2108 typedef union
2110 struct
2112 unsigned ADPREF0 : 1;
2113 unsigned ADPREF1 : 1;
2114 unsigned : 1;
2115 unsigned : 1;
2116 unsigned ADCS0 : 1;
2117 unsigned ADCS1 : 1;
2118 unsigned ADCS2 : 1;
2119 unsigned ADFM : 1;
2122 struct
2124 unsigned ADPREF : 2;
2125 unsigned : 6;
2128 struct
2130 unsigned : 4;
2131 unsigned ADCS : 3;
2132 unsigned : 1;
2134 } __AADCON1bits_t;
2136 extern __at(0x0712) volatile __AADCON1bits_t AADCON1bits;
2138 #define _ADPREF0 0x01
2139 #define _ADPREF1 0x02
2140 #define _ADCS0 0x10
2141 #define _ADCS1 0x20
2142 #define _ADCS2 0x40
2143 #define _ADFM 0x80
2145 //==============================================================================
2148 //==============================================================================
2149 // AADCON2 Bits
2151 extern __at(0x0713) __sfr AADCON2;
2153 typedef union
2155 struct
2157 unsigned : 1;
2158 unsigned : 1;
2159 unsigned : 1;
2160 unsigned : 1;
2161 unsigned TRIGSEL0 : 1;
2162 unsigned TRIGSEL1 : 1;
2163 unsigned TRIGSEL2 : 1;
2164 unsigned : 1;
2167 struct
2169 unsigned : 4;
2170 unsigned TRIGSEL : 3;
2171 unsigned : 1;
2173 } __AADCON2bits_t;
2175 extern __at(0x0713) volatile __AADCON2bits_t AADCON2bits;
2177 #define _TRIGSEL0 0x10
2178 #define _TRIGSEL1 0x20
2179 #define _TRIGSEL2 0x40
2181 //==============================================================================
2184 //==============================================================================
2185 // AADCON3 Bits
2187 extern __at(0x0714) __sfr AADCON3;
2189 typedef struct
2191 unsigned ADDSEN : 1;
2192 unsigned ADIPEN : 1;
2193 unsigned : 1;
2194 unsigned ADOOEN : 1;
2195 unsigned ADOEN : 1;
2196 unsigned ADOLEN : 1;
2197 unsigned ADIPPOL : 1;
2198 unsigned ADEPPOL : 1;
2199 } __AADCON3bits_t;
2201 extern __at(0x0714) volatile __AADCON3bits_t AADCON3bits;
2203 #define _ADDSEN 0x01
2204 #define _ADIPEN 0x02
2205 #define _ADOOEN 0x08
2206 #define _ADOEN 0x10
2207 #define _ADOLEN 0x20
2208 #define _ADIPPOL 0x40
2209 #define _ADEPPOL 0x80
2211 //==============================================================================
2214 //==============================================================================
2215 // AADSTAT Bits
2217 extern __at(0x0715) __sfr AADSTAT;
2219 typedef union
2221 struct
2223 unsigned ADSTG0 : 1;
2224 unsigned ADSTG1 : 1;
2225 unsigned ADCONV : 1;
2226 unsigned : 1;
2227 unsigned : 1;
2228 unsigned : 1;
2229 unsigned : 1;
2230 unsigned : 1;
2233 struct
2235 unsigned ADSTG : 2;
2236 unsigned : 6;
2238 } __AADSTATbits_t;
2240 extern __at(0x0715) volatile __AADSTATbits_t AADSTATbits;
2242 #define _ADSTG0 0x01
2243 #define _ADSTG1 0x02
2244 #define _ADCONV 0x04
2246 //==============================================================================
2249 //==============================================================================
2250 // AADPRE Bits
2252 extern __at(0x0716) __sfr AADPRE;
2254 typedef union
2256 struct
2258 unsigned ADPRE0 : 1;
2259 unsigned ADPRE1 : 1;
2260 unsigned ADPRE2 : 1;
2261 unsigned ADPRE3 : 1;
2262 unsigned ADPRE4 : 1;
2263 unsigned ADPRE5 : 1;
2264 unsigned ADPRE6 : 1;
2265 unsigned : 1;
2268 struct
2270 unsigned ADPRE : 7;
2271 unsigned : 1;
2273 } __AADPREbits_t;
2275 extern __at(0x0716) volatile __AADPREbits_t AADPREbits;
2277 #define _ADPRE0 0x01
2278 #define _ADPRE1 0x02
2279 #define _ADPRE2 0x04
2280 #define _ADPRE3 0x08
2281 #define _ADPRE4 0x10
2282 #define _ADPRE5 0x20
2283 #define _ADPRE6 0x40
2285 //==============================================================================
2288 //==============================================================================
2289 // AADACQ Bits
2291 extern __at(0x0717) __sfr AADACQ;
2293 typedef union
2295 struct
2297 unsigned ADACQ0 : 1;
2298 unsigned ADACQ1 : 1;
2299 unsigned ADACQ2 : 1;
2300 unsigned ADACQ3 : 1;
2301 unsigned ADACQ4 : 1;
2302 unsigned ADACQ5 : 1;
2303 unsigned ADACQ6 : 1;
2304 unsigned : 1;
2307 struct
2309 unsigned ADACQ : 7;
2310 unsigned : 1;
2312 } __AADACQbits_t;
2314 extern __at(0x0717) volatile __AADACQbits_t AADACQbits;
2316 #define _ADACQ0 0x01
2317 #define _ADACQ1 0x02
2318 #define _ADACQ2 0x04
2319 #define _ADACQ3 0x08
2320 #define _ADACQ4 0x10
2321 #define _ADACQ5 0x20
2322 #define _ADACQ6 0x40
2324 //==============================================================================
2327 //==============================================================================
2328 // AADGRD Bits
2330 extern __at(0x0718) __sfr AADGRD;
2332 typedef struct
2334 unsigned : 1;
2335 unsigned : 1;
2336 unsigned : 1;
2337 unsigned : 1;
2338 unsigned : 1;
2339 unsigned GRDPOL : 1;
2340 unsigned GRDAOE : 1;
2341 unsigned GRDBOE : 1;
2342 } __AADGRDbits_t;
2344 extern __at(0x0718) volatile __AADGRDbits_t AADGRDbits;
2346 #define _GRDPOL 0x20
2347 #define _GRDAOE 0x40
2348 #define _GRDBOE 0x80
2350 //==============================================================================
2353 //==============================================================================
2354 // AADCAP Bits
2356 extern __at(0x0719) __sfr AADCAP;
2358 typedef union
2360 struct
2362 unsigned ADDCAP0 : 1;
2363 unsigned ADDCAP1 : 1;
2364 unsigned ADDCAP2 : 1;
2365 unsigned : 1;
2366 unsigned : 1;
2367 unsigned : 1;
2368 unsigned : 1;
2369 unsigned : 1;
2372 struct
2374 unsigned ADDCAP : 3;
2375 unsigned : 5;
2377 } __AADCAPbits_t;
2379 extern __at(0x0719) volatile __AADCAPbits_t AADCAPbits;
2381 #define _ADDCAP0 0x01
2382 #define _ADDCAP1 0x02
2383 #define _ADDCAP2 0x04
2385 //==============================================================================
2387 extern __at(0x071A) __sfr AADRES0;
2388 extern __at(0x071A) __sfr AADRES0L;
2389 extern __at(0x071A) __sfr AD1RES0;
2390 extern __at(0x071B) __sfr AADRES0H;
2391 extern __at(0x071C) __sfr AADRES1;
2392 extern __at(0x071C) __sfr AADRES1L;
2393 extern __at(0x071C) __sfr AD1RES1;
2394 extern __at(0x071D) __sfr AADRES1H;
2396 //==============================================================================
2397 // STATUS_SHAD Bits
2399 extern __at(0x0FE4) __sfr STATUS_SHAD;
2401 typedef struct
2403 unsigned C_SHAD : 1;
2404 unsigned DC_SHAD : 1;
2405 unsigned Z_SHAD : 1;
2406 unsigned : 1;
2407 unsigned : 1;
2408 unsigned : 1;
2409 unsigned : 1;
2410 unsigned : 1;
2411 } __STATUS_SHADbits_t;
2413 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
2415 #define _C_SHAD 0x01
2416 #define _DC_SHAD 0x02
2417 #define _Z_SHAD 0x04
2419 //==============================================================================
2421 extern __at(0x0FE5) __sfr WREG_SHAD;
2422 extern __at(0x0FE6) __sfr BSR_SHAD;
2423 extern __at(0x0FE7) __sfr PCLATH_SHAD;
2424 extern __at(0x0FE8) __sfr FSR0L_SHAD;
2425 extern __at(0x0FE9) __sfr FSR0H_SHAD;
2426 extern __at(0x0FEA) __sfr FSR1L_SHAD;
2427 extern __at(0x0FEB) __sfr FSR1H_SHAD;
2428 extern __at(0x0FED) __sfr STKPTR;
2429 extern __at(0x0FEE) __sfr TOSL;
2430 extern __at(0x0FEF) __sfr TOSH;
2432 //==============================================================================
2434 // Configuration Bits
2436 //==============================================================================
2438 #define _CONFIG1 0x8007
2439 #define _CONFIG2 0x8008
2441 //----------------------------- CONFIG1 Options -------------------------------
2443 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
2444 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
2445 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
2446 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
2447 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
2448 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
2449 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
2450 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pin.
2451 #define _WDTE_OFF 0x3FE7 // WDT disabled.
2452 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
2453 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
2454 #define _WDTE_ON 0x3FFF // WDT enabled.
2455 #define _PWRTE_ON 0x3FDF // PWRT enabled.
2456 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
2457 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
2458 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
2459 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
2460 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
2461 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
2462 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
2463 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
2464 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
2465 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
2466 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
2467 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
2468 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
2469 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
2470 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
2472 //----------------------------- CONFIG2 Options -------------------------------
2474 #define _WRT_ALL 0x3FFC // 000h to 1FFFh write protected, no addresses may be modified by EECON control.
2475 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 1000h to 1FFFh may be modified by EECON control.
2476 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 1FFFh may be modified by EECON control.
2477 #define _WRT_OFF 0x3FFF // Write protection off.
2478 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
2479 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
2480 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
2481 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
2482 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
2483 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
2484 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
2485 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
2486 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
2487 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
2489 //==============================================================================
2491 #define _DEVID1 0x8006
2493 #define _IDLOC0 0x8000
2494 #define _IDLOC1 0x8001
2495 #define _IDLOC2 0x8002
2496 #define _IDLOC3 0x8003
2498 //==============================================================================
2500 #ifndef NO_BIT_DEFINES
2502 #define ADACQ0 AADACQbits.ADACQ0 // bit 0
2503 #define ADACQ1 AADACQbits.ADACQ1 // bit 1
2504 #define ADACQ2 AADACQbits.ADACQ2 // bit 2
2505 #define ADACQ3 AADACQbits.ADACQ3 // bit 3
2506 #define ADACQ4 AADACQbits.ADACQ4 // bit 4
2507 #define ADACQ5 AADACQbits.ADACQ5 // bit 5
2508 #define ADACQ6 AADACQbits.ADACQ6 // bit 6
2510 #define ADDCAP0 AADCAPbits.ADDCAP0 // bit 0
2511 #define ADDCAP1 AADCAPbits.ADDCAP1 // bit 1
2512 #define ADDCAP2 AADCAPbits.ADDCAP2 // bit 2
2514 #define ADON AADCON0bits.ADON // bit 0
2515 #define GO_NOT_DONE AADCON0bits.GO_NOT_DONE // bit 1
2516 #define CHS0 AADCON0bits.CHS0 // bit 2
2517 #define CHS1 AADCON0bits.CHS1 // bit 3
2518 #define CHS2 AADCON0bits.CHS2 // bit 4
2519 #define CHS3 AADCON0bits.CHS3 // bit 5
2520 #define CHS4 AADCON0bits.CHS4 // bit 6
2522 #define ADPREF0 AADCON1bits.ADPREF0 // bit 0
2523 #define ADPREF1 AADCON1bits.ADPREF1 // bit 1
2524 #define ADCS0 AADCON1bits.ADCS0 // bit 4
2525 #define ADCS1 AADCON1bits.ADCS1 // bit 5
2526 #define ADCS2 AADCON1bits.ADCS2 // bit 6
2527 #define ADFM AADCON1bits.ADFM // bit 7
2529 #define TRIGSEL0 AADCON2bits.TRIGSEL0 // bit 4
2530 #define TRIGSEL1 AADCON2bits.TRIGSEL1 // bit 5
2531 #define TRIGSEL2 AADCON2bits.TRIGSEL2 // bit 6
2533 #define ADDSEN AADCON3bits.ADDSEN // bit 0
2534 #define ADIPEN AADCON3bits.ADIPEN // bit 1
2535 #define ADOOEN AADCON3bits.ADOOEN // bit 3
2536 #define ADOEN AADCON3bits.ADOEN // bit 4
2537 #define ADOLEN AADCON3bits.ADOLEN // bit 5
2538 #define ADIPPOL AADCON3bits.ADIPPOL // bit 6
2539 #define ADEPPOL AADCON3bits.ADEPPOL // bit 7
2541 #define GRDPOL AADGRDbits.GRDPOL // bit 5
2542 #define GRDAOE AADGRDbits.GRDAOE // bit 6
2543 #define GRDBOE AADGRDbits.GRDBOE // bit 7
2545 #define ADPRE0 AADPREbits.ADPRE0 // bit 0
2546 #define ADPRE1 AADPREbits.ADPRE1 // bit 1
2547 #define ADPRE2 AADPREbits.ADPRE2 // bit 2
2548 #define ADPRE3 AADPREbits.ADPRE3 // bit 3
2549 #define ADPRE4 AADPREbits.ADPRE4 // bit 4
2550 #define ADPRE5 AADPREbits.ADPRE5 // bit 5
2551 #define ADPRE6 AADPREbits.ADPRE6 // bit 6
2553 #define ADSTG0 AADSTATbits.ADSTG0 // bit 0
2554 #define ADSTG1 AADSTATbits.ADSTG1 // bit 1
2555 #define ADCONV AADSTATbits.ADCONV // bit 2
2557 #define ANSA0 ANSELAbits.ANSA0 // bit 0
2558 #define ANSA1 ANSELAbits.ANSA1 // bit 1
2559 #define ANSA2 ANSELAbits.ANSA2 // bit 2
2560 #define ANSA3 ANSELAbits.ANSA3 // bit 3
2561 #define ANSA5 ANSELAbits.ANSA5 // bit 5
2563 #define ANSB0 ANSELBbits.ANSB0 // bit 0
2564 #define ANSB1 ANSELBbits.ANSB1 // bit 1
2565 #define ANSB2 ANSELBbits.ANSB2 // bit 2
2566 #define ANSB3 ANSELBbits.ANSB3 // bit 3
2567 #define ANSB4 ANSELBbits.ANSB4 // bit 4
2568 #define ANSB5 ANSELBbits.ANSB5 // bit 5
2570 #define ANSC2 ANSELCbits.ANSC2 // bit 2
2571 #define ANSC3 ANSELCbits.ANSC3 // bit 3
2572 #define ANSC4 ANSELCbits.ANSC4 // bit 4
2573 #define ANSC5 ANSELCbits.ANSC5 // bit 5
2574 #define ANSC6 ANSELCbits.ANSC6 // bit 6
2575 #define ANSC7 ANSELCbits.ANSC7 // bit 7
2577 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
2578 #define SSSEL APFCONbits.SSSEL // bit 1
2580 #define ABDEN BAUDCONbits.ABDEN // bit 0
2581 #define WUE BAUDCONbits.WUE // bit 1
2582 #define BRG16 BAUDCONbits.BRG16 // bit 3
2583 #define SCKP BAUDCONbits.SCKP // bit 4
2584 #define RCIDL BAUDCONbits.RCIDL // bit 6
2585 #define ABDOVF BAUDCONbits.ABDOVF // bit 7
2587 #define BORRDY BORCONbits.BORRDY // bit 0
2588 #define BORFS BORCONbits.BORFS // bit 6
2589 #define SBOREN BORCONbits.SBOREN // bit 7
2591 #define BSR0 BSRbits.BSR0 // bit 0
2592 #define BSR1 BSRbits.BSR1 // bit 1
2593 #define BSR2 BSRbits.BSR2 // bit 2
2594 #define BSR3 BSRbits.BSR3 // bit 3
2595 #define BSR4 BSRbits.BSR4 // bit 4
2597 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
2598 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
2599 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
2600 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
2601 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
2602 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
2604 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
2605 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
2606 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
2607 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
2608 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
2609 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
2611 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
2612 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
2613 #define TSRNG FVRCONbits.TSRNG // bit 4
2614 #define TSEN FVRCONbits.TSEN // bit 5
2615 #define FVRRDY FVRCONbits.FVRRDY // bit 6
2616 #define FVREN FVRCONbits.FVREN // bit 7
2618 #define IOCIF INTCONbits.IOCIF // bit 0
2619 #define INTF INTCONbits.INTF // bit 1
2620 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
2621 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
2622 #define IOCIE INTCONbits.IOCIE // bit 3
2623 #define INTE INTCONbits.INTE // bit 4
2624 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
2625 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
2626 #define PEIE INTCONbits.PEIE // bit 6
2627 #define GIE INTCONbits.GIE // bit 7
2629 #define IOCBF0 IOCBFbits.IOCBF0 // bit 0
2630 #define IOCBF1 IOCBFbits.IOCBF1 // bit 1
2631 #define IOCBF2 IOCBFbits.IOCBF2 // bit 2
2632 #define IOCBF3 IOCBFbits.IOCBF3 // bit 3
2633 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
2634 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
2635 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
2636 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
2638 #define IOCBN0 IOCBNbits.IOCBN0 // bit 0
2639 #define IOCBN1 IOCBNbits.IOCBN1 // bit 1
2640 #define IOCBN2 IOCBNbits.IOCBN2 // bit 2
2641 #define IOCBN3 IOCBNbits.IOCBN3 // bit 3
2642 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
2643 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
2644 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
2645 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
2647 #define IOCBP0 IOCBPbits.IOCBP0 // bit 0
2648 #define IOCBP1 IOCBPbits.IOCBP1 // bit 1
2649 #define IOCBP2 IOCBPbits.IOCBP2 // bit 2
2650 #define IOCBP3 IOCBPbits.IOCBP3 // bit 3
2651 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
2652 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
2653 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
2654 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
2656 #define LATA0 LATAbits.LATA0 // bit 0
2657 #define LATA1 LATAbits.LATA1 // bit 1
2658 #define LATA2 LATAbits.LATA2 // bit 2
2659 #define LATA3 LATAbits.LATA3 // bit 3
2660 #define LATA4 LATAbits.LATA4 // bit 4
2661 #define LATA5 LATAbits.LATA5 // bit 5
2662 #define LATA6 LATAbits.LATA6 // bit 6
2663 #define LATA7 LATAbits.LATA7 // bit 7
2665 #define LATB0 LATBbits.LATB0 // bit 0
2666 #define LATB1 LATBbits.LATB1 // bit 1
2667 #define LATB2 LATBbits.LATB2 // bit 2
2668 #define LATB3 LATBbits.LATB3 // bit 3
2669 #define LATB4 LATBbits.LATB4 // bit 4
2670 #define LATB5 LATBbits.LATB5 // bit 5
2671 #define LATB6 LATBbits.LATB6 // bit 6
2672 #define LATB7 LATBbits.LATB7 // bit 7
2674 #define LATC0 LATCbits.LATC0 // bit 0
2675 #define LATC1 LATCbits.LATC1 // bit 1
2676 #define LATC2 LATCbits.LATC2 // bit 2
2677 #define LATC3 LATCbits.LATC3 // bit 3
2678 #define LATC4 LATCbits.LATC4 // bit 4
2679 #define LATC5 LATCbits.LATC5 // bit 5
2680 #define LATC6 LATCbits.LATC6 // bit 6
2681 #define LATC7 LATCbits.LATC7 // bit 7
2683 #define PS0 OPTION_REGbits.PS0 // bit 0
2684 #define PS1 OPTION_REGbits.PS1 // bit 1
2685 #define PS2 OPTION_REGbits.PS2 // bit 2
2686 #define PSA OPTION_REGbits.PSA // bit 3
2687 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
2688 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
2689 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
2690 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
2691 #define INTEDG OPTION_REGbits.INTEDG // bit 6
2692 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
2694 #define SCS0 OSCCONbits.SCS0 // bit 0
2695 #define SCS1 OSCCONbits.SCS1 // bit 1
2696 #define IRCF0 OSCCONbits.IRCF0 // bit 3
2697 #define IRCF1 OSCCONbits.IRCF1 // bit 4
2698 #define IRCF2 OSCCONbits.IRCF2 // bit 5
2699 #define IRCF3 OSCCONbits.IRCF3 // bit 6
2701 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
2702 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
2703 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
2704 #define OSTS OSCSTATbits.OSTS // bit 5
2705 #define SOSCR OSCSTATbits.SOSCR // bit 7, shadows bit in OSCSTATbits
2706 #define T1OSCR OSCSTATbits.T1OSCR // bit 7, shadows bit in OSCSTATbits
2708 #define NOT_BOR PCONbits.NOT_BOR // bit 0
2709 #define NOT_POR PCONbits.NOT_POR // bit 1
2710 #define NOT_RI PCONbits.NOT_RI // bit 2
2711 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
2712 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
2713 #define STKUNF PCONbits.STKUNF // bit 6
2714 #define STKOVF PCONbits.STKOVF // bit 7
2716 #define TMR1IE PIE1bits.TMR1IE // bit 0
2717 #define TMR2IE PIE1bits.TMR2IE // bit 1
2718 #define CCP1IE PIE1bits.CCP1IE // bit 2
2719 #define SSPIE PIE1bits.SSPIE // bit 3
2720 #define TXIE PIE1bits.TXIE // bit 4
2721 #define RCIE PIE1bits.RCIE // bit 5
2722 #define ADIE PIE1bits.ADIE // bit 6
2723 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
2725 #define CCP2IE PIE2bits.CCP2IE // bit 0
2726 #define BCLIE PIE2bits.BCLIE // bit 3
2727 #define OSFIE PIE2bits.OSFIE // bit 7
2729 #define TMR1IF PIR1bits.TMR1IF // bit 0
2730 #define TMR2IF PIR1bits.TMR2IF // bit 1
2731 #define CCP1IF PIR1bits.CCP1IF // bit 2
2732 #define SSPIF PIR1bits.SSPIF // bit 3
2733 #define TXIF PIR1bits.TXIF // bit 4
2734 #define RCIF PIR1bits.RCIF // bit 5
2735 #define ADIF PIR1bits.ADIF // bit 6
2736 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
2738 #define CCP2IF PIR2bits.CCP2IF // bit 0
2739 #define BCLIF PIR2bits.BCLIF // bit 3
2740 #define OSFIF PIR2bits.OSFIF // bit 7
2742 #define RD PMCON1bits.RD // bit 0
2743 #define WR PMCON1bits.WR // bit 1
2744 #define WREN PMCON1bits.WREN // bit 2
2745 #define WRERR PMCON1bits.WRERR // bit 3
2746 #define FREE PMCON1bits.FREE // bit 4
2747 #define LWLO PMCON1bits.LWLO // bit 5
2748 #define CFGS PMCON1bits.CFGS // bit 6
2750 #define RA0 PORTAbits.RA0 // bit 0
2751 #define RA1 PORTAbits.RA1 // bit 1
2752 #define RA2 PORTAbits.RA2 // bit 2
2753 #define RA3 PORTAbits.RA3 // bit 3
2754 #define RA4 PORTAbits.RA4 // bit 4
2755 #define RA5 PORTAbits.RA5 // bit 5
2756 #define RA6 PORTAbits.RA6 // bit 6
2757 #define RA7 PORTAbits.RA7 // bit 7
2759 #define RB0 PORTBbits.RB0 // bit 0
2760 #define RB1 PORTBbits.RB1 // bit 1
2761 #define RB2 PORTBbits.RB2 // bit 2
2762 #define RB3 PORTBbits.RB3 // bit 3
2763 #define RB4 PORTBbits.RB4 // bit 4
2764 #define RB5 PORTBbits.RB5 // bit 5
2765 #define RB6 PORTBbits.RB6 // bit 6
2766 #define RB7 PORTBbits.RB7 // bit 7
2768 #define RC0 PORTCbits.RC0 // bit 0
2769 #define RC1 PORTCbits.RC1 // bit 1
2770 #define RC2 PORTCbits.RC2 // bit 2
2771 #define RC3 PORTCbits.RC3 // bit 3
2772 #define RC4 PORTCbits.RC4 // bit 4
2773 #define RC5 PORTCbits.RC5 // bit 5
2774 #define RC6 PORTCbits.RC6 // bit 6
2775 #define RC7 PORTCbits.RC7 // bit 7
2777 #define RE3 PORTEbits.RE3 // bit 3
2779 #define RX9D RCSTAbits.RX9D // bit 0
2780 #define OERR RCSTAbits.OERR // bit 1
2781 #define FERR RCSTAbits.FERR // bit 2
2782 #define ADDEN RCSTAbits.ADDEN // bit 3
2783 #define CREN RCSTAbits.CREN // bit 4
2784 #define SREN RCSTAbits.SREN // bit 5
2785 #define RX9 RCSTAbits.RX9 // bit 6
2786 #define SPEN RCSTAbits.SPEN // bit 7
2788 #define SSPM0 SSP1CON1bits.SSPM0 // bit 0
2789 #define SSPM1 SSP1CON1bits.SSPM1 // bit 1
2790 #define SSPM2 SSP1CON1bits.SSPM2 // bit 2
2791 #define SSPM3 SSP1CON1bits.SSPM3 // bit 3
2792 #define CKP SSP1CON1bits.CKP // bit 4
2793 #define SSPEN SSP1CON1bits.SSPEN // bit 5
2794 #define SSPOV SSP1CON1bits.SSPOV // bit 6
2795 #define WCOL SSP1CON1bits.WCOL // bit 7
2797 #define SEN SSP1CON2bits.SEN // bit 0
2798 #define RSEN SSP1CON2bits.RSEN // bit 1
2799 #define PEN SSP1CON2bits.PEN // bit 2
2800 #define RCEN SSP1CON2bits.RCEN // bit 3
2801 #define ACKEN SSP1CON2bits.ACKEN // bit 4
2802 #define ACKDT SSP1CON2bits.ACKDT // bit 5
2803 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
2804 #define GCEN SSP1CON2bits.GCEN // bit 7
2806 #define DHEN SSP1CON3bits.DHEN // bit 0
2807 #define AHEN SSP1CON3bits.AHEN // bit 1
2808 #define SBCDE SSP1CON3bits.SBCDE // bit 2
2809 #define SDAHT SSP1CON3bits.SDAHT // bit 3
2810 #define BOEN SSP1CON3bits.BOEN // bit 4
2811 #define SCIE SSP1CON3bits.SCIE // bit 5
2812 #define PCIE SSP1CON3bits.PCIE // bit 6
2813 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
2815 #define BF SSP1STATbits.BF // bit 0
2816 #define UA SSP1STATbits.UA // bit 1
2817 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
2818 #define S SSP1STATbits.S // bit 3
2819 #define P SSP1STATbits.P // bit 4
2820 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
2821 #define CKE SSP1STATbits.CKE // bit 6
2822 #define SMP SSP1STATbits.SMP // bit 7
2824 #define C STATUSbits.C // bit 0
2825 #define DC STATUSbits.DC // bit 1
2826 #define Z STATUSbits.Z // bit 2
2827 #define NOT_PD STATUSbits.NOT_PD // bit 3
2828 #define NOT_TO STATUSbits.NOT_TO // bit 4
2830 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
2831 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
2832 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
2834 #define TMR1ON T1CONbits.TMR1ON // bit 0
2835 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
2836 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
2837 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
2838 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
2839 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
2840 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
2842 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
2843 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
2844 #define T1GVAL T1GCONbits.T1GVAL // bit 2
2845 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
2846 #define T1GSPM T1GCONbits.T1GSPM // bit 4
2847 #define T1GTM T1GCONbits.T1GTM // bit 5
2848 #define T1GPOL T1GCONbits.T1GPOL // bit 6
2849 #define TMR1GE T1GCONbits.TMR1GE // bit 7
2851 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
2852 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
2853 #define TMR2ON T2CONbits.TMR2ON // bit 2
2854 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
2855 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
2856 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
2857 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
2859 #define TRISA0 TRISAbits.TRISA0 // bit 0
2860 #define TRISA1 TRISAbits.TRISA1 // bit 1
2861 #define TRISA2 TRISAbits.TRISA2 // bit 2
2862 #define TRISA3 TRISAbits.TRISA3 // bit 3
2863 #define TRISA4 TRISAbits.TRISA4 // bit 4
2864 #define TRISA5 TRISAbits.TRISA5 // bit 5
2865 #define TRISA6 TRISAbits.TRISA6 // bit 6
2866 #define TRISA7 TRISAbits.TRISA7 // bit 7
2868 #define TRISB0 TRISBbits.TRISB0 // bit 0
2869 #define TRISB1 TRISBbits.TRISB1 // bit 1
2870 #define TRISB2 TRISBbits.TRISB2 // bit 2
2871 #define TRISB3 TRISBbits.TRISB3 // bit 3
2872 #define TRISB4 TRISBbits.TRISB4 // bit 4
2873 #define TRISB5 TRISBbits.TRISB5 // bit 5
2874 #define TRISB6 TRISBbits.TRISB6 // bit 6
2875 #define TRISB7 TRISBbits.TRISB7 // bit 7
2877 #define TRISC0 TRISCbits.TRISC0 // bit 0
2878 #define TRISC1 TRISCbits.TRISC1 // bit 1
2879 #define TRISC2 TRISCbits.TRISC2 // bit 2
2880 #define TRISC3 TRISCbits.TRISC3 // bit 3
2881 #define TRISC4 TRISCbits.TRISC4 // bit 4
2882 #define TRISC5 TRISCbits.TRISC5 // bit 5
2883 #define TRISC6 TRISCbits.TRISC6 // bit 6
2884 #define TRISC7 TRISCbits.TRISC7 // bit 7
2886 #define TX9D TXSTAbits.TX9D // bit 0
2887 #define TRMT TXSTAbits.TRMT // bit 1
2888 #define BRGH TXSTAbits.BRGH // bit 2
2889 #define SENDB TXSTAbits.SENDB // bit 3
2890 #define SYNC TXSTAbits.SYNC // bit 4
2891 #define TXEN TXSTAbits.TXEN // bit 5
2892 #define TX9 TXSTAbits.TX9 // bit 6
2893 #define CSRC TXSTAbits.CSRC // bit 7
2895 #define SWDTEN WDTCONbits.SWDTEN // bit 0
2896 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
2897 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
2898 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
2899 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
2900 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
2902 #define WPUB0 WPUBbits.WPUB0 // bit 0
2903 #define WPUB1 WPUBbits.WPUB1 // bit 1
2904 #define WPUB2 WPUBbits.WPUB2 // bit 2
2905 #define WPUB3 WPUBbits.WPUB3 // bit 3
2906 #define WPUB4 WPUBbits.WPUB4 // bit 4
2907 #define WPUB5 WPUBbits.WPUB5 // bit 5
2908 #define WPUB6 WPUBbits.WPUB6 // bit 6
2909 #define WPUB7 WPUBbits.WPUB7 // bit 7
2911 #define WPUE3 WPUEbits.WPUE3 // bit 3
2913 #endif // #ifndef NO_BIT_DEFINES
2915 #endif // #ifndef __PIC16LF1513_H__