struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16lf1707.h
blob91cde314e31b5c50128bb6ddc0950d5394a8646a
1 /*
2 * This declarations of the PIC16LF1707 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 __PIC16LF1707_H__
26 #define __PIC16LF1707_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 WPUA_ADDR 0x020C
101 #define WPUB_ADDR 0x020D
102 #define WPUC_ADDR 0x020E
103 #define SSP1BUF_ADDR 0x0211
104 #define SSPBUF_ADDR 0x0211
105 #define SSP1ADD_ADDR 0x0212
106 #define SSPADD_ADDR 0x0212
107 #define SSP1MSK_ADDR 0x0213
108 #define SSPMSK_ADDR 0x0213
109 #define SSP1STAT_ADDR 0x0214
110 #define SSPSTAT_ADDR 0x0214
111 #define SSP1CON_ADDR 0x0215
112 #define SSP1CON1_ADDR 0x0215
113 #define SSPCON_ADDR 0x0215
114 #define SSPCON1_ADDR 0x0215
115 #define SSP1CON2_ADDR 0x0216
116 #define SSPCON2_ADDR 0x0216
117 #define SSP1CON3_ADDR 0x0217
118 #define SSPCON3_ADDR 0x0217
119 #define ODCONA_ADDR 0x028C
120 #define ODCONB_ADDR 0x028D
121 #define ODCONC_ADDR 0x028E
122 #define CCPR1_ADDR 0x0291
123 #define CCPR1L_ADDR 0x0291
124 #define CCPR1H_ADDR 0x0292
125 #define CCP1CON_ADDR 0x0293
126 #define ECCP1CON_ADDR 0x0293
127 #define CCPR2_ADDR 0x0298
128 #define CCPR2L_ADDR 0x0298
129 #define CCPR2H_ADDR 0x0299
130 #define CCP2CON_ADDR 0x029A
131 #define ECCP2CON_ADDR 0x029A
132 #define SLRCONA_ADDR 0x030C
133 #define SLRCONB_ADDR 0x030D
134 #define SLRCONC_ADDR 0x030E
135 #define INLVLA_ADDR 0x038C
136 #define INLVLB_ADDR 0x038D
137 #define INLVLC_ADDR 0x038E
138 #define IOCAP_ADDR 0x0391
139 #define IOCAN_ADDR 0x0392
140 #define IOCAF_ADDR 0x0393
141 #define IOCBP_ADDR 0x0394
142 #define IOCBN_ADDR 0x0395
143 #define IOCBF_ADDR 0x0396
144 #define IOCCP_ADDR 0x0397
145 #define IOCCN_ADDR 0x0398
146 #define IOCCF_ADDR 0x0399
147 #define OPA1CON_ADDR 0x0511
148 #define OPA2CON_ADDR 0x0515
149 #define PPSLOCK_ADDR 0x0E0F
150 #define INTPPS_ADDR 0x0E10
151 #define T0CKIPPS_ADDR 0x0E11
152 #define T1CKIPPS_ADDR 0x0E12
153 #define T1GPPS_ADDR 0x0E13
154 #define CCP1PPS_ADDR 0x0E14
155 #define CCP2PPS_ADDR 0x0E15
156 #define SSPCLKPPS_ADDR 0x0E20
157 #define SSPDATPPS_ADDR 0x0E21
158 #define SSPSSPPS_ADDR 0x0E22
159 #define RA0PPS_ADDR 0x0E90
160 #define RA1PPS_ADDR 0x0E91
161 #define RA2PPS_ADDR 0x0E92
162 #define RA4PPS_ADDR 0x0E94
163 #define RA5PPS_ADDR 0x0E95
164 #define RB4PPS_ADDR 0x0E9C
165 #define RB5PPS_ADDR 0x0E9D
166 #define RB6PPS_ADDR 0x0E9E
167 #define RB7PPS_ADDR 0x0E9F
168 #define RC0PPS_ADDR 0x0EA0
169 #define RC1PPS_ADDR 0x0EA1
170 #define RC2PPS_ADDR 0x0EA2
171 #define RC3PPS_ADDR 0x0EA3
172 #define RC4PPS_ADDR 0x0EA4
173 #define RC5PPS_ADDR 0x0EA5
174 #define RC6PPS_ADDR 0x0EA6
175 #define RC7PPS_ADDR 0x0EA7
176 #define ICDBK0H_ADDR 0x0F9E
177 #define STATUS_SHAD_ADDR 0x0FE4
178 #define WREG_SHAD_ADDR 0x0FE5
179 #define BSR_SHAD_ADDR 0x0FE6
180 #define PCLATH_SHAD_ADDR 0x0FE7
181 #define FSR0L_SHAD_ADDR 0x0FE8
182 #define FSR0H_SHAD_ADDR 0x0FE9
183 #define FSR1L_SHAD_ADDR 0x0FEA
184 #define FSR1H_SHAD_ADDR 0x0FEB
185 #define STKPTR_ADDR 0x0FED
186 #define TOSL_ADDR 0x0FEE
187 #define TOSH_ADDR 0x0FEF
189 #endif // #ifndef NO_ADDR_DEFINES
191 //==============================================================================
193 // Register Definitions
195 //==============================================================================
197 extern __at(0x0000) __sfr INDF0;
198 extern __at(0x0001) __sfr INDF1;
199 extern __at(0x0002) __sfr PCL;
201 //==============================================================================
202 // STATUS Bits
204 extern __at(0x0003) __sfr STATUS;
206 typedef struct
208 unsigned C : 1;
209 unsigned DC : 1;
210 unsigned Z : 1;
211 unsigned NOT_PD : 1;
212 unsigned NOT_TO : 1;
213 unsigned : 1;
214 unsigned : 1;
215 unsigned : 1;
216 } __STATUSbits_t;
218 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
220 #define _C 0x01
221 #define _DC 0x02
222 #define _Z 0x04
223 #define _NOT_PD 0x08
224 #define _NOT_TO 0x10
226 //==============================================================================
228 extern __at(0x0004) __sfr FSR0;
229 extern __at(0x0004) __sfr FSR0L;
230 extern __at(0x0005) __sfr FSR0H;
231 extern __at(0x0006) __sfr FSR1;
232 extern __at(0x0006) __sfr FSR1L;
233 extern __at(0x0007) __sfr FSR1H;
235 //==============================================================================
236 // BSR Bits
238 extern __at(0x0008) __sfr BSR;
240 typedef union
242 struct
244 unsigned BSR0 : 1;
245 unsigned BSR1 : 1;
246 unsigned BSR2 : 1;
247 unsigned BSR3 : 1;
248 unsigned BSR4 : 1;
249 unsigned : 1;
250 unsigned : 1;
251 unsigned : 1;
254 struct
256 unsigned BSR : 5;
257 unsigned : 3;
259 } __BSRbits_t;
261 extern __at(0x0008) volatile __BSRbits_t BSRbits;
263 #define _BSR0 0x01
264 #define _BSR1 0x02
265 #define _BSR2 0x04
266 #define _BSR3 0x08
267 #define _BSR4 0x10
269 //==============================================================================
271 extern __at(0x0009) __sfr WREG;
272 extern __at(0x000A) __sfr PCLATH;
274 //==============================================================================
275 // INTCON Bits
277 extern __at(0x000B) __sfr INTCON;
279 typedef union
281 struct
283 unsigned IOCIF : 1;
284 unsigned INTF : 1;
285 unsigned TMR0IF : 1;
286 unsigned IOCIE : 1;
287 unsigned INTE : 1;
288 unsigned TMR0IE : 1;
289 unsigned PEIE : 1;
290 unsigned GIE : 1;
293 struct
295 unsigned : 1;
296 unsigned : 1;
297 unsigned T0IF : 1;
298 unsigned : 1;
299 unsigned : 1;
300 unsigned T0IE : 1;
301 unsigned : 1;
302 unsigned : 1;
304 } __INTCONbits_t;
306 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
308 #define _IOCIF 0x01
309 #define _INTF 0x02
310 #define _TMR0IF 0x04
311 #define _T0IF 0x04
312 #define _IOCIE 0x08
313 #define _INTE 0x10
314 #define _TMR0IE 0x20
315 #define _T0IE 0x20
316 #define _PEIE 0x40
317 #define _GIE 0x80
319 //==============================================================================
322 //==============================================================================
323 // PORTA Bits
325 extern __at(0x000C) __sfr PORTA;
327 typedef union
329 struct
331 unsigned RA0 : 1;
332 unsigned RA1 : 1;
333 unsigned RA2 : 1;
334 unsigned RA3 : 1;
335 unsigned RA4 : 1;
336 unsigned RA5 : 1;
337 unsigned : 1;
338 unsigned : 1;
341 struct
343 unsigned RA : 6;
344 unsigned : 2;
346 } __PORTAbits_t;
348 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
350 #define _RA0 0x01
351 #define _RA1 0x02
352 #define _RA2 0x04
353 #define _RA3 0x08
354 #define _RA4 0x10
355 #define _RA5 0x20
357 //==============================================================================
360 //==============================================================================
361 // PORTB Bits
363 extern __at(0x000D) __sfr PORTB;
365 typedef struct
367 unsigned : 1;
368 unsigned : 1;
369 unsigned : 1;
370 unsigned : 1;
371 unsigned RB4 : 1;
372 unsigned RB5 : 1;
373 unsigned RB6 : 1;
374 unsigned RB7 : 1;
375 } __PORTBbits_t;
377 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
379 #define _RB4 0x10
380 #define _RB5 0x20
381 #define _RB6 0x40
382 #define _RB7 0x80
384 //==============================================================================
387 //==============================================================================
388 // PORTC Bits
390 extern __at(0x000E) __sfr PORTC;
392 typedef struct
394 unsigned RC0 : 1;
395 unsigned RC1 : 1;
396 unsigned RC2 : 1;
397 unsigned RC3 : 1;
398 unsigned RC4 : 1;
399 unsigned RC5 : 1;
400 unsigned RC6 : 1;
401 unsigned RC7 : 1;
402 } __PORTCbits_t;
404 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
406 #define _RC0 0x01
407 #define _RC1 0x02
408 #define _RC2 0x04
409 #define _RC3 0x08
410 #define _RC4 0x10
411 #define _RC5 0x20
412 #define _RC6 0x40
413 #define _RC7 0x80
415 //==============================================================================
418 //==============================================================================
419 // PIR1 Bits
421 extern __at(0x0011) __sfr PIR1;
423 typedef union
425 struct
427 unsigned TMR1IF : 1;
428 unsigned TMR2IF : 1;
429 unsigned CCP1IF : 1;
430 unsigned SSP1IF : 1;
431 unsigned : 1;
432 unsigned : 1;
433 unsigned ADIF : 1;
434 unsigned TMR1GIF : 1;
437 struct
439 unsigned : 1;
440 unsigned : 1;
441 unsigned CCPIF : 1;
442 unsigned : 1;
443 unsigned : 1;
444 unsigned : 1;
445 unsigned : 1;
446 unsigned : 1;
448 } __PIR1bits_t;
450 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
452 #define _TMR1IF 0x01
453 #define _TMR2IF 0x02
454 #define _CCP1IF 0x04
455 #define _CCPIF 0x04
456 #define _SSP1IF 0x08
457 #define _ADIF 0x40
458 #define _TMR1GIF 0x80
460 //==============================================================================
463 //==============================================================================
464 // PIR2 Bits
466 extern __at(0x0012) __sfr PIR2;
468 typedef struct
470 unsigned CCP2IF : 1;
471 unsigned : 1;
472 unsigned : 1;
473 unsigned BCL1IF : 1;
474 unsigned : 1;
475 unsigned : 1;
476 unsigned : 1;
477 unsigned : 1;
478 } __PIR2bits_t;
480 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
482 #define _CCP2IF 0x01
483 #define _BCL1IF 0x08
485 //==============================================================================
488 //==============================================================================
489 // PIR3 Bits
491 extern __at(0x0013) __sfr PIR3;
493 typedef struct
495 unsigned : 1;
496 unsigned : 1;
497 unsigned : 1;
498 unsigned : 1;
499 unsigned ZCDIF : 1;
500 unsigned : 1;
501 unsigned : 1;
502 unsigned : 1;
503 } __PIR3bits_t;
505 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
507 #define _ZCDIF 0x10
509 //==============================================================================
511 extern __at(0x0015) __sfr TMR0;
512 extern __at(0x0016) __sfr TMR1;
513 extern __at(0x0016) __sfr TMR1L;
514 extern __at(0x0017) __sfr TMR1H;
516 //==============================================================================
517 // T1CON Bits
519 extern __at(0x0018) __sfr T1CON;
521 typedef union
523 struct
525 unsigned TMR1ON : 1;
526 unsigned : 1;
527 unsigned NOT_T1SYNC : 1;
528 unsigned T1OSCEN : 1;
529 unsigned T1CKPS0 : 1;
530 unsigned T1CKPS1 : 1;
531 unsigned TMR1CS0 : 1;
532 unsigned TMR1CS1 : 1;
535 struct
537 unsigned : 4;
538 unsigned T1CKPS : 2;
539 unsigned : 2;
542 struct
544 unsigned : 6;
545 unsigned TMR1CS : 2;
547 } __T1CONbits_t;
549 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
551 #define _TMR1ON 0x01
552 #define _NOT_T1SYNC 0x04
553 #define _T1OSCEN 0x08
554 #define _T1CKPS0 0x10
555 #define _T1CKPS1 0x20
556 #define _TMR1CS0 0x40
557 #define _TMR1CS1 0x80
559 //==============================================================================
562 //==============================================================================
563 // T1GCON Bits
565 extern __at(0x0019) __sfr T1GCON;
567 typedef union
569 struct
571 unsigned T1GSS0 : 1;
572 unsigned T1GSS1 : 1;
573 unsigned T1GVAL : 1;
574 unsigned T1GGO_NOT_DONE : 1;
575 unsigned T1GSPM : 1;
576 unsigned T1GTM : 1;
577 unsigned T1GPOL : 1;
578 unsigned TMR1GE : 1;
581 struct
583 unsigned T1GSS : 2;
584 unsigned : 6;
586 } __T1GCONbits_t;
588 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
590 #define _T1GSS0 0x01
591 #define _T1GSS1 0x02
592 #define _T1GVAL 0x04
593 #define _T1GGO_NOT_DONE 0x08
594 #define _T1GSPM 0x10
595 #define _T1GTM 0x20
596 #define _T1GPOL 0x40
597 #define _TMR1GE 0x80
599 //==============================================================================
601 extern __at(0x001A) __sfr TMR2;
602 extern __at(0x001B) __sfr PR2;
604 //==============================================================================
605 // T2CON Bits
607 extern __at(0x001C) __sfr T2CON;
609 typedef union
611 struct
613 unsigned T2CKPS0 : 1;
614 unsigned T2CKPS1 : 1;
615 unsigned TMR2ON : 1;
616 unsigned T2OUTPS0 : 1;
617 unsigned T2OUTPS1 : 1;
618 unsigned T2OUTPS2 : 1;
619 unsigned T2OUTPS3 : 1;
620 unsigned : 1;
623 struct
625 unsigned T2CKPS : 2;
626 unsigned : 6;
629 struct
631 unsigned : 3;
632 unsigned T2OUTPS : 4;
633 unsigned : 1;
635 } __T2CONbits_t;
637 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
639 #define _T2CKPS0 0x01
640 #define _T2CKPS1 0x02
641 #define _TMR2ON 0x04
642 #define _T2OUTPS0 0x08
643 #define _T2OUTPS1 0x10
644 #define _T2OUTPS2 0x20
645 #define _T2OUTPS3 0x40
647 //==============================================================================
650 //==============================================================================
651 // TRISA Bits
653 extern __at(0x008C) __sfr TRISA;
655 typedef struct
657 unsigned TRISA0 : 1;
658 unsigned TRISA1 : 1;
659 unsigned TRISA2 : 1;
660 unsigned : 1;
661 unsigned TRISA4 : 1;
662 unsigned TRISA5 : 1;
663 unsigned : 1;
664 unsigned : 1;
665 } __TRISAbits_t;
667 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
669 #define _TRISA0 0x01
670 #define _TRISA1 0x02
671 #define _TRISA2 0x04
672 #define _TRISA4 0x10
673 #define _TRISA5 0x20
675 //==============================================================================
678 //==============================================================================
679 // TRISB Bits
681 extern __at(0x008D) __sfr TRISB;
683 typedef struct
685 unsigned : 1;
686 unsigned : 1;
687 unsigned : 1;
688 unsigned : 1;
689 unsigned TRISB4 : 1;
690 unsigned TRISB5 : 1;
691 unsigned TRISB6 : 1;
692 unsigned TRISB7 : 1;
693 } __TRISBbits_t;
695 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
697 #define _TRISB4 0x10
698 #define _TRISB5 0x20
699 #define _TRISB6 0x40
700 #define _TRISB7 0x80
702 //==============================================================================
705 //==============================================================================
706 // TRISC Bits
708 extern __at(0x008E) __sfr TRISC;
710 typedef struct
712 unsigned TRISC0 : 1;
713 unsigned TRISC1 : 1;
714 unsigned TRISC2 : 1;
715 unsigned TRISC3 : 1;
716 unsigned TRISC4 : 1;
717 unsigned TRISC5 : 1;
718 unsigned TRISC6 : 1;
719 unsigned TRISC7 : 1;
720 } __TRISCbits_t;
722 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
724 #define _TRISC0 0x01
725 #define _TRISC1 0x02
726 #define _TRISC2 0x04
727 #define _TRISC3 0x08
728 #define _TRISC4 0x10
729 #define _TRISC5 0x20
730 #define _TRISC6 0x40
731 #define _TRISC7 0x80
733 //==============================================================================
736 //==============================================================================
737 // PIE1 Bits
739 extern __at(0x0091) __sfr PIE1;
741 typedef union
743 struct
745 unsigned TMR1IE : 1;
746 unsigned TMR2IE : 1;
747 unsigned CCP1IE : 1;
748 unsigned SSP1IE : 1;
749 unsigned : 1;
750 unsigned : 1;
751 unsigned ADIE : 1;
752 unsigned TMR1GIE : 1;
755 struct
757 unsigned : 1;
758 unsigned : 1;
759 unsigned CCPIE : 1;
760 unsigned : 1;
761 unsigned : 1;
762 unsigned : 1;
763 unsigned : 1;
764 unsigned : 1;
766 } __PIE1bits_t;
768 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
770 #define _TMR1IE 0x01
771 #define _TMR2IE 0x02
772 #define _CCP1IE 0x04
773 #define _CCPIE 0x04
774 #define _SSP1IE 0x08
775 #define _ADIE 0x40
776 #define _TMR1GIE 0x80
778 //==============================================================================
781 //==============================================================================
782 // PIE2 Bits
784 extern __at(0x0092) __sfr PIE2;
786 typedef struct
788 unsigned CCP2IE : 1;
789 unsigned : 1;
790 unsigned : 1;
791 unsigned BCL1IE : 1;
792 unsigned : 1;
793 unsigned : 1;
794 unsigned : 1;
795 unsigned : 1;
796 } __PIE2bits_t;
798 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
800 #define _CCP2IE 0x01
801 #define _BCL1IE 0x08
803 //==============================================================================
806 //==============================================================================
807 // PIE3 Bits
809 extern __at(0x0093) __sfr PIE3;
811 typedef struct
813 unsigned : 1;
814 unsigned : 1;
815 unsigned : 1;
816 unsigned : 1;
817 unsigned ZCDIE : 1;
818 unsigned : 1;
819 unsigned : 1;
820 unsigned : 1;
821 } __PIE3bits_t;
823 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
825 #define _ZCDIE 0x10
827 //==============================================================================
830 //==============================================================================
831 // OPTION_REG Bits
833 extern __at(0x0095) __sfr OPTION_REG;
835 typedef union
837 struct
839 unsigned PS0 : 1;
840 unsigned PS1 : 1;
841 unsigned PS2 : 1;
842 unsigned PSA : 1;
843 unsigned TMR0SE : 1;
844 unsigned TMR0CS : 1;
845 unsigned INTEDG : 1;
846 unsigned NOT_WPUEN : 1;
849 struct
851 unsigned : 1;
852 unsigned : 1;
853 unsigned : 1;
854 unsigned : 1;
855 unsigned T0SE : 1;
856 unsigned T0CS : 1;
857 unsigned : 1;
858 unsigned : 1;
861 struct
863 unsigned PS : 3;
864 unsigned : 5;
866 } __OPTION_REGbits_t;
868 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
870 #define _PS0 0x01
871 #define _PS1 0x02
872 #define _PS2 0x04
873 #define _PSA 0x08
874 #define _TMR0SE 0x10
875 #define _T0SE 0x10
876 #define _TMR0CS 0x20
877 #define _T0CS 0x20
878 #define _INTEDG 0x40
879 #define _NOT_WPUEN 0x80
881 //==============================================================================
884 //==============================================================================
885 // PCON Bits
887 extern __at(0x0096) __sfr PCON;
889 typedef struct
891 unsigned NOT_BOR : 1;
892 unsigned NOT_POR : 1;
893 unsigned NOT_RI : 1;
894 unsigned NOT_RMCLR : 1;
895 unsigned NOT_RWDT : 1;
896 unsigned : 1;
897 unsigned STKUNF : 1;
898 unsigned STKOVF : 1;
899 } __PCONbits_t;
901 extern __at(0x0096) volatile __PCONbits_t PCONbits;
903 #define _NOT_BOR 0x01
904 #define _NOT_POR 0x02
905 #define _NOT_RI 0x04
906 #define _NOT_RMCLR 0x08
907 #define _NOT_RWDT 0x10
908 #define _STKUNF 0x40
909 #define _STKOVF 0x80
911 //==============================================================================
914 //==============================================================================
915 // WDTCON Bits
917 extern __at(0x0097) __sfr WDTCON;
919 typedef union
921 struct
923 unsigned SWDTEN : 1;
924 unsigned WDTPS0 : 1;
925 unsigned WDTPS1 : 1;
926 unsigned WDTPS2 : 1;
927 unsigned WDTPS3 : 1;
928 unsigned WDTPS4 : 1;
929 unsigned : 1;
930 unsigned : 1;
933 struct
935 unsigned : 1;
936 unsigned WDTPS : 5;
937 unsigned : 2;
939 } __WDTCONbits_t;
941 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
943 #define _SWDTEN 0x01
944 #define _WDTPS0 0x02
945 #define _WDTPS1 0x04
946 #define _WDTPS2 0x08
947 #define _WDTPS3 0x10
948 #define _WDTPS4 0x20
950 //==============================================================================
953 //==============================================================================
954 // OSCTUNE Bits
956 extern __at(0x0098) __sfr OSCTUNE;
958 typedef union
960 struct
962 unsigned TUN0 : 1;
963 unsigned TUN1 : 1;
964 unsigned TUN2 : 1;
965 unsigned TUN3 : 1;
966 unsigned TUN4 : 1;
967 unsigned TUN5 : 1;
968 unsigned : 1;
969 unsigned : 1;
972 struct
974 unsigned TUN : 6;
975 unsigned : 2;
977 } __OSCTUNEbits_t;
979 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
981 #define _TUN0 0x01
982 #define _TUN1 0x02
983 #define _TUN2 0x04
984 #define _TUN3 0x08
985 #define _TUN4 0x10
986 #define _TUN5 0x20
988 //==============================================================================
991 //==============================================================================
992 // OSCCON Bits
994 extern __at(0x0099) __sfr OSCCON;
996 typedef union
998 struct
1000 unsigned SCS0 : 1;
1001 unsigned SCS1 : 1;
1002 unsigned : 1;
1003 unsigned IRCF0 : 1;
1004 unsigned IRCF1 : 1;
1005 unsigned IRCF2 : 1;
1006 unsigned IRCF3 : 1;
1007 unsigned SPLLEN : 1;
1010 struct
1012 unsigned SCS : 2;
1013 unsigned : 6;
1016 struct
1018 unsigned : 3;
1019 unsigned IRCF : 4;
1020 unsigned : 1;
1022 } __OSCCONbits_t;
1024 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1026 #define _SCS0 0x01
1027 #define _SCS1 0x02
1028 #define _IRCF0 0x08
1029 #define _IRCF1 0x10
1030 #define _IRCF2 0x20
1031 #define _IRCF3 0x40
1032 #define _SPLLEN 0x80
1034 //==============================================================================
1037 //==============================================================================
1038 // OSCSTAT Bits
1040 extern __at(0x009A) __sfr OSCSTAT;
1042 typedef struct
1044 unsigned HFIOFS : 1;
1045 unsigned LFIOFR : 1;
1046 unsigned MFIOFR : 1;
1047 unsigned HFIOFL : 1;
1048 unsigned HFIOFR : 1;
1049 unsigned OSTS : 1;
1050 unsigned PLLR : 1;
1051 unsigned SOSCR : 1;
1052 } __OSCSTATbits_t;
1054 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1056 #define _HFIOFS 0x01
1057 #define _LFIOFR 0x02
1058 #define _MFIOFR 0x04
1059 #define _HFIOFL 0x08
1060 #define _HFIOFR 0x10
1061 #define _OSTS 0x20
1062 #define _PLLR 0x40
1063 #define _SOSCR 0x80
1065 //==============================================================================
1067 extern __at(0x009B) __sfr ADRES;
1068 extern __at(0x009B) __sfr ADRESL;
1069 extern __at(0x009C) __sfr ADRESH;
1071 //==============================================================================
1072 // ADCON0 Bits
1074 extern __at(0x009D) __sfr ADCON0;
1076 typedef union
1078 struct
1080 unsigned ADON : 1;
1081 unsigned GO_NOT_DONE : 1;
1082 unsigned CHS0 : 1;
1083 unsigned CHS1 : 1;
1084 unsigned CHS2 : 1;
1085 unsigned CHS3 : 1;
1086 unsigned CHS4 : 1;
1087 unsigned : 1;
1090 struct
1092 unsigned : 1;
1093 unsigned ADGO : 1;
1094 unsigned : 1;
1095 unsigned : 1;
1096 unsigned : 1;
1097 unsigned : 1;
1098 unsigned : 1;
1099 unsigned : 1;
1102 struct
1104 unsigned : 1;
1105 unsigned GO : 1;
1106 unsigned : 1;
1107 unsigned : 1;
1108 unsigned : 1;
1109 unsigned : 1;
1110 unsigned : 1;
1111 unsigned : 1;
1114 struct
1116 unsigned : 2;
1117 unsigned CHS : 5;
1118 unsigned : 1;
1120 } __ADCON0bits_t;
1122 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1124 #define _ADON 0x01
1125 #define _GO_NOT_DONE 0x02
1126 #define _ADGO 0x02
1127 #define _GO 0x02
1128 #define _CHS0 0x04
1129 #define _CHS1 0x08
1130 #define _CHS2 0x10
1131 #define _CHS3 0x20
1132 #define _CHS4 0x40
1134 //==============================================================================
1137 //==============================================================================
1138 // ADCON1 Bits
1140 extern __at(0x009E) __sfr ADCON1;
1142 typedef union
1144 struct
1146 unsigned ADPREF0 : 1;
1147 unsigned ADPREF1 : 1;
1148 unsigned ADNREF : 1;
1149 unsigned : 1;
1150 unsigned : 1;
1151 unsigned : 1;
1152 unsigned : 1;
1153 unsigned ADFM : 1;
1156 struct
1158 unsigned ADPREF : 2;
1159 unsigned : 6;
1161 } __ADCON1bits_t;
1163 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1165 #define _ADPREF0 0x01
1166 #define _ADPREF1 0x02
1167 #define _ADNREF 0x04
1168 #define _ADFM 0x80
1170 //==============================================================================
1173 //==============================================================================
1174 // ADCON2 Bits
1176 extern __at(0x009F) __sfr ADCON2;
1178 typedef union
1180 struct
1182 unsigned : 1;
1183 unsigned : 1;
1184 unsigned : 1;
1185 unsigned : 1;
1186 unsigned TRIGSEL0 : 1;
1187 unsigned TRIGSEL1 : 1;
1188 unsigned TRIGSEL2 : 1;
1189 unsigned TRIGSEL3 : 1;
1192 struct
1194 unsigned : 4;
1195 unsigned TRIGSEL : 4;
1197 } __ADCON2bits_t;
1199 extern __at(0x009F) volatile __ADCON2bits_t ADCON2bits;
1201 #define _TRIGSEL0 0x10
1202 #define _TRIGSEL1 0x20
1203 #define _TRIGSEL2 0x40
1204 #define _TRIGSEL3 0x80
1206 //==============================================================================
1209 //==============================================================================
1210 // LATA Bits
1212 extern __at(0x010C) __sfr LATA;
1214 typedef struct
1216 unsigned LATA0 : 1;
1217 unsigned LATA1 : 1;
1218 unsigned LATA2 : 1;
1219 unsigned : 1;
1220 unsigned LATA4 : 1;
1221 unsigned LATA5 : 1;
1222 unsigned : 1;
1223 unsigned : 1;
1224 } __LATAbits_t;
1226 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1228 #define _LATA0 0x01
1229 #define _LATA1 0x02
1230 #define _LATA2 0x04
1231 #define _LATA4 0x10
1232 #define _LATA5 0x20
1234 //==============================================================================
1237 //==============================================================================
1238 // LATB Bits
1240 extern __at(0x010D) __sfr LATB;
1242 typedef struct
1244 unsigned : 1;
1245 unsigned : 1;
1246 unsigned : 1;
1247 unsigned : 1;
1248 unsigned LATB4 : 1;
1249 unsigned LATB5 : 1;
1250 unsigned LATB6 : 1;
1251 unsigned LATB7 : 1;
1252 } __LATBbits_t;
1254 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1256 #define _LATB4 0x10
1257 #define _LATB5 0x20
1258 #define _LATB6 0x40
1259 #define _LATB7 0x80
1261 //==============================================================================
1264 //==============================================================================
1265 // LATC Bits
1267 extern __at(0x010E) __sfr LATC;
1269 typedef struct
1271 unsigned LATC0 : 1;
1272 unsigned LATC1 : 1;
1273 unsigned LATC2 : 1;
1274 unsigned LATC3 : 1;
1275 unsigned LATC4 : 1;
1276 unsigned LATC5 : 1;
1277 unsigned LATC6 : 1;
1278 unsigned LATC7 : 1;
1279 } __LATCbits_t;
1281 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1283 #define _LATC0 0x01
1284 #define _LATC1 0x02
1285 #define _LATC2 0x04
1286 #define _LATC3 0x08
1287 #define _LATC4 0x10
1288 #define _LATC5 0x20
1289 #define _LATC6 0x40
1290 #define _LATC7 0x80
1292 //==============================================================================
1295 //==============================================================================
1296 // BORCON Bits
1298 extern __at(0x0116) __sfr BORCON;
1300 typedef struct
1302 unsigned BORRDY : 1;
1303 unsigned : 1;
1304 unsigned : 1;
1305 unsigned : 1;
1306 unsigned : 1;
1307 unsigned : 1;
1308 unsigned BORFS : 1;
1309 unsigned SBOREN : 1;
1310 } __BORCONbits_t;
1312 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1314 #define _BORRDY 0x01
1315 #define _BORFS 0x40
1316 #define _SBOREN 0x80
1318 //==============================================================================
1321 //==============================================================================
1322 // FVRCON Bits
1324 extern __at(0x0117) __sfr FVRCON;
1326 typedef union
1328 struct
1330 unsigned ADFVR0 : 1;
1331 unsigned ADFVR1 : 1;
1332 unsigned CDAFVR0 : 1;
1333 unsigned CDAFVR1 : 1;
1334 unsigned TSRNG : 1;
1335 unsigned TSEN : 1;
1336 unsigned FVRRDY : 1;
1337 unsigned FVREN : 1;
1340 struct
1342 unsigned ADFVR : 2;
1343 unsigned : 6;
1346 struct
1348 unsigned : 2;
1349 unsigned CDAFVR : 2;
1350 unsigned : 4;
1352 } __FVRCONbits_t;
1354 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1356 #define _ADFVR0 0x01
1357 #define _ADFVR1 0x02
1358 #define _CDAFVR0 0x04
1359 #define _CDAFVR1 0x08
1360 #define _TSRNG 0x10
1361 #define _TSEN 0x20
1362 #define _FVRRDY 0x40
1363 #define _FVREN 0x80
1365 //==============================================================================
1368 //==============================================================================
1369 // ZCD1CON Bits
1371 extern __at(0x011C) __sfr ZCD1CON;
1373 typedef struct
1375 unsigned ZCD1INTN : 1;
1376 unsigned ZCD1INTP : 1;
1377 unsigned : 1;
1378 unsigned : 1;
1379 unsigned ZCD1POL : 1;
1380 unsigned ZCD1OUT : 1;
1381 unsigned : 1;
1382 unsigned ZCD1EN : 1;
1383 } __ZCD1CONbits_t;
1385 extern __at(0x011C) volatile __ZCD1CONbits_t ZCD1CONbits;
1387 #define _ZCD1INTN 0x01
1388 #define _ZCD1INTP 0x02
1389 #define _ZCD1POL 0x10
1390 #define _ZCD1OUT 0x20
1391 #define _ZCD1EN 0x80
1393 //==============================================================================
1396 //==============================================================================
1397 // ANSELA Bits
1399 extern __at(0x018C) __sfr ANSELA;
1401 typedef struct
1403 unsigned ANSA0 : 1;
1404 unsigned ANSA1 : 1;
1405 unsigned ANSA2 : 1;
1406 unsigned : 1;
1407 unsigned ANSA4 : 1;
1408 unsigned : 1;
1409 unsigned : 1;
1410 unsigned : 1;
1411 } __ANSELAbits_t;
1413 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1415 #define _ANSA0 0x01
1416 #define _ANSA1 0x02
1417 #define _ANSA2 0x04
1418 #define _ANSA4 0x10
1420 //==============================================================================
1423 //==============================================================================
1424 // ANSELB Bits
1426 extern __at(0x018D) __sfr ANSELB;
1428 typedef struct
1430 unsigned : 1;
1431 unsigned : 1;
1432 unsigned : 1;
1433 unsigned : 1;
1434 unsigned ANSB4 : 1;
1435 unsigned ANSB5 : 1;
1436 unsigned : 1;
1437 unsigned : 1;
1438 } __ANSELBbits_t;
1440 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1442 #define _ANSB4 0x10
1443 #define _ANSB5 0x20
1445 //==============================================================================
1448 //==============================================================================
1449 // ANSELC Bits
1451 extern __at(0x018E) __sfr ANSELC;
1453 typedef struct
1455 unsigned ANSC0 : 1;
1456 unsigned ANSC1 : 1;
1457 unsigned ANSC2 : 1;
1458 unsigned ANSC3 : 1;
1459 unsigned : 1;
1460 unsigned : 1;
1461 unsigned ANSC6 : 1;
1462 unsigned ANSC7 : 1;
1463 } __ANSELCbits_t;
1465 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1467 #define _ANSC0 0x01
1468 #define _ANSC1 0x02
1469 #define _ANSC2 0x04
1470 #define _ANSC3 0x08
1471 #define _ANSC6 0x40
1472 #define _ANSC7 0x80
1474 //==============================================================================
1476 extern __at(0x0191) __sfr PMADR;
1477 extern __at(0x0191) __sfr PMADRL;
1478 extern __at(0x0192) __sfr PMADRH;
1479 extern __at(0x0193) __sfr PMDAT;
1480 extern __at(0x0193) __sfr PMDATL;
1481 extern __at(0x0194) __sfr PMDATH;
1483 //==============================================================================
1484 // PMCON1 Bits
1486 extern __at(0x0195) __sfr PMCON1;
1488 typedef struct
1490 unsigned RD : 1;
1491 unsigned WR : 1;
1492 unsigned WREN : 1;
1493 unsigned WRERR : 1;
1494 unsigned FREE : 1;
1495 unsigned LWLO : 1;
1496 unsigned CFGS : 1;
1497 unsigned : 1;
1498 } __PMCON1bits_t;
1500 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1502 #define _RD 0x01
1503 #define _WR 0x02
1504 #define _WREN 0x04
1505 #define _WRERR 0x08
1506 #define _FREE 0x10
1507 #define _LWLO 0x20
1508 #define _CFGS 0x40
1510 //==============================================================================
1512 extern __at(0x0196) __sfr PMCON2;
1514 //==============================================================================
1515 // WPUA Bits
1517 extern __at(0x020C) __sfr WPUA;
1519 typedef union
1521 struct
1523 unsigned WPUA0 : 1;
1524 unsigned WPUA1 : 1;
1525 unsigned WPUA2 : 1;
1526 unsigned WPUA3 : 1;
1527 unsigned WPUA4 : 1;
1528 unsigned WPUA5 : 1;
1529 unsigned : 1;
1530 unsigned : 1;
1533 struct
1535 unsigned WPUA : 6;
1536 unsigned : 2;
1538 } __WPUAbits_t;
1540 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
1542 #define _WPUA0 0x01
1543 #define _WPUA1 0x02
1544 #define _WPUA2 0x04
1545 #define _WPUA3 0x08
1546 #define _WPUA4 0x10
1547 #define _WPUA5 0x20
1549 //==============================================================================
1552 //==============================================================================
1553 // WPUB Bits
1555 extern __at(0x020D) __sfr WPUB;
1557 typedef struct
1559 unsigned : 1;
1560 unsigned : 1;
1561 unsigned : 1;
1562 unsigned : 1;
1563 unsigned WPUB4 : 1;
1564 unsigned WPUB5 : 1;
1565 unsigned WPUB6 : 1;
1566 unsigned WPUB7 : 1;
1567 } __WPUBbits_t;
1569 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
1571 #define _WPUB4 0x10
1572 #define _WPUB5 0x20
1573 #define _WPUB6 0x40
1574 #define _WPUB7 0x80
1576 //==============================================================================
1579 //==============================================================================
1580 // WPUC Bits
1582 extern __at(0x020E) __sfr WPUC;
1584 typedef struct
1586 unsigned WPUC0 : 1;
1587 unsigned WPUC1 : 1;
1588 unsigned WPUC2 : 1;
1589 unsigned WPUC3 : 1;
1590 unsigned WPUC4 : 1;
1591 unsigned WPUC5 : 1;
1592 unsigned WPUC6 : 1;
1593 unsigned WPUC7 : 1;
1594 } __WPUCbits_t;
1596 extern __at(0x020E) volatile __WPUCbits_t WPUCbits;
1598 #define _WPUC0 0x01
1599 #define _WPUC1 0x02
1600 #define _WPUC2 0x04
1601 #define _WPUC3 0x08
1602 #define _WPUC4 0x10
1603 #define _WPUC5 0x20
1604 #define _WPUC6 0x40
1605 #define _WPUC7 0x80
1607 //==============================================================================
1610 //==============================================================================
1611 // SSP1BUF Bits
1613 extern __at(0x0211) __sfr SSP1BUF;
1615 typedef union
1617 struct
1619 unsigned SSP1BUF0 : 1;
1620 unsigned SSP1BUF1 : 1;
1621 unsigned SSP1BUF2 : 1;
1622 unsigned SSP1BUF3 : 1;
1623 unsigned SSP1BUF4 : 1;
1624 unsigned SSP1BUF5 : 1;
1625 unsigned SSP1BUF6 : 1;
1626 unsigned SSP1BUF7 : 1;
1629 struct
1631 unsigned BUF0 : 1;
1632 unsigned BUF1 : 1;
1633 unsigned BUF2 : 1;
1634 unsigned BUF3 : 1;
1635 unsigned BUF4 : 1;
1636 unsigned BUF5 : 1;
1637 unsigned BUF6 : 1;
1638 unsigned BUF7 : 1;
1640 } __SSP1BUFbits_t;
1642 extern __at(0x0211) volatile __SSP1BUFbits_t SSP1BUFbits;
1644 #define _SSP1BUF0 0x01
1645 #define _BUF0 0x01
1646 #define _SSP1BUF1 0x02
1647 #define _BUF1 0x02
1648 #define _SSP1BUF2 0x04
1649 #define _BUF2 0x04
1650 #define _SSP1BUF3 0x08
1651 #define _BUF3 0x08
1652 #define _SSP1BUF4 0x10
1653 #define _BUF4 0x10
1654 #define _SSP1BUF5 0x20
1655 #define _BUF5 0x20
1656 #define _SSP1BUF6 0x40
1657 #define _BUF6 0x40
1658 #define _SSP1BUF7 0x80
1659 #define _BUF7 0x80
1661 //==============================================================================
1664 //==============================================================================
1665 // SSPBUF Bits
1667 extern __at(0x0211) __sfr SSPBUF;
1669 typedef union
1671 struct
1673 unsigned SSP1BUF0 : 1;
1674 unsigned SSP1BUF1 : 1;
1675 unsigned SSP1BUF2 : 1;
1676 unsigned SSP1BUF3 : 1;
1677 unsigned SSP1BUF4 : 1;
1678 unsigned SSP1BUF5 : 1;
1679 unsigned SSP1BUF6 : 1;
1680 unsigned SSP1BUF7 : 1;
1683 struct
1685 unsigned BUF0 : 1;
1686 unsigned BUF1 : 1;
1687 unsigned BUF2 : 1;
1688 unsigned BUF3 : 1;
1689 unsigned BUF4 : 1;
1690 unsigned BUF5 : 1;
1691 unsigned BUF6 : 1;
1692 unsigned BUF7 : 1;
1694 } __SSPBUFbits_t;
1696 extern __at(0x0211) volatile __SSPBUFbits_t SSPBUFbits;
1698 #define _SSPBUF_SSP1BUF0 0x01
1699 #define _SSPBUF_BUF0 0x01
1700 #define _SSPBUF_SSP1BUF1 0x02
1701 #define _SSPBUF_BUF1 0x02
1702 #define _SSPBUF_SSP1BUF2 0x04
1703 #define _SSPBUF_BUF2 0x04
1704 #define _SSPBUF_SSP1BUF3 0x08
1705 #define _SSPBUF_BUF3 0x08
1706 #define _SSPBUF_SSP1BUF4 0x10
1707 #define _SSPBUF_BUF4 0x10
1708 #define _SSPBUF_SSP1BUF5 0x20
1709 #define _SSPBUF_BUF5 0x20
1710 #define _SSPBUF_SSP1BUF6 0x40
1711 #define _SSPBUF_BUF6 0x40
1712 #define _SSPBUF_SSP1BUF7 0x80
1713 #define _SSPBUF_BUF7 0x80
1715 //==============================================================================
1718 //==============================================================================
1719 // SSP1ADD Bits
1721 extern __at(0x0212) __sfr SSP1ADD;
1723 typedef union
1725 struct
1727 unsigned SSP1ADD0 : 1;
1728 unsigned SSP1ADD1 : 1;
1729 unsigned SSP1ADD2 : 1;
1730 unsigned SSP1ADD3 : 1;
1731 unsigned SSP1ADD4 : 1;
1732 unsigned SSP1ADD5 : 1;
1733 unsigned SSP1ADD6 : 1;
1734 unsigned SSP1ADD7 : 1;
1737 struct
1739 unsigned ADD0 : 1;
1740 unsigned ADD1 : 1;
1741 unsigned ADD2 : 1;
1742 unsigned ADD3 : 1;
1743 unsigned ADD4 : 1;
1744 unsigned ADD5 : 1;
1745 unsigned ADD6 : 1;
1746 unsigned ADD7 : 1;
1748 } __SSP1ADDbits_t;
1750 extern __at(0x0212) volatile __SSP1ADDbits_t SSP1ADDbits;
1752 #define _SSP1ADD0 0x01
1753 #define _ADD0 0x01
1754 #define _SSP1ADD1 0x02
1755 #define _ADD1 0x02
1756 #define _SSP1ADD2 0x04
1757 #define _ADD2 0x04
1758 #define _SSP1ADD3 0x08
1759 #define _ADD3 0x08
1760 #define _SSP1ADD4 0x10
1761 #define _ADD4 0x10
1762 #define _SSP1ADD5 0x20
1763 #define _ADD5 0x20
1764 #define _SSP1ADD6 0x40
1765 #define _ADD6 0x40
1766 #define _SSP1ADD7 0x80
1767 #define _ADD7 0x80
1769 //==============================================================================
1772 //==============================================================================
1773 // SSPADD Bits
1775 extern __at(0x0212) __sfr SSPADD;
1777 typedef union
1779 struct
1781 unsigned SSP1ADD0 : 1;
1782 unsigned SSP1ADD1 : 1;
1783 unsigned SSP1ADD2 : 1;
1784 unsigned SSP1ADD3 : 1;
1785 unsigned SSP1ADD4 : 1;
1786 unsigned SSP1ADD5 : 1;
1787 unsigned SSP1ADD6 : 1;
1788 unsigned SSP1ADD7 : 1;
1791 struct
1793 unsigned ADD0 : 1;
1794 unsigned ADD1 : 1;
1795 unsigned ADD2 : 1;
1796 unsigned ADD3 : 1;
1797 unsigned ADD4 : 1;
1798 unsigned ADD5 : 1;
1799 unsigned ADD6 : 1;
1800 unsigned ADD7 : 1;
1802 } __SSPADDbits_t;
1804 extern __at(0x0212) volatile __SSPADDbits_t SSPADDbits;
1806 #define _SSPADD_SSP1ADD0 0x01
1807 #define _SSPADD_ADD0 0x01
1808 #define _SSPADD_SSP1ADD1 0x02
1809 #define _SSPADD_ADD1 0x02
1810 #define _SSPADD_SSP1ADD2 0x04
1811 #define _SSPADD_ADD2 0x04
1812 #define _SSPADD_SSP1ADD3 0x08
1813 #define _SSPADD_ADD3 0x08
1814 #define _SSPADD_SSP1ADD4 0x10
1815 #define _SSPADD_ADD4 0x10
1816 #define _SSPADD_SSP1ADD5 0x20
1817 #define _SSPADD_ADD5 0x20
1818 #define _SSPADD_SSP1ADD6 0x40
1819 #define _SSPADD_ADD6 0x40
1820 #define _SSPADD_SSP1ADD7 0x80
1821 #define _SSPADD_ADD7 0x80
1823 //==============================================================================
1826 //==============================================================================
1827 // SSP1MSK Bits
1829 extern __at(0x0213) __sfr SSP1MSK;
1831 typedef union
1833 struct
1835 unsigned SSP1MSK0 : 1;
1836 unsigned SSP1MSK1 : 1;
1837 unsigned SSP1MSK2 : 1;
1838 unsigned SSP1MSK3 : 1;
1839 unsigned SSP1MSK4 : 1;
1840 unsigned SSP1MSK5 : 1;
1841 unsigned SSP1MSK6 : 1;
1842 unsigned SSP1MSK7 : 1;
1845 struct
1847 unsigned MSK0 : 1;
1848 unsigned MSK1 : 1;
1849 unsigned MSK2 : 1;
1850 unsigned MSK3 : 1;
1851 unsigned MSK4 : 1;
1852 unsigned MSK5 : 1;
1853 unsigned MSK6 : 1;
1854 unsigned MSK7 : 1;
1856 } __SSP1MSKbits_t;
1858 extern __at(0x0213) volatile __SSP1MSKbits_t SSP1MSKbits;
1860 #define _SSP1MSK0 0x01
1861 #define _MSK0 0x01
1862 #define _SSP1MSK1 0x02
1863 #define _MSK1 0x02
1864 #define _SSP1MSK2 0x04
1865 #define _MSK2 0x04
1866 #define _SSP1MSK3 0x08
1867 #define _MSK3 0x08
1868 #define _SSP1MSK4 0x10
1869 #define _MSK4 0x10
1870 #define _SSP1MSK5 0x20
1871 #define _MSK5 0x20
1872 #define _SSP1MSK6 0x40
1873 #define _MSK6 0x40
1874 #define _SSP1MSK7 0x80
1875 #define _MSK7 0x80
1877 //==============================================================================
1880 //==============================================================================
1881 // SSPMSK Bits
1883 extern __at(0x0213) __sfr SSPMSK;
1885 typedef union
1887 struct
1889 unsigned SSP1MSK0 : 1;
1890 unsigned SSP1MSK1 : 1;
1891 unsigned SSP1MSK2 : 1;
1892 unsigned SSP1MSK3 : 1;
1893 unsigned SSP1MSK4 : 1;
1894 unsigned SSP1MSK5 : 1;
1895 unsigned SSP1MSK6 : 1;
1896 unsigned SSP1MSK7 : 1;
1899 struct
1901 unsigned MSK0 : 1;
1902 unsigned MSK1 : 1;
1903 unsigned MSK2 : 1;
1904 unsigned MSK3 : 1;
1905 unsigned MSK4 : 1;
1906 unsigned MSK5 : 1;
1907 unsigned MSK6 : 1;
1908 unsigned MSK7 : 1;
1910 } __SSPMSKbits_t;
1912 extern __at(0x0213) volatile __SSPMSKbits_t SSPMSKbits;
1914 #define _SSPMSK_SSP1MSK0 0x01
1915 #define _SSPMSK_MSK0 0x01
1916 #define _SSPMSK_SSP1MSK1 0x02
1917 #define _SSPMSK_MSK1 0x02
1918 #define _SSPMSK_SSP1MSK2 0x04
1919 #define _SSPMSK_MSK2 0x04
1920 #define _SSPMSK_SSP1MSK3 0x08
1921 #define _SSPMSK_MSK3 0x08
1922 #define _SSPMSK_SSP1MSK4 0x10
1923 #define _SSPMSK_MSK4 0x10
1924 #define _SSPMSK_SSP1MSK5 0x20
1925 #define _SSPMSK_MSK5 0x20
1926 #define _SSPMSK_SSP1MSK6 0x40
1927 #define _SSPMSK_MSK6 0x40
1928 #define _SSPMSK_SSP1MSK7 0x80
1929 #define _SSPMSK_MSK7 0x80
1931 //==============================================================================
1934 //==============================================================================
1935 // SSP1STAT Bits
1937 extern __at(0x0214) __sfr SSP1STAT;
1939 typedef struct
1941 unsigned BF : 1;
1942 unsigned UA : 1;
1943 unsigned R_NOT_W : 1;
1944 unsigned S : 1;
1945 unsigned P : 1;
1946 unsigned D_NOT_A : 1;
1947 unsigned CKE : 1;
1948 unsigned SMP : 1;
1949 } __SSP1STATbits_t;
1951 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
1953 #define _BF 0x01
1954 #define _UA 0x02
1955 #define _R_NOT_W 0x04
1956 #define _S 0x08
1957 #define _P 0x10
1958 #define _D_NOT_A 0x20
1959 #define _CKE 0x40
1960 #define _SMP 0x80
1962 //==============================================================================
1965 //==============================================================================
1966 // SSPSTAT Bits
1968 extern __at(0x0214) __sfr SSPSTAT;
1970 typedef struct
1972 unsigned BF : 1;
1973 unsigned UA : 1;
1974 unsigned R_NOT_W : 1;
1975 unsigned S : 1;
1976 unsigned P : 1;
1977 unsigned D_NOT_A : 1;
1978 unsigned CKE : 1;
1979 unsigned SMP : 1;
1980 } __SSPSTATbits_t;
1982 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
1984 #define _SSPSTAT_BF 0x01
1985 #define _SSPSTAT_UA 0x02
1986 #define _SSPSTAT_R_NOT_W 0x04
1987 #define _SSPSTAT_S 0x08
1988 #define _SSPSTAT_P 0x10
1989 #define _SSPSTAT_D_NOT_A 0x20
1990 #define _SSPSTAT_CKE 0x40
1991 #define _SSPSTAT_SMP 0x80
1993 //==============================================================================
1996 //==============================================================================
1997 // SSP1CON Bits
1999 extern __at(0x0215) __sfr SSP1CON;
2001 typedef union
2003 struct
2005 unsigned SSPM0 : 1;
2006 unsigned SSPM1 : 1;
2007 unsigned SSPM2 : 1;
2008 unsigned SSPM3 : 1;
2009 unsigned CKP : 1;
2010 unsigned SSPEN : 1;
2011 unsigned SSPOV : 1;
2012 unsigned WCOL : 1;
2015 struct
2017 unsigned SSPM : 4;
2018 unsigned : 4;
2020 } __SSP1CONbits_t;
2022 extern __at(0x0215) volatile __SSP1CONbits_t SSP1CONbits;
2024 #define _SSPM0 0x01
2025 #define _SSPM1 0x02
2026 #define _SSPM2 0x04
2027 #define _SSPM3 0x08
2028 #define _CKP 0x10
2029 #define _SSPEN 0x20
2030 #define _SSPOV 0x40
2031 #define _WCOL 0x80
2033 //==============================================================================
2036 //==============================================================================
2037 // SSP1CON1 Bits
2039 extern __at(0x0215) __sfr SSP1CON1;
2041 typedef union
2043 struct
2045 unsigned SSPM0 : 1;
2046 unsigned SSPM1 : 1;
2047 unsigned SSPM2 : 1;
2048 unsigned SSPM3 : 1;
2049 unsigned CKP : 1;
2050 unsigned SSPEN : 1;
2051 unsigned SSPOV : 1;
2052 unsigned WCOL : 1;
2055 struct
2057 unsigned SSPM : 4;
2058 unsigned : 4;
2060 } __SSP1CON1bits_t;
2062 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2064 #define _SSP1CON1_SSPM0 0x01
2065 #define _SSP1CON1_SSPM1 0x02
2066 #define _SSP1CON1_SSPM2 0x04
2067 #define _SSP1CON1_SSPM3 0x08
2068 #define _SSP1CON1_CKP 0x10
2069 #define _SSP1CON1_SSPEN 0x20
2070 #define _SSP1CON1_SSPOV 0x40
2071 #define _SSP1CON1_WCOL 0x80
2073 //==============================================================================
2076 //==============================================================================
2077 // SSPCON Bits
2079 extern __at(0x0215) __sfr SSPCON;
2081 typedef union
2083 struct
2085 unsigned SSPM0 : 1;
2086 unsigned SSPM1 : 1;
2087 unsigned SSPM2 : 1;
2088 unsigned SSPM3 : 1;
2089 unsigned CKP : 1;
2090 unsigned SSPEN : 1;
2091 unsigned SSPOV : 1;
2092 unsigned WCOL : 1;
2095 struct
2097 unsigned SSPM : 4;
2098 unsigned : 4;
2100 } __SSPCONbits_t;
2102 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2104 #define _SSPCON_SSPM0 0x01
2105 #define _SSPCON_SSPM1 0x02
2106 #define _SSPCON_SSPM2 0x04
2107 #define _SSPCON_SSPM3 0x08
2108 #define _SSPCON_CKP 0x10
2109 #define _SSPCON_SSPEN 0x20
2110 #define _SSPCON_SSPOV 0x40
2111 #define _SSPCON_WCOL 0x80
2113 //==============================================================================
2116 //==============================================================================
2117 // SSPCON1 Bits
2119 extern __at(0x0215) __sfr SSPCON1;
2121 typedef union
2123 struct
2125 unsigned SSPM0 : 1;
2126 unsigned SSPM1 : 1;
2127 unsigned SSPM2 : 1;
2128 unsigned SSPM3 : 1;
2129 unsigned CKP : 1;
2130 unsigned SSPEN : 1;
2131 unsigned SSPOV : 1;
2132 unsigned WCOL : 1;
2135 struct
2137 unsigned SSPM : 4;
2138 unsigned : 4;
2140 } __SSPCON1bits_t;
2142 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2144 #define _SSPCON1_SSPM0 0x01
2145 #define _SSPCON1_SSPM1 0x02
2146 #define _SSPCON1_SSPM2 0x04
2147 #define _SSPCON1_SSPM3 0x08
2148 #define _SSPCON1_CKP 0x10
2149 #define _SSPCON1_SSPEN 0x20
2150 #define _SSPCON1_SSPOV 0x40
2151 #define _SSPCON1_WCOL 0x80
2153 //==============================================================================
2156 //==============================================================================
2157 // SSP1CON2 Bits
2159 extern __at(0x0216) __sfr SSP1CON2;
2161 typedef struct
2163 unsigned SEN : 1;
2164 unsigned RSEN : 1;
2165 unsigned PEN : 1;
2166 unsigned RCEN : 1;
2167 unsigned ACKEN : 1;
2168 unsigned ACKDT : 1;
2169 unsigned ACKSTAT : 1;
2170 unsigned GCEN : 1;
2171 } __SSP1CON2bits_t;
2173 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2175 #define _SEN 0x01
2176 #define _RSEN 0x02
2177 #define _PEN 0x04
2178 #define _RCEN 0x08
2179 #define _ACKEN 0x10
2180 #define _ACKDT 0x20
2181 #define _ACKSTAT 0x40
2182 #define _GCEN 0x80
2184 //==============================================================================
2187 //==============================================================================
2188 // SSPCON2 Bits
2190 extern __at(0x0216) __sfr SSPCON2;
2192 typedef struct
2194 unsigned SEN : 1;
2195 unsigned RSEN : 1;
2196 unsigned PEN : 1;
2197 unsigned RCEN : 1;
2198 unsigned ACKEN : 1;
2199 unsigned ACKDT : 1;
2200 unsigned ACKSTAT : 1;
2201 unsigned GCEN : 1;
2202 } __SSPCON2bits_t;
2204 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2206 #define _SSPCON2_SEN 0x01
2207 #define _SSPCON2_RSEN 0x02
2208 #define _SSPCON2_PEN 0x04
2209 #define _SSPCON2_RCEN 0x08
2210 #define _SSPCON2_ACKEN 0x10
2211 #define _SSPCON2_ACKDT 0x20
2212 #define _SSPCON2_ACKSTAT 0x40
2213 #define _SSPCON2_GCEN 0x80
2215 //==============================================================================
2218 //==============================================================================
2219 // SSP1CON3 Bits
2221 extern __at(0x0217) __sfr SSP1CON3;
2223 typedef struct
2225 unsigned DHEN : 1;
2226 unsigned AHEN : 1;
2227 unsigned SBCDE : 1;
2228 unsigned SDAHT : 1;
2229 unsigned BOEN : 1;
2230 unsigned SCIE : 1;
2231 unsigned PCIE : 1;
2232 unsigned ACKTIM : 1;
2233 } __SSP1CON3bits_t;
2235 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2237 #define _DHEN 0x01
2238 #define _AHEN 0x02
2239 #define _SBCDE 0x04
2240 #define _SDAHT 0x08
2241 #define _BOEN 0x10
2242 #define _SCIE 0x20
2243 #define _PCIE 0x40
2244 #define _ACKTIM 0x80
2246 //==============================================================================
2249 //==============================================================================
2250 // SSPCON3 Bits
2252 extern __at(0x0217) __sfr SSPCON3;
2254 typedef struct
2256 unsigned DHEN : 1;
2257 unsigned AHEN : 1;
2258 unsigned SBCDE : 1;
2259 unsigned SDAHT : 1;
2260 unsigned BOEN : 1;
2261 unsigned SCIE : 1;
2262 unsigned PCIE : 1;
2263 unsigned ACKTIM : 1;
2264 } __SSPCON3bits_t;
2266 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2268 #define _SSPCON3_DHEN 0x01
2269 #define _SSPCON3_AHEN 0x02
2270 #define _SSPCON3_SBCDE 0x04
2271 #define _SSPCON3_SDAHT 0x08
2272 #define _SSPCON3_BOEN 0x10
2273 #define _SSPCON3_SCIE 0x20
2274 #define _SSPCON3_PCIE 0x40
2275 #define _SSPCON3_ACKTIM 0x80
2277 //==============================================================================
2280 //==============================================================================
2281 // ODCONA Bits
2283 extern __at(0x028C) __sfr ODCONA;
2285 typedef struct
2287 unsigned ODA0 : 1;
2288 unsigned ODA1 : 1;
2289 unsigned ODA2 : 1;
2290 unsigned : 1;
2291 unsigned ODA4 : 1;
2292 unsigned ODA5 : 1;
2293 unsigned : 1;
2294 unsigned : 1;
2295 } __ODCONAbits_t;
2297 extern __at(0x028C) volatile __ODCONAbits_t ODCONAbits;
2299 #define _ODA0 0x01
2300 #define _ODA1 0x02
2301 #define _ODA2 0x04
2302 #define _ODA4 0x10
2303 #define _ODA5 0x20
2305 //==============================================================================
2308 //==============================================================================
2309 // ODCONB Bits
2311 extern __at(0x028D) __sfr ODCONB;
2313 typedef struct
2315 unsigned : 1;
2316 unsigned : 1;
2317 unsigned : 1;
2318 unsigned : 1;
2319 unsigned ODB4 : 1;
2320 unsigned ODB5 : 1;
2321 unsigned ODB6 : 1;
2322 unsigned ODB7 : 1;
2323 } __ODCONBbits_t;
2325 extern __at(0x028D) volatile __ODCONBbits_t ODCONBbits;
2327 #define _ODB4 0x10
2328 #define _ODB5 0x20
2329 #define _ODB6 0x40
2330 #define _ODB7 0x80
2332 //==============================================================================
2335 //==============================================================================
2336 // ODCONC Bits
2338 extern __at(0x028E) __sfr ODCONC;
2340 typedef struct
2342 unsigned ODC0 : 1;
2343 unsigned ODC1 : 1;
2344 unsigned ODC2 : 1;
2345 unsigned ODC3 : 1;
2346 unsigned ODC4 : 1;
2347 unsigned ODC5 : 1;
2348 unsigned ODC6 : 1;
2349 unsigned ODC7 : 1;
2350 } __ODCONCbits_t;
2352 extern __at(0x028E) volatile __ODCONCbits_t ODCONCbits;
2354 #define _ODC0 0x01
2355 #define _ODC1 0x02
2356 #define _ODC2 0x04
2357 #define _ODC3 0x08
2358 #define _ODC4 0x10
2359 #define _ODC5 0x20
2360 #define _ODC6 0x40
2361 #define _ODC7 0x80
2363 //==============================================================================
2365 extern __at(0x0291) __sfr CCPR1;
2366 extern __at(0x0291) __sfr CCPR1L;
2367 extern __at(0x0292) __sfr CCPR1H;
2369 //==============================================================================
2370 // CCP1CON Bits
2372 extern __at(0x0293) __sfr CCP1CON;
2374 typedef union
2376 struct
2378 unsigned CCP1M0 : 1;
2379 unsigned CCP1M1 : 1;
2380 unsigned CCP1M2 : 1;
2381 unsigned CCP1M3 : 1;
2382 unsigned DC1B0 : 1;
2383 unsigned DC1B1 : 1;
2384 unsigned : 1;
2385 unsigned : 1;
2388 struct
2390 unsigned : 1;
2391 unsigned : 1;
2392 unsigned : 1;
2393 unsigned : 1;
2394 unsigned CCP1Y : 1;
2395 unsigned CCP1X : 1;
2396 unsigned : 1;
2397 unsigned : 1;
2400 struct
2402 unsigned CCP1M : 4;
2403 unsigned : 4;
2406 struct
2408 unsigned : 4;
2409 unsigned DC1B : 2;
2410 unsigned : 2;
2412 } __CCP1CONbits_t;
2414 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2416 #define _CCP1M0 0x01
2417 #define _CCP1M1 0x02
2418 #define _CCP1M2 0x04
2419 #define _CCP1M3 0x08
2420 #define _DC1B0 0x10
2421 #define _CCP1Y 0x10
2422 #define _DC1B1 0x20
2423 #define _CCP1X 0x20
2425 //==============================================================================
2428 //==============================================================================
2429 // ECCP1CON Bits
2431 extern __at(0x0293) __sfr ECCP1CON;
2433 typedef union
2435 struct
2437 unsigned CCP1M0 : 1;
2438 unsigned CCP1M1 : 1;
2439 unsigned CCP1M2 : 1;
2440 unsigned CCP1M3 : 1;
2441 unsigned DC1B0 : 1;
2442 unsigned DC1B1 : 1;
2443 unsigned : 1;
2444 unsigned : 1;
2447 struct
2449 unsigned : 1;
2450 unsigned : 1;
2451 unsigned : 1;
2452 unsigned : 1;
2453 unsigned CCP1Y : 1;
2454 unsigned CCP1X : 1;
2455 unsigned : 1;
2456 unsigned : 1;
2459 struct
2461 unsigned CCP1M : 4;
2462 unsigned : 4;
2465 struct
2467 unsigned : 4;
2468 unsigned DC1B : 2;
2469 unsigned : 2;
2471 } __ECCP1CONbits_t;
2473 extern __at(0x0293) volatile __ECCP1CONbits_t ECCP1CONbits;
2475 #define _ECCP1CON_CCP1M0 0x01
2476 #define _ECCP1CON_CCP1M1 0x02
2477 #define _ECCP1CON_CCP1M2 0x04
2478 #define _ECCP1CON_CCP1M3 0x08
2479 #define _ECCP1CON_DC1B0 0x10
2480 #define _ECCP1CON_CCP1Y 0x10
2481 #define _ECCP1CON_DC1B1 0x20
2482 #define _ECCP1CON_CCP1X 0x20
2484 //==============================================================================
2486 extern __at(0x0298) __sfr CCPR2;
2487 extern __at(0x0298) __sfr CCPR2L;
2488 extern __at(0x0299) __sfr CCPR2H;
2490 //==============================================================================
2491 // CCP2CON Bits
2493 extern __at(0x029A) __sfr CCP2CON;
2495 typedef union
2497 struct
2499 unsigned CCP2M0 : 1;
2500 unsigned CCP2M1 : 1;
2501 unsigned CCP2M2 : 1;
2502 unsigned CCP2M3 : 1;
2503 unsigned DC2B0 : 1;
2504 unsigned DC2B1 : 1;
2505 unsigned : 1;
2506 unsigned : 1;
2509 struct
2511 unsigned : 1;
2512 unsigned : 1;
2513 unsigned : 1;
2514 unsigned : 1;
2515 unsigned CCP2Y : 1;
2516 unsigned CCP2X : 1;
2517 unsigned : 1;
2518 unsigned : 1;
2521 struct
2523 unsigned CCP2M : 4;
2524 unsigned : 4;
2527 struct
2529 unsigned : 4;
2530 unsigned DC2B : 2;
2531 unsigned : 2;
2533 } __CCP2CONbits_t;
2535 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2537 #define _CCP2M0 0x01
2538 #define _CCP2M1 0x02
2539 #define _CCP2M2 0x04
2540 #define _CCP2M3 0x08
2541 #define _DC2B0 0x10
2542 #define _CCP2Y 0x10
2543 #define _DC2B1 0x20
2544 #define _CCP2X 0x20
2546 //==============================================================================
2549 //==============================================================================
2550 // ECCP2CON Bits
2552 extern __at(0x029A) __sfr ECCP2CON;
2554 typedef union
2556 struct
2558 unsigned CCP2M0 : 1;
2559 unsigned CCP2M1 : 1;
2560 unsigned CCP2M2 : 1;
2561 unsigned CCP2M3 : 1;
2562 unsigned DC2B0 : 1;
2563 unsigned DC2B1 : 1;
2564 unsigned : 1;
2565 unsigned : 1;
2568 struct
2570 unsigned : 1;
2571 unsigned : 1;
2572 unsigned : 1;
2573 unsigned : 1;
2574 unsigned CCP2Y : 1;
2575 unsigned CCP2X : 1;
2576 unsigned : 1;
2577 unsigned : 1;
2580 struct
2582 unsigned CCP2M : 4;
2583 unsigned : 4;
2586 struct
2588 unsigned : 4;
2589 unsigned DC2B : 2;
2590 unsigned : 2;
2592 } __ECCP2CONbits_t;
2594 extern __at(0x029A) volatile __ECCP2CONbits_t ECCP2CONbits;
2596 #define _ECCP2CON_CCP2M0 0x01
2597 #define _ECCP2CON_CCP2M1 0x02
2598 #define _ECCP2CON_CCP2M2 0x04
2599 #define _ECCP2CON_CCP2M3 0x08
2600 #define _ECCP2CON_DC2B0 0x10
2601 #define _ECCP2CON_CCP2Y 0x10
2602 #define _ECCP2CON_DC2B1 0x20
2603 #define _ECCP2CON_CCP2X 0x20
2605 //==============================================================================
2608 //==============================================================================
2609 // SLRCONA Bits
2611 extern __at(0x030C) __sfr SLRCONA;
2613 typedef struct
2615 unsigned SLRA0 : 1;
2616 unsigned SLRA1 : 1;
2617 unsigned SLRA2 : 1;
2618 unsigned : 1;
2619 unsigned SLRA4 : 1;
2620 unsigned SLRA5 : 1;
2621 unsigned : 1;
2622 unsigned : 1;
2623 } __SLRCONAbits_t;
2625 extern __at(0x030C) volatile __SLRCONAbits_t SLRCONAbits;
2627 #define _SLRA0 0x01
2628 #define _SLRA1 0x02
2629 #define _SLRA2 0x04
2630 #define _SLRA4 0x10
2631 #define _SLRA5 0x20
2633 //==============================================================================
2636 //==============================================================================
2637 // SLRCONB Bits
2639 extern __at(0x030D) __sfr SLRCONB;
2641 typedef struct
2643 unsigned : 1;
2644 unsigned : 1;
2645 unsigned : 1;
2646 unsigned : 1;
2647 unsigned SLRB4 : 1;
2648 unsigned SLRB5 : 1;
2649 unsigned SLRB6 : 1;
2650 unsigned SLRB7 : 1;
2651 } __SLRCONBbits_t;
2653 extern __at(0x030D) volatile __SLRCONBbits_t SLRCONBbits;
2655 #define _SLRB4 0x10
2656 #define _SLRB5 0x20
2657 #define _SLRB6 0x40
2658 #define _SLRB7 0x80
2660 //==============================================================================
2663 //==============================================================================
2664 // SLRCONC Bits
2666 extern __at(0x030E) __sfr SLRCONC;
2668 typedef struct
2670 unsigned SLRC0 : 1;
2671 unsigned SLRC1 : 1;
2672 unsigned SLRC2 : 1;
2673 unsigned SLRC3 : 1;
2674 unsigned SLRC4 : 1;
2675 unsigned SLRC5 : 1;
2676 unsigned SLRC6 : 1;
2677 unsigned SLRC7 : 1;
2678 } __SLRCONCbits_t;
2680 extern __at(0x030E) volatile __SLRCONCbits_t SLRCONCbits;
2682 #define _SLRC0 0x01
2683 #define _SLRC1 0x02
2684 #define _SLRC2 0x04
2685 #define _SLRC3 0x08
2686 #define _SLRC4 0x10
2687 #define _SLRC5 0x20
2688 #define _SLRC6 0x40
2689 #define _SLRC7 0x80
2691 //==============================================================================
2694 //==============================================================================
2695 // INLVLA Bits
2697 extern __at(0x038C) __sfr INLVLA;
2699 typedef union
2701 struct
2703 unsigned INLVLA0 : 1;
2704 unsigned INLVLA1 : 1;
2705 unsigned INLVLA2 : 1;
2706 unsigned INLVLA3 : 1;
2707 unsigned INLVLA4 : 1;
2708 unsigned INLVLA5 : 1;
2709 unsigned : 1;
2710 unsigned : 1;
2713 struct
2715 unsigned INLVLA : 6;
2716 unsigned : 2;
2718 } __INLVLAbits_t;
2720 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
2722 #define _INLVLA0 0x01
2723 #define _INLVLA1 0x02
2724 #define _INLVLA2 0x04
2725 #define _INLVLA3 0x08
2726 #define _INLVLA4 0x10
2727 #define _INLVLA5 0x20
2729 //==============================================================================
2732 //==============================================================================
2733 // INLVLB Bits
2735 extern __at(0x038D) __sfr INLVLB;
2737 typedef struct
2739 unsigned : 1;
2740 unsigned : 1;
2741 unsigned : 1;
2742 unsigned : 1;
2743 unsigned INLVLB4 : 1;
2744 unsigned INLVLB5 : 1;
2745 unsigned INLVLB6 : 1;
2746 unsigned INLVLB7 : 1;
2747 } __INLVLBbits_t;
2749 extern __at(0x038D) volatile __INLVLBbits_t INLVLBbits;
2751 #define _INLVLB4 0x10
2752 #define _INLVLB5 0x20
2753 #define _INLVLB6 0x40
2754 #define _INLVLB7 0x80
2756 //==============================================================================
2759 //==============================================================================
2760 // INLVLC Bits
2762 extern __at(0x038E) __sfr INLVLC;
2764 typedef struct
2766 unsigned INLVLC0 : 1;
2767 unsigned INLVLC1 : 1;
2768 unsigned INLVLC2 : 1;
2769 unsigned INLVLC3 : 1;
2770 unsigned INLVLC4 : 1;
2771 unsigned INLVLC5 : 1;
2772 unsigned INLVLC6 : 1;
2773 unsigned INLVLC7 : 1;
2774 } __INLVLCbits_t;
2776 extern __at(0x038E) volatile __INLVLCbits_t INLVLCbits;
2778 #define _INLVLC0 0x01
2779 #define _INLVLC1 0x02
2780 #define _INLVLC2 0x04
2781 #define _INLVLC3 0x08
2782 #define _INLVLC4 0x10
2783 #define _INLVLC5 0x20
2784 #define _INLVLC6 0x40
2785 #define _INLVLC7 0x80
2787 //==============================================================================
2790 //==============================================================================
2791 // IOCAP Bits
2793 extern __at(0x0391) __sfr IOCAP;
2795 typedef union
2797 struct
2799 unsigned IOCAP0 : 1;
2800 unsigned IOCAP1 : 1;
2801 unsigned IOCAP2 : 1;
2802 unsigned IOCAP3 : 1;
2803 unsigned IOCAP4 : 1;
2804 unsigned IOCAP5 : 1;
2805 unsigned : 1;
2806 unsigned : 1;
2809 struct
2811 unsigned IOCAP : 6;
2812 unsigned : 2;
2814 } __IOCAPbits_t;
2816 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
2818 #define _IOCAP0 0x01
2819 #define _IOCAP1 0x02
2820 #define _IOCAP2 0x04
2821 #define _IOCAP3 0x08
2822 #define _IOCAP4 0x10
2823 #define _IOCAP5 0x20
2825 //==============================================================================
2828 //==============================================================================
2829 // IOCAN Bits
2831 extern __at(0x0392) __sfr IOCAN;
2833 typedef union
2835 struct
2837 unsigned IOCAN0 : 1;
2838 unsigned IOCAN1 : 1;
2839 unsigned IOCAN2 : 1;
2840 unsigned IOCAN3 : 1;
2841 unsigned IOCAN4 : 1;
2842 unsigned IOCAN5 : 1;
2843 unsigned : 1;
2844 unsigned : 1;
2847 struct
2849 unsigned IOCAN : 6;
2850 unsigned : 2;
2852 } __IOCANbits_t;
2854 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
2856 #define _IOCAN0 0x01
2857 #define _IOCAN1 0x02
2858 #define _IOCAN2 0x04
2859 #define _IOCAN3 0x08
2860 #define _IOCAN4 0x10
2861 #define _IOCAN5 0x20
2863 //==============================================================================
2866 //==============================================================================
2867 // IOCAF Bits
2869 extern __at(0x0393) __sfr IOCAF;
2871 typedef union
2873 struct
2875 unsigned IOCAF0 : 1;
2876 unsigned IOCAF1 : 1;
2877 unsigned IOCAF2 : 1;
2878 unsigned IOCAF3 : 1;
2879 unsigned IOCAF4 : 1;
2880 unsigned IOCAF5 : 1;
2881 unsigned : 1;
2882 unsigned : 1;
2885 struct
2887 unsigned IOCAF : 6;
2888 unsigned : 2;
2890 } __IOCAFbits_t;
2892 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
2894 #define _IOCAF0 0x01
2895 #define _IOCAF1 0x02
2896 #define _IOCAF2 0x04
2897 #define _IOCAF3 0x08
2898 #define _IOCAF4 0x10
2899 #define _IOCAF5 0x20
2901 //==============================================================================
2904 //==============================================================================
2905 // IOCBP Bits
2907 extern __at(0x0394) __sfr IOCBP;
2909 typedef struct
2911 unsigned : 1;
2912 unsigned : 1;
2913 unsigned : 1;
2914 unsigned : 1;
2915 unsigned IOCBP4 : 1;
2916 unsigned IOCBP5 : 1;
2917 unsigned IOCBP6 : 1;
2918 unsigned IOCBP7 : 1;
2919 } __IOCBPbits_t;
2921 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
2923 #define _IOCBP4 0x10
2924 #define _IOCBP5 0x20
2925 #define _IOCBP6 0x40
2926 #define _IOCBP7 0x80
2928 //==============================================================================
2931 //==============================================================================
2932 // IOCBN Bits
2934 extern __at(0x0395) __sfr IOCBN;
2936 typedef struct
2938 unsigned : 1;
2939 unsigned : 1;
2940 unsigned : 1;
2941 unsigned : 1;
2942 unsigned IOCBN4 : 1;
2943 unsigned IOCBN5 : 1;
2944 unsigned IOCBN6 : 1;
2945 unsigned IOCBN7 : 1;
2946 } __IOCBNbits_t;
2948 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
2950 #define _IOCBN4 0x10
2951 #define _IOCBN5 0x20
2952 #define _IOCBN6 0x40
2953 #define _IOCBN7 0x80
2955 //==============================================================================
2958 //==============================================================================
2959 // IOCBF Bits
2961 extern __at(0x0396) __sfr IOCBF;
2963 typedef struct
2965 unsigned : 1;
2966 unsigned : 1;
2967 unsigned : 1;
2968 unsigned : 1;
2969 unsigned IOCBF4 : 1;
2970 unsigned IOCBF5 : 1;
2971 unsigned IOCBF6 : 1;
2972 unsigned IOCBF7 : 1;
2973 } __IOCBFbits_t;
2975 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
2977 #define _IOCBF4 0x10
2978 #define _IOCBF5 0x20
2979 #define _IOCBF6 0x40
2980 #define _IOCBF7 0x80
2982 //==============================================================================
2985 //==============================================================================
2986 // IOCCP Bits
2988 extern __at(0x0397) __sfr IOCCP;
2990 typedef struct
2992 unsigned IOCCP0 : 1;
2993 unsigned IOCCP1 : 1;
2994 unsigned IOCCP2 : 1;
2995 unsigned IOCCP3 : 1;
2996 unsigned IOCCP4 : 1;
2997 unsigned IOCCP5 : 1;
2998 unsigned IOCCP6 : 1;
2999 unsigned IOCCP7 : 1;
3000 } __IOCCPbits_t;
3002 extern __at(0x0397) volatile __IOCCPbits_t IOCCPbits;
3004 #define _IOCCP0 0x01
3005 #define _IOCCP1 0x02
3006 #define _IOCCP2 0x04
3007 #define _IOCCP3 0x08
3008 #define _IOCCP4 0x10
3009 #define _IOCCP5 0x20
3010 #define _IOCCP6 0x40
3011 #define _IOCCP7 0x80
3013 //==============================================================================
3016 //==============================================================================
3017 // IOCCN Bits
3019 extern __at(0x0398) __sfr IOCCN;
3021 typedef struct
3023 unsigned IOCCN0 : 1;
3024 unsigned IOCCN1 : 1;
3025 unsigned IOCCN2 : 1;
3026 unsigned IOCCN3 : 1;
3027 unsigned IOCCN4 : 1;
3028 unsigned IOCCN5 : 1;
3029 unsigned IOCCN6 : 1;
3030 unsigned IOCCN7 : 1;
3031 } __IOCCNbits_t;
3033 extern __at(0x0398) volatile __IOCCNbits_t IOCCNbits;
3035 #define _IOCCN0 0x01
3036 #define _IOCCN1 0x02
3037 #define _IOCCN2 0x04
3038 #define _IOCCN3 0x08
3039 #define _IOCCN4 0x10
3040 #define _IOCCN5 0x20
3041 #define _IOCCN6 0x40
3042 #define _IOCCN7 0x80
3044 //==============================================================================
3047 //==============================================================================
3048 // IOCCF Bits
3050 extern __at(0x0399) __sfr IOCCF;
3052 typedef struct
3054 unsigned IOCCF0 : 1;
3055 unsigned IOCCF1 : 1;
3056 unsigned IOCCF2 : 1;
3057 unsigned IOCCF3 : 1;
3058 unsigned IOCCF4 : 1;
3059 unsigned IOCCF5 : 1;
3060 unsigned IOCCF6 : 1;
3061 unsigned IOCCF7 : 1;
3062 } __IOCCFbits_t;
3064 extern __at(0x0399) volatile __IOCCFbits_t IOCCFbits;
3066 #define _IOCCF0 0x01
3067 #define _IOCCF1 0x02
3068 #define _IOCCF2 0x04
3069 #define _IOCCF3 0x08
3070 #define _IOCCF4 0x10
3071 #define _IOCCF5 0x20
3072 #define _IOCCF6 0x40
3073 #define _IOCCF7 0x80
3075 //==============================================================================
3078 //==============================================================================
3079 // OPA1CON Bits
3081 extern __at(0x0511) __sfr OPA1CON;
3083 typedef union
3085 struct
3087 unsigned OPA1PCH0 : 1;
3088 unsigned OPA1PCH1 : 1;
3089 unsigned : 1;
3090 unsigned : 1;
3091 unsigned OPA1UG : 1;
3092 unsigned : 1;
3093 unsigned OPA1SP : 1;
3094 unsigned OPA1EN : 1;
3097 struct
3099 unsigned OPA1PCH : 2;
3100 unsigned : 6;
3102 } __OPA1CONbits_t;
3104 extern __at(0x0511) volatile __OPA1CONbits_t OPA1CONbits;
3106 #define _OPA1PCH0 0x01
3107 #define _OPA1PCH1 0x02
3108 #define _OPA1UG 0x10
3109 #define _OPA1SP 0x40
3110 #define _OPA1EN 0x80
3112 //==============================================================================
3115 //==============================================================================
3116 // OPA2CON Bits
3118 extern __at(0x0515) __sfr OPA2CON;
3120 typedef union
3122 struct
3124 unsigned OPA2PCH0 : 1;
3125 unsigned OPA2PCH1 : 1;
3126 unsigned : 1;
3127 unsigned : 1;
3128 unsigned OPA2UG : 1;
3129 unsigned : 1;
3130 unsigned OPA2SP : 1;
3131 unsigned OPA2EN : 1;
3134 struct
3136 unsigned OPA2PCH : 2;
3137 unsigned : 6;
3139 } __OPA2CONbits_t;
3141 extern __at(0x0515) volatile __OPA2CONbits_t OPA2CONbits;
3143 #define _OPA2PCH0 0x01
3144 #define _OPA2PCH1 0x02
3145 #define _OPA2UG 0x10
3146 #define _OPA2SP 0x40
3147 #define _OPA2EN 0x80
3149 //==============================================================================
3152 //==============================================================================
3153 // PPSLOCK Bits
3155 extern __at(0x0E0F) __sfr PPSLOCK;
3157 typedef struct
3159 unsigned PPSLOCKED : 1;
3160 unsigned : 1;
3161 unsigned : 1;
3162 unsigned : 1;
3163 unsigned : 1;
3164 unsigned : 1;
3165 unsigned : 1;
3166 unsigned : 1;
3167 } __PPSLOCKbits_t;
3169 extern __at(0x0E0F) volatile __PPSLOCKbits_t PPSLOCKbits;
3171 #define _PPSLOCKED 0x01
3173 //==============================================================================
3175 extern __at(0x0E10) __sfr INTPPS;
3176 extern __at(0x0E11) __sfr T0CKIPPS;
3177 extern __at(0x0E12) __sfr T1CKIPPS;
3178 extern __at(0x0E13) __sfr T1GPPS;
3179 extern __at(0x0E14) __sfr CCP1PPS;
3180 extern __at(0x0E15) __sfr CCP2PPS;
3181 extern __at(0x0E20) __sfr SSPCLKPPS;
3182 extern __at(0x0E21) __sfr SSPDATPPS;
3183 extern __at(0x0E22) __sfr SSPSSPPS;
3184 extern __at(0x0E90) __sfr RA0PPS;
3185 extern __at(0x0E91) __sfr RA1PPS;
3186 extern __at(0x0E92) __sfr RA2PPS;
3187 extern __at(0x0E94) __sfr RA4PPS;
3188 extern __at(0x0E95) __sfr RA5PPS;
3189 extern __at(0x0E9C) __sfr RB4PPS;
3190 extern __at(0x0E9D) __sfr RB5PPS;
3191 extern __at(0x0E9E) __sfr RB6PPS;
3192 extern __at(0x0E9F) __sfr RB7PPS;
3193 extern __at(0x0EA0) __sfr RC0PPS;
3194 extern __at(0x0EA1) __sfr RC1PPS;
3195 extern __at(0x0EA2) __sfr RC2PPS;
3196 extern __at(0x0EA3) __sfr RC3PPS;
3197 extern __at(0x0EA4) __sfr RC4PPS;
3198 extern __at(0x0EA5) __sfr RC5PPS;
3199 extern __at(0x0EA6) __sfr RC6PPS;
3200 extern __at(0x0EA7) __sfr RC7PPS;
3202 //==============================================================================
3203 // ICDBK0H Bits
3205 extern __at(0x0F9E) __sfr ICDBK0H;
3207 typedef struct
3209 unsigned BKA8 : 1;
3210 unsigned BKA9 : 1;
3211 unsigned BKA10 : 1;
3212 unsigned BKA11 : 1;
3213 unsigned BKA12 : 1;
3214 unsigned BKA13 : 1;
3215 unsigned BKA14 : 1;
3216 unsigned : 1;
3217 } __ICDBK0Hbits_t;
3219 extern __at(0x0F9E) volatile __ICDBK0Hbits_t ICDBK0Hbits;
3221 #define _BKA8 0x01
3222 #define _BKA9 0x02
3223 #define _BKA10 0x04
3224 #define _BKA11 0x08
3225 #define _BKA12 0x10
3226 #define _BKA13 0x20
3227 #define _BKA14 0x40
3229 //==============================================================================
3232 //==============================================================================
3233 // STATUS_SHAD Bits
3235 extern __at(0x0FE4) __sfr STATUS_SHAD;
3237 typedef struct
3239 unsigned C_SHAD : 1;
3240 unsigned DC_SHAD : 1;
3241 unsigned Z_SHAD : 1;
3242 unsigned : 1;
3243 unsigned : 1;
3244 unsigned : 1;
3245 unsigned : 1;
3246 unsigned : 1;
3247 } __STATUS_SHADbits_t;
3249 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
3251 #define _C_SHAD 0x01
3252 #define _DC_SHAD 0x02
3253 #define _Z_SHAD 0x04
3255 //==============================================================================
3257 extern __at(0x0FE5) __sfr WREG_SHAD;
3258 extern __at(0x0FE6) __sfr BSR_SHAD;
3259 extern __at(0x0FE7) __sfr PCLATH_SHAD;
3260 extern __at(0x0FE8) __sfr FSR0L_SHAD;
3261 extern __at(0x0FE9) __sfr FSR0H_SHAD;
3262 extern __at(0x0FEA) __sfr FSR1L_SHAD;
3263 extern __at(0x0FEB) __sfr FSR1H_SHAD;
3264 extern __at(0x0FED) __sfr STKPTR;
3265 extern __at(0x0FEE) __sfr TOSL;
3266 extern __at(0x0FEF) __sfr TOSH;
3268 //==============================================================================
3270 // Configuration Bits
3272 //==============================================================================
3274 #define _CONFIG1 0x8007
3275 #define _CONFIG2 0x8008
3277 //----------------------------- CONFIG1 Options -------------------------------
3279 #define _FOSC_INTOSC 0x3FFC // Internal HFINTOSC. I/O function on RA4 and RA5.
3280 #define _FOSC_ECL 0x3FFD // External oscillator, low power. I/O function on RA4.
3281 #define _FOSC_ECM 0x3FFE // External oscillator, medium power. I/O function on RA4.
3282 #define _FOSC_ECH 0x3FFF // External oscillator, high power. I/O function on RA4.
3283 #define _WDTE_OFF 0x3FE7 // WDT disabled.
3284 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
3285 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
3286 #define _WDTE_ON 0x3FFF // WDT enabled.
3287 #define _PWRTE_ON 0x3FDF // PWRT enabled.
3288 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
3289 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
3290 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
3291 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
3292 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
3293 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
3294 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
3295 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
3296 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
3297 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
3298 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
3300 //----------------------------- CONFIG2 Options -------------------------------
3302 #define _WRT_ALL 0x3FFC // 000h to 1FFFh write protected, no addresses may be modified by EECON control.
3303 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 1000h to 1FFFh may be modified by EECON control.
3304 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 1FFFh may be modified by EECON control.
3305 #define _WRT_OFF 0x3FFF // Write protection off.
3306 #define _PPS1WAY_OFF 0x3FFB // The PPSLOCK bit can be set and cleared repeatedly by software.
3307 #define _PPS1WAY_ON 0x3FFF // The PPSLOCK bit cannot be cleared once it is set by software.
3308 #define _ZCDDIS_OFF 0x3F7F // Zero-cross detect circuit is enabled at POR.
3309 #define _ZCDDIS_ON 0x3FFF // Zero-cross detect circuit is disabled at POR.
3310 #define _PLLEN_OFF 0x3EFF // 4x PLL is enabled when software sets the SPLLEN bit.
3311 #define _PLLEN_ON 0x3FFF // 4x PLL is always enabled.
3312 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
3313 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
3314 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
3315 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3316 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
3317 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
3318 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
3319 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
3320 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
3321 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
3323 //==============================================================================
3325 #define _DEVID1 0x8006
3327 #define _IDLOC0 0x8000
3328 #define _IDLOC1 0x8001
3329 #define _IDLOC2 0x8002
3330 #define _IDLOC3 0x8003
3332 //==============================================================================
3334 #ifndef NO_BIT_DEFINES
3336 #define ADON ADCON0bits.ADON // bit 0
3337 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
3338 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
3339 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
3340 #define CHS0 ADCON0bits.CHS0 // bit 2
3341 #define CHS1 ADCON0bits.CHS1 // bit 3
3342 #define CHS2 ADCON0bits.CHS2 // bit 4
3343 #define CHS3 ADCON0bits.CHS3 // bit 5
3344 #define CHS4 ADCON0bits.CHS4 // bit 6
3346 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
3347 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
3348 #define ADNREF ADCON1bits.ADNREF // bit 2
3349 #define ADFM ADCON1bits.ADFM // bit 7
3351 #define TRIGSEL0 ADCON2bits.TRIGSEL0 // bit 4
3352 #define TRIGSEL1 ADCON2bits.TRIGSEL1 // bit 5
3353 #define TRIGSEL2 ADCON2bits.TRIGSEL2 // bit 6
3354 #define TRIGSEL3 ADCON2bits.TRIGSEL3 // bit 7
3356 #define ANSA0 ANSELAbits.ANSA0 // bit 0
3357 #define ANSA1 ANSELAbits.ANSA1 // bit 1
3358 #define ANSA2 ANSELAbits.ANSA2 // bit 2
3359 #define ANSA4 ANSELAbits.ANSA4 // bit 4
3361 #define ANSB4 ANSELBbits.ANSB4 // bit 4
3362 #define ANSB5 ANSELBbits.ANSB5 // bit 5
3364 #define ANSC0 ANSELCbits.ANSC0 // bit 0
3365 #define ANSC1 ANSELCbits.ANSC1 // bit 1
3366 #define ANSC2 ANSELCbits.ANSC2 // bit 2
3367 #define ANSC3 ANSELCbits.ANSC3 // bit 3
3368 #define ANSC6 ANSELCbits.ANSC6 // bit 6
3369 #define ANSC7 ANSELCbits.ANSC7 // bit 7
3371 #define BORRDY BORCONbits.BORRDY // bit 0
3372 #define BORFS BORCONbits.BORFS // bit 6
3373 #define SBOREN BORCONbits.SBOREN // bit 7
3375 #define BSR0 BSRbits.BSR0 // bit 0
3376 #define BSR1 BSRbits.BSR1 // bit 1
3377 #define BSR2 BSRbits.BSR2 // bit 2
3378 #define BSR3 BSRbits.BSR3 // bit 3
3379 #define BSR4 BSRbits.BSR4 // bit 4
3381 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
3382 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
3383 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
3384 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
3385 #define DC1B0 CCP1CONbits.DC1B0 // bit 4, shadows bit in CCP1CONbits
3386 #define CCP1Y CCP1CONbits.CCP1Y // bit 4, shadows bit in CCP1CONbits
3387 #define DC1B1 CCP1CONbits.DC1B1 // bit 5, shadows bit in CCP1CONbits
3388 #define CCP1X CCP1CONbits.CCP1X // bit 5, shadows bit in CCP1CONbits
3390 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
3391 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
3392 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
3393 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
3394 #define DC2B0 CCP2CONbits.DC2B0 // bit 4, shadows bit in CCP2CONbits
3395 #define CCP2Y CCP2CONbits.CCP2Y // bit 4, shadows bit in CCP2CONbits
3396 #define DC2B1 CCP2CONbits.DC2B1 // bit 5, shadows bit in CCP2CONbits
3397 #define CCP2X CCP2CONbits.CCP2X // bit 5, shadows bit in CCP2CONbits
3399 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
3400 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
3401 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
3402 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
3403 #define TSRNG FVRCONbits.TSRNG // bit 4
3404 #define TSEN FVRCONbits.TSEN // bit 5
3405 #define FVRRDY FVRCONbits.FVRRDY // bit 6
3406 #define FVREN FVRCONbits.FVREN // bit 7
3408 #define BKA8 ICDBK0Hbits.BKA8 // bit 0
3409 #define BKA9 ICDBK0Hbits.BKA9 // bit 1
3410 #define BKA10 ICDBK0Hbits.BKA10 // bit 2
3411 #define BKA11 ICDBK0Hbits.BKA11 // bit 3
3412 #define BKA12 ICDBK0Hbits.BKA12 // bit 4
3413 #define BKA13 ICDBK0Hbits.BKA13 // bit 5
3414 #define BKA14 ICDBK0Hbits.BKA14 // bit 6
3416 #define INLVLA0 INLVLAbits.INLVLA0 // bit 0
3417 #define INLVLA1 INLVLAbits.INLVLA1 // bit 1
3418 #define INLVLA2 INLVLAbits.INLVLA2 // bit 2
3419 #define INLVLA3 INLVLAbits.INLVLA3 // bit 3
3420 #define INLVLA4 INLVLAbits.INLVLA4 // bit 4
3421 #define INLVLA5 INLVLAbits.INLVLA5 // bit 5
3423 #define INLVLB4 INLVLBbits.INLVLB4 // bit 4
3424 #define INLVLB5 INLVLBbits.INLVLB5 // bit 5
3425 #define INLVLB6 INLVLBbits.INLVLB6 // bit 6
3426 #define INLVLB7 INLVLBbits.INLVLB7 // bit 7
3428 #define INLVLC0 INLVLCbits.INLVLC0 // bit 0
3429 #define INLVLC1 INLVLCbits.INLVLC1 // bit 1
3430 #define INLVLC2 INLVLCbits.INLVLC2 // bit 2
3431 #define INLVLC3 INLVLCbits.INLVLC3 // bit 3
3432 #define INLVLC4 INLVLCbits.INLVLC4 // bit 4
3433 #define INLVLC5 INLVLCbits.INLVLC5 // bit 5
3434 #define INLVLC6 INLVLCbits.INLVLC6 // bit 6
3435 #define INLVLC7 INLVLCbits.INLVLC7 // bit 7
3437 #define IOCIF INTCONbits.IOCIF // bit 0
3438 #define INTF INTCONbits.INTF // bit 1
3439 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
3440 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
3441 #define IOCIE INTCONbits.IOCIE // bit 3
3442 #define INTE INTCONbits.INTE // bit 4
3443 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
3444 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
3445 #define PEIE INTCONbits.PEIE // bit 6
3446 #define GIE INTCONbits.GIE // bit 7
3448 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
3449 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
3450 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
3451 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
3452 #define IOCAF4 IOCAFbits.IOCAF4 // bit 4
3453 #define IOCAF5 IOCAFbits.IOCAF5 // bit 5
3455 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
3456 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
3457 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
3458 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
3459 #define IOCAN4 IOCANbits.IOCAN4 // bit 4
3460 #define IOCAN5 IOCANbits.IOCAN5 // bit 5
3462 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
3463 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
3464 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
3465 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
3466 #define IOCAP4 IOCAPbits.IOCAP4 // bit 4
3467 #define IOCAP5 IOCAPbits.IOCAP5 // bit 5
3469 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
3470 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
3471 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
3472 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
3474 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
3475 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
3476 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
3477 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
3479 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
3480 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
3481 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
3482 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
3484 #define IOCCF0 IOCCFbits.IOCCF0 // bit 0
3485 #define IOCCF1 IOCCFbits.IOCCF1 // bit 1
3486 #define IOCCF2 IOCCFbits.IOCCF2 // bit 2
3487 #define IOCCF3 IOCCFbits.IOCCF3 // bit 3
3488 #define IOCCF4 IOCCFbits.IOCCF4 // bit 4
3489 #define IOCCF5 IOCCFbits.IOCCF5 // bit 5
3490 #define IOCCF6 IOCCFbits.IOCCF6 // bit 6
3491 #define IOCCF7 IOCCFbits.IOCCF7 // bit 7
3493 #define IOCCN0 IOCCNbits.IOCCN0 // bit 0
3494 #define IOCCN1 IOCCNbits.IOCCN1 // bit 1
3495 #define IOCCN2 IOCCNbits.IOCCN2 // bit 2
3496 #define IOCCN3 IOCCNbits.IOCCN3 // bit 3
3497 #define IOCCN4 IOCCNbits.IOCCN4 // bit 4
3498 #define IOCCN5 IOCCNbits.IOCCN5 // bit 5
3499 #define IOCCN6 IOCCNbits.IOCCN6 // bit 6
3500 #define IOCCN7 IOCCNbits.IOCCN7 // bit 7
3502 #define IOCCP0 IOCCPbits.IOCCP0 // bit 0
3503 #define IOCCP1 IOCCPbits.IOCCP1 // bit 1
3504 #define IOCCP2 IOCCPbits.IOCCP2 // bit 2
3505 #define IOCCP3 IOCCPbits.IOCCP3 // bit 3
3506 #define IOCCP4 IOCCPbits.IOCCP4 // bit 4
3507 #define IOCCP5 IOCCPbits.IOCCP5 // bit 5
3508 #define IOCCP6 IOCCPbits.IOCCP6 // bit 6
3509 #define IOCCP7 IOCCPbits.IOCCP7 // bit 7
3511 #define LATA0 LATAbits.LATA0 // bit 0
3512 #define LATA1 LATAbits.LATA1 // bit 1
3513 #define LATA2 LATAbits.LATA2 // bit 2
3514 #define LATA4 LATAbits.LATA4 // bit 4
3515 #define LATA5 LATAbits.LATA5 // bit 5
3517 #define LATB4 LATBbits.LATB4 // bit 4
3518 #define LATB5 LATBbits.LATB5 // bit 5
3519 #define LATB6 LATBbits.LATB6 // bit 6
3520 #define LATB7 LATBbits.LATB7 // bit 7
3522 #define LATC0 LATCbits.LATC0 // bit 0
3523 #define LATC1 LATCbits.LATC1 // bit 1
3524 #define LATC2 LATCbits.LATC2 // bit 2
3525 #define LATC3 LATCbits.LATC3 // bit 3
3526 #define LATC4 LATCbits.LATC4 // bit 4
3527 #define LATC5 LATCbits.LATC5 // bit 5
3528 #define LATC6 LATCbits.LATC6 // bit 6
3529 #define LATC7 LATCbits.LATC7 // bit 7
3531 #define ODA0 ODCONAbits.ODA0 // bit 0
3532 #define ODA1 ODCONAbits.ODA1 // bit 1
3533 #define ODA2 ODCONAbits.ODA2 // bit 2
3534 #define ODA4 ODCONAbits.ODA4 // bit 4
3535 #define ODA5 ODCONAbits.ODA5 // bit 5
3537 #define ODB4 ODCONBbits.ODB4 // bit 4
3538 #define ODB5 ODCONBbits.ODB5 // bit 5
3539 #define ODB6 ODCONBbits.ODB6 // bit 6
3540 #define ODB7 ODCONBbits.ODB7 // bit 7
3542 #define ODC0 ODCONCbits.ODC0 // bit 0
3543 #define ODC1 ODCONCbits.ODC1 // bit 1
3544 #define ODC2 ODCONCbits.ODC2 // bit 2
3545 #define ODC3 ODCONCbits.ODC3 // bit 3
3546 #define ODC4 ODCONCbits.ODC4 // bit 4
3547 #define ODC5 ODCONCbits.ODC5 // bit 5
3548 #define ODC6 ODCONCbits.ODC6 // bit 6
3549 #define ODC7 ODCONCbits.ODC7 // bit 7
3551 #define OPA1PCH0 OPA1CONbits.OPA1PCH0 // bit 0
3552 #define OPA1PCH1 OPA1CONbits.OPA1PCH1 // bit 1
3553 #define OPA1UG OPA1CONbits.OPA1UG // bit 4
3554 #define OPA1SP OPA1CONbits.OPA1SP // bit 6
3555 #define OPA1EN OPA1CONbits.OPA1EN // bit 7
3557 #define OPA2PCH0 OPA2CONbits.OPA2PCH0 // bit 0
3558 #define OPA2PCH1 OPA2CONbits.OPA2PCH1 // bit 1
3559 #define OPA2UG OPA2CONbits.OPA2UG // bit 4
3560 #define OPA2SP OPA2CONbits.OPA2SP // bit 6
3561 #define OPA2EN OPA2CONbits.OPA2EN // bit 7
3563 #define PS0 OPTION_REGbits.PS0 // bit 0
3564 #define PS1 OPTION_REGbits.PS1 // bit 1
3565 #define PS2 OPTION_REGbits.PS2 // bit 2
3566 #define PSA OPTION_REGbits.PSA // bit 3
3567 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
3568 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
3569 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
3570 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
3571 #define INTEDG OPTION_REGbits.INTEDG // bit 6
3572 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
3574 #define SCS0 OSCCONbits.SCS0 // bit 0
3575 #define SCS1 OSCCONbits.SCS1 // bit 1
3576 #define IRCF0 OSCCONbits.IRCF0 // bit 3
3577 #define IRCF1 OSCCONbits.IRCF1 // bit 4
3578 #define IRCF2 OSCCONbits.IRCF2 // bit 5
3579 #define IRCF3 OSCCONbits.IRCF3 // bit 6
3580 #define SPLLEN OSCCONbits.SPLLEN // bit 7
3582 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
3583 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
3584 #define MFIOFR OSCSTATbits.MFIOFR // bit 2
3585 #define HFIOFL OSCSTATbits.HFIOFL // bit 3
3586 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
3587 #define OSTS OSCSTATbits.OSTS // bit 5
3588 #define PLLR OSCSTATbits.PLLR // bit 6
3589 #define SOSCR OSCSTATbits.SOSCR // bit 7
3591 #define TUN0 OSCTUNEbits.TUN0 // bit 0
3592 #define TUN1 OSCTUNEbits.TUN1 // bit 1
3593 #define TUN2 OSCTUNEbits.TUN2 // bit 2
3594 #define TUN3 OSCTUNEbits.TUN3 // bit 3
3595 #define TUN4 OSCTUNEbits.TUN4 // bit 4
3596 #define TUN5 OSCTUNEbits.TUN5 // bit 5
3598 #define NOT_BOR PCONbits.NOT_BOR // bit 0
3599 #define NOT_POR PCONbits.NOT_POR // bit 1
3600 #define NOT_RI PCONbits.NOT_RI // bit 2
3601 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
3602 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
3603 #define STKUNF PCONbits.STKUNF // bit 6
3604 #define STKOVF PCONbits.STKOVF // bit 7
3606 #define TMR1IE PIE1bits.TMR1IE // bit 0
3607 #define TMR2IE PIE1bits.TMR2IE // bit 1
3608 #define CCP1IE PIE1bits.CCP1IE // bit 2, shadows bit in PIE1bits
3609 #define CCPIE PIE1bits.CCPIE // bit 2, shadows bit in PIE1bits
3610 #define SSP1IE PIE1bits.SSP1IE // bit 3
3611 #define ADIE PIE1bits.ADIE // bit 6
3612 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
3614 #define CCP2IE PIE2bits.CCP2IE // bit 0
3615 #define BCL1IE PIE2bits.BCL1IE // bit 3
3617 #define ZCDIE PIE3bits.ZCDIE // bit 4
3619 #define TMR1IF PIR1bits.TMR1IF // bit 0
3620 #define TMR2IF PIR1bits.TMR2IF // bit 1
3621 #define CCP1IF PIR1bits.CCP1IF // bit 2, shadows bit in PIR1bits
3622 #define CCPIF PIR1bits.CCPIF // bit 2, shadows bit in PIR1bits
3623 #define SSP1IF PIR1bits.SSP1IF // bit 3
3624 #define ADIF PIR1bits.ADIF // bit 6
3625 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
3627 #define CCP2IF PIR2bits.CCP2IF // bit 0
3628 #define BCL1IF PIR2bits.BCL1IF // bit 3
3630 #define ZCDIF PIR3bits.ZCDIF // bit 4
3632 #define RD PMCON1bits.RD // bit 0
3633 #define WR PMCON1bits.WR // bit 1
3634 #define WREN PMCON1bits.WREN // bit 2
3635 #define WRERR PMCON1bits.WRERR // bit 3
3636 #define FREE PMCON1bits.FREE // bit 4
3637 #define LWLO PMCON1bits.LWLO // bit 5
3638 #define CFGS PMCON1bits.CFGS // bit 6
3640 #define RA0 PORTAbits.RA0 // bit 0
3641 #define RA1 PORTAbits.RA1 // bit 1
3642 #define RA2 PORTAbits.RA2 // bit 2
3643 #define RA3 PORTAbits.RA3 // bit 3
3644 #define RA4 PORTAbits.RA4 // bit 4
3645 #define RA5 PORTAbits.RA5 // bit 5
3647 #define RB4 PORTBbits.RB4 // bit 4
3648 #define RB5 PORTBbits.RB5 // bit 5
3649 #define RB6 PORTBbits.RB6 // bit 6
3650 #define RB7 PORTBbits.RB7 // bit 7
3652 #define RC0 PORTCbits.RC0 // bit 0
3653 #define RC1 PORTCbits.RC1 // bit 1
3654 #define RC2 PORTCbits.RC2 // bit 2
3655 #define RC3 PORTCbits.RC3 // bit 3
3656 #define RC4 PORTCbits.RC4 // bit 4
3657 #define RC5 PORTCbits.RC5 // bit 5
3658 #define RC6 PORTCbits.RC6 // bit 6
3659 #define RC7 PORTCbits.RC7 // bit 7
3661 #define PPSLOCKED PPSLOCKbits.PPSLOCKED // bit 0
3663 #define SLRA0 SLRCONAbits.SLRA0 // bit 0
3664 #define SLRA1 SLRCONAbits.SLRA1 // bit 1
3665 #define SLRA2 SLRCONAbits.SLRA2 // bit 2
3666 #define SLRA4 SLRCONAbits.SLRA4 // bit 4
3667 #define SLRA5 SLRCONAbits.SLRA5 // bit 5
3669 #define SLRB4 SLRCONBbits.SLRB4 // bit 4
3670 #define SLRB5 SLRCONBbits.SLRB5 // bit 5
3671 #define SLRB6 SLRCONBbits.SLRB6 // bit 6
3672 #define SLRB7 SLRCONBbits.SLRB7 // bit 7
3674 #define SLRC0 SLRCONCbits.SLRC0 // bit 0
3675 #define SLRC1 SLRCONCbits.SLRC1 // bit 1
3676 #define SLRC2 SLRCONCbits.SLRC2 // bit 2
3677 #define SLRC3 SLRCONCbits.SLRC3 // bit 3
3678 #define SLRC4 SLRCONCbits.SLRC4 // bit 4
3679 #define SLRC5 SLRCONCbits.SLRC5 // bit 5
3680 #define SLRC6 SLRCONCbits.SLRC6 // bit 6
3681 #define SLRC7 SLRCONCbits.SLRC7 // bit 7
3683 #define SSP1ADD0 SSP1ADDbits.SSP1ADD0 // bit 0, shadows bit in SSP1ADDbits
3684 #define ADD0 SSP1ADDbits.ADD0 // bit 0, shadows bit in SSP1ADDbits
3685 #define SSP1ADD1 SSP1ADDbits.SSP1ADD1 // bit 1, shadows bit in SSP1ADDbits
3686 #define ADD1 SSP1ADDbits.ADD1 // bit 1, shadows bit in SSP1ADDbits
3687 #define SSP1ADD2 SSP1ADDbits.SSP1ADD2 // bit 2, shadows bit in SSP1ADDbits
3688 #define ADD2 SSP1ADDbits.ADD2 // bit 2, shadows bit in SSP1ADDbits
3689 #define SSP1ADD3 SSP1ADDbits.SSP1ADD3 // bit 3, shadows bit in SSP1ADDbits
3690 #define ADD3 SSP1ADDbits.ADD3 // bit 3, shadows bit in SSP1ADDbits
3691 #define SSP1ADD4 SSP1ADDbits.SSP1ADD4 // bit 4, shadows bit in SSP1ADDbits
3692 #define ADD4 SSP1ADDbits.ADD4 // bit 4, shadows bit in SSP1ADDbits
3693 #define SSP1ADD5 SSP1ADDbits.SSP1ADD5 // bit 5, shadows bit in SSP1ADDbits
3694 #define ADD5 SSP1ADDbits.ADD5 // bit 5, shadows bit in SSP1ADDbits
3695 #define SSP1ADD6 SSP1ADDbits.SSP1ADD6 // bit 6, shadows bit in SSP1ADDbits
3696 #define ADD6 SSP1ADDbits.ADD6 // bit 6, shadows bit in SSP1ADDbits
3697 #define SSP1ADD7 SSP1ADDbits.SSP1ADD7 // bit 7, shadows bit in SSP1ADDbits
3698 #define ADD7 SSP1ADDbits.ADD7 // bit 7, shadows bit in SSP1ADDbits
3700 #define SSP1BUF0 SSP1BUFbits.SSP1BUF0 // bit 0, shadows bit in SSP1BUFbits
3701 #define BUF0 SSP1BUFbits.BUF0 // bit 0, shadows bit in SSP1BUFbits
3702 #define SSP1BUF1 SSP1BUFbits.SSP1BUF1 // bit 1, shadows bit in SSP1BUFbits
3703 #define BUF1 SSP1BUFbits.BUF1 // bit 1, shadows bit in SSP1BUFbits
3704 #define SSP1BUF2 SSP1BUFbits.SSP1BUF2 // bit 2, shadows bit in SSP1BUFbits
3705 #define BUF2 SSP1BUFbits.BUF2 // bit 2, shadows bit in SSP1BUFbits
3706 #define SSP1BUF3 SSP1BUFbits.SSP1BUF3 // bit 3, shadows bit in SSP1BUFbits
3707 #define BUF3 SSP1BUFbits.BUF3 // bit 3, shadows bit in SSP1BUFbits
3708 #define SSP1BUF4 SSP1BUFbits.SSP1BUF4 // bit 4, shadows bit in SSP1BUFbits
3709 #define BUF4 SSP1BUFbits.BUF4 // bit 4, shadows bit in SSP1BUFbits
3710 #define SSP1BUF5 SSP1BUFbits.SSP1BUF5 // bit 5, shadows bit in SSP1BUFbits
3711 #define BUF5 SSP1BUFbits.BUF5 // bit 5, shadows bit in SSP1BUFbits
3712 #define SSP1BUF6 SSP1BUFbits.SSP1BUF6 // bit 6, shadows bit in SSP1BUFbits
3713 #define BUF6 SSP1BUFbits.BUF6 // bit 6, shadows bit in SSP1BUFbits
3714 #define SSP1BUF7 SSP1BUFbits.SSP1BUF7 // bit 7, shadows bit in SSP1BUFbits
3715 #define BUF7 SSP1BUFbits.BUF7 // bit 7, shadows bit in SSP1BUFbits
3717 #define SSPM0 SSP1CONbits.SSPM0 // bit 0
3718 #define SSPM1 SSP1CONbits.SSPM1 // bit 1
3719 #define SSPM2 SSP1CONbits.SSPM2 // bit 2
3720 #define SSPM3 SSP1CONbits.SSPM3 // bit 3
3721 #define CKP SSP1CONbits.CKP // bit 4
3722 #define SSPEN SSP1CONbits.SSPEN // bit 5
3723 #define SSPOV SSP1CONbits.SSPOV // bit 6
3724 #define WCOL SSP1CONbits.WCOL // bit 7
3726 #define SEN SSP1CON2bits.SEN // bit 0
3727 #define RSEN SSP1CON2bits.RSEN // bit 1
3728 #define PEN SSP1CON2bits.PEN // bit 2
3729 #define RCEN SSP1CON2bits.RCEN // bit 3
3730 #define ACKEN SSP1CON2bits.ACKEN // bit 4
3731 #define ACKDT SSP1CON2bits.ACKDT // bit 5
3732 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
3733 #define GCEN SSP1CON2bits.GCEN // bit 7
3735 #define DHEN SSP1CON3bits.DHEN // bit 0
3736 #define AHEN SSP1CON3bits.AHEN // bit 1
3737 #define SBCDE SSP1CON3bits.SBCDE // bit 2
3738 #define SDAHT SSP1CON3bits.SDAHT // bit 3
3739 #define BOEN SSP1CON3bits.BOEN // bit 4
3740 #define SCIE SSP1CON3bits.SCIE // bit 5
3741 #define PCIE SSP1CON3bits.PCIE // bit 6
3742 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
3744 #define SSP1MSK0 SSP1MSKbits.SSP1MSK0 // bit 0, shadows bit in SSP1MSKbits
3745 #define MSK0 SSP1MSKbits.MSK0 // bit 0, shadows bit in SSP1MSKbits
3746 #define SSP1MSK1 SSP1MSKbits.SSP1MSK1 // bit 1, shadows bit in SSP1MSKbits
3747 #define MSK1 SSP1MSKbits.MSK1 // bit 1, shadows bit in SSP1MSKbits
3748 #define SSP1MSK2 SSP1MSKbits.SSP1MSK2 // bit 2, shadows bit in SSP1MSKbits
3749 #define MSK2 SSP1MSKbits.MSK2 // bit 2, shadows bit in SSP1MSKbits
3750 #define SSP1MSK3 SSP1MSKbits.SSP1MSK3 // bit 3, shadows bit in SSP1MSKbits
3751 #define MSK3 SSP1MSKbits.MSK3 // bit 3, shadows bit in SSP1MSKbits
3752 #define SSP1MSK4 SSP1MSKbits.SSP1MSK4 // bit 4, shadows bit in SSP1MSKbits
3753 #define MSK4 SSP1MSKbits.MSK4 // bit 4, shadows bit in SSP1MSKbits
3754 #define SSP1MSK5 SSP1MSKbits.SSP1MSK5 // bit 5, shadows bit in SSP1MSKbits
3755 #define MSK5 SSP1MSKbits.MSK5 // bit 5, shadows bit in SSP1MSKbits
3756 #define SSP1MSK6 SSP1MSKbits.SSP1MSK6 // bit 6, shadows bit in SSP1MSKbits
3757 #define MSK6 SSP1MSKbits.MSK6 // bit 6, shadows bit in SSP1MSKbits
3758 #define SSP1MSK7 SSP1MSKbits.SSP1MSK7 // bit 7, shadows bit in SSP1MSKbits
3759 #define MSK7 SSP1MSKbits.MSK7 // bit 7, shadows bit in SSP1MSKbits
3761 #define BF SSP1STATbits.BF // bit 0
3762 #define UA SSP1STATbits.UA // bit 1
3763 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
3764 #define S SSP1STATbits.S // bit 3
3765 #define P SSP1STATbits.P // bit 4
3766 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
3767 #define CKE SSP1STATbits.CKE // bit 6
3768 #define SMP SSP1STATbits.SMP // bit 7
3770 #define C STATUSbits.C // bit 0
3771 #define DC STATUSbits.DC // bit 1
3772 #define Z STATUSbits.Z // bit 2
3773 #define NOT_PD STATUSbits.NOT_PD // bit 3
3774 #define NOT_TO STATUSbits.NOT_TO // bit 4
3776 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
3777 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
3778 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
3780 #define TMR1ON T1CONbits.TMR1ON // bit 0
3781 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
3782 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
3783 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
3784 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
3785 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
3786 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
3788 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
3789 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
3790 #define T1GVAL T1GCONbits.T1GVAL // bit 2
3791 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
3792 #define T1GSPM T1GCONbits.T1GSPM // bit 4
3793 #define T1GTM T1GCONbits.T1GTM // bit 5
3794 #define T1GPOL T1GCONbits.T1GPOL // bit 6
3795 #define TMR1GE T1GCONbits.TMR1GE // bit 7
3797 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
3798 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
3799 #define TMR2ON T2CONbits.TMR2ON // bit 2
3800 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
3801 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
3802 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
3803 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
3805 #define TRISA0 TRISAbits.TRISA0 // bit 0
3806 #define TRISA1 TRISAbits.TRISA1 // bit 1
3807 #define TRISA2 TRISAbits.TRISA2 // bit 2
3808 #define TRISA4 TRISAbits.TRISA4 // bit 4
3809 #define TRISA5 TRISAbits.TRISA5 // bit 5
3811 #define TRISB4 TRISBbits.TRISB4 // bit 4
3812 #define TRISB5 TRISBbits.TRISB5 // bit 5
3813 #define TRISB6 TRISBbits.TRISB6 // bit 6
3814 #define TRISB7 TRISBbits.TRISB7 // bit 7
3816 #define TRISC0 TRISCbits.TRISC0 // bit 0
3817 #define TRISC1 TRISCbits.TRISC1 // bit 1
3818 #define TRISC2 TRISCbits.TRISC2 // bit 2
3819 #define TRISC3 TRISCbits.TRISC3 // bit 3
3820 #define TRISC4 TRISCbits.TRISC4 // bit 4
3821 #define TRISC5 TRISCbits.TRISC5 // bit 5
3822 #define TRISC6 TRISCbits.TRISC6 // bit 6
3823 #define TRISC7 TRISCbits.TRISC7 // bit 7
3825 #define SWDTEN WDTCONbits.SWDTEN // bit 0
3826 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
3827 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
3828 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
3829 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
3830 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
3832 #define WPUA0 WPUAbits.WPUA0 // bit 0
3833 #define WPUA1 WPUAbits.WPUA1 // bit 1
3834 #define WPUA2 WPUAbits.WPUA2 // bit 2
3835 #define WPUA3 WPUAbits.WPUA3 // bit 3
3836 #define WPUA4 WPUAbits.WPUA4 // bit 4
3837 #define WPUA5 WPUAbits.WPUA5 // bit 5
3839 #define WPUB4 WPUBbits.WPUB4 // bit 4
3840 #define WPUB5 WPUBbits.WPUB5 // bit 5
3841 #define WPUB6 WPUBbits.WPUB6 // bit 6
3842 #define WPUB7 WPUBbits.WPUB7 // bit 7
3844 #define WPUC0 WPUCbits.WPUC0 // bit 0
3845 #define WPUC1 WPUCbits.WPUC1 // bit 1
3846 #define WPUC2 WPUCbits.WPUC2 // bit 2
3847 #define WPUC3 WPUCbits.WPUC3 // bit 3
3848 #define WPUC4 WPUCbits.WPUC4 // bit 4
3849 #define WPUC5 WPUCbits.WPUC5 // bit 5
3850 #define WPUC6 WPUCbits.WPUC6 // bit 6
3851 #define WPUC7 WPUCbits.WPUC7 // bit 7
3853 #define ZCD1INTN ZCD1CONbits.ZCD1INTN // bit 0
3854 #define ZCD1INTP ZCD1CONbits.ZCD1INTP // bit 1
3855 #define ZCD1POL ZCD1CONbits.ZCD1POL // bit 4
3856 #define ZCD1OUT ZCD1CONbits.ZCD1OUT // bit 5
3857 #define ZCD1EN ZCD1CONbits.ZCD1EN // bit 7
3859 #endif // #ifndef NO_BIT_DEFINES
3861 #endif // #ifndef __PIC16LF1707_H__