struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f1512.h
blobdf7fd02f5359b65de46b481a128c90bae958bcbe
1 /*
2 * This declarations of the PIC16F1512 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:06 UTC.
9 * SDCC is licensed under the GNU Public license (GPL) v2. Note that
10 * this license covers the code to the compiler and other executables,
11 * but explicitly does not cover any code or objects generated by sdcc.
13 * For pic device libraries and header files which are derived from
14 * Microchip header (.inc) and linker script (.lkr) files Microchip
15 * requires that "The header files should state that they are only to be
16 * used with authentic Microchip devices" which makes them incompatible
17 * with the GPL. Pic device libraries and header files are located at
18 * non-free/lib and non-free/include directories respectively.
19 * Sdcc should be run with the --use-non-free command line option in
20 * order to include non-free header files and libraries.
22 * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
25 #ifndef __PIC16F1512_H__
26 #define __PIC16F1512_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF0_ADDR 0x0000
37 #define INDF1_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR0_ADDR 0x0004
41 #define FSR0L_ADDR 0x0004
42 #define FSR0H_ADDR 0x0005
43 #define FSR1_ADDR 0x0006
44 #define FSR1L_ADDR 0x0006
45 #define FSR1H_ADDR 0x0007
46 #define BSR_ADDR 0x0008
47 #define WREG_ADDR 0x0009
48 #define PCLATH_ADDR 0x000A
49 #define INTCON_ADDR 0x000B
50 #define PORTA_ADDR 0x000C
51 #define PORTB_ADDR 0x000D
52 #define PORTC_ADDR 0x000E
53 #define PORTE_ADDR 0x0010
54 #define PIR1_ADDR 0x0011
55 #define PIR2_ADDR 0x0012
56 #define TMR0_ADDR 0x0015
57 #define TMR1_ADDR 0x0016
58 #define TMR1L_ADDR 0x0016
59 #define TMR1H_ADDR 0x0017
60 #define T1CON_ADDR 0x0018
61 #define T1GCON_ADDR 0x0019
62 #define TMR2_ADDR 0x001A
63 #define PR2_ADDR 0x001B
64 #define T2CON_ADDR 0x001C
65 #define TRISA_ADDR 0x008C
66 #define TRISB_ADDR 0x008D
67 #define TRISC_ADDR 0x008E
68 #define TRISE_ADDR 0x0090
69 #define PIE1_ADDR 0x0091
70 #define PIE2_ADDR 0x0092
71 #define OPTION_REG_ADDR 0x0095
72 #define PCON_ADDR 0x0096
73 #define WDTCON_ADDR 0x0097
74 #define OSCCON_ADDR 0x0099
75 #define OSCSTAT_ADDR 0x009A
76 #define ADRES_ADDR 0x009B
77 #define ADRES0_ADDR 0x009B
78 #define ADRES0L_ADDR 0x009B
79 #define ADRESL_ADDR 0x009B
80 #define ADRES0H_ADDR 0x009C
81 #define ADRESH_ADDR 0x009C
82 #define ADCON0_ADDR 0x009D
83 #define ADCON1_ADDR 0x009E
84 #define LATA_ADDR 0x010C
85 #define LATB_ADDR 0x010D
86 #define LATC_ADDR 0x010E
87 #define BORCON_ADDR 0x0116
88 #define FVRCON_ADDR 0x0117
89 #define APFCON_ADDR 0x011D
90 #define ANSELA_ADDR 0x018C
91 #define ANSELB_ADDR 0x018D
92 #define ANSELC_ADDR 0x018E
93 #define PMADR_ADDR 0x0191
94 #define PMADRL_ADDR 0x0191
95 #define PMADRH_ADDR 0x0192
96 #define PMDAT_ADDR 0x0193
97 #define PMDATL_ADDR 0x0193
98 #define PMDATH_ADDR 0x0194
99 #define PMCON1_ADDR 0x0195
100 #define PMCON2_ADDR 0x0196
101 #define VREGCON_ADDR 0x0197
102 #define RCREG_ADDR 0x0199
103 #define TXREG_ADDR 0x019A
104 #define SP1BRG_ADDR 0x019B
105 #define SP1BRGL_ADDR 0x019B
106 #define SPBRG_ADDR 0x019B
107 #define SPBRGL_ADDR 0x019B
108 #define SP1BRGH_ADDR 0x019C
109 #define SPBRGH_ADDR 0x019C
110 #define RCSTA_ADDR 0x019D
111 #define TXSTA_ADDR 0x019E
112 #define BAUDCON_ADDR 0x019F
113 #define WPUB_ADDR 0x020D
114 #define WPUE_ADDR 0x0210
115 #define SSP1BUF_ADDR 0x0211
116 #define SSPBUF_ADDR 0x0211
117 #define SSP1ADD_ADDR 0x0212
118 #define SSPADD_ADDR 0x0212
119 #define SSP1MSK_ADDR 0x0213
120 #define SSPMSK_ADDR 0x0213
121 #define SSP1STAT_ADDR 0x0214
122 #define SSPSTAT_ADDR 0x0214
123 #define SSP1CON1_ADDR 0x0215
124 #define SSPCON_ADDR 0x0215
125 #define SSPCON1_ADDR 0x0215
126 #define SSP1CON2_ADDR 0x0216
127 #define SSPCON2_ADDR 0x0216
128 #define SSP1CON3_ADDR 0x0217
129 #define SSPCON3_ADDR 0x0217
130 #define CCPR1_ADDR 0x0291
131 #define CCPR1L_ADDR 0x0291
132 #define CCPR1H_ADDR 0x0292
133 #define CCP1CON_ADDR 0x0293
134 #define CCPR2_ADDR 0x0298
135 #define CCPR2L_ADDR 0x0298
136 #define CCPR2H_ADDR 0x0299
137 #define CCP2CON_ADDR 0x029A
138 #define IOCBP_ADDR 0x0394
139 #define IOCBN_ADDR 0x0395
140 #define IOCBF_ADDR 0x0396
141 #define AADCON0_ADDR 0x0711
142 #define AADCON1_ADDR 0x0712
143 #define AADCON2_ADDR 0x0713
144 #define AADCON3_ADDR 0x0714
145 #define AADSTAT_ADDR 0x0715
146 #define AADPRE_ADDR 0x0716
147 #define AADACQ_ADDR 0x0717
148 #define AADGRD_ADDR 0x0718
149 #define AADCAP_ADDR 0x0719
150 #define AADRES0_ADDR 0x071A
151 #define AADRES0L_ADDR 0x071A
152 #define AD1RES0_ADDR 0x071A
153 #define AADRES0H_ADDR 0x071B
154 #define AADRES1_ADDR 0x071C
155 #define AADRES1L_ADDR 0x071C
156 #define AD1RES1_ADDR 0x071C
157 #define AADRES1H_ADDR 0x071D
158 #define STATUS_SHAD_ADDR 0x0FE4
159 #define WREG_SHAD_ADDR 0x0FE5
160 #define BSR_SHAD_ADDR 0x0FE6
161 #define PCLATH_SHAD_ADDR 0x0FE7
162 #define FSR0L_SHAD_ADDR 0x0FE8
163 #define FSR0H_SHAD_ADDR 0x0FE9
164 #define FSR1L_SHAD_ADDR 0x0FEA
165 #define FSR1H_SHAD_ADDR 0x0FEB
166 #define STKPTR_ADDR 0x0FED
167 #define TOSL_ADDR 0x0FEE
168 #define TOSH_ADDR 0x0FEF
170 #endif // #ifndef NO_ADDR_DEFINES
172 //==============================================================================
174 // Register Definitions
176 //==============================================================================
178 extern __at(0x0000) __sfr INDF0;
179 extern __at(0x0001) __sfr INDF1;
180 extern __at(0x0002) __sfr PCL;
182 //==============================================================================
183 // STATUS Bits
185 extern __at(0x0003) __sfr STATUS;
187 typedef struct
189 unsigned C : 1;
190 unsigned DC : 1;
191 unsigned Z : 1;
192 unsigned NOT_PD : 1;
193 unsigned NOT_TO : 1;
194 unsigned : 1;
195 unsigned : 1;
196 unsigned : 1;
197 } __STATUSbits_t;
199 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
201 #define _C 0x01
202 #define _DC 0x02
203 #define _Z 0x04
204 #define _NOT_PD 0x08
205 #define _NOT_TO 0x10
207 //==============================================================================
209 extern __at(0x0004) __sfr FSR0;
210 extern __at(0x0004) __sfr FSR0L;
211 extern __at(0x0005) __sfr FSR0H;
212 extern __at(0x0006) __sfr FSR1;
213 extern __at(0x0006) __sfr FSR1L;
214 extern __at(0x0007) __sfr FSR1H;
216 //==============================================================================
217 // BSR Bits
219 extern __at(0x0008) __sfr BSR;
221 typedef union
223 struct
225 unsigned BSR0 : 1;
226 unsigned BSR1 : 1;
227 unsigned BSR2 : 1;
228 unsigned BSR3 : 1;
229 unsigned BSR4 : 1;
230 unsigned : 1;
231 unsigned : 1;
232 unsigned : 1;
235 struct
237 unsigned BSR : 5;
238 unsigned : 3;
240 } __BSRbits_t;
242 extern __at(0x0008) volatile __BSRbits_t BSRbits;
244 #define _BSR0 0x01
245 #define _BSR1 0x02
246 #define _BSR2 0x04
247 #define _BSR3 0x08
248 #define _BSR4 0x10
250 //==============================================================================
252 extern __at(0x0009) __sfr WREG;
253 extern __at(0x000A) __sfr PCLATH;
255 //==============================================================================
256 // INTCON Bits
258 extern __at(0x000B) __sfr INTCON;
260 typedef union
262 struct
264 unsigned IOCIF : 1;
265 unsigned INTF : 1;
266 unsigned TMR0IF : 1;
267 unsigned IOCIE : 1;
268 unsigned INTE : 1;
269 unsigned TMR0IE : 1;
270 unsigned PEIE : 1;
271 unsigned GIE : 1;
274 struct
276 unsigned : 1;
277 unsigned : 1;
278 unsigned T0IF : 1;
279 unsigned : 1;
280 unsigned : 1;
281 unsigned T0IE : 1;
282 unsigned : 1;
283 unsigned : 1;
285 } __INTCONbits_t;
287 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
289 #define _IOCIF 0x01
290 #define _INTF 0x02
291 #define _TMR0IF 0x04
292 #define _T0IF 0x04
293 #define _IOCIE 0x08
294 #define _INTE 0x10
295 #define _TMR0IE 0x20
296 #define _T0IE 0x20
297 #define _PEIE 0x40
298 #define _GIE 0x80
300 //==============================================================================
303 //==============================================================================
304 // PORTA Bits
306 extern __at(0x000C) __sfr PORTA;
308 typedef struct
310 unsigned RA0 : 1;
311 unsigned RA1 : 1;
312 unsigned RA2 : 1;
313 unsigned RA3 : 1;
314 unsigned RA4 : 1;
315 unsigned RA5 : 1;
316 unsigned RA6 : 1;
317 unsigned RA7 : 1;
318 } __PORTAbits_t;
320 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
322 #define _RA0 0x01
323 #define _RA1 0x02
324 #define _RA2 0x04
325 #define _RA3 0x08
326 #define _RA4 0x10
327 #define _RA5 0x20
328 #define _RA6 0x40
329 #define _RA7 0x80
331 //==============================================================================
334 //==============================================================================
335 // PORTB Bits
337 extern __at(0x000D) __sfr PORTB;
339 typedef struct
341 unsigned RB0 : 1;
342 unsigned RB1 : 1;
343 unsigned RB2 : 1;
344 unsigned RB3 : 1;
345 unsigned RB4 : 1;
346 unsigned RB5 : 1;
347 unsigned RB6 : 1;
348 unsigned RB7 : 1;
349 } __PORTBbits_t;
351 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
353 #define _RB0 0x01
354 #define _RB1 0x02
355 #define _RB2 0x04
356 #define _RB3 0x08
357 #define _RB4 0x10
358 #define _RB5 0x20
359 #define _RB6 0x40
360 #define _RB7 0x80
362 //==============================================================================
365 //==============================================================================
366 // PORTC Bits
368 extern __at(0x000E) __sfr PORTC;
370 typedef struct
372 unsigned RC0 : 1;
373 unsigned RC1 : 1;
374 unsigned RC2 : 1;
375 unsigned RC3 : 1;
376 unsigned RC4 : 1;
377 unsigned RC5 : 1;
378 unsigned RC6 : 1;
379 unsigned RC7 : 1;
380 } __PORTCbits_t;
382 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
384 #define _RC0 0x01
385 #define _RC1 0x02
386 #define _RC2 0x04
387 #define _RC3 0x08
388 #define _RC4 0x10
389 #define _RC5 0x20
390 #define _RC6 0x40
391 #define _RC7 0x80
393 //==============================================================================
396 //==============================================================================
397 // PORTE Bits
399 extern __at(0x0010) __sfr PORTE;
401 typedef struct
403 unsigned : 1;
404 unsigned : 1;
405 unsigned : 1;
406 unsigned RE3 : 1;
407 unsigned : 1;
408 unsigned : 1;
409 unsigned : 1;
410 unsigned : 1;
411 } __PORTEbits_t;
413 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
415 #define _RE3 0x08
417 //==============================================================================
420 //==============================================================================
421 // PIR1 Bits
423 extern __at(0x0011) __sfr PIR1;
425 typedef struct
427 unsigned TMR1IF : 1;
428 unsigned TMR2IF : 1;
429 unsigned CCP1IF : 1;
430 unsigned SSPIF : 1;
431 unsigned TXIF : 1;
432 unsigned RCIF : 1;
433 unsigned ADIF : 1;
434 unsigned TMR1GIF : 1;
435 } __PIR1bits_t;
437 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
439 #define _TMR1IF 0x01
440 #define _TMR2IF 0x02
441 #define _CCP1IF 0x04
442 #define _SSPIF 0x08
443 #define _TXIF 0x10
444 #define _RCIF 0x20
445 #define _ADIF 0x40
446 #define _TMR1GIF 0x80
448 //==============================================================================
451 //==============================================================================
452 // PIR2 Bits
454 extern __at(0x0012) __sfr PIR2;
456 typedef struct
458 unsigned CCP2IF : 1;
459 unsigned : 1;
460 unsigned : 1;
461 unsigned BCLIF : 1;
462 unsigned : 1;
463 unsigned : 1;
464 unsigned : 1;
465 unsigned OSFIF : 1;
466 } __PIR2bits_t;
468 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
470 #define _CCP2IF 0x01
471 #define _BCLIF 0x08
472 #define _OSFIF 0x80
474 //==============================================================================
476 extern __at(0x0015) __sfr TMR0;
477 extern __at(0x0016) __sfr TMR1;
478 extern __at(0x0016) __sfr TMR1L;
479 extern __at(0x0017) __sfr TMR1H;
481 //==============================================================================
482 // T1CON Bits
484 extern __at(0x0018) __sfr T1CON;
486 typedef union
488 struct
490 unsigned TMR1ON : 1;
491 unsigned : 1;
492 unsigned NOT_T1SYNC : 1;
493 unsigned T1OSCEN : 1;
494 unsigned T1CKPS0 : 1;
495 unsigned T1CKPS1 : 1;
496 unsigned TMR1CS0 : 1;
497 unsigned TMR1CS1 : 1;
500 struct
502 unsigned : 4;
503 unsigned T1CKPS : 2;
504 unsigned : 2;
507 struct
509 unsigned : 6;
510 unsigned TMR1CS : 2;
512 } __T1CONbits_t;
514 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
516 #define _TMR1ON 0x01
517 #define _NOT_T1SYNC 0x04
518 #define _T1OSCEN 0x08
519 #define _T1CKPS0 0x10
520 #define _T1CKPS1 0x20
521 #define _TMR1CS0 0x40
522 #define _TMR1CS1 0x80
524 //==============================================================================
527 //==============================================================================
528 // T1GCON Bits
530 extern __at(0x0019) __sfr T1GCON;
532 typedef union
534 struct
536 unsigned T1GSS0 : 1;
537 unsigned T1GSS1 : 1;
538 unsigned T1GVAL : 1;
539 unsigned T1GGO_NOT_DONE : 1;
540 unsigned T1GSPM : 1;
541 unsigned T1GTM : 1;
542 unsigned T1GPOL : 1;
543 unsigned TMR1GE : 1;
546 struct
548 unsigned T1GSS : 2;
549 unsigned : 6;
551 } __T1GCONbits_t;
553 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
555 #define _T1GSS0 0x01
556 #define _T1GSS1 0x02
557 #define _T1GVAL 0x04
558 #define _T1GGO_NOT_DONE 0x08
559 #define _T1GSPM 0x10
560 #define _T1GTM 0x20
561 #define _T1GPOL 0x40
562 #define _TMR1GE 0x80
564 //==============================================================================
566 extern __at(0x001A) __sfr TMR2;
567 extern __at(0x001B) __sfr PR2;
569 //==============================================================================
570 // T2CON Bits
572 extern __at(0x001C) __sfr T2CON;
574 typedef union
576 struct
578 unsigned T2CKPS0 : 1;
579 unsigned T2CKPS1 : 1;
580 unsigned TMR2ON : 1;
581 unsigned T2OUTPS0 : 1;
582 unsigned T2OUTPS1 : 1;
583 unsigned T2OUTPS2 : 1;
584 unsigned T2OUTPS3 : 1;
585 unsigned : 1;
588 struct
590 unsigned T2CKPS : 2;
591 unsigned : 6;
594 struct
596 unsigned : 3;
597 unsigned T2OUTPS : 4;
598 unsigned : 1;
600 } __T2CONbits_t;
602 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
604 #define _T2CKPS0 0x01
605 #define _T2CKPS1 0x02
606 #define _TMR2ON 0x04
607 #define _T2OUTPS0 0x08
608 #define _T2OUTPS1 0x10
609 #define _T2OUTPS2 0x20
610 #define _T2OUTPS3 0x40
612 //==============================================================================
615 //==============================================================================
616 // TRISA Bits
618 extern __at(0x008C) __sfr TRISA;
620 typedef struct
622 unsigned TRISA0 : 1;
623 unsigned TRISA1 : 1;
624 unsigned TRISA2 : 1;
625 unsigned TRISA3 : 1;
626 unsigned TRISA4 : 1;
627 unsigned TRISA5 : 1;
628 unsigned TRISA6 : 1;
629 unsigned TRISA7 : 1;
630 } __TRISAbits_t;
632 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
634 #define _TRISA0 0x01
635 #define _TRISA1 0x02
636 #define _TRISA2 0x04
637 #define _TRISA3 0x08
638 #define _TRISA4 0x10
639 #define _TRISA5 0x20
640 #define _TRISA6 0x40
641 #define _TRISA7 0x80
643 //==============================================================================
646 //==============================================================================
647 // TRISB Bits
649 extern __at(0x008D) __sfr TRISB;
651 typedef struct
653 unsigned TRISB0 : 1;
654 unsigned TRISB1 : 1;
655 unsigned TRISB2 : 1;
656 unsigned TRISB3 : 1;
657 unsigned TRISB4 : 1;
658 unsigned TRISB5 : 1;
659 unsigned TRISB6 : 1;
660 unsigned TRISB7 : 1;
661 } __TRISBbits_t;
663 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
665 #define _TRISB0 0x01
666 #define _TRISB1 0x02
667 #define _TRISB2 0x04
668 #define _TRISB3 0x08
669 #define _TRISB4 0x10
670 #define _TRISB5 0x20
671 #define _TRISB6 0x40
672 #define _TRISB7 0x80
674 //==============================================================================
677 //==============================================================================
678 // TRISC Bits
680 extern __at(0x008E) __sfr TRISC;
682 typedef struct
684 unsigned TRISC0 : 1;
685 unsigned TRISC1 : 1;
686 unsigned TRISC2 : 1;
687 unsigned TRISC3 : 1;
688 unsigned TRISC4 : 1;
689 unsigned TRISC5 : 1;
690 unsigned TRISC6 : 1;
691 unsigned TRISC7 : 1;
692 } __TRISCbits_t;
694 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
696 #define _TRISC0 0x01
697 #define _TRISC1 0x02
698 #define _TRISC2 0x04
699 #define _TRISC3 0x08
700 #define _TRISC4 0x10
701 #define _TRISC5 0x20
702 #define _TRISC6 0x40
703 #define _TRISC7 0x80
705 //==============================================================================
707 extern __at(0x0090) __sfr TRISE;
709 //==============================================================================
710 // PIE1 Bits
712 extern __at(0x0091) __sfr PIE1;
714 typedef struct
716 unsigned TMR1IE : 1;
717 unsigned TMR2IE : 1;
718 unsigned CCP1IE : 1;
719 unsigned SSPIE : 1;
720 unsigned TXIE : 1;
721 unsigned RCIE : 1;
722 unsigned ADIE : 1;
723 unsigned TMR1GIE : 1;
724 } __PIE1bits_t;
726 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
728 #define _TMR1IE 0x01
729 #define _TMR2IE 0x02
730 #define _CCP1IE 0x04
731 #define _SSPIE 0x08
732 #define _TXIE 0x10
733 #define _RCIE 0x20
734 #define _ADIE 0x40
735 #define _TMR1GIE 0x80
737 //==============================================================================
740 //==============================================================================
741 // PIE2 Bits
743 extern __at(0x0092) __sfr PIE2;
745 typedef struct
747 unsigned CCP2IE : 1;
748 unsigned : 1;
749 unsigned : 1;
750 unsigned BCLIE : 1;
751 unsigned : 1;
752 unsigned : 1;
753 unsigned : 1;
754 unsigned OSFIE : 1;
755 } __PIE2bits_t;
757 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
759 #define _CCP2IE 0x01
760 #define _BCLIE 0x08
761 #define _OSFIE 0x80
763 //==============================================================================
766 //==============================================================================
767 // OPTION_REG Bits
769 extern __at(0x0095) __sfr OPTION_REG;
771 typedef union
773 struct
775 unsigned PS0 : 1;
776 unsigned PS1 : 1;
777 unsigned PS2 : 1;
778 unsigned PSA : 1;
779 unsigned TMR0SE : 1;
780 unsigned TMR0CS : 1;
781 unsigned INTEDG : 1;
782 unsigned NOT_WPUEN : 1;
785 struct
787 unsigned : 1;
788 unsigned : 1;
789 unsigned : 1;
790 unsigned : 1;
791 unsigned T0SE : 1;
792 unsigned T0CS : 1;
793 unsigned : 1;
794 unsigned : 1;
797 struct
799 unsigned PS : 3;
800 unsigned : 5;
802 } __OPTION_REGbits_t;
804 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
806 #define _PS0 0x01
807 #define _PS1 0x02
808 #define _PS2 0x04
809 #define _PSA 0x08
810 #define _TMR0SE 0x10
811 #define _T0SE 0x10
812 #define _TMR0CS 0x20
813 #define _T0CS 0x20
814 #define _INTEDG 0x40
815 #define _NOT_WPUEN 0x80
817 //==============================================================================
820 //==============================================================================
821 // PCON Bits
823 extern __at(0x0096) __sfr PCON;
825 typedef struct
827 unsigned NOT_BOR : 1;
828 unsigned NOT_POR : 1;
829 unsigned NOT_RI : 1;
830 unsigned NOT_RMCLR : 1;
831 unsigned NOT_RWDT : 1;
832 unsigned : 1;
833 unsigned STKUNF : 1;
834 unsigned STKOVF : 1;
835 } __PCONbits_t;
837 extern __at(0x0096) volatile __PCONbits_t PCONbits;
839 #define _NOT_BOR 0x01
840 #define _NOT_POR 0x02
841 #define _NOT_RI 0x04
842 #define _NOT_RMCLR 0x08
843 #define _NOT_RWDT 0x10
844 #define _STKUNF 0x40
845 #define _STKOVF 0x80
847 //==============================================================================
850 //==============================================================================
851 // WDTCON Bits
853 extern __at(0x0097) __sfr WDTCON;
855 typedef union
857 struct
859 unsigned SWDTEN : 1;
860 unsigned WDTPS0 : 1;
861 unsigned WDTPS1 : 1;
862 unsigned WDTPS2 : 1;
863 unsigned WDTPS3 : 1;
864 unsigned WDTPS4 : 1;
865 unsigned : 1;
866 unsigned : 1;
869 struct
871 unsigned : 1;
872 unsigned WDTPS : 5;
873 unsigned : 2;
875 } __WDTCONbits_t;
877 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
879 #define _SWDTEN 0x01
880 #define _WDTPS0 0x02
881 #define _WDTPS1 0x04
882 #define _WDTPS2 0x08
883 #define _WDTPS3 0x10
884 #define _WDTPS4 0x20
886 //==============================================================================
889 //==============================================================================
890 // OSCCON Bits
892 extern __at(0x0099) __sfr OSCCON;
894 typedef union
896 struct
898 unsigned SCS0 : 1;
899 unsigned SCS1 : 1;
900 unsigned : 1;
901 unsigned IRCF0 : 1;
902 unsigned IRCF1 : 1;
903 unsigned IRCF2 : 1;
904 unsigned IRCF3 : 1;
905 unsigned : 1;
908 struct
910 unsigned SCS : 2;
911 unsigned : 6;
914 struct
916 unsigned : 3;
917 unsigned IRCF : 4;
918 unsigned : 1;
920 } __OSCCONbits_t;
922 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
924 #define _SCS0 0x01
925 #define _SCS1 0x02
926 #define _IRCF0 0x08
927 #define _IRCF1 0x10
928 #define _IRCF2 0x20
929 #define _IRCF3 0x40
931 //==============================================================================
934 //==============================================================================
935 // OSCSTAT Bits
937 extern __at(0x009A) __sfr OSCSTAT;
939 typedef union
941 struct
943 unsigned HFIOFS : 1;
944 unsigned LFIOFR : 1;
945 unsigned : 1;
946 unsigned : 1;
947 unsigned HFIOFR : 1;
948 unsigned OSTS : 1;
949 unsigned : 1;
950 unsigned SOSCR : 1;
953 struct
955 unsigned : 1;
956 unsigned : 1;
957 unsigned : 1;
958 unsigned : 1;
959 unsigned : 1;
960 unsigned : 1;
961 unsigned : 1;
962 unsigned T1OSCR : 1;
964 } __OSCSTATbits_t;
966 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
968 #define _HFIOFS 0x01
969 #define _LFIOFR 0x02
970 #define _HFIOFR 0x10
971 #define _OSTS 0x20
972 #define _SOSCR 0x80
973 #define _T1OSCR 0x80
975 //==============================================================================
977 extern __at(0x009B) __sfr ADRES;
978 extern __at(0x009B) __sfr ADRES0;
979 extern __at(0x009B) __sfr ADRES0L;
980 extern __at(0x009B) __sfr ADRESL;
981 extern __at(0x009C) __sfr ADRES0H;
982 extern __at(0x009C) __sfr ADRESH;
984 //==============================================================================
985 // ADCON0 Bits
987 extern __at(0x009D) __sfr ADCON0;
989 typedef union
991 struct
993 unsigned ADON : 1;
994 unsigned GO_NOT_DONE : 1;
995 unsigned CHS0 : 1;
996 unsigned CHS1 : 1;
997 unsigned CHS2 : 1;
998 unsigned CHS3 : 1;
999 unsigned CHS4 : 1;
1000 unsigned : 1;
1003 struct
1005 unsigned : 1;
1006 unsigned ADGO : 1;
1007 unsigned : 1;
1008 unsigned : 1;
1009 unsigned : 1;
1010 unsigned : 1;
1011 unsigned : 1;
1012 unsigned : 1;
1015 struct
1017 unsigned : 1;
1018 unsigned GO : 1;
1019 unsigned : 1;
1020 unsigned : 1;
1021 unsigned : 1;
1022 unsigned : 1;
1023 unsigned : 1;
1024 unsigned : 1;
1027 struct
1029 unsigned : 2;
1030 unsigned CHS : 5;
1031 unsigned : 1;
1033 } __ADCON0bits_t;
1035 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1037 #define _ADCON0_ADON 0x01
1038 #define _ADCON0_GO_NOT_DONE 0x02
1039 #define _ADCON0_ADGO 0x02
1040 #define _ADCON0_GO 0x02
1041 #define _ADCON0_CHS0 0x04
1042 #define _ADCON0_CHS1 0x08
1043 #define _ADCON0_CHS2 0x10
1044 #define _ADCON0_CHS3 0x20
1045 #define _ADCON0_CHS4 0x40
1047 //==============================================================================
1050 //==============================================================================
1051 // ADCON1 Bits
1053 extern __at(0x009E) __sfr ADCON1;
1055 typedef union
1057 struct
1059 unsigned ADPREF0 : 1;
1060 unsigned ADPREF1 : 1;
1061 unsigned : 1;
1062 unsigned : 1;
1063 unsigned ADCS0 : 1;
1064 unsigned ADCS1 : 1;
1065 unsigned ADCS2 : 1;
1066 unsigned ADFM : 1;
1069 struct
1071 unsigned ADPREF : 2;
1072 unsigned : 6;
1075 struct
1077 unsigned : 4;
1078 unsigned ADCS : 3;
1079 unsigned : 1;
1081 } __ADCON1bits_t;
1083 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1085 #define _ADCON1_ADPREF0 0x01
1086 #define _ADCON1_ADPREF1 0x02
1087 #define _ADCON1_ADCS0 0x10
1088 #define _ADCON1_ADCS1 0x20
1089 #define _ADCON1_ADCS2 0x40
1090 #define _ADCON1_ADFM 0x80
1092 //==============================================================================
1095 //==============================================================================
1096 // LATA Bits
1098 extern __at(0x010C) __sfr LATA;
1100 typedef struct
1102 unsigned LATA0 : 1;
1103 unsigned LATA1 : 1;
1104 unsigned LATA2 : 1;
1105 unsigned LATA3 : 1;
1106 unsigned LATA4 : 1;
1107 unsigned LATA5 : 1;
1108 unsigned LATA6 : 1;
1109 unsigned LATA7 : 1;
1110 } __LATAbits_t;
1112 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1114 #define _LATA0 0x01
1115 #define _LATA1 0x02
1116 #define _LATA2 0x04
1117 #define _LATA3 0x08
1118 #define _LATA4 0x10
1119 #define _LATA5 0x20
1120 #define _LATA6 0x40
1121 #define _LATA7 0x80
1123 //==============================================================================
1126 //==============================================================================
1127 // LATB Bits
1129 extern __at(0x010D) __sfr LATB;
1131 typedef struct
1133 unsigned LATB0 : 1;
1134 unsigned LATB1 : 1;
1135 unsigned LATB2 : 1;
1136 unsigned LATB3 : 1;
1137 unsigned LATB4 : 1;
1138 unsigned LATB5 : 1;
1139 unsigned LATB6 : 1;
1140 unsigned LATB7 : 1;
1141 } __LATBbits_t;
1143 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1145 #define _LATB0 0x01
1146 #define _LATB1 0x02
1147 #define _LATB2 0x04
1148 #define _LATB3 0x08
1149 #define _LATB4 0x10
1150 #define _LATB5 0x20
1151 #define _LATB6 0x40
1152 #define _LATB7 0x80
1154 //==============================================================================
1157 //==============================================================================
1158 // LATC Bits
1160 extern __at(0x010E) __sfr LATC;
1162 typedef struct
1164 unsigned LATC0 : 1;
1165 unsigned LATC1 : 1;
1166 unsigned LATC2 : 1;
1167 unsigned LATC3 : 1;
1168 unsigned LATC4 : 1;
1169 unsigned LATC5 : 1;
1170 unsigned LATC6 : 1;
1171 unsigned LATC7 : 1;
1172 } __LATCbits_t;
1174 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1176 #define _LATC0 0x01
1177 #define _LATC1 0x02
1178 #define _LATC2 0x04
1179 #define _LATC3 0x08
1180 #define _LATC4 0x10
1181 #define _LATC5 0x20
1182 #define _LATC6 0x40
1183 #define _LATC7 0x80
1185 //==============================================================================
1188 //==============================================================================
1189 // BORCON Bits
1191 extern __at(0x0116) __sfr BORCON;
1193 typedef struct
1195 unsigned BORRDY : 1;
1196 unsigned : 1;
1197 unsigned : 1;
1198 unsigned : 1;
1199 unsigned : 1;
1200 unsigned : 1;
1201 unsigned BORFS : 1;
1202 unsigned SBOREN : 1;
1203 } __BORCONbits_t;
1205 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1207 #define _BORRDY 0x01
1208 #define _BORFS 0x40
1209 #define _SBOREN 0x80
1211 //==============================================================================
1214 //==============================================================================
1215 // FVRCON Bits
1217 extern __at(0x0117) __sfr FVRCON;
1219 typedef union
1221 struct
1223 unsigned ADFVR0 : 1;
1224 unsigned ADFVR1 : 1;
1225 unsigned : 1;
1226 unsigned : 1;
1227 unsigned TSRNG : 1;
1228 unsigned TSEN : 1;
1229 unsigned FVRRDY : 1;
1230 unsigned FVREN : 1;
1233 struct
1235 unsigned ADFVR : 2;
1236 unsigned : 6;
1238 } __FVRCONbits_t;
1240 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1242 #define _ADFVR0 0x01
1243 #define _ADFVR1 0x02
1244 #define _TSRNG 0x10
1245 #define _TSEN 0x20
1246 #define _FVRRDY 0x40
1247 #define _FVREN 0x80
1249 //==============================================================================
1252 //==============================================================================
1253 // APFCON Bits
1255 extern __at(0x011D) __sfr APFCON;
1257 typedef struct
1259 unsigned CCP2SEL : 1;
1260 unsigned SSSEL : 1;
1261 unsigned : 1;
1262 unsigned : 1;
1263 unsigned : 1;
1264 unsigned : 1;
1265 unsigned : 1;
1266 unsigned : 1;
1267 } __APFCONbits_t;
1269 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1271 #define _CCP2SEL 0x01
1272 #define _SSSEL 0x02
1274 //==============================================================================
1277 //==============================================================================
1278 // ANSELA Bits
1280 extern __at(0x018C) __sfr ANSELA;
1282 typedef struct
1284 unsigned ANSA0 : 1;
1285 unsigned ANSA1 : 1;
1286 unsigned ANSA2 : 1;
1287 unsigned ANSA3 : 1;
1288 unsigned : 1;
1289 unsigned ANSA5 : 1;
1290 unsigned : 1;
1291 unsigned : 1;
1292 } __ANSELAbits_t;
1294 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1296 #define _ANSA0 0x01
1297 #define _ANSA1 0x02
1298 #define _ANSA2 0x04
1299 #define _ANSA3 0x08
1300 #define _ANSA5 0x20
1302 //==============================================================================
1305 //==============================================================================
1306 // ANSELB Bits
1308 extern __at(0x018D) __sfr ANSELB;
1310 typedef union
1312 struct
1314 unsigned ANSB0 : 1;
1315 unsigned ANSB1 : 1;
1316 unsigned ANSB2 : 1;
1317 unsigned ANSB3 : 1;
1318 unsigned ANSB4 : 1;
1319 unsigned ANSB5 : 1;
1320 unsigned : 1;
1321 unsigned : 1;
1324 struct
1326 unsigned ANSB : 6;
1327 unsigned : 2;
1329 } __ANSELBbits_t;
1331 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1333 #define _ANSB0 0x01
1334 #define _ANSB1 0x02
1335 #define _ANSB2 0x04
1336 #define _ANSB3 0x08
1337 #define _ANSB4 0x10
1338 #define _ANSB5 0x20
1340 //==============================================================================
1343 //==============================================================================
1344 // ANSELC Bits
1346 extern __at(0x018E) __sfr ANSELC;
1348 typedef struct
1350 unsigned : 1;
1351 unsigned : 1;
1352 unsigned ANSC2 : 1;
1353 unsigned ANSC3 : 1;
1354 unsigned ANSC4 : 1;
1355 unsigned ANSC5 : 1;
1356 unsigned ANSC6 : 1;
1357 unsigned ANSC7 : 1;
1358 } __ANSELCbits_t;
1360 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1362 #define _ANSC2 0x04
1363 #define _ANSC3 0x08
1364 #define _ANSC4 0x10
1365 #define _ANSC5 0x20
1366 #define _ANSC6 0x40
1367 #define _ANSC7 0x80
1369 //==============================================================================
1371 extern __at(0x0191) __sfr PMADR;
1372 extern __at(0x0191) __sfr PMADRL;
1373 extern __at(0x0192) __sfr PMADRH;
1374 extern __at(0x0193) __sfr PMDAT;
1375 extern __at(0x0193) __sfr PMDATL;
1376 extern __at(0x0194) __sfr PMDATH;
1378 //==============================================================================
1379 // PMCON1 Bits
1381 extern __at(0x0195) __sfr PMCON1;
1383 typedef struct
1385 unsigned RD : 1;
1386 unsigned WR : 1;
1387 unsigned WREN : 1;
1388 unsigned WRERR : 1;
1389 unsigned FREE : 1;
1390 unsigned LWLO : 1;
1391 unsigned CFGS : 1;
1392 unsigned : 1;
1393 } __PMCON1bits_t;
1395 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1397 #define _RD 0x01
1398 #define _WR 0x02
1399 #define _WREN 0x04
1400 #define _WRERR 0x08
1401 #define _FREE 0x10
1402 #define _LWLO 0x20
1403 #define _CFGS 0x40
1405 //==============================================================================
1407 extern __at(0x0196) __sfr PMCON2;
1409 //==============================================================================
1410 // VREGCON Bits
1412 extern __at(0x0197) __sfr VREGCON;
1414 typedef struct
1416 unsigned reserved : 1;
1417 unsigned VREGPM : 1;
1418 unsigned : 1;
1419 unsigned : 1;
1420 unsigned : 1;
1421 unsigned : 1;
1422 unsigned : 1;
1423 unsigned : 1;
1424 } __VREGCONbits_t;
1426 extern __at(0x0197) volatile __VREGCONbits_t VREGCONbits;
1428 #define _reserved 0x01
1429 #define _VREGPM 0x02
1431 //==============================================================================
1433 extern __at(0x0199) __sfr RCREG;
1434 extern __at(0x019A) __sfr TXREG;
1435 extern __at(0x019B) __sfr SP1BRG;
1436 extern __at(0x019B) __sfr SP1BRGL;
1437 extern __at(0x019B) __sfr SPBRG;
1438 extern __at(0x019B) __sfr SPBRGL;
1439 extern __at(0x019C) __sfr SP1BRGH;
1440 extern __at(0x019C) __sfr SPBRGH;
1442 //==============================================================================
1443 // RCSTA Bits
1445 extern __at(0x019D) __sfr RCSTA;
1447 typedef struct
1449 unsigned RX9D : 1;
1450 unsigned OERR : 1;
1451 unsigned FERR : 1;
1452 unsigned ADDEN : 1;
1453 unsigned CREN : 1;
1454 unsigned SREN : 1;
1455 unsigned RX9 : 1;
1456 unsigned SPEN : 1;
1457 } __RCSTAbits_t;
1459 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1461 #define _RX9D 0x01
1462 #define _OERR 0x02
1463 #define _FERR 0x04
1464 #define _ADDEN 0x08
1465 #define _CREN 0x10
1466 #define _SREN 0x20
1467 #define _RX9 0x40
1468 #define _SPEN 0x80
1470 //==============================================================================
1473 //==============================================================================
1474 // TXSTA Bits
1476 extern __at(0x019E) __sfr TXSTA;
1478 typedef struct
1480 unsigned TX9D : 1;
1481 unsigned TRMT : 1;
1482 unsigned BRGH : 1;
1483 unsigned SENDB : 1;
1484 unsigned SYNC : 1;
1485 unsigned TXEN : 1;
1486 unsigned TX9 : 1;
1487 unsigned CSRC : 1;
1488 } __TXSTAbits_t;
1490 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
1492 #define _TX9D 0x01
1493 #define _TRMT 0x02
1494 #define _BRGH 0x04
1495 #define _SENDB 0x08
1496 #define _SYNC 0x10
1497 #define _TXEN 0x20
1498 #define _TX9 0x40
1499 #define _CSRC 0x80
1501 //==============================================================================
1504 //==============================================================================
1505 // BAUDCON Bits
1507 extern __at(0x019F) __sfr BAUDCON;
1509 typedef struct
1511 unsigned ABDEN : 1;
1512 unsigned WUE : 1;
1513 unsigned : 1;
1514 unsigned BRG16 : 1;
1515 unsigned SCKP : 1;
1516 unsigned : 1;
1517 unsigned RCIDL : 1;
1518 unsigned ABDOVF : 1;
1519 } __BAUDCONbits_t;
1521 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
1523 #define _ABDEN 0x01
1524 #define _WUE 0x02
1525 #define _BRG16 0x08
1526 #define _SCKP 0x10
1527 #define _RCIDL 0x40
1528 #define _ABDOVF 0x80
1530 //==============================================================================
1533 //==============================================================================
1534 // WPUB Bits
1536 extern __at(0x020D) __sfr WPUB;
1538 typedef struct
1540 unsigned WPUB0 : 1;
1541 unsigned WPUB1 : 1;
1542 unsigned WPUB2 : 1;
1543 unsigned WPUB3 : 1;
1544 unsigned WPUB4 : 1;
1545 unsigned WPUB5 : 1;
1546 unsigned WPUB6 : 1;
1547 unsigned WPUB7 : 1;
1548 } __WPUBbits_t;
1550 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
1552 #define _WPUB0 0x01
1553 #define _WPUB1 0x02
1554 #define _WPUB2 0x04
1555 #define _WPUB3 0x08
1556 #define _WPUB4 0x10
1557 #define _WPUB5 0x20
1558 #define _WPUB6 0x40
1559 #define _WPUB7 0x80
1561 //==============================================================================
1564 //==============================================================================
1565 // WPUE Bits
1567 extern __at(0x0210) __sfr WPUE;
1569 typedef struct
1571 unsigned : 1;
1572 unsigned : 1;
1573 unsigned : 1;
1574 unsigned WPUE3 : 1;
1575 unsigned : 1;
1576 unsigned : 1;
1577 unsigned : 1;
1578 unsigned : 1;
1579 } __WPUEbits_t;
1581 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
1583 #define _WPUE3 0x08
1585 //==============================================================================
1587 extern __at(0x0211) __sfr SSP1BUF;
1588 extern __at(0x0211) __sfr SSPBUF;
1589 extern __at(0x0212) __sfr SSP1ADD;
1590 extern __at(0x0212) __sfr SSPADD;
1591 extern __at(0x0213) __sfr SSP1MSK;
1592 extern __at(0x0213) __sfr SSPMSK;
1594 //==============================================================================
1595 // SSP1STAT Bits
1597 extern __at(0x0214) __sfr SSP1STAT;
1599 typedef struct
1601 unsigned BF : 1;
1602 unsigned UA : 1;
1603 unsigned R_NOT_W : 1;
1604 unsigned S : 1;
1605 unsigned P : 1;
1606 unsigned D_NOT_A : 1;
1607 unsigned CKE : 1;
1608 unsigned SMP : 1;
1609 } __SSP1STATbits_t;
1611 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
1613 #define _BF 0x01
1614 #define _UA 0x02
1615 #define _R_NOT_W 0x04
1616 #define _S 0x08
1617 #define _P 0x10
1618 #define _D_NOT_A 0x20
1619 #define _CKE 0x40
1620 #define _SMP 0x80
1622 //==============================================================================
1625 //==============================================================================
1626 // SSPSTAT Bits
1628 extern __at(0x0214) __sfr SSPSTAT;
1630 typedef struct
1632 unsigned BF : 1;
1633 unsigned UA : 1;
1634 unsigned R_NOT_W : 1;
1635 unsigned S : 1;
1636 unsigned P : 1;
1637 unsigned D_NOT_A : 1;
1638 unsigned CKE : 1;
1639 unsigned SMP : 1;
1640 } __SSPSTATbits_t;
1642 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
1644 #define _SSPSTAT_BF 0x01
1645 #define _SSPSTAT_UA 0x02
1646 #define _SSPSTAT_R_NOT_W 0x04
1647 #define _SSPSTAT_S 0x08
1648 #define _SSPSTAT_P 0x10
1649 #define _SSPSTAT_D_NOT_A 0x20
1650 #define _SSPSTAT_CKE 0x40
1651 #define _SSPSTAT_SMP 0x80
1653 //==============================================================================
1656 //==============================================================================
1657 // SSP1CON1 Bits
1659 extern __at(0x0215) __sfr SSP1CON1;
1661 typedef union
1663 struct
1665 unsigned SSPM0 : 1;
1666 unsigned SSPM1 : 1;
1667 unsigned SSPM2 : 1;
1668 unsigned SSPM3 : 1;
1669 unsigned CKP : 1;
1670 unsigned SSPEN : 1;
1671 unsigned SSPOV : 1;
1672 unsigned WCOL : 1;
1675 struct
1677 unsigned SSPM : 4;
1678 unsigned : 4;
1680 } __SSP1CON1bits_t;
1682 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
1684 #define _SSPM0 0x01
1685 #define _SSPM1 0x02
1686 #define _SSPM2 0x04
1687 #define _SSPM3 0x08
1688 #define _CKP 0x10
1689 #define _SSPEN 0x20
1690 #define _SSPOV 0x40
1691 #define _WCOL 0x80
1693 //==============================================================================
1696 //==============================================================================
1697 // SSPCON Bits
1699 extern __at(0x0215) __sfr SSPCON;
1701 typedef union
1703 struct
1705 unsigned SSPM0 : 1;
1706 unsigned SSPM1 : 1;
1707 unsigned SSPM2 : 1;
1708 unsigned SSPM3 : 1;
1709 unsigned CKP : 1;
1710 unsigned SSPEN : 1;
1711 unsigned SSPOV : 1;
1712 unsigned WCOL : 1;
1715 struct
1717 unsigned SSPM : 4;
1718 unsigned : 4;
1720 } __SSPCONbits_t;
1722 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
1724 #define _SSPCON_SSPM0 0x01
1725 #define _SSPCON_SSPM1 0x02
1726 #define _SSPCON_SSPM2 0x04
1727 #define _SSPCON_SSPM3 0x08
1728 #define _SSPCON_CKP 0x10
1729 #define _SSPCON_SSPEN 0x20
1730 #define _SSPCON_SSPOV 0x40
1731 #define _SSPCON_WCOL 0x80
1733 //==============================================================================
1736 //==============================================================================
1737 // SSPCON1 Bits
1739 extern __at(0x0215) __sfr SSPCON1;
1741 typedef union
1743 struct
1745 unsigned SSPM0 : 1;
1746 unsigned SSPM1 : 1;
1747 unsigned SSPM2 : 1;
1748 unsigned SSPM3 : 1;
1749 unsigned CKP : 1;
1750 unsigned SSPEN : 1;
1751 unsigned SSPOV : 1;
1752 unsigned WCOL : 1;
1755 struct
1757 unsigned SSPM : 4;
1758 unsigned : 4;
1760 } __SSPCON1bits_t;
1762 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
1764 #define _SSPCON1_SSPM0 0x01
1765 #define _SSPCON1_SSPM1 0x02
1766 #define _SSPCON1_SSPM2 0x04
1767 #define _SSPCON1_SSPM3 0x08
1768 #define _SSPCON1_CKP 0x10
1769 #define _SSPCON1_SSPEN 0x20
1770 #define _SSPCON1_SSPOV 0x40
1771 #define _SSPCON1_WCOL 0x80
1773 //==============================================================================
1776 //==============================================================================
1777 // SSP1CON2 Bits
1779 extern __at(0x0216) __sfr SSP1CON2;
1781 typedef struct
1783 unsigned SEN : 1;
1784 unsigned RSEN : 1;
1785 unsigned PEN : 1;
1786 unsigned RCEN : 1;
1787 unsigned ACKEN : 1;
1788 unsigned ACKDT : 1;
1789 unsigned ACKSTAT : 1;
1790 unsigned GCEN : 1;
1791 } __SSP1CON2bits_t;
1793 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
1795 #define _SEN 0x01
1796 #define _RSEN 0x02
1797 #define _PEN 0x04
1798 #define _RCEN 0x08
1799 #define _ACKEN 0x10
1800 #define _ACKDT 0x20
1801 #define _ACKSTAT 0x40
1802 #define _GCEN 0x80
1804 //==============================================================================
1807 //==============================================================================
1808 // SSPCON2 Bits
1810 extern __at(0x0216) __sfr SSPCON2;
1812 typedef struct
1814 unsigned SEN : 1;
1815 unsigned RSEN : 1;
1816 unsigned PEN : 1;
1817 unsigned RCEN : 1;
1818 unsigned ACKEN : 1;
1819 unsigned ACKDT : 1;
1820 unsigned ACKSTAT : 1;
1821 unsigned GCEN : 1;
1822 } __SSPCON2bits_t;
1824 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
1826 #define _SSPCON2_SEN 0x01
1827 #define _SSPCON2_RSEN 0x02
1828 #define _SSPCON2_PEN 0x04
1829 #define _SSPCON2_RCEN 0x08
1830 #define _SSPCON2_ACKEN 0x10
1831 #define _SSPCON2_ACKDT 0x20
1832 #define _SSPCON2_ACKSTAT 0x40
1833 #define _SSPCON2_GCEN 0x80
1835 //==============================================================================
1838 //==============================================================================
1839 // SSP1CON3 Bits
1841 extern __at(0x0217) __sfr SSP1CON3;
1843 typedef struct
1845 unsigned DHEN : 1;
1846 unsigned AHEN : 1;
1847 unsigned SBCDE : 1;
1848 unsigned SDAHT : 1;
1849 unsigned BOEN : 1;
1850 unsigned SCIE : 1;
1851 unsigned PCIE : 1;
1852 unsigned ACKTIM : 1;
1853 } __SSP1CON3bits_t;
1855 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
1857 #define _DHEN 0x01
1858 #define _AHEN 0x02
1859 #define _SBCDE 0x04
1860 #define _SDAHT 0x08
1861 #define _BOEN 0x10
1862 #define _SCIE 0x20
1863 #define _PCIE 0x40
1864 #define _ACKTIM 0x80
1866 //==============================================================================
1869 //==============================================================================
1870 // SSPCON3 Bits
1872 extern __at(0x0217) __sfr SSPCON3;
1874 typedef struct
1876 unsigned DHEN : 1;
1877 unsigned AHEN : 1;
1878 unsigned SBCDE : 1;
1879 unsigned SDAHT : 1;
1880 unsigned BOEN : 1;
1881 unsigned SCIE : 1;
1882 unsigned PCIE : 1;
1883 unsigned ACKTIM : 1;
1884 } __SSPCON3bits_t;
1886 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
1888 #define _SSPCON3_DHEN 0x01
1889 #define _SSPCON3_AHEN 0x02
1890 #define _SSPCON3_SBCDE 0x04
1891 #define _SSPCON3_SDAHT 0x08
1892 #define _SSPCON3_BOEN 0x10
1893 #define _SSPCON3_SCIE 0x20
1894 #define _SSPCON3_PCIE 0x40
1895 #define _SSPCON3_ACKTIM 0x80
1897 //==============================================================================
1899 extern __at(0x0291) __sfr CCPR1;
1900 extern __at(0x0291) __sfr CCPR1L;
1901 extern __at(0x0292) __sfr CCPR1H;
1903 //==============================================================================
1904 // CCP1CON Bits
1906 extern __at(0x0293) __sfr CCP1CON;
1908 typedef union
1910 struct
1912 unsigned CCP1M0 : 1;
1913 unsigned CCP1M1 : 1;
1914 unsigned CCP1M2 : 1;
1915 unsigned CCP1M3 : 1;
1916 unsigned DC1B0 : 1;
1917 unsigned DC1B1 : 1;
1918 unsigned : 1;
1919 unsigned : 1;
1922 struct
1924 unsigned CCP1M : 4;
1925 unsigned : 4;
1928 struct
1930 unsigned : 4;
1931 unsigned DC1B : 2;
1932 unsigned : 2;
1934 } __CCP1CONbits_t;
1936 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
1938 #define _CCP1M0 0x01
1939 #define _CCP1M1 0x02
1940 #define _CCP1M2 0x04
1941 #define _CCP1M3 0x08
1942 #define _DC1B0 0x10
1943 #define _DC1B1 0x20
1945 //==============================================================================
1947 extern __at(0x0298) __sfr CCPR2;
1948 extern __at(0x0298) __sfr CCPR2L;
1949 extern __at(0x0299) __sfr CCPR2H;
1951 //==============================================================================
1952 // CCP2CON Bits
1954 extern __at(0x029A) __sfr CCP2CON;
1956 typedef union
1958 struct
1960 unsigned CCP2M0 : 1;
1961 unsigned CCP2M1 : 1;
1962 unsigned CCP2M2 : 1;
1963 unsigned CCP2M3 : 1;
1964 unsigned DC2B0 : 1;
1965 unsigned DC2B1 : 1;
1966 unsigned : 1;
1967 unsigned : 1;
1970 struct
1972 unsigned CCP2M : 4;
1973 unsigned : 4;
1976 struct
1978 unsigned : 4;
1979 unsigned DC2B : 2;
1980 unsigned : 2;
1982 } __CCP2CONbits_t;
1984 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
1986 #define _CCP2M0 0x01
1987 #define _CCP2M1 0x02
1988 #define _CCP2M2 0x04
1989 #define _CCP2M3 0x08
1990 #define _DC2B0 0x10
1991 #define _DC2B1 0x20
1993 //==============================================================================
1996 //==============================================================================
1997 // IOCBP Bits
1999 extern __at(0x0394) __sfr IOCBP;
2001 typedef struct
2003 unsigned IOCBP0 : 1;
2004 unsigned IOCBP1 : 1;
2005 unsigned IOCBP2 : 1;
2006 unsigned IOCBP3 : 1;
2007 unsigned IOCBP4 : 1;
2008 unsigned IOCBP5 : 1;
2009 unsigned IOCBP6 : 1;
2010 unsigned IOCBP7 : 1;
2011 } __IOCBPbits_t;
2013 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
2015 #define _IOCBP0 0x01
2016 #define _IOCBP1 0x02
2017 #define _IOCBP2 0x04
2018 #define _IOCBP3 0x08
2019 #define _IOCBP4 0x10
2020 #define _IOCBP5 0x20
2021 #define _IOCBP6 0x40
2022 #define _IOCBP7 0x80
2024 //==============================================================================
2027 //==============================================================================
2028 // IOCBN Bits
2030 extern __at(0x0395) __sfr IOCBN;
2032 typedef struct
2034 unsigned IOCBN0 : 1;
2035 unsigned IOCBN1 : 1;
2036 unsigned IOCBN2 : 1;
2037 unsigned IOCBN3 : 1;
2038 unsigned IOCBN4 : 1;
2039 unsigned IOCBN5 : 1;
2040 unsigned IOCBN6 : 1;
2041 unsigned IOCBN7 : 1;
2042 } __IOCBNbits_t;
2044 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
2046 #define _IOCBN0 0x01
2047 #define _IOCBN1 0x02
2048 #define _IOCBN2 0x04
2049 #define _IOCBN3 0x08
2050 #define _IOCBN4 0x10
2051 #define _IOCBN5 0x20
2052 #define _IOCBN6 0x40
2053 #define _IOCBN7 0x80
2055 //==============================================================================
2058 //==============================================================================
2059 // IOCBF Bits
2061 extern __at(0x0396) __sfr IOCBF;
2063 typedef struct
2065 unsigned IOCBF0 : 1;
2066 unsigned IOCBF1 : 1;
2067 unsigned IOCBF2 : 1;
2068 unsigned IOCBF3 : 1;
2069 unsigned IOCBF4 : 1;
2070 unsigned IOCBF5 : 1;
2071 unsigned IOCBF6 : 1;
2072 unsigned IOCBF7 : 1;
2073 } __IOCBFbits_t;
2075 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
2077 #define _IOCBF0 0x01
2078 #define _IOCBF1 0x02
2079 #define _IOCBF2 0x04
2080 #define _IOCBF3 0x08
2081 #define _IOCBF4 0x10
2082 #define _IOCBF5 0x20
2083 #define _IOCBF6 0x40
2084 #define _IOCBF7 0x80
2086 //==============================================================================
2089 //==============================================================================
2090 // AADCON0 Bits
2092 extern __at(0x0711) __sfr AADCON0;
2094 typedef union
2096 struct
2098 unsigned ADON : 1;
2099 unsigned GO_NOT_DONE : 1;
2100 unsigned CHS0 : 1;
2101 unsigned CHS1 : 1;
2102 unsigned CHS2 : 1;
2103 unsigned CHS3 : 1;
2104 unsigned CHS4 : 1;
2105 unsigned : 1;
2108 struct
2110 unsigned : 2;
2111 unsigned CHS : 5;
2112 unsigned : 1;
2114 } __AADCON0bits_t;
2116 extern __at(0x0711) volatile __AADCON0bits_t AADCON0bits;
2118 #define _ADON 0x01
2119 #define _GO_NOT_DONE 0x02
2120 #define _CHS0 0x04
2121 #define _CHS1 0x08
2122 #define _CHS2 0x10
2123 #define _CHS3 0x20
2124 #define _CHS4 0x40
2126 //==============================================================================
2129 //==============================================================================
2130 // AADCON1 Bits
2132 extern __at(0x0712) __sfr AADCON1;
2134 typedef union
2136 struct
2138 unsigned ADPREF0 : 1;
2139 unsigned ADPREF1 : 1;
2140 unsigned : 1;
2141 unsigned : 1;
2142 unsigned ADCS0 : 1;
2143 unsigned ADCS1 : 1;
2144 unsigned ADCS2 : 1;
2145 unsigned ADFM : 1;
2148 struct
2150 unsigned ADPREF : 2;
2151 unsigned : 6;
2154 struct
2156 unsigned : 4;
2157 unsigned ADCS : 3;
2158 unsigned : 1;
2160 } __AADCON1bits_t;
2162 extern __at(0x0712) volatile __AADCON1bits_t AADCON1bits;
2164 #define _ADPREF0 0x01
2165 #define _ADPREF1 0x02
2166 #define _ADCS0 0x10
2167 #define _ADCS1 0x20
2168 #define _ADCS2 0x40
2169 #define _ADFM 0x80
2171 //==============================================================================
2174 //==============================================================================
2175 // AADCON2 Bits
2177 extern __at(0x0713) __sfr AADCON2;
2179 typedef union
2181 struct
2183 unsigned : 1;
2184 unsigned : 1;
2185 unsigned : 1;
2186 unsigned : 1;
2187 unsigned TRIGSEL0 : 1;
2188 unsigned TRIGSEL1 : 1;
2189 unsigned TRIGSEL2 : 1;
2190 unsigned : 1;
2193 struct
2195 unsigned : 4;
2196 unsigned TRIGSEL : 3;
2197 unsigned : 1;
2199 } __AADCON2bits_t;
2201 extern __at(0x0713) volatile __AADCON2bits_t AADCON2bits;
2203 #define _TRIGSEL0 0x10
2204 #define _TRIGSEL1 0x20
2205 #define _TRIGSEL2 0x40
2207 //==============================================================================
2210 //==============================================================================
2211 // AADCON3 Bits
2213 extern __at(0x0714) __sfr AADCON3;
2215 typedef struct
2217 unsigned ADDSEN : 1;
2218 unsigned ADIPEN : 1;
2219 unsigned : 1;
2220 unsigned ADOOEN : 1;
2221 unsigned ADOEN : 1;
2222 unsigned ADOLEN : 1;
2223 unsigned ADIPPOL : 1;
2224 unsigned ADEPPOL : 1;
2225 } __AADCON3bits_t;
2227 extern __at(0x0714) volatile __AADCON3bits_t AADCON3bits;
2229 #define _ADDSEN 0x01
2230 #define _ADIPEN 0x02
2231 #define _ADOOEN 0x08
2232 #define _ADOEN 0x10
2233 #define _ADOLEN 0x20
2234 #define _ADIPPOL 0x40
2235 #define _ADEPPOL 0x80
2237 //==============================================================================
2240 //==============================================================================
2241 // AADSTAT Bits
2243 extern __at(0x0715) __sfr AADSTAT;
2245 typedef union
2247 struct
2249 unsigned ADSTG0 : 1;
2250 unsigned ADSTG1 : 1;
2251 unsigned ADCONV : 1;
2252 unsigned : 1;
2253 unsigned : 1;
2254 unsigned : 1;
2255 unsigned : 1;
2256 unsigned : 1;
2259 struct
2261 unsigned ADSTG : 2;
2262 unsigned : 6;
2264 } __AADSTATbits_t;
2266 extern __at(0x0715) volatile __AADSTATbits_t AADSTATbits;
2268 #define _ADSTG0 0x01
2269 #define _ADSTG1 0x02
2270 #define _ADCONV 0x04
2272 //==============================================================================
2275 //==============================================================================
2276 // AADPRE Bits
2278 extern __at(0x0716) __sfr AADPRE;
2280 typedef union
2282 struct
2284 unsigned ADPRE0 : 1;
2285 unsigned ADPRE1 : 1;
2286 unsigned ADPRE2 : 1;
2287 unsigned ADPRE3 : 1;
2288 unsigned ADPRE4 : 1;
2289 unsigned ADPRE5 : 1;
2290 unsigned ADPRE6 : 1;
2291 unsigned : 1;
2294 struct
2296 unsigned ADPRE : 7;
2297 unsigned : 1;
2299 } __AADPREbits_t;
2301 extern __at(0x0716) volatile __AADPREbits_t AADPREbits;
2303 #define _ADPRE0 0x01
2304 #define _ADPRE1 0x02
2305 #define _ADPRE2 0x04
2306 #define _ADPRE3 0x08
2307 #define _ADPRE4 0x10
2308 #define _ADPRE5 0x20
2309 #define _ADPRE6 0x40
2311 //==============================================================================
2314 //==============================================================================
2315 // AADACQ Bits
2317 extern __at(0x0717) __sfr AADACQ;
2319 typedef union
2321 struct
2323 unsigned ADACQ0 : 1;
2324 unsigned ADACQ1 : 1;
2325 unsigned ADACQ2 : 1;
2326 unsigned ADACQ3 : 1;
2327 unsigned ADACQ4 : 1;
2328 unsigned ADACQ5 : 1;
2329 unsigned ADACQ6 : 1;
2330 unsigned : 1;
2333 struct
2335 unsigned ADACQ : 7;
2336 unsigned : 1;
2338 } __AADACQbits_t;
2340 extern __at(0x0717) volatile __AADACQbits_t AADACQbits;
2342 #define _ADACQ0 0x01
2343 #define _ADACQ1 0x02
2344 #define _ADACQ2 0x04
2345 #define _ADACQ3 0x08
2346 #define _ADACQ4 0x10
2347 #define _ADACQ5 0x20
2348 #define _ADACQ6 0x40
2350 //==============================================================================
2353 //==============================================================================
2354 // AADGRD Bits
2356 extern __at(0x0718) __sfr AADGRD;
2358 typedef struct
2360 unsigned : 1;
2361 unsigned : 1;
2362 unsigned : 1;
2363 unsigned : 1;
2364 unsigned : 1;
2365 unsigned GRDPOL : 1;
2366 unsigned GRDAOE : 1;
2367 unsigned GRDBOE : 1;
2368 } __AADGRDbits_t;
2370 extern __at(0x0718) volatile __AADGRDbits_t AADGRDbits;
2372 #define _GRDPOL 0x20
2373 #define _GRDAOE 0x40
2374 #define _GRDBOE 0x80
2376 //==============================================================================
2379 //==============================================================================
2380 // AADCAP Bits
2382 extern __at(0x0719) __sfr AADCAP;
2384 typedef union
2386 struct
2388 unsigned ADDCAP0 : 1;
2389 unsigned ADDCAP1 : 1;
2390 unsigned ADDCAP2 : 1;
2391 unsigned : 1;
2392 unsigned : 1;
2393 unsigned : 1;
2394 unsigned : 1;
2395 unsigned : 1;
2398 struct
2400 unsigned ADDCAP : 3;
2401 unsigned : 5;
2403 } __AADCAPbits_t;
2405 extern __at(0x0719) volatile __AADCAPbits_t AADCAPbits;
2407 #define _ADDCAP0 0x01
2408 #define _ADDCAP1 0x02
2409 #define _ADDCAP2 0x04
2411 //==============================================================================
2413 extern __at(0x071A) __sfr AADRES0;
2414 extern __at(0x071A) __sfr AADRES0L;
2415 extern __at(0x071A) __sfr AD1RES0;
2416 extern __at(0x071B) __sfr AADRES0H;
2417 extern __at(0x071C) __sfr AADRES1;
2418 extern __at(0x071C) __sfr AADRES1L;
2419 extern __at(0x071C) __sfr AD1RES1;
2420 extern __at(0x071D) __sfr AADRES1H;
2422 //==============================================================================
2423 // STATUS_SHAD Bits
2425 extern __at(0x0FE4) __sfr STATUS_SHAD;
2427 typedef struct
2429 unsigned C_SHAD : 1;
2430 unsigned DC_SHAD : 1;
2431 unsigned Z_SHAD : 1;
2432 unsigned : 1;
2433 unsigned : 1;
2434 unsigned : 1;
2435 unsigned : 1;
2436 unsigned : 1;
2437 } __STATUS_SHADbits_t;
2439 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
2441 #define _C_SHAD 0x01
2442 #define _DC_SHAD 0x02
2443 #define _Z_SHAD 0x04
2445 //==============================================================================
2447 extern __at(0x0FE5) __sfr WREG_SHAD;
2448 extern __at(0x0FE6) __sfr BSR_SHAD;
2449 extern __at(0x0FE7) __sfr PCLATH_SHAD;
2450 extern __at(0x0FE8) __sfr FSR0L_SHAD;
2451 extern __at(0x0FE9) __sfr FSR0H_SHAD;
2452 extern __at(0x0FEA) __sfr FSR1L_SHAD;
2453 extern __at(0x0FEB) __sfr FSR1H_SHAD;
2454 extern __at(0x0FED) __sfr STKPTR;
2455 extern __at(0x0FEE) __sfr TOSL;
2456 extern __at(0x0FEF) __sfr TOSH;
2458 //==============================================================================
2460 // Configuration Bits
2462 //==============================================================================
2464 #define _CONFIG1 0x8007
2465 #define _CONFIG2 0x8008
2467 //----------------------------- CONFIG1 Options -------------------------------
2469 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
2470 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
2471 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
2472 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
2473 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
2474 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
2475 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
2476 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pin.
2477 #define _WDTE_OFF 0x3FE7 // WDT disabled.
2478 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
2479 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
2480 #define _WDTE_ON 0x3FFF // WDT enabled.
2481 #define _PWRTE_ON 0x3FDF // PWRT enabled.
2482 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
2483 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
2484 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
2485 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
2486 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
2487 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
2488 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
2489 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
2490 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
2491 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
2492 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
2493 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
2494 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
2495 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
2496 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
2498 //----------------------------- CONFIG2 Options -------------------------------
2500 #define _WRT_ALL 0x3FFC // 000h to 1FFFh write protected, no addresses may be modified by EECON control.
2501 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 1000h to 1FFFh may be modified by EECON control.
2502 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 1FFFh may be modified by EECON control.
2503 #define _WRT_OFF 0x3FFF // Write protection off.
2504 #define _VCAPEN_ON 0x3FEF // VCAP pin function enabled.
2505 #define _VCAPEN_OFF 0x3FFF // VCAP pin function disabled.
2506 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
2507 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
2508 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
2509 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
2510 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
2511 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
2512 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
2513 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
2514 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
2515 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
2517 //==============================================================================
2519 #define _DEVID1 0x8006
2521 #define _IDLOC0 0x8000
2522 #define _IDLOC1 0x8001
2523 #define _IDLOC2 0x8002
2524 #define _IDLOC3 0x8003
2526 //==============================================================================
2528 #ifndef NO_BIT_DEFINES
2530 #define ADACQ0 AADACQbits.ADACQ0 // bit 0
2531 #define ADACQ1 AADACQbits.ADACQ1 // bit 1
2532 #define ADACQ2 AADACQbits.ADACQ2 // bit 2
2533 #define ADACQ3 AADACQbits.ADACQ3 // bit 3
2534 #define ADACQ4 AADACQbits.ADACQ4 // bit 4
2535 #define ADACQ5 AADACQbits.ADACQ5 // bit 5
2536 #define ADACQ6 AADACQbits.ADACQ6 // bit 6
2538 #define ADDCAP0 AADCAPbits.ADDCAP0 // bit 0
2539 #define ADDCAP1 AADCAPbits.ADDCAP1 // bit 1
2540 #define ADDCAP2 AADCAPbits.ADDCAP2 // bit 2
2542 #define ADON AADCON0bits.ADON // bit 0
2543 #define GO_NOT_DONE AADCON0bits.GO_NOT_DONE // bit 1
2544 #define CHS0 AADCON0bits.CHS0 // bit 2
2545 #define CHS1 AADCON0bits.CHS1 // bit 3
2546 #define CHS2 AADCON0bits.CHS2 // bit 4
2547 #define CHS3 AADCON0bits.CHS3 // bit 5
2548 #define CHS4 AADCON0bits.CHS4 // bit 6
2550 #define ADPREF0 AADCON1bits.ADPREF0 // bit 0
2551 #define ADPREF1 AADCON1bits.ADPREF1 // bit 1
2552 #define ADCS0 AADCON1bits.ADCS0 // bit 4
2553 #define ADCS1 AADCON1bits.ADCS1 // bit 5
2554 #define ADCS2 AADCON1bits.ADCS2 // bit 6
2555 #define ADFM AADCON1bits.ADFM // bit 7
2557 #define TRIGSEL0 AADCON2bits.TRIGSEL0 // bit 4
2558 #define TRIGSEL1 AADCON2bits.TRIGSEL1 // bit 5
2559 #define TRIGSEL2 AADCON2bits.TRIGSEL2 // bit 6
2561 #define ADDSEN AADCON3bits.ADDSEN // bit 0
2562 #define ADIPEN AADCON3bits.ADIPEN // bit 1
2563 #define ADOOEN AADCON3bits.ADOOEN // bit 3
2564 #define ADOEN AADCON3bits.ADOEN // bit 4
2565 #define ADOLEN AADCON3bits.ADOLEN // bit 5
2566 #define ADIPPOL AADCON3bits.ADIPPOL // bit 6
2567 #define ADEPPOL AADCON3bits.ADEPPOL // bit 7
2569 #define GRDPOL AADGRDbits.GRDPOL // bit 5
2570 #define GRDAOE AADGRDbits.GRDAOE // bit 6
2571 #define GRDBOE AADGRDbits.GRDBOE // bit 7
2573 #define ADPRE0 AADPREbits.ADPRE0 // bit 0
2574 #define ADPRE1 AADPREbits.ADPRE1 // bit 1
2575 #define ADPRE2 AADPREbits.ADPRE2 // bit 2
2576 #define ADPRE3 AADPREbits.ADPRE3 // bit 3
2577 #define ADPRE4 AADPREbits.ADPRE4 // bit 4
2578 #define ADPRE5 AADPREbits.ADPRE5 // bit 5
2579 #define ADPRE6 AADPREbits.ADPRE6 // bit 6
2581 #define ADSTG0 AADSTATbits.ADSTG0 // bit 0
2582 #define ADSTG1 AADSTATbits.ADSTG1 // bit 1
2583 #define ADCONV AADSTATbits.ADCONV // bit 2
2585 #define ANSA0 ANSELAbits.ANSA0 // bit 0
2586 #define ANSA1 ANSELAbits.ANSA1 // bit 1
2587 #define ANSA2 ANSELAbits.ANSA2 // bit 2
2588 #define ANSA3 ANSELAbits.ANSA3 // bit 3
2589 #define ANSA5 ANSELAbits.ANSA5 // bit 5
2591 #define ANSB0 ANSELBbits.ANSB0 // bit 0
2592 #define ANSB1 ANSELBbits.ANSB1 // bit 1
2593 #define ANSB2 ANSELBbits.ANSB2 // bit 2
2594 #define ANSB3 ANSELBbits.ANSB3 // bit 3
2595 #define ANSB4 ANSELBbits.ANSB4 // bit 4
2596 #define ANSB5 ANSELBbits.ANSB5 // bit 5
2598 #define ANSC2 ANSELCbits.ANSC2 // bit 2
2599 #define ANSC3 ANSELCbits.ANSC3 // bit 3
2600 #define ANSC4 ANSELCbits.ANSC4 // bit 4
2601 #define ANSC5 ANSELCbits.ANSC5 // bit 5
2602 #define ANSC6 ANSELCbits.ANSC6 // bit 6
2603 #define ANSC7 ANSELCbits.ANSC7 // bit 7
2605 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
2606 #define SSSEL APFCONbits.SSSEL // bit 1
2608 #define ABDEN BAUDCONbits.ABDEN // bit 0
2609 #define WUE BAUDCONbits.WUE // bit 1
2610 #define BRG16 BAUDCONbits.BRG16 // bit 3
2611 #define SCKP BAUDCONbits.SCKP // bit 4
2612 #define RCIDL BAUDCONbits.RCIDL // bit 6
2613 #define ABDOVF BAUDCONbits.ABDOVF // bit 7
2615 #define BORRDY BORCONbits.BORRDY // bit 0
2616 #define BORFS BORCONbits.BORFS // bit 6
2617 #define SBOREN BORCONbits.SBOREN // bit 7
2619 #define BSR0 BSRbits.BSR0 // bit 0
2620 #define BSR1 BSRbits.BSR1 // bit 1
2621 #define BSR2 BSRbits.BSR2 // bit 2
2622 #define BSR3 BSRbits.BSR3 // bit 3
2623 #define BSR4 BSRbits.BSR4 // bit 4
2625 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
2626 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
2627 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
2628 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
2629 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
2630 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
2632 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
2633 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
2634 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
2635 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
2636 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
2637 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
2639 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
2640 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
2641 #define TSRNG FVRCONbits.TSRNG // bit 4
2642 #define TSEN FVRCONbits.TSEN // bit 5
2643 #define FVRRDY FVRCONbits.FVRRDY // bit 6
2644 #define FVREN FVRCONbits.FVREN // bit 7
2646 #define IOCIF INTCONbits.IOCIF // bit 0
2647 #define INTF INTCONbits.INTF // bit 1
2648 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
2649 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
2650 #define IOCIE INTCONbits.IOCIE // bit 3
2651 #define INTE INTCONbits.INTE // bit 4
2652 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
2653 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
2654 #define PEIE INTCONbits.PEIE // bit 6
2655 #define GIE INTCONbits.GIE // bit 7
2657 #define IOCBF0 IOCBFbits.IOCBF0 // bit 0
2658 #define IOCBF1 IOCBFbits.IOCBF1 // bit 1
2659 #define IOCBF2 IOCBFbits.IOCBF2 // bit 2
2660 #define IOCBF3 IOCBFbits.IOCBF3 // bit 3
2661 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
2662 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
2663 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
2664 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
2666 #define IOCBN0 IOCBNbits.IOCBN0 // bit 0
2667 #define IOCBN1 IOCBNbits.IOCBN1 // bit 1
2668 #define IOCBN2 IOCBNbits.IOCBN2 // bit 2
2669 #define IOCBN3 IOCBNbits.IOCBN3 // bit 3
2670 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
2671 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
2672 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
2673 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
2675 #define IOCBP0 IOCBPbits.IOCBP0 // bit 0
2676 #define IOCBP1 IOCBPbits.IOCBP1 // bit 1
2677 #define IOCBP2 IOCBPbits.IOCBP2 // bit 2
2678 #define IOCBP3 IOCBPbits.IOCBP3 // bit 3
2679 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
2680 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
2681 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
2682 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
2684 #define LATA0 LATAbits.LATA0 // bit 0
2685 #define LATA1 LATAbits.LATA1 // bit 1
2686 #define LATA2 LATAbits.LATA2 // bit 2
2687 #define LATA3 LATAbits.LATA3 // bit 3
2688 #define LATA4 LATAbits.LATA4 // bit 4
2689 #define LATA5 LATAbits.LATA5 // bit 5
2690 #define LATA6 LATAbits.LATA6 // bit 6
2691 #define LATA7 LATAbits.LATA7 // bit 7
2693 #define LATB0 LATBbits.LATB0 // bit 0
2694 #define LATB1 LATBbits.LATB1 // bit 1
2695 #define LATB2 LATBbits.LATB2 // bit 2
2696 #define LATB3 LATBbits.LATB3 // bit 3
2697 #define LATB4 LATBbits.LATB4 // bit 4
2698 #define LATB5 LATBbits.LATB5 // bit 5
2699 #define LATB6 LATBbits.LATB6 // bit 6
2700 #define LATB7 LATBbits.LATB7 // bit 7
2702 #define LATC0 LATCbits.LATC0 // bit 0
2703 #define LATC1 LATCbits.LATC1 // bit 1
2704 #define LATC2 LATCbits.LATC2 // bit 2
2705 #define LATC3 LATCbits.LATC3 // bit 3
2706 #define LATC4 LATCbits.LATC4 // bit 4
2707 #define LATC5 LATCbits.LATC5 // bit 5
2708 #define LATC6 LATCbits.LATC6 // bit 6
2709 #define LATC7 LATCbits.LATC7 // bit 7
2711 #define PS0 OPTION_REGbits.PS0 // bit 0
2712 #define PS1 OPTION_REGbits.PS1 // bit 1
2713 #define PS2 OPTION_REGbits.PS2 // bit 2
2714 #define PSA OPTION_REGbits.PSA // bit 3
2715 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
2716 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
2717 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
2718 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
2719 #define INTEDG OPTION_REGbits.INTEDG // bit 6
2720 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
2722 #define SCS0 OSCCONbits.SCS0 // bit 0
2723 #define SCS1 OSCCONbits.SCS1 // bit 1
2724 #define IRCF0 OSCCONbits.IRCF0 // bit 3
2725 #define IRCF1 OSCCONbits.IRCF1 // bit 4
2726 #define IRCF2 OSCCONbits.IRCF2 // bit 5
2727 #define IRCF3 OSCCONbits.IRCF3 // bit 6
2729 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
2730 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
2731 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
2732 #define OSTS OSCSTATbits.OSTS // bit 5
2733 #define SOSCR OSCSTATbits.SOSCR // bit 7, shadows bit in OSCSTATbits
2734 #define T1OSCR OSCSTATbits.T1OSCR // bit 7, shadows bit in OSCSTATbits
2736 #define NOT_BOR PCONbits.NOT_BOR // bit 0
2737 #define NOT_POR PCONbits.NOT_POR // bit 1
2738 #define NOT_RI PCONbits.NOT_RI // bit 2
2739 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
2740 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
2741 #define STKUNF PCONbits.STKUNF // bit 6
2742 #define STKOVF PCONbits.STKOVF // bit 7
2744 #define TMR1IE PIE1bits.TMR1IE // bit 0
2745 #define TMR2IE PIE1bits.TMR2IE // bit 1
2746 #define CCP1IE PIE1bits.CCP1IE // bit 2
2747 #define SSPIE PIE1bits.SSPIE // bit 3
2748 #define TXIE PIE1bits.TXIE // bit 4
2749 #define RCIE PIE1bits.RCIE // bit 5
2750 #define ADIE PIE1bits.ADIE // bit 6
2751 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
2753 #define CCP2IE PIE2bits.CCP2IE // bit 0
2754 #define BCLIE PIE2bits.BCLIE // bit 3
2755 #define OSFIE PIE2bits.OSFIE // bit 7
2757 #define TMR1IF PIR1bits.TMR1IF // bit 0
2758 #define TMR2IF PIR1bits.TMR2IF // bit 1
2759 #define CCP1IF PIR1bits.CCP1IF // bit 2
2760 #define SSPIF PIR1bits.SSPIF // bit 3
2761 #define TXIF PIR1bits.TXIF // bit 4
2762 #define RCIF PIR1bits.RCIF // bit 5
2763 #define ADIF PIR1bits.ADIF // bit 6
2764 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
2766 #define CCP2IF PIR2bits.CCP2IF // bit 0
2767 #define BCLIF PIR2bits.BCLIF // bit 3
2768 #define OSFIF PIR2bits.OSFIF // bit 7
2770 #define RD PMCON1bits.RD // bit 0
2771 #define WR PMCON1bits.WR // bit 1
2772 #define WREN PMCON1bits.WREN // bit 2
2773 #define WRERR PMCON1bits.WRERR // bit 3
2774 #define FREE PMCON1bits.FREE // bit 4
2775 #define LWLO PMCON1bits.LWLO // bit 5
2776 #define CFGS PMCON1bits.CFGS // bit 6
2778 #define RA0 PORTAbits.RA0 // bit 0
2779 #define RA1 PORTAbits.RA1 // bit 1
2780 #define RA2 PORTAbits.RA2 // bit 2
2781 #define RA3 PORTAbits.RA3 // bit 3
2782 #define RA4 PORTAbits.RA4 // bit 4
2783 #define RA5 PORTAbits.RA5 // bit 5
2784 #define RA6 PORTAbits.RA6 // bit 6
2785 #define RA7 PORTAbits.RA7 // bit 7
2787 #define RB0 PORTBbits.RB0 // bit 0
2788 #define RB1 PORTBbits.RB1 // bit 1
2789 #define RB2 PORTBbits.RB2 // bit 2
2790 #define RB3 PORTBbits.RB3 // bit 3
2791 #define RB4 PORTBbits.RB4 // bit 4
2792 #define RB5 PORTBbits.RB5 // bit 5
2793 #define RB6 PORTBbits.RB6 // bit 6
2794 #define RB7 PORTBbits.RB7 // bit 7
2796 #define RC0 PORTCbits.RC0 // bit 0
2797 #define RC1 PORTCbits.RC1 // bit 1
2798 #define RC2 PORTCbits.RC2 // bit 2
2799 #define RC3 PORTCbits.RC3 // bit 3
2800 #define RC4 PORTCbits.RC4 // bit 4
2801 #define RC5 PORTCbits.RC5 // bit 5
2802 #define RC6 PORTCbits.RC6 // bit 6
2803 #define RC7 PORTCbits.RC7 // bit 7
2805 #define RE3 PORTEbits.RE3 // bit 3
2807 #define RX9D RCSTAbits.RX9D // bit 0
2808 #define OERR RCSTAbits.OERR // bit 1
2809 #define FERR RCSTAbits.FERR // bit 2
2810 #define ADDEN RCSTAbits.ADDEN // bit 3
2811 #define CREN RCSTAbits.CREN // bit 4
2812 #define SREN RCSTAbits.SREN // bit 5
2813 #define RX9 RCSTAbits.RX9 // bit 6
2814 #define SPEN RCSTAbits.SPEN // bit 7
2816 #define SSPM0 SSP1CON1bits.SSPM0 // bit 0
2817 #define SSPM1 SSP1CON1bits.SSPM1 // bit 1
2818 #define SSPM2 SSP1CON1bits.SSPM2 // bit 2
2819 #define SSPM3 SSP1CON1bits.SSPM3 // bit 3
2820 #define CKP SSP1CON1bits.CKP // bit 4
2821 #define SSPEN SSP1CON1bits.SSPEN // bit 5
2822 #define SSPOV SSP1CON1bits.SSPOV // bit 6
2823 #define WCOL SSP1CON1bits.WCOL // bit 7
2825 #define SEN SSP1CON2bits.SEN // bit 0
2826 #define RSEN SSP1CON2bits.RSEN // bit 1
2827 #define PEN SSP1CON2bits.PEN // bit 2
2828 #define RCEN SSP1CON2bits.RCEN // bit 3
2829 #define ACKEN SSP1CON2bits.ACKEN // bit 4
2830 #define ACKDT SSP1CON2bits.ACKDT // bit 5
2831 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
2832 #define GCEN SSP1CON2bits.GCEN // bit 7
2834 #define DHEN SSP1CON3bits.DHEN // bit 0
2835 #define AHEN SSP1CON3bits.AHEN // bit 1
2836 #define SBCDE SSP1CON3bits.SBCDE // bit 2
2837 #define SDAHT SSP1CON3bits.SDAHT // bit 3
2838 #define BOEN SSP1CON3bits.BOEN // bit 4
2839 #define SCIE SSP1CON3bits.SCIE // bit 5
2840 #define PCIE SSP1CON3bits.PCIE // bit 6
2841 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
2843 #define BF SSP1STATbits.BF // bit 0
2844 #define UA SSP1STATbits.UA // bit 1
2845 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
2846 #define S SSP1STATbits.S // bit 3
2847 #define P SSP1STATbits.P // bit 4
2848 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
2849 #define CKE SSP1STATbits.CKE // bit 6
2850 #define SMP SSP1STATbits.SMP // bit 7
2852 #define C STATUSbits.C // bit 0
2853 #define DC STATUSbits.DC // bit 1
2854 #define Z STATUSbits.Z // bit 2
2855 #define NOT_PD STATUSbits.NOT_PD // bit 3
2856 #define NOT_TO STATUSbits.NOT_TO // bit 4
2858 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
2859 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
2860 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
2862 #define TMR1ON T1CONbits.TMR1ON // bit 0
2863 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
2864 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
2865 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
2866 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
2867 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
2868 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
2870 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
2871 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
2872 #define T1GVAL T1GCONbits.T1GVAL // bit 2
2873 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
2874 #define T1GSPM T1GCONbits.T1GSPM // bit 4
2875 #define T1GTM T1GCONbits.T1GTM // bit 5
2876 #define T1GPOL T1GCONbits.T1GPOL // bit 6
2877 #define TMR1GE T1GCONbits.TMR1GE // bit 7
2879 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
2880 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
2881 #define TMR2ON T2CONbits.TMR2ON // bit 2
2882 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
2883 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
2884 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
2885 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
2887 #define TRISA0 TRISAbits.TRISA0 // bit 0
2888 #define TRISA1 TRISAbits.TRISA1 // bit 1
2889 #define TRISA2 TRISAbits.TRISA2 // bit 2
2890 #define TRISA3 TRISAbits.TRISA3 // bit 3
2891 #define TRISA4 TRISAbits.TRISA4 // bit 4
2892 #define TRISA5 TRISAbits.TRISA5 // bit 5
2893 #define TRISA6 TRISAbits.TRISA6 // bit 6
2894 #define TRISA7 TRISAbits.TRISA7 // bit 7
2896 #define TRISB0 TRISBbits.TRISB0 // bit 0
2897 #define TRISB1 TRISBbits.TRISB1 // bit 1
2898 #define TRISB2 TRISBbits.TRISB2 // bit 2
2899 #define TRISB3 TRISBbits.TRISB3 // bit 3
2900 #define TRISB4 TRISBbits.TRISB4 // bit 4
2901 #define TRISB5 TRISBbits.TRISB5 // bit 5
2902 #define TRISB6 TRISBbits.TRISB6 // bit 6
2903 #define TRISB7 TRISBbits.TRISB7 // bit 7
2905 #define TRISC0 TRISCbits.TRISC0 // bit 0
2906 #define TRISC1 TRISCbits.TRISC1 // bit 1
2907 #define TRISC2 TRISCbits.TRISC2 // bit 2
2908 #define TRISC3 TRISCbits.TRISC3 // bit 3
2909 #define TRISC4 TRISCbits.TRISC4 // bit 4
2910 #define TRISC5 TRISCbits.TRISC5 // bit 5
2911 #define TRISC6 TRISCbits.TRISC6 // bit 6
2912 #define TRISC7 TRISCbits.TRISC7 // bit 7
2914 #define TX9D TXSTAbits.TX9D // bit 0
2915 #define TRMT TXSTAbits.TRMT // bit 1
2916 #define BRGH TXSTAbits.BRGH // bit 2
2917 #define SENDB TXSTAbits.SENDB // bit 3
2918 #define SYNC TXSTAbits.SYNC // bit 4
2919 #define TXEN TXSTAbits.TXEN // bit 5
2920 #define TX9 TXSTAbits.TX9 // bit 6
2921 #define CSRC TXSTAbits.CSRC // bit 7
2923 #define reserved VREGCONbits.reserved // bit 0
2924 #define VREGPM VREGCONbits.VREGPM // bit 1
2926 #define SWDTEN WDTCONbits.SWDTEN // bit 0
2927 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
2928 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
2929 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
2930 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
2931 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
2933 #define WPUB0 WPUBbits.WPUB0 // bit 0
2934 #define WPUB1 WPUBbits.WPUB1 // bit 1
2935 #define WPUB2 WPUBbits.WPUB2 // bit 2
2936 #define WPUB3 WPUBbits.WPUB3 // bit 3
2937 #define WPUB4 WPUBbits.WPUB4 // bit 4
2938 #define WPUB5 WPUBbits.WPUB5 // bit 5
2939 #define WPUB6 WPUBbits.WPUB6 // bit 6
2940 #define WPUB7 WPUBbits.WPUB7 // bit 7
2942 #define WPUE3 WPUEbits.WPUE3 // bit 3
2944 #endif // #ifndef NO_BIT_DEFINES
2946 #endif // #ifndef __PIC16F1512_H__