Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16lf1829.h
blobe808662441ede867c89a2ed470a89b475a1692c3
1 /*
2 * This declarations of the PIC16LF1829 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:20 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 __PIC16LF1829_H__
26 #define __PIC16LF1829_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF0_ADDR 0x0000
37 #define INDF1_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR0_ADDR 0x0004
41 #define FSR0L_ADDR 0x0004
42 #define FSR0H_ADDR 0x0005
43 #define FSR1_ADDR 0x0006
44 #define FSR1L_ADDR 0x0006
45 #define FSR1H_ADDR 0x0007
46 #define BSR_ADDR 0x0008
47 #define WREG_ADDR 0x0009
48 #define PCLATH_ADDR 0x000A
49 #define INTCON_ADDR 0x000B
50 #define PORTA_ADDR 0x000C
51 #define PORTB_ADDR 0x000D
52 #define PORTC_ADDR 0x000E
53 #define PIR1_ADDR 0x0011
54 #define PIR2_ADDR 0x0012
55 #define PIR3_ADDR 0x0013
56 #define PIR4_ADDR 0x0014
57 #define TMR0_ADDR 0x0015
58 #define TMR1_ADDR 0x0016
59 #define TMR1L_ADDR 0x0016
60 #define TMR1H_ADDR 0x0017
61 #define T1CON_ADDR 0x0018
62 #define T1GCON_ADDR 0x0019
63 #define TMR2_ADDR 0x001A
64 #define PR2_ADDR 0x001B
65 #define T2CON_ADDR 0x001C
66 #define CPSCON0_ADDR 0x001E
67 #define CPSCON1_ADDR 0x001F
68 #define TRISA_ADDR 0x008C
69 #define TRISB_ADDR 0x008D
70 #define TRISC_ADDR 0x008E
71 #define PIE1_ADDR 0x0091
72 #define PIE2_ADDR 0x0092
73 #define PIE3_ADDR 0x0093
74 #define PIE4_ADDR 0x0094
75 #define OPTION_REG_ADDR 0x0095
76 #define PCON_ADDR 0x0096
77 #define WDTCON_ADDR 0x0097
78 #define OSCTUNE_ADDR 0x0098
79 #define OSCCON_ADDR 0x0099
80 #define OSCSTAT_ADDR 0x009A
81 #define ADRES_ADDR 0x009B
82 #define ADRESL_ADDR 0x009B
83 #define ADRESH_ADDR 0x009C
84 #define ADCON0_ADDR 0x009D
85 #define ADCON1_ADDR 0x009E
86 #define LATA_ADDR 0x010C
87 #define LATB_ADDR 0x010D
88 #define LATC_ADDR 0x010E
89 #define CM1CON0_ADDR 0x0111
90 #define CM1CON1_ADDR 0x0112
91 #define CM2CON0_ADDR 0x0113
92 #define CM2CON1_ADDR 0x0114
93 #define CMOUT_ADDR 0x0115
94 #define BORCON_ADDR 0x0116
95 #define FVRCON_ADDR 0x0117
96 #define DACCON0_ADDR 0x0118
97 #define DACCON1_ADDR 0x0119
98 #define SRCON0_ADDR 0x011A
99 #define SRCON1_ADDR 0x011B
100 #define APFCON0_ADDR 0x011D
101 #define APFCON1_ADDR 0x011E
102 #define ANSELA_ADDR 0x018C
103 #define ANSELB_ADDR 0x018D
104 #define ANSELC_ADDR 0x018E
105 #define EEADR_ADDR 0x0191
106 #define EEADRL_ADDR 0x0191
107 #define EEADRH_ADDR 0x0192
108 #define EEDAT_ADDR 0x0193
109 #define EEDATL_ADDR 0x0193
110 #define EEDATH_ADDR 0x0194
111 #define EECON1_ADDR 0x0195
112 #define EECON2_ADDR 0x0196
113 #define RCREG_ADDR 0x0199
114 #define TXREG_ADDR 0x019A
115 #define SP1BRG_ADDR 0x019B
116 #define SP1BRGL_ADDR 0x019B
117 #define SPBRG_ADDR 0x019B
118 #define SPBRGL_ADDR 0x019B
119 #define SP1BRGH_ADDR 0x019C
120 #define SPBRGH_ADDR 0x019C
121 #define RCSTA_ADDR 0x019D
122 #define TXSTA_ADDR 0x019E
123 #define BAUDCON_ADDR 0x019F
124 #define WPUA_ADDR 0x020C
125 #define WPUB_ADDR 0x020D
126 #define WPUC_ADDR 0x020E
127 #define SSP1BUF_ADDR 0x0211
128 #define SSPBUF_ADDR 0x0211
129 #define SSP1ADD_ADDR 0x0212
130 #define SSPADD_ADDR 0x0212
131 #define SSP1MSK_ADDR 0x0213
132 #define SSPMSK_ADDR 0x0213
133 #define SSP1STAT_ADDR 0x0214
134 #define SSPSTAT_ADDR 0x0214
135 #define SSP1CON1_ADDR 0x0215
136 #define SSPCON_ADDR 0x0215
137 #define SSPCON1_ADDR 0x0215
138 #define SSP1CON2_ADDR 0x0216
139 #define SSPCON2_ADDR 0x0216
140 #define SSP1CON3_ADDR 0x0217
141 #define SSPCON3_ADDR 0x0217
142 #define SSP2BUF_ADDR 0x0219
143 #define SSP2ADD_ADDR 0x021A
144 #define SSP2MSK_ADDR 0x021B
145 #define SSP2STAT_ADDR 0x021C
146 #define SSP2CON1_ADDR 0x021D
147 #define SSP2CON2_ADDR 0x021E
148 #define SSP2CON3_ADDR 0x021F
149 #define CCPR1_ADDR 0x0291
150 #define CCPR1L_ADDR 0x0291
151 #define CCPR1H_ADDR 0x0292
152 #define CCP1CON_ADDR 0x0293
153 #define PWM1CON_ADDR 0x0294
154 #define CCP1AS_ADDR 0x0295
155 #define ECCP1AS_ADDR 0x0295
156 #define PSTR1CON_ADDR 0x0296
157 #define CCPR2_ADDR 0x0298
158 #define CCPR2L_ADDR 0x0298
159 #define CCPR2H_ADDR 0x0299
160 #define CCP2CON_ADDR 0x029A
161 #define PWM2CON_ADDR 0x029B
162 #define CCP2AS_ADDR 0x029C
163 #define PSTR2CON_ADDR 0x029D
164 #define CCPTMRS_ADDR 0x029E
165 #define CCPR3_ADDR 0x0311
166 #define CCPR3L_ADDR 0x0311
167 #define CCPR3H_ADDR 0x0312
168 #define CCP3CON_ADDR 0x0313
169 #define CCPR4_ADDR 0x0318
170 #define CCPR4L_ADDR 0x0318
171 #define CCPR4H_ADDR 0x0319
172 #define CCP4CON_ADDR 0x031A
173 #define INLVLA_ADDR 0x038C
174 #define INLVLB_ADDR 0x038D
175 #define INLVLC_ADDR 0x038E
176 #define IOCAP_ADDR 0x0391
177 #define IOCAN_ADDR 0x0392
178 #define IOCAF_ADDR 0x0393
179 #define IOCBP_ADDR 0x0394
180 #define IOCBN_ADDR 0x0395
181 #define IOCBF_ADDR 0x0396
182 #define CLKRCON_ADDR 0x039A
183 #define MDCON_ADDR 0x039C
184 #define MDSRC_ADDR 0x039D
185 #define MDCARL_ADDR 0x039E
186 #define MDCARH_ADDR 0x039F
187 #define TMR4_ADDR 0x0415
188 #define PR4_ADDR 0x0416
189 #define T4CON_ADDR 0x0417
190 #define TMR6_ADDR 0x041C
191 #define PR6_ADDR 0x041D
192 #define T6CON_ADDR 0x041E
193 #define STATUS_SHAD_ADDR 0x0FE4
194 #define WREG_SHAD_ADDR 0x0FE5
195 #define BSR_SHAD_ADDR 0x0FE6
196 #define PCLATH_SHAD_ADDR 0x0FE7
197 #define FSR0L_SHAD_ADDR 0x0FE8
198 #define FSR0H_SHAD_ADDR 0x0FE9
199 #define FSR1L_SHAD_ADDR 0x0FEA
200 #define FSR1H_SHAD_ADDR 0x0FEB
201 #define STKPTR_ADDR 0x0FED
202 #define TOSL_ADDR 0x0FEE
203 #define TOSH_ADDR 0x0FEF
205 #endif // #ifndef NO_ADDR_DEFINES
207 //==============================================================================
209 // Register Definitions
211 //==============================================================================
213 extern __at(0x0000) __sfr INDF0;
214 extern __at(0x0001) __sfr INDF1;
215 extern __at(0x0002) __sfr PCL;
217 //==============================================================================
218 // STATUS Bits
220 extern __at(0x0003) __sfr STATUS;
222 typedef struct
224 unsigned C : 1;
225 unsigned DC : 1;
226 unsigned Z : 1;
227 unsigned NOT_PD : 1;
228 unsigned NOT_TO : 1;
229 unsigned : 1;
230 unsigned : 1;
231 unsigned : 1;
232 } __STATUSbits_t;
234 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
236 #define _C 0x01
237 #define _DC 0x02
238 #define _Z 0x04
239 #define _NOT_PD 0x08
240 #define _NOT_TO 0x10
242 //==============================================================================
244 extern __at(0x0004) __sfr FSR0;
245 extern __at(0x0004) __sfr FSR0L;
246 extern __at(0x0005) __sfr FSR0H;
247 extern __at(0x0006) __sfr FSR1;
248 extern __at(0x0006) __sfr FSR1L;
249 extern __at(0x0007) __sfr FSR1H;
251 //==============================================================================
252 // BSR Bits
254 extern __at(0x0008) __sfr BSR;
256 typedef union
258 struct
260 unsigned BSR0 : 1;
261 unsigned BSR1 : 1;
262 unsigned BSR2 : 1;
263 unsigned BSR3 : 1;
264 unsigned BSR4 : 1;
265 unsigned : 1;
266 unsigned : 1;
267 unsigned : 1;
270 struct
272 unsigned BSR : 5;
273 unsigned : 3;
275 } __BSRbits_t;
277 extern __at(0x0008) volatile __BSRbits_t BSRbits;
279 #define _BSR0 0x01
280 #define _BSR1 0x02
281 #define _BSR2 0x04
282 #define _BSR3 0x08
283 #define _BSR4 0x10
285 //==============================================================================
287 extern __at(0x0009) __sfr WREG;
288 extern __at(0x000A) __sfr PCLATH;
290 //==============================================================================
291 // INTCON Bits
293 extern __at(0x000B) __sfr INTCON;
295 typedef union
297 struct
299 unsigned IOCIF : 1;
300 unsigned INTF : 1;
301 unsigned TMR0IF : 1;
302 unsigned IOCIE : 1;
303 unsigned INTE : 1;
304 unsigned TMR0IE : 1;
305 unsigned PEIE : 1;
306 unsigned GIE : 1;
309 struct
311 unsigned : 1;
312 unsigned : 1;
313 unsigned T0IF : 1;
314 unsigned : 1;
315 unsigned : 1;
316 unsigned T0IE : 1;
317 unsigned : 1;
318 unsigned : 1;
320 } __INTCONbits_t;
322 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
324 #define _IOCIF 0x01
325 #define _INTF 0x02
326 #define _TMR0IF 0x04
327 #define _T0IF 0x04
328 #define _IOCIE 0x08
329 #define _INTE 0x10
330 #define _TMR0IE 0x20
331 #define _T0IE 0x20
332 #define _PEIE 0x40
333 #define _GIE 0x80
335 //==============================================================================
338 //==============================================================================
339 // PORTA Bits
341 extern __at(0x000C) __sfr PORTA;
343 typedef union
345 struct
347 unsigned RA0 : 1;
348 unsigned RA1 : 1;
349 unsigned RA2 : 1;
350 unsigned RA3 : 1;
351 unsigned RA4 : 1;
352 unsigned RA5 : 1;
353 unsigned : 1;
354 unsigned : 1;
357 struct
359 unsigned RA : 6;
360 unsigned : 2;
362 } __PORTAbits_t;
364 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
366 #define _RA0 0x01
367 #define _RA1 0x02
368 #define _RA2 0x04
369 #define _RA3 0x08
370 #define _RA4 0x10
371 #define _RA5 0x20
373 //==============================================================================
376 //==============================================================================
377 // PORTB Bits
379 extern __at(0x000D) __sfr PORTB;
381 typedef struct
383 unsigned : 1;
384 unsigned : 1;
385 unsigned : 1;
386 unsigned : 1;
387 unsigned RB4 : 1;
388 unsigned RB5 : 1;
389 unsigned RB6 : 1;
390 unsigned RB7 : 1;
391 } __PORTBbits_t;
393 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
395 #define _RB4 0x10
396 #define _RB5 0x20
397 #define _RB6 0x40
398 #define _RB7 0x80
400 //==============================================================================
403 //==============================================================================
404 // PORTC Bits
406 extern __at(0x000E) __sfr PORTC;
408 typedef struct
410 unsigned RC0 : 1;
411 unsigned RC1 : 1;
412 unsigned RC2 : 1;
413 unsigned RC3 : 1;
414 unsigned RC4 : 1;
415 unsigned RC5 : 1;
416 unsigned RC6 : 1;
417 unsigned RC7 : 1;
418 } __PORTCbits_t;
420 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
422 #define _RC0 0x01
423 #define _RC1 0x02
424 #define _RC2 0x04
425 #define _RC3 0x08
426 #define _RC4 0x10
427 #define _RC5 0x20
428 #define _RC6 0x40
429 #define _RC7 0x80
431 //==============================================================================
434 //==============================================================================
435 // PIR1 Bits
437 extern __at(0x0011) __sfr PIR1;
439 typedef struct
441 unsigned TMR1IF : 1;
442 unsigned TMR2IF : 1;
443 unsigned CCP1IF : 1;
444 unsigned SSP1IF : 1;
445 unsigned TXIF : 1;
446 unsigned RCIF : 1;
447 unsigned ADIF : 1;
448 unsigned TMR1GIF : 1;
449 } __PIR1bits_t;
451 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
453 #define _TMR1IF 0x01
454 #define _TMR2IF 0x02
455 #define _CCP1IF 0x04
456 #define _SSP1IF 0x08
457 #define _TXIF 0x10
458 #define _RCIF 0x20
459 #define _ADIF 0x40
460 #define _TMR1GIF 0x80
462 //==============================================================================
465 //==============================================================================
466 // PIR2 Bits
468 extern __at(0x0012) __sfr PIR2;
470 typedef struct
472 unsigned CCP2IF : 1;
473 unsigned : 1;
474 unsigned : 1;
475 unsigned BCL1IF : 1;
476 unsigned EEIF : 1;
477 unsigned C1IF : 1;
478 unsigned C2IF : 1;
479 unsigned OSFIF : 1;
480 } __PIR2bits_t;
482 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
484 #define _CCP2IF 0x01
485 #define _BCL1IF 0x08
486 #define _EEIF 0x10
487 #define _C1IF 0x20
488 #define _C2IF 0x40
489 #define _OSFIF 0x80
491 //==============================================================================
494 //==============================================================================
495 // PIR3 Bits
497 extern __at(0x0013) __sfr PIR3;
499 typedef struct
501 unsigned : 1;
502 unsigned TMR4IF : 1;
503 unsigned : 1;
504 unsigned TMR6IF : 1;
505 unsigned CCP3IF : 1;
506 unsigned CCP4IF : 1;
507 unsigned : 1;
508 unsigned : 1;
509 } __PIR3bits_t;
511 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
513 #define _TMR4IF 0x02
514 #define _TMR6IF 0x08
515 #define _CCP3IF 0x10
516 #define _CCP4IF 0x20
518 //==============================================================================
521 //==============================================================================
522 // PIR4 Bits
524 extern __at(0x0014) __sfr PIR4;
526 typedef struct
528 unsigned SSP2IF : 1;
529 unsigned BCL2IF : 1;
530 unsigned : 1;
531 unsigned : 1;
532 unsigned : 1;
533 unsigned : 1;
534 unsigned : 1;
535 unsigned : 1;
536 } __PIR4bits_t;
538 extern __at(0x0014) volatile __PIR4bits_t PIR4bits;
540 #define _SSP2IF 0x01
541 #define _BCL2IF 0x02
543 //==============================================================================
545 extern __at(0x0015) __sfr TMR0;
546 extern __at(0x0016) __sfr TMR1;
547 extern __at(0x0016) __sfr TMR1L;
548 extern __at(0x0017) __sfr TMR1H;
550 //==============================================================================
551 // T1CON Bits
553 extern __at(0x0018) __sfr T1CON;
555 typedef union
557 struct
559 unsigned TMR1ON : 1;
560 unsigned : 1;
561 unsigned NOT_T1SYNC : 1;
562 unsigned T1OSCEN : 1;
563 unsigned T1CKPS0 : 1;
564 unsigned T1CKPS1 : 1;
565 unsigned TMR1CS0 : 1;
566 unsigned TMR1CS1 : 1;
569 struct
571 unsigned : 4;
572 unsigned T1CKPS : 2;
573 unsigned : 2;
576 struct
578 unsigned : 6;
579 unsigned TMR1CS : 2;
581 } __T1CONbits_t;
583 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
585 #define _TMR1ON 0x01
586 #define _NOT_T1SYNC 0x04
587 #define _T1OSCEN 0x08
588 #define _T1CKPS0 0x10
589 #define _T1CKPS1 0x20
590 #define _TMR1CS0 0x40
591 #define _TMR1CS1 0x80
593 //==============================================================================
596 //==============================================================================
597 // T1GCON Bits
599 extern __at(0x0019) __sfr T1GCON;
601 typedef union
603 struct
605 unsigned T1GSS0 : 1;
606 unsigned T1GSS1 : 1;
607 unsigned T1GVAL : 1;
608 unsigned T1GGO : 1;
609 unsigned T1GSPM : 1;
610 unsigned T1GTM : 1;
611 unsigned T1GPOL : 1;
612 unsigned TMR1GE : 1;
615 struct
617 unsigned T1GSS : 2;
618 unsigned : 6;
620 } __T1GCONbits_t;
622 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
624 #define _T1GSS0 0x01
625 #define _T1GSS1 0x02
626 #define _T1GVAL 0x04
627 #define _T1GGO 0x08
628 #define _T1GSPM 0x10
629 #define _T1GTM 0x20
630 #define _T1GPOL 0x40
631 #define _TMR1GE 0x80
633 //==============================================================================
635 extern __at(0x001A) __sfr TMR2;
636 extern __at(0x001B) __sfr PR2;
638 //==============================================================================
639 // T2CON Bits
641 extern __at(0x001C) __sfr T2CON;
643 typedef union
645 struct
647 unsigned T2CKPS0 : 1;
648 unsigned T2CKPS1 : 1;
649 unsigned TMR2ON : 1;
650 unsigned T2OUTPS0 : 1;
651 unsigned T2OUTPS1 : 1;
652 unsigned T2OUTPS2 : 1;
653 unsigned T2OUTPS3 : 1;
654 unsigned : 1;
657 struct
659 unsigned T2CKPS : 2;
660 unsigned : 6;
663 struct
665 unsigned : 3;
666 unsigned T2OUTPS : 4;
667 unsigned : 1;
669 } __T2CONbits_t;
671 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
673 #define _T2CKPS0 0x01
674 #define _T2CKPS1 0x02
675 #define _TMR2ON 0x04
676 #define _T2OUTPS0 0x08
677 #define _T2OUTPS1 0x10
678 #define _T2OUTPS2 0x20
679 #define _T2OUTPS3 0x40
681 //==============================================================================
684 //==============================================================================
685 // CPSCON0 Bits
687 extern __at(0x001E) __sfr CPSCON0;
689 typedef union
691 struct
693 unsigned T0XCS : 1;
694 unsigned CPSOUT : 1;
695 unsigned CPSRNG0 : 1;
696 unsigned CPSRNG1 : 1;
697 unsigned : 1;
698 unsigned : 1;
699 unsigned CPSRM : 1;
700 unsigned CPSON : 1;
703 struct
705 unsigned : 2;
706 unsigned CPSRNG : 2;
707 unsigned : 4;
709 } __CPSCON0bits_t;
711 extern __at(0x001E) volatile __CPSCON0bits_t CPSCON0bits;
713 #define _T0XCS 0x01
714 #define _CPSOUT 0x02
715 #define _CPSRNG0 0x04
716 #define _CPSRNG1 0x08
717 #define _CPSRM 0x40
718 #define _CPSON 0x80
720 //==============================================================================
723 //==============================================================================
724 // CPSCON1 Bits
726 extern __at(0x001F) __sfr CPSCON1;
728 typedef union
730 struct
732 unsigned CPSCH0 : 1;
733 unsigned CPSCH1 : 1;
734 unsigned CPSCH2 : 1;
735 unsigned CPSCH3 : 1;
736 unsigned : 1;
737 unsigned : 1;
738 unsigned : 1;
739 unsigned : 1;
742 struct
744 unsigned CPSCH : 4;
745 unsigned : 4;
747 } __CPSCON1bits_t;
749 extern __at(0x001F) volatile __CPSCON1bits_t CPSCON1bits;
751 #define _CPSCH0 0x01
752 #define _CPSCH1 0x02
753 #define _CPSCH2 0x04
754 #define _CPSCH3 0x08
756 //==============================================================================
759 //==============================================================================
760 // TRISA Bits
762 extern __at(0x008C) __sfr TRISA;
764 typedef union
766 struct
768 unsigned TRISA0 : 1;
769 unsigned TRISA1 : 1;
770 unsigned TRISA2 : 1;
771 unsigned TRISA3 : 1;
772 unsigned TRISA4 : 1;
773 unsigned TRISA5 : 1;
774 unsigned : 1;
775 unsigned : 1;
778 struct
780 unsigned TRISA : 6;
781 unsigned : 2;
783 } __TRISAbits_t;
785 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
787 #define _TRISA0 0x01
788 #define _TRISA1 0x02
789 #define _TRISA2 0x04
790 #define _TRISA3 0x08
791 #define _TRISA4 0x10
792 #define _TRISA5 0x20
794 //==============================================================================
797 //==============================================================================
798 // TRISB Bits
800 extern __at(0x008D) __sfr TRISB;
802 typedef struct
804 unsigned : 1;
805 unsigned : 1;
806 unsigned : 1;
807 unsigned : 1;
808 unsigned TRISB4 : 1;
809 unsigned TRISB5 : 1;
810 unsigned TRISB6 : 1;
811 unsigned TRISB7 : 1;
812 } __TRISBbits_t;
814 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
816 #define _TRISB4 0x10
817 #define _TRISB5 0x20
818 #define _TRISB6 0x40
819 #define _TRISB7 0x80
821 //==============================================================================
824 //==============================================================================
825 // TRISC Bits
827 extern __at(0x008E) __sfr TRISC;
829 typedef struct
831 unsigned TRISC0 : 1;
832 unsigned TRISC1 : 1;
833 unsigned TRISC2 : 1;
834 unsigned TRISC3 : 1;
835 unsigned TRISC4 : 1;
836 unsigned TRISC5 : 1;
837 unsigned TRISC6 : 1;
838 unsigned TRISC7 : 1;
839 } __TRISCbits_t;
841 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
843 #define _TRISC0 0x01
844 #define _TRISC1 0x02
845 #define _TRISC2 0x04
846 #define _TRISC3 0x08
847 #define _TRISC4 0x10
848 #define _TRISC5 0x20
849 #define _TRISC6 0x40
850 #define _TRISC7 0x80
852 //==============================================================================
855 //==============================================================================
856 // PIE1 Bits
858 extern __at(0x0091) __sfr PIE1;
860 typedef struct
862 unsigned TMR1IE : 1;
863 unsigned TMR2IE : 1;
864 unsigned CCP1IE : 1;
865 unsigned SSP1IE : 1;
866 unsigned TXIE : 1;
867 unsigned RCIE : 1;
868 unsigned ADIE : 1;
869 unsigned TMR1GIE : 1;
870 } __PIE1bits_t;
872 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
874 #define _TMR1IE 0x01
875 #define _TMR2IE 0x02
876 #define _CCP1IE 0x04
877 #define _SSP1IE 0x08
878 #define _TXIE 0x10
879 #define _RCIE 0x20
880 #define _ADIE 0x40
881 #define _TMR1GIE 0x80
883 //==============================================================================
886 //==============================================================================
887 // PIE2 Bits
889 extern __at(0x0092) __sfr PIE2;
891 typedef struct
893 unsigned CCP2IE : 1;
894 unsigned : 1;
895 unsigned : 1;
896 unsigned BCL1IE : 1;
897 unsigned EEIE : 1;
898 unsigned C1IE : 1;
899 unsigned C2IE : 1;
900 unsigned OSFIE : 1;
901 } __PIE2bits_t;
903 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
905 #define _CCP2IE 0x01
906 #define _BCL1IE 0x08
907 #define _EEIE 0x10
908 #define _C1IE 0x20
909 #define _C2IE 0x40
910 #define _OSFIE 0x80
912 //==============================================================================
915 //==============================================================================
916 // PIE3 Bits
918 extern __at(0x0093) __sfr PIE3;
920 typedef struct
922 unsigned : 1;
923 unsigned TMR4IE : 1;
924 unsigned : 1;
925 unsigned TMR6IE : 1;
926 unsigned CCP3IE : 1;
927 unsigned CCP4IE : 1;
928 unsigned : 1;
929 unsigned : 1;
930 } __PIE3bits_t;
932 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
934 #define _TMR4IE 0x02
935 #define _TMR6IE 0x08
936 #define _CCP3IE 0x10
937 #define _CCP4IE 0x20
939 //==============================================================================
942 //==============================================================================
943 // PIE4 Bits
945 extern __at(0x0094) __sfr PIE4;
947 typedef struct
949 unsigned SSP2IE : 1;
950 unsigned BCL2IE : 1;
951 unsigned : 1;
952 unsigned : 1;
953 unsigned : 1;
954 unsigned : 1;
955 unsigned : 1;
956 unsigned : 1;
957 } __PIE4bits_t;
959 extern __at(0x0094) volatile __PIE4bits_t PIE4bits;
961 #define _SSP2IE 0x01
962 #define _BCL2IE 0x02
964 //==============================================================================
967 //==============================================================================
968 // OPTION_REG Bits
970 extern __at(0x0095) __sfr OPTION_REG;
972 typedef union
974 struct
976 unsigned PS0 : 1;
977 unsigned PS1 : 1;
978 unsigned PS2 : 1;
979 unsigned PSA : 1;
980 unsigned TMR0SE : 1;
981 unsigned TMR0CS : 1;
982 unsigned INTEDG : 1;
983 unsigned NOT_WPUEN : 1;
986 struct
988 unsigned : 1;
989 unsigned : 1;
990 unsigned : 1;
991 unsigned : 1;
992 unsigned T0SE : 1;
993 unsigned T0CS : 1;
994 unsigned : 1;
995 unsigned : 1;
998 struct
1000 unsigned PS : 3;
1001 unsigned : 5;
1003 } __OPTION_REGbits_t;
1005 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
1007 #define _PS0 0x01
1008 #define _PS1 0x02
1009 #define _PS2 0x04
1010 #define _PSA 0x08
1011 #define _TMR0SE 0x10
1012 #define _T0SE 0x10
1013 #define _TMR0CS 0x20
1014 #define _T0CS 0x20
1015 #define _INTEDG 0x40
1016 #define _NOT_WPUEN 0x80
1018 //==============================================================================
1021 //==============================================================================
1022 // PCON Bits
1024 extern __at(0x0096) __sfr PCON;
1026 typedef struct
1028 unsigned NOT_BOR : 1;
1029 unsigned NOT_POR : 1;
1030 unsigned NOT_RI : 1;
1031 unsigned NOT_RMCLR : 1;
1032 unsigned : 1;
1033 unsigned : 1;
1034 unsigned STKUNF : 1;
1035 unsigned STKOVF : 1;
1036 } __PCONbits_t;
1038 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1040 #define _NOT_BOR 0x01
1041 #define _NOT_POR 0x02
1042 #define _NOT_RI 0x04
1043 #define _NOT_RMCLR 0x08
1044 #define _STKUNF 0x40
1045 #define _STKOVF 0x80
1047 //==============================================================================
1050 //==============================================================================
1051 // WDTCON Bits
1053 extern __at(0x0097) __sfr WDTCON;
1055 typedef union
1057 struct
1059 unsigned SWDTEN : 1;
1060 unsigned WDTPS0 : 1;
1061 unsigned WDTPS1 : 1;
1062 unsigned WDTPS2 : 1;
1063 unsigned WDTPS3 : 1;
1064 unsigned WDTPS4 : 1;
1065 unsigned : 1;
1066 unsigned : 1;
1069 struct
1071 unsigned : 1;
1072 unsigned WDTPS : 5;
1073 unsigned : 2;
1075 } __WDTCONbits_t;
1077 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1079 #define _SWDTEN 0x01
1080 #define _WDTPS0 0x02
1081 #define _WDTPS1 0x04
1082 #define _WDTPS2 0x08
1083 #define _WDTPS3 0x10
1084 #define _WDTPS4 0x20
1086 //==============================================================================
1089 //==============================================================================
1090 // OSCTUNE Bits
1092 extern __at(0x0098) __sfr OSCTUNE;
1094 typedef union
1096 struct
1098 unsigned TUN0 : 1;
1099 unsigned TUN1 : 1;
1100 unsigned TUN2 : 1;
1101 unsigned TUN3 : 1;
1102 unsigned TUN4 : 1;
1103 unsigned TUN5 : 1;
1104 unsigned : 1;
1105 unsigned : 1;
1108 struct
1110 unsigned TUN : 6;
1111 unsigned : 2;
1113 } __OSCTUNEbits_t;
1115 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1117 #define _TUN0 0x01
1118 #define _TUN1 0x02
1119 #define _TUN2 0x04
1120 #define _TUN3 0x08
1121 #define _TUN4 0x10
1122 #define _TUN5 0x20
1124 //==============================================================================
1127 //==============================================================================
1128 // OSCCON Bits
1130 extern __at(0x0099) __sfr OSCCON;
1132 typedef union
1134 struct
1136 unsigned SCS0 : 1;
1137 unsigned SCS1 : 1;
1138 unsigned : 1;
1139 unsigned IRCF0 : 1;
1140 unsigned IRCF1 : 1;
1141 unsigned IRCF2 : 1;
1142 unsigned IRCF3 : 1;
1143 unsigned SPLLEN : 1;
1146 struct
1148 unsigned SCS : 2;
1149 unsigned : 6;
1152 struct
1154 unsigned : 3;
1155 unsigned IRCF : 4;
1156 unsigned : 1;
1158 } __OSCCONbits_t;
1160 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1162 #define _SCS0 0x01
1163 #define _SCS1 0x02
1164 #define _IRCF0 0x08
1165 #define _IRCF1 0x10
1166 #define _IRCF2 0x20
1167 #define _IRCF3 0x40
1168 #define _SPLLEN 0x80
1170 //==============================================================================
1173 //==============================================================================
1174 // OSCSTAT Bits
1176 extern __at(0x009A) __sfr OSCSTAT;
1178 typedef struct
1180 unsigned HFIOFS : 1;
1181 unsigned LFIOFR : 1;
1182 unsigned MFIOFR : 1;
1183 unsigned HFIOFL : 1;
1184 unsigned HFIOFR : 1;
1185 unsigned OSTS : 1;
1186 unsigned PLLR : 1;
1187 unsigned T1OSCR : 1;
1188 } __OSCSTATbits_t;
1190 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1192 #define _HFIOFS 0x01
1193 #define _LFIOFR 0x02
1194 #define _MFIOFR 0x04
1195 #define _HFIOFL 0x08
1196 #define _HFIOFR 0x10
1197 #define _OSTS 0x20
1198 #define _PLLR 0x40
1199 #define _T1OSCR 0x80
1201 //==============================================================================
1203 extern __at(0x009B) __sfr ADRES;
1204 extern __at(0x009B) __sfr ADRESL;
1205 extern __at(0x009C) __sfr ADRESH;
1207 //==============================================================================
1208 // ADCON0 Bits
1210 extern __at(0x009D) __sfr ADCON0;
1212 typedef union
1214 struct
1216 unsigned ADON : 1;
1217 unsigned GO_NOT_DONE : 1;
1218 unsigned CHS0 : 1;
1219 unsigned CHS1 : 1;
1220 unsigned CHS2 : 1;
1221 unsigned CHS3 : 1;
1222 unsigned CHS4 : 1;
1223 unsigned : 1;
1226 struct
1228 unsigned : 1;
1229 unsigned ADGO : 1;
1230 unsigned : 1;
1231 unsigned : 1;
1232 unsigned : 1;
1233 unsigned : 1;
1234 unsigned : 1;
1235 unsigned : 1;
1238 struct
1240 unsigned : 1;
1241 unsigned GO : 1;
1242 unsigned : 1;
1243 unsigned : 1;
1244 unsigned : 1;
1245 unsigned : 1;
1246 unsigned : 1;
1247 unsigned : 1;
1250 struct
1252 unsigned : 2;
1253 unsigned CHS : 5;
1254 unsigned : 1;
1256 } __ADCON0bits_t;
1258 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1260 #define _ADON 0x01
1261 #define _GO_NOT_DONE 0x02
1262 #define _ADGO 0x02
1263 #define _GO 0x02
1264 #define _CHS0 0x04
1265 #define _CHS1 0x08
1266 #define _CHS2 0x10
1267 #define _CHS3 0x20
1268 #define _CHS4 0x40
1270 //==============================================================================
1273 //==============================================================================
1274 // ADCON1 Bits
1276 extern __at(0x009E) __sfr ADCON1;
1278 typedef union
1280 struct
1282 unsigned ADPREF0 : 1;
1283 unsigned ADPREF1 : 1;
1284 unsigned ADNREF : 1;
1285 unsigned : 1;
1286 unsigned ADCS0 : 1;
1287 unsigned ADCS1 : 1;
1288 unsigned ADCS2 : 1;
1289 unsigned ADFM : 1;
1292 struct
1294 unsigned ADPREF : 2;
1295 unsigned : 6;
1298 struct
1300 unsigned : 4;
1301 unsigned ADCS : 3;
1302 unsigned : 1;
1304 } __ADCON1bits_t;
1306 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1308 #define _ADPREF0 0x01
1309 #define _ADPREF1 0x02
1310 #define _ADNREF 0x04
1311 #define _ADCS0 0x10
1312 #define _ADCS1 0x20
1313 #define _ADCS2 0x40
1314 #define _ADFM 0x80
1316 //==============================================================================
1319 //==============================================================================
1320 // LATA Bits
1322 extern __at(0x010C) __sfr LATA;
1324 typedef struct
1326 unsigned LATA0 : 1;
1327 unsigned LATA1 : 1;
1328 unsigned LATA2 : 1;
1329 unsigned : 1;
1330 unsigned LATA4 : 1;
1331 unsigned LATA5 : 1;
1332 unsigned : 1;
1333 unsigned : 1;
1334 } __LATAbits_t;
1336 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1338 #define _LATA0 0x01
1339 #define _LATA1 0x02
1340 #define _LATA2 0x04
1341 #define _LATA4 0x10
1342 #define _LATA5 0x20
1344 //==============================================================================
1347 //==============================================================================
1348 // LATB Bits
1350 extern __at(0x010D) __sfr LATB;
1352 typedef struct
1354 unsigned : 1;
1355 unsigned : 1;
1356 unsigned : 1;
1357 unsigned : 1;
1358 unsigned LATB4 : 1;
1359 unsigned LATB5 : 1;
1360 unsigned LATB6 : 1;
1361 unsigned LATB7 : 1;
1362 } __LATBbits_t;
1364 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1366 #define _LATB4 0x10
1367 #define _LATB5 0x20
1368 #define _LATB6 0x40
1369 #define _LATB7 0x80
1371 //==============================================================================
1374 //==============================================================================
1375 // LATC Bits
1377 extern __at(0x010E) __sfr LATC;
1379 typedef struct
1381 unsigned LATC0 : 1;
1382 unsigned LATC1 : 1;
1383 unsigned LATC2 : 1;
1384 unsigned LATC3 : 1;
1385 unsigned LATC4 : 1;
1386 unsigned LATC5 : 1;
1387 unsigned LATC6 : 1;
1388 unsigned LATC7 : 1;
1389 } __LATCbits_t;
1391 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1393 #define _LATC0 0x01
1394 #define _LATC1 0x02
1395 #define _LATC2 0x04
1396 #define _LATC3 0x08
1397 #define _LATC4 0x10
1398 #define _LATC5 0x20
1399 #define _LATC6 0x40
1400 #define _LATC7 0x80
1402 //==============================================================================
1405 //==============================================================================
1406 // CM1CON0 Bits
1408 extern __at(0x0111) __sfr CM1CON0;
1410 typedef struct
1412 unsigned C1SYNC : 1;
1413 unsigned C1HYS : 1;
1414 unsigned C1SP : 1;
1415 unsigned : 1;
1416 unsigned C1POL : 1;
1417 unsigned C1OE : 1;
1418 unsigned C1OUT : 1;
1419 unsigned C1ON : 1;
1420 } __CM1CON0bits_t;
1422 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1424 #define _C1SYNC 0x01
1425 #define _C1HYS 0x02
1426 #define _C1SP 0x04
1427 #define _C1POL 0x10
1428 #define _C1OE 0x20
1429 #define _C1OUT 0x40
1430 #define _C1ON 0x80
1432 //==============================================================================
1435 //==============================================================================
1436 // CM1CON1 Bits
1438 extern __at(0x0112) __sfr CM1CON1;
1440 typedef union
1442 struct
1444 unsigned C1NCH0 : 1;
1445 unsigned C1NCH1 : 1;
1446 unsigned : 1;
1447 unsigned : 1;
1448 unsigned C1PCH0 : 1;
1449 unsigned C1PCH1 : 1;
1450 unsigned C1INTN : 1;
1451 unsigned C1INTP : 1;
1454 struct
1456 unsigned C1NCH : 2;
1457 unsigned : 6;
1460 struct
1462 unsigned : 4;
1463 unsigned C1PCH : 2;
1464 unsigned : 2;
1466 } __CM1CON1bits_t;
1468 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1470 #define _C1NCH0 0x01
1471 #define _C1NCH1 0x02
1472 #define _C1PCH0 0x10
1473 #define _C1PCH1 0x20
1474 #define _C1INTN 0x40
1475 #define _C1INTP 0x80
1477 //==============================================================================
1480 //==============================================================================
1481 // CM2CON0 Bits
1483 extern __at(0x0113) __sfr CM2CON0;
1485 typedef struct
1487 unsigned C2SYNC : 1;
1488 unsigned C2HYS : 1;
1489 unsigned C2SP : 1;
1490 unsigned : 1;
1491 unsigned C2POL : 1;
1492 unsigned C2OE : 1;
1493 unsigned C2OUT : 1;
1494 unsigned C2ON : 1;
1495 } __CM2CON0bits_t;
1497 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
1499 #define _C2SYNC 0x01
1500 #define _C2HYS 0x02
1501 #define _C2SP 0x04
1502 #define _C2POL 0x10
1503 #define _C2OE 0x20
1504 #define _C2OUT 0x40
1505 #define _C2ON 0x80
1507 //==============================================================================
1510 //==============================================================================
1511 // CM2CON1 Bits
1513 extern __at(0x0114) __sfr CM2CON1;
1515 typedef union
1517 struct
1519 unsigned C2NCH0 : 1;
1520 unsigned C2NCH1 : 1;
1521 unsigned : 1;
1522 unsigned : 1;
1523 unsigned C2PCH0 : 1;
1524 unsigned C2PCH1 : 1;
1525 unsigned C2INTN : 1;
1526 unsigned C2INTP : 1;
1529 struct
1531 unsigned C2NCH : 2;
1532 unsigned : 6;
1535 struct
1537 unsigned : 4;
1538 unsigned C2PCH : 2;
1539 unsigned : 2;
1541 } __CM2CON1bits_t;
1543 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
1545 #define _C2NCH0 0x01
1546 #define _C2NCH1 0x02
1547 #define _C2PCH0 0x10
1548 #define _C2PCH1 0x20
1549 #define _C2INTN 0x40
1550 #define _C2INTP 0x80
1552 //==============================================================================
1555 //==============================================================================
1556 // CMOUT Bits
1558 extern __at(0x0115) __sfr CMOUT;
1560 typedef struct
1562 unsigned MC1OUT : 1;
1563 unsigned MC2OUT : 1;
1564 unsigned : 1;
1565 unsigned : 1;
1566 unsigned : 1;
1567 unsigned : 1;
1568 unsigned : 1;
1569 unsigned : 1;
1570 } __CMOUTbits_t;
1572 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1574 #define _MC1OUT 0x01
1575 #define _MC2OUT 0x02
1577 //==============================================================================
1580 //==============================================================================
1581 // BORCON Bits
1583 extern __at(0x0116) __sfr BORCON;
1585 typedef struct
1587 unsigned BORRDY : 1;
1588 unsigned : 1;
1589 unsigned : 1;
1590 unsigned : 1;
1591 unsigned : 1;
1592 unsigned : 1;
1593 unsigned : 1;
1594 unsigned SBOREN : 1;
1595 } __BORCONbits_t;
1597 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1599 #define _BORRDY 0x01
1600 #define _SBOREN 0x80
1602 //==============================================================================
1605 //==============================================================================
1606 // FVRCON Bits
1608 extern __at(0x0117) __sfr FVRCON;
1610 typedef union
1612 struct
1614 unsigned ADFVR0 : 1;
1615 unsigned ADFVR1 : 1;
1616 unsigned CDAFVR0 : 1;
1617 unsigned CDAFVR1 : 1;
1618 unsigned TSRNG : 1;
1619 unsigned TSEN : 1;
1620 unsigned FVRRDY : 1;
1621 unsigned FVREN : 1;
1624 struct
1626 unsigned ADFVR : 2;
1627 unsigned : 6;
1630 struct
1632 unsigned : 2;
1633 unsigned CDAFVR : 2;
1634 unsigned : 4;
1636 } __FVRCONbits_t;
1638 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1640 #define _ADFVR0 0x01
1641 #define _ADFVR1 0x02
1642 #define _CDAFVR0 0x04
1643 #define _CDAFVR1 0x08
1644 #define _TSRNG 0x10
1645 #define _TSEN 0x20
1646 #define _FVRRDY 0x40
1647 #define _FVREN 0x80
1649 //==============================================================================
1652 //==============================================================================
1653 // DACCON0 Bits
1655 extern __at(0x0118) __sfr DACCON0;
1657 typedef union
1659 struct
1661 unsigned DACNSS : 1;
1662 unsigned : 1;
1663 unsigned DACPSS0 : 1;
1664 unsigned DACPSS1 : 1;
1665 unsigned : 1;
1666 unsigned DACOE : 1;
1667 unsigned DACLPS : 1;
1668 unsigned DACEN : 1;
1671 struct
1673 unsigned : 2;
1674 unsigned DACPSS : 2;
1675 unsigned : 4;
1677 } __DACCON0bits_t;
1679 extern __at(0x0118) volatile __DACCON0bits_t DACCON0bits;
1681 #define _DACNSS 0x01
1682 #define _DACPSS0 0x04
1683 #define _DACPSS1 0x08
1684 #define _DACOE 0x20
1685 #define _DACLPS 0x40
1686 #define _DACEN 0x80
1688 //==============================================================================
1691 //==============================================================================
1692 // DACCON1 Bits
1694 extern __at(0x0119) __sfr DACCON1;
1696 typedef union
1698 struct
1700 unsigned DACR0 : 1;
1701 unsigned DACR1 : 1;
1702 unsigned DACR2 : 1;
1703 unsigned DACR3 : 1;
1704 unsigned DACR4 : 1;
1705 unsigned : 1;
1706 unsigned : 1;
1707 unsigned : 1;
1710 struct
1712 unsigned DACR : 5;
1713 unsigned : 3;
1715 } __DACCON1bits_t;
1717 extern __at(0x0119) volatile __DACCON1bits_t DACCON1bits;
1719 #define _DACR0 0x01
1720 #define _DACR1 0x02
1721 #define _DACR2 0x04
1722 #define _DACR3 0x08
1723 #define _DACR4 0x10
1725 //==============================================================================
1728 //==============================================================================
1729 // SRCON0 Bits
1731 extern __at(0x011A) __sfr SRCON0;
1733 typedef union
1735 struct
1737 unsigned SRPR : 1;
1738 unsigned SRPS : 1;
1739 unsigned SRNQEN : 1;
1740 unsigned SRQEN : 1;
1741 unsigned SRCLK0 : 1;
1742 unsigned SRCLK1 : 1;
1743 unsigned SRCLK2 : 1;
1744 unsigned SRLEN : 1;
1747 struct
1749 unsigned : 4;
1750 unsigned SRCLK : 3;
1751 unsigned : 1;
1753 } __SRCON0bits_t;
1755 extern __at(0x011A) volatile __SRCON0bits_t SRCON0bits;
1757 #define _SRPR 0x01
1758 #define _SRPS 0x02
1759 #define _SRNQEN 0x04
1760 #define _SRQEN 0x08
1761 #define _SRCLK0 0x10
1762 #define _SRCLK1 0x20
1763 #define _SRCLK2 0x40
1764 #define _SRLEN 0x80
1766 //==============================================================================
1769 //==============================================================================
1770 // SRCON1 Bits
1772 extern __at(0x011B) __sfr SRCON1;
1774 typedef struct
1776 unsigned SRRC1E : 1;
1777 unsigned SRRC2E : 1;
1778 unsigned SRRCKE : 1;
1779 unsigned SRRPE : 1;
1780 unsigned SRSC1E : 1;
1781 unsigned SRSC2E : 1;
1782 unsigned SRSCKE : 1;
1783 unsigned SRSPE : 1;
1784 } __SRCON1bits_t;
1786 extern __at(0x011B) volatile __SRCON1bits_t SRCON1bits;
1788 #define _SRRC1E 0x01
1789 #define _SRRC2E 0x02
1790 #define _SRRCKE 0x04
1791 #define _SRRPE 0x08
1792 #define _SRSC1E 0x10
1793 #define _SRSC2E 0x20
1794 #define _SRSCKE 0x40
1795 #define _SRSPE 0x80
1797 //==============================================================================
1800 //==============================================================================
1801 // APFCON0 Bits
1803 extern __at(0x011D) __sfr APFCON0;
1805 typedef struct
1807 unsigned : 1;
1808 unsigned : 1;
1809 unsigned TXCKSEL : 1;
1810 unsigned T1GSEL : 1;
1811 unsigned : 1;
1812 unsigned : 1;
1813 unsigned : 1;
1814 unsigned RXDTSEL : 1;
1815 } __APFCON0bits_t;
1817 extern __at(0x011D) volatile __APFCON0bits_t APFCON0bits;
1819 #define _TXCKSEL 0x04
1820 #define _T1GSEL 0x08
1821 #define _RXDTSEL 0x80
1823 //==============================================================================
1826 //==============================================================================
1827 // APFCON1 Bits
1829 extern __at(0x011E) __sfr APFCON1;
1831 typedef struct
1833 unsigned CCP2SEL : 1;
1834 unsigned P2BSEL : 1;
1835 unsigned P1CSEL : 1;
1836 unsigned P1DSEL : 1;
1837 unsigned SS2SEL : 1;
1838 unsigned SDO2SEL : 1;
1839 unsigned : 1;
1840 unsigned : 1;
1841 } __APFCON1bits_t;
1843 extern __at(0x011E) volatile __APFCON1bits_t APFCON1bits;
1845 #define _CCP2SEL 0x01
1846 #define _P2BSEL 0x02
1847 #define _P1CSEL 0x04
1848 #define _P1DSEL 0x08
1849 #define _SS2SEL 0x10
1850 #define _SDO2SEL 0x20
1852 //==============================================================================
1855 //==============================================================================
1856 // ANSELA Bits
1858 extern __at(0x018C) __sfr ANSELA;
1860 typedef struct
1862 unsigned ANSA0 : 1;
1863 unsigned ANSA1 : 1;
1864 unsigned ANSA2 : 1;
1865 unsigned : 1;
1866 unsigned ANSA4 : 1;
1867 unsigned : 1;
1868 unsigned : 1;
1869 unsigned : 1;
1870 } __ANSELAbits_t;
1872 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1874 #define _ANSA0 0x01
1875 #define _ANSA1 0x02
1876 #define _ANSA2 0x04
1877 #define _ANSA4 0x10
1879 //==============================================================================
1882 //==============================================================================
1883 // ANSELB Bits
1885 extern __at(0x018D) __sfr ANSELB;
1887 typedef struct
1889 unsigned : 1;
1890 unsigned : 1;
1891 unsigned : 1;
1892 unsigned : 1;
1893 unsigned ANSB4 : 1;
1894 unsigned ANSB5 : 1;
1895 unsigned : 1;
1896 unsigned : 1;
1897 } __ANSELBbits_t;
1899 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1901 #define _ANSB4 0x10
1902 #define _ANSB5 0x20
1904 //==============================================================================
1907 //==============================================================================
1908 // ANSELC Bits
1910 extern __at(0x018E) __sfr ANSELC;
1912 typedef struct
1914 unsigned ANSC0 : 1;
1915 unsigned ANSC1 : 1;
1916 unsigned ANSC2 : 1;
1917 unsigned ANSC3 : 1;
1918 unsigned : 1;
1919 unsigned : 1;
1920 unsigned ANSC6 : 1;
1921 unsigned ANSC7 : 1;
1922 } __ANSELCbits_t;
1924 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1926 #define _ANSC0 0x01
1927 #define _ANSC1 0x02
1928 #define _ANSC2 0x04
1929 #define _ANSC3 0x08
1930 #define _ANSC6 0x40
1931 #define _ANSC7 0x80
1933 //==============================================================================
1935 extern __at(0x0191) __sfr EEADR;
1936 extern __at(0x0191) __sfr EEADRL;
1937 extern __at(0x0192) __sfr EEADRH;
1938 extern __at(0x0193) __sfr EEDAT;
1939 extern __at(0x0193) __sfr EEDATL;
1940 extern __at(0x0194) __sfr EEDATH;
1942 //==============================================================================
1943 // EECON1 Bits
1945 extern __at(0x0195) __sfr EECON1;
1947 typedef struct
1949 unsigned RD : 1;
1950 unsigned WR : 1;
1951 unsigned WREN : 1;
1952 unsigned WRERR : 1;
1953 unsigned FREE : 1;
1954 unsigned LWLO : 1;
1955 unsigned CFGS : 1;
1956 unsigned EEPGD : 1;
1957 } __EECON1bits_t;
1959 extern __at(0x0195) volatile __EECON1bits_t EECON1bits;
1961 #define _RD 0x01
1962 #define _WR 0x02
1963 #define _WREN 0x04
1964 #define _WRERR 0x08
1965 #define _FREE 0x10
1966 #define _LWLO 0x20
1967 #define _CFGS 0x40
1968 #define _EEPGD 0x80
1970 //==============================================================================
1972 extern __at(0x0196) __sfr EECON2;
1973 extern __at(0x0199) __sfr RCREG;
1974 extern __at(0x019A) __sfr TXREG;
1975 extern __at(0x019B) __sfr SP1BRG;
1976 extern __at(0x019B) __sfr SP1BRGL;
1977 extern __at(0x019B) __sfr SPBRG;
1978 extern __at(0x019B) __sfr SPBRGL;
1979 extern __at(0x019C) __sfr SP1BRGH;
1980 extern __at(0x019C) __sfr SPBRGH;
1982 //==============================================================================
1983 // RCSTA Bits
1985 extern __at(0x019D) __sfr RCSTA;
1987 typedef struct
1989 unsigned RX9D : 1;
1990 unsigned OERR : 1;
1991 unsigned FERR : 1;
1992 unsigned ADDEN : 1;
1993 unsigned CREN : 1;
1994 unsigned SREN : 1;
1995 unsigned RX9 : 1;
1996 unsigned SPEN : 1;
1997 } __RCSTAbits_t;
1999 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
2001 #define _RX9D 0x01
2002 #define _OERR 0x02
2003 #define _FERR 0x04
2004 #define _ADDEN 0x08
2005 #define _CREN 0x10
2006 #define _SREN 0x20
2007 #define _RX9 0x40
2008 #define _SPEN 0x80
2010 //==============================================================================
2013 //==============================================================================
2014 // TXSTA Bits
2016 extern __at(0x019E) __sfr TXSTA;
2018 typedef struct
2020 unsigned TX9D : 1;
2021 unsigned TRMT : 1;
2022 unsigned BRGH : 1;
2023 unsigned SENDB : 1;
2024 unsigned SYNC : 1;
2025 unsigned TXEN : 1;
2026 unsigned TX9 : 1;
2027 unsigned CSRC : 1;
2028 } __TXSTAbits_t;
2030 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2032 #define _TX9D 0x01
2033 #define _TRMT 0x02
2034 #define _BRGH 0x04
2035 #define _SENDB 0x08
2036 #define _SYNC 0x10
2037 #define _TXEN 0x20
2038 #define _TX9 0x40
2039 #define _CSRC 0x80
2041 //==============================================================================
2044 //==============================================================================
2045 // BAUDCON Bits
2047 extern __at(0x019F) __sfr BAUDCON;
2049 typedef struct
2051 unsigned ABDEN : 1;
2052 unsigned WUE : 1;
2053 unsigned : 1;
2054 unsigned BRG16 : 1;
2055 unsigned SCKP : 1;
2056 unsigned : 1;
2057 unsigned RCIDL : 1;
2058 unsigned ABDOVF : 1;
2059 } __BAUDCONbits_t;
2061 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2063 #define _ABDEN 0x01
2064 #define _WUE 0x02
2065 #define _BRG16 0x08
2066 #define _SCKP 0x10
2067 #define _RCIDL 0x40
2068 #define _ABDOVF 0x80
2070 //==============================================================================
2073 //==============================================================================
2074 // WPUA Bits
2076 extern __at(0x020C) __sfr WPUA;
2078 typedef union
2080 struct
2082 unsigned WPUA0 : 1;
2083 unsigned WPUA1 : 1;
2084 unsigned WPUA2 : 1;
2085 unsigned WPUA3 : 1;
2086 unsigned WPUA4 : 1;
2087 unsigned WPUA5 : 1;
2088 unsigned : 1;
2089 unsigned : 1;
2092 struct
2094 unsigned WPUA : 6;
2095 unsigned : 2;
2097 } __WPUAbits_t;
2099 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
2101 #define _WPUA0 0x01
2102 #define _WPUA1 0x02
2103 #define _WPUA2 0x04
2104 #define _WPUA3 0x08
2105 #define _WPUA4 0x10
2106 #define _WPUA5 0x20
2108 //==============================================================================
2111 //==============================================================================
2112 // WPUB Bits
2114 extern __at(0x020D) __sfr WPUB;
2116 typedef struct
2118 unsigned : 1;
2119 unsigned : 1;
2120 unsigned : 1;
2121 unsigned : 1;
2122 unsigned WPUB4 : 1;
2123 unsigned WPUB5 : 1;
2124 unsigned WPUB6 : 1;
2125 unsigned WPUB7 : 1;
2126 } __WPUBbits_t;
2128 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2130 #define _WPUB4 0x10
2131 #define _WPUB5 0x20
2132 #define _WPUB6 0x40
2133 #define _WPUB7 0x80
2135 //==============================================================================
2138 //==============================================================================
2139 // WPUC Bits
2141 extern __at(0x020E) __sfr WPUC;
2143 typedef struct
2145 unsigned WPUC0 : 1;
2146 unsigned WPUC1 : 1;
2147 unsigned WPUC2 : 1;
2148 unsigned WPUC3 : 1;
2149 unsigned WPUC4 : 1;
2150 unsigned WPUC5 : 1;
2151 unsigned WPUC6 : 1;
2152 unsigned WPUC7 : 1;
2153 } __WPUCbits_t;
2155 extern __at(0x020E) volatile __WPUCbits_t WPUCbits;
2157 #define _WPUC0 0x01
2158 #define _WPUC1 0x02
2159 #define _WPUC2 0x04
2160 #define _WPUC3 0x08
2161 #define _WPUC4 0x10
2162 #define _WPUC5 0x20
2163 #define _WPUC6 0x40
2164 #define _WPUC7 0x80
2166 //==============================================================================
2168 extern __at(0x0211) __sfr SSP1BUF;
2169 extern __at(0x0211) __sfr SSPBUF;
2170 extern __at(0x0212) __sfr SSP1ADD;
2171 extern __at(0x0212) __sfr SSPADD;
2172 extern __at(0x0213) __sfr SSP1MSK;
2173 extern __at(0x0213) __sfr SSPMSK;
2175 //==============================================================================
2176 // SSP1STAT Bits
2178 extern __at(0x0214) __sfr SSP1STAT;
2180 typedef struct
2182 unsigned BF : 1;
2183 unsigned UA : 1;
2184 unsigned R_NOT_W : 1;
2185 unsigned S : 1;
2186 unsigned P : 1;
2187 unsigned D_NOT_A : 1;
2188 unsigned CKE : 1;
2189 unsigned SMP : 1;
2190 } __SSP1STATbits_t;
2192 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2194 #define _BF 0x01
2195 #define _UA 0x02
2196 #define _R_NOT_W 0x04
2197 #define _S 0x08
2198 #define _P 0x10
2199 #define _D_NOT_A 0x20
2200 #define _CKE 0x40
2201 #define _SMP 0x80
2203 //==============================================================================
2206 //==============================================================================
2207 // SSPSTAT Bits
2209 extern __at(0x0214) __sfr SSPSTAT;
2211 typedef struct
2213 unsigned BF : 1;
2214 unsigned UA : 1;
2215 unsigned R_NOT_W : 1;
2216 unsigned S : 1;
2217 unsigned P : 1;
2218 unsigned D_NOT_A : 1;
2219 unsigned CKE : 1;
2220 unsigned SMP : 1;
2221 } __SSPSTATbits_t;
2223 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2225 #define _SSPSTAT_BF 0x01
2226 #define _SSPSTAT_UA 0x02
2227 #define _SSPSTAT_R_NOT_W 0x04
2228 #define _SSPSTAT_S 0x08
2229 #define _SSPSTAT_P 0x10
2230 #define _SSPSTAT_D_NOT_A 0x20
2231 #define _SSPSTAT_CKE 0x40
2232 #define _SSPSTAT_SMP 0x80
2234 //==============================================================================
2237 //==============================================================================
2238 // SSP1CON1 Bits
2240 extern __at(0x0215) __sfr SSP1CON1;
2242 typedef union
2244 struct
2246 unsigned SSPM0 : 1;
2247 unsigned SSPM1 : 1;
2248 unsigned SSPM2 : 1;
2249 unsigned SSPM3 : 1;
2250 unsigned CKP : 1;
2251 unsigned SSPEN : 1;
2252 unsigned SSPOV : 1;
2253 unsigned WCOL : 1;
2256 struct
2258 unsigned SSPM : 4;
2259 unsigned : 4;
2261 } __SSP1CON1bits_t;
2263 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2265 #define _SSPM0 0x01
2266 #define _SSPM1 0x02
2267 #define _SSPM2 0x04
2268 #define _SSPM3 0x08
2269 #define _CKP 0x10
2270 #define _SSPEN 0x20
2271 #define _SSPOV 0x40
2272 #define _WCOL 0x80
2274 //==============================================================================
2277 //==============================================================================
2278 // SSPCON Bits
2280 extern __at(0x0215) __sfr SSPCON;
2282 typedef union
2284 struct
2286 unsigned SSPM0 : 1;
2287 unsigned SSPM1 : 1;
2288 unsigned SSPM2 : 1;
2289 unsigned SSPM3 : 1;
2290 unsigned CKP : 1;
2291 unsigned SSPEN : 1;
2292 unsigned SSPOV : 1;
2293 unsigned WCOL : 1;
2296 struct
2298 unsigned SSPM : 4;
2299 unsigned : 4;
2301 } __SSPCONbits_t;
2303 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2305 #define _SSPCON_SSPM0 0x01
2306 #define _SSPCON_SSPM1 0x02
2307 #define _SSPCON_SSPM2 0x04
2308 #define _SSPCON_SSPM3 0x08
2309 #define _SSPCON_CKP 0x10
2310 #define _SSPCON_SSPEN 0x20
2311 #define _SSPCON_SSPOV 0x40
2312 #define _SSPCON_WCOL 0x80
2314 //==============================================================================
2317 //==============================================================================
2318 // SSPCON1 Bits
2320 extern __at(0x0215) __sfr SSPCON1;
2322 typedef union
2324 struct
2326 unsigned SSPM0 : 1;
2327 unsigned SSPM1 : 1;
2328 unsigned SSPM2 : 1;
2329 unsigned SSPM3 : 1;
2330 unsigned CKP : 1;
2331 unsigned SSPEN : 1;
2332 unsigned SSPOV : 1;
2333 unsigned WCOL : 1;
2336 struct
2338 unsigned SSPM : 4;
2339 unsigned : 4;
2341 } __SSPCON1bits_t;
2343 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2345 #define _SSPCON1_SSPM0 0x01
2346 #define _SSPCON1_SSPM1 0x02
2347 #define _SSPCON1_SSPM2 0x04
2348 #define _SSPCON1_SSPM3 0x08
2349 #define _SSPCON1_CKP 0x10
2350 #define _SSPCON1_SSPEN 0x20
2351 #define _SSPCON1_SSPOV 0x40
2352 #define _SSPCON1_WCOL 0x80
2354 //==============================================================================
2357 //==============================================================================
2358 // SSP1CON2 Bits
2360 extern __at(0x0216) __sfr SSP1CON2;
2362 typedef struct
2364 unsigned SEN : 1;
2365 unsigned RSEN : 1;
2366 unsigned PEN : 1;
2367 unsigned RCEN : 1;
2368 unsigned ACKEN : 1;
2369 unsigned ACKDT : 1;
2370 unsigned ACKSTAT : 1;
2371 unsigned GCEN : 1;
2372 } __SSP1CON2bits_t;
2374 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2376 #define _SEN 0x01
2377 #define _RSEN 0x02
2378 #define _PEN 0x04
2379 #define _RCEN 0x08
2380 #define _ACKEN 0x10
2381 #define _ACKDT 0x20
2382 #define _ACKSTAT 0x40
2383 #define _GCEN 0x80
2385 //==============================================================================
2388 //==============================================================================
2389 // SSPCON2 Bits
2391 extern __at(0x0216) __sfr SSPCON2;
2393 typedef struct
2395 unsigned SEN : 1;
2396 unsigned RSEN : 1;
2397 unsigned PEN : 1;
2398 unsigned RCEN : 1;
2399 unsigned ACKEN : 1;
2400 unsigned ACKDT : 1;
2401 unsigned ACKSTAT : 1;
2402 unsigned GCEN : 1;
2403 } __SSPCON2bits_t;
2405 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2407 #define _SSPCON2_SEN 0x01
2408 #define _SSPCON2_RSEN 0x02
2409 #define _SSPCON2_PEN 0x04
2410 #define _SSPCON2_RCEN 0x08
2411 #define _SSPCON2_ACKEN 0x10
2412 #define _SSPCON2_ACKDT 0x20
2413 #define _SSPCON2_ACKSTAT 0x40
2414 #define _SSPCON2_GCEN 0x80
2416 //==============================================================================
2419 //==============================================================================
2420 // SSP1CON3 Bits
2422 extern __at(0x0217) __sfr SSP1CON3;
2424 typedef struct
2426 unsigned DHEN : 1;
2427 unsigned AHEN : 1;
2428 unsigned SBCDE : 1;
2429 unsigned SDAHT : 1;
2430 unsigned BOEN : 1;
2431 unsigned SCIE : 1;
2432 unsigned PCIE : 1;
2433 unsigned ACKTIM : 1;
2434 } __SSP1CON3bits_t;
2436 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2438 #define _DHEN 0x01
2439 #define _AHEN 0x02
2440 #define _SBCDE 0x04
2441 #define _SDAHT 0x08
2442 #define _BOEN 0x10
2443 #define _SCIE 0x20
2444 #define _PCIE 0x40
2445 #define _ACKTIM 0x80
2447 //==============================================================================
2450 //==============================================================================
2451 // SSPCON3 Bits
2453 extern __at(0x0217) __sfr SSPCON3;
2455 typedef struct
2457 unsigned DHEN : 1;
2458 unsigned AHEN : 1;
2459 unsigned SBCDE : 1;
2460 unsigned SDAHT : 1;
2461 unsigned BOEN : 1;
2462 unsigned SCIE : 1;
2463 unsigned PCIE : 1;
2464 unsigned ACKTIM : 1;
2465 } __SSPCON3bits_t;
2467 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2469 #define _SSPCON3_DHEN 0x01
2470 #define _SSPCON3_AHEN 0x02
2471 #define _SSPCON3_SBCDE 0x04
2472 #define _SSPCON3_SDAHT 0x08
2473 #define _SSPCON3_BOEN 0x10
2474 #define _SSPCON3_SCIE 0x20
2475 #define _SSPCON3_PCIE 0x40
2476 #define _SSPCON3_ACKTIM 0x80
2478 //==============================================================================
2480 extern __at(0x0219) __sfr SSP2BUF;
2481 extern __at(0x021A) __sfr SSP2ADD;
2482 extern __at(0x021B) __sfr SSP2MSK;
2484 //==============================================================================
2485 // SSP2STAT Bits
2487 extern __at(0x021C) __sfr SSP2STAT;
2489 typedef struct
2491 unsigned BF : 1;
2492 unsigned UA : 1;
2493 unsigned R_NOT_W : 1;
2494 unsigned S : 1;
2495 unsigned P : 1;
2496 unsigned D_NOT_A : 1;
2497 unsigned CKE : 1;
2498 unsigned SMP : 1;
2499 } __SSP2STATbits_t;
2501 extern __at(0x021C) volatile __SSP2STATbits_t SSP2STATbits;
2503 #define _SSP2STAT_BF 0x01
2504 #define _SSP2STAT_UA 0x02
2505 #define _SSP2STAT_R_NOT_W 0x04
2506 #define _SSP2STAT_S 0x08
2507 #define _SSP2STAT_P 0x10
2508 #define _SSP2STAT_D_NOT_A 0x20
2509 #define _SSP2STAT_CKE 0x40
2510 #define _SSP2STAT_SMP 0x80
2512 //==============================================================================
2515 //==============================================================================
2516 // SSP2CON1 Bits
2518 extern __at(0x021D) __sfr SSP2CON1;
2520 typedef union
2522 struct
2524 unsigned SSPM0 : 1;
2525 unsigned SSPM1 : 1;
2526 unsigned SSPM2 : 1;
2527 unsigned SSPM3 : 1;
2528 unsigned CKP : 1;
2529 unsigned SSPEN : 1;
2530 unsigned SSPOV : 1;
2531 unsigned WCOL : 1;
2534 struct
2536 unsigned SSPM : 4;
2537 unsigned : 4;
2539 } __SSP2CON1bits_t;
2541 extern __at(0x021D) volatile __SSP2CON1bits_t SSP2CON1bits;
2543 #define _SSP2CON1_SSPM0 0x01
2544 #define _SSP2CON1_SSPM1 0x02
2545 #define _SSP2CON1_SSPM2 0x04
2546 #define _SSP2CON1_SSPM3 0x08
2547 #define _SSP2CON1_CKP 0x10
2548 #define _SSP2CON1_SSPEN 0x20
2549 #define _SSP2CON1_SSPOV 0x40
2550 #define _SSP2CON1_WCOL 0x80
2552 //==============================================================================
2555 //==============================================================================
2556 // SSP2CON2 Bits
2558 extern __at(0x021E) __sfr SSP2CON2;
2560 typedef struct
2562 unsigned SEN : 1;
2563 unsigned RSEN : 1;
2564 unsigned PEN : 1;
2565 unsigned RCEN : 1;
2566 unsigned ACKEN : 1;
2567 unsigned ACKDT : 1;
2568 unsigned ACKSTAT : 1;
2569 unsigned GCEN : 1;
2570 } __SSP2CON2bits_t;
2572 extern __at(0x021E) volatile __SSP2CON2bits_t SSP2CON2bits;
2574 #define _SSP2CON2_SEN 0x01
2575 #define _SSP2CON2_RSEN 0x02
2576 #define _SSP2CON2_PEN 0x04
2577 #define _SSP2CON2_RCEN 0x08
2578 #define _SSP2CON2_ACKEN 0x10
2579 #define _SSP2CON2_ACKDT 0x20
2580 #define _SSP2CON2_ACKSTAT 0x40
2581 #define _SSP2CON2_GCEN 0x80
2583 //==============================================================================
2586 //==============================================================================
2587 // SSP2CON3 Bits
2589 extern __at(0x021F) __sfr SSP2CON3;
2591 typedef struct
2593 unsigned DHEN : 1;
2594 unsigned AHEN : 1;
2595 unsigned SBCDE : 1;
2596 unsigned SDAHT : 1;
2597 unsigned BOEN : 1;
2598 unsigned SCIE : 1;
2599 unsigned PCIE : 1;
2600 unsigned ACKTIM : 1;
2601 } __SSP2CON3bits_t;
2603 extern __at(0x021F) volatile __SSP2CON3bits_t SSP2CON3bits;
2605 #define _SSP2CON3_DHEN 0x01
2606 #define _SSP2CON3_AHEN 0x02
2607 #define _SSP2CON3_SBCDE 0x04
2608 #define _SSP2CON3_SDAHT 0x08
2609 #define _SSP2CON3_BOEN 0x10
2610 #define _SSP2CON3_SCIE 0x20
2611 #define _SSP2CON3_PCIE 0x40
2612 #define _SSP2CON3_ACKTIM 0x80
2614 //==============================================================================
2616 extern __at(0x0291) __sfr CCPR1;
2617 extern __at(0x0291) __sfr CCPR1L;
2618 extern __at(0x0292) __sfr CCPR1H;
2620 //==============================================================================
2621 // CCP1CON Bits
2623 extern __at(0x0293) __sfr CCP1CON;
2625 typedef union
2627 struct
2629 unsigned CCP1M0 : 1;
2630 unsigned CCP1M1 : 1;
2631 unsigned CCP1M2 : 1;
2632 unsigned CCP1M3 : 1;
2633 unsigned DC1B0 : 1;
2634 unsigned DC1B1 : 1;
2635 unsigned P1M0 : 1;
2636 unsigned P1M1 : 1;
2639 struct
2641 unsigned CCP1M : 4;
2642 unsigned : 4;
2645 struct
2647 unsigned : 4;
2648 unsigned DC1B : 2;
2649 unsigned : 2;
2652 struct
2654 unsigned : 6;
2655 unsigned P1M : 2;
2657 } __CCP1CONbits_t;
2659 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2661 #define _CCP1M0 0x01
2662 #define _CCP1M1 0x02
2663 #define _CCP1M2 0x04
2664 #define _CCP1M3 0x08
2665 #define _DC1B0 0x10
2666 #define _DC1B1 0x20
2667 #define _P1M0 0x40
2668 #define _P1M1 0x80
2670 //==============================================================================
2673 //==============================================================================
2674 // PWM1CON Bits
2676 extern __at(0x0294) __sfr PWM1CON;
2678 typedef union
2680 struct
2682 unsigned P1DC0 : 1;
2683 unsigned P1DC1 : 1;
2684 unsigned P1DC2 : 1;
2685 unsigned P1DC3 : 1;
2686 unsigned P1DC4 : 1;
2687 unsigned P1DC5 : 1;
2688 unsigned P1DC6 : 1;
2689 unsigned P1RSEN : 1;
2692 struct
2694 unsigned P1DC : 7;
2695 unsigned : 1;
2697 } __PWM1CONbits_t;
2699 extern __at(0x0294) volatile __PWM1CONbits_t PWM1CONbits;
2701 #define _P1DC0 0x01
2702 #define _P1DC1 0x02
2703 #define _P1DC2 0x04
2704 #define _P1DC3 0x08
2705 #define _P1DC4 0x10
2706 #define _P1DC5 0x20
2707 #define _P1DC6 0x40
2708 #define _P1RSEN 0x80
2710 //==============================================================================
2713 //==============================================================================
2714 // CCP1AS Bits
2716 extern __at(0x0295) __sfr CCP1AS;
2718 typedef union
2720 struct
2722 unsigned PSS1BD0 : 1;
2723 unsigned PSS1BD1 : 1;
2724 unsigned PSS1AC0 : 1;
2725 unsigned PSS1AC1 : 1;
2726 unsigned CCP1AS0 : 1;
2727 unsigned CCP1AS1 : 1;
2728 unsigned CCP1AS2 : 1;
2729 unsigned CCP1ASE : 1;
2732 struct
2734 unsigned PSS1BD : 2;
2735 unsigned : 6;
2738 struct
2740 unsigned : 2;
2741 unsigned PSS1AC : 2;
2742 unsigned : 4;
2745 struct
2747 unsigned : 4;
2748 unsigned CCP1AS : 3;
2749 unsigned : 1;
2751 } __CCP1ASbits_t;
2753 extern __at(0x0295) volatile __CCP1ASbits_t CCP1ASbits;
2755 #define _PSS1BD0 0x01
2756 #define _PSS1BD1 0x02
2757 #define _PSS1AC0 0x04
2758 #define _PSS1AC1 0x08
2759 #define _CCP1AS0 0x10
2760 #define _CCP1AS1 0x20
2761 #define _CCP1AS2 0x40
2762 #define _CCP1ASE 0x80
2764 //==============================================================================
2767 //==============================================================================
2768 // ECCP1AS Bits
2770 extern __at(0x0295) __sfr ECCP1AS;
2772 typedef union
2774 struct
2776 unsigned PSS1BD0 : 1;
2777 unsigned PSS1BD1 : 1;
2778 unsigned PSS1AC0 : 1;
2779 unsigned PSS1AC1 : 1;
2780 unsigned CCP1AS0 : 1;
2781 unsigned CCP1AS1 : 1;
2782 unsigned CCP1AS2 : 1;
2783 unsigned CCP1ASE : 1;
2786 struct
2788 unsigned PSS1BD : 2;
2789 unsigned : 6;
2792 struct
2794 unsigned : 2;
2795 unsigned PSS1AC : 2;
2796 unsigned : 4;
2799 struct
2801 unsigned : 4;
2802 unsigned CCP1AS : 3;
2803 unsigned : 1;
2805 } __ECCP1ASbits_t;
2807 extern __at(0x0295) volatile __ECCP1ASbits_t ECCP1ASbits;
2809 #define _ECCP1AS_PSS1BD0 0x01
2810 #define _ECCP1AS_PSS1BD1 0x02
2811 #define _ECCP1AS_PSS1AC0 0x04
2812 #define _ECCP1AS_PSS1AC1 0x08
2813 #define _ECCP1AS_CCP1AS0 0x10
2814 #define _ECCP1AS_CCP1AS1 0x20
2815 #define _ECCP1AS_CCP1AS2 0x40
2816 #define _ECCP1AS_CCP1ASE 0x80
2818 //==============================================================================
2821 //==============================================================================
2822 // PSTR1CON Bits
2824 extern __at(0x0296) __sfr PSTR1CON;
2826 typedef struct
2828 unsigned STR1A : 1;
2829 unsigned STR1B : 1;
2830 unsigned STR1C : 1;
2831 unsigned STR1D : 1;
2832 unsigned STR1SYNC : 1;
2833 unsigned : 1;
2834 unsigned : 1;
2835 unsigned : 1;
2836 } __PSTR1CONbits_t;
2838 extern __at(0x0296) volatile __PSTR1CONbits_t PSTR1CONbits;
2840 #define _STR1A 0x01
2841 #define _STR1B 0x02
2842 #define _STR1C 0x04
2843 #define _STR1D 0x08
2844 #define _STR1SYNC 0x10
2846 //==============================================================================
2848 extern __at(0x0298) __sfr CCPR2;
2849 extern __at(0x0298) __sfr CCPR2L;
2850 extern __at(0x0299) __sfr CCPR2H;
2852 //==============================================================================
2853 // CCP2CON Bits
2855 extern __at(0x029A) __sfr CCP2CON;
2857 typedef union
2859 struct
2861 unsigned CCP2M0 : 1;
2862 unsigned CCP2M1 : 1;
2863 unsigned CCP2M2 : 1;
2864 unsigned CCP2M3 : 1;
2865 unsigned DC2B0 : 1;
2866 unsigned DC2B1 : 1;
2867 unsigned P2M0 : 1;
2868 unsigned P2M1 : 1;
2871 struct
2873 unsigned CCP2M : 4;
2874 unsigned : 4;
2877 struct
2879 unsigned : 4;
2880 unsigned DC2B : 2;
2881 unsigned : 2;
2884 struct
2886 unsigned : 6;
2887 unsigned P2M : 2;
2889 } __CCP2CONbits_t;
2891 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2893 #define _CCP2M0 0x01
2894 #define _CCP2M1 0x02
2895 #define _CCP2M2 0x04
2896 #define _CCP2M3 0x08
2897 #define _DC2B0 0x10
2898 #define _DC2B1 0x20
2899 #define _P2M0 0x40
2900 #define _P2M1 0x80
2902 //==============================================================================
2905 //==============================================================================
2906 // PWM2CON Bits
2908 extern __at(0x029B) __sfr PWM2CON;
2910 typedef union
2912 struct
2914 unsigned P2DC0 : 1;
2915 unsigned P2DC1 : 1;
2916 unsigned P2DC2 : 1;
2917 unsigned P2DC3 : 1;
2918 unsigned P2DC4 : 1;
2919 unsigned P2DC5 : 1;
2920 unsigned P2DC6 : 1;
2921 unsigned P2RSEN : 1;
2924 struct
2926 unsigned P2DC : 7;
2927 unsigned : 1;
2929 } __PWM2CONbits_t;
2931 extern __at(0x029B) volatile __PWM2CONbits_t PWM2CONbits;
2933 #define _P2DC0 0x01
2934 #define _P2DC1 0x02
2935 #define _P2DC2 0x04
2936 #define _P2DC3 0x08
2937 #define _P2DC4 0x10
2938 #define _P2DC5 0x20
2939 #define _P2DC6 0x40
2940 #define _P2RSEN 0x80
2942 //==============================================================================
2945 //==============================================================================
2946 // CCP2AS Bits
2948 extern __at(0x029C) __sfr CCP2AS;
2950 typedef union
2952 struct
2954 unsigned PSS2BD0 : 1;
2955 unsigned PSS2BD1 : 1;
2956 unsigned PSS2AC0 : 1;
2957 unsigned PSS2AC1 : 1;
2958 unsigned CCP2AS0 : 1;
2959 unsigned CCP2AS1 : 1;
2960 unsigned CCP2AS2 : 1;
2961 unsigned CCP2ASE : 1;
2964 struct
2966 unsigned PSS2BD : 2;
2967 unsigned : 6;
2970 struct
2972 unsigned : 2;
2973 unsigned PSS2AC : 2;
2974 unsigned : 4;
2977 struct
2979 unsigned : 4;
2980 unsigned CCP2AS : 3;
2981 unsigned : 1;
2983 } __CCP2ASbits_t;
2985 extern __at(0x029C) volatile __CCP2ASbits_t CCP2ASbits;
2987 #define _PSS2BD0 0x01
2988 #define _PSS2BD1 0x02
2989 #define _PSS2AC0 0x04
2990 #define _PSS2AC1 0x08
2991 #define _CCP2AS0 0x10
2992 #define _CCP2AS1 0x20
2993 #define _CCP2AS2 0x40
2994 #define _CCP2ASE 0x80
2996 //==============================================================================
2999 //==============================================================================
3000 // PSTR2CON Bits
3002 extern __at(0x029D) __sfr PSTR2CON;
3004 typedef struct
3006 unsigned STR2A : 1;
3007 unsigned STR2B : 1;
3008 unsigned STR2C : 1;
3009 unsigned STR2D : 1;
3010 unsigned STR2SYNC : 1;
3011 unsigned : 1;
3012 unsigned : 1;
3013 unsigned : 1;
3014 } __PSTR2CONbits_t;
3016 extern __at(0x029D) volatile __PSTR2CONbits_t PSTR2CONbits;
3018 #define _STR2A 0x01
3019 #define _STR2B 0x02
3020 #define _STR2C 0x04
3021 #define _STR2D 0x08
3022 #define _STR2SYNC 0x10
3024 //==============================================================================
3027 //==============================================================================
3028 // CCPTMRS Bits
3030 extern __at(0x029E) __sfr CCPTMRS;
3032 typedef union
3034 struct
3036 unsigned C1TSEL0 : 1;
3037 unsigned C1TSEL1 : 1;
3038 unsigned C2TSEL0 : 1;
3039 unsigned C2TSEL1 : 1;
3040 unsigned C3TSEL0 : 1;
3041 unsigned C3TSEL1 : 1;
3042 unsigned C4TSEL0 : 1;
3043 unsigned C4TSEL1 : 1;
3046 struct
3048 unsigned C1TSEL : 2;
3049 unsigned : 6;
3052 struct
3054 unsigned : 2;
3055 unsigned C2TSEL : 2;
3056 unsigned : 4;
3059 struct
3061 unsigned : 4;
3062 unsigned C3TSEL : 2;
3063 unsigned : 2;
3066 struct
3068 unsigned : 6;
3069 unsigned C4TSEL : 2;
3071 } __CCPTMRSbits_t;
3073 extern __at(0x029E) volatile __CCPTMRSbits_t CCPTMRSbits;
3075 #define _C1TSEL0 0x01
3076 #define _C1TSEL1 0x02
3077 #define _C2TSEL0 0x04
3078 #define _C2TSEL1 0x08
3079 #define _C3TSEL0 0x10
3080 #define _C3TSEL1 0x20
3081 #define _C4TSEL0 0x40
3082 #define _C4TSEL1 0x80
3084 //==============================================================================
3086 extern __at(0x0311) __sfr CCPR3;
3087 extern __at(0x0311) __sfr CCPR3L;
3088 extern __at(0x0312) __sfr CCPR3H;
3090 //==============================================================================
3091 // CCP3CON Bits
3093 extern __at(0x0313) __sfr CCP3CON;
3095 typedef union
3097 struct
3099 unsigned CCP3M0 : 1;
3100 unsigned CCP3M1 : 1;
3101 unsigned CCP3M2 : 1;
3102 unsigned CCP3M3 : 1;
3103 unsigned DC3B0 : 1;
3104 unsigned DC3B1 : 1;
3105 unsigned : 1;
3106 unsigned : 1;
3109 struct
3111 unsigned CCP3M : 4;
3112 unsigned : 4;
3115 struct
3117 unsigned : 4;
3118 unsigned DC3B : 2;
3119 unsigned : 2;
3121 } __CCP3CONbits_t;
3123 extern __at(0x0313) volatile __CCP3CONbits_t CCP3CONbits;
3125 #define _CCP3M0 0x01
3126 #define _CCP3M1 0x02
3127 #define _CCP3M2 0x04
3128 #define _CCP3M3 0x08
3129 #define _DC3B0 0x10
3130 #define _DC3B1 0x20
3132 //==============================================================================
3134 extern __at(0x0318) __sfr CCPR4;
3135 extern __at(0x0318) __sfr CCPR4L;
3136 extern __at(0x0319) __sfr CCPR4H;
3138 //==============================================================================
3139 // CCP4CON Bits
3141 extern __at(0x031A) __sfr CCP4CON;
3143 typedef union
3145 struct
3147 unsigned CCP4M0 : 1;
3148 unsigned CCP4M1 : 1;
3149 unsigned CCP4M2 : 1;
3150 unsigned CCP4M3 : 1;
3151 unsigned DC4B0 : 1;
3152 unsigned DC4B1 : 1;
3153 unsigned : 1;
3154 unsigned : 1;
3157 struct
3159 unsigned CCP4M : 4;
3160 unsigned : 4;
3163 struct
3165 unsigned : 4;
3166 unsigned DC4B : 2;
3167 unsigned : 2;
3169 } __CCP4CONbits_t;
3171 extern __at(0x031A) volatile __CCP4CONbits_t CCP4CONbits;
3173 #define _CCP4M0 0x01
3174 #define _CCP4M1 0x02
3175 #define _CCP4M2 0x04
3176 #define _CCP4M3 0x08
3177 #define _DC4B0 0x10
3178 #define _DC4B1 0x20
3180 //==============================================================================
3183 //==============================================================================
3184 // INLVLA Bits
3186 extern __at(0x038C) __sfr INLVLA;
3188 typedef union
3190 struct
3192 unsigned INLVLA0 : 1;
3193 unsigned INLVLA1 : 1;
3194 unsigned INLVLA2 : 1;
3195 unsigned INLVLA3 : 1;
3196 unsigned INLVLA4 : 1;
3197 unsigned INLVLA5 : 1;
3198 unsigned : 1;
3199 unsigned : 1;
3202 struct
3204 unsigned INLVLA : 6;
3205 unsigned : 2;
3207 } __INLVLAbits_t;
3209 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
3211 #define _INLVLA0 0x01
3212 #define _INLVLA1 0x02
3213 #define _INLVLA2 0x04
3214 #define _INLVLA3 0x08
3215 #define _INLVLA4 0x10
3216 #define _INLVLA5 0x20
3218 //==============================================================================
3221 //==============================================================================
3222 // INLVLB Bits
3224 extern __at(0x038D) __sfr INLVLB;
3226 typedef struct
3228 unsigned : 1;
3229 unsigned : 1;
3230 unsigned : 1;
3231 unsigned : 1;
3232 unsigned INLVLB4 : 1;
3233 unsigned INLVLB5 : 1;
3234 unsigned INLVLB6 : 1;
3235 unsigned INLVLB7 : 1;
3236 } __INLVLBbits_t;
3238 extern __at(0x038D) volatile __INLVLBbits_t INLVLBbits;
3240 #define _INLVLB4 0x10
3241 #define _INLVLB5 0x20
3242 #define _INLVLB6 0x40
3243 #define _INLVLB7 0x80
3245 //==============================================================================
3248 //==============================================================================
3249 // INLVLC Bits
3251 extern __at(0x038E) __sfr INLVLC;
3253 typedef struct
3255 unsigned INLVLC0 : 1;
3256 unsigned INLVLC1 : 1;
3257 unsigned INLVLC2 : 1;
3258 unsigned INLVLC3 : 1;
3259 unsigned INLVLC4 : 1;
3260 unsigned INLVLC5 : 1;
3261 unsigned INLVLC6 : 1;
3262 unsigned INLVLC7 : 1;
3263 } __INLVLCbits_t;
3265 extern __at(0x038E) volatile __INLVLCbits_t INLVLCbits;
3267 #define _INLVLC0 0x01
3268 #define _INLVLC1 0x02
3269 #define _INLVLC2 0x04
3270 #define _INLVLC3 0x08
3271 #define _INLVLC4 0x10
3272 #define _INLVLC5 0x20
3273 #define _INLVLC6 0x40
3274 #define _INLVLC7 0x80
3276 //==============================================================================
3279 //==============================================================================
3280 // IOCAP Bits
3282 extern __at(0x0391) __sfr IOCAP;
3284 typedef union
3286 struct
3288 unsigned IOCAP0 : 1;
3289 unsigned IOCAP1 : 1;
3290 unsigned IOCAP2 : 1;
3291 unsigned IOCAP3 : 1;
3292 unsigned IOCAP4 : 1;
3293 unsigned IOCAP5 : 1;
3294 unsigned : 1;
3295 unsigned : 1;
3298 struct
3300 unsigned IOCAP : 6;
3301 unsigned : 2;
3303 } __IOCAPbits_t;
3305 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
3307 #define _IOCAP0 0x01
3308 #define _IOCAP1 0x02
3309 #define _IOCAP2 0x04
3310 #define _IOCAP3 0x08
3311 #define _IOCAP4 0x10
3312 #define _IOCAP5 0x20
3314 //==============================================================================
3317 //==============================================================================
3318 // IOCAN Bits
3320 extern __at(0x0392) __sfr IOCAN;
3322 typedef union
3324 struct
3326 unsigned IOCAN0 : 1;
3327 unsigned IOCAN1 : 1;
3328 unsigned IOCAN2 : 1;
3329 unsigned IOCAN3 : 1;
3330 unsigned IOCAN4 : 1;
3331 unsigned IOCAN5 : 1;
3332 unsigned : 1;
3333 unsigned : 1;
3336 struct
3338 unsigned IOCAN : 6;
3339 unsigned : 2;
3341 } __IOCANbits_t;
3343 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
3345 #define _IOCAN0 0x01
3346 #define _IOCAN1 0x02
3347 #define _IOCAN2 0x04
3348 #define _IOCAN3 0x08
3349 #define _IOCAN4 0x10
3350 #define _IOCAN5 0x20
3352 //==============================================================================
3355 //==============================================================================
3356 // IOCAF Bits
3358 extern __at(0x0393) __sfr IOCAF;
3360 typedef union
3362 struct
3364 unsigned IOCAF0 : 1;
3365 unsigned IOCAF1 : 1;
3366 unsigned IOCAF2 : 1;
3367 unsigned IOCAF3 : 1;
3368 unsigned IOCAF4 : 1;
3369 unsigned IOCAF5 : 1;
3370 unsigned : 1;
3371 unsigned : 1;
3374 struct
3376 unsigned IOCAF : 6;
3377 unsigned : 2;
3379 } __IOCAFbits_t;
3381 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
3383 #define _IOCAF0 0x01
3384 #define _IOCAF1 0x02
3385 #define _IOCAF2 0x04
3386 #define _IOCAF3 0x08
3387 #define _IOCAF4 0x10
3388 #define _IOCAF5 0x20
3390 //==============================================================================
3393 //==============================================================================
3394 // IOCBP Bits
3396 extern __at(0x0394) __sfr IOCBP;
3398 typedef struct
3400 unsigned : 1;
3401 unsigned : 1;
3402 unsigned : 1;
3403 unsigned : 1;
3404 unsigned IOCBP4 : 1;
3405 unsigned IOCBP5 : 1;
3406 unsigned IOCBP6 : 1;
3407 unsigned IOCBP7 : 1;
3408 } __IOCBPbits_t;
3410 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
3412 #define _IOCBP4 0x10
3413 #define _IOCBP5 0x20
3414 #define _IOCBP6 0x40
3415 #define _IOCBP7 0x80
3417 //==============================================================================
3420 //==============================================================================
3421 // IOCBN Bits
3423 extern __at(0x0395) __sfr IOCBN;
3425 typedef struct
3427 unsigned : 1;
3428 unsigned : 1;
3429 unsigned : 1;
3430 unsigned : 1;
3431 unsigned IOCBN4 : 1;
3432 unsigned IOCBN5 : 1;
3433 unsigned IOCBN6 : 1;
3434 unsigned IOCBN7 : 1;
3435 } __IOCBNbits_t;
3437 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
3439 #define _IOCBN4 0x10
3440 #define _IOCBN5 0x20
3441 #define _IOCBN6 0x40
3442 #define _IOCBN7 0x80
3444 //==============================================================================
3447 //==============================================================================
3448 // IOCBF Bits
3450 extern __at(0x0396) __sfr IOCBF;
3452 typedef struct
3454 unsigned : 1;
3455 unsigned : 1;
3456 unsigned : 1;
3457 unsigned : 1;
3458 unsigned IOCBF4 : 1;
3459 unsigned IOCBF5 : 1;
3460 unsigned IOCBF6 : 1;
3461 unsigned IOCBF7 : 1;
3462 } __IOCBFbits_t;
3464 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3466 #define _IOCBF4 0x10
3467 #define _IOCBF5 0x20
3468 #define _IOCBF6 0x40
3469 #define _IOCBF7 0x80
3471 //==============================================================================
3474 //==============================================================================
3475 // CLKRCON Bits
3477 extern __at(0x039A) __sfr CLKRCON;
3479 typedef union
3481 struct
3483 unsigned CLKRDIV0 : 1;
3484 unsigned CLKRDIV1 : 1;
3485 unsigned CLKRDIV2 : 1;
3486 unsigned CLKRDC0 : 1;
3487 unsigned CLKRDC1 : 1;
3488 unsigned CLKRSLR : 1;
3489 unsigned CLKROE : 1;
3490 unsigned CLKREN : 1;
3493 struct
3495 unsigned CLKRDIV : 3;
3496 unsigned : 5;
3499 struct
3501 unsigned : 3;
3502 unsigned CLKRDC : 2;
3503 unsigned : 3;
3505 } __CLKRCONbits_t;
3507 extern __at(0x039A) volatile __CLKRCONbits_t CLKRCONbits;
3509 #define _CLKRDIV0 0x01
3510 #define _CLKRDIV1 0x02
3511 #define _CLKRDIV2 0x04
3512 #define _CLKRDC0 0x08
3513 #define _CLKRDC1 0x10
3514 #define _CLKRSLR 0x20
3515 #define _CLKROE 0x40
3516 #define _CLKREN 0x80
3518 //==============================================================================
3521 //==============================================================================
3522 // MDCON Bits
3524 extern __at(0x039C) __sfr MDCON;
3526 typedef struct
3528 unsigned MDBIT : 1;
3529 unsigned : 1;
3530 unsigned : 1;
3531 unsigned MDOUT : 1;
3532 unsigned MDOPOL : 1;
3533 unsigned MDSLR : 1;
3534 unsigned MDOE : 1;
3535 unsigned MDEN : 1;
3536 } __MDCONbits_t;
3538 extern __at(0x039C) volatile __MDCONbits_t MDCONbits;
3540 #define _MDBIT 0x01
3541 #define _MDOUT 0x08
3542 #define _MDOPOL 0x10
3543 #define _MDSLR 0x20
3544 #define _MDOE 0x40
3545 #define _MDEN 0x80
3547 //==============================================================================
3550 //==============================================================================
3551 // MDSRC Bits
3553 extern __at(0x039D) __sfr MDSRC;
3555 typedef union
3557 struct
3559 unsigned MDMS0 : 1;
3560 unsigned MDMS1 : 1;
3561 unsigned MDMS2 : 1;
3562 unsigned MDMS3 : 1;
3563 unsigned : 1;
3564 unsigned : 1;
3565 unsigned : 1;
3566 unsigned MDMSODIS : 1;
3569 struct
3571 unsigned MDMS : 4;
3572 unsigned : 4;
3574 } __MDSRCbits_t;
3576 extern __at(0x039D) volatile __MDSRCbits_t MDSRCbits;
3578 #define _MDMS0 0x01
3579 #define _MDMS1 0x02
3580 #define _MDMS2 0x04
3581 #define _MDMS3 0x08
3582 #define _MDMSODIS 0x80
3584 //==============================================================================
3587 //==============================================================================
3588 // MDCARL Bits
3590 extern __at(0x039E) __sfr MDCARL;
3592 typedef union
3594 struct
3596 unsigned MDCL0 : 1;
3597 unsigned MDCL1 : 1;
3598 unsigned MDCL2 : 1;
3599 unsigned MDCL3 : 1;
3600 unsigned : 1;
3601 unsigned MDCLSYNC : 1;
3602 unsigned MDCLPOL : 1;
3603 unsigned MDCLODIS : 1;
3606 struct
3608 unsigned MDCL : 4;
3609 unsigned : 4;
3611 } __MDCARLbits_t;
3613 extern __at(0x039E) volatile __MDCARLbits_t MDCARLbits;
3615 #define _MDCL0 0x01
3616 #define _MDCL1 0x02
3617 #define _MDCL2 0x04
3618 #define _MDCL3 0x08
3619 #define _MDCLSYNC 0x20
3620 #define _MDCLPOL 0x40
3621 #define _MDCLODIS 0x80
3623 //==============================================================================
3626 //==============================================================================
3627 // MDCARH Bits
3629 extern __at(0x039F) __sfr MDCARH;
3631 typedef union
3633 struct
3635 unsigned MDCH0 : 1;
3636 unsigned MDCH1 : 1;
3637 unsigned MDCH2 : 1;
3638 unsigned MDCH3 : 1;
3639 unsigned : 1;
3640 unsigned MDCHSYNC : 1;
3641 unsigned MDCHPOL : 1;
3642 unsigned MDCHODIS : 1;
3645 struct
3647 unsigned MDCH : 4;
3648 unsigned : 4;
3650 } __MDCARHbits_t;
3652 extern __at(0x039F) volatile __MDCARHbits_t MDCARHbits;
3654 #define _MDCH0 0x01
3655 #define _MDCH1 0x02
3656 #define _MDCH2 0x04
3657 #define _MDCH3 0x08
3658 #define _MDCHSYNC 0x20
3659 #define _MDCHPOL 0x40
3660 #define _MDCHODIS 0x80
3662 //==============================================================================
3664 extern __at(0x0415) __sfr TMR4;
3665 extern __at(0x0416) __sfr PR4;
3667 //==============================================================================
3668 // T4CON Bits
3670 extern __at(0x0417) __sfr T4CON;
3672 typedef union
3674 struct
3676 unsigned T4CKPS0 : 1;
3677 unsigned T4CKPS1 : 1;
3678 unsigned TMR4ON : 1;
3679 unsigned T4OUTPS0 : 1;
3680 unsigned T4OUTPS1 : 1;
3681 unsigned T4OUTPS2 : 1;
3682 unsigned T4OUTPS3 : 1;
3683 unsigned : 1;
3686 struct
3688 unsigned T4CKPS : 2;
3689 unsigned : 6;
3692 struct
3694 unsigned : 3;
3695 unsigned T4OUTPS : 4;
3696 unsigned : 1;
3698 } __T4CONbits_t;
3700 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
3702 #define _T4CKPS0 0x01
3703 #define _T4CKPS1 0x02
3704 #define _TMR4ON 0x04
3705 #define _T4OUTPS0 0x08
3706 #define _T4OUTPS1 0x10
3707 #define _T4OUTPS2 0x20
3708 #define _T4OUTPS3 0x40
3710 //==============================================================================
3712 extern __at(0x041C) __sfr TMR6;
3713 extern __at(0x041D) __sfr PR6;
3715 //==============================================================================
3716 // T6CON Bits
3718 extern __at(0x041E) __sfr T6CON;
3720 typedef union
3722 struct
3724 unsigned T6CKPS0 : 1;
3725 unsigned T6CKPS1 : 1;
3726 unsigned TMR6ON : 1;
3727 unsigned T6OUTPS0 : 1;
3728 unsigned T6OUTPS1 : 1;
3729 unsigned T6OUTPS2 : 1;
3730 unsigned T6OUTPS3 : 1;
3731 unsigned : 1;
3734 struct
3736 unsigned T6CKPS : 2;
3737 unsigned : 6;
3740 struct
3742 unsigned : 3;
3743 unsigned T6OUTPS : 4;
3744 unsigned : 1;
3746 } __T6CONbits_t;
3748 extern __at(0x041E) volatile __T6CONbits_t T6CONbits;
3750 #define _T6CKPS0 0x01
3751 #define _T6CKPS1 0x02
3752 #define _TMR6ON 0x04
3753 #define _T6OUTPS0 0x08
3754 #define _T6OUTPS1 0x10
3755 #define _T6OUTPS2 0x20
3756 #define _T6OUTPS3 0x40
3758 //==============================================================================
3761 //==============================================================================
3762 // STATUS_SHAD Bits
3764 extern __at(0x0FE4) __sfr STATUS_SHAD;
3766 typedef struct
3768 unsigned C_SHAD : 1;
3769 unsigned DC_SHAD : 1;
3770 unsigned Z_SHAD : 1;
3771 unsigned : 1;
3772 unsigned : 1;
3773 unsigned : 1;
3774 unsigned : 1;
3775 unsigned : 1;
3776 } __STATUS_SHADbits_t;
3778 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
3780 #define _C_SHAD 0x01
3781 #define _DC_SHAD 0x02
3782 #define _Z_SHAD 0x04
3784 //==============================================================================
3786 extern __at(0x0FE5) __sfr WREG_SHAD;
3787 extern __at(0x0FE6) __sfr BSR_SHAD;
3788 extern __at(0x0FE7) __sfr PCLATH_SHAD;
3789 extern __at(0x0FE8) __sfr FSR0L_SHAD;
3790 extern __at(0x0FE9) __sfr FSR0H_SHAD;
3791 extern __at(0x0FEA) __sfr FSR1L_SHAD;
3792 extern __at(0x0FEB) __sfr FSR1H_SHAD;
3793 extern __at(0x0FED) __sfr STKPTR;
3794 extern __at(0x0FEE) __sfr TOSL;
3795 extern __at(0x0FEF) __sfr TOSH;
3797 //==============================================================================
3799 // Configuration Bits
3801 //==============================================================================
3803 #define _CONFIG1 0x8007
3804 #define _CONFIG2 0x8008
3806 //----------------------------- CONFIG1 Options -------------------------------
3808 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
3809 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
3810 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
3811 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
3812 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
3813 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
3814 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
3815 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin.
3816 #define _WDTE_OFF 0x3FE7 // WDT disabled.
3817 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
3818 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
3819 #define _WDTE_ON 0x3FFF // WDT enabled.
3820 #define _PWRTE_ON 0x3FDF // PWRT enabled.
3821 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
3822 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
3823 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
3824 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
3825 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
3826 #define _CPD_ON 0x3EFF // Data memory code protection is enabled.
3827 #define _CPD_OFF 0x3FFF // Data memory code protection is disabled.
3828 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
3829 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
3830 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
3831 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
3832 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
3833 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
3834 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
3835 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
3836 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
3837 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
3839 //----------------------------- CONFIG2 Options -------------------------------
3841 #define _WRT_ALL 0x3FFC // 000h to 1FFFh write protected, no addresses may be modified by EECON control.
3842 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 1000h to 1FFFh may be modified by EECON control.
3843 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 1FFFh may be modified by EECON control.
3844 #define _WRT_OFF 0x3FFF // Write protection off.
3845 #define _PLLEN_OFF 0x3EFF // 4x PLL disabled.
3846 #define _PLLEN_ON 0x3FFF // 4x PLL enabled.
3847 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
3848 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
3849 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
3850 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3851 #define _BORV_19 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3852 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
3853 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
3854 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
3855 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
3857 //==============================================================================
3859 #define _DEVID1 0x8006
3861 #define _IDLOC0 0x8000
3862 #define _IDLOC1 0x8001
3863 #define _IDLOC2 0x8002
3864 #define _IDLOC3 0x8003
3866 //==============================================================================
3868 #ifndef NO_BIT_DEFINES
3870 #define ADON ADCON0bits.ADON // bit 0
3871 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
3872 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
3873 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
3874 #define CHS0 ADCON0bits.CHS0 // bit 2
3875 #define CHS1 ADCON0bits.CHS1 // bit 3
3876 #define CHS2 ADCON0bits.CHS2 // bit 4
3877 #define CHS3 ADCON0bits.CHS3 // bit 5
3878 #define CHS4 ADCON0bits.CHS4 // bit 6
3880 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
3881 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
3882 #define ADNREF ADCON1bits.ADNREF // bit 2
3883 #define ADCS0 ADCON1bits.ADCS0 // bit 4
3884 #define ADCS1 ADCON1bits.ADCS1 // bit 5
3885 #define ADCS2 ADCON1bits.ADCS2 // bit 6
3886 #define ADFM ADCON1bits.ADFM // bit 7
3888 #define ANSA0 ANSELAbits.ANSA0 // bit 0
3889 #define ANSA1 ANSELAbits.ANSA1 // bit 1
3890 #define ANSA2 ANSELAbits.ANSA2 // bit 2
3891 #define ANSA4 ANSELAbits.ANSA4 // bit 4
3893 #define ANSB4 ANSELBbits.ANSB4 // bit 4
3894 #define ANSB5 ANSELBbits.ANSB5 // bit 5
3896 #define ANSC0 ANSELCbits.ANSC0 // bit 0
3897 #define ANSC1 ANSELCbits.ANSC1 // bit 1
3898 #define ANSC2 ANSELCbits.ANSC2 // bit 2
3899 #define ANSC3 ANSELCbits.ANSC3 // bit 3
3900 #define ANSC6 ANSELCbits.ANSC6 // bit 6
3901 #define ANSC7 ANSELCbits.ANSC7 // bit 7
3903 #define TXCKSEL APFCON0bits.TXCKSEL // bit 2
3904 #define T1GSEL APFCON0bits.T1GSEL // bit 3
3905 #define RXDTSEL APFCON0bits.RXDTSEL // bit 7
3907 #define CCP2SEL APFCON1bits.CCP2SEL // bit 0
3908 #define P2BSEL APFCON1bits.P2BSEL // bit 1
3909 #define P1CSEL APFCON1bits.P1CSEL // bit 2
3910 #define P1DSEL APFCON1bits.P1DSEL // bit 3
3911 #define SS2SEL APFCON1bits.SS2SEL // bit 4
3912 #define SDO2SEL APFCON1bits.SDO2SEL // bit 5
3914 #define ABDEN BAUDCONbits.ABDEN // bit 0
3915 #define WUE BAUDCONbits.WUE // bit 1
3916 #define BRG16 BAUDCONbits.BRG16 // bit 3
3917 #define SCKP BAUDCONbits.SCKP // bit 4
3918 #define RCIDL BAUDCONbits.RCIDL // bit 6
3919 #define ABDOVF BAUDCONbits.ABDOVF // bit 7
3921 #define BORRDY BORCONbits.BORRDY // bit 0
3922 #define SBOREN BORCONbits.SBOREN // bit 7
3924 #define BSR0 BSRbits.BSR0 // bit 0
3925 #define BSR1 BSRbits.BSR1 // bit 1
3926 #define BSR2 BSRbits.BSR2 // bit 2
3927 #define BSR3 BSRbits.BSR3 // bit 3
3928 #define BSR4 BSRbits.BSR4 // bit 4
3930 #define PSS1BD0 CCP1ASbits.PSS1BD0 // bit 0
3931 #define PSS1BD1 CCP1ASbits.PSS1BD1 // bit 1
3932 #define PSS1AC0 CCP1ASbits.PSS1AC0 // bit 2
3933 #define PSS1AC1 CCP1ASbits.PSS1AC1 // bit 3
3934 #define CCP1AS0 CCP1ASbits.CCP1AS0 // bit 4
3935 #define CCP1AS1 CCP1ASbits.CCP1AS1 // bit 5
3936 #define CCP1AS2 CCP1ASbits.CCP1AS2 // bit 6
3937 #define CCP1ASE CCP1ASbits.CCP1ASE // bit 7
3939 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
3940 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
3941 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
3942 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
3943 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
3944 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
3945 #define P1M0 CCP1CONbits.P1M0 // bit 6
3946 #define P1M1 CCP1CONbits.P1M1 // bit 7
3948 #define PSS2BD0 CCP2ASbits.PSS2BD0 // bit 0
3949 #define PSS2BD1 CCP2ASbits.PSS2BD1 // bit 1
3950 #define PSS2AC0 CCP2ASbits.PSS2AC0 // bit 2
3951 #define PSS2AC1 CCP2ASbits.PSS2AC1 // bit 3
3952 #define CCP2AS0 CCP2ASbits.CCP2AS0 // bit 4
3953 #define CCP2AS1 CCP2ASbits.CCP2AS1 // bit 5
3954 #define CCP2AS2 CCP2ASbits.CCP2AS2 // bit 6
3955 #define CCP2ASE CCP2ASbits.CCP2ASE // bit 7
3957 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
3958 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
3959 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
3960 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
3961 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
3962 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
3963 #define P2M0 CCP2CONbits.P2M0 // bit 6
3964 #define P2M1 CCP2CONbits.P2M1 // bit 7
3966 #define CCP3M0 CCP3CONbits.CCP3M0 // bit 0
3967 #define CCP3M1 CCP3CONbits.CCP3M1 // bit 1
3968 #define CCP3M2 CCP3CONbits.CCP3M2 // bit 2
3969 #define CCP3M3 CCP3CONbits.CCP3M3 // bit 3
3970 #define DC3B0 CCP3CONbits.DC3B0 // bit 4
3971 #define DC3B1 CCP3CONbits.DC3B1 // bit 5
3973 #define CCP4M0 CCP4CONbits.CCP4M0 // bit 0
3974 #define CCP4M1 CCP4CONbits.CCP4M1 // bit 1
3975 #define CCP4M2 CCP4CONbits.CCP4M2 // bit 2
3976 #define CCP4M3 CCP4CONbits.CCP4M3 // bit 3
3977 #define DC4B0 CCP4CONbits.DC4B0 // bit 4
3978 #define DC4B1 CCP4CONbits.DC4B1 // bit 5
3980 #define C1TSEL0 CCPTMRSbits.C1TSEL0 // bit 0
3981 #define C1TSEL1 CCPTMRSbits.C1TSEL1 // bit 1
3982 #define C2TSEL0 CCPTMRSbits.C2TSEL0 // bit 2
3983 #define C2TSEL1 CCPTMRSbits.C2TSEL1 // bit 3
3984 #define C3TSEL0 CCPTMRSbits.C3TSEL0 // bit 4
3985 #define C3TSEL1 CCPTMRSbits.C3TSEL1 // bit 5
3986 #define C4TSEL0 CCPTMRSbits.C4TSEL0 // bit 6
3987 #define C4TSEL1 CCPTMRSbits.C4TSEL1 // bit 7
3989 #define CLKRDIV0 CLKRCONbits.CLKRDIV0 // bit 0
3990 #define CLKRDIV1 CLKRCONbits.CLKRDIV1 // bit 1
3991 #define CLKRDIV2 CLKRCONbits.CLKRDIV2 // bit 2
3992 #define CLKRDC0 CLKRCONbits.CLKRDC0 // bit 3
3993 #define CLKRDC1 CLKRCONbits.CLKRDC1 // bit 4
3994 #define CLKRSLR CLKRCONbits.CLKRSLR // bit 5
3995 #define CLKROE CLKRCONbits.CLKROE // bit 6
3996 #define CLKREN CLKRCONbits.CLKREN // bit 7
3998 #define C1SYNC CM1CON0bits.C1SYNC // bit 0
3999 #define C1HYS CM1CON0bits.C1HYS // bit 1
4000 #define C1SP CM1CON0bits.C1SP // bit 2
4001 #define C1POL CM1CON0bits.C1POL // bit 4
4002 #define C1OE CM1CON0bits.C1OE // bit 5
4003 #define C1OUT CM1CON0bits.C1OUT // bit 6
4004 #define C1ON CM1CON0bits.C1ON // bit 7
4006 #define C1NCH0 CM1CON1bits.C1NCH0 // bit 0
4007 #define C1NCH1 CM1CON1bits.C1NCH1 // bit 1
4008 #define C1PCH0 CM1CON1bits.C1PCH0 // bit 4
4009 #define C1PCH1 CM1CON1bits.C1PCH1 // bit 5
4010 #define C1INTN CM1CON1bits.C1INTN // bit 6
4011 #define C1INTP CM1CON1bits.C1INTP // bit 7
4013 #define C2SYNC CM2CON0bits.C2SYNC // bit 0
4014 #define C2HYS CM2CON0bits.C2HYS // bit 1
4015 #define C2SP CM2CON0bits.C2SP // bit 2
4016 #define C2POL CM2CON0bits.C2POL // bit 4
4017 #define C2OE CM2CON0bits.C2OE // bit 5
4018 #define C2OUT CM2CON0bits.C2OUT // bit 6
4019 #define C2ON CM2CON0bits.C2ON // bit 7
4021 #define C2NCH0 CM2CON1bits.C2NCH0 // bit 0
4022 #define C2NCH1 CM2CON1bits.C2NCH1 // bit 1
4023 #define C2PCH0 CM2CON1bits.C2PCH0 // bit 4
4024 #define C2PCH1 CM2CON1bits.C2PCH1 // bit 5
4025 #define C2INTN CM2CON1bits.C2INTN // bit 6
4026 #define C2INTP CM2CON1bits.C2INTP // bit 7
4028 #define MC1OUT CMOUTbits.MC1OUT // bit 0
4029 #define MC2OUT CMOUTbits.MC2OUT // bit 1
4031 #define T0XCS CPSCON0bits.T0XCS // bit 0
4032 #define CPSOUT CPSCON0bits.CPSOUT // bit 1
4033 #define CPSRNG0 CPSCON0bits.CPSRNG0 // bit 2
4034 #define CPSRNG1 CPSCON0bits.CPSRNG1 // bit 3
4035 #define CPSRM CPSCON0bits.CPSRM // bit 6
4036 #define CPSON CPSCON0bits.CPSON // bit 7
4038 #define CPSCH0 CPSCON1bits.CPSCH0 // bit 0
4039 #define CPSCH1 CPSCON1bits.CPSCH1 // bit 1
4040 #define CPSCH2 CPSCON1bits.CPSCH2 // bit 2
4041 #define CPSCH3 CPSCON1bits.CPSCH3 // bit 3
4043 #define DACNSS DACCON0bits.DACNSS // bit 0
4044 #define DACPSS0 DACCON0bits.DACPSS0 // bit 2
4045 #define DACPSS1 DACCON0bits.DACPSS1 // bit 3
4046 #define DACOE DACCON0bits.DACOE // bit 5
4047 #define DACLPS DACCON0bits.DACLPS // bit 6
4048 #define DACEN DACCON0bits.DACEN // bit 7
4050 #define DACR0 DACCON1bits.DACR0 // bit 0
4051 #define DACR1 DACCON1bits.DACR1 // bit 1
4052 #define DACR2 DACCON1bits.DACR2 // bit 2
4053 #define DACR3 DACCON1bits.DACR3 // bit 3
4054 #define DACR4 DACCON1bits.DACR4 // bit 4
4056 #define RD EECON1bits.RD // bit 0
4057 #define WR EECON1bits.WR // bit 1
4058 #define WREN EECON1bits.WREN // bit 2
4059 #define WRERR EECON1bits.WRERR // bit 3
4060 #define FREE EECON1bits.FREE // bit 4
4061 #define LWLO EECON1bits.LWLO // bit 5
4062 #define CFGS EECON1bits.CFGS // bit 6
4063 #define EEPGD EECON1bits.EEPGD // bit 7
4065 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
4066 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
4067 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
4068 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
4069 #define TSRNG FVRCONbits.TSRNG // bit 4
4070 #define TSEN FVRCONbits.TSEN // bit 5
4071 #define FVRRDY FVRCONbits.FVRRDY // bit 6
4072 #define FVREN FVRCONbits.FVREN // bit 7
4074 #define INLVLA0 INLVLAbits.INLVLA0 // bit 0
4075 #define INLVLA1 INLVLAbits.INLVLA1 // bit 1
4076 #define INLVLA2 INLVLAbits.INLVLA2 // bit 2
4077 #define INLVLA3 INLVLAbits.INLVLA3 // bit 3
4078 #define INLVLA4 INLVLAbits.INLVLA4 // bit 4
4079 #define INLVLA5 INLVLAbits.INLVLA5 // bit 5
4081 #define INLVLB4 INLVLBbits.INLVLB4 // bit 4
4082 #define INLVLB5 INLVLBbits.INLVLB5 // bit 5
4083 #define INLVLB6 INLVLBbits.INLVLB6 // bit 6
4084 #define INLVLB7 INLVLBbits.INLVLB7 // bit 7
4086 #define INLVLC0 INLVLCbits.INLVLC0 // bit 0
4087 #define INLVLC1 INLVLCbits.INLVLC1 // bit 1
4088 #define INLVLC2 INLVLCbits.INLVLC2 // bit 2
4089 #define INLVLC3 INLVLCbits.INLVLC3 // bit 3
4090 #define INLVLC4 INLVLCbits.INLVLC4 // bit 4
4091 #define INLVLC5 INLVLCbits.INLVLC5 // bit 5
4092 #define INLVLC6 INLVLCbits.INLVLC6 // bit 6
4093 #define INLVLC7 INLVLCbits.INLVLC7 // bit 7
4095 #define IOCIF INTCONbits.IOCIF // bit 0
4096 #define INTF INTCONbits.INTF // bit 1
4097 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
4098 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
4099 #define IOCIE INTCONbits.IOCIE // bit 3
4100 #define INTE INTCONbits.INTE // bit 4
4101 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
4102 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
4103 #define PEIE INTCONbits.PEIE // bit 6
4104 #define GIE INTCONbits.GIE // bit 7
4106 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
4107 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
4108 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
4109 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
4110 #define IOCAF4 IOCAFbits.IOCAF4 // bit 4
4111 #define IOCAF5 IOCAFbits.IOCAF5 // bit 5
4113 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
4114 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
4115 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
4116 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
4117 #define IOCAN4 IOCANbits.IOCAN4 // bit 4
4118 #define IOCAN5 IOCANbits.IOCAN5 // bit 5
4120 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
4121 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
4122 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
4123 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
4124 #define IOCAP4 IOCAPbits.IOCAP4 // bit 4
4125 #define IOCAP5 IOCAPbits.IOCAP5 // bit 5
4127 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
4128 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
4129 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
4130 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
4132 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
4133 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
4134 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
4135 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
4137 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
4138 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
4139 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
4140 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
4142 #define LATA0 LATAbits.LATA0 // bit 0
4143 #define LATA1 LATAbits.LATA1 // bit 1
4144 #define LATA2 LATAbits.LATA2 // bit 2
4145 #define LATA4 LATAbits.LATA4 // bit 4
4146 #define LATA5 LATAbits.LATA5 // bit 5
4148 #define LATB4 LATBbits.LATB4 // bit 4
4149 #define LATB5 LATBbits.LATB5 // bit 5
4150 #define LATB6 LATBbits.LATB6 // bit 6
4151 #define LATB7 LATBbits.LATB7 // bit 7
4153 #define LATC0 LATCbits.LATC0 // bit 0
4154 #define LATC1 LATCbits.LATC1 // bit 1
4155 #define LATC2 LATCbits.LATC2 // bit 2
4156 #define LATC3 LATCbits.LATC3 // bit 3
4157 #define LATC4 LATCbits.LATC4 // bit 4
4158 #define LATC5 LATCbits.LATC5 // bit 5
4159 #define LATC6 LATCbits.LATC6 // bit 6
4160 #define LATC7 LATCbits.LATC7 // bit 7
4162 #define MDCH0 MDCARHbits.MDCH0 // bit 0
4163 #define MDCH1 MDCARHbits.MDCH1 // bit 1
4164 #define MDCH2 MDCARHbits.MDCH2 // bit 2
4165 #define MDCH3 MDCARHbits.MDCH3 // bit 3
4166 #define MDCHSYNC MDCARHbits.MDCHSYNC // bit 5
4167 #define MDCHPOL MDCARHbits.MDCHPOL // bit 6
4168 #define MDCHODIS MDCARHbits.MDCHODIS // bit 7
4170 #define MDCL0 MDCARLbits.MDCL0 // bit 0
4171 #define MDCL1 MDCARLbits.MDCL1 // bit 1
4172 #define MDCL2 MDCARLbits.MDCL2 // bit 2
4173 #define MDCL3 MDCARLbits.MDCL3 // bit 3
4174 #define MDCLSYNC MDCARLbits.MDCLSYNC // bit 5
4175 #define MDCLPOL MDCARLbits.MDCLPOL // bit 6
4176 #define MDCLODIS MDCARLbits.MDCLODIS // bit 7
4178 #define MDBIT MDCONbits.MDBIT // bit 0
4179 #define MDOUT MDCONbits.MDOUT // bit 3
4180 #define MDOPOL MDCONbits.MDOPOL // bit 4
4181 #define MDSLR MDCONbits.MDSLR // bit 5
4182 #define MDOE MDCONbits.MDOE // bit 6
4183 #define MDEN MDCONbits.MDEN // bit 7
4185 #define MDMS0 MDSRCbits.MDMS0 // bit 0
4186 #define MDMS1 MDSRCbits.MDMS1 // bit 1
4187 #define MDMS2 MDSRCbits.MDMS2 // bit 2
4188 #define MDMS3 MDSRCbits.MDMS3 // bit 3
4189 #define MDMSODIS MDSRCbits.MDMSODIS // bit 7
4191 #define PS0 OPTION_REGbits.PS0 // bit 0
4192 #define PS1 OPTION_REGbits.PS1 // bit 1
4193 #define PS2 OPTION_REGbits.PS2 // bit 2
4194 #define PSA OPTION_REGbits.PSA // bit 3
4195 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
4196 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
4197 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
4198 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
4199 #define INTEDG OPTION_REGbits.INTEDG // bit 6
4200 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
4202 #define SCS0 OSCCONbits.SCS0 // bit 0
4203 #define SCS1 OSCCONbits.SCS1 // bit 1
4204 #define IRCF0 OSCCONbits.IRCF0 // bit 3
4205 #define IRCF1 OSCCONbits.IRCF1 // bit 4
4206 #define IRCF2 OSCCONbits.IRCF2 // bit 5
4207 #define IRCF3 OSCCONbits.IRCF3 // bit 6
4208 #define SPLLEN OSCCONbits.SPLLEN // bit 7
4210 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
4211 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
4212 #define MFIOFR OSCSTATbits.MFIOFR // bit 2
4213 #define HFIOFL OSCSTATbits.HFIOFL // bit 3
4214 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
4215 #define OSTS OSCSTATbits.OSTS // bit 5
4216 #define PLLR OSCSTATbits.PLLR // bit 6
4217 #define T1OSCR OSCSTATbits.T1OSCR // bit 7
4219 #define TUN0 OSCTUNEbits.TUN0 // bit 0
4220 #define TUN1 OSCTUNEbits.TUN1 // bit 1
4221 #define TUN2 OSCTUNEbits.TUN2 // bit 2
4222 #define TUN3 OSCTUNEbits.TUN3 // bit 3
4223 #define TUN4 OSCTUNEbits.TUN4 // bit 4
4224 #define TUN5 OSCTUNEbits.TUN5 // bit 5
4226 #define NOT_BOR PCONbits.NOT_BOR // bit 0
4227 #define NOT_POR PCONbits.NOT_POR // bit 1
4228 #define NOT_RI PCONbits.NOT_RI // bit 2
4229 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
4230 #define STKUNF PCONbits.STKUNF // bit 6
4231 #define STKOVF PCONbits.STKOVF // bit 7
4233 #define TMR1IE PIE1bits.TMR1IE // bit 0
4234 #define TMR2IE PIE1bits.TMR2IE // bit 1
4235 #define CCP1IE PIE1bits.CCP1IE // bit 2
4236 #define SSP1IE PIE1bits.SSP1IE // bit 3
4237 #define TXIE PIE1bits.TXIE // bit 4
4238 #define RCIE PIE1bits.RCIE // bit 5
4239 #define ADIE PIE1bits.ADIE // bit 6
4240 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
4242 #define CCP2IE PIE2bits.CCP2IE // bit 0
4243 #define BCL1IE PIE2bits.BCL1IE // bit 3
4244 #define EEIE PIE2bits.EEIE // bit 4
4245 #define C1IE PIE2bits.C1IE // bit 5
4246 #define C2IE PIE2bits.C2IE // bit 6
4247 #define OSFIE PIE2bits.OSFIE // bit 7
4249 #define TMR4IE PIE3bits.TMR4IE // bit 1
4250 #define TMR6IE PIE3bits.TMR6IE // bit 3
4251 #define CCP3IE PIE3bits.CCP3IE // bit 4
4252 #define CCP4IE PIE3bits.CCP4IE // bit 5
4254 #define SSP2IE PIE4bits.SSP2IE // bit 0
4255 #define BCL2IE PIE4bits.BCL2IE // bit 1
4257 #define TMR1IF PIR1bits.TMR1IF // bit 0
4258 #define TMR2IF PIR1bits.TMR2IF // bit 1
4259 #define CCP1IF PIR1bits.CCP1IF // bit 2
4260 #define SSP1IF PIR1bits.SSP1IF // bit 3
4261 #define TXIF PIR1bits.TXIF // bit 4
4262 #define RCIF PIR1bits.RCIF // bit 5
4263 #define ADIF PIR1bits.ADIF // bit 6
4264 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
4266 #define CCP2IF PIR2bits.CCP2IF // bit 0
4267 #define BCL1IF PIR2bits.BCL1IF // bit 3
4268 #define EEIF PIR2bits.EEIF // bit 4
4269 #define C1IF PIR2bits.C1IF // bit 5
4270 #define C2IF PIR2bits.C2IF // bit 6
4271 #define OSFIF PIR2bits.OSFIF // bit 7
4273 #define TMR4IF PIR3bits.TMR4IF // bit 1
4274 #define TMR6IF PIR3bits.TMR6IF // bit 3
4275 #define CCP3IF PIR3bits.CCP3IF // bit 4
4276 #define CCP4IF PIR3bits.CCP4IF // bit 5
4278 #define SSP2IF PIR4bits.SSP2IF // bit 0
4279 #define BCL2IF PIR4bits.BCL2IF // bit 1
4281 #define RA0 PORTAbits.RA0 // bit 0
4282 #define RA1 PORTAbits.RA1 // bit 1
4283 #define RA2 PORTAbits.RA2 // bit 2
4284 #define RA3 PORTAbits.RA3 // bit 3
4285 #define RA4 PORTAbits.RA4 // bit 4
4286 #define RA5 PORTAbits.RA5 // bit 5
4288 #define RB4 PORTBbits.RB4 // bit 4
4289 #define RB5 PORTBbits.RB5 // bit 5
4290 #define RB6 PORTBbits.RB6 // bit 6
4291 #define RB7 PORTBbits.RB7 // bit 7
4293 #define RC0 PORTCbits.RC0 // bit 0
4294 #define RC1 PORTCbits.RC1 // bit 1
4295 #define RC2 PORTCbits.RC2 // bit 2
4296 #define RC3 PORTCbits.RC3 // bit 3
4297 #define RC4 PORTCbits.RC4 // bit 4
4298 #define RC5 PORTCbits.RC5 // bit 5
4299 #define RC6 PORTCbits.RC6 // bit 6
4300 #define RC7 PORTCbits.RC7 // bit 7
4302 #define STR1A PSTR1CONbits.STR1A // bit 0
4303 #define STR1B PSTR1CONbits.STR1B // bit 1
4304 #define STR1C PSTR1CONbits.STR1C // bit 2
4305 #define STR1D PSTR1CONbits.STR1D // bit 3
4306 #define STR1SYNC PSTR1CONbits.STR1SYNC // bit 4
4308 #define STR2A PSTR2CONbits.STR2A // bit 0
4309 #define STR2B PSTR2CONbits.STR2B // bit 1
4310 #define STR2C PSTR2CONbits.STR2C // bit 2
4311 #define STR2D PSTR2CONbits.STR2D // bit 3
4312 #define STR2SYNC PSTR2CONbits.STR2SYNC // bit 4
4314 #define P1DC0 PWM1CONbits.P1DC0 // bit 0
4315 #define P1DC1 PWM1CONbits.P1DC1 // bit 1
4316 #define P1DC2 PWM1CONbits.P1DC2 // bit 2
4317 #define P1DC3 PWM1CONbits.P1DC3 // bit 3
4318 #define P1DC4 PWM1CONbits.P1DC4 // bit 4
4319 #define P1DC5 PWM1CONbits.P1DC5 // bit 5
4320 #define P1DC6 PWM1CONbits.P1DC6 // bit 6
4321 #define P1RSEN PWM1CONbits.P1RSEN // bit 7
4323 #define P2DC0 PWM2CONbits.P2DC0 // bit 0
4324 #define P2DC1 PWM2CONbits.P2DC1 // bit 1
4325 #define P2DC2 PWM2CONbits.P2DC2 // bit 2
4326 #define P2DC3 PWM2CONbits.P2DC3 // bit 3
4327 #define P2DC4 PWM2CONbits.P2DC4 // bit 4
4328 #define P2DC5 PWM2CONbits.P2DC5 // bit 5
4329 #define P2DC6 PWM2CONbits.P2DC6 // bit 6
4330 #define P2RSEN PWM2CONbits.P2RSEN // bit 7
4332 #define RX9D RCSTAbits.RX9D // bit 0
4333 #define OERR RCSTAbits.OERR // bit 1
4334 #define FERR RCSTAbits.FERR // bit 2
4335 #define ADDEN RCSTAbits.ADDEN // bit 3
4336 #define CREN RCSTAbits.CREN // bit 4
4337 #define SREN RCSTAbits.SREN // bit 5
4338 #define RX9 RCSTAbits.RX9 // bit 6
4339 #define SPEN RCSTAbits.SPEN // bit 7
4341 #define SRPR SRCON0bits.SRPR // bit 0
4342 #define SRPS SRCON0bits.SRPS // bit 1
4343 #define SRNQEN SRCON0bits.SRNQEN // bit 2
4344 #define SRQEN SRCON0bits.SRQEN // bit 3
4345 #define SRCLK0 SRCON0bits.SRCLK0 // bit 4
4346 #define SRCLK1 SRCON0bits.SRCLK1 // bit 5
4347 #define SRCLK2 SRCON0bits.SRCLK2 // bit 6
4348 #define SRLEN SRCON0bits.SRLEN // bit 7
4350 #define SRRC1E SRCON1bits.SRRC1E // bit 0
4351 #define SRRC2E SRCON1bits.SRRC2E // bit 1
4352 #define SRRCKE SRCON1bits.SRRCKE // bit 2
4353 #define SRRPE SRCON1bits.SRRPE // bit 3
4354 #define SRSC1E SRCON1bits.SRSC1E // bit 4
4355 #define SRSC2E SRCON1bits.SRSC2E // bit 5
4356 #define SRSCKE SRCON1bits.SRSCKE // bit 6
4357 #define SRSPE SRCON1bits.SRSPE // bit 7
4359 #define SSPM0 SSP1CON1bits.SSPM0 // bit 0
4360 #define SSPM1 SSP1CON1bits.SSPM1 // bit 1
4361 #define SSPM2 SSP1CON1bits.SSPM2 // bit 2
4362 #define SSPM3 SSP1CON1bits.SSPM3 // bit 3
4363 #define CKP SSP1CON1bits.CKP // bit 4
4364 #define SSPEN SSP1CON1bits.SSPEN // bit 5
4365 #define SSPOV SSP1CON1bits.SSPOV // bit 6
4366 #define WCOL SSP1CON1bits.WCOL // bit 7
4368 #define SEN SSP1CON2bits.SEN // bit 0
4369 #define RSEN SSP1CON2bits.RSEN // bit 1
4370 #define PEN SSP1CON2bits.PEN // bit 2
4371 #define RCEN SSP1CON2bits.RCEN // bit 3
4372 #define ACKEN SSP1CON2bits.ACKEN // bit 4
4373 #define ACKDT SSP1CON2bits.ACKDT // bit 5
4374 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
4375 #define GCEN SSP1CON2bits.GCEN // bit 7
4377 #define DHEN SSP1CON3bits.DHEN // bit 0
4378 #define AHEN SSP1CON3bits.AHEN // bit 1
4379 #define SBCDE SSP1CON3bits.SBCDE // bit 2
4380 #define SDAHT SSP1CON3bits.SDAHT // bit 3
4381 #define BOEN SSP1CON3bits.BOEN // bit 4
4382 #define SCIE SSP1CON3bits.SCIE // bit 5
4383 #define PCIE SSP1CON3bits.PCIE // bit 6
4384 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
4386 #define BF SSP1STATbits.BF // bit 0
4387 #define UA SSP1STATbits.UA // bit 1
4388 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
4389 #define S SSP1STATbits.S // bit 3
4390 #define P SSP1STATbits.P // bit 4
4391 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
4392 #define CKE SSP1STATbits.CKE // bit 6
4393 #define SMP SSP1STATbits.SMP // bit 7
4395 #define C STATUSbits.C // bit 0
4396 #define DC STATUSbits.DC // bit 1
4397 #define Z STATUSbits.Z // bit 2
4398 #define NOT_PD STATUSbits.NOT_PD // bit 3
4399 #define NOT_TO STATUSbits.NOT_TO // bit 4
4401 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
4402 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
4403 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
4405 #define TMR1ON T1CONbits.TMR1ON // bit 0
4406 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
4407 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
4408 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
4409 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
4410 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
4411 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
4413 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
4414 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
4415 #define T1GVAL T1GCONbits.T1GVAL // bit 2
4416 #define T1GGO T1GCONbits.T1GGO // bit 3
4417 #define T1GSPM T1GCONbits.T1GSPM // bit 4
4418 #define T1GTM T1GCONbits.T1GTM // bit 5
4419 #define T1GPOL T1GCONbits.T1GPOL // bit 6
4420 #define TMR1GE T1GCONbits.TMR1GE // bit 7
4422 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
4423 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
4424 #define TMR2ON T2CONbits.TMR2ON // bit 2
4425 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
4426 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
4427 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
4428 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
4430 #define T4CKPS0 T4CONbits.T4CKPS0 // bit 0
4431 #define T4CKPS1 T4CONbits.T4CKPS1 // bit 1
4432 #define TMR4ON T4CONbits.TMR4ON // bit 2
4433 #define T4OUTPS0 T4CONbits.T4OUTPS0 // bit 3
4434 #define T4OUTPS1 T4CONbits.T4OUTPS1 // bit 4
4435 #define T4OUTPS2 T4CONbits.T4OUTPS2 // bit 5
4436 #define T4OUTPS3 T4CONbits.T4OUTPS3 // bit 6
4438 #define T6CKPS0 T6CONbits.T6CKPS0 // bit 0
4439 #define T6CKPS1 T6CONbits.T6CKPS1 // bit 1
4440 #define TMR6ON T6CONbits.TMR6ON // bit 2
4441 #define T6OUTPS0 T6CONbits.T6OUTPS0 // bit 3
4442 #define T6OUTPS1 T6CONbits.T6OUTPS1 // bit 4
4443 #define T6OUTPS2 T6CONbits.T6OUTPS2 // bit 5
4444 #define T6OUTPS3 T6CONbits.T6OUTPS3 // bit 6
4446 #define TRISA0 TRISAbits.TRISA0 // bit 0
4447 #define TRISA1 TRISAbits.TRISA1 // bit 1
4448 #define TRISA2 TRISAbits.TRISA2 // bit 2
4449 #define TRISA3 TRISAbits.TRISA3 // bit 3
4450 #define TRISA4 TRISAbits.TRISA4 // bit 4
4451 #define TRISA5 TRISAbits.TRISA5 // bit 5
4453 #define TRISB4 TRISBbits.TRISB4 // bit 4
4454 #define TRISB5 TRISBbits.TRISB5 // bit 5
4455 #define TRISB6 TRISBbits.TRISB6 // bit 6
4456 #define TRISB7 TRISBbits.TRISB7 // bit 7
4458 #define TRISC0 TRISCbits.TRISC0 // bit 0
4459 #define TRISC1 TRISCbits.TRISC1 // bit 1
4460 #define TRISC2 TRISCbits.TRISC2 // bit 2
4461 #define TRISC3 TRISCbits.TRISC3 // bit 3
4462 #define TRISC4 TRISCbits.TRISC4 // bit 4
4463 #define TRISC5 TRISCbits.TRISC5 // bit 5
4464 #define TRISC6 TRISCbits.TRISC6 // bit 6
4465 #define TRISC7 TRISCbits.TRISC7 // bit 7
4467 #define TX9D TXSTAbits.TX9D // bit 0
4468 #define TRMT TXSTAbits.TRMT // bit 1
4469 #define BRGH TXSTAbits.BRGH // bit 2
4470 #define SENDB TXSTAbits.SENDB // bit 3
4471 #define SYNC TXSTAbits.SYNC // bit 4
4472 #define TXEN TXSTAbits.TXEN // bit 5
4473 #define TX9 TXSTAbits.TX9 // bit 6
4474 #define CSRC TXSTAbits.CSRC // bit 7
4476 #define SWDTEN WDTCONbits.SWDTEN // bit 0
4477 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
4478 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
4479 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
4480 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
4481 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
4483 #define WPUA0 WPUAbits.WPUA0 // bit 0
4484 #define WPUA1 WPUAbits.WPUA1 // bit 1
4485 #define WPUA2 WPUAbits.WPUA2 // bit 2
4486 #define WPUA3 WPUAbits.WPUA3 // bit 3
4487 #define WPUA4 WPUAbits.WPUA4 // bit 4
4488 #define WPUA5 WPUAbits.WPUA5 // bit 5
4490 #define WPUB4 WPUBbits.WPUB4 // bit 4
4491 #define WPUB5 WPUBbits.WPUB5 // bit 5
4492 #define WPUB6 WPUBbits.WPUB6 // bit 6
4493 #define WPUB7 WPUBbits.WPUB7 // bit 7
4495 #define WPUC0 WPUCbits.WPUC0 // bit 0
4496 #define WPUC1 WPUCbits.WPUC1 // bit 1
4497 #define WPUC2 WPUCbits.WPUC2 // bit 2
4498 #define WPUC3 WPUCbits.WPUC3 // bit 3
4499 #define WPUC4 WPUCbits.WPUC4 // bit 4
4500 #define WPUC5 WPUCbits.WPUC5 // bit 5
4501 #define WPUC6 WPUCbits.WPUC6 // bit 6
4502 #define WPUC7 WPUCbits.WPUC7 // bit 7
4504 #endif // #ifndef NO_BIT_DEFINES
4506 #endif // #ifndef __PIC16LF1829_H__