Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f1707.h
blob4e0269ece987d9d72f06f5592974ff9bac93ab9d
1 /*
2 * This declarations of the PIC16F1707 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:11 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 __PIC16F1707_H__
26 #define __PIC16F1707_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 PIR1_ADDR 0x0011
54 #define PIR2_ADDR 0x0012
55 #define PIR3_ADDR 0x0013
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 PIE1_ADDR 0x0091
69 #define PIE2_ADDR 0x0092
70 #define PIE3_ADDR 0x0093
71 #define OPTION_REG_ADDR 0x0095
72 #define PCON_ADDR 0x0096
73 #define WDTCON_ADDR 0x0097
74 #define OSCTUNE_ADDR 0x0098
75 #define OSCCON_ADDR 0x0099
76 #define OSCSTAT_ADDR 0x009A
77 #define ADRES_ADDR 0x009B
78 #define ADRESL_ADDR 0x009B
79 #define ADRESH_ADDR 0x009C
80 #define ADCON0_ADDR 0x009D
81 #define ADCON1_ADDR 0x009E
82 #define ADCON2_ADDR 0x009F
83 #define LATA_ADDR 0x010C
84 #define LATB_ADDR 0x010D
85 #define LATC_ADDR 0x010E
86 #define BORCON_ADDR 0x0116
87 #define FVRCON_ADDR 0x0117
88 #define ZCD1CON_ADDR 0x011C
89 #define ANSELA_ADDR 0x018C
90 #define ANSELB_ADDR 0x018D
91 #define ANSELC_ADDR 0x018E
92 #define PMADR_ADDR 0x0191
93 #define PMADRL_ADDR 0x0191
94 #define PMADRH_ADDR 0x0192
95 #define PMDAT_ADDR 0x0193
96 #define PMDATL_ADDR 0x0193
97 #define PMDATH_ADDR 0x0194
98 #define PMCON1_ADDR 0x0195
99 #define PMCON2_ADDR 0x0196
100 #define VREGCON_ADDR 0x0197
101 #define WPUA_ADDR 0x020C
102 #define WPUB_ADDR 0x020D
103 #define WPUC_ADDR 0x020E
104 #define SSP1BUF_ADDR 0x0211
105 #define SSPBUF_ADDR 0x0211
106 #define SSP1ADD_ADDR 0x0212
107 #define SSPADD_ADDR 0x0212
108 #define SSP1MSK_ADDR 0x0213
109 #define SSPMSK_ADDR 0x0213
110 #define SSP1STAT_ADDR 0x0214
111 #define SSPSTAT_ADDR 0x0214
112 #define SSP1CON_ADDR 0x0215
113 #define SSP1CON1_ADDR 0x0215
114 #define SSPCON_ADDR 0x0215
115 #define SSPCON1_ADDR 0x0215
116 #define SSP1CON2_ADDR 0x0216
117 #define SSPCON2_ADDR 0x0216
118 #define SSP1CON3_ADDR 0x0217
119 #define SSPCON3_ADDR 0x0217
120 #define ODCONA_ADDR 0x028C
121 #define ODCONB_ADDR 0x028D
122 #define ODCONC_ADDR 0x028E
123 #define CCPR1_ADDR 0x0291
124 #define CCPR1L_ADDR 0x0291
125 #define CCPR1H_ADDR 0x0292
126 #define CCP1CON_ADDR 0x0293
127 #define ECCP1CON_ADDR 0x0293
128 #define CCPR2_ADDR 0x0298
129 #define CCPR2L_ADDR 0x0298
130 #define CCPR2H_ADDR 0x0299
131 #define CCP2CON_ADDR 0x029A
132 #define ECCP2CON_ADDR 0x029A
133 #define SLRCONA_ADDR 0x030C
134 #define SLRCONB_ADDR 0x030D
135 #define SLRCONC_ADDR 0x030E
136 #define INLVLA_ADDR 0x038C
137 #define INLVLB_ADDR 0x038D
138 #define INLVLC_ADDR 0x038E
139 #define IOCAP_ADDR 0x0391
140 #define IOCAN_ADDR 0x0392
141 #define IOCAF_ADDR 0x0393
142 #define IOCBP_ADDR 0x0394
143 #define IOCBN_ADDR 0x0395
144 #define IOCBF_ADDR 0x0396
145 #define IOCCP_ADDR 0x0397
146 #define IOCCN_ADDR 0x0398
147 #define IOCCF_ADDR 0x0399
148 #define OPA1CON_ADDR 0x0511
149 #define OPA2CON_ADDR 0x0515
150 #define PPSLOCK_ADDR 0x0E0F
151 #define INTPPS_ADDR 0x0E10
152 #define T0CKIPPS_ADDR 0x0E11
153 #define T1CKIPPS_ADDR 0x0E12
154 #define T1GPPS_ADDR 0x0E13
155 #define CCP1PPS_ADDR 0x0E14
156 #define CCP2PPS_ADDR 0x0E15
157 #define SSPCLKPPS_ADDR 0x0E20
158 #define SSPDATPPS_ADDR 0x0E21
159 #define SSPSSPPS_ADDR 0x0E22
160 #define RA0PPS_ADDR 0x0E90
161 #define RA1PPS_ADDR 0x0E91
162 #define RA2PPS_ADDR 0x0E92
163 #define RA4PPS_ADDR 0x0E94
164 #define RA5PPS_ADDR 0x0E95
165 #define RB4PPS_ADDR 0x0E9C
166 #define RB5PPS_ADDR 0x0E9D
167 #define RB6PPS_ADDR 0x0E9E
168 #define RB7PPS_ADDR 0x0E9F
169 #define RC0PPS_ADDR 0x0EA0
170 #define RC1PPS_ADDR 0x0EA1
171 #define RC2PPS_ADDR 0x0EA2
172 #define RC3PPS_ADDR 0x0EA3
173 #define RC4PPS_ADDR 0x0EA4
174 #define RC5PPS_ADDR 0x0EA5
175 #define RC6PPS_ADDR 0x0EA6
176 #define RC7PPS_ADDR 0x0EA7
177 #define ICDBK0H_ADDR 0x0F9E
178 #define STATUS_SHAD_ADDR 0x0FE4
179 #define WREG_SHAD_ADDR 0x0FE5
180 #define BSR_SHAD_ADDR 0x0FE6
181 #define PCLATH_SHAD_ADDR 0x0FE7
182 #define FSR0L_SHAD_ADDR 0x0FE8
183 #define FSR0H_SHAD_ADDR 0x0FE9
184 #define FSR1L_SHAD_ADDR 0x0FEA
185 #define FSR1H_SHAD_ADDR 0x0FEB
186 #define STKPTR_ADDR 0x0FED
187 #define TOSL_ADDR 0x0FEE
188 #define TOSH_ADDR 0x0FEF
190 #endif // #ifndef NO_ADDR_DEFINES
192 //==============================================================================
194 // Register Definitions
196 //==============================================================================
198 extern __at(0x0000) __sfr INDF0;
199 extern __at(0x0001) __sfr INDF1;
200 extern __at(0x0002) __sfr PCL;
202 //==============================================================================
203 // STATUS Bits
205 extern __at(0x0003) __sfr STATUS;
207 typedef struct
209 unsigned C : 1;
210 unsigned DC : 1;
211 unsigned Z : 1;
212 unsigned NOT_PD : 1;
213 unsigned NOT_TO : 1;
214 unsigned : 1;
215 unsigned : 1;
216 unsigned : 1;
217 } __STATUSbits_t;
219 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
221 #define _C 0x01
222 #define _DC 0x02
223 #define _Z 0x04
224 #define _NOT_PD 0x08
225 #define _NOT_TO 0x10
227 //==============================================================================
229 extern __at(0x0004) __sfr FSR0;
230 extern __at(0x0004) __sfr FSR0L;
231 extern __at(0x0005) __sfr FSR0H;
232 extern __at(0x0006) __sfr FSR1;
233 extern __at(0x0006) __sfr FSR1L;
234 extern __at(0x0007) __sfr FSR1H;
236 //==============================================================================
237 // BSR Bits
239 extern __at(0x0008) __sfr BSR;
241 typedef union
243 struct
245 unsigned BSR0 : 1;
246 unsigned BSR1 : 1;
247 unsigned BSR2 : 1;
248 unsigned BSR3 : 1;
249 unsigned BSR4 : 1;
250 unsigned : 1;
251 unsigned : 1;
252 unsigned : 1;
255 struct
257 unsigned BSR : 5;
258 unsigned : 3;
260 } __BSRbits_t;
262 extern __at(0x0008) volatile __BSRbits_t BSRbits;
264 #define _BSR0 0x01
265 #define _BSR1 0x02
266 #define _BSR2 0x04
267 #define _BSR3 0x08
268 #define _BSR4 0x10
270 //==============================================================================
272 extern __at(0x0009) __sfr WREG;
273 extern __at(0x000A) __sfr PCLATH;
275 //==============================================================================
276 // INTCON Bits
278 extern __at(0x000B) __sfr INTCON;
280 typedef union
282 struct
284 unsigned IOCIF : 1;
285 unsigned INTF : 1;
286 unsigned TMR0IF : 1;
287 unsigned IOCIE : 1;
288 unsigned INTE : 1;
289 unsigned TMR0IE : 1;
290 unsigned PEIE : 1;
291 unsigned GIE : 1;
294 struct
296 unsigned : 1;
297 unsigned : 1;
298 unsigned T0IF : 1;
299 unsigned : 1;
300 unsigned : 1;
301 unsigned T0IE : 1;
302 unsigned : 1;
303 unsigned : 1;
305 } __INTCONbits_t;
307 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
309 #define _IOCIF 0x01
310 #define _INTF 0x02
311 #define _TMR0IF 0x04
312 #define _T0IF 0x04
313 #define _IOCIE 0x08
314 #define _INTE 0x10
315 #define _TMR0IE 0x20
316 #define _T0IE 0x20
317 #define _PEIE 0x40
318 #define _GIE 0x80
320 //==============================================================================
323 //==============================================================================
324 // PORTA Bits
326 extern __at(0x000C) __sfr PORTA;
328 typedef union
330 struct
332 unsigned RA0 : 1;
333 unsigned RA1 : 1;
334 unsigned RA2 : 1;
335 unsigned RA3 : 1;
336 unsigned RA4 : 1;
337 unsigned RA5 : 1;
338 unsigned : 1;
339 unsigned : 1;
342 struct
344 unsigned RA : 6;
345 unsigned : 2;
347 } __PORTAbits_t;
349 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
351 #define _RA0 0x01
352 #define _RA1 0x02
353 #define _RA2 0x04
354 #define _RA3 0x08
355 #define _RA4 0x10
356 #define _RA5 0x20
358 //==============================================================================
361 //==============================================================================
362 // PORTB Bits
364 extern __at(0x000D) __sfr PORTB;
366 typedef struct
368 unsigned : 1;
369 unsigned : 1;
370 unsigned : 1;
371 unsigned : 1;
372 unsigned RB4 : 1;
373 unsigned RB5 : 1;
374 unsigned RB6 : 1;
375 unsigned RB7 : 1;
376 } __PORTBbits_t;
378 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
380 #define _RB4 0x10
381 #define _RB5 0x20
382 #define _RB6 0x40
383 #define _RB7 0x80
385 //==============================================================================
388 //==============================================================================
389 // PORTC Bits
391 extern __at(0x000E) __sfr PORTC;
393 typedef struct
395 unsigned RC0 : 1;
396 unsigned RC1 : 1;
397 unsigned RC2 : 1;
398 unsigned RC3 : 1;
399 unsigned RC4 : 1;
400 unsigned RC5 : 1;
401 unsigned RC6 : 1;
402 unsigned RC7 : 1;
403 } __PORTCbits_t;
405 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
407 #define _RC0 0x01
408 #define _RC1 0x02
409 #define _RC2 0x04
410 #define _RC3 0x08
411 #define _RC4 0x10
412 #define _RC5 0x20
413 #define _RC6 0x40
414 #define _RC7 0x80
416 //==============================================================================
419 //==============================================================================
420 // PIR1 Bits
422 extern __at(0x0011) __sfr PIR1;
424 typedef union
426 struct
428 unsigned TMR1IF : 1;
429 unsigned TMR2IF : 1;
430 unsigned CCP1IF : 1;
431 unsigned SSP1IF : 1;
432 unsigned : 1;
433 unsigned : 1;
434 unsigned ADIF : 1;
435 unsigned TMR1GIF : 1;
438 struct
440 unsigned : 1;
441 unsigned : 1;
442 unsigned CCPIF : 1;
443 unsigned : 1;
444 unsigned : 1;
445 unsigned : 1;
446 unsigned : 1;
447 unsigned : 1;
449 } __PIR1bits_t;
451 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
453 #define _TMR1IF 0x01
454 #define _TMR2IF 0x02
455 #define _CCP1IF 0x04
456 #define _CCPIF 0x04
457 #define _SSP1IF 0x08
458 #define _ADIF 0x40
459 #define _TMR1GIF 0x80
461 //==============================================================================
464 //==============================================================================
465 // PIR2 Bits
467 extern __at(0x0012) __sfr PIR2;
469 typedef struct
471 unsigned CCP2IF : 1;
472 unsigned : 1;
473 unsigned : 1;
474 unsigned BCL1IF : 1;
475 unsigned : 1;
476 unsigned : 1;
477 unsigned : 1;
478 unsigned : 1;
479 } __PIR2bits_t;
481 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
483 #define _CCP2IF 0x01
484 #define _BCL1IF 0x08
486 //==============================================================================
489 //==============================================================================
490 // PIR3 Bits
492 extern __at(0x0013) __sfr PIR3;
494 typedef struct
496 unsigned : 1;
497 unsigned : 1;
498 unsigned : 1;
499 unsigned : 1;
500 unsigned ZCDIF : 1;
501 unsigned : 1;
502 unsigned : 1;
503 unsigned : 1;
504 } __PIR3bits_t;
506 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
508 #define _ZCDIF 0x10
510 //==============================================================================
512 extern __at(0x0015) __sfr TMR0;
513 extern __at(0x0016) __sfr TMR1;
514 extern __at(0x0016) __sfr TMR1L;
515 extern __at(0x0017) __sfr TMR1H;
517 //==============================================================================
518 // T1CON Bits
520 extern __at(0x0018) __sfr T1CON;
522 typedef union
524 struct
526 unsigned TMR1ON : 1;
527 unsigned : 1;
528 unsigned NOT_T1SYNC : 1;
529 unsigned T1OSCEN : 1;
530 unsigned T1CKPS0 : 1;
531 unsigned T1CKPS1 : 1;
532 unsigned TMR1CS0 : 1;
533 unsigned TMR1CS1 : 1;
536 struct
538 unsigned : 4;
539 unsigned T1CKPS : 2;
540 unsigned : 2;
543 struct
545 unsigned : 6;
546 unsigned TMR1CS : 2;
548 } __T1CONbits_t;
550 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
552 #define _TMR1ON 0x01
553 #define _NOT_T1SYNC 0x04
554 #define _T1OSCEN 0x08
555 #define _T1CKPS0 0x10
556 #define _T1CKPS1 0x20
557 #define _TMR1CS0 0x40
558 #define _TMR1CS1 0x80
560 //==============================================================================
563 //==============================================================================
564 // T1GCON Bits
566 extern __at(0x0019) __sfr T1GCON;
568 typedef union
570 struct
572 unsigned T1GSS0 : 1;
573 unsigned T1GSS1 : 1;
574 unsigned T1GVAL : 1;
575 unsigned T1GGO_NOT_DONE : 1;
576 unsigned T1GSPM : 1;
577 unsigned T1GTM : 1;
578 unsigned T1GPOL : 1;
579 unsigned TMR1GE : 1;
582 struct
584 unsigned T1GSS : 2;
585 unsigned : 6;
587 } __T1GCONbits_t;
589 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
591 #define _T1GSS0 0x01
592 #define _T1GSS1 0x02
593 #define _T1GVAL 0x04
594 #define _T1GGO_NOT_DONE 0x08
595 #define _T1GSPM 0x10
596 #define _T1GTM 0x20
597 #define _T1GPOL 0x40
598 #define _TMR1GE 0x80
600 //==============================================================================
602 extern __at(0x001A) __sfr TMR2;
603 extern __at(0x001B) __sfr PR2;
605 //==============================================================================
606 // T2CON Bits
608 extern __at(0x001C) __sfr T2CON;
610 typedef union
612 struct
614 unsigned T2CKPS0 : 1;
615 unsigned T2CKPS1 : 1;
616 unsigned TMR2ON : 1;
617 unsigned T2OUTPS0 : 1;
618 unsigned T2OUTPS1 : 1;
619 unsigned T2OUTPS2 : 1;
620 unsigned T2OUTPS3 : 1;
621 unsigned : 1;
624 struct
626 unsigned T2CKPS : 2;
627 unsigned : 6;
630 struct
632 unsigned : 3;
633 unsigned T2OUTPS : 4;
634 unsigned : 1;
636 } __T2CONbits_t;
638 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
640 #define _T2CKPS0 0x01
641 #define _T2CKPS1 0x02
642 #define _TMR2ON 0x04
643 #define _T2OUTPS0 0x08
644 #define _T2OUTPS1 0x10
645 #define _T2OUTPS2 0x20
646 #define _T2OUTPS3 0x40
648 //==============================================================================
651 //==============================================================================
652 // TRISA Bits
654 extern __at(0x008C) __sfr TRISA;
656 typedef struct
658 unsigned TRISA0 : 1;
659 unsigned TRISA1 : 1;
660 unsigned TRISA2 : 1;
661 unsigned : 1;
662 unsigned TRISA4 : 1;
663 unsigned TRISA5 : 1;
664 unsigned : 1;
665 unsigned : 1;
666 } __TRISAbits_t;
668 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
670 #define _TRISA0 0x01
671 #define _TRISA1 0x02
672 #define _TRISA2 0x04
673 #define _TRISA4 0x10
674 #define _TRISA5 0x20
676 //==============================================================================
679 //==============================================================================
680 // TRISB Bits
682 extern __at(0x008D) __sfr TRISB;
684 typedef struct
686 unsigned : 1;
687 unsigned : 1;
688 unsigned : 1;
689 unsigned : 1;
690 unsigned TRISB4 : 1;
691 unsigned TRISB5 : 1;
692 unsigned TRISB6 : 1;
693 unsigned TRISB7 : 1;
694 } __TRISBbits_t;
696 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
698 #define _TRISB4 0x10
699 #define _TRISB5 0x20
700 #define _TRISB6 0x40
701 #define _TRISB7 0x80
703 //==============================================================================
706 //==============================================================================
707 // TRISC Bits
709 extern __at(0x008E) __sfr TRISC;
711 typedef struct
713 unsigned TRISC0 : 1;
714 unsigned TRISC1 : 1;
715 unsigned TRISC2 : 1;
716 unsigned TRISC3 : 1;
717 unsigned TRISC4 : 1;
718 unsigned TRISC5 : 1;
719 unsigned TRISC6 : 1;
720 unsigned TRISC7 : 1;
721 } __TRISCbits_t;
723 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
725 #define _TRISC0 0x01
726 #define _TRISC1 0x02
727 #define _TRISC2 0x04
728 #define _TRISC3 0x08
729 #define _TRISC4 0x10
730 #define _TRISC5 0x20
731 #define _TRISC6 0x40
732 #define _TRISC7 0x80
734 //==============================================================================
737 //==============================================================================
738 // PIE1 Bits
740 extern __at(0x0091) __sfr PIE1;
742 typedef union
744 struct
746 unsigned TMR1IE : 1;
747 unsigned TMR2IE : 1;
748 unsigned CCP1IE : 1;
749 unsigned SSP1IE : 1;
750 unsigned : 1;
751 unsigned : 1;
752 unsigned ADIE : 1;
753 unsigned TMR1GIE : 1;
756 struct
758 unsigned : 1;
759 unsigned : 1;
760 unsigned CCPIE : 1;
761 unsigned : 1;
762 unsigned : 1;
763 unsigned : 1;
764 unsigned : 1;
765 unsigned : 1;
767 } __PIE1bits_t;
769 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
771 #define _TMR1IE 0x01
772 #define _TMR2IE 0x02
773 #define _CCP1IE 0x04
774 #define _CCPIE 0x04
775 #define _SSP1IE 0x08
776 #define _ADIE 0x40
777 #define _TMR1GIE 0x80
779 //==============================================================================
782 //==============================================================================
783 // PIE2 Bits
785 extern __at(0x0092) __sfr PIE2;
787 typedef struct
789 unsigned CCP2IE : 1;
790 unsigned : 1;
791 unsigned : 1;
792 unsigned BCL1IE : 1;
793 unsigned : 1;
794 unsigned : 1;
795 unsigned : 1;
796 unsigned : 1;
797 } __PIE2bits_t;
799 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
801 #define _CCP2IE 0x01
802 #define _BCL1IE 0x08
804 //==============================================================================
807 //==============================================================================
808 // PIE3 Bits
810 extern __at(0x0093) __sfr PIE3;
812 typedef struct
814 unsigned : 1;
815 unsigned : 1;
816 unsigned : 1;
817 unsigned : 1;
818 unsigned ZCDIE : 1;
819 unsigned : 1;
820 unsigned : 1;
821 unsigned : 1;
822 } __PIE3bits_t;
824 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
826 #define _ZCDIE 0x10
828 //==============================================================================
831 //==============================================================================
832 // OPTION_REG Bits
834 extern __at(0x0095) __sfr OPTION_REG;
836 typedef union
838 struct
840 unsigned PS0 : 1;
841 unsigned PS1 : 1;
842 unsigned PS2 : 1;
843 unsigned PSA : 1;
844 unsigned TMR0SE : 1;
845 unsigned TMR0CS : 1;
846 unsigned INTEDG : 1;
847 unsigned NOT_WPUEN : 1;
850 struct
852 unsigned : 1;
853 unsigned : 1;
854 unsigned : 1;
855 unsigned : 1;
856 unsigned T0SE : 1;
857 unsigned T0CS : 1;
858 unsigned : 1;
859 unsigned : 1;
862 struct
864 unsigned PS : 3;
865 unsigned : 5;
867 } __OPTION_REGbits_t;
869 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
871 #define _PS0 0x01
872 #define _PS1 0x02
873 #define _PS2 0x04
874 #define _PSA 0x08
875 #define _TMR0SE 0x10
876 #define _T0SE 0x10
877 #define _TMR0CS 0x20
878 #define _T0CS 0x20
879 #define _INTEDG 0x40
880 #define _NOT_WPUEN 0x80
882 //==============================================================================
885 //==============================================================================
886 // PCON Bits
888 extern __at(0x0096) __sfr PCON;
890 typedef struct
892 unsigned NOT_BOR : 1;
893 unsigned NOT_POR : 1;
894 unsigned NOT_RI : 1;
895 unsigned NOT_RMCLR : 1;
896 unsigned NOT_RWDT : 1;
897 unsigned : 1;
898 unsigned STKUNF : 1;
899 unsigned STKOVF : 1;
900 } __PCONbits_t;
902 extern __at(0x0096) volatile __PCONbits_t PCONbits;
904 #define _NOT_BOR 0x01
905 #define _NOT_POR 0x02
906 #define _NOT_RI 0x04
907 #define _NOT_RMCLR 0x08
908 #define _NOT_RWDT 0x10
909 #define _STKUNF 0x40
910 #define _STKOVF 0x80
912 //==============================================================================
915 //==============================================================================
916 // WDTCON Bits
918 extern __at(0x0097) __sfr WDTCON;
920 typedef union
922 struct
924 unsigned SWDTEN : 1;
925 unsigned WDTPS0 : 1;
926 unsigned WDTPS1 : 1;
927 unsigned WDTPS2 : 1;
928 unsigned WDTPS3 : 1;
929 unsigned WDTPS4 : 1;
930 unsigned : 1;
931 unsigned : 1;
934 struct
936 unsigned : 1;
937 unsigned WDTPS : 5;
938 unsigned : 2;
940 } __WDTCONbits_t;
942 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
944 #define _SWDTEN 0x01
945 #define _WDTPS0 0x02
946 #define _WDTPS1 0x04
947 #define _WDTPS2 0x08
948 #define _WDTPS3 0x10
949 #define _WDTPS4 0x20
951 //==============================================================================
954 //==============================================================================
955 // OSCTUNE Bits
957 extern __at(0x0098) __sfr OSCTUNE;
959 typedef union
961 struct
963 unsigned TUN0 : 1;
964 unsigned TUN1 : 1;
965 unsigned TUN2 : 1;
966 unsigned TUN3 : 1;
967 unsigned TUN4 : 1;
968 unsigned TUN5 : 1;
969 unsigned : 1;
970 unsigned : 1;
973 struct
975 unsigned TUN : 6;
976 unsigned : 2;
978 } __OSCTUNEbits_t;
980 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
982 #define _TUN0 0x01
983 #define _TUN1 0x02
984 #define _TUN2 0x04
985 #define _TUN3 0x08
986 #define _TUN4 0x10
987 #define _TUN5 0x20
989 //==============================================================================
992 //==============================================================================
993 // OSCCON Bits
995 extern __at(0x0099) __sfr OSCCON;
997 typedef union
999 struct
1001 unsigned SCS0 : 1;
1002 unsigned SCS1 : 1;
1003 unsigned : 1;
1004 unsigned IRCF0 : 1;
1005 unsigned IRCF1 : 1;
1006 unsigned IRCF2 : 1;
1007 unsigned IRCF3 : 1;
1008 unsigned SPLLEN : 1;
1011 struct
1013 unsigned SCS : 2;
1014 unsigned : 6;
1017 struct
1019 unsigned : 3;
1020 unsigned IRCF : 4;
1021 unsigned : 1;
1023 } __OSCCONbits_t;
1025 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1027 #define _SCS0 0x01
1028 #define _SCS1 0x02
1029 #define _IRCF0 0x08
1030 #define _IRCF1 0x10
1031 #define _IRCF2 0x20
1032 #define _IRCF3 0x40
1033 #define _SPLLEN 0x80
1035 //==============================================================================
1038 //==============================================================================
1039 // OSCSTAT Bits
1041 extern __at(0x009A) __sfr OSCSTAT;
1043 typedef struct
1045 unsigned HFIOFS : 1;
1046 unsigned LFIOFR : 1;
1047 unsigned MFIOFR : 1;
1048 unsigned HFIOFL : 1;
1049 unsigned HFIOFR : 1;
1050 unsigned OSTS : 1;
1051 unsigned PLLR : 1;
1052 unsigned SOSCR : 1;
1053 } __OSCSTATbits_t;
1055 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1057 #define _HFIOFS 0x01
1058 #define _LFIOFR 0x02
1059 #define _MFIOFR 0x04
1060 #define _HFIOFL 0x08
1061 #define _HFIOFR 0x10
1062 #define _OSTS 0x20
1063 #define _PLLR 0x40
1064 #define _SOSCR 0x80
1066 //==============================================================================
1068 extern __at(0x009B) __sfr ADRES;
1069 extern __at(0x009B) __sfr ADRESL;
1070 extern __at(0x009C) __sfr ADRESH;
1072 //==============================================================================
1073 // ADCON0 Bits
1075 extern __at(0x009D) __sfr ADCON0;
1077 typedef union
1079 struct
1081 unsigned ADON : 1;
1082 unsigned GO_NOT_DONE : 1;
1083 unsigned CHS0 : 1;
1084 unsigned CHS1 : 1;
1085 unsigned CHS2 : 1;
1086 unsigned CHS3 : 1;
1087 unsigned CHS4 : 1;
1088 unsigned : 1;
1091 struct
1093 unsigned : 1;
1094 unsigned ADGO : 1;
1095 unsigned : 1;
1096 unsigned : 1;
1097 unsigned : 1;
1098 unsigned : 1;
1099 unsigned : 1;
1100 unsigned : 1;
1103 struct
1105 unsigned : 1;
1106 unsigned GO : 1;
1107 unsigned : 1;
1108 unsigned : 1;
1109 unsigned : 1;
1110 unsigned : 1;
1111 unsigned : 1;
1112 unsigned : 1;
1115 struct
1117 unsigned : 2;
1118 unsigned CHS : 5;
1119 unsigned : 1;
1121 } __ADCON0bits_t;
1123 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1125 #define _ADON 0x01
1126 #define _GO_NOT_DONE 0x02
1127 #define _ADGO 0x02
1128 #define _GO 0x02
1129 #define _CHS0 0x04
1130 #define _CHS1 0x08
1131 #define _CHS2 0x10
1132 #define _CHS3 0x20
1133 #define _CHS4 0x40
1135 //==============================================================================
1138 //==============================================================================
1139 // ADCON1 Bits
1141 extern __at(0x009E) __sfr ADCON1;
1143 typedef union
1145 struct
1147 unsigned ADPREF0 : 1;
1148 unsigned ADPREF1 : 1;
1149 unsigned ADNREF : 1;
1150 unsigned : 1;
1151 unsigned : 1;
1152 unsigned : 1;
1153 unsigned : 1;
1154 unsigned ADFM : 1;
1157 struct
1159 unsigned ADPREF : 2;
1160 unsigned : 6;
1162 } __ADCON1bits_t;
1164 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1166 #define _ADPREF0 0x01
1167 #define _ADPREF1 0x02
1168 #define _ADNREF 0x04
1169 #define _ADFM 0x80
1171 //==============================================================================
1174 //==============================================================================
1175 // ADCON2 Bits
1177 extern __at(0x009F) __sfr ADCON2;
1179 typedef union
1181 struct
1183 unsigned : 1;
1184 unsigned : 1;
1185 unsigned : 1;
1186 unsigned : 1;
1187 unsigned TRIGSEL0 : 1;
1188 unsigned TRIGSEL1 : 1;
1189 unsigned TRIGSEL2 : 1;
1190 unsigned TRIGSEL3 : 1;
1193 struct
1195 unsigned : 4;
1196 unsigned TRIGSEL : 4;
1198 } __ADCON2bits_t;
1200 extern __at(0x009F) volatile __ADCON2bits_t ADCON2bits;
1202 #define _TRIGSEL0 0x10
1203 #define _TRIGSEL1 0x20
1204 #define _TRIGSEL2 0x40
1205 #define _TRIGSEL3 0x80
1207 //==============================================================================
1210 //==============================================================================
1211 // LATA Bits
1213 extern __at(0x010C) __sfr LATA;
1215 typedef struct
1217 unsigned LATA0 : 1;
1218 unsigned LATA1 : 1;
1219 unsigned LATA2 : 1;
1220 unsigned : 1;
1221 unsigned LATA4 : 1;
1222 unsigned LATA5 : 1;
1223 unsigned : 1;
1224 unsigned : 1;
1225 } __LATAbits_t;
1227 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1229 #define _LATA0 0x01
1230 #define _LATA1 0x02
1231 #define _LATA2 0x04
1232 #define _LATA4 0x10
1233 #define _LATA5 0x20
1235 //==============================================================================
1238 //==============================================================================
1239 // LATB Bits
1241 extern __at(0x010D) __sfr LATB;
1243 typedef struct
1245 unsigned : 1;
1246 unsigned : 1;
1247 unsigned : 1;
1248 unsigned : 1;
1249 unsigned LATB4 : 1;
1250 unsigned LATB5 : 1;
1251 unsigned LATB6 : 1;
1252 unsigned LATB7 : 1;
1253 } __LATBbits_t;
1255 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1257 #define _LATB4 0x10
1258 #define _LATB5 0x20
1259 #define _LATB6 0x40
1260 #define _LATB7 0x80
1262 //==============================================================================
1265 //==============================================================================
1266 // LATC Bits
1268 extern __at(0x010E) __sfr LATC;
1270 typedef struct
1272 unsigned LATC0 : 1;
1273 unsigned LATC1 : 1;
1274 unsigned LATC2 : 1;
1275 unsigned LATC3 : 1;
1276 unsigned LATC4 : 1;
1277 unsigned LATC5 : 1;
1278 unsigned LATC6 : 1;
1279 unsigned LATC7 : 1;
1280 } __LATCbits_t;
1282 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1284 #define _LATC0 0x01
1285 #define _LATC1 0x02
1286 #define _LATC2 0x04
1287 #define _LATC3 0x08
1288 #define _LATC4 0x10
1289 #define _LATC5 0x20
1290 #define _LATC6 0x40
1291 #define _LATC7 0x80
1293 //==============================================================================
1296 //==============================================================================
1297 // BORCON Bits
1299 extern __at(0x0116) __sfr BORCON;
1301 typedef struct
1303 unsigned BORRDY : 1;
1304 unsigned : 1;
1305 unsigned : 1;
1306 unsigned : 1;
1307 unsigned : 1;
1308 unsigned : 1;
1309 unsigned BORFS : 1;
1310 unsigned SBOREN : 1;
1311 } __BORCONbits_t;
1313 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1315 #define _BORRDY 0x01
1316 #define _BORFS 0x40
1317 #define _SBOREN 0x80
1319 //==============================================================================
1322 //==============================================================================
1323 // FVRCON Bits
1325 extern __at(0x0117) __sfr FVRCON;
1327 typedef union
1329 struct
1331 unsigned ADFVR0 : 1;
1332 unsigned ADFVR1 : 1;
1333 unsigned CDAFVR0 : 1;
1334 unsigned CDAFVR1 : 1;
1335 unsigned TSRNG : 1;
1336 unsigned TSEN : 1;
1337 unsigned FVRRDY : 1;
1338 unsigned FVREN : 1;
1341 struct
1343 unsigned ADFVR : 2;
1344 unsigned : 6;
1347 struct
1349 unsigned : 2;
1350 unsigned CDAFVR : 2;
1351 unsigned : 4;
1353 } __FVRCONbits_t;
1355 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1357 #define _ADFVR0 0x01
1358 #define _ADFVR1 0x02
1359 #define _CDAFVR0 0x04
1360 #define _CDAFVR1 0x08
1361 #define _TSRNG 0x10
1362 #define _TSEN 0x20
1363 #define _FVRRDY 0x40
1364 #define _FVREN 0x80
1366 //==============================================================================
1369 //==============================================================================
1370 // ZCD1CON Bits
1372 extern __at(0x011C) __sfr ZCD1CON;
1374 typedef struct
1376 unsigned ZCD1INTN : 1;
1377 unsigned ZCD1INTP : 1;
1378 unsigned : 1;
1379 unsigned : 1;
1380 unsigned ZCD1POL : 1;
1381 unsigned ZCD1OUT : 1;
1382 unsigned : 1;
1383 unsigned ZCD1EN : 1;
1384 } __ZCD1CONbits_t;
1386 extern __at(0x011C) volatile __ZCD1CONbits_t ZCD1CONbits;
1388 #define _ZCD1INTN 0x01
1389 #define _ZCD1INTP 0x02
1390 #define _ZCD1POL 0x10
1391 #define _ZCD1OUT 0x20
1392 #define _ZCD1EN 0x80
1394 //==============================================================================
1397 //==============================================================================
1398 // ANSELA Bits
1400 extern __at(0x018C) __sfr ANSELA;
1402 typedef struct
1404 unsigned ANSA0 : 1;
1405 unsigned ANSA1 : 1;
1406 unsigned ANSA2 : 1;
1407 unsigned : 1;
1408 unsigned ANSA4 : 1;
1409 unsigned : 1;
1410 unsigned : 1;
1411 unsigned : 1;
1412 } __ANSELAbits_t;
1414 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1416 #define _ANSA0 0x01
1417 #define _ANSA1 0x02
1418 #define _ANSA2 0x04
1419 #define _ANSA4 0x10
1421 //==============================================================================
1424 //==============================================================================
1425 // ANSELB Bits
1427 extern __at(0x018D) __sfr ANSELB;
1429 typedef struct
1431 unsigned : 1;
1432 unsigned : 1;
1433 unsigned : 1;
1434 unsigned : 1;
1435 unsigned ANSB4 : 1;
1436 unsigned ANSB5 : 1;
1437 unsigned : 1;
1438 unsigned : 1;
1439 } __ANSELBbits_t;
1441 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1443 #define _ANSB4 0x10
1444 #define _ANSB5 0x20
1446 //==============================================================================
1449 //==============================================================================
1450 // ANSELC Bits
1452 extern __at(0x018E) __sfr ANSELC;
1454 typedef struct
1456 unsigned ANSC0 : 1;
1457 unsigned ANSC1 : 1;
1458 unsigned ANSC2 : 1;
1459 unsigned ANSC3 : 1;
1460 unsigned : 1;
1461 unsigned : 1;
1462 unsigned ANSC6 : 1;
1463 unsigned ANSC7 : 1;
1464 } __ANSELCbits_t;
1466 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1468 #define _ANSC0 0x01
1469 #define _ANSC1 0x02
1470 #define _ANSC2 0x04
1471 #define _ANSC3 0x08
1472 #define _ANSC6 0x40
1473 #define _ANSC7 0x80
1475 //==============================================================================
1477 extern __at(0x0191) __sfr PMADR;
1478 extern __at(0x0191) __sfr PMADRL;
1479 extern __at(0x0192) __sfr PMADRH;
1480 extern __at(0x0193) __sfr PMDAT;
1481 extern __at(0x0193) __sfr PMDATL;
1482 extern __at(0x0194) __sfr PMDATH;
1484 //==============================================================================
1485 // PMCON1 Bits
1487 extern __at(0x0195) __sfr PMCON1;
1489 typedef struct
1491 unsigned RD : 1;
1492 unsigned WR : 1;
1493 unsigned WREN : 1;
1494 unsigned WRERR : 1;
1495 unsigned FREE : 1;
1496 unsigned LWLO : 1;
1497 unsigned CFGS : 1;
1498 unsigned : 1;
1499 } __PMCON1bits_t;
1501 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1503 #define _RD 0x01
1504 #define _WR 0x02
1505 #define _WREN 0x04
1506 #define _WRERR 0x08
1507 #define _FREE 0x10
1508 #define _LWLO 0x20
1509 #define _CFGS 0x40
1511 //==============================================================================
1513 extern __at(0x0196) __sfr PMCON2;
1515 //==============================================================================
1516 // VREGCON Bits
1518 extern __at(0x0197) __sfr VREGCON;
1520 typedef struct
1522 unsigned Reserved : 1;
1523 unsigned VREGPM : 1;
1524 unsigned : 1;
1525 unsigned : 1;
1526 unsigned : 1;
1527 unsigned : 1;
1528 unsigned : 1;
1529 unsigned : 1;
1530 } __VREGCONbits_t;
1532 extern __at(0x0197) volatile __VREGCONbits_t VREGCONbits;
1534 #define _Reserved 0x01
1535 #define _VREGPM 0x02
1537 //==============================================================================
1540 //==============================================================================
1541 // WPUA Bits
1543 extern __at(0x020C) __sfr WPUA;
1545 typedef union
1547 struct
1549 unsigned WPUA0 : 1;
1550 unsigned WPUA1 : 1;
1551 unsigned WPUA2 : 1;
1552 unsigned WPUA3 : 1;
1553 unsigned WPUA4 : 1;
1554 unsigned WPUA5 : 1;
1555 unsigned : 1;
1556 unsigned : 1;
1559 struct
1561 unsigned WPUA : 6;
1562 unsigned : 2;
1564 } __WPUAbits_t;
1566 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
1568 #define _WPUA0 0x01
1569 #define _WPUA1 0x02
1570 #define _WPUA2 0x04
1571 #define _WPUA3 0x08
1572 #define _WPUA4 0x10
1573 #define _WPUA5 0x20
1575 //==============================================================================
1578 //==============================================================================
1579 // WPUB Bits
1581 extern __at(0x020D) __sfr WPUB;
1583 typedef struct
1585 unsigned : 1;
1586 unsigned : 1;
1587 unsigned : 1;
1588 unsigned : 1;
1589 unsigned WPUB4 : 1;
1590 unsigned WPUB5 : 1;
1591 unsigned WPUB6 : 1;
1592 unsigned WPUB7 : 1;
1593 } __WPUBbits_t;
1595 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
1597 #define _WPUB4 0x10
1598 #define _WPUB5 0x20
1599 #define _WPUB6 0x40
1600 #define _WPUB7 0x80
1602 //==============================================================================
1605 //==============================================================================
1606 // WPUC Bits
1608 extern __at(0x020E) __sfr WPUC;
1610 typedef struct
1612 unsigned WPUC0 : 1;
1613 unsigned WPUC1 : 1;
1614 unsigned WPUC2 : 1;
1615 unsigned WPUC3 : 1;
1616 unsigned WPUC4 : 1;
1617 unsigned WPUC5 : 1;
1618 unsigned WPUC6 : 1;
1619 unsigned WPUC7 : 1;
1620 } __WPUCbits_t;
1622 extern __at(0x020E) volatile __WPUCbits_t WPUCbits;
1624 #define _WPUC0 0x01
1625 #define _WPUC1 0x02
1626 #define _WPUC2 0x04
1627 #define _WPUC3 0x08
1628 #define _WPUC4 0x10
1629 #define _WPUC5 0x20
1630 #define _WPUC6 0x40
1631 #define _WPUC7 0x80
1633 //==============================================================================
1636 //==============================================================================
1637 // SSP1BUF Bits
1639 extern __at(0x0211) __sfr SSP1BUF;
1641 typedef union
1643 struct
1645 unsigned SSP1BUF0 : 1;
1646 unsigned SSP1BUF1 : 1;
1647 unsigned SSP1BUF2 : 1;
1648 unsigned SSP1BUF3 : 1;
1649 unsigned SSP1BUF4 : 1;
1650 unsigned SSP1BUF5 : 1;
1651 unsigned SSP1BUF6 : 1;
1652 unsigned SSP1BUF7 : 1;
1655 struct
1657 unsigned BUF0 : 1;
1658 unsigned BUF1 : 1;
1659 unsigned BUF2 : 1;
1660 unsigned BUF3 : 1;
1661 unsigned BUF4 : 1;
1662 unsigned BUF5 : 1;
1663 unsigned BUF6 : 1;
1664 unsigned BUF7 : 1;
1666 } __SSP1BUFbits_t;
1668 extern __at(0x0211) volatile __SSP1BUFbits_t SSP1BUFbits;
1670 #define _SSP1BUF0 0x01
1671 #define _BUF0 0x01
1672 #define _SSP1BUF1 0x02
1673 #define _BUF1 0x02
1674 #define _SSP1BUF2 0x04
1675 #define _BUF2 0x04
1676 #define _SSP1BUF3 0x08
1677 #define _BUF3 0x08
1678 #define _SSP1BUF4 0x10
1679 #define _BUF4 0x10
1680 #define _SSP1BUF5 0x20
1681 #define _BUF5 0x20
1682 #define _SSP1BUF6 0x40
1683 #define _BUF6 0x40
1684 #define _SSP1BUF7 0x80
1685 #define _BUF7 0x80
1687 //==============================================================================
1690 //==============================================================================
1691 // SSPBUF Bits
1693 extern __at(0x0211) __sfr SSPBUF;
1695 typedef union
1697 struct
1699 unsigned SSP1BUF0 : 1;
1700 unsigned SSP1BUF1 : 1;
1701 unsigned SSP1BUF2 : 1;
1702 unsigned SSP1BUF3 : 1;
1703 unsigned SSP1BUF4 : 1;
1704 unsigned SSP1BUF5 : 1;
1705 unsigned SSP1BUF6 : 1;
1706 unsigned SSP1BUF7 : 1;
1709 struct
1711 unsigned BUF0 : 1;
1712 unsigned BUF1 : 1;
1713 unsigned BUF2 : 1;
1714 unsigned BUF3 : 1;
1715 unsigned BUF4 : 1;
1716 unsigned BUF5 : 1;
1717 unsigned BUF6 : 1;
1718 unsigned BUF7 : 1;
1720 } __SSPBUFbits_t;
1722 extern __at(0x0211) volatile __SSPBUFbits_t SSPBUFbits;
1724 #define _SSPBUF_SSP1BUF0 0x01
1725 #define _SSPBUF_BUF0 0x01
1726 #define _SSPBUF_SSP1BUF1 0x02
1727 #define _SSPBUF_BUF1 0x02
1728 #define _SSPBUF_SSP1BUF2 0x04
1729 #define _SSPBUF_BUF2 0x04
1730 #define _SSPBUF_SSP1BUF3 0x08
1731 #define _SSPBUF_BUF3 0x08
1732 #define _SSPBUF_SSP1BUF4 0x10
1733 #define _SSPBUF_BUF4 0x10
1734 #define _SSPBUF_SSP1BUF5 0x20
1735 #define _SSPBUF_BUF5 0x20
1736 #define _SSPBUF_SSP1BUF6 0x40
1737 #define _SSPBUF_BUF6 0x40
1738 #define _SSPBUF_SSP1BUF7 0x80
1739 #define _SSPBUF_BUF7 0x80
1741 //==============================================================================
1744 //==============================================================================
1745 // SSP1ADD Bits
1747 extern __at(0x0212) __sfr SSP1ADD;
1749 typedef union
1751 struct
1753 unsigned SSP1ADD0 : 1;
1754 unsigned SSP1ADD1 : 1;
1755 unsigned SSP1ADD2 : 1;
1756 unsigned SSP1ADD3 : 1;
1757 unsigned SSP1ADD4 : 1;
1758 unsigned SSP1ADD5 : 1;
1759 unsigned SSP1ADD6 : 1;
1760 unsigned SSP1ADD7 : 1;
1763 struct
1765 unsigned ADD0 : 1;
1766 unsigned ADD1 : 1;
1767 unsigned ADD2 : 1;
1768 unsigned ADD3 : 1;
1769 unsigned ADD4 : 1;
1770 unsigned ADD5 : 1;
1771 unsigned ADD6 : 1;
1772 unsigned ADD7 : 1;
1774 } __SSP1ADDbits_t;
1776 extern __at(0x0212) volatile __SSP1ADDbits_t SSP1ADDbits;
1778 #define _SSP1ADD0 0x01
1779 #define _ADD0 0x01
1780 #define _SSP1ADD1 0x02
1781 #define _ADD1 0x02
1782 #define _SSP1ADD2 0x04
1783 #define _ADD2 0x04
1784 #define _SSP1ADD3 0x08
1785 #define _ADD3 0x08
1786 #define _SSP1ADD4 0x10
1787 #define _ADD4 0x10
1788 #define _SSP1ADD5 0x20
1789 #define _ADD5 0x20
1790 #define _SSP1ADD6 0x40
1791 #define _ADD6 0x40
1792 #define _SSP1ADD7 0x80
1793 #define _ADD7 0x80
1795 //==============================================================================
1798 //==============================================================================
1799 // SSPADD Bits
1801 extern __at(0x0212) __sfr SSPADD;
1803 typedef union
1805 struct
1807 unsigned SSP1ADD0 : 1;
1808 unsigned SSP1ADD1 : 1;
1809 unsigned SSP1ADD2 : 1;
1810 unsigned SSP1ADD3 : 1;
1811 unsigned SSP1ADD4 : 1;
1812 unsigned SSP1ADD5 : 1;
1813 unsigned SSP1ADD6 : 1;
1814 unsigned SSP1ADD7 : 1;
1817 struct
1819 unsigned ADD0 : 1;
1820 unsigned ADD1 : 1;
1821 unsigned ADD2 : 1;
1822 unsigned ADD3 : 1;
1823 unsigned ADD4 : 1;
1824 unsigned ADD5 : 1;
1825 unsigned ADD6 : 1;
1826 unsigned ADD7 : 1;
1828 } __SSPADDbits_t;
1830 extern __at(0x0212) volatile __SSPADDbits_t SSPADDbits;
1832 #define _SSPADD_SSP1ADD0 0x01
1833 #define _SSPADD_ADD0 0x01
1834 #define _SSPADD_SSP1ADD1 0x02
1835 #define _SSPADD_ADD1 0x02
1836 #define _SSPADD_SSP1ADD2 0x04
1837 #define _SSPADD_ADD2 0x04
1838 #define _SSPADD_SSP1ADD3 0x08
1839 #define _SSPADD_ADD3 0x08
1840 #define _SSPADD_SSP1ADD4 0x10
1841 #define _SSPADD_ADD4 0x10
1842 #define _SSPADD_SSP1ADD5 0x20
1843 #define _SSPADD_ADD5 0x20
1844 #define _SSPADD_SSP1ADD6 0x40
1845 #define _SSPADD_ADD6 0x40
1846 #define _SSPADD_SSP1ADD7 0x80
1847 #define _SSPADD_ADD7 0x80
1849 //==============================================================================
1852 //==============================================================================
1853 // SSP1MSK Bits
1855 extern __at(0x0213) __sfr SSP1MSK;
1857 typedef union
1859 struct
1861 unsigned SSP1MSK0 : 1;
1862 unsigned SSP1MSK1 : 1;
1863 unsigned SSP1MSK2 : 1;
1864 unsigned SSP1MSK3 : 1;
1865 unsigned SSP1MSK4 : 1;
1866 unsigned SSP1MSK5 : 1;
1867 unsigned SSP1MSK6 : 1;
1868 unsigned SSP1MSK7 : 1;
1871 struct
1873 unsigned MSK0 : 1;
1874 unsigned MSK1 : 1;
1875 unsigned MSK2 : 1;
1876 unsigned MSK3 : 1;
1877 unsigned MSK4 : 1;
1878 unsigned MSK5 : 1;
1879 unsigned MSK6 : 1;
1880 unsigned MSK7 : 1;
1882 } __SSP1MSKbits_t;
1884 extern __at(0x0213) volatile __SSP1MSKbits_t SSP1MSKbits;
1886 #define _SSP1MSK0 0x01
1887 #define _MSK0 0x01
1888 #define _SSP1MSK1 0x02
1889 #define _MSK1 0x02
1890 #define _SSP1MSK2 0x04
1891 #define _MSK2 0x04
1892 #define _SSP1MSK3 0x08
1893 #define _MSK3 0x08
1894 #define _SSP1MSK4 0x10
1895 #define _MSK4 0x10
1896 #define _SSP1MSK5 0x20
1897 #define _MSK5 0x20
1898 #define _SSP1MSK6 0x40
1899 #define _MSK6 0x40
1900 #define _SSP1MSK7 0x80
1901 #define _MSK7 0x80
1903 //==============================================================================
1906 //==============================================================================
1907 // SSPMSK Bits
1909 extern __at(0x0213) __sfr SSPMSK;
1911 typedef union
1913 struct
1915 unsigned SSP1MSK0 : 1;
1916 unsigned SSP1MSK1 : 1;
1917 unsigned SSP1MSK2 : 1;
1918 unsigned SSP1MSK3 : 1;
1919 unsigned SSP1MSK4 : 1;
1920 unsigned SSP1MSK5 : 1;
1921 unsigned SSP1MSK6 : 1;
1922 unsigned SSP1MSK7 : 1;
1925 struct
1927 unsigned MSK0 : 1;
1928 unsigned MSK1 : 1;
1929 unsigned MSK2 : 1;
1930 unsigned MSK3 : 1;
1931 unsigned MSK4 : 1;
1932 unsigned MSK5 : 1;
1933 unsigned MSK6 : 1;
1934 unsigned MSK7 : 1;
1936 } __SSPMSKbits_t;
1938 extern __at(0x0213) volatile __SSPMSKbits_t SSPMSKbits;
1940 #define _SSPMSK_SSP1MSK0 0x01
1941 #define _SSPMSK_MSK0 0x01
1942 #define _SSPMSK_SSP1MSK1 0x02
1943 #define _SSPMSK_MSK1 0x02
1944 #define _SSPMSK_SSP1MSK2 0x04
1945 #define _SSPMSK_MSK2 0x04
1946 #define _SSPMSK_SSP1MSK3 0x08
1947 #define _SSPMSK_MSK3 0x08
1948 #define _SSPMSK_SSP1MSK4 0x10
1949 #define _SSPMSK_MSK4 0x10
1950 #define _SSPMSK_SSP1MSK5 0x20
1951 #define _SSPMSK_MSK5 0x20
1952 #define _SSPMSK_SSP1MSK6 0x40
1953 #define _SSPMSK_MSK6 0x40
1954 #define _SSPMSK_SSP1MSK7 0x80
1955 #define _SSPMSK_MSK7 0x80
1957 //==============================================================================
1960 //==============================================================================
1961 // SSP1STAT Bits
1963 extern __at(0x0214) __sfr SSP1STAT;
1965 typedef struct
1967 unsigned BF : 1;
1968 unsigned UA : 1;
1969 unsigned R_NOT_W : 1;
1970 unsigned S : 1;
1971 unsigned P : 1;
1972 unsigned D_NOT_A : 1;
1973 unsigned CKE : 1;
1974 unsigned SMP : 1;
1975 } __SSP1STATbits_t;
1977 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
1979 #define _BF 0x01
1980 #define _UA 0x02
1981 #define _R_NOT_W 0x04
1982 #define _S 0x08
1983 #define _P 0x10
1984 #define _D_NOT_A 0x20
1985 #define _CKE 0x40
1986 #define _SMP 0x80
1988 //==============================================================================
1991 //==============================================================================
1992 // SSPSTAT Bits
1994 extern __at(0x0214) __sfr SSPSTAT;
1996 typedef struct
1998 unsigned BF : 1;
1999 unsigned UA : 1;
2000 unsigned R_NOT_W : 1;
2001 unsigned S : 1;
2002 unsigned P : 1;
2003 unsigned D_NOT_A : 1;
2004 unsigned CKE : 1;
2005 unsigned SMP : 1;
2006 } __SSPSTATbits_t;
2008 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2010 #define _SSPSTAT_BF 0x01
2011 #define _SSPSTAT_UA 0x02
2012 #define _SSPSTAT_R_NOT_W 0x04
2013 #define _SSPSTAT_S 0x08
2014 #define _SSPSTAT_P 0x10
2015 #define _SSPSTAT_D_NOT_A 0x20
2016 #define _SSPSTAT_CKE 0x40
2017 #define _SSPSTAT_SMP 0x80
2019 //==============================================================================
2022 //==============================================================================
2023 // SSP1CON Bits
2025 extern __at(0x0215) __sfr SSP1CON;
2027 typedef union
2029 struct
2031 unsigned SSPM0 : 1;
2032 unsigned SSPM1 : 1;
2033 unsigned SSPM2 : 1;
2034 unsigned SSPM3 : 1;
2035 unsigned CKP : 1;
2036 unsigned SSPEN : 1;
2037 unsigned SSPOV : 1;
2038 unsigned WCOL : 1;
2041 struct
2043 unsigned SSPM : 4;
2044 unsigned : 4;
2046 } __SSP1CONbits_t;
2048 extern __at(0x0215) volatile __SSP1CONbits_t SSP1CONbits;
2050 #define _SSPM0 0x01
2051 #define _SSPM1 0x02
2052 #define _SSPM2 0x04
2053 #define _SSPM3 0x08
2054 #define _CKP 0x10
2055 #define _SSPEN 0x20
2056 #define _SSPOV 0x40
2057 #define _WCOL 0x80
2059 //==============================================================================
2062 //==============================================================================
2063 // SSP1CON1 Bits
2065 extern __at(0x0215) __sfr SSP1CON1;
2067 typedef union
2069 struct
2071 unsigned SSPM0 : 1;
2072 unsigned SSPM1 : 1;
2073 unsigned SSPM2 : 1;
2074 unsigned SSPM3 : 1;
2075 unsigned CKP : 1;
2076 unsigned SSPEN : 1;
2077 unsigned SSPOV : 1;
2078 unsigned WCOL : 1;
2081 struct
2083 unsigned SSPM : 4;
2084 unsigned : 4;
2086 } __SSP1CON1bits_t;
2088 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2090 #define _SSP1CON1_SSPM0 0x01
2091 #define _SSP1CON1_SSPM1 0x02
2092 #define _SSP1CON1_SSPM2 0x04
2093 #define _SSP1CON1_SSPM3 0x08
2094 #define _SSP1CON1_CKP 0x10
2095 #define _SSP1CON1_SSPEN 0x20
2096 #define _SSP1CON1_SSPOV 0x40
2097 #define _SSP1CON1_WCOL 0x80
2099 //==============================================================================
2102 //==============================================================================
2103 // SSPCON Bits
2105 extern __at(0x0215) __sfr SSPCON;
2107 typedef union
2109 struct
2111 unsigned SSPM0 : 1;
2112 unsigned SSPM1 : 1;
2113 unsigned SSPM2 : 1;
2114 unsigned SSPM3 : 1;
2115 unsigned CKP : 1;
2116 unsigned SSPEN : 1;
2117 unsigned SSPOV : 1;
2118 unsigned WCOL : 1;
2121 struct
2123 unsigned SSPM : 4;
2124 unsigned : 4;
2126 } __SSPCONbits_t;
2128 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2130 #define _SSPCON_SSPM0 0x01
2131 #define _SSPCON_SSPM1 0x02
2132 #define _SSPCON_SSPM2 0x04
2133 #define _SSPCON_SSPM3 0x08
2134 #define _SSPCON_CKP 0x10
2135 #define _SSPCON_SSPEN 0x20
2136 #define _SSPCON_SSPOV 0x40
2137 #define _SSPCON_WCOL 0x80
2139 //==============================================================================
2142 //==============================================================================
2143 // SSPCON1 Bits
2145 extern __at(0x0215) __sfr SSPCON1;
2147 typedef union
2149 struct
2151 unsigned SSPM0 : 1;
2152 unsigned SSPM1 : 1;
2153 unsigned SSPM2 : 1;
2154 unsigned SSPM3 : 1;
2155 unsigned CKP : 1;
2156 unsigned SSPEN : 1;
2157 unsigned SSPOV : 1;
2158 unsigned WCOL : 1;
2161 struct
2163 unsigned SSPM : 4;
2164 unsigned : 4;
2166 } __SSPCON1bits_t;
2168 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2170 #define _SSPCON1_SSPM0 0x01
2171 #define _SSPCON1_SSPM1 0x02
2172 #define _SSPCON1_SSPM2 0x04
2173 #define _SSPCON1_SSPM3 0x08
2174 #define _SSPCON1_CKP 0x10
2175 #define _SSPCON1_SSPEN 0x20
2176 #define _SSPCON1_SSPOV 0x40
2177 #define _SSPCON1_WCOL 0x80
2179 //==============================================================================
2182 //==============================================================================
2183 // SSP1CON2 Bits
2185 extern __at(0x0216) __sfr SSP1CON2;
2187 typedef struct
2189 unsigned SEN : 1;
2190 unsigned RSEN : 1;
2191 unsigned PEN : 1;
2192 unsigned RCEN : 1;
2193 unsigned ACKEN : 1;
2194 unsigned ACKDT : 1;
2195 unsigned ACKSTAT : 1;
2196 unsigned GCEN : 1;
2197 } __SSP1CON2bits_t;
2199 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2201 #define _SEN 0x01
2202 #define _RSEN 0x02
2203 #define _PEN 0x04
2204 #define _RCEN 0x08
2205 #define _ACKEN 0x10
2206 #define _ACKDT 0x20
2207 #define _ACKSTAT 0x40
2208 #define _GCEN 0x80
2210 //==============================================================================
2213 //==============================================================================
2214 // SSPCON2 Bits
2216 extern __at(0x0216) __sfr SSPCON2;
2218 typedef struct
2220 unsigned SEN : 1;
2221 unsigned RSEN : 1;
2222 unsigned PEN : 1;
2223 unsigned RCEN : 1;
2224 unsigned ACKEN : 1;
2225 unsigned ACKDT : 1;
2226 unsigned ACKSTAT : 1;
2227 unsigned GCEN : 1;
2228 } __SSPCON2bits_t;
2230 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2232 #define _SSPCON2_SEN 0x01
2233 #define _SSPCON2_RSEN 0x02
2234 #define _SSPCON2_PEN 0x04
2235 #define _SSPCON2_RCEN 0x08
2236 #define _SSPCON2_ACKEN 0x10
2237 #define _SSPCON2_ACKDT 0x20
2238 #define _SSPCON2_ACKSTAT 0x40
2239 #define _SSPCON2_GCEN 0x80
2241 //==============================================================================
2244 //==============================================================================
2245 // SSP1CON3 Bits
2247 extern __at(0x0217) __sfr SSP1CON3;
2249 typedef struct
2251 unsigned DHEN : 1;
2252 unsigned AHEN : 1;
2253 unsigned SBCDE : 1;
2254 unsigned SDAHT : 1;
2255 unsigned BOEN : 1;
2256 unsigned SCIE : 1;
2257 unsigned PCIE : 1;
2258 unsigned ACKTIM : 1;
2259 } __SSP1CON3bits_t;
2261 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2263 #define _DHEN 0x01
2264 #define _AHEN 0x02
2265 #define _SBCDE 0x04
2266 #define _SDAHT 0x08
2267 #define _BOEN 0x10
2268 #define _SCIE 0x20
2269 #define _PCIE 0x40
2270 #define _ACKTIM 0x80
2272 //==============================================================================
2275 //==============================================================================
2276 // SSPCON3 Bits
2278 extern __at(0x0217) __sfr SSPCON3;
2280 typedef struct
2282 unsigned DHEN : 1;
2283 unsigned AHEN : 1;
2284 unsigned SBCDE : 1;
2285 unsigned SDAHT : 1;
2286 unsigned BOEN : 1;
2287 unsigned SCIE : 1;
2288 unsigned PCIE : 1;
2289 unsigned ACKTIM : 1;
2290 } __SSPCON3bits_t;
2292 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2294 #define _SSPCON3_DHEN 0x01
2295 #define _SSPCON3_AHEN 0x02
2296 #define _SSPCON3_SBCDE 0x04
2297 #define _SSPCON3_SDAHT 0x08
2298 #define _SSPCON3_BOEN 0x10
2299 #define _SSPCON3_SCIE 0x20
2300 #define _SSPCON3_PCIE 0x40
2301 #define _SSPCON3_ACKTIM 0x80
2303 //==============================================================================
2306 //==============================================================================
2307 // ODCONA Bits
2309 extern __at(0x028C) __sfr ODCONA;
2311 typedef struct
2313 unsigned ODA0 : 1;
2314 unsigned ODA1 : 1;
2315 unsigned ODA2 : 1;
2316 unsigned : 1;
2317 unsigned ODA4 : 1;
2318 unsigned ODA5 : 1;
2319 unsigned : 1;
2320 unsigned : 1;
2321 } __ODCONAbits_t;
2323 extern __at(0x028C) volatile __ODCONAbits_t ODCONAbits;
2325 #define _ODA0 0x01
2326 #define _ODA1 0x02
2327 #define _ODA2 0x04
2328 #define _ODA4 0x10
2329 #define _ODA5 0x20
2331 //==============================================================================
2334 //==============================================================================
2335 // ODCONB Bits
2337 extern __at(0x028D) __sfr ODCONB;
2339 typedef struct
2341 unsigned : 1;
2342 unsigned : 1;
2343 unsigned : 1;
2344 unsigned : 1;
2345 unsigned ODB4 : 1;
2346 unsigned ODB5 : 1;
2347 unsigned ODB6 : 1;
2348 unsigned ODB7 : 1;
2349 } __ODCONBbits_t;
2351 extern __at(0x028D) volatile __ODCONBbits_t ODCONBbits;
2353 #define _ODB4 0x10
2354 #define _ODB5 0x20
2355 #define _ODB6 0x40
2356 #define _ODB7 0x80
2358 //==============================================================================
2361 //==============================================================================
2362 // ODCONC Bits
2364 extern __at(0x028E) __sfr ODCONC;
2366 typedef struct
2368 unsigned ODC0 : 1;
2369 unsigned ODC1 : 1;
2370 unsigned ODC2 : 1;
2371 unsigned ODC3 : 1;
2372 unsigned ODC4 : 1;
2373 unsigned ODC5 : 1;
2374 unsigned ODC6 : 1;
2375 unsigned ODC7 : 1;
2376 } __ODCONCbits_t;
2378 extern __at(0x028E) volatile __ODCONCbits_t ODCONCbits;
2380 #define _ODC0 0x01
2381 #define _ODC1 0x02
2382 #define _ODC2 0x04
2383 #define _ODC3 0x08
2384 #define _ODC4 0x10
2385 #define _ODC5 0x20
2386 #define _ODC6 0x40
2387 #define _ODC7 0x80
2389 //==============================================================================
2391 extern __at(0x0291) __sfr CCPR1;
2392 extern __at(0x0291) __sfr CCPR1L;
2393 extern __at(0x0292) __sfr CCPR1H;
2395 //==============================================================================
2396 // CCP1CON Bits
2398 extern __at(0x0293) __sfr CCP1CON;
2400 typedef union
2402 struct
2404 unsigned CCP1M0 : 1;
2405 unsigned CCP1M1 : 1;
2406 unsigned CCP1M2 : 1;
2407 unsigned CCP1M3 : 1;
2408 unsigned DC1B0 : 1;
2409 unsigned DC1B1 : 1;
2410 unsigned : 1;
2411 unsigned : 1;
2414 struct
2416 unsigned : 1;
2417 unsigned : 1;
2418 unsigned : 1;
2419 unsigned : 1;
2420 unsigned CCP1Y : 1;
2421 unsigned CCP1X : 1;
2422 unsigned : 1;
2423 unsigned : 1;
2426 struct
2428 unsigned CCP1M : 4;
2429 unsigned : 4;
2432 struct
2434 unsigned : 4;
2435 unsigned DC1B : 2;
2436 unsigned : 2;
2438 } __CCP1CONbits_t;
2440 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2442 #define _CCP1M0 0x01
2443 #define _CCP1M1 0x02
2444 #define _CCP1M2 0x04
2445 #define _CCP1M3 0x08
2446 #define _DC1B0 0x10
2447 #define _CCP1Y 0x10
2448 #define _DC1B1 0x20
2449 #define _CCP1X 0x20
2451 //==============================================================================
2454 //==============================================================================
2455 // ECCP1CON Bits
2457 extern __at(0x0293) __sfr ECCP1CON;
2459 typedef union
2461 struct
2463 unsigned CCP1M0 : 1;
2464 unsigned CCP1M1 : 1;
2465 unsigned CCP1M2 : 1;
2466 unsigned CCP1M3 : 1;
2467 unsigned DC1B0 : 1;
2468 unsigned DC1B1 : 1;
2469 unsigned : 1;
2470 unsigned : 1;
2473 struct
2475 unsigned : 1;
2476 unsigned : 1;
2477 unsigned : 1;
2478 unsigned : 1;
2479 unsigned CCP1Y : 1;
2480 unsigned CCP1X : 1;
2481 unsigned : 1;
2482 unsigned : 1;
2485 struct
2487 unsigned CCP1M : 4;
2488 unsigned : 4;
2491 struct
2493 unsigned : 4;
2494 unsigned DC1B : 2;
2495 unsigned : 2;
2497 } __ECCP1CONbits_t;
2499 extern __at(0x0293) volatile __ECCP1CONbits_t ECCP1CONbits;
2501 #define _ECCP1CON_CCP1M0 0x01
2502 #define _ECCP1CON_CCP1M1 0x02
2503 #define _ECCP1CON_CCP1M2 0x04
2504 #define _ECCP1CON_CCP1M3 0x08
2505 #define _ECCP1CON_DC1B0 0x10
2506 #define _ECCP1CON_CCP1Y 0x10
2507 #define _ECCP1CON_DC1B1 0x20
2508 #define _ECCP1CON_CCP1X 0x20
2510 //==============================================================================
2512 extern __at(0x0298) __sfr CCPR2;
2513 extern __at(0x0298) __sfr CCPR2L;
2514 extern __at(0x0299) __sfr CCPR2H;
2516 //==============================================================================
2517 // CCP2CON Bits
2519 extern __at(0x029A) __sfr CCP2CON;
2521 typedef union
2523 struct
2525 unsigned CCP2M0 : 1;
2526 unsigned CCP2M1 : 1;
2527 unsigned CCP2M2 : 1;
2528 unsigned CCP2M3 : 1;
2529 unsigned DC2B0 : 1;
2530 unsigned DC2B1 : 1;
2531 unsigned : 1;
2532 unsigned : 1;
2535 struct
2537 unsigned : 1;
2538 unsigned : 1;
2539 unsigned : 1;
2540 unsigned : 1;
2541 unsigned CCP2Y : 1;
2542 unsigned CCP2X : 1;
2543 unsigned : 1;
2544 unsigned : 1;
2547 struct
2549 unsigned CCP2M : 4;
2550 unsigned : 4;
2553 struct
2555 unsigned : 4;
2556 unsigned DC2B : 2;
2557 unsigned : 2;
2559 } __CCP2CONbits_t;
2561 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2563 #define _CCP2M0 0x01
2564 #define _CCP2M1 0x02
2565 #define _CCP2M2 0x04
2566 #define _CCP2M3 0x08
2567 #define _DC2B0 0x10
2568 #define _CCP2Y 0x10
2569 #define _DC2B1 0x20
2570 #define _CCP2X 0x20
2572 //==============================================================================
2575 //==============================================================================
2576 // ECCP2CON Bits
2578 extern __at(0x029A) __sfr ECCP2CON;
2580 typedef union
2582 struct
2584 unsigned CCP2M0 : 1;
2585 unsigned CCP2M1 : 1;
2586 unsigned CCP2M2 : 1;
2587 unsigned CCP2M3 : 1;
2588 unsigned DC2B0 : 1;
2589 unsigned DC2B1 : 1;
2590 unsigned : 1;
2591 unsigned : 1;
2594 struct
2596 unsigned : 1;
2597 unsigned : 1;
2598 unsigned : 1;
2599 unsigned : 1;
2600 unsigned CCP2Y : 1;
2601 unsigned CCP2X : 1;
2602 unsigned : 1;
2603 unsigned : 1;
2606 struct
2608 unsigned CCP2M : 4;
2609 unsigned : 4;
2612 struct
2614 unsigned : 4;
2615 unsigned DC2B : 2;
2616 unsigned : 2;
2618 } __ECCP2CONbits_t;
2620 extern __at(0x029A) volatile __ECCP2CONbits_t ECCP2CONbits;
2622 #define _ECCP2CON_CCP2M0 0x01
2623 #define _ECCP2CON_CCP2M1 0x02
2624 #define _ECCP2CON_CCP2M2 0x04
2625 #define _ECCP2CON_CCP2M3 0x08
2626 #define _ECCP2CON_DC2B0 0x10
2627 #define _ECCP2CON_CCP2Y 0x10
2628 #define _ECCP2CON_DC2B1 0x20
2629 #define _ECCP2CON_CCP2X 0x20
2631 //==============================================================================
2634 //==============================================================================
2635 // SLRCONA Bits
2637 extern __at(0x030C) __sfr SLRCONA;
2639 typedef struct
2641 unsigned SLRA0 : 1;
2642 unsigned SLRA1 : 1;
2643 unsigned SLRA2 : 1;
2644 unsigned : 1;
2645 unsigned SLRA4 : 1;
2646 unsigned SLRA5 : 1;
2647 unsigned : 1;
2648 unsigned : 1;
2649 } __SLRCONAbits_t;
2651 extern __at(0x030C) volatile __SLRCONAbits_t SLRCONAbits;
2653 #define _SLRA0 0x01
2654 #define _SLRA1 0x02
2655 #define _SLRA2 0x04
2656 #define _SLRA4 0x10
2657 #define _SLRA5 0x20
2659 //==============================================================================
2662 //==============================================================================
2663 // SLRCONB Bits
2665 extern __at(0x030D) __sfr SLRCONB;
2667 typedef struct
2669 unsigned : 1;
2670 unsigned : 1;
2671 unsigned : 1;
2672 unsigned : 1;
2673 unsigned SLRB4 : 1;
2674 unsigned SLRB5 : 1;
2675 unsigned SLRB6 : 1;
2676 unsigned SLRB7 : 1;
2677 } __SLRCONBbits_t;
2679 extern __at(0x030D) volatile __SLRCONBbits_t SLRCONBbits;
2681 #define _SLRB4 0x10
2682 #define _SLRB5 0x20
2683 #define _SLRB6 0x40
2684 #define _SLRB7 0x80
2686 //==============================================================================
2689 //==============================================================================
2690 // SLRCONC Bits
2692 extern __at(0x030E) __sfr SLRCONC;
2694 typedef struct
2696 unsigned SLRC0 : 1;
2697 unsigned SLRC1 : 1;
2698 unsigned SLRC2 : 1;
2699 unsigned SLRC3 : 1;
2700 unsigned SLRC4 : 1;
2701 unsigned SLRC5 : 1;
2702 unsigned SLRC6 : 1;
2703 unsigned SLRC7 : 1;
2704 } __SLRCONCbits_t;
2706 extern __at(0x030E) volatile __SLRCONCbits_t SLRCONCbits;
2708 #define _SLRC0 0x01
2709 #define _SLRC1 0x02
2710 #define _SLRC2 0x04
2711 #define _SLRC3 0x08
2712 #define _SLRC4 0x10
2713 #define _SLRC5 0x20
2714 #define _SLRC6 0x40
2715 #define _SLRC7 0x80
2717 //==============================================================================
2720 //==============================================================================
2721 // INLVLA Bits
2723 extern __at(0x038C) __sfr INLVLA;
2725 typedef union
2727 struct
2729 unsigned INLVLA0 : 1;
2730 unsigned INLVLA1 : 1;
2731 unsigned INLVLA2 : 1;
2732 unsigned INLVLA3 : 1;
2733 unsigned INLVLA4 : 1;
2734 unsigned INLVLA5 : 1;
2735 unsigned : 1;
2736 unsigned : 1;
2739 struct
2741 unsigned INLVLA : 6;
2742 unsigned : 2;
2744 } __INLVLAbits_t;
2746 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
2748 #define _INLVLA0 0x01
2749 #define _INLVLA1 0x02
2750 #define _INLVLA2 0x04
2751 #define _INLVLA3 0x08
2752 #define _INLVLA4 0x10
2753 #define _INLVLA5 0x20
2755 //==============================================================================
2758 //==============================================================================
2759 // INLVLB Bits
2761 extern __at(0x038D) __sfr INLVLB;
2763 typedef struct
2765 unsigned : 1;
2766 unsigned : 1;
2767 unsigned : 1;
2768 unsigned : 1;
2769 unsigned INLVLB4 : 1;
2770 unsigned INLVLB5 : 1;
2771 unsigned INLVLB6 : 1;
2772 unsigned INLVLB7 : 1;
2773 } __INLVLBbits_t;
2775 extern __at(0x038D) volatile __INLVLBbits_t INLVLBbits;
2777 #define _INLVLB4 0x10
2778 #define _INLVLB5 0x20
2779 #define _INLVLB6 0x40
2780 #define _INLVLB7 0x80
2782 //==============================================================================
2785 //==============================================================================
2786 // INLVLC Bits
2788 extern __at(0x038E) __sfr INLVLC;
2790 typedef struct
2792 unsigned INLVLC0 : 1;
2793 unsigned INLVLC1 : 1;
2794 unsigned INLVLC2 : 1;
2795 unsigned INLVLC3 : 1;
2796 unsigned INLVLC4 : 1;
2797 unsigned INLVLC5 : 1;
2798 unsigned INLVLC6 : 1;
2799 unsigned INLVLC7 : 1;
2800 } __INLVLCbits_t;
2802 extern __at(0x038E) volatile __INLVLCbits_t INLVLCbits;
2804 #define _INLVLC0 0x01
2805 #define _INLVLC1 0x02
2806 #define _INLVLC2 0x04
2807 #define _INLVLC3 0x08
2808 #define _INLVLC4 0x10
2809 #define _INLVLC5 0x20
2810 #define _INLVLC6 0x40
2811 #define _INLVLC7 0x80
2813 //==============================================================================
2816 //==============================================================================
2817 // IOCAP Bits
2819 extern __at(0x0391) __sfr IOCAP;
2821 typedef union
2823 struct
2825 unsigned IOCAP0 : 1;
2826 unsigned IOCAP1 : 1;
2827 unsigned IOCAP2 : 1;
2828 unsigned IOCAP3 : 1;
2829 unsigned IOCAP4 : 1;
2830 unsigned IOCAP5 : 1;
2831 unsigned : 1;
2832 unsigned : 1;
2835 struct
2837 unsigned IOCAP : 6;
2838 unsigned : 2;
2840 } __IOCAPbits_t;
2842 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
2844 #define _IOCAP0 0x01
2845 #define _IOCAP1 0x02
2846 #define _IOCAP2 0x04
2847 #define _IOCAP3 0x08
2848 #define _IOCAP4 0x10
2849 #define _IOCAP5 0x20
2851 //==============================================================================
2854 //==============================================================================
2855 // IOCAN Bits
2857 extern __at(0x0392) __sfr IOCAN;
2859 typedef union
2861 struct
2863 unsigned IOCAN0 : 1;
2864 unsigned IOCAN1 : 1;
2865 unsigned IOCAN2 : 1;
2866 unsigned IOCAN3 : 1;
2867 unsigned IOCAN4 : 1;
2868 unsigned IOCAN5 : 1;
2869 unsigned : 1;
2870 unsigned : 1;
2873 struct
2875 unsigned IOCAN : 6;
2876 unsigned : 2;
2878 } __IOCANbits_t;
2880 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
2882 #define _IOCAN0 0x01
2883 #define _IOCAN1 0x02
2884 #define _IOCAN2 0x04
2885 #define _IOCAN3 0x08
2886 #define _IOCAN4 0x10
2887 #define _IOCAN5 0x20
2889 //==============================================================================
2892 //==============================================================================
2893 // IOCAF Bits
2895 extern __at(0x0393) __sfr IOCAF;
2897 typedef union
2899 struct
2901 unsigned IOCAF0 : 1;
2902 unsigned IOCAF1 : 1;
2903 unsigned IOCAF2 : 1;
2904 unsigned IOCAF3 : 1;
2905 unsigned IOCAF4 : 1;
2906 unsigned IOCAF5 : 1;
2907 unsigned : 1;
2908 unsigned : 1;
2911 struct
2913 unsigned IOCAF : 6;
2914 unsigned : 2;
2916 } __IOCAFbits_t;
2918 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
2920 #define _IOCAF0 0x01
2921 #define _IOCAF1 0x02
2922 #define _IOCAF2 0x04
2923 #define _IOCAF3 0x08
2924 #define _IOCAF4 0x10
2925 #define _IOCAF5 0x20
2927 //==============================================================================
2930 //==============================================================================
2931 // IOCBP Bits
2933 extern __at(0x0394) __sfr IOCBP;
2935 typedef struct
2937 unsigned : 1;
2938 unsigned : 1;
2939 unsigned : 1;
2940 unsigned : 1;
2941 unsigned IOCBP4 : 1;
2942 unsigned IOCBP5 : 1;
2943 unsigned IOCBP6 : 1;
2944 unsigned IOCBP7 : 1;
2945 } __IOCBPbits_t;
2947 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
2949 #define _IOCBP4 0x10
2950 #define _IOCBP5 0x20
2951 #define _IOCBP6 0x40
2952 #define _IOCBP7 0x80
2954 //==============================================================================
2957 //==============================================================================
2958 // IOCBN Bits
2960 extern __at(0x0395) __sfr IOCBN;
2962 typedef struct
2964 unsigned : 1;
2965 unsigned : 1;
2966 unsigned : 1;
2967 unsigned : 1;
2968 unsigned IOCBN4 : 1;
2969 unsigned IOCBN5 : 1;
2970 unsigned IOCBN6 : 1;
2971 unsigned IOCBN7 : 1;
2972 } __IOCBNbits_t;
2974 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
2976 #define _IOCBN4 0x10
2977 #define _IOCBN5 0x20
2978 #define _IOCBN6 0x40
2979 #define _IOCBN7 0x80
2981 //==============================================================================
2984 //==============================================================================
2985 // IOCBF Bits
2987 extern __at(0x0396) __sfr IOCBF;
2989 typedef struct
2991 unsigned : 1;
2992 unsigned : 1;
2993 unsigned : 1;
2994 unsigned : 1;
2995 unsigned IOCBF4 : 1;
2996 unsigned IOCBF5 : 1;
2997 unsigned IOCBF6 : 1;
2998 unsigned IOCBF7 : 1;
2999 } __IOCBFbits_t;
3001 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3003 #define _IOCBF4 0x10
3004 #define _IOCBF5 0x20
3005 #define _IOCBF6 0x40
3006 #define _IOCBF7 0x80
3008 //==============================================================================
3011 //==============================================================================
3012 // IOCCP Bits
3014 extern __at(0x0397) __sfr IOCCP;
3016 typedef struct
3018 unsigned IOCCP0 : 1;
3019 unsigned IOCCP1 : 1;
3020 unsigned IOCCP2 : 1;
3021 unsigned IOCCP3 : 1;
3022 unsigned IOCCP4 : 1;
3023 unsigned IOCCP5 : 1;
3024 unsigned IOCCP6 : 1;
3025 unsigned IOCCP7 : 1;
3026 } __IOCCPbits_t;
3028 extern __at(0x0397) volatile __IOCCPbits_t IOCCPbits;
3030 #define _IOCCP0 0x01
3031 #define _IOCCP1 0x02
3032 #define _IOCCP2 0x04
3033 #define _IOCCP3 0x08
3034 #define _IOCCP4 0x10
3035 #define _IOCCP5 0x20
3036 #define _IOCCP6 0x40
3037 #define _IOCCP7 0x80
3039 //==============================================================================
3042 //==============================================================================
3043 // IOCCN Bits
3045 extern __at(0x0398) __sfr IOCCN;
3047 typedef struct
3049 unsigned IOCCN0 : 1;
3050 unsigned IOCCN1 : 1;
3051 unsigned IOCCN2 : 1;
3052 unsigned IOCCN3 : 1;
3053 unsigned IOCCN4 : 1;
3054 unsigned IOCCN5 : 1;
3055 unsigned IOCCN6 : 1;
3056 unsigned IOCCN7 : 1;
3057 } __IOCCNbits_t;
3059 extern __at(0x0398) volatile __IOCCNbits_t IOCCNbits;
3061 #define _IOCCN0 0x01
3062 #define _IOCCN1 0x02
3063 #define _IOCCN2 0x04
3064 #define _IOCCN3 0x08
3065 #define _IOCCN4 0x10
3066 #define _IOCCN5 0x20
3067 #define _IOCCN6 0x40
3068 #define _IOCCN7 0x80
3070 //==============================================================================
3073 //==============================================================================
3074 // IOCCF Bits
3076 extern __at(0x0399) __sfr IOCCF;
3078 typedef struct
3080 unsigned IOCCF0 : 1;
3081 unsigned IOCCF1 : 1;
3082 unsigned IOCCF2 : 1;
3083 unsigned IOCCF3 : 1;
3084 unsigned IOCCF4 : 1;
3085 unsigned IOCCF5 : 1;
3086 unsigned IOCCF6 : 1;
3087 unsigned IOCCF7 : 1;
3088 } __IOCCFbits_t;
3090 extern __at(0x0399) volatile __IOCCFbits_t IOCCFbits;
3092 #define _IOCCF0 0x01
3093 #define _IOCCF1 0x02
3094 #define _IOCCF2 0x04
3095 #define _IOCCF3 0x08
3096 #define _IOCCF4 0x10
3097 #define _IOCCF5 0x20
3098 #define _IOCCF6 0x40
3099 #define _IOCCF7 0x80
3101 //==============================================================================
3104 //==============================================================================
3105 // OPA1CON Bits
3107 extern __at(0x0511) __sfr OPA1CON;
3109 typedef union
3111 struct
3113 unsigned OPA1PCH0 : 1;
3114 unsigned OPA1PCH1 : 1;
3115 unsigned : 1;
3116 unsigned : 1;
3117 unsigned OPA1UG : 1;
3118 unsigned : 1;
3119 unsigned OPA1SP : 1;
3120 unsigned OPA1EN : 1;
3123 struct
3125 unsigned OPA1PCH : 2;
3126 unsigned : 6;
3128 } __OPA1CONbits_t;
3130 extern __at(0x0511) volatile __OPA1CONbits_t OPA1CONbits;
3132 #define _OPA1PCH0 0x01
3133 #define _OPA1PCH1 0x02
3134 #define _OPA1UG 0x10
3135 #define _OPA1SP 0x40
3136 #define _OPA1EN 0x80
3138 //==============================================================================
3141 //==============================================================================
3142 // OPA2CON Bits
3144 extern __at(0x0515) __sfr OPA2CON;
3146 typedef union
3148 struct
3150 unsigned OPA2PCH0 : 1;
3151 unsigned OPA2PCH1 : 1;
3152 unsigned : 1;
3153 unsigned : 1;
3154 unsigned OPA2UG : 1;
3155 unsigned : 1;
3156 unsigned OPA2SP : 1;
3157 unsigned OPA2EN : 1;
3160 struct
3162 unsigned OPA2PCH : 2;
3163 unsigned : 6;
3165 } __OPA2CONbits_t;
3167 extern __at(0x0515) volatile __OPA2CONbits_t OPA2CONbits;
3169 #define _OPA2PCH0 0x01
3170 #define _OPA2PCH1 0x02
3171 #define _OPA2UG 0x10
3172 #define _OPA2SP 0x40
3173 #define _OPA2EN 0x80
3175 //==============================================================================
3178 //==============================================================================
3179 // PPSLOCK Bits
3181 extern __at(0x0E0F) __sfr PPSLOCK;
3183 typedef struct
3185 unsigned PPSLOCKED : 1;
3186 unsigned : 1;
3187 unsigned : 1;
3188 unsigned : 1;
3189 unsigned : 1;
3190 unsigned : 1;
3191 unsigned : 1;
3192 unsigned : 1;
3193 } __PPSLOCKbits_t;
3195 extern __at(0x0E0F) volatile __PPSLOCKbits_t PPSLOCKbits;
3197 #define _PPSLOCKED 0x01
3199 //==============================================================================
3201 extern __at(0x0E10) __sfr INTPPS;
3202 extern __at(0x0E11) __sfr T0CKIPPS;
3203 extern __at(0x0E12) __sfr T1CKIPPS;
3204 extern __at(0x0E13) __sfr T1GPPS;
3205 extern __at(0x0E14) __sfr CCP1PPS;
3206 extern __at(0x0E15) __sfr CCP2PPS;
3207 extern __at(0x0E20) __sfr SSPCLKPPS;
3208 extern __at(0x0E21) __sfr SSPDATPPS;
3209 extern __at(0x0E22) __sfr SSPSSPPS;
3210 extern __at(0x0E90) __sfr RA0PPS;
3211 extern __at(0x0E91) __sfr RA1PPS;
3212 extern __at(0x0E92) __sfr RA2PPS;
3213 extern __at(0x0E94) __sfr RA4PPS;
3214 extern __at(0x0E95) __sfr RA5PPS;
3215 extern __at(0x0E9C) __sfr RB4PPS;
3216 extern __at(0x0E9D) __sfr RB5PPS;
3217 extern __at(0x0E9E) __sfr RB6PPS;
3218 extern __at(0x0E9F) __sfr RB7PPS;
3219 extern __at(0x0EA0) __sfr RC0PPS;
3220 extern __at(0x0EA1) __sfr RC1PPS;
3221 extern __at(0x0EA2) __sfr RC2PPS;
3222 extern __at(0x0EA3) __sfr RC3PPS;
3223 extern __at(0x0EA4) __sfr RC4PPS;
3224 extern __at(0x0EA5) __sfr RC5PPS;
3225 extern __at(0x0EA6) __sfr RC6PPS;
3226 extern __at(0x0EA7) __sfr RC7PPS;
3228 //==============================================================================
3229 // ICDBK0H Bits
3231 extern __at(0x0F9E) __sfr ICDBK0H;
3233 typedef struct
3235 unsigned BKA8 : 1;
3236 unsigned BKA9 : 1;
3237 unsigned BKA10 : 1;
3238 unsigned BKA11 : 1;
3239 unsigned BKA12 : 1;
3240 unsigned BKA13 : 1;
3241 unsigned BKA14 : 1;
3242 unsigned : 1;
3243 } __ICDBK0Hbits_t;
3245 extern __at(0x0F9E) volatile __ICDBK0Hbits_t ICDBK0Hbits;
3247 #define _BKA8 0x01
3248 #define _BKA9 0x02
3249 #define _BKA10 0x04
3250 #define _BKA11 0x08
3251 #define _BKA12 0x10
3252 #define _BKA13 0x20
3253 #define _BKA14 0x40
3255 //==============================================================================
3258 //==============================================================================
3259 // STATUS_SHAD Bits
3261 extern __at(0x0FE4) __sfr STATUS_SHAD;
3263 typedef struct
3265 unsigned C_SHAD : 1;
3266 unsigned DC_SHAD : 1;
3267 unsigned Z_SHAD : 1;
3268 unsigned : 1;
3269 unsigned : 1;
3270 unsigned : 1;
3271 unsigned : 1;
3272 unsigned : 1;
3273 } __STATUS_SHADbits_t;
3275 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
3277 #define _C_SHAD 0x01
3278 #define _DC_SHAD 0x02
3279 #define _Z_SHAD 0x04
3281 //==============================================================================
3283 extern __at(0x0FE5) __sfr WREG_SHAD;
3284 extern __at(0x0FE6) __sfr BSR_SHAD;
3285 extern __at(0x0FE7) __sfr PCLATH_SHAD;
3286 extern __at(0x0FE8) __sfr FSR0L_SHAD;
3287 extern __at(0x0FE9) __sfr FSR0H_SHAD;
3288 extern __at(0x0FEA) __sfr FSR1L_SHAD;
3289 extern __at(0x0FEB) __sfr FSR1H_SHAD;
3290 extern __at(0x0FED) __sfr STKPTR;
3291 extern __at(0x0FEE) __sfr TOSL;
3292 extern __at(0x0FEF) __sfr TOSH;
3294 //==============================================================================
3296 // Configuration Bits
3298 //==============================================================================
3300 #define _CONFIG1 0x8007
3301 #define _CONFIG2 0x8008
3303 //----------------------------- CONFIG1 Options -------------------------------
3305 #define _FOSC_INTOSC 0x3FFC // Internal HFINTOSC. I/O function on RA4 and RA5.
3306 #define _FOSC_ECL 0x3FFD // External oscillator, low power. I/O function on RA4.
3307 #define _FOSC_ECM 0x3FFE // External oscillator, medium power. I/O function on RA4.
3308 #define _FOSC_ECH 0x3FFF // External oscillator, high power. I/O function on RA4.
3309 #define _WDTE_OFF 0x3FE7 // WDT disabled.
3310 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
3311 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
3312 #define _WDTE_ON 0x3FFF // WDT enabled.
3313 #define _PWRTE_ON 0x3FDF // PWRT enabled.
3314 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
3315 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
3316 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
3317 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
3318 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
3319 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
3320 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
3321 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
3322 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
3323 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
3324 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
3326 //----------------------------- CONFIG2 Options -------------------------------
3328 #define _WRT_ALL 0x3FFC // 000h to 1FFFh write protected, no addresses may be modified by EECON control.
3329 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 1000h to 1FFFh may be modified by EECON control.
3330 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 1FFFh may be modified by EECON control.
3331 #define _WRT_OFF 0x3FFF // Write protection off.
3332 #define _PPS1WAY_OFF 0x3FFB // The PPSLOCK bit can be set and cleared repeatedly by software.
3333 #define _PPS1WAY_ON 0x3FFF // The PPSLOCK bit cannot be cleared once it is set by software.
3334 #define _ZCDDIS_OFF 0x3F7F // Zero-cross detect circuit is enabled at POR.
3335 #define _ZCDDIS_ON 0x3FFF // Zero-cross detect circuit is disabled at POR.
3336 #define _PLLEN_OFF 0x3EFF // 4x PLL is enabled when software sets the SPLLEN bit.
3337 #define _PLLEN_ON 0x3FFF // 4x PLL is always enabled.
3338 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
3339 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
3340 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
3341 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3342 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
3343 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
3344 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
3345 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
3346 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
3347 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
3349 //==============================================================================
3351 #define _DEVID1 0x8006
3353 #define _IDLOC0 0x8000
3354 #define _IDLOC1 0x8001
3355 #define _IDLOC2 0x8002
3356 #define _IDLOC3 0x8003
3358 //==============================================================================
3360 #ifndef NO_BIT_DEFINES
3362 #define ADON ADCON0bits.ADON // bit 0
3363 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
3364 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
3365 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
3366 #define CHS0 ADCON0bits.CHS0 // bit 2
3367 #define CHS1 ADCON0bits.CHS1 // bit 3
3368 #define CHS2 ADCON0bits.CHS2 // bit 4
3369 #define CHS3 ADCON0bits.CHS3 // bit 5
3370 #define CHS4 ADCON0bits.CHS4 // bit 6
3372 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
3373 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
3374 #define ADNREF ADCON1bits.ADNREF // bit 2
3375 #define ADFM ADCON1bits.ADFM // bit 7
3377 #define TRIGSEL0 ADCON2bits.TRIGSEL0 // bit 4
3378 #define TRIGSEL1 ADCON2bits.TRIGSEL1 // bit 5
3379 #define TRIGSEL2 ADCON2bits.TRIGSEL2 // bit 6
3380 #define TRIGSEL3 ADCON2bits.TRIGSEL3 // bit 7
3382 #define ANSA0 ANSELAbits.ANSA0 // bit 0
3383 #define ANSA1 ANSELAbits.ANSA1 // bit 1
3384 #define ANSA2 ANSELAbits.ANSA2 // bit 2
3385 #define ANSA4 ANSELAbits.ANSA4 // bit 4
3387 #define ANSB4 ANSELBbits.ANSB4 // bit 4
3388 #define ANSB5 ANSELBbits.ANSB5 // bit 5
3390 #define ANSC0 ANSELCbits.ANSC0 // bit 0
3391 #define ANSC1 ANSELCbits.ANSC1 // bit 1
3392 #define ANSC2 ANSELCbits.ANSC2 // bit 2
3393 #define ANSC3 ANSELCbits.ANSC3 // bit 3
3394 #define ANSC6 ANSELCbits.ANSC6 // bit 6
3395 #define ANSC7 ANSELCbits.ANSC7 // bit 7
3397 #define BORRDY BORCONbits.BORRDY // bit 0
3398 #define BORFS BORCONbits.BORFS // bit 6
3399 #define SBOREN BORCONbits.SBOREN // bit 7
3401 #define BSR0 BSRbits.BSR0 // bit 0
3402 #define BSR1 BSRbits.BSR1 // bit 1
3403 #define BSR2 BSRbits.BSR2 // bit 2
3404 #define BSR3 BSRbits.BSR3 // bit 3
3405 #define BSR4 BSRbits.BSR4 // bit 4
3407 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
3408 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
3409 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
3410 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
3411 #define DC1B0 CCP1CONbits.DC1B0 // bit 4, shadows bit in CCP1CONbits
3412 #define CCP1Y CCP1CONbits.CCP1Y // bit 4, shadows bit in CCP1CONbits
3413 #define DC1B1 CCP1CONbits.DC1B1 // bit 5, shadows bit in CCP1CONbits
3414 #define CCP1X CCP1CONbits.CCP1X // bit 5, shadows bit in CCP1CONbits
3416 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
3417 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
3418 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
3419 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
3420 #define DC2B0 CCP2CONbits.DC2B0 // bit 4, shadows bit in CCP2CONbits
3421 #define CCP2Y CCP2CONbits.CCP2Y // bit 4, shadows bit in CCP2CONbits
3422 #define DC2B1 CCP2CONbits.DC2B1 // bit 5, shadows bit in CCP2CONbits
3423 #define CCP2X CCP2CONbits.CCP2X // bit 5, shadows bit in CCP2CONbits
3425 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
3426 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
3427 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
3428 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
3429 #define TSRNG FVRCONbits.TSRNG // bit 4
3430 #define TSEN FVRCONbits.TSEN // bit 5
3431 #define FVRRDY FVRCONbits.FVRRDY // bit 6
3432 #define FVREN FVRCONbits.FVREN // bit 7
3434 #define BKA8 ICDBK0Hbits.BKA8 // bit 0
3435 #define BKA9 ICDBK0Hbits.BKA9 // bit 1
3436 #define BKA10 ICDBK0Hbits.BKA10 // bit 2
3437 #define BKA11 ICDBK0Hbits.BKA11 // bit 3
3438 #define BKA12 ICDBK0Hbits.BKA12 // bit 4
3439 #define BKA13 ICDBK0Hbits.BKA13 // bit 5
3440 #define BKA14 ICDBK0Hbits.BKA14 // bit 6
3442 #define INLVLA0 INLVLAbits.INLVLA0 // bit 0
3443 #define INLVLA1 INLVLAbits.INLVLA1 // bit 1
3444 #define INLVLA2 INLVLAbits.INLVLA2 // bit 2
3445 #define INLVLA3 INLVLAbits.INLVLA3 // bit 3
3446 #define INLVLA4 INLVLAbits.INLVLA4 // bit 4
3447 #define INLVLA5 INLVLAbits.INLVLA5 // bit 5
3449 #define INLVLB4 INLVLBbits.INLVLB4 // bit 4
3450 #define INLVLB5 INLVLBbits.INLVLB5 // bit 5
3451 #define INLVLB6 INLVLBbits.INLVLB6 // bit 6
3452 #define INLVLB7 INLVLBbits.INLVLB7 // bit 7
3454 #define INLVLC0 INLVLCbits.INLVLC0 // bit 0
3455 #define INLVLC1 INLVLCbits.INLVLC1 // bit 1
3456 #define INLVLC2 INLVLCbits.INLVLC2 // bit 2
3457 #define INLVLC3 INLVLCbits.INLVLC3 // bit 3
3458 #define INLVLC4 INLVLCbits.INLVLC4 // bit 4
3459 #define INLVLC5 INLVLCbits.INLVLC5 // bit 5
3460 #define INLVLC6 INLVLCbits.INLVLC6 // bit 6
3461 #define INLVLC7 INLVLCbits.INLVLC7 // bit 7
3463 #define IOCIF INTCONbits.IOCIF // bit 0
3464 #define INTF INTCONbits.INTF // bit 1
3465 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
3466 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
3467 #define IOCIE INTCONbits.IOCIE // bit 3
3468 #define INTE INTCONbits.INTE // bit 4
3469 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
3470 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
3471 #define PEIE INTCONbits.PEIE // bit 6
3472 #define GIE INTCONbits.GIE // bit 7
3474 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
3475 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
3476 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
3477 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
3478 #define IOCAF4 IOCAFbits.IOCAF4 // bit 4
3479 #define IOCAF5 IOCAFbits.IOCAF5 // bit 5
3481 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
3482 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
3483 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
3484 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
3485 #define IOCAN4 IOCANbits.IOCAN4 // bit 4
3486 #define IOCAN5 IOCANbits.IOCAN5 // bit 5
3488 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
3489 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
3490 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
3491 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
3492 #define IOCAP4 IOCAPbits.IOCAP4 // bit 4
3493 #define IOCAP5 IOCAPbits.IOCAP5 // bit 5
3495 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
3496 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
3497 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
3498 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
3500 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
3501 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
3502 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
3503 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
3505 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
3506 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
3507 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
3508 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
3510 #define IOCCF0 IOCCFbits.IOCCF0 // bit 0
3511 #define IOCCF1 IOCCFbits.IOCCF1 // bit 1
3512 #define IOCCF2 IOCCFbits.IOCCF2 // bit 2
3513 #define IOCCF3 IOCCFbits.IOCCF3 // bit 3
3514 #define IOCCF4 IOCCFbits.IOCCF4 // bit 4
3515 #define IOCCF5 IOCCFbits.IOCCF5 // bit 5
3516 #define IOCCF6 IOCCFbits.IOCCF6 // bit 6
3517 #define IOCCF7 IOCCFbits.IOCCF7 // bit 7
3519 #define IOCCN0 IOCCNbits.IOCCN0 // bit 0
3520 #define IOCCN1 IOCCNbits.IOCCN1 // bit 1
3521 #define IOCCN2 IOCCNbits.IOCCN2 // bit 2
3522 #define IOCCN3 IOCCNbits.IOCCN3 // bit 3
3523 #define IOCCN4 IOCCNbits.IOCCN4 // bit 4
3524 #define IOCCN5 IOCCNbits.IOCCN5 // bit 5
3525 #define IOCCN6 IOCCNbits.IOCCN6 // bit 6
3526 #define IOCCN7 IOCCNbits.IOCCN7 // bit 7
3528 #define IOCCP0 IOCCPbits.IOCCP0 // bit 0
3529 #define IOCCP1 IOCCPbits.IOCCP1 // bit 1
3530 #define IOCCP2 IOCCPbits.IOCCP2 // bit 2
3531 #define IOCCP3 IOCCPbits.IOCCP3 // bit 3
3532 #define IOCCP4 IOCCPbits.IOCCP4 // bit 4
3533 #define IOCCP5 IOCCPbits.IOCCP5 // bit 5
3534 #define IOCCP6 IOCCPbits.IOCCP6 // bit 6
3535 #define IOCCP7 IOCCPbits.IOCCP7 // bit 7
3537 #define LATA0 LATAbits.LATA0 // bit 0
3538 #define LATA1 LATAbits.LATA1 // bit 1
3539 #define LATA2 LATAbits.LATA2 // bit 2
3540 #define LATA4 LATAbits.LATA4 // bit 4
3541 #define LATA5 LATAbits.LATA5 // bit 5
3543 #define LATB4 LATBbits.LATB4 // bit 4
3544 #define LATB5 LATBbits.LATB5 // bit 5
3545 #define LATB6 LATBbits.LATB6 // bit 6
3546 #define LATB7 LATBbits.LATB7 // bit 7
3548 #define LATC0 LATCbits.LATC0 // bit 0
3549 #define LATC1 LATCbits.LATC1 // bit 1
3550 #define LATC2 LATCbits.LATC2 // bit 2
3551 #define LATC3 LATCbits.LATC3 // bit 3
3552 #define LATC4 LATCbits.LATC4 // bit 4
3553 #define LATC5 LATCbits.LATC5 // bit 5
3554 #define LATC6 LATCbits.LATC6 // bit 6
3555 #define LATC7 LATCbits.LATC7 // bit 7
3557 #define ODA0 ODCONAbits.ODA0 // bit 0
3558 #define ODA1 ODCONAbits.ODA1 // bit 1
3559 #define ODA2 ODCONAbits.ODA2 // bit 2
3560 #define ODA4 ODCONAbits.ODA4 // bit 4
3561 #define ODA5 ODCONAbits.ODA5 // bit 5
3563 #define ODB4 ODCONBbits.ODB4 // bit 4
3564 #define ODB5 ODCONBbits.ODB5 // bit 5
3565 #define ODB6 ODCONBbits.ODB6 // bit 6
3566 #define ODB7 ODCONBbits.ODB7 // bit 7
3568 #define ODC0 ODCONCbits.ODC0 // bit 0
3569 #define ODC1 ODCONCbits.ODC1 // bit 1
3570 #define ODC2 ODCONCbits.ODC2 // bit 2
3571 #define ODC3 ODCONCbits.ODC3 // bit 3
3572 #define ODC4 ODCONCbits.ODC4 // bit 4
3573 #define ODC5 ODCONCbits.ODC5 // bit 5
3574 #define ODC6 ODCONCbits.ODC6 // bit 6
3575 #define ODC7 ODCONCbits.ODC7 // bit 7
3577 #define OPA1PCH0 OPA1CONbits.OPA1PCH0 // bit 0
3578 #define OPA1PCH1 OPA1CONbits.OPA1PCH1 // bit 1
3579 #define OPA1UG OPA1CONbits.OPA1UG // bit 4
3580 #define OPA1SP OPA1CONbits.OPA1SP // bit 6
3581 #define OPA1EN OPA1CONbits.OPA1EN // bit 7
3583 #define OPA2PCH0 OPA2CONbits.OPA2PCH0 // bit 0
3584 #define OPA2PCH1 OPA2CONbits.OPA2PCH1 // bit 1
3585 #define OPA2UG OPA2CONbits.OPA2UG // bit 4
3586 #define OPA2SP OPA2CONbits.OPA2SP // bit 6
3587 #define OPA2EN OPA2CONbits.OPA2EN // bit 7
3589 #define PS0 OPTION_REGbits.PS0 // bit 0
3590 #define PS1 OPTION_REGbits.PS1 // bit 1
3591 #define PS2 OPTION_REGbits.PS2 // bit 2
3592 #define PSA OPTION_REGbits.PSA // bit 3
3593 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
3594 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
3595 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
3596 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
3597 #define INTEDG OPTION_REGbits.INTEDG // bit 6
3598 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
3600 #define SCS0 OSCCONbits.SCS0 // bit 0
3601 #define SCS1 OSCCONbits.SCS1 // bit 1
3602 #define IRCF0 OSCCONbits.IRCF0 // bit 3
3603 #define IRCF1 OSCCONbits.IRCF1 // bit 4
3604 #define IRCF2 OSCCONbits.IRCF2 // bit 5
3605 #define IRCF3 OSCCONbits.IRCF3 // bit 6
3606 #define SPLLEN OSCCONbits.SPLLEN // bit 7
3608 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
3609 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
3610 #define MFIOFR OSCSTATbits.MFIOFR // bit 2
3611 #define HFIOFL OSCSTATbits.HFIOFL // bit 3
3612 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
3613 #define OSTS OSCSTATbits.OSTS // bit 5
3614 #define PLLR OSCSTATbits.PLLR // bit 6
3615 #define SOSCR OSCSTATbits.SOSCR // bit 7
3617 #define TUN0 OSCTUNEbits.TUN0 // bit 0
3618 #define TUN1 OSCTUNEbits.TUN1 // bit 1
3619 #define TUN2 OSCTUNEbits.TUN2 // bit 2
3620 #define TUN3 OSCTUNEbits.TUN3 // bit 3
3621 #define TUN4 OSCTUNEbits.TUN4 // bit 4
3622 #define TUN5 OSCTUNEbits.TUN5 // bit 5
3624 #define NOT_BOR PCONbits.NOT_BOR // bit 0
3625 #define NOT_POR PCONbits.NOT_POR // bit 1
3626 #define NOT_RI PCONbits.NOT_RI // bit 2
3627 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
3628 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
3629 #define STKUNF PCONbits.STKUNF // bit 6
3630 #define STKOVF PCONbits.STKOVF // bit 7
3632 #define TMR1IE PIE1bits.TMR1IE // bit 0
3633 #define TMR2IE PIE1bits.TMR2IE // bit 1
3634 #define CCP1IE PIE1bits.CCP1IE // bit 2, shadows bit in PIE1bits
3635 #define CCPIE PIE1bits.CCPIE // bit 2, shadows bit in PIE1bits
3636 #define SSP1IE PIE1bits.SSP1IE // bit 3
3637 #define ADIE PIE1bits.ADIE // bit 6
3638 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
3640 #define CCP2IE PIE2bits.CCP2IE // bit 0
3641 #define BCL1IE PIE2bits.BCL1IE // bit 3
3643 #define ZCDIE PIE3bits.ZCDIE // bit 4
3645 #define TMR1IF PIR1bits.TMR1IF // bit 0
3646 #define TMR2IF PIR1bits.TMR2IF // bit 1
3647 #define CCP1IF PIR1bits.CCP1IF // bit 2, shadows bit in PIR1bits
3648 #define CCPIF PIR1bits.CCPIF // bit 2, shadows bit in PIR1bits
3649 #define SSP1IF PIR1bits.SSP1IF // bit 3
3650 #define ADIF PIR1bits.ADIF // bit 6
3651 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
3653 #define CCP2IF PIR2bits.CCP2IF // bit 0
3654 #define BCL1IF PIR2bits.BCL1IF // bit 3
3656 #define ZCDIF PIR3bits.ZCDIF // bit 4
3658 #define RD PMCON1bits.RD // bit 0
3659 #define WR PMCON1bits.WR // bit 1
3660 #define WREN PMCON1bits.WREN // bit 2
3661 #define WRERR PMCON1bits.WRERR // bit 3
3662 #define FREE PMCON1bits.FREE // bit 4
3663 #define LWLO PMCON1bits.LWLO // bit 5
3664 #define CFGS PMCON1bits.CFGS // bit 6
3666 #define RA0 PORTAbits.RA0 // bit 0
3667 #define RA1 PORTAbits.RA1 // bit 1
3668 #define RA2 PORTAbits.RA2 // bit 2
3669 #define RA3 PORTAbits.RA3 // bit 3
3670 #define RA4 PORTAbits.RA4 // bit 4
3671 #define RA5 PORTAbits.RA5 // bit 5
3673 #define RB4 PORTBbits.RB4 // bit 4
3674 #define RB5 PORTBbits.RB5 // bit 5
3675 #define RB6 PORTBbits.RB6 // bit 6
3676 #define RB7 PORTBbits.RB7 // bit 7
3678 #define RC0 PORTCbits.RC0 // bit 0
3679 #define RC1 PORTCbits.RC1 // bit 1
3680 #define RC2 PORTCbits.RC2 // bit 2
3681 #define RC3 PORTCbits.RC3 // bit 3
3682 #define RC4 PORTCbits.RC4 // bit 4
3683 #define RC5 PORTCbits.RC5 // bit 5
3684 #define RC6 PORTCbits.RC6 // bit 6
3685 #define RC7 PORTCbits.RC7 // bit 7
3687 #define PPSLOCKED PPSLOCKbits.PPSLOCKED // bit 0
3689 #define SLRA0 SLRCONAbits.SLRA0 // bit 0
3690 #define SLRA1 SLRCONAbits.SLRA1 // bit 1
3691 #define SLRA2 SLRCONAbits.SLRA2 // bit 2
3692 #define SLRA4 SLRCONAbits.SLRA4 // bit 4
3693 #define SLRA5 SLRCONAbits.SLRA5 // bit 5
3695 #define SLRB4 SLRCONBbits.SLRB4 // bit 4
3696 #define SLRB5 SLRCONBbits.SLRB5 // bit 5
3697 #define SLRB6 SLRCONBbits.SLRB6 // bit 6
3698 #define SLRB7 SLRCONBbits.SLRB7 // bit 7
3700 #define SLRC0 SLRCONCbits.SLRC0 // bit 0
3701 #define SLRC1 SLRCONCbits.SLRC1 // bit 1
3702 #define SLRC2 SLRCONCbits.SLRC2 // bit 2
3703 #define SLRC3 SLRCONCbits.SLRC3 // bit 3
3704 #define SLRC4 SLRCONCbits.SLRC4 // bit 4
3705 #define SLRC5 SLRCONCbits.SLRC5 // bit 5
3706 #define SLRC6 SLRCONCbits.SLRC6 // bit 6
3707 #define SLRC7 SLRCONCbits.SLRC7 // bit 7
3709 #define SSP1ADD0 SSP1ADDbits.SSP1ADD0 // bit 0, shadows bit in SSP1ADDbits
3710 #define ADD0 SSP1ADDbits.ADD0 // bit 0, shadows bit in SSP1ADDbits
3711 #define SSP1ADD1 SSP1ADDbits.SSP1ADD1 // bit 1, shadows bit in SSP1ADDbits
3712 #define ADD1 SSP1ADDbits.ADD1 // bit 1, shadows bit in SSP1ADDbits
3713 #define SSP1ADD2 SSP1ADDbits.SSP1ADD2 // bit 2, shadows bit in SSP1ADDbits
3714 #define ADD2 SSP1ADDbits.ADD2 // bit 2, shadows bit in SSP1ADDbits
3715 #define SSP1ADD3 SSP1ADDbits.SSP1ADD3 // bit 3, shadows bit in SSP1ADDbits
3716 #define ADD3 SSP1ADDbits.ADD3 // bit 3, shadows bit in SSP1ADDbits
3717 #define SSP1ADD4 SSP1ADDbits.SSP1ADD4 // bit 4, shadows bit in SSP1ADDbits
3718 #define ADD4 SSP1ADDbits.ADD4 // bit 4, shadows bit in SSP1ADDbits
3719 #define SSP1ADD5 SSP1ADDbits.SSP1ADD5 // bit 5, shadows bit in SSP1ADDbits
3720 #define ADD5 SSP1ADDbits.ADD5 // bit 5, shadows bit in SSP1ADDbits
3721 #define SSP1ADD6 SSP1ADDbits.SSP1ADD6 // bit 6, shadows bit in SSP1ADDbits
3722 #define ADD6 SSP1ADDbits.ADD6 // bit 6, shadows bit in SSP1ADDbits
3723 #define SSP1ADD7 SSP1ADDbits.SSP1ADD7 // bit 7, shadows bit in SSP1ADDbits
3724 #define ADD7 SSP1ADDbits.ADD7 // bit 7, shadows bit in SSP1ADDbits
3726 #define SSP1BUF0 SSP1BUFbits.SSP1BUF0 // bit 0, shadows bit in SSP1BUFbits
3727 #define BUF0 SSP1BUFbits.BUF0 // bit 0, shadows bit in SSP1BUFbits
3728 #define SSP1BUF1 SSP1BUFbits.SSP1BUF1 // bit 1, shadows bit in SSP1BUFbits
3729 #define BUF1 SSP1BUFbits.BUF1 // bit 1, shadows bit in SSP1BUFbits
3730 #define SSP1BUF2 SSP1BUFbits.SSP1BUF2 // bit 2, shadows bit in SSP1BUFbits
3731 #define BUF2 SSP1BUFbits.BUF2 // bit 2, shadows bit in SSP1BUFbits
3732 #define SSP1BUF3 SSP1BUFbits.SSP1BUF3 // bit 3, shadows bit in SSP1BUFbits
3733 #define BUF3 SSP1BUFbits.BUF3 // bit 3, shadows bit in SSP1BUFbits
3734 #define SSP1BUF4 SSP1BUFbits.SSP1BUF4 // bit 4, shadows bit in SSP1BUFbits
3735 #define BUF4 SSP1BUFbits.BUF4 // bit 4, shadows bit in SSP1BUFbits
3736 #define SSP1BUF5 SSP1BUFbits.SSP1BUF5 // bit 5, shadows bit in SSP1BUFbits
3737 #define BUF5 SSP1BUFbits.BUF5 // bit 5, shadows bit in SSP1BUFbits
3738 #define SSP1BUF6 SSP1BUFbits.SSP1BUF6 // bit 6, shadows bit in SSP1BUFbits
3739 #define BUF6 SSP1BUFbits.BUF6 // bit 6, shadows bit in SSP1BUFbits
3740 #define SSP1BUF7 SSP1BUFbits.SSP1BUF7 // bit 7, shadows bit in SSP1BUFbits
3741 #define BUF7 SSP1BUFbits.BUF7 // bit 7, shadows bit in SSP1BUFbits
3743 #define SSPM0 SSP1CONbits.SSPM0 // bit 0
3744 #define SSPM1 SSP1CONbits.SSPM1 // bit 1
3745 #define SSPM2 SSP1CONbits.SSPM2 // bit 2
3746 #define SSPM3 SSP1CONbits.SSPM3 // bit 3
3747 #define CKP SSP1CONbits.CKP // bit 4
3748 #define SSPEN SSP1CONbits.SSPEN // bit 5
3749 #define SSPOV SSP1CONbits.SSPOV // bit 6
3750 #define WCOL SSP1CONbits.WCOL // bit 7
3752 #define SEN SSP1CON2bits.SEN // bit 0
3753 #define RSEN SSP1CON2bits.RSEN // bit 1
3754 #define PEN SSP1CON2bits.PEN // bit 2
3755 #define RCEN SSP1CON2bits.RCEN // bit 3
3756 #define ACKEN SSP1CON2bits.ACKEN // bit 4
3757 #define ACKDT SSP1CON2bits.ACKDT // bit 5
3758 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
3759 #define GCEN SSP1CON2bits.GCEN // bit 7
3761 #define DHEN SSP1CON3bits.DHEN // bit 0
3762 #define AHEN SSP1CON3bits.AHEN // bit 1
3763 #define SBCDE SSP1CON3bits.SBCDE // bit 2
3764 #define SDAHT SSP1CON3bits.SDAHT // bit 3
3765 #define BOEN SSP1CON3bits.BOEN // bit 4
3766 #define SCIE SSP1CON3bits.SCIE // bit 5
3767 #define PCIE SSP1CON3bits.PCIE // bit 6
3768 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
3770 #define SSP1MSK0 SSP1MSKbits.SSP1MSK0 // bit 0, shadows bit in SSP1MSKbits
3771 #define MSK0 SSP1MSKbits.MSK0 // bit 0, shadows bit in SSP1MSKbits
3772 #define SSP1MSK1 SSP1MSKbits.SSP1MSK1 // bit 1, shadows bit in SSP1MSKbits
3773 #define MSK1 SSP1MSKbits.MSK1 // bit 1, shadows bit in SSP1MSKbits
3774 #define SSP1MSK2 SSP1MSKbits.SSP1MSK2 // bit 2, shadows bit in SSP1MSKbits
3775 #define MSK2 SSP1MSKbits.MSK2 // bit 2, shadows bit in SSP1MSKbits
3776 #define SSP1MSK3 SSP1MSKbits.SSP1MSK3 // bit 3, shadows bit in SSP1MSKbits
3777 #define MSK3 SSP1MSKbits.MSK3 // bit 3, shadows bit in SSP1MSKbits
3778 #define SSP1MSK4 SSP1MSKbits.SSP1MSK4 // bit 4, shadows bit in SSP1MSKbits
3779 #define MSK4 SSP1MSKbits.MSK4 // bit 4, shadows bit in SSP1MSKbits
3780 #define SSP1MSK5 SSP1MSKbits.SSP1MSK5 // bit 5, shadows bit in SSP1MSKbits
3781 #define MSK5 SSP1MSKbits.MSK5 // bit 5, shadows bit in SSP1MSKbits
3782 #define SSP1MSK6 SSP1MSKbits.SSP1MSK6 // bit 6, shadows bit in SSP1MSKbits
3783 #define MSK6 SSP1MSKbits.MSK6 // bit 6, shadows bit in SSP1MSKbits
3784 #define SSP1MSK7 SSP1MSKbits.SSP1MSK7 // bit 7, shadows bit in SSP1MSKbits
3785 #define MSK7 SSP1MSKbits.MSK7 // bit 7, shadows bit in SSP1MSKbits
3787 #define BF SSP1STATbits.BF // bit 0
3788 #define UA SSP1STATbits.UA // bit 1
3789 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
3790 #define S SSP1STATbits.S // bit 3
3791 #define P SSP1STATbits.P // bit 4
3792 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
3793 #define CKE SSP1STATbits.CKE // bit 6
3794 #define SMP SSP1STATbits.SMP // bit 7
3796 #define C STATUSbits.C // bit 0
3797 #define DC STATUSbits.DC // bit 1
3798 #define Z STATUSbits.Z // bit 2
3799 #define NOT_PD STATUSbits.NOT_PD // bit 3
3800 #define NOT_TO STATUSbits.NOT_TO // bit 4
3802 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
3803 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
3804 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
3806 #define TMR1ON T1CONbits.TMR1ON // bit 0
3807 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
3808 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
3809 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
3810 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
3811 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
3812 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
3814 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
3815 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
3816 #define T1GVAL T1GCONbits.T1GVAL // bit 2
3817 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
3818 #define T1GSPM T1GCONbits.T1GSPM // bit 4
3819 #define T1GTM T1GCONbits.T1GTM // bit 5
3820 #define T1GPOL T1GCONbits.T1GPOL // bit 6
3821 #define TMR1GE T1GCONbits.TMR1GE // bit 7
3823 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
3824 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
3825 #define TMR2ON T2CONbits.TMR2ON // bit 2
3826 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
3827 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
3828 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
3829 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
3831 #define TRISA0 TRISAbits.TRISA0 // bit 0
3832 #define TRISA1 TRISAbits.TRISA1 // bit 1
3833 #define TRISA2 TRISAbits.TRISA2 // bit 2
3834 #define TRISA4 TRISAbits.TRISA4 // bit 4
3835 #define TRISA5 TRISAbits.TRISA5 // bit 5
3837 #define TRISB4 TRISBbits.TRISB4 // bit 4
3838 #define TRISB5 TRISBbits.TRISB5 // bit 5
3839 #define TRISB6 TRISBbits.TRISB6 // bit 6
3840 #define TRISB7 TRISBbits.TRISB7 // bit 7
3842 #define TRISC0 TRISCbits.TRISC0 // bit 0
3843 #define TRISC1 TRISCbits.TRISC1 // bit 1
3844 #define TRISC2 TRISCbits.TRISC2 // bit 2
3845 #define TRISC3 TRISCbits.TRISC3 // bit 3
3846 #define TRISC4 TRISCbits.TRISC4 // bit 4
3847 #define TRISC5 TRISCbits.TRISC5 // bit 5
3848 #define TRISC6 TRISCbits.TRISC6 // bit 6
3849 #define TRISC7 TRISCbits.TRISC7 // bit 7
3851 #define Reserved VREGCONbits.Reserved // bit 0
3852 #define VREGPM VREGCONbits.VREGPM // bit 1
3854 #define SWDTEN WDTCONbits.SWDTEN // bit 0
3855 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
3856 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
3857 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
3858 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
3859 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
3861 #define WPUA0 WPUAbits.WPUA0 // bit 0
3862 #define WPUA1 WPUAbits.WPUA1 // bit 1
3863 #define WPUA2 WPUAbits.WPUA2 // bit 2
3864 #define WPUA3 WPUAbits.WPUA3 // bit 3
3865 #define WPUA4 WPUAbits.WPUA4 // bit 4
3866 #define WPUA5 WPUAbits.WPUA5 // bit 5
3868 #define WPUB4 WPUBbits.WPUB4 // bit 4
3869 #define WPUB5 WPUBbits.WPUB5 // bit 5
3870 #define WPUB6 WPUBbits.WPUB6 // bit 6
3871 #define WPUB7 WPUBbits.WPUB7 // bit 7
3873 #define WPUC0 WPUCbits.WPUC0 // bit 0
3874 #define WPUC1 WPUCbits.WPUC1 // bit 1
3875 #define WPUC2 WPUCbits.WPUC2 // bit 2
3876 #define WPUC3 WPUCbits.WPUC3 // bit 3
3877 #define WPUC4 WPUCbits.WPUC4 // bit 4
3878 #define WPUC5 WPUCbits.WPUC5 // bit 5
3879 #define WPUC6 WPUCbits.WPUC6 // bit 6
3880 #define WPUC7 WPUCbits.WPUC7 // bit 7
3882 #define ZCD1INTN ZCD1CONbits.ZCD1INTN // bit 0
3883 #define ZCD1INTP ZCD1CONbits.ZCD1INTP // bit 1
3884 #define ZCD1POL ZCD1CONbits.ZCD1POL // bit 4
3885 #define ZCD1OUT ZCD1CONbits.ZCD1OUT // bit 5
3886 #define ZCD1EN ZCD1CONbits.ZCD1EN // bit 7
3888 #endif // #ifndef NO_BIT_DEFINES
3890 #endif // #ifndef __PIC16F1707_H__