Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f1513.h
blobe91a424085e263a8ff45d61e2ca03c982ed571b6
1 /*
2 * This declarations of the PIC16F1513 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 __PIC16F1513_H__
26 #define __PIC16F1513_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 ADRES1_ADDR 0x071C
158 #define AADRES1H_ADDR 0x071D
159 #define STATUS_SHAD_ADDR 0x0FE4
160 #define WREG_SHAD_ADDR 0x0FE5
161 #define BSR_SHAD_ADDR 0x0FE6
162 #define PCLATH_SHAD_ADDR 0x0FE7
163 #define FSR0L_SHAD_ADDR 0x0FE8
164 #define FSR0H_SHAD_ADDR 0x0FE9
165 #define FSR1L_SHAD_ADDR 0x0FEA
166 #define FSR1H_SHAD_ADDR 0x0FEB
167 #define STKPTR_ADDR 0x0FED
168 #define TOSL_ADDR 0x0FEE
169 #define TOSH_ADDR 0x0FEF
171 #endif // #ifndef NO_ADDR_DEFINES
173 //==============================================================================
175 // Register Definitions
177 //==============================================================================
179 extern __at(0x0000) __sfr INDF0;
180 extern __at(0x0001) __sfr INDF1;
181 extern __at(0x0002) __sfr PCL;
183 //==============================================================================
184 // STATUS Bits
186 extern __at(0x0003) __sfr STATUS;
188 typedef struct
190 unsigned C : 1;
191 unsigned DC : 1;
192 unsigned Z : 1;
193 unsigned NOT_PD : 1;
194 unsigned NOT_TO : 1;
195 unsigned : 1;
196 unsigned : 1;
197 unsigned : 1;
198 } __STATUSbits_t;
200 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
202 #define _C 0x01
203 #define _DC 0x02
204 #define _Z 0x04
205 #define _NOT_PD 0x08
206 #define _NOT_TO 0x10
208 //==============================================================================
210 extern __at(0x0004) __sfr FSR0;
211 extern __at(0x0004) __sfr FSR0L;
212 extern __at(0x0005) __sfr FSR0H;
213 extern __at(0x0006) __sfr FSR1;
214 extern __at(0x0006) __sfr FSR1L;
215 extern __at(0x0007) __sfr FSR1H;
217 //==============================================================================
218 // BSR Bits
220 extern __at(0x0008) __sfr BSR;
222 typedef union
224 struct
226 unsigned BSR0 : 1;
227 unsigned BSR1 : 1;
228 unsigned BSR2 : 1;
229 unsigned BSR3 : 1;
230 unsigned BSR4 : 1;
231 unsigned : 1;
232 unsigned : 1;
233 unsigned : 1;
236 struct
238 unsigned BSR : 5;
239 unsigned : 3;
241 } __BSRbits_t;
243 extern __at(0x0008) volatile __BSRbits_t BSRbits;
245 #define _BSR0 0x01
246 #define _BSR1 0x02
247 #define _BSR2 0x04
248 #define _BSR3 0x08
249 #define _BSR4 0x10
251 //==============================================================================
253 extern __at(0x0009) __sfr WREG;
254 extern __at(0x000A) __sfr PCLATH;
256 //==============================================================================
257 // INTCON Bits
259 extern __at(0x000B) __sfr INTCON;
261 typedef union
263 struct
265 unsigned IOCIF : 1;
266 unsigned INTF : 1;
267 unsigned TMR0IF : 1;
268 unsigned IOCIE : 1;
269 unsigned INTE : 1;
270 unsigned TMR0IE : 1;
271 unsigned PEIE : 1;
272 unsigned GIE : 1;
275 struct
277 unsigned : 1;
278 unsigned : 1;
279 unsigned T0IF : 1;
280 unsigned : 1;
281 unsigned : 1;
282 unsigned T0IE : 1;
283 unsigned : 1;
284 unsigned : 1;
286 } __INTCONbits_t;
288 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
290 #define _IOCIF 0x01
291 #define _INTF 0x02
292 #define _TMR0IF 0x04
293 #define _T0IF 0x04
294 #define _IOCIE 0x08
295 #define _INTE 0x10
296 #define _TMR0IE 0x20
297 #define _T0IE 0x20
298 #define _PEIE 0x40
299 #define _GIE 0x80
301 //==============================================================================
304 //==============================================================================
305 // PORTA Bits
307 extern __at(0x000C) __sfr PORTA;
309 typedef struct
311 unsigned RA0 : 1;
312 unsigned RA1 : 1;
313 unsigned RA2 : 1;
314 unsigned RA3 : 1;
315 unsigned RA4 : 1;
316 unsigned RA5 : 1;
317 unsigned RA6 : 1;
318 unsigned RA7 : 1;
319 } __PORTAbits_t;
321 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
323 #define _RA0 0x01
324 #define _RA1 0x02
325 #define _RA2 0x04
326 #define _RA3 0x08
327 #define _RA4 0x10
328 #define _RA5 0x20
329 #define _RA6 0x40
330 #define _RA7 0x80
332 //==============================================================================
335 //==============================================================================
336 // PORTB Bits
338 extern __at(0x000D) __sfr PORTB;
340 typedef struct
342 unsigned RB0 : 1;
343 unsigned RB1 : 1;
344 unsigned RB2 : 1;
345 unsigned RB3 : 1;
346 unsigned RB4 : 1;
347 unsigned RB5 : 1;
348 unsigned RB6 : 1;
349 unsigned RB7 : 1;
350 } __PORTBbits_t;
352 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
354 #define _RB0 0x01
355 #define _RB1 0x02
356 #define _RB2 0x04
357 #define _RB3 0x08
358 #define _RB4 0x10
359 #define _RB5 0x20
360 #define _RB6 0x40
361 #define _RB7 0x80
363 //==============================================================================
366 //==============================================================================
367 // PORTC Bits
369 extern __at(0x000E) __sfr PORTC;
371 typedef struct
373 unsigned RC0 : 1;
374 unsigned RC1 : 1;
375 unsigned RC2 : 1;
376 unsigned RC3 : 1;
377 unsigned RC4 : 1;
378 unsigned RC5 : 1;
379 unsigned RC6 : 1;
380 unsigned RC7 : 1;
381 } __PORTCbits_t;
383 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
385 #define _RC0 0x01
386 #define _RC1 0x02
387 #define _RC2 0x04
388 #define _RC3 0x08
389 #define _RC4 0x10
390 #define _RC5 0x20
391 #define _RC6 0x40
392 #define _RC7 0x80
394 //==============================================================================
397 //==============================================================================
398 // PORTE Bits
400 extern __at(0x0010) __sfr PORTE;
402 typedef struct
404 unsigned : 1;
405 unsigned : 1;
406 unsigned : 1;
407 unsigned RE3 : 1;
408 unsigned : 1;
409 unsigned : 1;
410 unsigned : 1;
411 unsigned : 1;
412 } __PORTEbits_t;
414 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
416 #define _RE3 0x08
418 //==============================================================================
421 //==============================================================================
422 // PIR1 Bits
424 extern __at(0x0011) __sfr PIR1;
426 typedef struct
428 unsigned TMR1IF : 1;
429 unsigned TMR2IF : 1;
430 unsigned CCP1IF : 1;
431 unsigned SSPIF : 1;
432 unsigned TXIF : 1;
433 unsigned RCIF : 1;
434 unsigned ADIF : 1;
435 unsigned TMR1GIF : 1;
436 } __PIR1bits_t;
438 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
440 #define _TMR1IF 0x01
441 #define _TMR2IF 0x02
442 #define _CCP1IF 0x04
443 #define _SSPIF 0x08
444 #define _TXIF 0x10
445 #define _RCIF 0x20
446 #define _ADIF 0x40
447 #define _TMR1GIF 0x80
449 //==============================================================================
452 //==============================================================================
453 // PIR2 Bits
455 extern __at(0x0012) __sfr PIR2;
457 typedef struct
459 unsigned CCP2IF : 1;
460 unsigned : 1;
461 unsigned : 1;
462 unsigned BCLIF : 1;
463 unsigned : 1;
464 unsigned : 1;
465 unsigned : 1;
466 unsigned OSFIF : 1;
467 } __PIR2bits_t;
469 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
471 #define _CCP2IF 0x01
472 #define _BCLIF 0x08
473 #define _OSFIF 0x80
475 //==============================================================================
477 extern __at(0x0015) __sfr TMR0;
478 extern __at(0x0016) __sfr TMR1;
479 extern __at(0x0016) __sfr TMR1L;
480 extern __at(0x0017) __sfr TMR1H;
482 //==============================================================================
483 // T1CON Bits
485 extern __at(0x0018) __sfr T1CON;
487 typedef union
489 struct
491 unsigned TMR1ON : 1;
492 unsigned : 1;
493 unsigned NOT_T1SYNC : 1;
494 unsigned T1OSCEN : 1;
495 unsigned T1CKPS0 : 1;
496 unsigned T1CKPS1 : 1;
497 unsigned TMR1CS0 : 1;
498 unsigned TMR1CS1 : 1;
501 struct
503 unsigned : 4;
504 unsigned T1CKPS : 2;
505 unsigned : 2;
508 struct
510 unsigned : 6;
511 unsigned TMR1CS : 2;
513 } __T1CONbits_t;
515 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
517 #define _TMR1ON 0x01
518 #define _NOT_T1SYNC 0x04
519 #define _T1OSCEN 0x08
520 #define _T1CKPS0 0x10
521 #define _T1CKPS1 0x20
522 #define _TMR1CS0 0x40
523 #define _TMR1CS1 0x80
525 //==============================================================================
528 //==============================================================================
529 // T1GCON Bits
531 extern __at(0x0019) __sfr T1GCON;
533 typedef union
535 struct
537 unsigned T1GSS0 : 1;
538 unsigned T1GSS1 : 1;
539 unsigned T1GVAL : 1;
540 unsigned T1GGO_NOT_DONE : 1;
541 unsigned T1GSPM : 1;
542 unsigned T1GTM : 1;
543 unsigned T1GPOL : 1;
544 unsigned TMR1GE : 1;
547 struct
549 unsigned T1GSS : 2;
550 unsigned : 6;
552 } __T1GCONbits_t;
554 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
556 #define _T1GSS0 0x01
557 #define _T1GSS1 0x02
558 #define _T1GVAL 0x04
559 #define _T1GGO_NOT_DONE 0x08
560 #define _T1GSPM 0x10
561 #define _T1GTM 0x20
562 #define _T1GPOL 0x40
563 #define _TMR1GE 0x80
565 //==============================================================================
567 extern __at(0x001A) __sfr TMR2;
568 extern __at(0x001B) __sfr PR2;
570 //==============================================================================
571 // T2CON Bits
573 extern __at(0x001C) __sfr T2CON;
575 typedef union
577 struct
579 unsigned T2CKPS0 : 1;
580 unsigned T2CKPS1 : 1;
581 unsigned TMR2ON : 1;
582 unsigned T2OUTPS0 : 1;
583 unsigned T2OUTPS1 : 1;
584 unsigned T2OUTPS2 : 1;
585 unsigned T2OUTPS3 : 1;
586 unsigned : 1;
589 struct
591 unsigned T2CKPS : 2;
592 unsigned : 6;
595 struct
597 unsigned : 3;
598 unsigned T2OUTPS : 4;
599 unsigned : 1;
601 } __T2CONbits_t;
603 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
605 #define _T2CKPS0 0x01
606 #define _T2CKPS1 0x02
607 #define _TMR2ON 0x04
608 #define _T2OUTPS0 0x08
609 #define _T2OUTPS1 0x10
610 #define _T2OUTPS2 0x20
611 #define _T2OUTPS3 0x40
613 //==============================================================================
616 //==============================================================================
617 // TRISA Bits
619 extern __at(0x008C) __sfr TRISA;
621 typedef struct
623 unsigned TRISA0 : 1;
624 unsigned TRISA1 : 1;
625 unsigned TRISA2 : 1;
626 unsigned TRISA3 : 1;
627 unsigned TRISA4 : 1;
628 unsigned TRISA5 : 1;
629 unsigned TRISA6 : 1;
630 unsigned TRISA7 : 1;
631 } __TRISAbits_t;
633 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
635 #define _TRISA0 0x01
636 #define _TRISA1 0x02
637 #define _TRISA2 0x04
638 #define _TRISA3 0x08
639 #define _TRISA4 0x10
640 #define _TRISA5 0x20
641 #define _TRISA6 0x40
642 #define _TRISA7 0x80
644 //==============================================================================
647 //==============================================================================
648 // TRISB Bits
650 extern __at(0x008D) __sfr TRISB;
652 typedef struct
654 unsigned TRISB0 : 1;
655 unsigned TRISB1 : 1;
656 unsigned TRISB2 : 1;
657 unsigned TRISB3 : 1;
658 unsigned TRISB4 : 1;
659 unsigned TRISB5 : 1;
660 unsigned TRISB6 : 1;
661 unsigned TRISB7 : 1;
662 } __TRISBbits_t;
664 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
666 #define _TRISB0 0x01
667 #define _TRISB1 0x02
668 #define _TRISB2 0x04
669 #define _TRISB3 0x08
670 #define _TRISB4 0x10
671 #define _TRISB5 0x20
672 #define _TRISB6 0x40
673 #define _TRISB7 0x80
675 //==============================================================================
678 //==============================================================================
679 // TRISC Bits
681 extern __at(0x008E) __sfr TRISC;
683 typedef struct
685 unsigned TRISC0 : 1;
686 unsigned TRISC1 : 1;
687 unsigned TRISC2 : 1;
688 unsigned TRISC3 : 1;
689 unsigned TRISC4 : 1;
690 unsigned TRISC5 : 1;
691 unsigned TRISC6 : 1;
692 unsigned TRISC7 : 1;
693 } __TRISCbits_t;
695 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
697 #define _TRISC0 0x01
698 #define _TRISC1 0x02
699 #define _TRISC2 0x04
700 #define _TRISC3 0x08
701 #define _TRISC4 0x10
702 #define _TRISC5 0x20
703 #define _TRISC6 0x40
704 #define _TRISC7 0x80
706 //==============================================================================
708 extern __at(0x0090) __sfr TRISE;
710 //==============================================================================
711 // PIE1 Bits
713 extern __at(0x0091) __sfr PIE1;
715 typedef struct
717 unsigned TMR1IE : 1;
718 unsigned TMR2IE : 1;
719 unsigned CCP1IE : 1;
720 unsigned SSPIE : 1;
721 unsigned TXIE : 1;
722 unsigned RCIE : 1;
723 unsigned ADIE : 1;
724 unsigned TMR1GIE : 1;
725 } __PIE1bits_t;
727 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
729 #define _TMR1IE 0x01
730 #define _TMR2IE 0x02
731 #define _CCP1IE 0x04
732 #define _SSPIE 0x08
733 #define _TXIE 0x10
734 #define _RCIE 0x20
735 #define _ADIE 0x40
736 #define _TMR1GIE 0x80
738 //==============================================================================
741 //==============================================================================
742 // PIE2 Bits
744 extern __at(0x0092) __sfr PIE2;
746 typedef struct
748 unsigned CCP2IE : 1;
749 unsigned : 1;
750 unsigned : 1;
751 unsigned BCLIE : 1;
752 unsigned : 1;
753 unsigned : 1;
754 unsigned : 1;
755 unsigned OSFIE : 1;
756 } __PIE2bits_t;
758 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
760 #define _CCP2IE 0x01
761 #define _BCLIE 0x08
762 #define _OSFIE 0x80
764 //==============================================================================
767 //==============================================================================
768 // OPTION_REG Bits
770 extern __at(0x0095) __sfr OPTION_REG;
772 typedef union
774 struct
776 unsigned PS0 : 1;
777 unsigned PS1 : 1;
778 unsigned PS2 : 1;
779 unsigned PSA : 1;
780 unsigned TMR0SE : 1;
781 unsigned TMR0CS : 1;
782 unsigned INTEDG : 1;
783 unsigned NOT_WPUEN : 1;
786 struct
788 unsigned : 1;
789 unsigned : 1;
790 unsigned : 1;
791 unsigned : 1;
792 unsigned T0SE : 1;
793 unsigned T0CS : 1;
794 unsigned : 1;
795 unsigned : 1;
798 struct
800 unsigned PS : 3;
801 unsigned : 5;
803 } __OPTION_REGbits_t;
805 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
807 #define _PS0 0x01
808 #define _PS1 0x02
809 #define _PS2 0x04
810 #define _PSA 0x08
811 #define _TMR0SE 0x10
812 #define _T0SE 0x10
813 #define _TMR0CS 0x20
814 #define _T0CS 0x20
815 #define _INTEDG 0x40
816 #define _NOT_WPUEN 0x80
818 //==============================================================================
821 //==============================================================================
822 // PCON Bits
824 extern __at(0x0096) __sfr PCON;
826 typedef struct
828 unsigned NOT_BOR : 1;
829 unsigned NOT_POR : 1;
830 unsigned NOT_RI : 1;
831 unsigned NOT_RMCLR : 1;
832 unsigned NOT_RWDT : 1;
833 unsigned : 1;
834 unsigned STKUNF : 1;
835 unsigned STKOVF : 1;
836 } __PCONbits_t;
838 extern __at(0x0096) volatile __PCONbits_t PCONbits;
840 #define _NOT_BOR 0x01
841 #define _NOT_POR 0x02
842 #define _NOT_RI 0x04
843 #define _NOT_RMCLR 0x08
844 #define _NOT_RWDT 0x10
845 #define _STKUNF 0x40
846 #define _STKOVF 0x80
848 //==============================================================================
851 //==============================================================================
852 // WDTCON Bits
854 extern __at(0x0097) __sfr WDTCON;
856 typedef union
858 struct
860 unsigned SWDTEN : 1;
861 unsigned WDTPS0 : 1;
862 unsigned WDTPS1 : 1;
863 unsigned WDTPS2 : 1;
864 unsigned WDTPS3 : 1;
865 unsigned WDTPS4 : 1;
866 unsigned : 1;
867 unsigned : 1;
870 struct
872 unsigned : 1;
873 unsigned WDTPS : 5;
874 unsigned : 2;
876 } __WDTCONbits_t;
878 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
880 #define _SWDTEN 0x01
881 #define _WDTPS0 0x02
882 #define _WDTPS1 0x04
883 #define _WDTPS2 0x08
884 #define _WDTPS3 0x10
885 #define _WDTPS4 0x20
887 //==============================================================================
890 //==============================================================================
891 // OSCCON Bits
893 extern __at(0x0099) __sfr OSCCON;
895 typedef union
897 struct
899 unsigned SCS0 : 1;
900 unsigned SCS1 : 1;
901 unsigned : 1;
902 unsigned IRCF0 : 1;
903 unsigned IRCF1 : 1;
904 unsigned IRCF2 : 1;
905 unsigned IRCF3 : 1;
906 unsigned : 1;
909 struct
911 unsigned SCS : 2;
912 unsigned : 6;
915 struct
917 unsigned : 3;
918 unsigned IRCF : 4;
919 unsigned : 1;
921 } __OSCCONbits_t;
923 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
925 #define _SCS0 0x01
926 #define _SCS1 0x02
927 #define _IRCF0 0x08
928 #define _IRCF1 0x10
929 #define _IRCF2 0x20
930 #define _IRCF3 0x40
932 //==============================================================================
935 //==============================================================================
936 // OSCSTAT Bits
938 extern __at(0x009A) __sfr OSCSTAT;
940 typedef union
942 struct
944 unsigned HFIOFS : 1;
945 unsigned LFIOFR : 1;
946 unsigned : 1;
947 unsigned : 1;
948 unsigned HFIOFR : 1;
949 unsigned OSTS : 1;
950 unsigned : 1;
951 unsigned SOSCR : 1;
954 struct
956 unsigned : 1;
957 unsigned : 1;
958 unsigned : 1;
959 unsigned : 1;
960 unsigned : 1;
961 unsigned : 1;
962 unsigned : 1;
963 unsigned T1OSCR : 1;
965 } __OSCSTATbits_t;
967 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
969 #define _HFIOFS 0x01
970 #define _LFIOFR 0x02
971 #define _HFIOFR 0x10
972 #define _OSTS 0x20
973 #define _SOSCR 0x80
974 #define _T1OSCR 0x80
976 //==============================================================================
978 extern __at(0x009B) __sfr ADRES;
979 extern __at(0x009B) __sfr ADRES0;
980 extern __at(0x009B) __sfr ADRES0L;
981 extern __at(0x009B) __sfr ADRESL;
982 extern __at(0x009C) __sfr ADRES0H;
983 extern __at(0x009C) __sfr ADRESH;
985 //==============================================================================
986 // ADCON0 Bits
988 extern __at(0x009D) __sfr ADCON0;
990 typedef union
992 struct
994 unsigned ADON : 1;
995 unsigned GO_NOT_DONE : 1;
996 unsigned CHS0 : 1;
997 unsigned CHS1 : 1;
998 unsigned CHS2 : 1;
999 unsigned CHS3 : 1;
1000 unsigned CHS4 : 1;
1001 unsigned : 1;
1004 struct
1006 unsigned : 1;
1007 unsigned ADGO : 1;
1008 unsigned : 1;
1009 unsigned : 1;
1010 unsigned : 1;
1011 unsigned : 1;
1012 unsigned : 1;
1013 unsigned : 1;
1016 struct
1018 unsigned : 1;
1019 unsigned GO : 1;
1020 unsigned : 1;
1021 unsigned : 1;
1022 unsigned : 1;
1023 unsigned : 1;
1024 unsigned : 1;
1025 unsigned : 1;
1028 struct
1030 unsigned : 2;
1031 unsigned CHS : 5;
1032 unsigned : 1;
1034 } __ADCON0bits_t;
1036 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1038 #define _ADCON0_ADON 0x01
1039 #define _ADCON0_GO_NOT_DONE 0x02
1040 #define _ADCON0_ADGO 0x02
1041 #define _ADCON0_GO 0x02
1042 #define _ADCON0_CHS0 0x04
1043 #define _ADCON0_CHS1 0x08
1044 #define _ADCON0_CHS2 0x10
1045 #define _ADCON0_CHS3 0x20
1046 #define _ADCON0_CHS4 0x40
1048 //==============================================================================
1051 //==============================================================================
1052 // ADCON1 Bits
1054 extern __at(0x009E) __sfr ADCON1;
1056 typedef union
1058 struct
1060 unsigned ADPREF0 : 1;
1061 unsigned ADPREF1 : 1;
1062 unsigned : 1;
1063 unsigned : 1;
1064 unsigned ADCS0 : 1;
1065 unsigned ADCS1 : 1;
1066 unsigned ADCS2 : 1;
1067 unsigned ADFM : 1;
1070 struct
1072 unsigned ADPREF : 2;
1073 unsigned : 6;
1076 struct
1078 unsigned : 4;
1079 unsigned ADCS : 3;
1080 unsigned : 1;
1082 } __ADCON1bits_t;
1084 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1086 #define _ADCON1_ADPREF0 0x01
1087 #define _ADCON1_ADPREF1 0x02
1088 #define _ADCON1_ADCS0 0x10
1089 #define _ADCON1_ADCS1 0x20
1090 #define _ADCON1_ADCS2 0x40
1091 #define _ADCON1_ADFM 0x80
1093 //==============================================================================
1096 //==============================================================================
1097 // LATA Bits
1099 extern __at(0x010C) __sfr LATA;
1101 typedef struct
1103 unsigned LATA0 : 1;
1104 unsigned LATA1 : 1;
1105 unsigned LATA2 : 1;
1106 unsigned LATA3 : 1;
1107 unsigned LATA4 : 1;
1108 unsigned LATA5 : 1;
1109 unsigned LATA6 : 1;
1110 unsigned LATA7 : 1;
1111 } __LATAbits_t;
1113 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1115 #define _LATA0 0x01
1116 #define _LATA1 0x02
1117 #define _LATA2 0x04
1118 #define _LATA3 0x08
1119 #define _LATA4 0x10
1120 #define _LATA5 0x20
1121 #define _LATA6 0x40
1122 #define _LATA7 0x80
1124 //==============================================================================
1127 //==============================================================================
1128 // LATB Bits
1130 extern __at(0x010D) __sfr LATB;
1132 typedef struct
1134 unsigned LATB0 : 1;
1135 unsigned LATB1 : 1;
1136 unsigned LATB2 : 1;
1137 unsigned LATB3 : 1;
1138 unsigned LATB4 : 1;
1139 unsigned LATB5 : 1;
1140 unsigned LATB6 : 1;
1141 unsigned LATB7 : 1;
1142 } __LATBbits_t;
1144 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1146 #define _LATB0 0x01
1147 #define _LATB1 0x02
1148 #define _LATB2 0x04
1149 #define _LATB3 0x08
1150 #define _LATB4 0x10
1151 #define _LATB5 0x20
1152 #define _LATB6 0x40
1153 #define _LATB7 0x80
1155 //==============================================================================
1158 //==============================================================================
1159 // LATC Bits
1161 extern __at(0x010E) __sfr LATC;
1163 typedef struct
1165 unsigned LATC0 : 1;
1166 unsigned LATC1 : 1;
1167 unsigned LATC2 : 1;
1168 unsigned LATC3 : 1;
1169 unsigned LATC4 : 1;
1170 unsigned LATC5 : 1;
1171 unsigned LATC6 : 1;
1172 unsigned LATC7 : 1;
1173 } __LATCbits_t;
1175 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1177 #define _LATC0 0x01
1178 #define _LATC1 0x02
1179 #define _LATC2 0x04
1180 #define _LATC3 0x08
1181 #define _LATC4 0x10
1182 #define _LATC5 0x20
1183 #define _LATC6 0x40
1184 #define _LATC7 0x80
1186 //==============================================================================
1189 //==============================================================================
1190 // BORCON Bits
1192 extern __at(0x0116) __sfr BORCON;
1194 typedef struct
1196 unsigned BORRDY : 1;
1197 unsigned : 1;
1198 unsigned : 1;
1199 unsigned : 1;
1200 unsigned : 1;
1201 unsigned : 1;
1202 unsigned BORFS : 1;
1203 unsigned SBOREN : 1;
1204 } __BORCONbits_t;
1206 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1208 #define _BORRDY 0x01
1209 #define _BORFS 0x40
1210 #define _SBOREN 0x80
1212 //==============================================================================
1215 //==============================================================================
1216 // FVRCON Bits
1218 extern __at(0x0117) __sfr FVRCON;
1220 typedef union
1222 struct
1224 unsigned ADFVR0 : 1;
1225 unsigned ADFVR1 : 1;
1226 unsigned : 1;
1227 unsigned : 1;
1228 unsigned TSRNG : 1;
1229 unsigned TSEN : 1;
1230 unsigned FVRRDY : 1;
1231 unsigned FVREN : 1;
1234 struct
1236 unsigned ADFVR : 2;
1237 unsigned : 6;
1239 } __FVRCONbits_t;
1241 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1243 #define _ADFVR0 0x01
1244 #define _ADFVR1 0x02
1245 #define _TSRNG 0x10
1246 #define _TSEN 0x20
1247 #define _FVRRDY 0x40
1248 #define _FVREN 0x80
1250 //==============================================================================
1253 //==============================================================================
1254 // APFCON Bits
1256 extern __at(0x011D) __sfr APFCON;
1258 typedef struct
1260 unsigned CCP2SEL : 1;
1261 unsigned SSSEL : 1;
1262 unsigned : 1;
1263 unsigned : 1;
1264 unsigned : 1;
1265 unsigned : 1;
1266 unsigned : 1;
1267 unsigned : 1;
1268 } __APFCONbits_t;
1270 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1272 #define _CCP2SEL 0x01
1273 #define _SSSEL 0x02
1275 //==============================================================================
1278 //==============================================================================
1279 // ANSELA Bits
1281 extern __at(0x018C) __sfr ANSELA;
1283 typedef struct
1285 unsigned ANSA0 : 1;
1286 unsigned ANSA1 : 1;
1287 unsigned ANSA2 : 1;
1288 unsigned ANSA3 : 1;
1289 unsigned : 1;
1290 unsigned ANSA5 : 1;
1291 unsigned : 1;
1292 unsigned : 1;
1293 } __ANSELAbits_t;
1295 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1297 #define _ANSA0 0x01
1298 #define _ANSA1 0x02
1299 #define _ANSA2 0x04
1300 #define _ANSA3 0x08
1301 #define _ANSA5 0x20
1303 //==============================================================================
1306 //==============================================================================
1307 // ANSELB Bits
1309 extern __at(0x018D) __sfr ANSELB;
1311 typedef union
1313 struct
1315 unsigned ANSB0 : 1;
1316 unsigned ANSB1 : 1;
1317 unsigned ANSB2 : 1;
1318 unsigned ANSB3 : 1;
1319 unsigned ANSB4 : 1;
1320 unsigned ANSB5 : 1;
1321 unsigned : 1;
1322 unsigned : 1;
1325 struct
1327 unsigned ANSB : 6;
1328 unsigned : 2;
1330 } __ANSELBbits_t;
1332 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1334 #define _ANSB0 0x01
1335 #define _ANSB1 0x02
1336 #define _ANSB2 0x04
1337 #define _ANSB3 0x08
1338 #define _ANSB4 0x10
1339 #define _ANSB5 0x20
1341 //==============================================================================
1344 //==============================================================================
1345 // ANSELC Bits
1347 extern __at(0x018E) __sfr ANSELC;
1349 typedef struct
1351 unsigned : 1;
1352 unsigned : 1;
1353 unsigned ANSC2 : 1;
1354 unsigned ANSC3 : 1;
1355 unsigned ANSC4 : 1;
1356 unsigned ANSC5 : 1;
1357 unsigned ANSC6 : 1;
1358 unsigned ANSC7 : 1;
1359 } __ANSELCbits_t;
1361 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1363 #define _ANSC2 0x04
1364 #define _ANSC3 0x08
1365 #define _ANSC4 0x10
1366 #define _ANSC5 0x20
1367 #define _ANSC6 0x40
1368 #define _ANSC7 0x80
1370 //==============================================================================
1372 extern __at(0x0191) __sfr PMADR;
1373 extern __at(0x0191) __sfr PMADRL;
1374 extern __at(0x0192) __sfr PMADRH;
1375 extern __at(0x0193) __sfr PMDAT;
1376 extern __at(0x0193) __sfr PMDATL;
1377 extern __at(0x0194) __sfr PMDATH;
1379 //==============================================================================
1380 // PMCON1 Bits
1382 extern __at(0x0195) __sfr PMCON1;
1384 typedef struct
1386 unsigned RD : 1;
1387 unsigned WR : 1;
1388 unsigned WREN : 1;
1389 unsigned WRERR : 1;
1390 unsigned FREE : 1;
1391 unsigned LWLO : 1;
1392 unsigned CFGS : 1;
1393 unsigned : 1;
1394 } __PMCON1bits_t;
1396 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1398 #define _RD 0x01
1399 #define _WR 0x02
1400 #define _WREN 0x04
1401 #define _WRERR 0x08
1402 #define _FREE 0x10
1403 #define _LWLO 0x20
1404 #define _CFGS 0x40
1406 //==============================================================================
1408 extern __at(0x0196) __sfr PMCON2;
1410 //==============================================================================
1411 // VREGCON Bits
1413 extern __at(0x0197) __sfr VREGCON;
1415 typedef struct
1417 unsigned Reserved : 1;
1418 unsigned VREGPM : 1;
1419 unsigned : 1;
1420 unsigned : 1;
1421 unsigned : 1;
1422 unsigned : 1;
1423 unsigned : 1;
1424 unsigned : 1;
1425 } __VREGCONbits_t;
1427 extern __at(0x0197) volatile __VREGCONbits_t VREGCONbits;
1429 #define _Reserved 0x01
1430 #define _VREGPM 0x02
1432 //==============================================================================
1434 extern __at(0x0199) __sfr RCREG;
1435 extern __at(0x019A) __sfr TXREG;
1436 extern __at(0x019B) __sfr SP1BRG;
1437 extern __at(0x019B) __sfr SP1BRGL;
1438 extern __at(0x019B) __sfr SPBRG;
1439 extern __at(0x019B) __sfr SPBRGL;
1440 extern __at(0x019C) __sfr SP1BRGH;
1441 extern __at(0x019C) __sfr SPBRGH;
1443 //==============================================================================
1444 // RCSTA Bits
1446 extern __at(0x019D) __sfr RCSTA;
1448 typedef struct
1450 unsigned RX9D : 1;
1451 unsigned OERR : 1;
1452 unsigned FERR : 1;
1453 unsigned ADDEN : 1;
1454 unsigned CREN : 1;
1455 unsigned SREN : 1;
1456 unsigned RX9 : 1;
1457 unsigned SPEN : 1;
1458 } __RCSTAbits_t;
1460 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1462 #define _RX9D 0x01
1463 #define _OERR 0x02
1464 #define _FERR 0x04
1465 #define _ADDEN 0x08
1466 #define _CREN 0x10
1467 #define _SREN 0x20
1468 #define _RX9 0x40
1469 #define _SPEN 0x80
1471 //==============================================================================
1474 //==============================================================================
1475 // TXSTA Bits
1477 extern __at(0x019E) __sfr TXSTA;
1479 typedef struct
1481 unsigned TX9D : 1;
1482 unsigned TRMT : 1;
1483 unsigned BRGH : 1;
1484 unsigned SENDB : 1;
1485 unsigned SYNC : 1;
1486 unsigned TXEN : 1;
1487 unsigned TX9 : 1;
1488 unsigned CSRC : 1;
1489 } __TXSTAbits_t;
1491 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
1493 #define _TX9D 0x01
1494 #define _TRMT 0x02
1495 #define _BRGH 0x04
1496 #define _SENDB 0x08
1497 #define _SYNC 0x10
1498 #define _TXEN 0x20
1499 #define _TX9 0x40
1500 #define _CSRC 0x80
1502 //==============================================================================
1505 //==============================================================================
1506 // BAUDCON Bits
1508 extern __at(0x019F) __sfr BAUDCON;
1510 typedef struct
1512 unsigned ABDEN : 1;
1513 unsigned WUE : 1;
1514 unsigned : 1;
1515 unsigned BRG16 : 1;
1516 unsigned SCKP : 1;
1517 unsigned : 1;
1518 unsigned RCIDL : 1;
1519 unsigned ABDOVF : 1;
1520 } __BAUDCONbits_t;
1522 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
1524 #define _ABDEN 0x01
1525 #define _WUE 0x02
1526 #define _BRG16 0x08
1527 #define _SCKP 0x10
1528 #define _RCIDL 0x40
1529 #define _ABDOVF 0x80
1531 //==============================================================================
1534 //==============================================================================
1535 // WPUB Bits
1537 extern __at(0x020D) __sfr WPUB;
1539 typedef struct
1541 unsigned WPUB0 : 1;
1542 unsigned WPUB1 : 1;
1543 unsigned WPUB2 : 1;
1544 unsigned WPUB3 : 1;
1545 unsigned WPUB4 : 1;
1546 unsigned WPUB5 : 1;
1547 unsigned WPUB6 : 1;
1548 unsigned WPUB7 : 1;
1549 } __WPUBbits_t;
1551 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
1553 #define _WPUB0 0x01
1554 #define _WPUB1 0x02
1555 #define _WPUB2 0x04
1556 #define _WPUB3 0x08
1557 #define _WPUB4 0x10
1558 #define _WPUB5 0x20
1559 #define _WPUB6 0x40
1560 #define _WPUB7 0x80
1562 //==============================================================================
1565 //==============================================================================
1566 // WPUE Bits
1568 extern __at(0x0210) __sfr WPUE;
1570 typedef struct
1572 unsigned : 1;
1573 unsigned : 1;
1574 unsigned : 1;
1575 unsigned WPUE3 : 1;
1576 unsigned : 1;
1577 unsigned : 1;
1578 unsigned : 1;
1579 unsigned : 1;
1580 } __WPUEbits_t;
1582 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
1584 #define _WPUE3 0x08
1586 //==============================================================================
1588 extern __at(0x0211) __sfr SSP1BUF;
1589 extern __at(0x0211) __sfr SSPBUF;
1590 extern __at(0x0212) __sfr SSP1ADD;
1591 extern __at(0x0212) __sfr SSPADD;
1592 extern __at(0x0213) __sfr SSP1MSK;
1593 extern __at(0x0213) __sfr SSPMSK;
1595 //==============================================================================
1596 // SSP1STAT Bits
1598 extern __at(0x0214) __sfr SSP1STAT;
1600 typedef struct
1602 unsigned BF : 1;
1603 unsigned UA : 1;
1604 unsigned R_NOT_W : 1;
1605 unsigned S : 1;
1606 unsigned P : 1;
1607 unsigned D_NOT_A : 1;
1608 unsigned CKE : 1;
1609 unsigned SMP : 1;
1610 } __SSP1STATbits_t;
1612 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
1614 #define _BF 0x01
1615 #define _UA 0x02
1616 #define _R_NOT_W 0x04
1617 #define _S 0x08
1618 #define _P 0x10
1619 #define _D_NOT_A 0x20
1620 #define _CKE 0x40
1621 #define _SMP 0x80
1623 //==============================================================================
1626 //==============================================================================
1627 // SSPSTAT Bits
1629 extern __at(0x0214) __sfr SSPSTAT;
1631 typedef struct
1633 unsigned BF : 1;
1634 unsigned UA : 1;
1635 unsigned R_NOT_W : 1;
1636 unsigned S : 1;
1637 unsigned P : 1;
1638 unsigned D_NOT_A : 1;
1639 unsigned CKE : 1;
1640 unsigned SMP : 1;
1641 } __SSPSTATbits_t;
1643 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
1645 #define _SSPSTAT_BF 0x01
1646 #define _SSPSTAT_UA 0x02
1647 #define _SSPSTAT_R_NOT_W 0x04
1648 #define _SSPSTAT_S 0x08
1649 #define _SSPSTAT_P 0x10
1650 #define _SSPSTAT_D_NOT_A 0x20
1651 #define _SSPSTAT_CKE 0x40
1652 #define _SSPSTAT_SMP 0x80
1654 //==============================================================================
1657 //==============================================================================
1658 // SSP1CON1 Bits
1660 extern __at(0x0215) __sfr SSP1CON1;
1662 typedef union
1664 struct
1666 unsigned SSPM0 : 1;
1667 unsigned SSPM1 : 1;
1668 unsigned SSPM2 : 1;
1669 unsigned SSPM3 : 1;
1670 unsigned CKP : 1;
1671 unsigned SSPEN : 1;
1672 unsigned SSPOV : 1;
1673 unsigned WCOL : 1;
1676 struct
1678 unsigned SSPM : 4;
1679 unsigned : 4;
1681 } __SSP1CON1bits_t;
1683 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
1685 #define _SSPM0 0x01
1686 #define _SSPM1 0x02
1687 #define _SSPM2 0x04
1688 #define _SSPM3 0x08
1689 #define _CKP 0x10
1690 #define _SSPEN 0x20
1691 #define _SSPOV 0x40
1692 #define _WCOL 0x80
1694 //==============================================================================
1697 //==============================================================================
1698 // SSPCON Bits
1700 extern __at(0x0215) __sfr SSPCON;
1702 typedef union
1704 struct
1706 unsigned SSPM0 : 1;
1707 unsigned SSPM1 : 1;
1708 unsigned SSPM2 : 1;
1709 unsigned SSPM3 : 1;
1710 unsigned CKP : 1;
1711 unsigned SSPEN : 1;
1712 unsigned SSPOV : 1;
1713 unsigned WCOL : 1;
1716 struct
1718 unsigned SSPM : 4;
1719 unsigned : 4;
1721 } __SSPCONbits_t;
1723 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
1725 #define _SSPCON_SSPM0 0x01
1726 #define _SSPCON_SSPM1 0x02
1727 #define _SSPCON_SSPM2 0x04
1728 #define _SSPCON_SSPM3 0x08
1729 #define _SSPCON_CKP 0x10
1730 #define _SSPCON_SSPEN 0x20
1731 #define _SSPCON_SSPOV 0x40
1732 #define _SSPCON_WCOL 0x80
1734 //==============================================================================
1737 //==============================================================================
1738 // SSPCON1 Bits
1740 extern __at(0x0215) __sfr SSPCON1;
1742 typedef union
1744 struct
1746 unsigned SSPM0 : 1;
1747 unsigned SSPM1 : 1;
1748 unsigned SSPM2 : 1;
1749 unsigned SSPM3 : 1;
1750 unsigned CKP : 1;
1751 unsigned SSPEN : 1;
1752 unsigned SSPOV : 1;
1753 unsigned WCOL : 1;
1756 struct
1758 unsigned SSPM : 4;
1759 unsigned : 4;
1761 } __SSPCON1bits_t;
1763 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
1765 #define _SSPCON1_SSPM0 0x01
1766 #define _SSPCON1_SSPM1 0x02
1767 #define _SSPCON1_SSPM2 0x04
1768 #define _SSPCON1_SSPM3 0x08
1769 #define _SSPCON1_CKP 0x10
1770 #define _SSPCON1_SSPEN 0x20
1771 #define _SSPCON1_SSPOV 0x40
1772 #define _SSPCON1_WCOL 0x80
1774 //==============================================================================
1777 //==============================================================================
1778 // SSP1CON2 Bits
1780 extern __at(0x0216) __sfr SSP1CON2;
1782 typedef struct
1784 unsigned SEN : 1;
1785 unsigned RSEN : 1;
1786 unsigned PEN : 1;
1787 unsigned RCEN : 1;
1788 unsigned ACKEN : 1;
1789 unsigned ACKDT : 1;
1790 unsigned ACKSTAT : 1;
1791 unsigned GCEN : 1;
1792 } __SSP1CON2bits_t;
1794 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
1796 #define _SEN 0x01
1797 #define _RSEN 0x02
1798 #define _PEN 0x04
1799 #define _RCEN 0x08
1800 #define _ACKEN 0x10
1801 #define _ACKDT 0x20
1802 #define _ACKSTAT 0x40
1803 #define _GCEN 0x80
1805 //==============================================================================
1808 //==============================================================================
1809 // SSPCON2 Bits
1811 extern __at(0x0216) __sfr SSPCON2;
1813 typedef struct
1815 unsigned SEN : 1;
1816 unsigned RSEN : 1;
1817 unsigned PEN : 1;
1818 unsigned RCEN : 1;
1819 unsigned ACKEN : 1;
1820 unsigned ACKDT : 1;
1821 unsigned ACKSTAT : 1;
1822 unsigned GCEN : 1;
1823 } __SSPCON2bits_t;
1825 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
1827 #define _SSPCON2_SEN 0x01
1828 #define _SSPCON2_RSEN 0x02
1829 #define _SSPCON2_PEN 0x04
1830 #define _SSPCON2_RCEN 0x08
1831 #define _SSPCON2_ACKEN 0x10
1832 #define _SSPCON2_ACKDT 0x20
1833 #define _SSPCON2_ACKSTAT 0x40
1834 #define _SSPCON2_GCEN 0x80
1836 //==============================================================================
1839 //==============================================================================
1840 // SSP1CON3 Bits
1842 extern __at(0x0217) __sfr SSP1CON3;
1844 typedef struct
1846 unsigned DHEN : 1;
1847 unsigned AHEN : 1;
1848 unsigned SBCDE : 1;
1849 unsigned SDAHT : 1;
1850 unsigned BOEN : 1;
1851 unsigned SCIE : 1;
1852 unsigned PCIE : 1;
1853 unsigned ACKTIM : 1;
1854 } __SSP1CON3bits_t;
1856 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
1858 #define _DHEN 0x01
1859 #define _AHEN 0x02
1860 #define _SBCDE 0x04
1861 #define _SDAHT 0x08
1862 #define _BOEN 0x10
1863 #define _SCIE 0x20
1864 #define _PCIE 0x40
1865 #define _ACKTIM 0x80
1867 //==============================================================================
1870 //==============================================================================
1871 // SSPCON3 Bits
1873 extern __at(0x0217) __sfr SSPCON3;
1875 typedef struct
1877 unsigned DHEN : 1;
1878 unsigned AHEN : 1;
1879 unsigned SBCDE : 1;
1880 unsigned SDAHT : 1;
1881 unsigned BOEN : 1;
1882 unsigned SCIE : 1;
1883 unsigned PCIE : 1;
1884 unsigned ACKTIM : 1;
1885 } __SSPCON3bits_t;
1887 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
1889 #define _SSPCON3_DHEN 0x01
1890 #define _SSPCON3_AHEN 0x02
1891 #define _SSPCON3_SBCDE 0x04
1892 #define _SSPCON3_SDAHT 0x08
1893 #define _SSPCON3_BOEN 0x10
1894 #define _SSPCON3_SCIE 0x20
1895 #define _SSPCON3_PCIE 0x40
1896 #define _SSPCON3_ACKTIM 0x80
1898 //==============================================================================
1900 extern __at(0x0291) __sfr CCPR1;
1901 extern __at(0x0291) __sfr CCPR1L;
1902 extern __at(0x0292) __sfr CCPR1H;
1904 //==============================================================================
1905 // CCP1CON Bits
1907 extern __at(0x0293) __sfr CCP1CON;
1909 typedef union
1911 struct
1913 unsigned CCP1M0 : 1;
1914 unsigned CCP1M1 : 1;
1915 unsigned CCP1M2 : 1;
1916 unsigned CCP1M3 : 1;
1917 unsigned DC1B0 : 1;
1918 unsigned DC1B1 : 1;
1919 unsigned : 1;
1920 unsigned : 1;
1923 struct
1925 unsigned CCP1M : 4;
1926 unsigned : 4;
1929 struct
1931 unsigned : 4;
1932 unsigned DC1B : 2;
1933 unsigned : 2;
1935 } __CCP1CONbits_t;
1937 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
1939 #define _CCP1M0 0x01
1940 #define _CCP1M1 0x02
1941 #define _CCP1M2 0x04
1942 #define _CCP1M3 0x08
1943 #define _DC1B0 0x10
1944 #define _DC1B1 0x20
1946 //==============================================================================
1948 extern __at(0x0298) __sfr CCPR2;
1949 extern __at(0x0298) __sfr CCPR2L;
1950 extern __at(0x0299) __sfr CCPR2H;
1952 //==============================================================================
1953 // CCP2CON Bits
1955 extern __at(0x029A) __sfr CCP2CON;
1957 typedef union
1959 struct
1961 unsigned CCP2M0 : 1;
1962 unsigned CCP2M1 : 1;
1963 unsigned CCP2M2 : 1;
1964 unsigned CCP2M3 : 1;
1965 unsigned DC2B0 : 1;
1966 unsigned DC2B1 : 1;
1967 unsigned : 1;
1968 unsigned : 1;
1971 struct
1973 unsigned CCP2M : 4;
1974 unsigned : 4;
1977 struct
1979 unsigned : 4;
1980 unsigned DC2B : 2;
1981 unsigned : 2;
1983 } __CCP2CONbits_t;
1985 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
1987 #define _CCP2M0 0x01
1988 #define _CCP2M1 0x02
1989 #define _CCP2M2 0x04
1990 #define _CCP2M3 0x08
1991 #define _DC2B0 0x10
1992 #define _DC2B1 0x20
1994 //==============================================================================
1997 //==============================================================================
1998 // IOCBP Bits
2000 extern __at(0x0394) __sfr IOCBP;
2002 typedef struct
2004 unsigned IOCBP0 : 1;
2005 unsigned IOCBP1 : 1;
2006 unsigned IOCBP2 : 1;
2007 unsigned IOCBP3 : 1;
2008 unsigned IOCBP4 : 1;
2009 unsigned IOCBP5 : 1;
2010 unsigned IOCBP6 : 1;
2011 unsigned IOCBP7 : 1;
2012 } __IOCBPbits_t;
2014 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
2016 #define _IOCBP0 0x01
2017 #define _IOCBP1 0x02
2018 #define _IOCBP2 0x04
2019 #define _IOCBP3 0x08
2020 #define _IOCBP4 0x10
2021 #define _IOCBP5 0x20
2022 #define _IOCBP6 0x40
2023 #define _IOCBP7 0x80
2025 //==============================================================================
2028 //==============================================================================
2029 // IOCBN Bits
2031 extern __at(0x0395) __sfr IOCBN;
2033 typedef struct
2035 unsigned IOCBN0 : 1;
2036 unsigned IOCBN1 : 1;
2037 unsigned IOCBN2 : 1;
2038 unsigned IOCBN3 : 1;
2039 unsigned IOCBN4 : 1;
2040 unsigned IOCBN5 : 1;
2041 unsigned IOCBN6 : 1;
2042 unsigned IOCBN7 : 1;
2043 } __IOCBNbits_t;
2045 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
2047 #define _IOCBN0 0x01
2048 #define _IOCBN1 0x02
2049 #define _IOCBN2 0x04
2050 #define _IOCBN3 0x08
2051 #define _IOCBN4 0x10
2052 #define _IOCBN5 0x20
2053 #define _IOCBN6 0x40
2054 #define _IOCBN7 0x80
2056 //==============================================================================
2059 //==============================================================================
2060 // IOCBF Bits
2062 extern __at(0x0396) __sfr IOCBF;
2064 typedef struct
2066 unsigned IOCBF0 : 1;
2067 unsigned IOCBF1 : 1;
2068 unsigned IOCBF2 : 1;
2069 unsigned IOCBF3 : 1;
2070 unsigned IOCBF4 : 1;
2071 unsigned IOCBF5 : 1;
2072 unsigned IOCBF6 : 1;
2073 unsigned IOCBF7 : 1;
2074 } __IOCBFbits_t;
2076 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
2078 #define _IOCBF0 0x01
2079 #define _IOCBF1 0x02
2080 #define _IOCBF2 0x04
2081 #define _IOCBF3 0x08
2082 #define _IOCBF4 0x10
2083 #define _IOCBF5 0x20
2084 #define _IOCBF6 0x40
2085 #define _IOCBF7 0x80
2087 //==============================================================================
2090 //==============================================================================
2091 // AADCON0 Bits
2093 extern __at(0x0711) __sfr AADCON0;
2095 typedef union
2097 struct
2099 unsigned ADON : 1;
2100 unsigned GO_NOT_DONE : 1;
2101 unsigned CHS0 : 1;
2102 unsigned CHS1 : 1;
2103 unsigned CHS2 : 1;
2104 unsigned CHS3 : 1;
2105 unsigned CHS4 : 1;
2106 unsigned : 1;
2109 struct
2111 unsigned : 2;
2112 unsigned CHS : 5;
2113 unsigned : 1;
2115 } __AADCON0bits_t;
2117 extern __at(0x0711) volatile __AADCON0bits_t AADCON0bits;
2119 #define _ADON 0x01
2120 #define _GO_NOT_DONE 0x02
2121 #define _CHS0 0x04
2122 #define _CHS1 0x08
2123 #define _CHS2 0x10
2124 #define _CHS3 0x20
2125 #define _CHS4 0x40
2127 //==============================================================================
2130 //==============================================================================
2131 // AADCON1 Bits
2133 extern __at(0x0712) __sfr AADCON1;
2135 typedef union
2137 struct
2139 unsigned ADPREF0 : 1;
2140 unsigned ADPREF1 : 1;
2141 unsigned : 1;
2142 unsigned : 1;
2143 unsigned ADCS0 : 1;
2144 unsigned ADCS1 : 1;
2145 unsigned ADCS2 : 1;
2146 unsigned ADFM : 1;
2149 struct
2151 unsigned ADPREF : 2;
2152 unsigned : 6;
2155 struct
2157 unsigned : 4;
2158 unsigned ADCS : 3;
2159 unsigned : 1;
2161 } __AADCON1bits_t;
2163 extern __at(0x0712) volatile __AADCON1bits_t AADCON1bits;
2165 #define _ADPREF0 0x01
2166 #define _ADPREF1 0x02
2167 #define _ADCS0 0x10
2168 #define _ADCS1 0x20
2169 #define _ADCS2 0x40
2170 #define _ADFM 0x80
2172 //==============================================================================
2175 //==============================================================================
2176 // AADCON2 Bits
2178 extern __at(0x0713) __sfr AADCON2;
2180 typedef union
2182 struct
2184 unsigned : 1;
2185 unsigned : 1;
2186 unsigned : 1;
2187 unsigned : 1;
2188 unsigned TRIGSEL0 : 1;
2189 unsigned TRIGSEL1 : 1;
2190 unsigned TRIGSEL2 : 1;
2191 unsigned : 1;
2194 struct
2196 unsigned : 4;
2197 unsigned TRIGSEL : 3;
2198 unsigned : 1;
2200 } __AADCON2bits_t;
2202 extern __at(0x0713) volatile __AADCON2bits_t AADCON2bits;
2204 #define _TRIGSEL0 0x10
2205 #define _TRIGSEL1 0x20
2206 #define _TRIGSEL2 0x40
2208 //==============================================================================
2211 //==============================================================================
2212 // AADCON3 Bits
2214 extern __at(0x0714) __sfr AADCON3;
2216 typedef struct
2218 unsigned ADDSEN : 1;
2219 unsigned ADIPEN : 1;
2220 unsigned : 1;
2221 unsigned ADOOEN : 1;
2222 unsigned ADOEN : 1;
2223 unsigned ADOLEN : 1;
2224 unsigned ADIPPOL : 1;
2225 unsigned ADEPPOL : 1;
2226 } __AADCON3bits_t;
2228 extern __at(0x0714) volatile __AADCON3bits_t AADCON3bits;
2230 #define _ADDSEN 0x01
2231 #define _ADIPEN 0x02
2232 #define _ADOOEN 0x08
2233 #define _ADOEN 0x10
2234 #define _ADOLEN 0x20
2235 #define _ADIPPOL 0x40
2236 #define _ADEPPOL 0x80
2238 //==============================================================================
2241 //==============================================================================
2242 // AADSTAT Bits
2244 extern __at(0x0715) __sfr AADSTAT;
2246 typedef union
2248 struct
2250 unsigned ADSTG0 : 1;
2251 unsigned ADSTG1 : 1;
2252 unsigned ADCONV : 1;
2253 unsigned : 1;
2254 unsigned : 1;
2255 unsigned : 1;
2256 unsigned : 1;
2257 unsigned : 1;
2260 struct
2262 unsigned ADSTG : 2;
2263 unsigned : 6;
2265 } __AADSTATbits_t;
2267 extern __at(0x0715) volatile __AADSTATbits_t AADSTATbits;
2269 #define _ADSTG0 0x01
2270 #define _ADSTG1 0x02
2271 #define _ADCONV 0x04
2273 //==============================================================================
2276 //==============================================================================
2277 // AADPRE Bits
2279 extern __at(0x0716) __sfr AADPRE;
2281 typedef union
2283 struct
2285 unsigned ADPRE0 : 1;
2286 unsigned ADPRE1 : 1;
2287 unsigned ADPRE2 : 1;
2288 unsigned ADPRE3 : 1;
2289 unsigned ADPRE4 : 1;
2290 unsigned ADPRE5 : 1;
2291 unsigned ADPRE6 : 1;
2292 unsigned : 1;
2295 struct
2297 unsigned ADPRE : 7;
2298 unsigned : 1;
2300 } __AADPREbits_t;
2302 extern __at(0x0716) volatile __AADPREbits_t AADPREbits;
2304 #define _ADPRE0 0x01
2305 #define _ADPRE1 0x02
2306 #define _ADPRE2 0x04
2307 #define _ADPRE3 0x08
2308 #define _ADPRE4 0x10
2309 #define _ADPRE5 0x20
2310 #define _ADPRE6 0x40
2312 //==============================================================================
2315 //==============================================================================
2316 // AADACQ Bits
2318 extern __at(0x0717) __sfr AADACQ;
2320 typedef union
2322 struct
2324 unsigned ADACQ0 : 1;
2325 unsigned ADACQ1 : 1;
2326 unsigned ADACQ2 : 1;
2327 unsigned ADACQ3 : 1;
2328 unsigned ADACQ4 : 1;
2329 unsigned ADACQ5 : 1;
2330 unsigned ADACQ6 : 1;
2331 unsigned : 1;
2334 struct
2336 unsigned ADACQ : 7;
2337 unsigned : 1;
2339 } __AADACQbits_t;
2341 extern __at(0x0717) volatile __AADACQbits_t AADACQbits;
2343 #define _ADACQ0 0x01
2344 #define _ADACQ1 0x02
2345 #define _ADACQ2 0x04
2346 #define _ADACQ3 0x08
2347 #define _ADACQ4 0x10
2348 #define _ADACQ5 0x20
2349 #define _ADACQ6 0x40
2351 //==============================================================================
2354 //==============================================================================
2355 // AADGRD Bits
2357 extern __at(0x0718) __sfr AADGRD;
2359 typedef struct
2361 unsigned : 1;
2362 unsigned : 1;
2363 unsigned : 1;
2364 unsigned : 1;
2365 unsigned : 1;
2366 unsigned GRDPOL : 1;
2367 unsigned GRDAOE : 1;
2368 unsigned GRDBOE : 1;
2369 } __AADGRDbits_t;
2371 extern __at(0x0718) volatile __AADGRDbits_t AADGRDbits;
2373 #define _GRDPOL 0x20
2374 #define _GRDAOE 0x40
2375 #define _GRDBOE 0x80
2377 //==============================================================================
2380 //==============================================================================
2381 // AADCAP Bits
2383 extern __at(0x0719) __sfr AADCAP;
2385 typedef union
2387 struct
2389 unsigned ADDCAP0 : 1;
2390 unsigned ADDCAP1 : 1;
2391 unsigned ADDCAP2 : 1;
2392 unsigned : 1;
2393 unsigned : 1;
2394 unsigned : 1;
2395 unsigned : 1;
2396 unsigned : 1;
2399 struct
2401 unsigned ADDCAP : 3;
2402 unsigned : 5;
2404 } __AADCAPbits_t;
2406 extern __at(0x0719) volatile __AADCAPbits_t AADCAPbits;
2408 #define _ADDCAP0 0x01
2409 #define _ADDCAP1 0x02
2410 #define _ADDCAP2 0x04
2412 //==============================================================================
2414 extern __at(0x071A) __sfr AADRES0;
2415 extern __at(0x071A) __sfr AADRES0L;
2416 extern __at(0x071A) __sfr AD1RES0;
2417 extern __at(0x071B) __sfr AADRES0H;
2418 extern __at(0x071C) __sfr AADRES1;
2419 extern __at(0x071C) __sfr AADRES1L;
2420 extern __at(0x071C) __sfr AD1RES1;
2421 extern __at(0x071C) __sfr ADRES1;
2422 extern __at(0x071D) __sfr AADRES1H;
2424 //==============================================================================
2425 // STATUS_SHAD Bits
2427 extern __at(0x0FE4) __sfr STATUS_SHAD;
2429 typedef struct
2431 unsigned C_SHAD : 1;
2432 unsigned DC_SHAD : 1;
2433 unsigned Z_SHAD : 1;
2434 unsigned : 1;
2435 unsigned : 1;
2436 unsigned : 1;
2437 unsigned : 1;
2438 unsigned : 1;
2439 } __STATUS_SHADbits_t;
2441 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
2443 #define _C_SHAD 0x01
2444 #define _DC_SHAD 0x02
2445 #define _Z_SHAD 0x04
2447 //==============================================================================
2449 extern __at(0x0FE5) __sfr WREG_SHAD;
2450 extern __at(0x0FE6) __sfr BSR_SHAD;
2451 extern __at(0x0FE7) __sfr PCLATH_SHAD;
2452 extern __at(0x0FE8) __sfr FSR0L_SHAD;
2453 extern __at(0x0FE9) __sfr FSR0H_SHAD;
2454 extern __at(0x0FEA) __sfr FSR1L_SHAD;
2455 extern __at(0x0FEB) __sfr FSR1H_SHAD;
2456 extern __at(0x0FED) __sfr STKPTR;
2457 extern __at(0x0FEE) __sfr TOSL;
2458 extern __at(0x0FEF) __sfr TOSH;
2460 //==============================================================================
2462 // Configuration Bits
2464 //==============================================================================
2466 #define _CONFIG1 0x8007
2467 #define _CONFIG2 0x8008
2469 //----------------------------- CONFIG1 Options -------------------------------
2471 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
2472 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
2473 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
2474 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
2475 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
2476 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
2477 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
2478 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pin.
2479 #define _WDTE_OFF 0x3FE7 // WDT disabled.
2480 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
2481 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
2482 #define _WDTE_ON 0x3FFF // WDT enabled.
2483 #define _PWRTE_ON 0x3FDF // PWRT enabled.
2484 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
2485 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
2486 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
2487 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
2488 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
2489 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
2490 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
2491 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
2492 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
2493 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
2494 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
2495 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
2496 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
2497 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
2498 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
2500 //----------------------------- CONFIG2 Options -------------------------------
2502 #define _WRT_ALL 0x3FFC // 000h to 1FFFh write protected, no addresses may be modified by EECON control.
2503 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 1000h to 1FFFh may be modified by EECON control.
2504 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 1FFFh may be modified by EECON control.
2505 #define _WRT_OFF 0x3FFF // Write protection off.
2506 #define _VCAPEN_ON 0x3FEF // VCAP pin function enabled.
2507 #define _VCAPEN_OFF 0x3FFF // VCAP pin function disabled.
2508 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
2509 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
2510 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
2511 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
2512 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
2513 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
2514 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
2515 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
2516 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
2517 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
2519 //==============================================================================
2521 #define _DEVID1 0x8006
2523 #define _IDLOC0 0x8000
2524 #define _IDLOC1 0x8001
2525 #define _IDLOC2 0x8002
2526 #define _IDLOC3 0x8003
2528 //==============================================================================
2530 #ifndef NO_BIT_DEFINES
2532 #define ADACQ0 AADACQbits.ADACQ0 // bit 0
2533 #define ADACQ1 AADACQbits.ADACQ1 // bit 1
2534 #define ADACQ2 AADACQbits.ADACQ2 // bit 2
2535 #define ADACQ3 AADACQbits.ADACQ3 // bit 3
2536 #define ADACQ4 AADACQbits.ADACQ4 // bit 4
2537 #define ADACQ5 AADACQbits.ADACQ5 // bit 5
2538 #define ADACQ6 AADACQbits.ADACQ6 // bit 6
2540 #define ADDCAP0 AADCAPbits.ADDCAP0 // bit 0
2541 #define ADDCAP1 AADCAPbits.ADDCAP1 // bit 1
2542 #define ADDCAP2 AADCAPbits.ADDCAP2 // bit 2
2544 #define ADON AADCON0bits.ADON // bit 0
2545 #define GO_NOT_DONE AADCON0bits.GO_NOT_DONE // bit 1
2546 #define CHS0 AADCON0bits.CHS0 // bit 2
2547 #define CHS1 AADCON0bits.CHS1 // bit 3
2548 #define CHS2 AADCON0bits.CHS2 // bit 4
2549 #define CHS3 AADCON0bits.CHS3 // bit 5
2550 #define CHS4 AADCON0bits.CHS4 // bit 6
2552 #define ADPREF0 AADCON1bits.ADPREF0 // bit 0
2553 #define ADPREF1 AADCON1bits.ADPREF1 // bit 1
2554 #define ADCS0 AADCON1bits.ADCS0 // bit 4
2555 #define ADCS1 AADCON1bits.ADCS1 // bit 5
2556 #define ADCS2 AADCON1bits.ADCS2 // bit 6
2557 #define ADFM AADCON1bits.ADFM // bit 7
2559 #define TRIGSEL0 AADCON2bits.TRIGSEL0 // bit 4
2560 #define TRIGSEL1 AADCON2bits.TRIGSEL1 // bit 5
2561 #define TRIGSEL2 AADCON2bits.TRIGSEL2 // bit 6
2563 #define ADDSEN AADCON3bits.ADDSEN // bit 0
2564 #define ADIPEN AADCON3bits.ADIPEN // bit 1
2565 #define ADOOEN AADCON3bits.ADOOEN // bit 3
2566 #define ADOEN AADCON3bits.ADOEN // bit 4
2567 #define ADOLEN AADCON3bits.ADOLEN // bit 5
2568 #define ADIPPOL AADCON3bits.ADIPPOL // bit 6
2569 #define ADEPPOL AADCON3bits.ADEPPOL // bit 7
2571 #define GRDPOL AADGRDbits.GRDPOL // bit 5
2572 #define GRDAOE AADGRDbits.GRDAOE // bit 6
2573 #define GRDBOE AADGRDbits.GRDBOE // bit 7
2575 #define ADPRE0 AADPREbits.ADPRE0 // bit 0
2576 #define ADPRE1 AADPREbits.ADPRE1 // bit 1
2577 #define ADPRE2 AADPREbits.ADPRE2 // bit 2
2578 #define ADPRE3 AADPREbits.ADPRE3 // bit 3
2579 #define ADPRE4 AADPREbits.ADPRE4 // bit 4
2580 #define ADPRE5 AADPREbits.ADPRE5 // bit 5
2581 #define ADPRE6 AADPREbits.ADPRE6 // bit 6
2583 #define ADSTG0 AADSTATbits.ADSTG0 // bit 0
2584 #define ADSTG1 AADSTATbits.ADSTG1 // bit 1
2585 #define ADCONV AADSTATbits.ADCONV // bit 2
2587 #define ANSA0 ANSELAbits.ANSA0 // bit 0
2588 #define ANSA1 ANSELAbits.ANSA1 // bit 1
2589 #define ANSA2 ANSELAbits.ANSA2 // bit 2
2590 #define ANSA3 ANSELAbits.ANSA3 // bit 3
2591 #define ANSA5 ANSELAbits.ANSA5 // bit 5
2593 #define ANSB0 ANSELBbits.ANSB0 // bit 0
2594 #define ANSB1 ANSELBbits.ANSB1 // bit 1
2595 #define ANSB2 ANSELBbits.ANSB2 // bit 2
2596 #define ANSB3 ANSELBbits.ANSB3 // bit 3
2597 #define ANSB4 ANSELBbits.ANSB4 // bit 4
2598 #define ANSB5 ANSELBbits.ANSB5 // bit 5
2600 #define ANSC2 ANSELCbits.ANSC2 // bit 2
2601 #define ANSC3 ANSELCbits.ANSC3 // bit 3
2602 #define ANSC4 ANSELCbits.ANSC4 // bit 4
2603 #define ANSC5 ANSELCbits.ANSC5 // bit 5
2604 #define ANSC6 ANSELCbits.ANSC6 // bit 6
2605 #define ANSC7 ANSELCbits.ANSC7 // bit 7
2607 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
2608 #define SSSEL APFCONbits.SSSEL // bit 1
2610 #define ABDEN BAUDCONbits.ABDEN // bit 0
2611 #define WUE BAUDCONbits.WUE // bit 1
2612 #define BRG16 BAUDCONbits.BRG16 // bit 3
2613 #define SCKP BAUDCONbits.SCKP // bit 4
2614 #define RCIDL BAUDCONbits.RCIDL // bit 6
2615 #define ABDOVF BAUDCONbits.ABDOVF // bit 7
2617 #define BORRDY BORCONbits.BORRDY // bit 0
2618 #define BORFS BORCONbits.BORFS // bit 6
2619 #define SBOREN BORCONbits.SBOREN // bit 7
2621 #define BSR0 BSRbits.BSR0 // bit 0
2622 #define BSR1 BSRbits.BSR1 // bit 1
2623 #define BSR2 BSRbits.BSR2 // bit 2
2624 #define BSR3 BSRbits.BSR3 // bit 3
2625 #define BSR4 BSRbits.BSR4 // bit 4
2627 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
2628 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
2629 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
2630 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
2631 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
2632 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
2634 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
2635 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
2636 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
2637 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
2638 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
2639 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
2641 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
2642 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
2643 #define TSRNG FVRCONbits.TSRNG // bit 4
2644 #define TSEN FVRCONbits.TSEN // bit 5
2645 #define FVRRDY FVRCONbits.FVRRDY // bit 6
2646 #define FVREN FVRCONbits.FVREN // bit 7
2648 #define IOCIF INTCONbits.IOCIF // bit 0
2649 #define INTF INTCONbits.INTF // bit 1
2650 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
2651 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
2652 #define IOCIE INTCONbits.IOCIE // bit 3
2653 #define INTE INTCONbits.INTE // bit 4
2654 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
2655 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
2656 #define PEIE INTCONbits.PEIE // bit 6
2657 #define GIE INTCONbits.GIE // bit 7
2659 #define IOCBF0 IOCBFbits.IOCBF0 // bit 0
2660 #define IOCBF1 IOCBFbits.IOCBF1 // bit 1
2661 #define IOCBF2 IOCBFbits.IOCBF2 // bit 2
2662 #define IOCBF3 IOCBFbits.IOCBF3 // bit 3
2663 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
2664 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
2665 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
2666 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
2668 #define IOCBN0 IOCBNbits.IOCBN0 // bit 0
2669 #define IOCBN1 IOCBNbits.IOCBN1 // bit 1
2670 #define IOCBN2 IOCBNbits.IOCBN2 // bit 2
2671 #define IOCBN3 IOCBNbits.IOCBN3 // bit 3
2672 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
2673 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
2674 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
2675 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
2677 #define IOCBP0 IOCBPbits.IOCBP0 // bit 0
2678 #define IOCBP1 IOCBPbits.IOCBP1 // bit 1
2679 #define IOCBP2 IOCBPbits.IOCBP2 // bit 2
2680 #define IOCBP3 IOCBPbits.IOCBP3 // bit 3
2681 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
2682 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
2683 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
2684 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
2686 #define LATA0 LATAbits.LATA0 // bit 0
2687 #define LATA1 LATAbits.LATA1 // bit 1
2688 #define LATA2 LATAbits.LATA2 // bit 2
2689 #define LATA3 LATAbits.LATA3 // bit 3
2690 #define LATA4 LATAbits.LATA4 // bit 4
2691 #define LATA5 LATAbits.LATA5 // bit 5
2692 #define LATA6 LATAbits.LATA6 // bit 6
2693 #define LATA7 LATAbits.LATA7 // bit 7
2695 #define LATB0 LATBbits.LATB0 // bit 0
2696 #define LATB1 LATBbits.LATB1 // bit 1
2697 #define LATB2 LATBbits.LATB2 // bit 2
2698 #define LATB3 LATBbits.LATB3 // bit 3
2699 #define LATB4 LATBbits.LATB4 // bit 4
2700 #define LATB5 LATBbits.LATB5 // bit 5
2701 #define LATB6 LATBbits.LATB6 // bit 6
2702 #define LATB7 LATBbits.LATB7 // bit 7
2704 #define LATC0 LATCbits.LATC0 // bit 0
2705 #define LATC1 LATCbits.LATC1 // bit 1
2706 #define LATC2 LATCbits.LATC2 // bit 2
2707 #define LATC3 LATCbits.LATC3 // bit 3
2708 #define LATC4 LATCbits.LATC4 // bit 4
2709 #define LATC5 LATCbits.LATC5 // bit 5
2710 #define LATC6 LATCbits.LATC6 // bit 6
2711 #define LATC7 LATCbits.LATC7 // bit 7
2713 #define PS0 OPTION_REGbits.PS0 // bit 0
2714 #define PS1 OPTION_REGbits.PS1 // bit 1
2715 #define PS2 OPTION_REGbits.PS2 // bit 2
2716 #define PSA OPTION_REGbits.PSA // bit 3
2717 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
2718 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
2719 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
2720 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
2721 #define INTEDG OPTION_REGbits.INTEDG // bit 6
2722 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
2724 #define SCS0 OSCCONbits.SCS0 // bit 0
2725 #define SCS1 OSCCONbits.SCS1 // bit 1
2726 #define IRCF0 OSCCONbits.IRCF0 // bit 3
2727 #define IRCF1 OSCCONbits.IRCF1 // bit 4
2728 #define IRCF2 OSCCONbits.IRCF2 // bit 5
2729 #define IRCF3 OSCCONbits.IRCF3 // bit 6
2731 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
2732 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
2733 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
2734 #define OSTS OSCSTATbits.OSTS // bit 5
2735 #define SOSCR OSCSTATbits.SOSCR // bit 7, shadows bit in OSCSTATbits
2736 #define T1OSCR OSCSTATbits.T1OSCR // bit 7, shadows bit in OSCSTATbits
2738 #define NOT_BOR PCONbits.NOT_BOR // bit 0
2739 #define NOT_POR PCONbits.NOT_POR // bit 1
2740 #define NOT_RI PCONbits.NOT_RI // bit 2
2741 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
2742 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
2743 #define STKUNF PCONbits.STKUNF // bit 6
2744 #define STKOVF PCONbits.STKOVF // bit 7
2746 #define TMR1IE PIE1bits.TMR1IE // bit 0
2747 #define TMR2IE PIE1bits.TMR2IE // bit 1
2748 #define CCP1IE PIE1bits.CCP1IE // bit 2
2749 #define SSPIE PIE1bits.SSPIE // bit 3
2750 #define TXIE PIE1bits.TXIE // bit 4
2751 #define RCIE PIE1bits.RCIE // bit 5
2752 #define ADIE PIE1bits.ADIE // bit 6
2753 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
2755 #define CCP2IE PIE2bits.CCP2IE // bit 0
2756 #define BCLIE PIE2bits.BCLIE // bit 3
2757 #define OSFIE PIE2bits.OSFIE // bit 7
2759 #define TMR1IF PIR1bits.TMR1IF // bit 0
2760 #define TMR2IF PIR1bits.TMR2IF // bit 1
2761 #define CCP1IF PIR1bits.CCP1IF // bit 2
2762 #define SSPIF PIR1bits.SSPIF // bit 3
2763 #define TXIF PIR1bits.TXIF // bit 4
2764 #define RCIF PIR1bits.RCIF // bit 5
2765 #define ADIF PIR1bits.ADIF // bit 6
2766 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
2768 #define CCP2IF PIR2bits.CCP2IF // bit 0
2769 #define BCLIF PIR2bits.BCLIF // bit 3
2770 #define OSFIF PIR2bits.OSFIF // bit 7
2772 #define RD PMCON1bits.RD // bit 0
2773 #define WR PMCON1bits.WR // bit 1
2774 #define WREN PMCON1bits.WREN // bit 2
2775 #define WRERR PMCON1bits.WRERR // bit 3
2776 #define FREE PMCON1bits.FREE // bit 4
2777 #define LWLO PMCON1bits.LWLO // bit 5
2778 #define CFGS PMCON1bits.CFGS // bit 6
2780 #define RA0 PORTAbits.RA0 // bit 0
2781 #define RA1 PORTAbits.RA1 // bit 1
2782 #define RA2 PORTAbits.RA2 // bit 2
2783 #define RA3 PORTAbits.RA3 // bit 3
2784 #define RA4 PORTAbits.RA4 // bit 4
2785 #define RA5 PORTAbits.RA5 // bit 5
2786 #define RA6 PORTAbits.RA6 // bit 6
2787 #define RA7 PORTAbits.RA7 // bit 7
2789 #define RB0 PORTBbits.RB0 // bit 0
2790 #define RB1 PORTBbits.RB1 // bit 1
2791 #define RB2 PORTBbits.RB2 // bit 2
2792 #define RB3 PORTBbits.RB3 // bit 3
2793 #define RB4 PORTBbits.RB4 // bit 4
2794 #define RB5 PORTBbits.RB5 // bit 5
2795 #define RB6 PORTBbits.RB6 // bit 6
2796 #define RB7 PORTBbits.RB7 // bit 7
2798 #define RC0 PORTCbits.RC0 // bit 0
2799 #define RC1 PORTCbits.RC1 // bit 1
2800 #define RC2 PORTCbits.RC2 // bit 2
2801 #define RC3 PORTCbits.RC3 // bit 3
2802 #define RC4 PORTCbits.RC4 // bit 4
2803 #define RC5 PORTCbits.RC5 // bit 5
2804 #define RC6 PORTCbits.RC6 // bit 6
2805 #define RC7 PORTCbits.RC7 // bit 7
2807 #define RE3 PORTEbits.RE3 // bit 3
2809 #define RX9D RCSTAbits.RX9D // bit 0
2810 #define OERR RCSTAbits.OERR // bit 1
2811 #define FERR RCSTAbits.FERR // bit 2
2812 #define ADDEN RCSTAbits.ADDEN // bit 3
2813 #define CREN RCSTAbits.CREN // bit 4
2814 #define SREN RCSTAbits.SREN // bit 5
2815 #define RX9 RCSTAbits.RX9 // bit 6
2816 #define SPEN RCSTAbits.SPEN // bit 7
2818 #define SSPM0 SSP1CON1bits.SSPM0 // bit 0
2819 #define SSPM1 SSP1CON1bits.SSPM1 // bit 1
2820 #define SSPM2 SSP1CON1bits.SSPM2 // bit 2
2821 #define SSPM3 SSP1CON1bits.SSPM3 // bit 3
2822 #define CKP SSP1CON1bits.CKP // bit 4
2823 #define SSPEN SSP1CON1bits.SSPEN // bit 5
2824 #define SSPOV SSP1CON1bits.SSPOV // bit 6
2825 #define WCOL SSP1CON1bits.WCOL // bit 7
2827 #define SEN SSP1CON2bits.SEN // bit 0
2828 #define RSEN SSP1CON2bits.RSEN // bit 1
2829 #define PEN SSP1CON2bits.PEN // bit 2
2830 #define RCEN SSP1CON2bits.RCEN // bit 3
2831 #define ACKEN SSP1CON2bits.ACKEN // bit 4
2832 #define ACKDT SSP1CON2bits.ACKDT // bit 5
2833 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
2834 #define GCEN SSP1CON2bits.GCEN // bit 7
2836 #define DHEN SSP1CON3bits.DHEN // bit 0
2837 #define AHEN SSP1CON3bits.AHEN // bit 1
2838 #define SBCDE SSP1CON3bits.SBCDE // bit 2
2839 #define SDAHT SSP1CON3bits.SDAHT // bit 3
2840 #define BOEN SSP1CON3bits.BOEN // bit 4
2841 #define SCIE SSP1CON3bits.SCIE // bit 5
2842 #define PCIE SSP1CON3bits.PCIE // bit 6
2843 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
2845 #define BF SSP1STATbits.BF // bit 0
2846 #define UA SSP1STATbits.UA // bit 1
2847 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
2848 #define S SSP1STATbits.S // bit 3
2849 #define P SSP1STATbits.P // bit 4
2850 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
2851 #define CKE SSP1STATbits.CKE // bit 6
2852 #define SMP SSP1STATbits.SMP // bit 7
2854 #define C STATUSbits.C // bit 0
2855 #define DC STATUSbits.DC // bit 1
2856 #define Z STATUSbits.Z // bit 2
2857 #define NOT_PD STATUSbits.NOT_PD // bit 3
2858 #define NOT_TO STATUSbits.NOT_TO // bit 4
2860 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
2861 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
2862 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
2864 #define TMR1ON T1CONbits.TMR1ON // bit 0
2865 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
2866 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
2867 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
2868 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
2869 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
2870 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
2872 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
2873 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
2874 #define T1GVAL T1GCONbits.T1GVAL // bit 2
2875 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
2876 #define T1GSPM T1GCONbits.T1GSPM // bit 4
2877 #define T1GTM T1GCONbits.T1GTM // bit 5
2878 #define T1GPOL T1GCONbits.T1GPOL // bit 6
2879 #define TMR1GE T1GCONbits.TMR1GE // bit 7
2881 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
2882 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
2883 #define TMR2ON T2CONbits.TMR2ON // bit 2
2884 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
2885 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
2886 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
2887 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
2889 #define TRISA0 TRISAbits.TRISA0 // bit 0
2890 #define TRISA1 TRISAbits.TRISA1 // bit 1
2891 #define TRISA2 TRISAbits.TRISA2 // bit 2
2892 #define TRISA3 TRISAbits.TRISA3 // bit 3
2893 #define TRISA4 TRISAbits.TRISA4 // bit 4
2894 #define TRISA5 TRISAbits.TRISA5 // bit 5
2895 #define TRISA6 TRISAbits.TRISA6 // bit 6
2896 #define TRISA7 TRISAbits.TRISA7 // bit 7
2898 #define TRISB0 TRISBbits.TRISB0 // bit 0
2899 #define TRISB1 TRISBbits.TRISB1 // bit 1
2900 #define TRISB2 TRISBbits.TRISB2 // bit 2
2901 #define TRISB3 TRISBbits.TRISB3 // bit 3
2902 #define TRISB4 TRISBbits.TRISB4 // bit 4
2903 #define TRISB5 TRISBbits.TRISB5 // bit 5
2904 #define TRISB6 TRISBbits.TRISB6 // bit 6
2905 #define TRISB7 TRISBbits.TRISB7 // bit 7
2907 #define TRISC0 TRISCbits.TRISC0 // bit 0
2908 #define TRISC1 TRISCbits.TRISC1 // bit 1
2909 #define TRISC2 TRISCbits.TRISC2 // bit 2
2910 #define TRISC3 TRISCbits.TRISC3 // bit 3
2911 #define TRISC4 TRISCbits.TRISC4 // bit 4
2912 #define TRISC5 TRISCbits.TRISC5 // bit 5
2913 #define TRISC6 TRISCbits.TRISC6 // bit 6
2914 #define TRISC7 TRISCbits.TRISC7 // bit 7
2916 #define TX9D TXSTAbits.TX9D // bit 0
2917 #define TRMT TXSTAbits.TRMT // bit 1
2918 #define BRGH TXSTAbits.BRGH // bit 2
2919 #define SENDB TXSTAbits.SENDB // bit 3
2920 #define SYNC TXSTAbits.SYNC // bit 4
2921 #define TXEN TXSTAbits.TXEN // bit 5
2922 #define TX9 TXSTAbits.TX9 // bit 6
2923 #define CSRC TXSTAbits.CSRC // bit 7
2925 #define Reserved VREGCONbits.Reserved // bit 0
2926 #define VREGPM VREGCONbits.VREGPM // bit 1
2928 #define SWDTEN WDTCONbits.SWDTEN // bit 0
2929 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
2930 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
2931 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
2932 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
2933 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
2935 #define WPUB0 WPUBbits.WPUB0 // bit 0
2936 #define WPUB1 WPUBbits.WPUB1 // bit 1
2937 #define WPUB2 WPUBbits.WPUB2 // bit 2
2938 #define WPUB3 WPUBbits.WPUB3 // bit 3
2939 #define WPUB4 WPUBbits.WPUB4 // bit 4
2940 #define WPUB5 WPUBbits.WPUB5 // bit 5
2941 #define WPUB6 WPUBbits.WPUB6 // bit 6
2942 #define WPUB7 WPUBbits.WPUB7 // bit 7
2944 #define WPUE3 WPUEbits.WPUE3 // bit 3
2946 #endif // #ifndef NO_BIT_DEFINES
2948 #endif // #ifndef __PIC16F1513_H__