1 /*
2  * This declarations of the PIC16LF1782 MCU.
3  *
4  * This file is part of the GNU PIC library for SDCC, originally
5  * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
6  *
7  * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:17 UTC.
8  *
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.
12  *
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.
21  *
22  * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
23  */
24 
25 #ifndef __PIC16LF1782_H__
26 #define __PIC16LF1782_H__
27 
28 //==============================================================================
29 //
30 //	Register Addresses
31 //
32 //==============================================================================
33 
34 #ifndef NO_ADDR_DEFINES
35 
36 #define INDF0_ADDR              0x0000
37 #define INDF1_ADDR              0x0001
38 #define PCL_ADDR                0x0002
39 #define STATUS_ADDR             0x0003
40 #define FSR0_ADDR               0x0004
41 #define FSR0L_ADDR              0x0004
42 #define FSR0H_ADDR              0x0005
43 #define FSR1_ADDR               0x0006
44 #define FSR1L_ADDR              0x0006
45 #define FSR1H_ADDR              0x0007
46 #define BSR_ADDR                0x0008
47 #define WREG_ADDR               0x0009
48 #define PCLATH_ADDR             0x000A
49 #define INTCON_ADDR             0x000B
50 #define PORTA_ADDR              0x000C
51 #define PORTB_ADDR              0x000D
52 #define PORTC_ADDR              0x000E
53 #define PORTE_ADDR              0x0010
54 #define PIR1_ADDR               0x0011
55 #define PIR2_ADDR               0x0012
56 #define 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 TRISA_ADDR              0x008C
67 #define TRISB_ADDR              0x008D
68 #define TRISC_ADDR              0x008E
69 #define TRISE_ADDR              0x0090
70 #define PIE1_ADDR               0x0091
71 #define PIE2_ADDR               0x0092
72 #define PIE4_ADDR               0x0094
73 #define OPTION_REG_ADDR         0x0095
74 #define PCON_ADDR               0x0096
75 #define WDTCON_ADDR             0x0097
76 #define OSCTUNE_ADDR            0x0098
77 #define OSCCON_ADDR             0x0099
78 #define OSCSTAT_ADDR            0x009A
79 #define ADRES_ADDR              0x009B
80 #define ADRESL_ADDR             0x009B
81 #define ADRESH_ADDR             0x009C
82 #define ADCON0_ADDR             0x009D
83 #define ADCON1_ADDR             0x009E
84 #define ADCON2_ADDR             0x009F
85 #define LATA_ADDR               0x010C
86 #define LATB_ADDR               0x010D
87 #define LATC_ADDR               0x010E
88 #define CM1CON0_ADDR            0x0111
89 #define CM1CON1_ADDR            0x0112
90 #define CM2CON0_ADDR            0x0113
91 #define CM2CON1_ADDR            0x0114
92 #define CMOUT_ADDR              0x0115
93 #define BORCON_ADDR             0x0116
94 #define FVRCON_ADDR             0x0117
95 #define DACCON0_ADDR            0x0118
96 #define DACCON1_ADDR            0x0119
97 #define APFCON_ADDR             0x011D
98 #define APFCON0_ADDR            0x011D
99 #define CM3CON0_ADDR            0x011E
100 #define CM3CON1_ADDR            0x011F
101 #define ANSELA_ADDR             0x018C
102 #define ANSELB_ADDR             0x018D
103 #define EEADR_ADDR              0x0191
104 #define EEADRL_ADDR             0x0191
105 #define EEADRH_ADDR             0x0192
106 #define EEDAT_ADDR              0x0193
107 #define EEDATL_ADDR             0x0193
108 #define EEDATH_ADDR             0x0194
109 #define EECON1_ADDR             0x0195
110 #define EECON2_ADDR             0x0196
111 #define RC1REG_ADDR             0x0199
112 #define RCREG_ADDR              0x0199
113 #define RCREG1_ADDR             0x0199
114 #define TX1REG_ADDR             0x019A
115 #define TXREG_ADDR              0x019A
116 #define TXREG1_ADDR             0x019A
117 #define SP1BRG_ADDR             0x019B
118 #define SP1BRGL_ADDR            0x019B
119 #define SPBRG_ADDR              0x019B
120 #define SPBRG1_ADDR             0x019B
121 #define SPBRGL_ADDR             0x019B
122 #define SP1BRGH_ADDR            0x019C
123 #define SPBRGH_ADDR             0x019C
124 #define SPBRGH1_ADDR            0x019C
125 #define RC1STA_ADDR             0x019D
126 #define RCSTA_ADDR              0x019D
127 #define RCSTA1_ADDR             0x019D
128 #define TX1STA_ADDR             0x019E
129 #define TXSTA_ADDR              0x019E
130 #define TXSTA1_ADDR             0x019E
131 #define BAUD1CON_ADDR           0x019F
132 #define BAUDCON_ADDR            0x019F
133 #define BAUDCON1_ADDR           0x019F
134 #define BAUDCTL_ADDR            0x019F
135 #define BAUDCTL1_ADDR           0x019F
136 #define WPUA_ADDR               0x020C
137 #define WPUB_ADDR               0x020D
138 #define WPUC_ADDR               0x020E
139 #define WPUE_ADDR               0x0210
140 #define SSP1BUF_ADDR            0x0211
141 #define SSPBUF_ADDR             0x0211
142 #define SSP1ADD_ADDR            0x0212
143 #define SSPADD_ADDR             0x0212
144 #define SSP1MSK_ADDR            0x0213
145 #define SSPMSK_ADDR             0x0213
146 #define SSP1STAT_ADDR           0x0214
147 #define SSPSTAT_ADDR            0x0214
148 #define SSP1CON_ADDR            0x0215
149 #define SSPCON_ADDR             0x0215
150 #define SSPCON1_ADDR            0x0215
151 #define SSP1CON2_ADDR           0x0216
152 #define SSPCON2_ADDR            0x0216
153 #define SSP1CON3_ADDR           0x0217
154 #define SSPCON3_ADDR            0x0217
155 #define ODCONA_ADDR             0x028C
156 #define ODCONB_ADDR             0x028D
157 #define ODCONC_ADDR             0x028E
158 #define CCPR1_ADDR              0x0291
159 #define CCPR1L_ADDR             0x0291
160 #define CCPR1H_ADDR             0x0292
161 #define CCP1CON_ADDR            0x0293
162 #define CCPR2_ADDR              0x0298
163 #define CCPR2L_ADDR             0x0298
164 #define CCPR2H_ADDR             0x0299
165 #define CCP2CON_ADDR            0x029A
166 #define SLRCONA_ADDR            0x030C
167 #define SLRCONB_ADDR            0x030D
168 #define SLRCONC_ADDR            0x030E
169 #define INLVLA_ADDR             0x038C
170 #define INLVLB_ADDR             0x038D
171 #define INLVLC_ADDR             0x038E
172 #define INLVLE_ADDR             0x0390
173 #define IOCAP_ADDR              0x0391
174 #define IOCAN_ADDR              0x0392
175 #define IOCAF_ADDR              0x0393
176 #define IOCBP_ADDR              0x0394
177 #define IOCBN_ADDR              0x0395
178 #define IOCBF_ADDR              0x0396
179 #define IOCCP_ADDR              0x0397
180 #define IOCCN_ADDR              0x0398
181 #define IOCCF_ADDR              0x0399
182 #define IOCEP_ADDR              0x039D
183 #define IOCEN_ADDR              0x039E
184 #define IOCEF_ADDR              0x039F
185 #define OPA1CON_ADDR            0x0511
186 #define OPA2CON_ADDR            0x0513
187 #define CLKRCON_ADDR            0x051A
188 #define PSMC1CON_ADDR           0x0811
189 #define PSMC1MDL_ADDR           0x0812
190 #define PSMC1SYNC_ADDR          0x0813
191 #define PSMC1CLK_ADDR           0x0814
192 #define PSMC1OEN_ADDR           0x0815
193 #define PSMC1POL_ADDR           0x0816
194 #define PSMC1BLNK_ADDR          0x0817
195 #define PSMC1REBS_ADDR          0x0818
196 #define PSMC1FEBS_ADDR          0x0819
197 #define PSMC1PHS_ADDR           0x081A
198 #define PSMC1DCS_ADDR           0x081B
199 #define PSMC1PRS_ADDR           0x081C
200 #define PSMC1ASDC_ADDR          0x081D
201 #define PSMC1ASDL_ADDR          0x081E
202 #define PSMC1ASDS_ADDR          0x081F
203 #define PSMC1INT_ADDR           0x0820
204 #define PSMC1PH_ADDR            0x0821
205 #define PSMC1PHL_ADDR           0x0821
206 #define PSMC1PHH_ADDR           0x0822
207 #define PSMC1DC_ADDR            0x0823
208 #define PSMC1DCL_ADDR           0x0823
209 #define PSMC1DCH_ADDR           0x0824
210 #define PSMC1PR_ADDR            0x0825
211 #define PSMC1PRL_ADDR           0x0825
212 #define PSMC1PRH_ADDR           0x0826
213 #define PSMC1TMR_ADDR           0x0827
214 #define PSMC1TMRL_ADDR          0x0827
215 #define PSMC1TMRH_ADDR          0x0828
216 #define PSMC1DBR_ADDR           0x0829
217 #define PSMC1DBF_ADDR           0x082A
218 #define PSMC1BLKR_ADDR          0x082B
219 #define PSMC1BLKF_ADDR          0x082C
220 #define PSMC1FFA_ADDR           0x082D
221 #define PSMC1STR0_ADDR          0x082E
222 #define PSMC1STR1_ADDR          0x082F
223 #define PSMC2CON_ADDR           0x0831
224 #define PSMC2MDL_ADDR           0x0832
225 #define PSMC2SYNC_ADDR          0x0833
226 #define PSMC2CLK_ADDR           0x0834
227 #define PSMC2OEN_ADDR           0x0835
228 #define PSMC2POL_ADDR           0x0836
229 #define PSMC2BLNK_ADDR          0x0837
230 #define PSMC2REBS_ADDR          0x0838
231 #define PSMC2FEBS_ADDR          0x0839
232 #define PSMC2PHS_ADDR           0x083A
233 #define PSMC2DCS_ADDR           0x083B
234 #define PSMC2PRS_ADDR           0x083C
235 #define PSMC2ASDC_ADDR          0x083D
236 #define PSMC2ASDL_ADDR          0x083E
237 #define PSMC2ASDS_ADDR          0x083F
238 #define PSMC2INT_ADDR           0x0840
239 #define PSMC2PH_ADDR            0x0841
240 #define PSMC2PHL_ADDR           0x0841
241 #define PSMC2PHH_ADDR           0x0842
242 #define PSMC2DC_ADDR            0x0843
243 #define PSMC2DCL_ADDR           0x0843
244 #define PSMC2DCH_ADDR           0x0844
245 #define PSMC2PR_ADDR            0x0845
246 #define PSMC2PRL_ADDR           0x0845
247 #define PSMC2PRH_ADDR           0x0846
248 #define PSMC2TMR_ADDR           0x0847
249 #define PSMC2TMRL_ADDR          0x0847
250 #define PSMC2TMRH_ADDR          0x0848
251 #define PSMC2DBR_ADDR           0x0849
252 #define PSMC2DBF_ADDR           0x084A
253 #define PSMC2BLKR_ADDR          0x084B
254 #define PSMC2BLKF_ADDR          0x084C
255 #define PSMC2FFA_ADDR           0x084D
256 #define PSMC2STR0_ADDR          0x084E
257 #define PSMC2STR1_ADDR          0x084F
258 #define STATUS_SHAD_ADDR        0x0FE4
259 #define WREG_SHAD_ADDR          0x0FE5
260 #define BSR_SHAD_ADDR           0x0FE6
261 #define PCLATH_SHAD_ADDR        0x0FE7
262 #define FSR0L_SHAD_ADDR         0x0FE8
263 #define FSR0H_SHAD_ADDR         0x0FE9
264 #define FSR1L_SHAD_ADDR         0x0FEA
265 #define FSR1H_SHAD_ADDR         0x0FEB
266 #define STKPTR_ADDR             0x0FED
267 #define TOSL_ADDR               0x0FEE
268 #define TOSH_ADDR               0x0FEF
269 
270 #endif // #ifndef NO_ADDR_DEFINES
271 
272 //==============================================================================
273 //
274 //	Register Definitions
275 //
276 //==============================================================================
277 
278 extern __at(0x0000) __sfr INDF0;
279 extern __at(0x0001) __sfr INDF1;
280 extern __at(0x0002) __sfr PCL;
281 
282 //==============================================================================
283 //        STATUS Bits
284 
285 extern __at(0x0003) __sfr STATUS;
286 
287 typedef struct
288   {
289   unsigned C                    : 1;
290   unsigned DC                   : 1;
291   unsigned Z                    : 1;
292   unsigned NOT_PD               : 1;
293   unsigned NOT_TO               : 1;
294   unsigned                      : 1;
295   unsigned                      : 1;
296   unsigned                      : 1;
297   } __STATUSbits_t;
298 
299 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
300 
301 #define _C                      0x01
302 #define _DC                     0x02
303 #define _Z                      0x04
304 #define _NOT_PD                 0x08
305 #define _NOT_TO                 0x10
306 
307 //==============================================================================
308 
309 extern __at(0x0004) __sfr FSR0;
310 extern __at(0x0004) __sfr FSR0L;
311 extern __at(0x0005) __sfr FSR0H;
312 extern __at(0x0006) __sfr FSR1;
313 extern __at(0x0006) __sfr FSR1L;
314 extern __at(0x0007) __sfr FSR1H;
315 
316 //==============================================================================
317 //        BSR Bits
318 
319 extern __at(0x0008) __sfr BSR;
320 
321 typedef union
322   {
323   struct
324     {
325     unsigned BSR0               : 1;
326     unsigned BSR1               : 1;
327     unsigned BSR2               : 1;
328     unsigned BSR3               : 1;
329     unsigned BSR4               : 1;
330     unsigned                    : 1;
331     unsigned                    : 1;
332     unsigned                    : 1;
333     };
334 
335   struct
336     {
337     unsigned BSR                : 5;
338     unsigned                    : 3;
339     };
340   } __BSRbits_t;
341 
342 extern __at(0x0008) volatile __BSRbits_t BSRbits;
343 
344 #define _BSR0                   0x01
345 #define _BSR1                   0x02
346 #define _BSR2                   0x04
347 #define _BSR3                   0x08
348 #define _BSR4                   0x10
349 
350 //==============================================================================
351 
352 extern __at(0x0009) __sfr WREG;
353 extern __at(0x000A) __sfr PCLATH;
354 
355 //==============================================================================
356 //        INTCON Bits
357 
358 extern __at(0x000B) __sfr INTCON;
359 
360 typedef union
361   {
362   struct
363     {
364     unsigned IOCIF              : 1;
365     unsigned INTF               : 1;
366     unsigned TMR0IF             : 1;
367     unsigned IOCIE              : 1;
368     unsigned INTE               : 1;
369     unsigned TMR0IE             : 1;
370     unsigned PEIE               : 1;
371     unsigned GIE                : 1;
372     };
373 
374   struct
375     {
376     unsigned                    : 1;
377     unsigned                    : 1;
378     unsigned T0IF               : 1;
379     unsigned                    : 1;
380     unsigned                    : 1;
381     unsigned T0IE               : 1;
382     unsigned                    : 1;
383     unsigned                    : 1;
384     };
385   } __INTCONbits_t;
386 
387 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
388 
389 #define _IOCIF                  0x01
390 #define _INTF                   0x02
391 #define _TMR0IF                 0x04
392 #define _T0IF                   0x04
393 #define _IOCIE                  0x08
394 #define _INTE                   0x10
395 #define _TMR0IE                 0x20
396 #define _T0IE                   0x20
397 #define _PEIE                   0x40
398 #define _GIE                    0x80
399 
400 //==============================================================================
401 
402 
403 //==============================================================================
404 //        PORTA Bits
405 
406 extern __at(0x000C) __sfr PORTA;
407 
408 typedef struct
409   {
410   unsigned RA0                  : 1;
411   unsigned RA1                  : 1;
412   unsigned RA2                  : 1;
413   unsigned RA3                  : 1;
414   unsigned RA4                  : 1;
415   unsigned RA5                  : 1;
416   unsigned RA6                  : 1;
417   unsigned RA7                  : 1;
418   } __PORTAbits_t;
419 
420 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
421 
422 #define _RA0                    0x01
423 #define _RA1                    0x02
424 #define _RA2                    0x04
425 #define _RA3                    0x08
426 #define _RA4                    0x10
427 #define _RA5                    0x20
428 #define _RA6                    0x40
429 #define _RA7                    0x80
430 
431 //==============================================================================
432 
433 
434 //==============================================================================
435 //        PORTB Bits
436 
437 extern __at(0x000D) __sfr PORTB;
438 
439 typedef struct
440   {
441   unsigned RB0                  : 1;
442   unsigned RB1                  : 1;
443   unsigned RB2                  : 1;
444   unsigned RB3                  : 1;
445   unsigned RB4                  : 1;
446   unsigned RB5                  : 1;
447   unsigned RB6                  : 1;
448   unsigned RB7                  : 1;
449   } __PORTBbits_t;
450 
451 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
452 
453 #define _RB0                    0x01
454 #define _RB1                    0x02
455 #define _RB2                    0x04
456 #define _RB3                    0x08
457 #define _RB4                    0x10
458 #define _RB5                    0x20
459 #define _RB6                    0x40
460 #define _RB7                    0x80
461 
462 //==============================================================================
463 
464 
465 //==============================================================================
466 //        PORTC Bits
467 
468 extern __at(0x000E) __sfr PORTC;
469 
470 typedef struct
471   {
472   unsigned RC0                  : 1;
473   unsigned RC1                  : 1;
474   unsigned RC2                  : 1;
475   unsigned RC3                  : 1;
476   unsigned RC4                  : 1;
477   unsigned RC5                  : 1;
478   unsigned RC6                  : 1;
479   unsigned RC7                  : 1;
480   } __PORTCbits_t;
481 
482 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
483 
484 #define _RC0                    0x01
485 #define _RC1                    0x02
486 #define _RC2                    0x04
487 #define _RC3                    0x08
488 #define _RC4                    0x10
489 #define _RC5                    0x20
490 #define _RC6                    0x40
491 #define _RC7                    0x80
492 
493 //==============================================================================
494 
495 
496 //==============================================================================
497 //        PORTE Bits
498 
499 extern __at(0x0010) __sfr PORTE;
500 
501 typedef struct
502   {
503   unsigned                      : 1;
504   unsigned                      : 1;
505   unsigned                      : 1;
506   unsigned RE3                  : 1;
507   unsigned                      : 1;
508   unsigned                      : 1;
509   unsigned                      : 1;
510   unsigned                      : 1;
511   } __PORTEbits_t;
512 
513 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
514 
515 #define _RE3                    0x08
516 
517 //==============================================================================
518 
519 
520 //==============================================================================
521 //        PIR1 Bits
522 
523 extern __at(0x0011) __sfr PIR1;
524 
525 typedef struct
526   {
527   unsigned TMR1IF               : 1;
528   unsigned TMR2IF               : 1;
529   unsigned CCP1IF               : 1;
530   unsigned SSP1IF               : 1;
531   unsigned TXIF                 : 1;
532   unsigned RCIF                 : 1;
533   unsigned ADIF                 : 1;
534   unsigned TMR1GIF              : 1;
535   } __PIR1bits_t;
536 
537 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
538 
539 #define _TMR1IF                 0x01
540 #define _TMR2IF                 0x02
541 #define _CCP1IF                 0x04
542 #define _SSP1IF                 0x08
543 #define _TXIF                   0x10
544 #define _RCIF                   0x20
545 #define _ADIF                   0x40
546 #define _TMR1GIF                0x80
547 
548 //==============================================================================
549 
550 
551 //==============================================================================
552 //        PIR2 Bits
553 
554 extern __at(0x0012) __sfr PIR2;
555 
556 typedef struct
557   {
558   unsigned CCP2IF               : 1;
559   unsigned C3IF                 : 1;
560   unsigned                      : 1;
561   unsigned BCL1IF               : 1;
562   unsigned EEIF                 : 1;
563   unsigned C1IF                 : 1;
564   unsigned C2IF                 : 1;
565   unsigned OSFIF                : 1;
566   } __PIR2bits_t;
567 
568 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
569 
570 #define _CCP2IF                 0x01
571 #define _C3IF                   0x02
572 #define _BCL1IF                 0x08
573 #define _EEIF                   0x10
574 #define _C1IF                   0x20
575 #define _C2IF                   0x40
576 #define _OSFIF                  0x80
577 
578 //==============================================================================
579 
580 
581 //==============================================================================
582 //        PIR4 Bits
583 
584 extern __at(0x0014) __sfr PIR4;
585 
586 typedef struct
587   {
588   unsigned PSMC1SIF             : 1;
589   unsigned PSMC2SIF             : 1;
590   unsigned                      : 1;
591   unsigned                      : 1;
592   unsigned PSMC1TIF             : 1;
593   unsigned PSMC2TIF             : 1;
594   unsigned                      : 1;
595   unsigned                      : 1;
596   } __PIR4bits_t;
597 
598 extern __at(0x0014) volatile __PIR4bits_t PIR4bits;
599 
600 #define _PSMC1SIF               0x01
601 #define _PSMC2SIF               0x02
602 #define _PSMC1TIF               0x10
603 #define _PSMC2TIF               0x20
604 
605 //==============================================================================
606 
607 extern __at(0x0015) __sfr TMR0;
608 extern __at(0x0016) __sfr TMR1;
609 extern __at(0x0016) __sfr TMR1L;
610 extern __at(0x0017) __sfr TMR1H;
611 
612 //==============================================================================
613 //        T1CON Bits
614 
615 extern __at(0x0018) __sfr T1CON;
616 
617 typedef union
618   {
619   struct
620     {
621     unsigned TMR1ON             : 1;
622     unsigned                    : 1;
623     unsigned NOT_T1SYNC         : 1;
624     unsigned T1OSCEN            : 1;
625     unsigned T1CKPS0            : 1;
626     unsigned T1CKPS1            : 1;
627     unsigned TMR1CS0            : 1;
628     unsigned TMR1CS1            : 1;
629     };
630 
631   struct
632     {
633     unsigned                    : 4;
634     unsigned T1CKPS             : 2;
635     unsigned                    : 2;
636     };
637 
638   struct
639     {
640     unsigned                    : 6;
641     unsigned TMR1CS             : 2;
642     };
643   } __T1CONbits_t;
644 
645 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
646 
647 #define _TMR1ON                 0x01
648 #define _NOT_T1SYNC             0x04
649 #define _T1OSCEN                0x08
650 #define _T1CKPS0                0x10
651 #define _T1CKPS1                0x20
652 #define _TMR1CS0                0x40
653 #define _TMR1CS1                0x80
654 
655 //==============================================================================
656 
657 
658 //==============================================================================
659 //        T1GCON Bits
660 
661 extern __at(0x0019) __sfr T1GCON;
662 
663 typedef union
664   {
665   struct
666     {
667     unsigned T1GSS0             : 1;
668     unsigned T1GSS1             : 1;
669     unsigned T1GVAL             : 1;
670     unsigned T1GGO              : 1;
671     unsigned T1GSPM             : 1;
672     unsigned T1GTM              : 1;
673     unsigned T1GPOL             : 1;
674     unsigned TMR1GE             : 1;
675     };
676 
677   struct
678     {
679     unsigned T1GSS              : 2;
680     unsigned                    : 6;
681     };
682   } __T1GCONbits_t;
683 
684 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
685 
686 #define _T1GSS0                 0x01
687 #define _T1GSS1                 0x02
688 #define _T1GVAL                 0x04
689 #define _T1GGO                  0x08
690 #define _T1GSPM                 0x10
691 #define _T1GTM                  0x20
692 #define _T1GPOL                 0x40
693 #define _TMR1GE                 0x80
694 
695 //==============================================================================
696 
697 extern __at(0x001A) __sfr TMR2;
698 extern __at(0x001B) __sfr PR2;
699 
700 //==============================================================================
701 //        T2CON Bits
702 
703 extern __at(0x001C) __sfr T2CON;
704 
705 typedef union
706   {
707   struct
708     {
709     unsigned T2CKPS0            : 1;
710     unsigned T2CKPS1            : 1;
711     unsigned TMR2ON             : 1;
712     unsigned T2OUTPS0           : 1;
713     unsigned T2OUTPS1           : 1;
714     unsigned T2OUTPS2           : 1;
715     unsigned T2OUTPS3           : 1;
716     unsigned                    : 1;
717     };
718 
719   struct
720     {
721     unsigned T2CKPS             : 2;
722     unsigned                    : 6;
723     };
724 
725   struct
726     {
727     unsigned                    : 3;
728     unsigned T2OUTPS            : 4;
729     unsigned                    : 1;
730     };
731   } __T2CONbits_t;
732 
733 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
734 
735 #define _T2CKPS0                0x01
736 #define _T2CKPS1                0x02
737 #define _TMR2ON                 0x04
738 #define _T2OUTPS0               0x08
739 #define _T2OUTPS1               0x10
740 #define _T2OUTPS2               0x20
741 #define _T2OUTPS3               0x40
742 
743 //==============================================================================
744 
745 
746 //==============================================================================
747 //        TRISA Bits
748 
749 extern __at(0x008C) __sfr TRISA;
750 
751 typedef struct
752   {
753   unsigned TRISA0               : 1;
754   unsigned TRISA1               : 1;
755   unsigned TRISA2               : 1;
756   unsigned TRISA3               : 1;
757   unsigned TRISA4               : 1;
758   unsigned TRISA5               : 1;
759   unsigned TRISA6               : 1;
760   unsigned TRISA7               : 1;
761   } __TRISAbits_t;
762 
763 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
764 
765 #define _TRISA0                 0x01
766 #define _TRISA1                 0x02
767 #define _TRISA2                 0x04
768 #define _TRISA3                 0x08
769 #define _TRISA4                 0x10
770 #define _TRISA5                 0x20
771 #define _TRISA6                 0x40
772 #define _TRISA7                 0x80
773 
774 //==============================================================================
775 
776 
777 //==============================================================================
778 //        TRISB Bits
779 
780 extern __at(0x008D) __sfr TRISB;
781 
782 typedef struct
783   {
784   unsigned TRISB0               : 1;
785   unsigned TRISB1               : 1;
786   unsigned TRISB2               : 1;
787   unsigned TRISB3               : 1;
788   unsigned TRISB4               : 1;
789   unsigned TRISB5               : 1;
790   unsigned TRISB6               : 1;
791   unsigned TRISB7               : 1;
792   } __TRISBbits_t;
793 
794 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
795 
796 #define _TRISB0                 0x01
797 #define _TRISB1                 0x02
798 #define _TRISB2                 0x04
799 #define _TRISB3                 0x08
800 #define _TRISB4                 0x10
801 #define _TRISB5                 0x20
802 #define _TRISB6                 0x40
803 #define _TRISB7                 0x80
804 
805 //==============================================================================
806 
807 
808 //==============================================================================
809 //        TRISC Bits
810 
811 extern __at(0x008E) __sfr TRISC;
812 
813 typedef struct
814   {
815   unsigned TRISC0               : 1;
816   unsigned TRISC1               : 1;
817   unsigned TRISC2               : 1;
818   unsigned TRISC3               : 1;
819   unsigned TRISC4               : 1;
820   unsigned TRISC5               : 1;
821   unsigned TRISC6               : 1;
822   unsigned TRISC7               : 1;
823   } __TRISCbits_t;
824 
825 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
826 
827 #define _TRISC0                 0x01
828 #define _TRISC1                 0x02
829 #define _TRISC2                 0x04
830 #define _TRISC3                 0x08
831 #define _TRISC4                 0x10
832 #define _TRISC5                 0x20
833 #define _TRISC6                 0x40
834 #define _TRISC7                 0x80
835 
836 //==============================================================================
837 
838 
839 //==============================================================================
840 //        TRISE Bits
841 
842 extern __at(0x0090) __sfr TRISE;
843 
844 typedef struct
845   {
846   unsigned                      : 1;
847   unsigned                      : 1;
848   unsigned                      : 1;
849   unsigned TRISE3               : 1;
850   unsigned                      : 1;
851   unsigned                      : 1;
852   unsigned                      : 1;
853   unsigned                      : 1;
854   } __TRISEbits_t;
855 
856 extern __at(0x0090) volatile __TRISEbits_t TRISEbits;
857 
858 #define _TRISE3                 0x08
859 
860 //==============================================================================
861 
862 
863 //==============================================================================
864 //        PIE1 Bits
865 
866 extern __at(0x0091) __sfr PIE1;
867 
868 typedef struct
869   {
870   unsigned TMR1IE               : 1;
871   unsigned TMR2IE               : 1;
872   unsigned CCP1IE               : 1;
873   unsigned SSP1IE               : 1;
874   unsigned TXIE                 : 1;
875   unsigned RCIE                 : 1;
876   unsigned ADIE                 : 1;
877   unsigned TMR1GIE              : 1;
878   } __PIE1bits_t;
879 
880 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
881 
882 #define _TMR1IE                 0x01
883 #define _TMR2IE                 0x02
884 #define _CCP1IE                 0x04
885 #define _SSP1IE                 0x08
886 #define _TXIE                   0x10
887 #define _RCIE                   0x20
888 #define _ADIE                   0x40
889 #define _TMR1GIE                0x80
890 
891 //==============================================================================
892 
893 
894 //==============================================================================
895 //        PIE2 Bits
896 
897 extern __at(0x0092) __sfr PIE2;
898 
899 typedef struct
900   {
901   unsigned CCP2IE               : 1;
902   unsigned C3IE                 : 1;
903   unsigned                      : 1;
904   unsigned BCL1IE               : 1;
905   unsigned EEIE                 : 1;
906   unsigned C1IE                 : 1;
907   unsigned C2IE                 : 1;
908   unsigned OSFIE                : 1;
909   } __PIE2bits_t;
910 
911 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
912 
913 #define _CCP2IE                 0x01
914 #define _C3IE                   0x02
915 #define _BCL1IE                 0x08
916 #define _EEIE                   0x10
917 #define _C1IE                   0x20
918 #define _C2IE                   0x40
919 #define _OSFIE                  0x80
920 
921 //==============================================================================
922 
923 
924 //==============================================================================
925 //        PIE4 Bits
926 
927 extern __at(0x0094) __sfr PIE4;
928 
929 typedef struct
930   {
931   unsigned PSMC1SIE             : 1;
932   unsigned PSMC2SIE             : 1;
933   unsigned                      : 1;
934   unsigned                      : 1;
935   unsigned PSMC1TIE             : 1;
936   unsigned PSMC2TIE             : 1;
937   unsigned                      : 1;
938   unsigned                      : 1;
939   } __PIE4bits_t;
940 
941 extern __at(0x0094) volatile __PIE4bits_t PIE4bits;
942 
943 #define _PSMC1SIE               0x01
944 #define _PSMC2SIE               0x02
945 #define _PSMC1TIE               0x10
946 #define _PSMC2TIE               0x20
947 
948 //==============================================================================
949 
950 
951 //==============================================================================
952 //        OPTION_REG Bits
953 
954 extern __at(0x0095) __sfr OPTION_REG;
955 
956 typedef union
957   {
958   struct
959     {
960     unsigned PS0                : 1;
961     unsigned PS1                : 1;
962     unsigned PS2                : 1;
963     unsigned PSA                : 1;
964     unsigned TMR0SE             : 1;
965     unsigned TMR0CS             : 1;
966     unsigned INTEDG             : 1;
967     unsigned NOT_WPUEN          : 1;
968     };
969 
970   struct
971     {
972     unsigned                    : 1;
973     unsigned                    : 1;
974     unsigned                    : 1;
975     unsigned                    : 1;
976     unsigned T0SE               : 1;
977     unsigned T0CS               : 1;
978     unsigned                    : 1;
979     unsigned                    : 1;
980     };
981 
982   struct
983     {
984     unsigned PS                 : 3;
985     unsigned                    : 5;
986     };
987   } __OPTION_REGbits_t;
988 
989 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
990 
991 #define _PS0                    0x01
992 #define _PS1                    0x02
993 #define _PS2                    0x04
994 #define _PSA                    0x08
995 #define _TMR0SE                 0x10
996 #define _T0SE                   0x10
997 #define _TMR0CS                 0x20
998 #define _T0CS                   0x20
999 #define _INTEDG                 0x40
1000 #define _NOT_WPUEN              0x80
1001 
1002 //==============================================================================
1003 
1004 
1005 //==============================================================================
1006 //        PCON Bits
1007 
1008 extern __at(0x0096) __sfr PCON;
1009 
1010 typedef struct
1011   {
1012   unsigned NOT_BOR              : 1;
1013   unsigned NOT_POR              : 1;
1014   unsigned NOT_RI               : 1;
1015   unsigned NOT_RMCLR            : 1;
1016   unsigned NOT_RWDT             : 1;
1017   unsigned                      : 1;
1018   unsigned STKUNF               : 1;
1019   unsigned STKOVF               : 1;
1020   } __PCONbits_t;
1021 
1022 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1023 
1024 #define _NOT_BOR                0x01
1025 #define _NOT_POR                0x02
1026 #define _NOT_RI                 0x04
1027 #define _NOT_RMCLR              0x08
1028 #define _NOT_RWDT               0x10
1029 #define _STKUNF                 0x40
1030 #define _STKOVF                 0x80
1031 
1032 //==============================================================================
1033 
1034 
1035 //==============================================================================
1036 //        WDTCON Bits
1037 
1038 extern __at(0x0097) __sfr WDTCON;
1039 
1040 typedef union
1041   {
1042   struct
1043     {
1044     unsigned SWDTEN             : 1;
1045     unsigned WDTPS0             : 1;
1046     unsigned WDTPS1             : 1;
1047     unsigned WDTPS2             : 1;
1048     unsigned WDTPS3             : 1;
1049     unsigned WDTPS4             : 1;
1050     unsigned                    : 1;
1051     unsigned                    : 1;
1052     };
1053 
1054   struct
1055     {
1056     unsigned                    : 1;
1057     unsigned WDTPS              : 5;
1058     unsigned                    : 2;
1059     };
1060   } __WDTCONbits_t;
1061 
1062 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1063 
1064 #define _SWDTEN                 0x01
1065 #define _WDTPS0                 0x02
1066 #define _WDTPS1                 0x04
1067 #define _WDTPS2                 0x08
1068 #define _WDTPS3                 0x10
1069 #define _WDTPS4                 0x20
1070 
1071 //==============================================================================
1072 
1073 
1074 //==============================================================================
1075 //        OSCTUNE Bits
1076 
1077 extern __at(0x0098) __sfr OSCTUNE;
1078 
1079 typedef union
1080   {
1081   struct
1082     {
1083     unsigned TUN0               : 1;
1084     unsigned TUN1               : 1;
1085     unsigned TUN2               : 1;
1086     unsigned TUN3               : 1;
1087     unsigned TUN4               : 1;
1088     unsigned TUN5               : 1;
1089     unsigned                    : 1;
1090     unsigned                    : 1;
1091     };
1092 
1093   struct
1094     {
1095     unsigned TUN                : 6;
1096     unsigned                    : 2;
1097     };
1098   } __OSCTUNEbits_t;
1099 
1100 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1101 
1102 #define _TUN0                   0x01
1103 #define _TUN1                   0x02
1104 #define _TUN2                   0x04
1105 #define _TUN3                   0x08
1106 #define _TUN4                   0x10
1107 #define _TUN5                   0x20
1108 
1109 //==============================================================================
1110 
1111 
1112 //==============================================================================
1113 //        OSCCON Bits
1114 
1115 extern __at(0x0099) __sfr OSCCON;
1116 
1117 typedef union
1118   {
1119   struct
1120     {
1121     unsigned SCS0               : 1;
1122     unsigned SCS1               : 1;
1123     unsigned                    : 1;
1124     unsigned IRCF0              : 1;
1125     unsigned IRCF1              : 1;
1126     unsigned IRCF2              : 1;
1127     unsigned IRCF3              : 1;
1128     unsigned SPLLEN             : 1;
1129     };
1130 
1131   struct
1132     {
1133     unsigned SCS                : 2;
1134     unsigned                    : 6;
1135     };
1136 
1137   struct
1138     {
1139     unsigned                    : 3;
1140     unsigned IRCF               : 4;
1141     unsigned                    : 1;
1142     };
1143   } __OSCCONbits_t;
1144 
1145 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1146 
1147 #define _SCS0                   0x01
1148 #define _SCS1                   0x02
1149 #define _IRCF0                  0x08
1150 #define _IRCF1                  0x10
1151 #define _IRCF2                  0x20
1152 #define _IRCF3                  0x40
1153 #define _SPLLEN                 0x80
1154 
1155 //==============================================================================
1156 
1157 
1158 //==============================================================================
1159 //        OSCSTAT Bits
1160 
1161 extern __at(0x009A) __sfr OSCSTAT;
1162 
1163 typedef struct
1164   {
1165   unsigned HFIOFS               : 1;
1166   unsigned LFIOFR               : 1;
1167   unsigned MFIOFR               : 1;
1168   unsigned HFIOFL               : 1;
1169   unsigned HFIOFR               : 1;
1170   unsigned OSTS                 : 1;
1171   unsigned PLLR                 : 1;
1172   unsigned T1OSCR               : 1;
1173   } __OSCSTATbits_t;
1174 
1175 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1176 
1177 #define _HFIOFS                 0x01
1178 #define _LFIOFR                 0x02
1179 #define _MFIOFR                 0x04
1180 #define _HFIOFL                 0x08
1181 #define _HFIOFR                 0x10
1182 #define _OSTS                   0x20
1183 #define _PLLR                   0x40
1184 #define _T1OSCR                 0x80
1185 
1186 //==============================================================================
1187 
1188 extern __at(0x009B) __sfr ADRES;
1189 extern __at(0x009B) __sfr ADRESL;
1190 extern __at(0x009C) __sfr ADRESH;
1191 
1192 //==============================================================================
1193 //        ADCON0 Bits
1194 
1195 extern __at(0x009D) __sfr ADCON0;
1196 
1197 typedef union
1198   {
1199   struct
1200     {
1201     unsigned ADON               : 1;
1202     unsigned GO_NOT_DONE        : 1;
1203     unsigned CHS0               : 1;
1204     unsigned CHS1               : 1;
1205     unsigned CHS2               : 1;
1206     unsigned CHS3               : 1;
1207     unsigned CHS4               : 1;
1208     unsigned ADRMD              : 1;
1209     };
1210 
1211   struct
1212     {
1213     unsigned                    : 1;
1214     unsigned ADGO               : 1;
1215     unsigned                    : 1;
1216     unsigned                    : 1;
1217     unsigned                    : 1;
1218     unsigned                    : 1;
1219     unsigned                    : 1;
1220     unsigned                    : 1;
1221     };
1222 
1223   struct
1224     {
1225     unsigned                    : 1;
1226     unsigned GO                 : 1;
1227     unsigned                    : 1;
1228     unsigned                    : 1;
1229     unsigned                    : 1;
1230     unsigned                    : 1;
1231     unsigned                    : 1;
1232     unsigned                    : 1;
1233     };
1234 
1235   struct
1236     {
1237     unsigned                    : 1;
1238     unsigned DONE               : 1;
1239     unsigned                    : 1;
1240     unsigned                    : 1;
1241     unsigned                    : 1;
1242     unsigned                    : 1;
1243     unsigned                    : 1;
1244     unsigned                    : 1;
1245     };
1246 
1247   struct
1248     {
1249     unsigned                    : 2;
1250     unsigned CHS                : 5;
1251     unsigned                    : 1;
1252     };
1253   } __ADCON0bits_t;
1254 
1255 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1256 
1257 #define _ADON                   0x01
1258 #define _GO_NOT_DONE            0x02
1259 #define _ADGO                   0x02
1260 #define _GO                     0x02
1261 #define _DONE                   0x02
1262 #define _CHS0                   0x04
1263 #define _CHS1                   0x08
1264 #define _CHS2                   0x10
1265 #define _CHS3                   0x20
1266 #define _CHS4                   0x40
1267 #define _ADRMD                  0x80
1268 
1269 //==============================================================================
1270 
1271 
1272 //==============================================================================
1273 //        ADCON1 Bits
1274 
1275 extern __at(0x009E) __sfr ADCON1;
1276 
1277 typedef union
1278   {
1279   struct
1280     {
1281     unsigned ADPREF0            : 1;
1282     unsigned ADPREF1            : 1;
1283     unsigned ADNREF             : 1;
1284     unsigned                    : 1;
1285     unsigned ADCS0              : 1;
1286     unsigned ADCS1              : 1;
1287     unsigned ADCS2              : 1;
1288     unsigned ADFM               : 1;
1289     };
1290 
1291   struct
1292     {
1293     unsigned ADPREF             : 2;
1294     unsigned                    : 6;
1295     };
1296 
1297   struct
1298     {
1299     unsigned                    : 4;
1300     unsigned ADCS               : 3;
1301     unsigned                    : 1;
1302     };
1303   } __ADCON1bits_t;
1304 
1305 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1306 
1307 #define _ADPREF0                0x01
1308 #define _ADPREF1                0x02
1309 #define _ADNREF                 0x04
1310 #define _ADCS0                  0x10
1311 #define _ADCS1                  0x20
1312 #define _ADCS2                  0x40
1313 #define _ADFM                   0x80
1314 
1315 //==============================================================================
1316 
1317 
1318 //==============================================================================
1319 //        ADCON2 Bits
1320 
1321 extern __at(0x009F) __sfr ADCON2;
1322 
1323 typedef union
1324   {
1325   struct
1326     {
1327     unsigned CHSN0              : 1;
1328     unsigned CHSN1              : 1;
1329     unsigned CHSN2              : 1;
1330     unsigned CHSN3              : 1;
1331     unsigned TRIGSEL0           : 1;
1332     unsigned TRIGSEL1           : 1;
1333     unsigned TRIGSEL2           : 1;
1334     unsigned TRIGSEL3           : 1;
1335     };
1336 
1337   struct
1338     {
1339     unsigned CHSN               : 4;
1340     unsigned                    : 4;
1341     };
1342 
1343   struct
1344     {
1345     unsigned                    : 4;
1346     unsigned TRIGSEL            : 4;
1347     };
1348   } __ADCON2bits_t;
1349 
1350 extern __at(0x009F) volatile __ADCON2bits_t ADCON2bits;
1351 
1352 #define _CHSN0                  0x01
1353 #define _CHSN1                  0x02
1354 #define _CHSN2                  0x04
1355 #define _CHSN3                  0x08
1356 #define _TRIGSEL0               0x10
1357 #define _TRIGSEL1               0x20
1358 #define _TRIGSEL2               0x40
1359 #define _TRIGSEL3               0x80
1360 
1361 //==============================================================================
1362 
1363 
1364 //==============================================================================
1365 //        LATA Bits
1366 
1367 extern __at(0x010C) __sfr LATA;
1368 
1369 typedef struct
1370   {
1371   unsigned LATA0                : 1;
1372   unsigned LATA1                : 1;
1373   unsigned LATA2                : 1;
1374   unsigned LATA3                : 1;
1375   unsigned LATA4                : 1;
1376   unsigned LATA5                : 1;
1377   unsigned LATA6                : 1;
1378   unsigned LATA7                : 1;
1379   } __LATAbits_t;
1380 
1381 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1382 
1383 #define _LATA0                  0x01
1384 #define _LATA1                  0x02
1385 #define _LATA2                  0x04
1386 #define _LATA3                  0x08
1387 #define _LATA4                  0x10
1388 #define _LATA5                  0x20
1389 #define _LATA6                  0x40
1390 #define _LATA7                  0x80
1391 
1392 //==============================================================================
1393 
1394 
1395 //==============================================================================
1396 //        LATB Bits
1397 
1398 extern __at(0x010D) __sfr LATB;
1399 
1400 typedef struct
1401   {
1402   unsigned LATB0                : 1;
1403   unsigned LATB1                : 1;
1404   unsigned LATB2                : 1;
1405   unsigned LATB3                : 1;
1406   unsigned LATB4                : 1;
1407   unsigned LATB5                : 1;
1408   unsigned LATB6                : 1;
1409   unsigned LATB7                : 1;
1410   } __LATBbits_t;
1411 
1412 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1413 
1414 #define _LATB0                  0x01
1415 #define _LATB1                  0x02
1416 #define _LATB2                  0x04
1417 #define _LATB3                  0x08
1418 #define _LATB4                  0x10
1419 #define _LATB5                  0x20
1420 #define _LATB6                  0x40
1421 #define _LATB7                  0x80
1422 
1423 //==============================================================================
1424 
1425 
1426 //==============================================================================
1427 //        LATC Bits
1428 
1429 extern __at(0x010E) __sfr LATC;
1430 
1431 typedef struct
1432   {
1433   unsigned LATC0                : 1;
1434   unsigned LATC1                : 1;
1435   unsigned LATC2                : 1;
1436   unsigned LATC3                : 1;
1437   unsigned LATC4                : 1;
1438   unsigned LATC5                : 1;
1439   unsigned LATC6                : 1;
1440   unsigned LATC7                : 1;
1441   } __LATCbits_t;
1442 
1443 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1444 
1445 #define _LATC0                  0x01
1446 #define _LATC1                  0x02
1447 #define _LATC2                  0x04
1448 #define _LATC3                  0x08
1449 #define _LATC4                  0x10
1450 #define _LATC5                  0x20
1451 #define _LATC6                  0x40
1452 #define _LATC7                  0x80
1453 
1454 //==============================================================================
1455 
1456 
1457 //==============================================================================
1458 //        CM1CON0 Bits
1459 
1460 extern __at(0x0111) __sfr CM1CON0;
1461 
1462 typedef struct
1463   {
1464   unsigned C1SYNC               : 1;
1465   unsigned C1HYS                : 1;
1466   unsigned C1SP                 : 1;
1467   unsigned C1ZLF                : 1;
1468   unsigned C1POL                : 1;
1469   unsigned C1OE                 : 1;
1470   unsigned C1OUT                : 1;
1471   unsigned C1ON                 : 1;
1472   } __CM1CON0bits_t;
1473 
1474 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1475 
1476 #define _C1SYNC                 0x01
1477 #define _C1HYS                  0x02
1478 #define _C1SP                   0x04
1479 #define _C1ZLF                  0x08
1480 #define _C1POL                  0x10
1481 #define _C1OE                   0x20
1482 #define _C1OUT                  0x40
1483 #define _C1ON                   0x80
1484 
1485 //==============================================================================
1486 
1487 
1488 //==============================================================================
1489 //        CM1CON1 Bits
1490 
1491 extern __at(0x0112) __sfr CM1CON1;
1492 
1493 typedef union
1494   {
1495   struct
1496     {
1497     unsigned C1NCH0             : 1;
1498     unsigned C1NCH1             : 1;
1499     unsigned C1NCH2             : 1;
1500     unsigned C1PCH0             : 1;
1501     unsigned C1PCH1             : 1;
1502     unsigned C1PCH2             : 1;
1503     unsigned C1INTN             : 1;
1504     unsigned C1INTP             : 1;
1505     };
1506 
1507   struct
1508     {
1509     unsigned C1NCH              : 3;
1510     unsigned                    : 5;
1511     };
1512 
1513   struct
1514     {
1515     unsigned                    : 3;
1516     unsigned C1PCH              : 3;
1517     unsigned                    : 2;
1518     };
1519   } __CM1CON1bits_t;
1520 
1521 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1522 
1523 #define _C1NCH0                 0x01
1524 #define _C1NCH1                 0x02
1525 #define _C1NCH2                 0x04
1526 #define _C1PCH0                 0x08
1527 #define _C1PCH1                 0x10
1528 #define _C1PCH2                 0x20
1529 #define _C1INTN                 0x40
1530 #define _C1INTP                 0x80
1531 
1532 //==============================================================================
1533 
1534 
1535 //==============================================================================
1536 //        CM2CON0 Bits
1537 
1538 extern __at(0x0113) __sfr CM2CON0;
1539 
1540 typedef struct
1541   {
1542   unsigned C2SYNC               : 1;
1543   unsigned C2HYS                : 1;
1544   unsigned C2SP                 : 1;
1545   unsigned C2ZLF                : 1;
1546   unsigned C2POL                : 1;
1547   unsigned C2OE                 : 1;
1548   unsigned C2OUT                : 1;
1549   unsigned C2ON                 : 1;
1550   } __CM2CON0bits_t;
1551 
1552 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
1553 
1554 #define _C2SYNC                 0x01
1555 #define _C2HYS                  0x02
1556 #define _C2SP                   0x04
1557 #define _C2ZLF                  0x08
1558 #define _C2POL                  0x10
1559 #define _C2OE                   0x20
1560 #define _C2OUT                  0x40
1561 #define _C2ON                   0x80
1562 
1563 //==============================================================================
1564 
1565 
1566 //==============================================================================
1567 //        CM2CON1 Bits
1568 
1569 extern __at(0x0114) __sfr CM2CON1;
1570 
1571 typedef union
1572   {
1573   struct
1574     {
1575     unsigned C2NCH0             : 1;
1576     unsigned C2NCH1             : 1;
1577     unsigned C2NCH2             : 1;
1578     unsigned C2PCH0             : 1;
1579     unsigned C2PCH1             : 1;
1580     unsigned C2PCH2             : 1;
1581     unsigned C2INTN             : 1;
1582     unsigned C2INTP             : 1;
1583     };
1584 
1585   struct
1586     {
1587     unsigned C2NCH              : 3;
1588     unsigned                    : 5;
1589     };
1590 
1591   struct
1592     {
1593     unsigned                    : 3;
1594     unsigned C2PCH              : 3;
1595     unsigned                    : 2;
1596     };
1597   } __CM2CON1bits_t;
1598 
1599 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
1600 
1601 #define _C2NCH0                 0x01
1602 #define _C2NCH1                 0x02
1603 #define _C2NCH2                 0x04
1604 #define _C2PCH0                 0x08
1605 #define _C2PCH1                 0x10
1606 #define _C2PCH2                 0x20
1607 #define _C2INTN                 0x40
1608 #define _C2INTP                 0x80
1609 
1610 //==============================================================================
1611 
1612 
1613 //==============================================================================
1614 //        CMOUT Bits
1615 
1616 extern __at(0x0115) __sfr CMOUT;
1617 
1618 typedef struct
1619   {
1620   unsigned MC1OUT               : 1;
1621   unsigned MC2OUT               : 1;
1622   unsigned MC3OUT               : 1;
1623   unsigned                      : 1;
1624   unsigned                      : 1;
1625   unsigned                      : 1;
1626   unsigned                      : 1;
1627   unsigned                      : 1;
1628   } __CMOUTbits_t;
1629 
1630 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1631 
1632 #define _MC1OUT                 0x01
1633 #define _MC2OUT                 0x02
1634 #define _MC3OUT                 0x04
1635 
1636 //==============================================================================
1637 
1638 
1639 //==============================================================================
1640 //        BORCON Bits
1641 
1642 extern __at(0x0116) __sfr BORCON;
1643 
1644 typedef struct
1645   {
1646   unsigned BORRDY               : 1;
1647   unsigned                      : 1;
1648   unsigned                      : 1;
1649   unsigned                      : 1;
1650   unsigned                      : 1;
1651   unsigned                      : 1;
1652   unsigned BORFS                : 1;
1653   unsigned SBOREN               : 1;
1654   } __BORCONbits_t;
1655 
1656 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1657 
1658 #define _BORRDY                 0x01
1659 #define _BORFS                  0x40
1660 #define _SBOREN                 0x80
1661 
1662 //==============================================================================
1663 
1664 
1665 //==============================================================================
1666 //        FVRCON Bits
1667 
1668 extern __at(0x0117) __sfr FVRCON;
1669 
1670 typedef union
1671   {
1672   struct
1673     {
1674     unsigned ADFVR0             : 1;
1675     unsigned ADFVR1             : 1;
1676     unsigned CDAFVR0            : 1;
1677     unsigned CDAFVR1            : 1;
1678     unsigned TSRNG              : 1;
1679     unsigned TSEN               : 1;
1680     unsigned FVRRDY             : 1;
1681     unsigned FVREN              : 1;
1682     };
1683 
1684   struct
1685     {
1686     unsigned ADFVR              : 2;
1687     unsigned                    : 6;
1688     };
1689 
1690   struct
1691     {
1692     unsigned                    : 2;
1693     unsigned CDAFVR             : 2;
1694     unsigned                    : 4;
1695     };
1696   } __FVRCONbits_t;
1697 
1698 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1699 
1700 #define _ADFVR0                 0x01
1701 #define _ADFVR1                 0x02
1702 #define _CDAFVR0                0x04
1703 #define _CDAFVR1                0x08
1704 #define _TSRNG                  0x10
1705 #define _TSEN                   0x20
1706 #define _FVRRDY                 0x40
1707 #define _FVREN                  0x80
1708 
1709 //==============================================================================
1710 
1711 
1712 //==============================================================================
1713 //        DACCON0 Bits
1714 
1715 extern __at(0x0118) __sfr DACCON0;
1716 
1717 typedef union
1718   {
1719   struct
1720     {
1721     unsigned DACNSS             : 1;
1722     unsigned                    : 1;
1723     unsigned DACPSS0            : 1;
1724     unsigned DACPSS1            : 1;
1725     unsigned DACOE2             : 1;
1726     unsigned DACOE1             : 1;
1727     unsigned                    : 1;
1728     unsigned DACEN              : 1;
1729     };
1730 
1731   struct
1732     {
1733     unsigned                    : 2;
1734     unsigned DACPSS             : 2;
1735     unsigned                    : 4;
1736     };
1737   } __DACCON0bits_t;
1738 
1739 extern __at(0x0118) volatile __DACCON0bits_t DACCON0bits;
1740 
1741 #define _DACNSS                 0x01
1742 #define _DACPSS0                0x04
1743 #define _DACPSS1                0x08
1744 #define _DACOE2                 0x10
1745 #define _DACOE1                 0x20
1746 #define _DACEN                  0x80
1747 
1748 //==============================================================================
1749 
1750 
1751 //==============================================================================
1752 //        DACCON1 Bits
1753 
1754 extern __at(0x0119) __sfr DACCON1;
1755 
1756 typedef struct
1757   {
1758   unsigned DACR0                : 1;
1759   unsigned DACR1                : 1;
1760   unsigned DACR2                : 1;
1761   unsigned DACR3                : 1;
1762   unsigned DACR4                : 1;
1763   unsigned DACR5                : 1;
1764   unsigned DACR6                : 1;
1765   unsigned DACR7                : 1;
1766   } __DACCON1bits_t;
1767 
1768 extern __at(0x0119) volatile __DACCON1bits_t DACCON1bits;
1769 
1770 #define _DACR0                  0x01
1771 #define _DACR1                  0x02
1772 #define _DACR2                  0x04
1773 #define _DACR3                  0x08
1774 #define _DACR4                  0x10
1775 #define _DACR5                  0x20
1776 #define _DACR6                  0x40
1777 #define _DACR7                  0x80
1778 
1779 //==============================================================================
1780 
1781 
1782 //==============================================================================
1783 //        APFCON Bits
1784 
1785 extern __at(0x011D) __sfr APFCON;
1786 
1787 typedef struct
1788   {
1789   unsigned CCP2SEL              : 1;
1790   unsigned RXSEL                : 1;
1791   unsigned TXSEL                : 1;
1792   unsigned SDISEL               : 1;
1793   unsigned SCKSEL               : 1;
1794   unsigned SDOSEL               : 1;
1795   unsigned CCP1SEL              : 1;
1796   unsigned C2OUTSEL             : 1;
1797   } __APFCONbits_t;
1798 
1799 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1800 
1801 #define _CCP2SEL                0x01
1802 #define _RXSEL                  0x02
1803 #define _TXSEL                  0x04
1804 #define _SDISEL                 0x08
1805 #define _SCKSEL                 0x10
1806 #define _SDOSEL                 0x20
1807 #define _CCP1SEL                0x40
1808 #define _C2OUTSEL               0x80
1809 
1810 //==============================================================================
1811 
1812 
1813 //==============================================================================
1814 //        APFCON0 Bits
1815 
1816 extern __at(0x011D) __sfr APFCON0;
1817 
1818 typedef struct
1819   {
1820   unsigned CCP2SEL              : 1;
1821   unsigned RXSEL                : 1;
1822   unsigned TXSEL                : 1;
1823   unsigned SDISEL               : 1;
1824   unsigned SCKSEL               : 1;
1825   unsigned SDOSEL               : 1;
1826   unsigned CCP1SEL              : 1;
1827   unsigned C2OUTSEL             : 1;
1828   } __APFCON0bits_t;
1829 
1830 extern __at(0x011D) volatile __APFCON0bits_t APFCON0bits;
1831 
1832 #define _APFCON0_CCP2SEL        0x01
1833 #define _APFCON0_RXSEL          0x02
1834 #define _APFCON0_TXSEL          0x04
1835 #define _APFCON0_SDISEL         0x08
1836 #define _APFCON0_SCKSEL         0x10
1837 #define _APFCON0_SDOSEL         0x20
1838 #define _APFCON0_CCP1SEL        0x40
1839 #define _APFCON0_C2OUTSEL       0x80
1840 
1841 //==============================================================================
1842 
1843 
1844 //==============================================================================
1845 //        CM3CON0 Bits
1846 
1847 extern __at(0x011E) __sfr CM3CON0;
1848 
1849 typedef struct
1850   {
1851   unsigned C3SYNC               : 1;
1852   unsigned C3HYS                : 1;
1853   unsigned C3SP                 : 1;
1854   unsigned C3ZLF                : 1;
1855   unsigned C3POL                : 1;
1856   unsigned C3OE                 : 1;
1857   unsigned C3OUT                : 1;
1858   unsigned C3ON                 : 1;
1859   } __CM3CON0bits_t;
1860 
1861 extern __at(0x011E) volatile __CM3CON0bits_t CM3CON0bits;
1862 
1863 #define _C3SYNC                 0x01
1864 #define _C3HYS                  0x02
1865 #define _C3SP                   0x04
1866 #define _C3ZLF                  0x08
1867 #define _C3POL                  0x10
1868 #define _C3OE                   0x20
1869 #define _C3OUT                  0x40
1870 #define _C3ON                   0x80
1871 
1872 //==============================================================================
1873 
1874 
1875 //==============================================================================
1876 //        CM3CON1 Bits
1877 
1878 extern __at(0x011F) __sfr CM3CON1;
1879 
1880 typedef union
1881   {
1882   struct
1883     {
1884     unsigned C3NCH0             : 1;
1885     unsigned C3NCH1             : 1;
1886     unsigned C3NCH2             : 1;
1887     unsigned C3PCH0             : 1;
1888     unsigned C3PCH1             : 1;
1889     unsigned C3PCH2             : 1;
1890     unsigned C3INTN             : 1;
1891     unsigned C3INTP             : 1;
1892     };
1893 
1894   struct
1895     {
1896     unsigned C3NCH              : 3;
1897     unsigned                    : 5;
1898     };
1899 
1900   struct
1901     {
1902     unsigned                    : 3;
1903     unsigned C3PCH              : 3;
1904     unsigned                    : 2;
1905     };
1906   } __CM3CON1bits_t;
1907 
1908 extern __at(0x011F) volatile __CM3CON1bits_t CM3CON1bits;
1909 
1910 #define _C3NCH0                 0x01
1911 #define _C3NCH1                 0x02
1912 #define _C3NCH2                 0x04
1913 #define _C3PCH0                 0x08
1914 #define _C3PCH1                 0x10
1915 #define _C3PCH2                 0x20
1916 #define _C3INTN                 0x40
1917 #define _C3INTP                 0x80
1918 
1919 //==============================================================================
1920 
1921 
1922 //==============================================================================
1923 //        ANSELA Bits
1924 
1925 extern __at(0x018C) __sfr ANSELA;
1926 
1927 typedef struct
1928   {
1929   unsigned ANSA0                : 1;
1930   unsigned ANSA1                : 1;
1931   unsigned ANSA2                : 1;
1932   unsigned ANSA3                : 1;
1933   unsigned ANSA4                : 1;
1934   unsigned ANSA5                : 1;
1935   unsigned                      : 1;
1936   unsigned ANSA7                : 1;
1937   } __ANSELAbits_t;
1938 
1939 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1940 
1941 #define _ANSA0                  0x01
1942 #define _ANSA1                  0x02
1943 #define _ANSA2                  0x04
1944 #define _ANSA3                  0x08
1945 #define _ANSA4                  0x10
1946 #define _ANSA5                  0x20
1947 #define _ANSA7                  0x80
1948 
1949 //==============================================================================
1950 
1951 
1952 //==============================================================================
1953 //        ANSELB Bits
1954 
1955 extern __at(0x018D) __sfr ANSELB;
1956 
1957 typedef union
1958   {
1959   struct
1960     {
1961     unsigned ANSB0              : 1;
1962     unsigned ANSB1              : 1;
1963     unsigned ANSB2              : 1;
1964     unsigned ANSB3              : 1;
1965     unsigned ANSB4              : 1;
1966     unsigned ANSB5              : 1;
1967     unsigned                    : 1;
1968     unsigned                    : 1;
1969     };
1970 
1971   struct
1972     {
1973     unsigned ANSB               : 6;
1974     unsigned                    : 2;
1975     };
1976   } __ANSELBbits_t;
1977 
1978 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1979 
1980 #define _ANSB0                  0x01
1981 #define _ANSB1                  0x02
1982 #define _ANSB2                  0x04
1983 #define _ANSB3                  0x08
1984 #define _ANSB4                  0x10
1985 #define _ANSB5                  0x20
1986 
1987 //==============================================================================
1988 
1989 extern __at(0x0191) __sfr EEADR;
1990 extern __at(0x0191) __sfr EEADRL;
1991 extern __at(0x0192) __sfr EEADRH;
1992 extern __at(0x0193) __sfr EEDAT;
1993 extern __at(0x0193) __sfr EEDATL;
1994 extern __at(0x0194) __sfr EEDATH;
1995 
1996 //==============================================================================
1997 //        EECON1 Bits
1998 
1999 extern __at(0x0195) __sfr EECON1;
2000 
2001 typedef struct
2002   {
2003   unsigned RD                   : 1;
2004   unsigned WR                   : 1;
2005   unsigned WREN                 : 1;
2006   unsigned WRERR                : 1;
2007   unsigned FREE                 : 1;
2008   unsigned LWLO                 : 1;
2009   unsigned CFGS                 : 1;
2010   unsigned EEPGD                : 1;
2011   } __EECON1bits_t;
2012 
2013 extern __at(0x0195) volatile __EECON1bits_t EECON1bits;
2014 
2015 #define _RD                     0x01
2016 #define _WR                     0x02
2017 #define _WREN                   0x04
2018 #define _WRERR                  0x08
2019 #define _FREE                   0x10
2020 #define _LWLO                   0x20
2021 #define _CFGS                   0x40
2022 #define _EEPGD                  0x80
2023 
2024 //==============================================================================
2025 
2026 extern __at(0x0196) __sfr EECON2;
2027 extern __at(0x0199) __sfr RC1REG;
2028 extern __at(0x0199) __sfr RCREG;
2029 extern __at(0x0199) __sfr RCREG1;
2030 extern __at(0x019A) __sfr TX1REG;
2031 extern __at(0x019A) __sfr TXREG;
2032 extern __at(0x019A) __sfr TXREG1;
2033 extern __at(0x019B) __sfr SP1BRG;
2034 extern __at(0x019B) __sfr SP1BRGL;
2035 extern __at(0x019B) __sfr SPBRG;
2036 extern __at(0x019B) __sfr SPBRG1;
2037 extern __at(0x019B) __sfr SPBRGL;
2038 extern __at(0x019C) __sfr SP1BRGH;
2039 extern __at(0x019C) __sfr SPBRGH;
2040 extern __at(0x019C) __sfr SPBRGH1;
2041 
2042 //==============================================================================
2043 //        RC1STA Bits
2044 
2045 extern __at(0x019D) __sfr RC1STA;
2046 
2047 typedef struct
2048   {
2049   unsigned RX9D                 : 1;
2050   unsigned OERR                 : 1;
2051   unsigned FERR                 : 1;
2052   unsigned ADDEN                : 1;
2053   unsigned CREN                 : 1;
2054   unsigned SREN                 : 1;
2055   unsigned RX9                  : 1;
2056   unsigned SPEN                 : 1;
2057   } __RC1STAbits_t;
2058 
2059 extern __at(0x019D) volatile __RC1STAbits_t RC1STAbits;
2060 
2061 #define _RX9D                   0x01
2062 #define _OERR                   0x02
2063 #define _FERR                   0x04
2064 #define _ADDEN                  0x08
2065 #define _CREN                   0x10
2066 #define _SREN                   0x20
2067 #define _RX9                    0x40
2068 #define _SPEN                   0x80
2069 
2070 //==============================================================================
2071 
2072 
2073 //==============================================================================
2074 //        RCSTA Bits
2075 
2076 extern __at(0x019D) __sfr RCSTA;
2077 
2078 typedef struct
2079   {
2080   unsigned RX9D                 : 1;
2081   unsigned OERR                 : 1;
2082   unsigned FERR                 : 1;
2083   unsigned ADDEN                : 1;
2084   unsigned CREN                 : 1;
2085   unsigned SREN                 : 1;
2086   unsigned RX9                  : 1;
2087   unsigned SPEN                 : 1;
2088   } __RCSTAbits_t;
2089 
2090 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
2091 
2092 #define _RCSTA_RX9D             0x01
2093 #define _RCSTA_OERR             0x02
2094 #define _RCSTA_FERR             0x04
2095 #define _RCSTA_ADDEN            0x08
2096 #define _RCSTA_CREN             0x10
2097 #define _RCSTA_SREN             0x20
2098 #define _RCSTA_RX9              0x40
2099 #define _RCSTA_SPEN             0x80
2100 
2101 //==============================================================================
2102 
2103 
2104 //==============================================================================
2105 //        RCSTA1 Bits
2106 
2107 extern __at(0x019D) __sfr RCSTA1;
2108 
2109 typedef struct
2110   {
2111   unsigned RX9D                 : 1;
2112   unsigned OERR                 : 1;
2113   unsigned FERR                 : 1;
2114   unsigned ADDEN                : 1;
2115   unsigned CREN                 : 1;
2116   unsigned SREN                 : 1;
2117   unsigned RX9                  : 1;
2118   unsigned SPEN                 : 1;
2119   } __RCSTA1bits_t;
2120 
2121 extern __at(0x019D) volatile __RCSTA1bits_t RCSTA1bits;
2122 
2123 #define _RCSTA1_RX9D            0x01
2124 #define _RCSTA1_OERR            0x02
2125 #define _RCSTA1_FERR            0x04
2126 #define _RCSTA1_ADDEN           0x08
2127 #define _RCSTA1_CREN            0x10
2128 #define _RCSTA1_SREN            0x20
2129 #define _RCSTA1_RX9             0x40
2130 #define _RCSTA1_SPEN            0x80
2131 
2132 //==============================================================================
2133 
2134 
2135 //==============================================================================
2136 //        TX1STA Bits
2137 
2138 extern __at(0x019E) __sfr TX1STA;
2139 
2140 typedef struct
2141   {
2142   unsigned TX9D                 : 1;
2143   unsigned TRMT                 : 1;
2144   unsigned BRGH                 : 1;
2145   unsigned SENDB                : 1;
2146   unsigned SYNC                 : 1;
2147   unsigned TXEN                 : 1;
2148   unsigned TX9                  : 1;
2149   unsigned CSRC                 : 1;
2150   } __TX1STAbits_t;
2151 
2152 extern __at(0x019E) volatile __TX1STAbits_t TX1STAbits;
2153 
2154 #define _TX9D                   0x01
2155 #define _TRMT                   0x02
2156 #define _BRGH                   0x04
2157 #define _SENDB                  0x08
2158 #define _SYNC                   0x10
2159 #define _TXEN                   0x20
2160 #define _TX9                    0x40
2161 #define _CSRC                   0x80
2162 
2163 //==============================================================================
2164 
2165 
2166 //==============================================================================
2167 //        TXSTA Bits
2168 
2169 extern __at(0x019E) __sfr TXSTA;
2170 
2171 typedef struct
2172   {
2173   unsigned TX9D                 : 1;
2174   unsigned TRMT                 : 1;
2175   unsigned BRGH                 : 1;
2176   unsigned SENDB                : 1;
2177   unsigned SYNC                 : 1;
2178   unsigned TXEN                 : 1;
2179   unsigned TX9                  : 1;
2180   unsigned CSRC                 : 1;
2181   } __TXSTAbits_t;
2182 
2183 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2184 
2185 #define _TXSTA_TX9D             0x01
2186 #define _TXSTA_TRMT             0x02
2187 #define _TXSTA_BRGH             0x04
2188 #define _TXSTA_SENDB            0x08
2189 #define _TXSTA_SYNC             0x10
2190 #define _TXSTA_TXEN             0x20
2191 #define _TXSTA_TX9              0x40
2192 #define _TXSTA_CSRC             0x80
2193 
2194 //==============================================================================
2195 
2196 
2197 //==============================================================================
2198 //        TXSTA1 Bits
2199 
2200 extern __at(0x019E) __sfr TXSTA1;
2201 
2202 typedef struct
2203   {
2204   unsigned TX9D                 : 1;
2205   unsigned TRMT                 : 1;
2206   unsigned BRGH                 : 1;
2207   unsigned SENDB                : 1;
2208   unsigned SYNC                 : 1;
2209   unsigned TXEN                 : 1;
2210   unsigned TX9                  : 1;
2211   unsigned CSRC                 : 1;
2212   } __TXSTA1bits_t;
2213 
2214 extern __at(0x019E) volatile __TXSTA1bits_t TXSTA1bits;
2215 
2216 #define _TXSTA1_TX9D            0x01
2217 #define _TXSTA1_TRMT            0x02
2218 #define _TXSTA1_BRGH            0x04
2219 #define _TXSTA1_SENDB           0x08
2220 #define _TXSTA1_SYNC            0x10
2221 #define _TXSTA1_TXEN            0x20
2222 #define _TXSTA1_TX9             0x40
2223 #define _TXSTA1_CSRC            0x80
2224 
2225 //==============================================================================
2226 
2227 
2228 //==============================================================================
2229 //        BAUD1CON Bits
2230 
2231 extern __at(0x019F) __sfr BAUD1CON;
2232 
2233 typedef struct
2234   {
2235   unsigned ABDEN                : 1;
2236   unsigned WUE                  : 1;
2237   unsigned                      : 1;
2238   unsigned BRG16                : 1;
2239   unsigned SCKP                 : 1;
2240   unsigned                      : 1;
2241   unsigned RCIDL                : 1;
2242   unsigned ABDOVF               : 1;
2243   } __BAUD1CONbits_t;
2244 
2245 extern __at(0x019F) volatile __BAUD1CONbits_t BAUD1CONbits;
2246 
2247 #define _ABDEN                  0x01
2248 #define _WUE                    0x02
2249 #define _BRG16                  0x08
2250 #define _SCKP                   0x10
2251 #define _RCIDL                  0x40
2252 #define _ABDOVF                 0x80
2253 
2254 //==============================================================================
2255 
2256 
2257 //==============================================================================
2258 //        BAUDCON Bits
2259 
2260 extern __at(0x019F) __sfr BAUDCON;
2261 
2262 typedef struct
2263   {
2264   unsigned ABDEN                : 1;
2265   unsigned WUE                  : 1;
2266   unsigned                      : 1;
2267   unsigned BRG16                : 1;
2268   unsigned SCKP                 : 1;
2269   unsigned                      : 1;
2270   unsigned RCIDL                : 1;
2271   unsigned ABDOVF               : 1;
2272   } __BAUDCONbits_t;
2273 
2274 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2275 
2276 #define _BAUDCON_ABDEN          0x01
2277 #define _BAUDCON_WUE            0x02
2278 #define _BAUDCON_BRG16          0x08
2279 #define _BAUDCON_SCKP           0x10
2280 #define _BAUDCON_RCIDL          0x40
2281 #define _BAUDCON_ABDOVF         0x80
2282 
2283 //==============================================================================
2284 
2285 
2286 //==============================================================================
2287 //        BAUDCON1 Bits
2288 
2289 extern __at(0x019F) __sfr BAUDCON1;
2290 
2291 typedef struct
2292   {
2293   unsigned ABDEN                : 1;
2294   unsigned WUE                  : 1;
2295   unsigned                      : 1;
2296   unsigned BRG16                : 1;
2297   unsigned SCKP                 : 1;
2298   unsigned                      : 1;
2299   unsigned RCIDL                : 1;
2300   unsigned ABDOVF               : 1;
2301   } __BAUDCON1bits_t;
2302 
2303 extern __at(0x019F) volatile __BAUDCON1bits_t BAUDCON1bits;
2304 
2305 #define _BAUDCON1_ABDEN         0x01
2306 #define _BAUDCON1_WUE           0x02
2307 #define _BAUDCON1_BRG16         0x08
2308 #define _BAUDCON1_SCKP          0x10
2309 #define _BAUDCON1_RCIDL         0x40
2310 #define _BAUDCON1_ABDOVF        0x80
2311 
2312 //==============================================================================
2313 
2314 
2315 //==============================================================================
2316 //        BAUDCTL Bits
2317 
2318 extern __at(0x019F) __sfr BAUDCTL;
2319 
2320 typedef struct
2321   {
2322   unsigned ABDEN                : 1;
2323   unsigned WUE                  : 1;
2324   unsigned                      : 1;
2325   unsigned BRG16                : 1;
2326   unsigned SCKP                 : 1;
2327   unsigned                      : 1;
2328   unsigned RCIDL                : 1;
2329   unsigned ABDOVF               : 1;
2330   } __BAUDCTLbits_t;
2331 
2332 extern __at(0x019F) volatile __BAUDCTLbits_t BAUDCTLbits;
2333 
2334 #define _BAUDCTL_ABDEN          0x01
2335 #define _BAUDCTL_WUE            0x02
2336 #define _BAUDCTL_BRG16          0x08
2337 #define _BAUDCTL_SCKP           0x10
2338 #define _BAUDCTL_RCIDL          0x40
2339 #define _BAUDCTL_ABDOVF         0x80
2340 
2341 //==============================================================================
2342 
2343 
2344 //==============================================================================
2345 //        BAUDCTL1 Bits
2346 
2347 extern __at(0x019F) __sfr BAUDCTL1;
2348 
2349 typedef struct
2350   {
2351   unsigned ABDEN                : 1;
2352   unsigned WUE                  : 1;
2353   unsigned                      : 1;
2354   unsigned BRG16                : 1;
2355   unsigned SCKP                 : 1;
2356   unsigned                      : 1;
2357   unsigned RCIDL                : 1;
2358   unsigned ABDOVF               : 1;
2359   } __BAUDCTL1bits_t;
2360 
2361 extern __at(0x019F) volatile __BAUDCTL1bits_t BAUDCTL1bits;
2362 
2363 #define _BAUDCTL1_ABDEN         0x01
2364 #define _BAUDCTL1_WUE           0x02
2365 #define _BAUDCTL1_BRG16         0x08
2366 #define _BAUDCTL1_SCKP          0x10
2367 #define _BAUDCTL1_RCIDL         0x40
2368 #define _BAUDCTL1_ABDOVF        0x80
2369 
2370 //==============================================================================
2371 
2372 
2373 //==============================================================================
2374 //        WPUA Bits
2375 
2376 extern __at(0x020C) __sfr WPUA;
2377 
2378 typedef struct
2379   {
2380   unsigned WPUA0                : 1;
2381   unsigned WPUA1                : 1;
2382   unsigned WPUA2                : 1;
2383   unsigned WPUA3                : 1;
2384   unsigned WPUA4                : 1;
2385   unsigned WPUA5                : 1;
2386   unsigned WPUA6                : 1;
2387   unsigned WPUA7                : 1;
2388   } __WPUAbits_t;
2389 
2390 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
2391 
2392 #define _WPUA0                  0x01
2393 #define _WPUA1                  0x02
2394 #define _WPUA2                  0x04
2395 #define _WPUA3                  0x08
2396 #define _WPUA4                  0x10
2397 #define _WPUA5                  0x20
2398 #define _WPUA6                  0x40
2399 #define _WPUA7                  0x80
2400 
2401 //==============================================================================
2402 
2403 
2404 //==============================================================================
2405 //        WPUB Bits
2406 
2407 extern __at(0x020D) __sfr WPUB;
2408 
2409 typedef struct
2410   {
2411   unsigned WPUB0                : 1;
2412   unsigned WPUB1                : 1;
2413   unsigned WPUB2                : 1;
2414   unsigned WPUB3                : 1;
2415   unsigned WPUB4                : 1;
2416   unsigned WPUB5                : 1;
2417   unsigned WPUB6                : 1;
2418   unsigned WPUB7                : 1;
2419   } __WPUBbits_t;
2420 
2421 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2422 
2423 #define _WPUB0                  0x01
2424 #define _WPUB1                  0x02
2425 #define _WPUB2                  0x04
2426 #define _WPUB3                  0x08
2427 #define _WPUB4                  0x10
2428 #define _WPUB5                  0x20
2429 #define _WPUB6                  0x40
2430 #define _WPUB7                  0x80
2431 
2432 //==============================================================================
2433 
2434 
2435 //==============================================================================
2436 //        WPUC Bits
2437 
2438 extern __at(0x020E) __sfr WPUC;
2439 
2440 typedef struct
2441   {
2442   unsigned WPUC0                : 1;
2443   unsigned WPUC1                : 1;
2444   unsigned WPUC2                : 1;
2445   unsigned WPUC3                : 1;
2446   unsigned WPUC4                : 1;
2447   unsigned WPUC5                : 1;
2448   unsigned WPUC6                : 1;
2449   unsigned WPUC7                : 1;
2450   } __WPUCbits_t;
2451 
2452 extern __at(0x020E) volatile __WPUCbits_t WPUCbits;
2453 
2454 #define _WPUC0                  0x01
2455 #define _WPUC1                  0x02
2456 #define _WPUC2                  0x04
2457 #define _WPUC3                  0x08
2458 #define _WPUC4                  0x10
2459 #define _WPUC5                  0x20
2460 #define _WPUC6                  0x40
2461 #define _WPUC7                  0x80
2462 
2463 //==============================================================================
2464 
2465 
2466 //==============================================================================
2467 //        WPUE Bits
2468 
2469 extern __at(0x0210) __sfr WPUE;
2470 
2471 typedef struct
2472   {
2473   unsigned                      : 1;
2474   unsigned                      : 1;
2475   unsigned                      : 1;
2476   unsigned WPUE3                : 1;
2477   unsigned                      : 1;
2478   unsigned                      : 1;
2479   unsigned                      : 1;
2480   unsigned                      : 1;
2481   } __WPUEbits_t;
2482 
2483 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
2484 
2485 #define _WPUE3                  0x08
2486 
2487 //==============================================================================
2488 
2489 extern __at(0x0211) __sfr SSP1BUF;
2490 extern __at(0x0211) __sfr SSPBUF;
2491 extern __at(0x0212) __sfr SSP1ADD;
2492 extern __at(0x0212) __sfr SSPADD;
2493 extern __at(0x0213) __sfr SSP1MSK;
2494 extern __at(0x0213) __sfr SSPMSK;
2495 
2496 //==============================================================================
2497 //        SSP1STAT Bits
2498 
2499 extern __at(0x0214) __sfr SSP1STAT;
2500 
2501 typedef struct
2502   {
2503   unsigned BF                   : 1;
2504   unsigned UA                   : 1;
2505   unsigned R_NOT_W              : 1;
2506   unsigned S                    : 1;
2507   unsigned P                    : 1;
2508   unsigned D_NOT_A              : 1;
2509   unsigned CKE                  : 1;
2510   unsigned SMP                  : 1;
2511   } __SSP1STATbits_t;
2512 
2513 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2514 
2515 #define _BF                     0x01
2516 #define _UA                     0x02
2517 #define _R_NOT_W                0x04
2518 #define _S                      0x08
2519 #define _P                      0x10
2520 #define _D_NOT_A                0x20
2521 #define _CKE                    0x40
2522 #define _SMP                    0x80
2523 
2524 //==============================================================================
2525 
2526 
2527 //==============================================================================
2528 //        SSPSTAT Bits
2529 
2530 extern __at(0x0214) __sfr SSPSTAT;
2531 
2532 typedef struct
2533   {
2534   unsigned BF                   : 1;
2535   unsigned UA                   : 1;
2536   unsigned R_NOT_W              : 1;
2537   unsigned S                    : 1;
2538   unsigned P                    : 1;
2539   unsigned D_NOT_A              : 1;
2540   unsigned CKE                  : 1;
2541   unsigned SMP                  : 1;
2542   } __SSPSTATbits_t;
2543 
2544 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2545 
2546 #define _SSPSTAT_BF             0x01
2547 #define _SSPSTAT_UA             0x02
2548 #define _SSPSTAT_R_NOT_W        0x04
2549 #define _SSPSTAT_S              0x08
2550 #define _SSPSTAT_P              0x10
2551 #define _SSPSTAT_D_NOT_A        0x20
2552 #define _SSPSTAT_CKE            0x40
2553 #define _SSPSTAT_SMP            0x80
2554 
2555 //==============================================================================
2556 
2557 
2558 //==============================================================================
2559 //        SSP1CON Bits
2560 
2561 extern __at(0x0215) __sfr SSP1CON;
2562 
2563 typedef union
2564   {
2565   struct
2566     {
2567     unsigned SSPM0              : 1;
2568     unsigned SSPM1              : 1;
2569     unsigned SSPM2              : 1;
2570     unsigned SSPM3              : 1;
2571     unsigned CKP                : 1;
2572     unsigned SSPEN              : 1;
2573     unsigned SSPOV              : 1;
2574     unsigned WCOL               : 1;
2575     };
2576 
2577   struct
2578     {
2579     unsigned SSPM               : 4;
2580     unsigned                    : 4;
2581     };
2582   } __SSP1CONbits_t;
2583 
2584 extern __at(0x0215) volatile __SSP1CONbits_t SSP1CONbits;
2585 
2586 #define _SSPM0                  0x01
2587 #define _SSPM1                  0x02
2588 #define _SSPM2                  0x04
2589 #define _SSPM3                  0x08
2590 #define _CKP                    0x10
2591 #define _SSPEN                  0x20
2592 #define _SSPOV                  0x40
2593 #define _WCOL                   0x80
2594 
2595 //==============================================================================
2596 
2597 
2598 //==============================================================================
2599 //        SSPCON Bits
2600 
2601 extern __at(0x0215) __sfr SSPCON;
2602 
2603 typedef union
2604   {
2605   struct
2606     {
2607     unsigned SSPM0              : 1;
2608     unsigned SSPM1              : 1;
2609     unsigned SSPM2              : 1;
2610     unsigned SSPM3              : 1;
2611     unsigned CKP                : 1;
2612     unsigned SSPEN              : 1;
2613     unsigned SSPOV              : 1;
2614     unsigned WCOL               : 1;
2615     };
2616 
2617   struct
2618     {
2619     unsigned SSPM               : 4;
2620     unsigned                    : 4;
2621     };
2622   } __SSPCONbits_t;
2623 
2624 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2625 
2626 #define _SSPCON_SSPM0           0x01
2627 #define _SSPCON_SSPM1           0x02
2628 #define _SSPCON_SSPM2           0x04
2629 #define _SSPCON_SSPM3           0x08
2630 #define _SSPCON_CKP             0x10
2631 #define _SSPCON_SSPEN           0x20
2632 #define _SSPCON_SSPOV           0x40
2633 #define _SSPCON_WCOL            0x80
2634 
2635 //==============================================================================
2636 
2637 
2638 //==============================================================================
2639 //        SSPCON1 Bits
2640 
2641 extern __at(0x0215) __sfr SSPCON1;
2642 
2643 typedef union
2644   {
2645   struct
2646     {
2647     unsigned SSPM0              : 1;
2648     unsigned SSPM1              : 1;
2649     unsigned SSPM2              : 1;
2650     unsigned SSPM3              : 1;
2651     unsigned CKP                : 1;
2652     unsigned SSPEN              : 1;
2653     unsigned SSPOV              : 1;
2654     unsigned WCOL               : 1;
2655     };
2656 
2657   struct
2658     {
2659     unsigned SSPM               : 4;
2660     unsigned                    : 4;
2661     };
2662   } __SSPCON1bits_t;
2663 
2664 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2665 
2666 #define _SSPCON1_SSPM0          0x01
2667 #define _SSPCON1_SSPM1          0x02
2668 #define _SSPCON1_SSPM2          0x04
2669 #define _SSPCON1_SSPM3          0x08
2670 #define _SSPCON1_CKP            0x10
2671 #define _SSPCON1_SSPEN          0x20
2672 #define _SSPCON1_SSPOV          0x40
2673 #define _SSPCON1_WCOL           0x80
2674 
2675 //==============================================================================
2676 
2677 
2678 //==============================================================================
2679 //        SSP1CON2 Bits
2680 
2681 extern __at(0x0216) __sfr SSP1CON2;
2682 
2683 typedef struct
2684   {
2685   unsigned SEN                  : 1;
2686   unsigned RSEN                 : 1;
2687   unsigned PEN                  : 1;
2688   unsigned RCEN                 : 1;
2689   unsigned ACKEN                : 1;
2690   unsigned ACKDT                : 1;
2691   unsigned ACKSTAT              : 1;
2692   unsigned GCEN                 : 1;
2693   } __SSP1CON2bits_t;
2694 
2695 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2696 
2697 #define _SEN                    0x01
2698 #define _RSEN                   0x02
2699 #define _PEN                    0x04
2700 #define _RCEN                   0x08
2701 #define _ACKEN                  0x10
2702 #define _ACKDT                  0x20
2703 #define _ACKSTAT                0x40
2704 #define _GCEN                   0x80
2705 
2706 //==============================================================================
2707 
2708 
2709 //==============================================================================
2710 //        SSPCON2 Bits
2711 
2712 extern __at(0x0216) __sfr SSPCON2;
2713 
2714 typedef struct
2715   {
2716   unsigned SEN                  : 1;
2717   unsigned RSEN                 : 1;
2718   unsigned PEN                  : 1;
2719   unsigned RCEN                 : 1;
2720   unsigned ACKEN                : 1;
2721   unsigned ACKDT                : 1;
2722   unsigned ACKSTAT              : 1;
2723   unsigned GCEN                 : 1;
2724   } __SSPCON2bits_t;
2725 
2726 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2727 
2728 #define _SSPCON2_SEN            0x01
2729 #define _SSPCON2_RSEN           0x02
2730 #define _SSPCON2_PEN            0x04
2731 #define _SSPCON2_RCEN           0x08
2732 #define _SSPCON2_ACKEN          0x10
2733 #define _SSPCON2_ACKDT          0x20
2734 #define _SSPCON2_ACKSTAT        0x40
2735 #define _SSPCON2_GCEN           0x80
2736 
2737 //==============================================================================
2738 
2739 
2740 //==============================================================================
2741 //        SSP1CON3 Bits
2742 
2743 extern __at(0x0217) __sfr SSP1CON3;
2744 
2745 typedef struct
2746   {
2747   unsigned DHEN                 : 1;
2748   unsigned AHEN                 : 1;
2749   unsigned SBCDE                : 1;
2750   unsigned SDAHT                : 1;
2751   unsigned BOEN                 : 1;
2752   unsigned SCIE                 : 1;
2753   unsigned PCIE                 : 1;
2754   unsigned ACKTIM               : 1;
2755   } __SSP1CON3bits_t;
2756 
2757 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2758 
2759 #define _DHEN                   0x01
2760 #define _AHEN                   0x02
2761 #define _SBCDE                  0x04
2762 #define _SDAHT                  0x08
2763 #define _BOEN                   0x10
2764 #define _SCIE                   0x20
2765 #define _PCIE                   0x40
2766 #define _ACKTIM                 0x80
2767 
2768 //==============================================================================
2769 
2770 
2771 //==============================================================================
2772 //        SSPCON3 Bits
2773 
2774 extern __at(0x0217) __sfr SSPCON3;
2775 
2776 typedef struct
2777   {
2778   unsigned DHEN                 : 1;
2779   unsigned AHEN                 : 1;
2780   unsigned SBCDE                : 1;
2781   unsigned SDAHT                : 1;
2782   unsigned BOEN                 : 1;
2783   unsigned SCIE                 : 1;
2784   unsigned PCIE                 : 1;
2785   unsigned ACKTIM               : 1;
2786   } __SSPCON3bits_t;
2787 
2788 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2789 
2790 #define _SSPCON3_DHEN           0x01
2791 #define _SSPCON3_AHEN           0x02
2792 #define _SSPCON3_SBCDE          0x04
2793 #define _SSPCON3_SDAHT          0x08
2794 #define _SSPCON3_BOEN           0x10
2795 #define _SSPCON3_SCIE           0x20
2796 #define _SSPCON3_PCIE           0x40
2797 #define _SSPCON3_ACKTIM         0x80
2798 
2799 //==============================================================================
2800 
2801 
2802 //==============================================================================
2803 //        ODCONA Bits
2804 
2805 extern __at(0x028C) __sfr ODCONA;
2806 
2807 typedef struct
2808   {
2809   unsigned ODCONA0              : 1;
2810   unsigned ODCONA1              : 1;
2811   unsigned ODCONA2              : 1;
2812   unsigned ODCONA3              : 1;
2813   unsigned ODCONA4              : 1;
2814   unsigned ODCONA5              : 1;
2815   unsigned ODCONA6              : 1;
2816   unsigned ODCONA7              : 1;
2817   } __ODCONAbits_t;
2818 
2819 extern __at(0x028C) volatile __ODCONAbits_t ODCONAbits;
2820 
2821 #define _ODCONA0                0x01
2822 #define _ODCONA1                0x02
2823 #define _ODCONA2                0x04
2824 #define _ODCONA3                0x08
2825 #define _ODCONA4                0x10
2826 #define _ODCONA5                0x20
2827 #define _ODCONA6                0x40
2828 #define _ODCONA7                0x80
2829 
2830 //==============================================================================
2831 
2832 
2833 //==============================================================================
2834 //        ODCONB Bits
2835 
2836 extern __at(0x028D) __sfr ODCONB;
2837 
2838 typedef struct
2839   {
2840   unsigned ODCONB0              : 1;
2841   unsigned ODCONB1              : 1;
2842   unsigned ODCONB2              : 1;
2843   unsigned ODCONB3              : 1;
2844   unsigned ODCONB4              : 1;
2845   unsigned ODCONB5              : 1;
2846   unsigned ODCONB6              : 1;
2847   unsigned ODCONB7              : 1;
2848   } __ODCONBbits_t;
2849 
2850 extern __at(0x028D) volatile __ODCONBbits_t ODCONBbits;
2851 
2852 #define _ODCONB0                0x01
2853 #define _ODCONB1                0x02
2854 #define _ODCONB2                0x04
2855 #define _ODCONB3                0x08
2856 #define _ODCONB4                0x10
2857 #define _ODCONB5                0x20
2858 #define _ODCONB6                0x40
2859 #define _ODCONB7                0x80
2860 
2861 //==============================================================================
2862 
2863 
2864 //==============================================================================
2865 //        ODCONC Bits
2866 
2867 extern __at(0x028E) __sfr ODCONC;
2868 
2869 typedef struct
2870   {
2871   unsigned ODCONC0              : 1;
2872   unsigned ODCONC1              : 1;
2873   unsigned ODCONC2              : 1;
2874   unsigned ODCONC3              : 1;
2875   unsigned ODCONC4              : 1;
2876   unsigned ODCONC5              : 1;
2877   unsigned ODCONC6              : 1;
2878   unsigned ODCONC7              : 1;
2879   } __ODCONCbits_t;
2880 
2881 extern __at(0x028E) volatile __ODCONCbits_t ODCONCbits;
2882 
2883 #define _ODCONC0                0x01
2884 #define _ODCONC1                0x02
2885 #define _ODCONC2                0x04
2886 #define _ODCONC3                0x08
2887 #define _ODCONC4                0x10
2888 #define _ODCONC5                0x20
2889 #define _ODCONC6                0x40
2890 #define _ODCONC7                0x80
2891 
2892 //==============================================================================
2893 
2894 extern __at(0x0291) __sfr CCPR1;
2895 extern __at(0x0291) __sfr CCPR1L;
2896 extern __at(0x0292) __sfr CCPR1H;
2897 
2898 //==============================================================================
2899 //        CCP1CON Bits
2900 
2901 extern __at(0x0293) __sfr CCP1CON;
2902 
2903 typedef union
2904   {
2905   struct
2906     {
2907     unsigned CCP1M0             : 1;
2908     unsigned CCP1M1             : 1;
2909     unsigned CCP1M2             : 1;
2910     unsigned CCP1M3             : 1;
2911     unsigned DC1B0              : 1;
2912     unsigned DC1B1              : 1;
2913     unsigned P1M0               : 1;
2914     unsigned P1M1               : 1;
2915     };
2916 
2917   struct
2918     {
2919     unsigned CCP1M              : 4;
2920     unsigned                    : 4;
2921     };
2922 
2923   struct
2924     {
2925     unsigned                    : 4;
2926     unsigned DC1B               : 2;
2927     unsigned                    : 2;
2928     };
2929 
2930   struct
2931     {
2932     unsigned                    : 6;
2933     unsigned P1M                : 2;
2934     };
2935   } __CCP1CONbits_t;
2936 
2937 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2938 
2939 #define _CCP1M0                 0x01
2940 #define _CCP1M1                 0x02
2941 #define _CCP1M2                 0x04
2942 #define _CCP1M3                 0x08
2943 #define _DC1B0                  0x10
2944 #define _DC1B1                  0x20
2945 #define _P1M0                   0x40
2946 #define _P1M1                   0x80
2947 
2948 //==============================================================================
2949 
2950 extern __at(0x0298) __sfr CCPR2;
2951 extern __at(0x0298) __sfr CCPR2L;
2952 extern __at(0x0299) __sfr CCPR2H;
2953 
2954 //==============================================================================
2955 //        CCP2CON Bits
2956 
2957 extern __at(0x029A) __sfr CCP2CON;
2958 
2959 typedef union
2960   {
2961   struct
2962     {
2963     unsigned CCP2M0             : 1;
2964     unsigned CCP2M1             : 1;
2965     unsigned CCP2M2             : 1;
2966     unsigned CCP2M3             : 1;
2967     unsigned DC2B0              : 1;
2968     unsigned DC2B1              : 1;
2969     unsigned P2M0               : 1;
2970     unsigned P2M1               : 1;
2971     };
2972 
2973   struct
2974     {
2975     unsigned CCP2M              : 4;
2976     unsigned                    : 4;
2977     };
2978 
2979   struct
2980     {
2981     unsigned                    : 4;
2982     unsigned DC2B               : 2;
2983     unsigned                    : 2;
2984     };
2985 
2986   struct
2987     {
2988     unsigned                    : 6;
2989     unsigned P2M                : 2;
2990     };
2991   } __CCP2CONbits_t;
2992 
2993 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2994 
2995 #define _CCP2M0                 0x01
2996 #define _CCP2M1                 0x02
2997 #define _CCP2M2                 0x04
2998 #define _CCP2M3                 0x08
2999 #define _DC2B0                  0x10
3000 #define _DC2B1                  0x20
3001 #define _P2M0                   0x40
3002 #define _P2M1                   0x80
3003 
3004 //==============================================================================
3005 
3006 
3007 //==============================================================================
3008 //        SLRCONA Bits
3009 
3010 extern __at(0x030C) __sfr SLRCONA;
3011 
3012 typedef struct
3013   {
3014   unsigned SLRCONA0             : 1;
3015   unsigned SLRCONA1             : 1;
3016   unsigned SLRCONA2             : 1;
3017   unsigned SLRCONA3             : 1;
3018   unsigned SLRCONA4             : 1;
3019   unsigned SLRCONA5             : 1;
3020   unsigned SLRCONA6             : 1;
3021   unsigned SLRCONA7             : 1;
3022   } __SLRCONAbits_t;
3023 
3024 extern __at(0x030C) volatile __SLRCONAbits_t SLRCONAbits;
3025 
3026 #define _SLRCONA0               0x01
3027 #define _SLRCONA1               0x02
3028 #define _SLRCONA2               0x04
3029 #define _SLRCONA3               0x08
3030 #define _SLRCONA4               0x10
3031 #define _SLRCONA5               0x20
3032 #define _SLRCONA6               0x40
3033 #define _SLRCONA7               0x80
3034 
3035 //==============================================================================
3036 
3037 
3038 //==============================================================================
3039 //        SLRCONB Bits
3040 
3041 extern __at(0x030D) __sfr SLRCONB;
3042 
3043 typedef struct
3044   {
3045   unsigned SLRCONB0             : 1;
3046   unsigned SLRCONB1             : 1;
3047   unsigned SLRCONB2             : 1;
3048   unsigned SLRCONB3             : 1;
3049   unsigned SLRCONB4             : 1;
3050   unsigned SLRCONB5             : 1;
3051   unsigned SLRCONB6             : 1;
3052   unsigned SLRCONB7             : 1;
3053   } __SLRCONBbits_t;
3054 
3055 extern __at(0x030D) volatile __SLRCONBbits_t SLRCONBbits;
3056 
3057 #define _SLRCONB0               0x01
3058 #define _SLRCONB1               0x02
3059 #define _SLRCONB2               0x04
3060 #define _SLRCONB3               0x08
3061 #define _SLRCONB4               0x10
3062 #define _SLRCONB5               0x20
3063 #define _SLRCONB6               0x40
3064 #define _SLRCONB7               0x80
3065 
3066 //==============================================================================
3067 
3068 
3069 //==============================================================================
3070 //        SLRCONC Bits
3071 
3072 extern __at(0x030E) __sfr SLRCONC;
3073 
3074 typedef struct
3075   {
3076   unsigned SLRCONC0             : 1;
3077   unsigned SLRCONC1             : 1;
3078   unsigned SLRCONC2             : 1;
3079   unsigned SLRCONC3             : 1;
3080   unsigned SLRCONC4             : 1;
3081   unsigned SLRCONC5             : 1;
3082   unsigned SLRCONC6             : 1;
3083   unsigned SLRCONC7             : 1;
3084   } __SLRCONCbits_t;
3085 
3086 extern __at(0x030E) volatile __SLRCONCbits_t SLRCONCbits;
3087 
3088 #define _SLRCONC0               0x01
3089 #define _SLRCONC1               0x02
3090 #define _SLRCONC2               0x04
3091 #define _SLRCONC3               0x08
3092 #define _SLRCONC4               0x10
3093 #define _SLRCONC5               0x20
3094 #define _SLRCONC6               0x40
3095 #define _SLRCONC7               0x80
3096 
3097 //==============================================================================
3098 
3099 
3100 //==============================================================================
3101 //        INLVLA Bits
3102 
3103 extern __at(0x038C) __sfr INLVLA;
3104 
3105 typedef struct
3106   {
3107   unsigned INLVLA0              : 1;
3108   unsigned INLVLA1              : 1;
3109   unsigned INLVLA2              : 1;
3110   unsigned INLVLA3              : 1;
3111   unsigned INLVLA4              : 1;
3112   unsigned INLVLA5              : 1;
3113   unsigned INLVLA6              : 1;
3114   unsigned INLVLA7              : 1;
3115   } __INLVLAbits_t;
3116 
3117 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
3118 
3119 #define _INLVLA0                0x01
3120 #define _INLVLA1                0x02
3121 #define _INLVLA2                0x04
3122 #define _INLVLA3                0x08
3123 #define _INLVLA4                0x10
3124 #define _INLVLA5                0x20
3125 #define _INLVLA6                0x40
3126 #define _INLVLA7                0x80
3127 
3128 //==============================================================================
3129 
3130 
3131 //==============================================================================
3132 //        INLVLB Bits
3133 
3134 extern __at(0x038D) __sfr INLVLB;
3135 
3136 typedef struct
3137   {
3138   unsigned INLVLB0              : 1;
3139   unsigned INLVLB1              : 1;
3140   unsigned INLVLB2              : 1;
3141   unsigned INLVLB3              : 1;
3142   unsigned INLVLB4              : 1;
3143   unsigned INLVLB5              : 1;
3144   unsigned INLVLB6              : 1;
3145   unsigned INLVLB7              : 1;
3146   } __INLVLBbits_t;
3147 
3148 extern __at(0x038D) volatile __INLVLBbits_t INLVLBbits;
3149 
3150 #define _INLVLB0                0x01
3151 #define _INLVLB1                0x02
3152 #define _INLVLB2                0x04
3153 #define _INLVLB3                0x08
3154 #define _INLVLB4                0x10
3155 #define _INLVLB5                0x20
3156 #define _INLVLB6                0x40
3157 #define _INLVLB7                0x80
3158 
3159 //==============================================================================
3160 
3161 
3162 //==============================================================================
3163 //        INLVLC Bits
3164 
3165 extern __at(0x038E) __sfr INLVLC;
3166 
3167 typedef struct
3168   {
3169   unsigned INLVLC0              : 1;
3170   unsigned INLVLC1              : 1;
3171   unsigned INLVLC2              : 1;
3172   unsigned INLVLC3              : 1;
3173   unsigned INLVLC4              : 1;
3174   unsigned INLVLC5              : 1;
3175   unsigned INLVLC6              : 1;
3176   unsigned INLVLC7              : 1;
3177   } __INLVLCbits_t;
3178 
3179 extern __at(0x038E) volatile __INLVLCbits_t INLVLCbits;
3180 
3181 #define _INLVLC0                0x01
3182 #define _INLVLC1                0x02
3183 #define _INLVLC2                0x04
3184 #define _INLVLC3                0x08
3185 #define _INLVLC4                0x10
3186 #define _INLVLC5                0x20
3187 #define _INLVLC6                0x40
3188 #define _INLVLC7                0x80
3189 
3190 //==============================================================================
3191 
3192 
3193 //==============================================================================
3194 //        INLVLE Bits
3195 
3196 extern __at(0x0390) __sfr INLVLE;
3197 
3198 typedef struct
3199   {
3200   unsigned                      : 1;
3201   unsigned                      : 1;
3202   unsigned                      : 1;
3203   unsigned INLVLE3              : 1;
3204   unsigned                      : 1;
3205   unsigned                      : 1;
3206   unsigned                      : 1;
3207   unsigned                      : 1;
3208   } __INLVLEbits_t;
3209 
3210 extern __at(0x0390) volatile __INLVLEbits_t INLVLEbits;
3211 
3212 #define _INLVLE3                0x08
3213 
3214 //==============================================================================
3215 
3216 
3217 //==============================================================================
3218 //        IOCAP Bits
3219 
3220 extern __at(0x0391) __sfr IOCAP;
3221 
3222 typedef struct
3223   {
3224   unsigned IOCAP0               : 1;
3225   unsigned IOCAP1               : 1;
3226   unsigned IOCAP2               : 1;
3227   unsigned IOCAP3               : 1;
3228   unsigned IOCAP4               : 1;
3229   unsigned IOCAP5               : 1;
3230   unsigned IOCAP6               : 1;
3231   unsigned IOCAP7               : 1;
3232   } __IOCAPbits_t;
3233 
3234 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
3235 
3236 #define _IOCAP0                 0x01
3237 #define _IOCAP1                 0x02
3238 #define _IOCAP2                 0x04
3239 #define _IOCAP3                 0x08
3240 #define _IOCAP4                 0x10
3241 #define _IOCAP5                 0x20
3242 #define _IOCAP6                 0x40
3243 #define _IOCAP7                 0x80
3244 
3245 //==============================================================================
3246 
3247 
3248 //==============================================================================
3249 //        IOCAN Bits
3250 
3251 extern __at(0x0392) __sfr IOCAN;
3252 
3253 typedef struct
3254   {
3255   unsigned IOCAN0               : 1;
3256   unsigned IOCAN1               : 1;
3257   unsigned IOCAN2               : 1;
3258   unsigned IOCAN3               : 1;
3259   unsigned IOCAN4               : 1;
3260   unsigned IOCAN5               : 1;
3261   unsigned IOCAN6               : 1;
3262   unsigned IOCAN7               : 1;
3263   } __IOCANbits_t;
3264 
3265 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
3266 
3267 #define _IOCAN0                 0x01
3268 #define _IOCAN1                 0x02
3269 #define _IOCAN2                 0x04
3270 #define _IOCAN3                 0x08
3271 #define _IOCAN4                 0x10
3272 #define _IOCAN5                 0x20
3273 #define _IOCAN6                 0x40
3274 #define _IOCAN7                 0x80
3275 
3276 //==============================================================================
3277 
3278 
3279 //==============================================================================
3280 //        IOCAF Bits
3281 
3282 extern __at(0x0393) __sfr IOCAF;
3283 
3284 typedef struct
3285   {
3286   unsigned IOCAF0               : 1;
3287   unsigned IOCAF1               : 1;
3288   unsigned IOCAF2               : 1;
3289   unsigned IOCAF3               : 1;
3290   unsigned IOCAF4               : 1;
3291   unsigned IOCAF5               : 1;
3292   unsigned IOCAF6               : 1;
3293   unsigned IOCAF7               : 1;
3294   } __IOCAFbits_t;
3295 
3296 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
3297 
3298 #define _IOCAF0                 0x01
3299 #define _IOCAF1                 0x02
3300 #define _IOCAF2                 0x04
3301 #define _IOCAF3                 0x08
3302 #define _IOCAF4                 0x10
3303 #define _IOCAF5                 0x20
3304 #define _IOCAF6                 0x40
3305 #define _IOCAF7                 0x80
3306 
3307 //==============================================================================
3308 
3309 
3310 //==============================================================================
3311 //        IOCBP Bits
3312 
3313 extern __at(0x0394) __sfr IOCBP;
3314 
3315 typedef struct
3316   {
3317   unsigned IOCBP0               : 1;
3318   unsigned IOCBP1               : 1;
3319   unsigned IOCBP2               : 1;
3320   unsigned IOCBP3               : 1;
3321   unsigned IOCBP4               : 1;
3322   unsigned IOCBP5               : 1;
3323   unsigned IOCBP6               : 1;
3324   unsigned IOCBP7               : 1;
3325   } __IOCBPbits_t;
3326 
3327 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
3328 
3329 #define _IOCBP0                 0x01
3330 #define _IOCBP1                 0x02
3331 #define _IOCBP2                 0x04
3332 #define _IOCBP3                 0x08
3333 #define _IOCBP4                 0x10
3334 #define _IOCBP5                 0x20
3335 #define _IOCBP6                 0x40
3336 #define _IOCBP7                 0x80
3337 
3338 //==============================================================================
3339 
3340 
3341 //==============================================================================
3342 //        IOCBN Bits
3343 
3344 extern __at(0x0395) __sfr IOCBN;
3345 
3346 typedef struct
3347   {
3348   unsigned IOCBN0               : 1;
3349   unsigned IOCBN1               : 1;
3350   unsigned IOCBN2               : 1;
3351   unsigned IOCBN3               : 1;
3352   unsigned IOCBN4               : 1;
3353   unsigned IOCBN5               : 1;
3354   unsigned IOCBN6               : 1;
3355   unsigned IOCBN7               : 1;
3356   } __IOCBNbits_t;
3357 
3358 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
3359 
3360 #define _IOCBN0                 0x01
3361 #define _IOCBN1                 0x02
3362 #define _IOCBN2                 0x04
3363 #define _IOCBN3                 0x08
3364 #define _IOCBN4                 0x10
3365 #define _IOCBN5                 0x20
3366 #define _IOCBN6                 0x40
3367 #define _IOCBN7                 0x80
3368 
3369 //==============================================================================
3370 
3371 
3372 //==============================================================================
3373 //        IOCBF Bits
3374 
3375 extern __at(0x0396) __sfr IOCBF;
3376 
3377 typedef struct
3378   {
3379   unsigned IOCBF0               : 1;
3380   unsigned IOCBF1               : 1;
3381   unsigned IOCBF2               : 1;
3382   unsigned IOCBF3               : 1;
3383   unsigned IOCBF4               : 1;
3384   unsigned IOCBF5               : 1;
3385   unsigned IOCBF6               : 1;
3386   unsigned IOCBF7               : 1;
3387   } __IOCBFbits_t;
3388 
3389 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3390 
3391 #define _IOCBF0                 0x01
3392 #define _IOCBF1                 0x02
3393 #define _IOCBF2                 0x04
3394 #define _IOCBF3                 0x08
3395 #define _IOCBF4                 0x10
3396 #define _IOCBF5                 0x20
3397 #define _IOCBF6                 0x40
3398 #define _IOCBF7                 0x80
3399 
3400 //==============================================================================
3401 
3402 
3403 //==============================================================================
3404 //        IOCCP Bits
3405 
3406 extern __at(0x0397) __sfr IOCCP;
3407 
3408 typedef struct
3409   {
3410   unsigned IOCCP0               : 1;
3411   unsigned IOCCP1               : 1;
3412   unsigned IOCCP2               : 1;
3413   unsigned IOCCP3               : 1;
3414   unsigned IOCCP4               : 1;
3415   unsigned IOCCP5               : 1;
3416   unsigned IOCCP6               : 1;
3417   unsigned IOCCP7               : 1;
3418   } __IOCCPbits_t;
3419 
3420 extern __at(0x0397) volatile __IOCCPbits_t IOCCPbits;
3421 
3422 #define _IOCCP0                 0x01
3423 #define _IOCCP1                 0x02
3424 #define _IOCCP2                 0x04
3425 #define _IOCCP3                 0x08
3426 #define _IOCCP4                 0x10
3427 #define _IOCCP5                 0x20
3428 #define _IOCCP6                 0x40
3429 #define _IOCCP7                 0x80
3430 
3431 //==============================================================================
3432 
3433 
3434 //==============================================================================
3435 //        IOCCN Bits
3436 
3437 extern __at(0x0398) __sfr IOCCN;
3438 
3439 typedef struct
3440   {
3441   unsigned IOCCN0               : 1;
3442   unsigned IOCCN1               : 1;
3443   unsigned IOCCN2               : 1;
3444   unsigned IOCCN3               : 1;
3445   unsigned IOCCN4               : 1;
3446   unsigned IOCCN5               : 1;
3447   unsigned IOCCN6               : 1;
3448   unsigned IOCCN7               : 1;
3449   } __IOCCNbits_t;
3450 
3451 extern __at(0x0398) volatile __IOCCNbits_t IOCCNbits;
3452 
3453 #define _IOCCN0                 0x01
3454 #define _IOCCN1                 0x02
3455 #define _IOCCN2                 0x04
3456 #define _IOCCN3                 0x08
3457 #define _IOCCN4                 0x10
3458 #define _IOCCN5                 0x20
3459 #define _IOCCN6                 0x40
3460 #define _IOCCN7                 0x80
3461 
3462 //==============================================================================
3463 
3464 
3465 //==============================================================================
3466 //        IOCCF Bits
3467 
3468 extern __at(0x0399) __sfr IOCCF;
3469 
3470 typedef struct
3471   {
3472   unsigned IOCCF0               : 1;
3473   unsigned IOCCF1               : 1;
3474   unsigned IOCCF2               : 1;
3475   unsigned IOCCF3               : 1;
3476   unsigned IOCCF4               : 1;
3477   unsigned IOCCF5               : 1;
3478   unsigned IOCCF6               : 1;
3479   unsigned IOCCF7               : 1;
3480   } __IOCCFbits_t;
3481 
3482 extern __at(0x0399) volatile __IOCCFbits_t IOCCFbits;
3483 
3484 #define _IOCCF0                 0x01
3485 #define _IOCCF1                 0x02
3486 #define _IOCCF2                 0x04
3487 #define _IOCCF3                 0x08
3488 #define _IOCCF4                 0x10
3489 #define _IOCCF5                 0x20
3490 #define _IOCCF6                 0x40
3491 #define _IOCCF7                 0x80
3492 
3493 //==============================================================================
3494 
3495 
3496 //==============================================================================
3497 //        IOCEP Bits
3498 
3499 extern __at(0x039D) __sfr IOCEP;
3500 
3501 typedef struct
3502   {
3503   unsigned                      : 1;
3504   unsigned                      : 1;
3505   unsigned                      : 1;
3506   unsigned IOCEP3               : 1;
3507   unsigned                      : 1;
3508   unsigned                      : 1;
3509   unsigned                      : 1;
3510   unsigned                      : 1;
3511   } __IOCEPbits_t;
3512 
3513 extern __at(0x039D) volatile __IOCEPbits_t IOCEPbits;
3514 
3515 #define _IOCEP3                 0x08
3516 
3517 //==============================================================================
3518 
3519 
3520 //==============================================================================
3521 //        IOCEN Bits
3522 
3523 extern __at(0x039E) __sfr IOCEN;
3524 
3525 typedef struct
3526   {
3527   unsigned                      : 1;
3528   unsigned                      : 1;
3529   unsigned                      : 1;
3530   unsigned IOCEN3               : 1;
3531   unsigned                      : 1;
3532   unsigned                      : 1;
3533   unsigned                      : 1;
3534   unsigned                      : 1;
3535   } __IOCENbits_t;
3536 
3537 extern __at(0x039E) volatile __IOCENbits_t IOCENbits;
3538 
3539 #define _IOCEN3                 0x08
3540 
3541 //==============================================================================
3542 
3543 
3544 //==============================================================================
3545 //        IOCEF Bits
3546 
3547 extern __at(0x039F) __sfr IOCEF;
3548 
3549 typedef struct
3550   {
3551   unsigned                      : 1;
3552   unsigned                      : 1;
3553   unsigned                      : 1;
3554   unsigned IOCEF3               : 1;
3555   unsigned                      : 1;
3556   unsigned                      : 1;
3557   unsigned                      : 1;
3558   unsigned                      : 1;
3559   } __IOCEFbits_t;
3560 
3561 extern __at(0x039F) volatile __IOCEFbits_t IOCEFbits;
3562 
3563 #define _IOCEF3                 0x08
3564 
3565 //==============================================================================
3566 
3567 
3568 //==============================================================================
3569 //        OPA1CON Bits
3570 
3571 extern __at(0x0511) __sfr OPA1CON;
3572 
3573 typedef union
3574   {
3575   struct
3576     {
3577     unsigned OPA1CH0            : 1;
3578     unsigned OPA1CH1            : 1;
3579     unsigned                    : 1;
3580     unsigned                    : 1;
3581     unsigned                    : 1;
3582     unsigned                    : 1;
3583     unsigned OPA1SP             : 1;
3584     unsigned OPA1EN             : 1;
3585     };
3586 
3587   struct
3588     {
3589     unsigned OPA1CH             : 2;
3590     unsigned                    : 6;
3591     };
3592   } __OPA1CONbits_t;
3593 
3594 extern __at(0x0511) volatile __OPA1CONbits_t OPA1CONbits;
3595 
3596 #define _OPA1CH0                0x01
3597 #define _OPA1CH1                0x02
3598 #define _OPA1SP                 0x40
3599 #define _OPA1EN                 0x80
3600 
3601 //==============================================================================
3602 
3603 
3604 //==============================================================================
3605 //        OPA2CON Bits
3606 
3607 extern __at(0x0513) __sfr OPA2CON;
3608 
3609 typedef union
3610   {
3611   struct
3612     {
3613     unsigned OPA2CH0            : 1;
3614     unsigned OPA2CH1            : 1;
3615     unsigned                    : 1;
3616     unsigned                    : 1;
3617     unsigned                    : 1;
3618     unsigned                    : 1;
3619     unsigned OPA2SP             : 1;
3620     unsigned OPA2EN             : 1;
3621     };
3622 
3623   struct
3624     {
3625     unsigned OPA2CH             : 2;
3626     unsigned                    : 6;
3627     };
3628   } __OPA2CONbits_t;
3629 
3630 extern __at(0x0513) volatile __OPA2CONbits_t OPA2CONbits;
3631 
3632 #define _OPA2CH0                0x01
3633 #define _OPA2CH1                0x02
3634 #define _OPA2SP                 0x40
3635 #define _OPA2EN                 0x80
3636 
3637 //==============================================================================
3638 
3639 
3640 //==============================================================================
3641 //        CLKRCON Bits
3642 
3643 extern __at(0x051A) __sfr CLKRCON;
3644 
3645 typedef union
3646   {
3647   struct
3648     {
3649     unsigned CLKRDIV0           : 1;
3650     unsigned CLKRDIV1           : 1;
3651     unsigned CLKRDIV2           : 1;
3652     unsigned CLKRDC0            : 1;
3653     unsigned CLKRDC1            : 1;
3654     unsigned CLKRSLR            : 1;
3655     unsigned CLKROE             : 1;
3656     unsigned CLKREN             : 1;
3657     };
3658 
3659   struct
3660     {
3661     unsigned CLKRDIV            : 3;
3662     unsigned                    : 5;
3663     };
3664 
3665   struct
3666     {
3667     unsigned                    : 3;
3668     unsigned CLKRDC             : 2;
3669     unsigned                    : 3;
3670     };
3671   } __CLKRCONbits_t;
3672 
3673 extern __at(0x051A) volatile __CLKRCONbits_t CLKRCONbits;
3674 
3675 #define _CLKRDIV0               0x01
3676 #define _CLKRDIV1               0x02
3677 #define _CLKRDIV2               0x04
3678 #define _CLKRDC0                0x08
3679 #define _CLKRDC1                0x10
3680 #define _CLKRSLR                0x20
3681 #define _CLKROE                 0x40
3682 #define _CLKREN                 0x80
3683 
3684 //==============================================================================
3685 
3686 
3687 //==============================================================================
3688 //        PSMC1CON Bits
3689 
3690 extern __at(0x0811) __sfr PSMC1CON;
3691 
3692 typedef union
3693   {
3694   struct
3695     {
3696     unsigned P1MODE0            : 1;
3697     unsigned P1MODE1            : 1;
3698     unsigned P1MODE2            : 1;
3699     unsigned P1MODE3            : 1;
3700     unsigned P1DBRE             : 1;
3701     unsigned P1DBFE             : 1;
3702     unsigned PSMC1LD            : 1;
3703     unsigned PSMC1EN            : 1;
3704     };
3705 
3706   struct
3707     {
3708     unsigned P1MODE             : 4;
3709     unsigned                    : 4;
3710     };
3711   } __PSMC1CONbits_t;
3712 
3713 extern __at(0x0811) volatile __PSMC1CONbits_t PSMC1CONbits;
3714 
3715 #define _P1MODE0                0x01
3716 #define _P1MODE1                0x02
3717 #define _P1MODE2                0x04
3718 #define _P1MODE3                0x08
3719 #define _P1DBRE                 0x10
3720 #define _P1DBFE                 0x20
3721 #define _PSMC1LD                0x40
3722 #define _PSMC1EN                0x80
3723 
3724 //==============================================================================
3725 
3726 
3727 //==============================================================================
3728 //        PSMC1MDL Bits
3729 
3730 extern __at(0x0812) __sfr PSMC1MDL;
3731 
3732 typedef union
3733   {
3734   struct
3735     {
3736     unsigned P1MSRC0            : 1;
3737     unsigned P1MSRC1            : 1;
3738     unsigned P1MSRC2            : 1;
3739     unsigned P1MSRC3            : 1;
3740     unsigned                    : 1;
3741     unsigned P1MDLBIT           : 1;
3742     unsigned P1MDLPOL           : 1;
3743     unsigned P1MDLEN            : 1;
3744     };
3745 
3746   struct
3747     {
3748     unsigned P1MSRC             : 4;
3749     unsigned                    : 4;
3750     };
3751   } __PSMC1MDLbits_t;
3752 
3753 extern __at(0x0812) volatile __PSMC1MDLbits_t PSMC1MDLbits;
3754 
3755 #define _P1MSRC0                0x01
3756 #define _P1MSRC1                0x02
3757 #define _P1MSRC2                0x04
3758 #define _P1MSRC3                0x08
3759 #define _P1MDLBIT               0x20
3760 #define _P1MDLPOL               0x40
3761 #define _P1MDLEN                0x80
3762 
3763 //==============================================================================
3764 
3765 
3766 //==============================================================================
3767 //        PSMC1SYNC Bits
3768 
3769 extern __at(0x0813) __sfr PSMC1SYNC;
3770 
3771 typedef union
3772   {
3773   struct
3774     {
3775     unsigned P1SYNC0            : 1;
3776     unsigned P1SYNC1            : 1;
3777     unsigned                    : 1;
3778     unsigned                    : 1;
3779     unsigned                    : 1;
3780     unsigned                    : 1;
3781     unsigned                    : 1;
3782     unsigned                    : 1;
3783     };
3784 
3785   struct
3786     {
3787     unsigned P1SYNC             : 2;
3788     unsigned                    : 6;
3789     };
3790   } __PSMC1SYNCbits_t;
3791 
3792 extern __at(0x0813) volatile __PSMC1SYNCbits_t PSMC1SYNCbits;
3793 
3794 #define _P1SYNC0                0x01
3795 #define _P1SYNC1                0x02
3796 
3797 //==============================================================================
3798 
3799 
3800 //==============================================================================
3801 //        PSMC1CLK Bits
3802 
3803 extern __at(0x0814) __sfr PSMC1CLK;
3804 
3805 typedef union
3806   {
3807   struct
3808     {
3809     unsigned P1CSRC0            : 1;
3810     unsigned P1CSRC1            : 1;
3811     unsigned                    : 1;
3812     unsigned                    : 1;
3813     unsigned P1CPRE0            : 1;
3814     unsigned P1CPRE1            : 1;
3815     unsigned                    : 1;
3816     unsigned                    : 1;
3817     };
3818 
3819   struct
3820     {
3821     unsigned P1CSRC             : 2;
3822     unsigned                    : 6;
3823     };
3824 
3825   struct
3826     {
3827     unsigned                    : 4;
3828     unsigned P1CPRE             : 2;
3829     unsigned                    : 2;
3830     };
3831   } __PSMC1CLKbits_t;
3832 
3833 extern __at(0x0814) volatile __PSMC1CLKbits_t PSMC1CLKbits;
3834 
3835 #define _P1CSRC0                0x01
3836 #define _P1CSRC1                0x02
3837 #define _P1CPRE0                0x10
3838 #define _P1CPRE1                0x20
3839 
3840 //==============================================================================
3841 
3842 
3843 //==============================================================================
3844 //        PSMC1OEN Bits
3845 
3846 extern __at(0x0815) __sfr PSMC1OEN;
3847 
3848 typedef struct
3849   {
3850   unsigned P1OEA                : 1;
3851   unsigned P1OEB                : 1;
3852   unsigned P1OEC                : 1;
3853   unsigned P1OED                : 1;
3854   unsigned P1OEE                : 1;
3855   unsigned P1OEF                : 1;
3856   unsigned                      : 1;
3857   unsigned                      : 1;
3858   } __PSMC1OENbits_t;
3859 
3860 extern __at(0x0815) volatile __PSMC1OENbits_t PSMC1OENbits;
3861 
3862 #define _P1OEA                  0x01
3863 #define _P1OEB                  0x02
3864 #define _P1OEC                  0x04
3865 #define _P1OED                  0x08
3866 #define _P1OEE                  0x10
3867 #define _P1OEF                  0x20
3868 
3869 //==============================================================================
3870 
3871 
3872 //==============================================================================
3873 //        PSMC1POL Bits
3874 
3875 extern __at(0x0816) __sfr PSMC1POL;
3876 
3877 typedef struct
3878   {
3879   unsigned P1POLA               : 1;
3880   unsigned P1POLB               : 1;
3881   unsigned P1POLC               : 1;
3882   unsigned P1POLD               : 1;
3883   unsigned P1POLE               : 1;
3884   unsigned P1POLF               : 1;
3885   unsigned P1INPOL              : 1;
3886   unsigned                      : 1;
3887   } __PSMC1POLbits_t;
3888 
3889 extern __at(0x0816) volatile __PSMC1POLbits_t PSMC1POLbits;
3890 
3891 #define _P1POLA                 0x01
3892 #define _P1POLB                 0x02
3893 #define _P1POLC                 0x04
3894 #define _P1POLD                 0x08
3895 #define _P1POLE                 0x10
3896 #define _P1POLF                 0x20
3897 #define _P1INPOL                0x40
3898 
3899 //==============================================================================
3900 
3901 
3902 //==============================================================================
3903 //        PSMC1BLNK Bits
3904 
3905 extern __at(0x0817) __sfr PSMC1BLNK;
3906 
3907 typedef union
3908   {
3909   struct
3910     {
3911     unsigned P1REBM0            : 1;
3912     unsigned P1REBM1            : 1;
3913     unsigned                    : 1;
3914     unsigned                    : 1;
3915     unsigned P1FEBM0            : 1;
3916     unsigned P1FEBM1            : 1;
3917     unsigned                    : 1;
3918     unsigned                    : 1;
3919     };
3920 
3921   struct
3922     {
3923     unsigned P1REBM             : 2;
3924     unsigned                    : 6;
3925     };
3926 
3927   struct
3928     {
3929     unsigned                    : 4;
3930     unsigned P1FEBM             : 2;
3931     unsigned                    : 2;
3932     };
3933   } __PSMC1BLNKbits_t;
3934 
3935 extern __at(0x0817) volatile __PSMC1BLNKbits_t PSMC1BLNKbits;
3936 
3937 #define _P1REBM0                0x01
3938 #define _P1REBM1                0x02
3939 #define _P1FEBM0                0x10
3940 #define _P1FEBM1                0x20
3941 
3942 //==============================================================================
3943 
3944 
3945 //==============================================================================
3946 //        PSMC1REBS Bits
3947 
3948 extern __at(0x0818) __sfr PSMC1REBS;
3949 
3950 typedef struct
3951   {
3952   unsigned                      : 1;
3953   unsigned P1REBSC1             : 1;
3954   unsigned P1REBSC2             : 1;
3955   unsigned P1REBSC3             : 1;
3956   unsigned                      : 1;
3957   unsigned                      : 1;
3958   unsigned                      : 1;
3959   unsigned P1REBSIN             : 1;
3960   } __PSMC1REBSbits_t;
3961 
3962 extern __at(0x0818) volatile __PSMC1REBSbits_t PSMC1REBSbits;
3963 
3964 #define _P1REBSC1               0x02
3965 #define _P1REBSC2               0x04
3966 #define _P1REBSC3               0x08
3967 #define _P1REBSIN               0x80
3968 
3969 //==============================================================================
3970 
3971 
3972 //==============================================================================
3973 //        PSMC1FEBS Bits
3974 
3975 extern __at(0x0819) __sfr PSMC1FEBS;
3976 
3977 typedef struct
3978   {
3979   unsigned                      : 1;
3980   unsigned P1FEBSC1             : 1;
3981   unsigned P1FEBSC2             : 1;
3982   unsigned P1FEBSC3             : 1;
3983   unsigned                      : 1;
3984   unsigned                      : 1;
3985   unsigned                      : 1;
3986   unsigned P1FEBSIN             : 1;
3987   } __PSMC1FEBSbits_t;
3988 
3989 extern __at(0x0819) volatile __PSMC1FEBSbits_t PSMC1FEBSbits;
3990 
3991 #define _P1FEBSC1               0x02
3992 #define _P1FEBSC2               0x04
3993 #define _P1FEBSC3               0x08
3994 #define _P1FEBSIN               0x80
3995 
3996 //==============================================================================
3997 
3998 
3999 //==============================================================================
4000 //        PSMC1PHS Bits
4001 
4002 extern __at(0x081A) __sfr PSMC1PHS;
4003 
4004 typedef struct
4005   {
4006   unsigned P1PHST               : 1;
4007   unsigned P1PHSC1              : 1;
4008   unsigned P1PHSC2              : 1;
4009   unsigned P1PHSC3              : 1;
4010   unsigned                      : 1;
4011   unsigned                      : 1;
4012   unsigned                      : 1;
4013   unsigned P1PHSIN              : 1;
4014   } __PSMC1PHSbits_t;
4015 
4016 extern __at(0x081A) volatile __PSMC1PHSbits_t PSMC1PHSbits;
4017 
4018 #define _P1PHST                 0x01
4019 #define _P1PHSC1                0x02
4020 #define _P1PHSC2                0x04
4021 #define _P1PHSC3                0x08
4022 #define _P1PHSIN                0x80
4023 
4024 //==============================================================================
4025 
4026 
4027 //==============================================================================
4028 //        PSMC1DCS Bits
4029 
4030 extern __at(0x081B) __sfr PSMC1DCS;
4031 
4032 typedef struct
4033   {
4034   unsigned P1DCST               : 1;
4035   unsigned P1DCSC1              : 1;
4036   unsigned P1DCSC2              : 1;
4037   unsigned P1DCSC3              : 1;
4038   unsigned                      : 1;
4039   unsigned                      : 1;
4040   unsigned                      : 1;
4041   unsigned P1DCSIN              : 1;
4042   } __PSMC1DCSbits_t;
4043 
4044 extern __at(0x081B) volatile __PSMC1DCSbits_t PSMC1DCSbits;
4045 
4046 #define _P1DCST                 0x01
4047 #define _P1DCSC1                0x02
4048 #define _P1DCSC2                0x04
4049 #define _P1DCSC3                0x08
4050 #define _P1DCSIN                0x80
4051 
4052 //==============================================================================
4053 
4054 
4055 //==============================================================================
4056 //        PSMC1PRS Bits
4057 
4058 extern __at(0x081C) __sfr PSMC1PRS;
4059 
4060 typedef struct
4061   {
4062   unsigned P1PRST               : 1;
4063   unsigned P1PRSC1              : 1;
4064   unsigned P1PRSC2              : 1;
4065   unsigned P1PRSC3              : 1;
4066   unsigned                      : 1;
4067   unsigned                      : 1;
4068   unsigned                      : 1;
4069   unsigned P1PRSIN              : 1;
4070   } __PSMC1PRSbits_t;
4071 
4072 extern __at(0x081C) volatile __PSMC1PRSbits_t PSMC1PRSbits;
4073 
4074 #define _P1PRST                 0x01
4075 #define _P1PRSC1                0x02
4076 #define _P1PRSC2                0x04
4077 #define _P1PRSC3                0x08
4078 #define _P1PRSIN                0x80
4079 
4080 //==============================================================================
4081 
4082 
4083 //==============================================================================
4084 //        PSMC1ASDC Bits
4085 
4086 extern __at(0x081D) __sfr PSMC1ASDC;
4087 
4088 typedef struct
4089   {
4090   unsigned P1ASDOV              : 1;
4091   unsigned                      : 1;
4092   unsigned                      : 1;
4093   unsigned                      : 1;
4094   unsigned                      : 1;
4095   unsigned P1ARSEN              : 1;
4096   unsigned P1ASDEN              : 1;
4097   unsigned P1ASE                : 1;
4098   } __PSMC1ASDCbits_t;
4099 
4100 extern __at(0x081D) volatile __PSMC1ASDCbits_t PSMC1ASDCbits;
4101 
4102 #define _P1ASDOV                0x01
4103 #define _P1ARSEN                0x20
4104 #define _P1ASDEN                0x40
4105 #define _P1ASE                  0x80
4106 
4107 //==============================================================================
4108 
4109 
4110 //==============================================================================
4111 //        PSMC1ASDL Bits
4112 
4113 extern __at(0x081E) __sfr PSMC1ASDL;
4114 
4115 typedef struct
4116   {
4117   unsigned P1ASDLA              : 1;
4118   unsigned P1ASDLB              : 1;
4119   unsigned P1ASDLC              : 1;
4120   unsigned P1ASDLD              : 1;
4121   unsigned P1ASDLE              : 1;
4122   unsigned P1ASDLF              : 1;
4123   unsigned                      : 1;
4124   unsigned                      : 1;
4125   } __PSMC1ASDLbits_t;
4126 
4127 extern __at(0x081E) volatile __PSMC1ASDLbits_t PSMC1ASDLbits;
4128 
4129 #define _P1ASDLA                0x01
4130 #define _P1ASDLB                0x02
4131 #define _P1ASDLC                0x04
4132 #define _P1ASDLD                0x08
4133 #define _P1ASDLE                0x10
4134 #define _P1ASDLF                0x20
4135 
4136 //==============================================================================
4137 
4138 
4139 //==============================================================================
4140 //        PSMC1ASDS Bits
4141 
4142 extern __at(0x081F) __sfr PSMC1ASDS;
4143 
4144 typedef struct
4145   {
4146   unsigned                      : 1;
4147   unsigned P1ASDSC1             : 1;
4148   unsigned P1ASDSC2             : 1;
4149   unsigned P1ASDSC3             : 1;
4150   unsigned                      : 1;
4151   unsigned                      : 1;
4152   unsigned                      : 1;
4153   unsigned P1ASDSIN             : 1;
4154   } __PSMC1ASDSbits_t;
4155 
4156 extern __at(0x081F) volatile __PSMC1ASDSbits_t PSMC1ASDSbits;
4157 
4158 #define _P1ASDSC1               0x02
4159 #define _P1ASDSC2               0x04
4160 #define _P1ASDSC3               0x08
4161 #define _P1ASDSIN               0x80
4162 
4163 //==============================================================================
4164 
4165 
4166 //==============================================================================
4167 //        PSMC1INT Bits
4168 
4169 extern __at(0x0820) __sfr PSMC1INT;
4170 
4171 typedef struct
4172   {
4173   unsigned P1TPRIF              : 1;
4174   unsigned P1TDCIF              : 1;
4175   unsigned P1TPHIF              : 1;
4176   unsigned P1TOVIF              : 1;
4177   unsigned P1TPRIE              : 1;
4178   unsigned P1TDCIE              : 1;
4179   unsigned P1TPHIE              : 1;
4180   unsigned P1TOVIE              : 1;
4181   } __PSMC1INTbits_t;
4182 
4183 extern __at(0x0820) volatile __PSMC1INTbits_t PSMC1INTbits;
4184 
4185 #define _P1TPRIF                0x01
4186 #define _P1TDCIF                0x02
4187 #define _P1TPHIF                0x04
4188 #define _P1TOVIF                0x08
4189 #define _P1TPRIE                0x10
4190 #define _P1TDCIE                0x20
4191 #define _P1TPHIE                0x40
4192 #define _P1TOVIE                0x80
4193 
4194 //==============================================================================
4195 
4196 extern __at(0x0821) __sfr PSMC1PH;
4197 
4198 //==============================================================================
4199 //        PSMC1PHL Bits
4200 
4201 extern __at(0x0821) __sfr PSMC1PHL;
4202 
4203 typedef struct
4204   {
4205   unsigned PSMC1PH0             : 1;
4206   unsigned PSMC1PH1             : 1;
4207   unsigned PSMC1PH2             : 1;
4208   unsigned PSMC1PH3             : 1;
4209   unsigned PSMC1PH4             : 1;
4210   unsigned PSMC1PH5             : 1;
4211   unsigned PSMC1PH6             : 1;
4212   unsigned PSMC1PH7             : 1;
4213   } __PSMC1PHLbits_t;
4214 
4215 extern __at(0x0821) volatile __PSMC1PHLbits_t PSMC1PHLbits;
4216 
4217 #define _PSMC1PH0               0x01
4218 #define _PSMC1PH1               0x02
4219 #define _PSMC1PH2               0x04
4220 #define _PSMC1PH3               0x08
4221 #define _PSMC1PH4               0x10
4222 #define _PSMC1PH5               0x20
4223 #define _PSMC1PH6               0x40
4224 #define _PSMC1PH7               0x80
4225 
4226 //==============================================================================
4227 
4228 
4229 //==============================================================================
4230 //        PSMC1PHH Bits
4231 
4232 extern __at(0x0822) __sfr PSMC1PHH;
4233 
4234 typedef struct
4235   {
4236   unsigned PSMC1PH8             : 1;
4237   unsigned PSMC1PH9             : 1;
4238   unsigned PSMC1PH10            : 1;
4239   unsigned PSMC1PH11            : 1;
4240   unsigned PSMC1PH12            : 1;
4241   unsigned PSMC1PH13            : 1;
4242   unsigned PSMC1PH14            : 1;
4243   unsigned PSMC1PH15            : 1;
4244   } __PSMC1PHHbits_t;
4245 
4246 extern __at(0x0822) volatile __PSMC1PHHbits_t PSMC1PHHbits;
4247 
4248 #define _PSMC1PH8               0x01
4249 #define _PSMC1PH9               0x02
4250 #define _PSMC1PH10              0x04
4251 #define _PSMC1PH11              0x08
4252 #define _PSMC1PH12              0x10
4253 #define _PSMC1PH13              0x20
4254 #define _PSMC1PH14              0x40
4255 #define _PSMC1PH15              0x80
4256 
4257 //==============================================================================
4258 
4259 extern __at(0x0823) __sfr PSMC1DC;
4260 
4261 //==============================================================================
4262 //        PSMC1DCL Bits
4263 
4264 extern __at(0x0823) __sfr PSMC1DCL;
4265 
4266 typedef struct
4267   {
4268   unsigned PSMC1DC0             : 1;
4269   unsigned PSMC1DC1             : 1;
4270   unsigned PSMC1DC2             : 1;
4271   unsigned PSMC1DC3             : 1;
4272   unsigned PSMC1DC4             : 1;
4273   unsigned PSMC1DC5             : 1;
4274   unsigned PSMC1DC6             : 1;
4275   unsigned PSMC1DC7             : 1;
4276   } __PSMC1DCLbits_t;
4277 
4278 extern __at(0x0823) volatile __PSMC1DCLbits_t PSMC1DCLbits;
4279 
4280 #define _PSMC1DC0               0x01
4281 #define _PSMC1DC1               0x02
4282 #define _PSMC1DC2               0x04
4283 #define _PSMC1DC3               0x08
4284 #define _PSMC1DC4               0x10
4285 #define _PSMC1DC5               0x20
4286 #define _PSMC1DC6               0x40
4287 #define _PSMC1DC7               0x80
4288 
4289 //==============================================================================
4290 
4291 
4292 //==============================================================================
4293 //        PSMC1DCH Bits
4294 
4295 extern __at(0x0824) __sfr PSMC1DCH;
4296 
4297 typedef struct
4298   {
4299   unsigned PSMC1DC8             : 1;
4300   unsigned PSMC1DC9             : 1;
4301   unsigned PSMC1DC10            : 1;
4302   unsigned PSMC1DC11            : 1;
4303   unsigned PSMC1DC12            : 1;
4304   unsigned PSMC1DC13            : 1;
4305   unsigned PSMC1DC14            : 1;
4306   unsigned PSMC1DC15            : 1;
4307   } __PSMC1DCHbits_t;
4308 
4309 extern __at(0x0824) volatile __PSMC1DCHbits_t PSMC1DCHbits;
4310 
4311 #define _PSMC1DC8               0x01
4312 #define _PSMC1DC9               0x02
4313 #define _PSMC1DC10              0x04
4314 #define _PSMC1DC11              0x08
4315 #define _PSMC1DC12              0x10
4316 #define _PSMC1DC13              0x20
4317 #define _PSMC1DC14              0x40
4318 #define _PSMC1DC15              0x80
4319 
4320 //==============================================================================
4321 
4322 extern __at(0x0825) __sfr PSMC1PR;
4323 
4324 //==============================================================================
4325 //        PSMC1PRL Bits
4326 
4327 extern __at(0x0825) __sfr PSMC1PRL;
4328 
4329 typedef struct
4330   {
4331   unsigned PSMC1PR0             : 1;
4332   unsigned PSMC1PR1             : 1;
4333   unsigned PSMC1PR2             : 1;
4334   unsigned PSMC1PR3             : 1;
4335   unsigned PSMC1PR4             : 1;
4336   unsigned PSMC1PR5             : 1;
4337   unsigned PSMC1PR6             : 1;
4338   unsigned PSMC1PR7             : 1;
4339   } __PSMC1PRLbits_t;
4340 
4341 extern __at(0x0825) volatile __PSMC1PRLbits_t PSMC1PRLbits;
4342 
4343 #define _PSMC1PR0               0x01
4344 #define _PSMC1PR1               0x02
4345 #define _PSMC1PR2               0x04
4346 #define _PSMC1PR3               0x08
4347 #define _PSMC1PR4               0x10
4348 #define _PSMC1PR5               0x20
4349 #define _PSMC1PR6               0x40
4350 #define _PSMC1PR7               0x80
4351 
4352 //==============================================================================
4353 
4354 
4355 //==============================================================================
4356 //        PSMC1PRH Bits
4357 
4358 extern __at(0x0826) __sfr PSMC1PRH;
4359 
4360 typedef struct
4361   {
4362   unsigned PSMC1PR8             : 1;
4363   unsigned PSMC1PR9             : 1;
4364   unsigned PSMC1PR10            : 1;
4365   unsigned PSMC1PR11            : 1;
4366   unsigned PSMC1PR12            : 1;
4367   unsigned PSMC1PR13            : 1;
4368   unsigned PSMC1PR14            : 1;
4369   unsigned PSMC1PR15            : 1;
4370   } __PSMC1PRHbits_t;
4371 
4372 extern __at(0x0826) volatile __PSMC1PRHbits_t PSMC1PRHbits;
4373 
4374 #define _PSMC1PR8               0x01
4375 #define _PSMC1PR9               0x02
4376 #define _PSMC1PR10              0x04
4377 #define _PSMC1PR11              0x08
4378 #define _PSMC1PR12              0x10
4379 #define _PSMC1PR13              0x20
4380 #define _PSMC1PR14              0x40
4381 #define _PSMC1PR15              0x80
4382 
4383 //==============================================================================
4384 
4385 extern __at(0x0827) __sfr PSMC1TMR;
4386 
4387 //==============================================================================
4388 //        PSMC1TMRL Bits
4389 
4390 extern __at(0x0827) __sfr PSMC1TMRL;
4391 
4392 typedef struct
4393   {
4394   unsigned PSMC1TMR0            : 1;
4395   unsigned PSMC1TMR1            : 1;
4396   unsigned PSMC1TMR2            : 1;
4397   unsigned PSMC1TMR3            : 1;
4398   unsigned PSMC1TMR4            : 1;
4399   unsigned PSMC1TMR5            : 1;
4400   unsigned PSMC1TMR6            : 1;
4401   unsigned PSMC1TMR7            : 1;
4402   } __PSMC1TMRLbits_t;
4403 
4404 extern __at(0x0827) volatile __PSMC1TMRLbits_t PSMC1TMRLbits;
4405 
4406 #define _PSMC1TMR0              0x01
4407 #define _PSMC1TMR1              0x02
4408 #define _PSMC1TMR2              0x04
4409 #define _PSMC1TMR3              0x08
4410 #define _PSMC1TMR4              0x10
4411 #define _PSMC1TMR5              0x20
4412 #define _PSMC1TMR6              0x40
4413 #define _PSMC1TMR7              0x80
4414 
4415 //==============================================================================
4416 
4417 
4418 //==============================================================================
4419 //        PSMC1TMRH Bits
4420 
4421 extern __at(0x0828) __sfr PSMC1TMRH;
4422 
4423 typedef struct
4424   {
4425   unsigned PSMC1TMR8            : 1;
4426   unsigned PSMC1TMR9            : 1;
4427   unsigned PSMC1TMR10           : 1;
4428   unsigned PSMC1TMR11           : 1;
4429   unsigned PSMC1TMR12           : 1;
4430   unsigned PSMC1TMR13           : 1;
4431   unsigned PSMC1TMR14           : 1;
4432   unsigned PSMC1TMR15           : 1;
4433   } __PSMC1TMRHbits_t;
4434 
4435 extern __at(0x0828) volatile __PSMC1TMRHbits_t PSMC1TMRHbits;
4436 
4437 #define _PSMC1TMR8              0x01
4438 #define _PSMC1TMR9              0x02
4439 #define _PSMC1TMR10             0x04
4440 #define _PSMC1TMR11             0x08
4441 #define _PSMC1TMR12             0x10
4442 #define _PSMC1TMR13             0x20
4443 #define _PSMC1TMR14             0x40
4444 #define _PSMC1TMR15             0x80
4445 
4446 //==============================================================================
4447 
4448 
4449 //==============================================================================
4450 //        PSMC1DBR Bits
4451 
4452 extern __at(0x0829) __sfr PSMC1DBR;
4453 
4454 typedef struct
4455   {
4456   unsigned PSMC1DBR0            : 1;
4457   unsigned PSMC1DBR1            : 1;
4458   unsigned PSMC1DBR2            : 1;
4459   unsigned PSMC1DBR3            : 1;
4460   unsigned PSMC1DBR4            : 1;
4461   unsigned PSMC1DBR5            : 1;
4462   unsigned PSMC1DBR6            : 1;
4463   unsigned PSMC1DBR7            : 1;
4464   } __PSMC1DBRbits_t;
4465 
4466 extern __at(0x0829) volatile __PSMC1DBRbits_t PSMC1DBRbits;
4467 
4468 #define _PSMC1DBR0              0x01
4469 #define _PSMC1DBR1              0x02
4470 #define _PSMC1DBR2              0x04
4471 #define _PSMC1DBR3              0x08
4472 #define _PSMC1DBR4              0x10
4473 #define _PSMC1DBR5              0x20
4474 #define _PSMC1DBR6              0x40
4475 #define _PSMC1DBR7              0x80
4476 
4477 //==============================================================================
4478 
4479 
4480 //==============================================================================
4481 //        PSMC1DBF Bits
4482 
4483 extern __at(0x082A) __sfr PSMC1DBF;
4484 
4485 typedef struct
4486   {
4487   unsigned PSMC1DBF0            : 1;
4488   unsigned PSMC1DBF1            : 1;
4489   unsigned PSMC1DBF2            : 1;
4490   unsigned PSMC1DBF3            : 1;
4491   unsigned PSMC1DBF4            : 1;
4492   unsigned PSMC1DBF5            : 1;
4493   unsigned PSMC1DBF6            : 1;
4494   unsigned PSMC1DBF7            : 1;
4495   } __PSMC1DBFbits_t;
4496 
4497 extern __at(0x082A) volatile __PSMC1DBFbits_t PSMC1DBFbits;
4498 
4499 #define _PSMC1DBF0              0x01
4500 #define _PSMC1DBF1              0x02
4501 #define _PSMC1DBF2              0x04
4502 #define _PSMC1DBF3              0x08
4503 #define _PSMC1DBF4              0x10
4504 #define _PSMC1DBF5              0x20
4505 #define _PSMC1DBF6              0x40
4506 #define _PSMC1DBF7              0x80
4507 
4508 //==============================================================================
4509 
4510 
4511 //==============================================================================
4512 //        PSMC1BLKR Bits
4513 
4514 extern __at(0x082B) __sfr PSMC1BLKR;
4515 
4516 typedef struct
4517   {
4518   unsigned PSMC1BLKR0           : 1;
4519   unsigned PSMC1BLKR1           : 1;
4520   unsigned PSMC1BLKR2           : 1;
4521   unsigned PSMC1BLKR3           : 1;
4522   unsigned PSMC1BLKR4           : 1;
4523   unsigned PSMC1BLKR5           : 1;
4524   unsigned PSMC1BLKR6           : 1;
4525   unsigned PSMC1BLKR7           : 1;
4526   } __PSMC1BLKRbits_t;
4527 
4528 extern __at(0x082B) volatile __PSMC1BLKRbits_t PSMC1BLKRbits;
4529 
4530 #define _PSMC1BLKR0             0x01
4531 #define _PSMC1BLKR1             0x02
4532 #define _PSMC1BLKR2             0x04
4533 #define _PSMC1BLKR3             0x08
4534 #define _PSMC1BLKR4             0x10
4535 #define _PSMC1BLKR5             0x20
4536 #define _PSMC1BLKR6             0x40
4537 #define _PSMC1BLKR7             0x80
4538 
4539 //==============================================================================
4540 
4541 
4542 //==============================================================================
4543 //        PSMC1BLKF Bits
4544 
4545 extern __at(0x082C) __sfr PSMC1BLKF;
4546 
4547 typedef struct
4548   {
4549   unsigned PSMC1BLKF0           : 1;
4550   unsigned PSMC1BLKF1           : 1;
4551   unsigned PSMC1BLKF2           : 1;
4552   unsigned PSMC1BLKF3           : 1;
4553   unsigned PSMC1BLKF4           : 1;
4554   unsigned PSMC1BLKF5           : 1;
4555   unsigned PSMC1BLKF6           : 1;
4556   unsigned PSMC1BLKF7           : 1;
4557   } __PSMC1BLKFbits_t;
4558 
4559 extern __at(0x082C) volatile __PSMC1BLKFbits_t PSMC1BLKFbits;
4560 
4561 #define _PSMC1BLKF0             0x01
4562 #define _PSMC1BLKF1             0x02
4563 #define _PSMC1BLKF2             0x04
4564 #define _PSMC1BLKF3             0x08
4565 #define _PSMC1BLKF4             0x10
4566 #define _PSMC1BLKF5             0x20
4567 #define _PSMC1BLKF6             0x40
4568 #define _PSMC1BLKF7             0x80
4569 
4570 //==============================================================================
4571 
4572 
4573 //==============================================================================
4574 //        PSMC1FFA Bits
4575 
4576 extern __at(0x082D) __sfr PSMC1FFA;
4577 
4578 typedef union
4579   {
4580   struct
4581     {
4582     unsigned PSMC1FFA0          : 1;
4583     unsigned PSMC1FFA1          : 1;
4584     unsigned PSMC1FFA2          : 1;
4585     unsigned PSMC1FFA3          : 1;
4586     unsigned                    : 1;
4587     unsigned                    : 1;
4588     unsigned                    : 1;
4589     unsigned                    : 1;
4590     };
4591 
4592   struct
4593     {
4594     unsigned PSMC1FFA           : 4;
4595     unsigned                    : 4;
4596     };
4597   } __PSMC1FFAbits_t;
4598 
4599 extern __at(0x082D) volatile __PSMC1FFAbits_t PSMC1FFAbits;
4600 
4601 #define _PSMC1FFA0              0x01
4602 #define _PSMC1FFA1              0x02
4603 #define _PSMC1FFA2              0x04
4604 #define _PSMC1FFA3              0x08
4605 
4606 //==============================================================================
4607 
4608 
4609 //==============================================================================
4610 //        PSMC1STR0 Bits
4611 
4612 extern __at(0x082E) __sfr PSMC1STR0;
4613 
4614 typedef struct
4615   {
4616   unsigned P1STRA               : 1;
4617   unsigned P1STRB               : 1;
4618   unsigned P1STRC               : 1;
4619   unsigned P1STRD               : 1;
4620   unsigned P1STRE               : 1;
4621   unsigned P1STRF               : 1;
4622   unsigned                      : 1;
4623   unsigned                      : 1;
4624   } __PSMC1STR0bits_t;
4625 
4626 extern __at(0x082E) volatile __PSMC1STR0bits_t PSMC1STR0bits;
4627 
4628 #define _P1STRA                 0x01
4629 #define _P1STRB                 0x02
4630 #define _P1STRC                 0x04
4631 #define _P1STRD                 0x08
4632 #define _P1STRE                 0x10
4633 #define _P1STRF                 0x20
4634 
4635 //==============================================================================
4636 
4637 
4638 //==============================================================================
4639 //        PSMC1STR1 Bits
4640 
4641 extern __at(0x082F) __sfr PSMC1STR1;
4642 
4643 typedef struct
4644   {
4645   unsigned P1HSMEN              : 1;
4646   unsigned P1LSMEN              : 1;
4647   unsigned                      : 1;
4648   unsigned                      : 1;
4649   unsigned                      : 1;
4650   unsigned                      : 1;
4651   unsigned                      : 1;
4652   unsigned P1SSYNC              : 1;
4653   } __PSMC1STR1bits_t;
4654 
4655 extern __at(0x082F) volatile __PSMC1STR1bits_t PSMC1STR1bits;
4656 
4657 #define _P1HSMEN                0x01
4658 #define _P1LSMEN                0x02
4659 #define _P1SSYNC                0x80
4660 
4661 //==============================================================================
4662 
4663 
4664 //==============================================================================
4665 //        PSMC2CON Bits
4666 
4667 extern __at(0x0831) __sfr PSMC2CON;
4668 
4669 typedef union
4670   {
4671   struct
4672     {
4673     unsigned P2MODE0            : 1;
4674     unsigned P2MODE1            : 1;
4675     unsigned P2MODE2            : 1;
4676     unsigned P2MODE3            : 1;
4677     unsigned P2DBRE             : 1;
4678     unsigned P2DBFE             : 1;
4679     unsigned PSMC2LD            : 1;
4680     unsigned PSMC2EN            : 1;
4681     };
4682 
4683   struct
4684     {
4685     unsigned P2MODE             : 4;
4686     unsigned                    : 4;
4687     };
4688   } __PSMC2CONbits_t;
4689 
4690 extern __at(0x0831) volatile __PSMC2CONbits_t PSMC2CONbits;
4691 
4692 #define _P2MODE0                0x01
4693 #define _P2MODE1                0x02
4694 #define _P2MODE2                0x04
4695 #define _P2MODE3                0x08
4696 #define _P2DBRE                 0x10
4697 #define _P2DBFE                 0x20
4698 #define _PSMC2LD                0x40
4699 #define _PSMC2EN                0x80
4700 
4701 //==============================================================================
4702 
4703 
4704 //==============================================================================
4705 //        PSMC2MDL Bits
4706 
4707 extern __at(0x0832) __sfr PSMC2MDL;
4708 
4709 typedef union
4710   {
4711   struct
4712     {
4713     unsigned P2MSRC0            : 1;
4714     unsigned P2MSRC1            : 1;
4715     unsigned P2MSRC2            : 1;
4716     unsigned P2MSRC3            : 1;
4717     unsigned                    : 1;
4718     unsigned P2MDLBIT           : 1;
4719     unsigned P2MDLPOL           : 1;
4720     unsigned P2MDLEN            : 1;
4721     };
4722 
4723   struct
4724     {
4725     unsigned P2MSRC             : 4;
4726     unsigned                    : 4;
4727     };
4728   } __PSMC2MDLbits_t;
4729 
4730 extern __at(0x0832) volatile __PSMC2MDLbits_t PSMC2MDLbits;
4731 
4732 #define _P2MSRC0                0x01
4733 #define _P2MSRC1                0x02
4734 #define _P2MSRC2                0x04
4735 #define _P2MSRC3                0x08
4736 #define _P2MDLBIT               0x20
4737 #define _P2MDLPOL               0x40
4738 #define _P2MDLEN                0x80
4739 
4740 //==============================================================================
4741 
4742 
4743 //==============================================================================
4744 //        PSMC2SYNC Bits
4745 
4746 extern __at(0x0833) __sfr PSMC2SYNC;
4747 
4748 typedef union
4749   {
4750   struct
4751     {
4752     unsigned P2SYNC0            : 1;
4753     unsigned P2SYNC1            : 1;
4754     unsigned                    : 1;
4755     unsigned                    : 1;
4756     unsigned                    : 1;
4757     unsigned                    : 1;
4758     unsigned                    : 1;
4759     unsigned                    : 1;
4760     };
4761 
4762   struct
4763     {
4764     unsigned P2SYNC             : 2;
4765     unsigned                    : 6;
4766     };
4767   } __PSMC2SYNCbits_t;
4768 
4769 extern __at(0x0833) volatile __PSMC2SYNCbits_t PSMC2SYNCbits;
4770 
4771 #define _P2SYNC0                0x01
4772 #define _P2SYNC1                0x02
4773 
4774 //==============================================================================
4775 
4776 
4777 //==============================================================================
4778 //        PSMC2CLK Bits
4779 
4780 extern __at(0x0834) __sfr PSMC2CLK;
4781 
4782 typedef union
4783   {
4784   struct
4785     {
4786     unsigned P2CSRC0            : 1;
4787     unsigned P2CSRC1            : 1;
4788     unsigned                    : 1;
4789     unsigned                    : 1;
4790     unsigned P2CPRE0            : 1;
4791     unsigned P2CPRE1            : 1;
4792     unsigned                    : 1;
4793     unsigned                    : 1;
4794     };
4795 
4796   struct
4797     {
4798     unsigned P2CSRC             : 2;
4799     unsigned                    : 6;
4800     };
4801 
4802   struct
4803     {
4804     unsigned                    : 4;
4805     unsigned P2CPRE             : 2;
4806     unsigned                    : 2;
4807     };
4808   } __PSMC2CLKbits_t;
4809 
4810 extern __at(0x0834) volatile __PSMC2CLKbits_t PSMC2CLKbits;
4811 
4812 #define _P2CSRC0                0x01
4813 #define _P2CSRC1                0x02
4814 #define _P2CPRE0                0x10
4815 #define _P2CPRE1                0x20
4816 
4817 //==============================================================================
4818 
4819 
4820 //==============================================================================
4821 //        PSMC2OEN Bits
4822 
4823 extern __at(0x0835) __sfr PSMC2OEN;
4824 
4825 typedef struct
4826   {
4827   unsigned P2OEA                : 1;
4828   unsigned P2OEB                : 1;
4829   unsigned                      : 1;
4830   unsigned                      : 1;
4831   unsigned                      : 1;
4832   unsigned                      : 1;
4833   unsigned                      : 1;
4834   unsigned                      : 1;
4835   } __PSMC2OENbits_t;
4836 
4837 extern __at(0x0835) volatile __PSMC2OENbits_t PSMC2OENbits;
4838 
4839 #define _P2OEA                  0x01
4840 #define _P2OEB                  0x02
4841 
4842 //==============================================================================
4843 
4844 
4845 //==============================================================================
4846 //        PSMC2POL Bits
4847 
4848 extern __at(0x0836) __sfr PSMC2POL;
4849 
4850 typedef struct
4851   {
4852   unsigned P2POLA               : 1;
4853   unsigned P2POLB               : 1;
4854   unsigned                      : 1;
4855   unsigned                      : 1;
4856   unsigned                      : 1;
4857   unsigned                      : 1;
4858   unsigned P2INPOL              : 1;
4859   unsigned                      : 1;
4860   } __PSMC2POLbits_t;
4861 
4862 extern __at(0x0836) volatile __PSMC2POLbits_t PSMC2POLbits;
4863 
4864 #define _P2POLA                 0x01
4865 #define _P2POLB                 0x02
4866 #define _P2INPOL                0x40
4867 
4868 //==============================================================================
4869 
4870 
4871 //==============================================================================
4872 //        PSMC2BLNK Bits
4873 
4874 extern __at(0x0837) __sfr PSMC2BLNK;
4875 
4876 typedef union
4877   {
4878   struct
4879     {
4880     unsigned P2REBM0            : 1;
4881     unsigned P2REBM1            : 1;
4882     unsigned                    : 1;
4883     unsigned                    : 1;
4884     unsigned P2FEBM0            : 1;
4885     unsigned P2FEBM1            : 1;
4886     unsigned                    : 1;
4887     unsigned                    : 1;
4888     };
4889 
4890   struct
4891     {
4892     unsigned P2REBM             : 2;
4893     unsigned                    : 6;
4894     };
4895 
4896   struct
4897     {
4898     unsigned                    : 4;
4899     unsigned P2FEBM             : 2;
4900     unsigned                    : 2;
4901     };
4902   } __PSMC2BLNKbits_t;
4903 
4904 extern __at(0x0837) volatile __PSMC2BLNKbits_t PSMC2BLNKbits;
4905 
4906 #define _P2REBM0                0x01
4907 #define _P2REBM1                0x02
4908 #define _P2FEBM0                0x10
4909 #define _P2FEBM1                0x20
4910 
4911 //==============================================================================
4912 
4913 
4914 //==============================================================================
4915 //        PSMC2REBS Bits
4916 
4917 extern __at(0x0838) __sfr PSMC2REBS;
4918 
4919 typedef struct
4920   {
4921   unsigned                      : 1;
4922   unsigned P2REBSC1             : 1;
4923   unsigned P2REBSC2             : 1;
4924   unsigned P2REBSC3             : 1;
4925   unsigned                      : 1;
4926   unsigned                      : 1;
4927   unsigned                      : 1;
4928   unsigned P2REBSIN             : 1;
4929   } __PSMC2REBSbits_t;
4930 
4931 extern __at(0x0838) volatile __PSMC2REBSbits_t PSMC2REBSbits;
4932 
4933 #define _P2REBSC1               0x02
4934 #define _P2REBSC2               0x04
4935 #define _P2REBSC3               0x08
4936 #define _P2REBSIN               0x80
4937 
4938 //==============================================================================
4939 
4940 
4941 //==============================================================================
4942 //        PSMC2FEBS Bits
4943 
4944 extern __at(0x0839) __sfr PSMC2FEBS;
4945 
4946 typedef struct
4947   {
4948   unsigned                      : 1;
4949   unsigned P2FEBSC1             : 1;
4950   unsigned P2FEBSC2             : 1;
4951   unsigned P2FEBSC3             : 1;
4952   unsigned                      : 1;
4953   unsigned                      : 1;
4954   unsigned                      : 1;
4955   unsigned P2FEBSIN             : 1;
4956   } __PSMC2FEBSbits_t;
4957 
4958 extern __at(0x0839) volatile __PSMC2FEBSbits_t PSMC2FEBSbits;
4959 
4960 #define _P2FEBSC1               0x02
4961 #define _P2FEBSC2               0x04
4962 #define _P2FEBSC3               0x08
4963 #define _P2FEBSIN               0x80
4964 
4965 //==============================================================================
4966 
4967 
4968 //==============================================================================
4969 //        PSMC2PHS Bits
4970 
4971 extern __at(0x083A) __sfr PSMC2PHS;
4972 
4973 typedef struct
4974   {
4975   unsigned P2PHST               : 1;
4976   unsigned P2PHSC1              : 1;
4977   unsigned P2PHSC2              : 1;
4978   unsigned P2PHSC3              : 1;
4979   unsigned                      : 1;
4980   unsigned                      : 1;
4981   unsigned                      : 1;
4982   unsigned P2PHSIN              : 1;
4983   } __PSMC2PHSbits_t;
4984 
4985 extern __at(0x083A) volatile __PSMC2PHSbits_t PSMC2PHSbits;
4986 
4987 #define _P2PHST                 0x01
4988 #define _P2PHSC1                0x02
4989 #define _P2PHSC2                0x04
4990 #define _P2PHSC3                0x08
4991 #define _P2PHSIN                0x80
4992 
4993 //==============================================================================
4994 
4995 
4996 //==============================================================================
4997 //        PSMC2DCS Bits
4998 
4999 extern __at(0x083B) __sfr PSMC2DCS;
5000 
5001 typedef struct
5002   {
5003   unsigned P2DCST               : 1;
5004   unsigned P2DCSC1              : 1;
5005   unsigned P2DCSC2              : 1;
5006   unsigned P2DCSC3              : 1;
5007   unsigned                      : 1;
5008   unsigned                      : 1;
5009   unsigned                      : 1;
5010   unsigned P2DCSIN              : 1;
5011   } __PSMC2DCSbits_t;
5012 
5013 extern __at(0x083B) volatile __PSMC2DCSbits_t PSMC2DCSbits;
5014 
5015 #define _P2DCST                 0x01
5016 #define _P2DCSC1                0x02
5017 #define _P2DCSC2                0x04
5018 #define _P2DCSC3                0x08
5019 #define _P2DCSIN                0x80
5020 
5021 //==============================================================================
5022 
5023 
5024 //==============================================================================
5025 //        PSMC2PRS Bits
5026 
5027 extern __at(0x083C) __sfr PSMC2PRS;
5028 
5029 typedef struct
5030   {
5031   unsigned P2PRST               : 1;
5032   unsigned P2PRSC1              : 1;
5033   unsigned P2PRSC2              : 1;
5034   unsigned P2PRSC3              : 1;
5035   unsigned                      : 1;
5036   unsigned                      : 1;
5037   unsigned                      : 1;
5038   unsigned P2PRSIN              : 1;
5039   } __PSMC2PRSbits_t;
5040 
5041 extern __at(0x083C) volatile __PSMC2PRSbits_t PSMC2PRSbits;
5042 
5043 #define _P2PRST                 0x01
5044 #define _P2PRSC1                0x02
5045 #define _P2PRSC2                0x04
5046 #define _P2PRSC3                0x08
5047 #define _P2PRSIN                0x80
5048 
5049 //==============================================================================
5050 
5051 
5052 //==============================================================================
5053 //        PSMC2ASDC Bits
5054 
5055 extern __at(0x083D) __sfr PSMC2ASDC;
5056 
5057 typedef struct
5058   {
5059   unsigned P2ASDOV              : 1;
5060   unsigned                      : 1;
5061   unsigned                      : 1;
5062   unsigned                      : 1;
5063   unsigned                      : 1;
5064   unsigned P2ARSEN              : 1;
5065   unsigned P2ASDEN              : 1;
5066   unsigned P2ASE                : 1;
5067   } __PSMC2ASDCbits_t;
5068 
5069 extern __at(0x083D) volatile __PSMC2ASDCbits_t PSMC2ASDCbits;
5070 
5071 #define _P2ASDOV                0x01
5072 #define _P2ARSEN                0x20
5073 #define _P2ASDEN                0x40
5074 #define _P2ASE                  0x80
5075 
5076 //==============================================================================
5077 
5078 
5079 //==============================================================================
5080 //        PSMC2ASDL Bits
5081 
5082 extern __at(0x083E) __sfr PSMC2ASDL;
5083 
5084 typedef struct
5085   {
5086   unsigned P2ASDLA              : 1;
5087   unsigned P2ASDLB              : 1;
5088   unsigned                      : 1;
5089   unsigned                      : 1;
5090   unsigned                      : 1;
5091   unsigned                      : 1;
5092   unsigned                      : 1;
5093   unsigned                      : 1;
5094   } __PSMC2ASDLbits_t;
5095 
5096 extern __at(0x083E) volatile __PSMC2ASDLbits_t PSMC2ASDLbits;
5097 
5098 #define _P2ASDLA                0x01
5099 #define _P2ASDLB                0x02
5100 
5101 //==============================================================================
5102 
5103 
5104 //==============================================================================
5105 //        PSMC2ASDS Bits
5106 
5107 extern __at(0x083F) __sfr PSMC2ASDS;
5108 
5109 typedef struct
5110   {
5111   unsigned                      : 1;
5112   unsigned P2ASDSC1             : 1;
5113   unsigned P2ASDSC2             : 1;
5114   unsigned P2ASDSC3             : 1;
5115   unsigned                      : 1;
5116   unsigned                      : 1;
5117   unsigned                      : 1;
5118   unsigned P2ASDSIN             : 1;
5119   } __PSMC2ASDSbits_t;
5120 
5121 extern __at(0x083F) volatile __PSMC2ASDSbits_t PSMC2ASDSbits;
5122 
5123 #define _P2ASDSC1               0x02
5124 #define _P2ASDSC2               0x04
5125 #define _P2ASDSC3               0x08
5126 #define _P2ASDSIN               0x80
5127 
5128 //==============================================================================
5129 
5130 
5131 //==============================================================================
5132 //        PSMC2INT Bits
5133 
5134 extern __at(0x0840) __sfr PSMC2INT;
5135 
5136 typedef struct
5137   {
5138   unsigned P2TPRIF              : 1;
5139   unsigned P2TDCIF              : 1;
5140   unsigned P2TPHIF              : 1;
5141   unsigned P2TOVIF              : 1;
5142   unsigned P2TPRIE              : 1;
5143   unsigned P2TDCIE              : 1;
5144   unsigned P2TPHIE              : 1;
5145   unsigned P2TOVIE              : 1;
5146   } __PSMC2INTbits_t;
5147 
5148 extern __at(0x0840) volatile __PSMC2INTbits_t PSMC2INTbits;
5149 
5150 #define _P2TPRIF                0x01
5151 #define _P2TDCIF                0x02
5152 #define _P2TPHIF                0x04
5153 #define _P2TOVIF                0x08
5154 #define _P2TPRIE                0x10
5155 #define _P2TDCIE                0x20
5156 #define _P2TPHIE                0x40
5157 #define _P2TOVIE                0x80
5158 
5159 //==============================================================================
5160 
5161 extern __at(0x0841) __sfr PSMC2PH;
5162 
5163 //==============================================================================
5164 //        PSMC2PHL Bits
5165 
5166 extern __at(0x0841) __sfr PSMC2PHL;
5167 
5168 typedef struct
5169   {
5170   unsigned PSMC2PH0             : 1;
5171   unsigned PSMC2PH1             : 1;
5172   unsigned PSMC2PH2             : 1;
5173   unsigned PSMC2PH3             : 1;
5174   unsigned PSMC2PH4             : 1;
5175   unsigned PSMC2PH5             : 1;
5176   unsigned PSMC2PH6             : 1;
5177   unsigned PSMC2PH7             : 1;
5178   } __PSMC2PHLbits_t;
5179 
5180 extern __at(0x0841) volatile __PSMC2PHLbits_t PSMC2PHLbits;
5181 
5182 #define _PSMC2PH0               0x01
5183 #define _PSMC2PH1               0x02
5184 #define _PSMC2PH2               0x04
5185 #define _PSMC2PH3               0x08
5186 #define _PSMC2PH4               0x10
5187 #define _PSMC2PH5               0x20
5188 #define _PSMC2PH6               0x40
5189 #define _PSMC2PH7               0x80
5190 
5191 //==============================================================================
5192 
5193 
5194 //==============================================================================
5195 //        PSMC2PHH Bits
5196 
5197 extern __at(0x0842) __sfr PSMC2PHH;
5198 
5199 typedef struct
5200   {
5201   unsigned PSMC2PH8             : 1;
5202   unsigned PSMC2PH9             : 1;
5203   unsigned PSMC2PH10            : 1;
5204   unsigned PSMC2PH11            : 1;
5205   unsigned PSMC2PH12            : 1;
5206   unsigned PSMC2PH13            : 1;
5207   unsigned PSMC2PH14            : 1;
5208   unsigned PSMC2PH15            : 1;
5209   } __PSMC2PHHbits_t;
5210 
5211 extern __at(0x0842) volatile __PSMC2PHHbits_t PSMC2PHHbits;
5212 
5213 #define _PSMC2PH8               0x01
5214 #define _PSMC2PH9               0x02
5215 #define _PSMC2PH10              0x04
5216 #define _PSMC2PH11              0x08
5217 #define _PSMC2PH12              0x10
5218 #define _PSMC2PH13              0x20
5219 #define _PSMC2PH14              0x40
5220 #define _PSMC2PH15              0x80
5221 
5222 //==============================================================================
5223 
5224 extern __at(0x0843) __sfr PSMC2DC;
5225 
5226 //==============================================================================
5227 //        PSMC2DCL Bits
5228 
5229 extern __at(0x0843) __sfr PSMC2DCL;
5230 
5231 typedef struct
5232   {
5233   unsigned PSMC2DC0             : 1;
5234   unsigned PSMC2DC1             : 1;
5235   unsigned PSMC2DC2             : 1;
5236   unsigned PSMC2DC3             : 1;
5237   unsigned PSMC2DC4             : 1;
5238   unsigned PSMC2DC5             : 1;
5239   unsigned PSMC2DC6             : 1;
5240   unsigned PSMC2DC7             : 1;
5241   } __PSMC2DCLbits_t;
5242 
5243 extern __at(0x0843) volatile __PSMC2DCLbits_t PSMC2DCLbits;
5244 
5245 #define _PSMC2DC0               0x01
5246 #define _PSMC2DC1               0x02
5247 #define _PSMC2DC2               0x04
5248 #define _PSMC2DC3               0x08
5249 #define _PSMC2DC4               0x10
5250 #define _PSMC2DC5               0x20
5251 #define _PSMC2DC6               0x40
5252 #define _PSMC2DC7               0x80
5253 
5254 //==============================================================================
5255 
5256 
5257 //==============================================================================
5258 //        PSMC2DCH Bits
5259 
5260 extern __at(0x0844) __sfr PSMC2DCH;
5261 
5262 typedef struct
5263   {
5264   unsigned PSMC2DC8             : 1;
5265   unsigned PSMC2DC9             : 1;
5266   unsigned PSMC2DC10            : 1;
5267   unsigned PSMC2DC11            : 1;
5268   unsigned PSMC2DC12            : 1;
5269   unsigned PSMC2DC13            : 1;
5270   unsigned PSMC2DC14            : 1;
5271   unsigned PSMC2DC15            : 1;
5272   } __PSMC2DCHbits_t;
5273 
5274 extern __at(0x0844) volatile __PSMC2DCHbits_t PSMC2DCHbits;
5275 
5276 #define _PSMC2DC8               0x01
5277 #define _PSMC2DC9               0x02
5278 #define _PSMC2DC10              0x04
5279 #define _PSMC2DC11              0x08
5280 #define _PSMC2DC12              0x10
5281 #define _PSMC2DC13              0x20
5282 #define _PSMC2DC14              0x40
5283 #define _PSMC2DC15              0x80
5284 
5285 //==============================================================================
5286 
5287 extern __at(0x0845) __sfr PSMC2PR;
5288 
5289 //==============================================================================
5290 //        PSMC2PRL Bits
5291 
5292 extern __at(0x0845) __sfr PSMC2PRL;
5293 
5294 typedef struct
5295   {
5296   unsigned PSMC2PR0             : 1;
5297   unsigned PSMC2PR1             : 1;
5298   unsigned PSMC2PR2             : 1;
5299   unsigned PSMC2PR3             : 1;
5300   unsigned PSMC2PR4             : 1;
5301   unsigned PSMC2PR5             : 1;
5302   unsigned PSMC2PR6             : 1;
5303   unsigned PSMC2PR7             : 1;
5304   } __PSMC2PRLbits_t;
5305 
5306 extern __at(0x0845) volatile __PSMC2PRLbits_t PSMC2PRLbits;
5307 
5308 #define _PSMC2PR0               0x01
5309 #define _PSMC2PR1               0x02
5310 #define _PSMC2PR2               0x04
5311 #define _PSMC2PR3               0x08
5312 #define _PSMC2PR4               0x10
5313 #define _PSMC2PR5               0x20
5314 #define _PSMC2PR6               0x40
5315 #define _PSMC2PR7               0x80
5316 
5317 //==============================================================================
5318 
5319 
5320 //==============================================================================
5321 //        PSMC2PRH Bits
5322 
5323 extern __at(0x0846) __sfr PSMC2PRH;
5324 
5325 typedef struct
5326   {
5327   unsigned PSMC2PR8             : 1;
5328   unsigned PSMC2PR9             : 1;
5329   unsigned PSMC2PR10            : 1;
5330   unsigned PSMC2PR11            : 1;
5331   unsigned PSMC2PR12            : 1;
5332   unsigned PSMC2PR13            : 1;
5333   unsigned PSMC2PR14            : 1;
5334   unsigned PSMC2PR15            : 1;
5335   } __PSMC2PRHbits_t;
5336 
5337 extern __at(0x0846) volatile __PSMC2PRHbits_t PSMC2PRHbits;
5338 
5339 #define _PSMC2PR8               0x01
5340 #define _PSMC2PR9               0x02
5341 #define _PSMC2PR10              0x04
5342 #define _PSMC2PR11              0x08
5343 #define _PSMC2PR12              0x10
5344 #define _PSMC2PR13              0x20
5345 #define _PSMC2PR14              0x40
5346 #define _PSMC2PR15              0x80
5347 
5348 //==============================================================================
5349 
5350 extern __at(0x0847) __sfr PSMC2TMR;
5351 
5352 //==============================================================================
5353 //        PSMC2TMRL Bits
5354 
5355 extern __at(0x0847) __sfr PSMC2TMRL;
5356 
5357 typedef struct
5358   {
5359   unsigned PSMC2TMR0            : 1;
5360   unsigned PSMC2TMR1            : 1;
5361   unsigned PSMC2TMR2            : 1;
5362   unsigned PSMC2TMR3            : 1;
5363   unsigned PSMC2TMR4            : 1;
5364   unsigned PSMC2TMR5            : 1;
5365   unsigned PSMC2TMR6            : 1;
5366   unsigned PSMC2TMR7            : 1;
5367   } __PSMC2TMRLbits_t;
5368 
5369 extern __at(0x0847) volatile __PSMC2TMRLbits_t PSMC2TMRLbits;
5370 
5371 #define _PSMC2TMR0              0x01
5372 #define _PSMC2TMR1              0x02
5373 #define _PSMC2TMR2              0x04
5374 #define _PSMC2TMR3              0x08
5375 #define _PSMC2TMR4              0x10
5376 #define _PSMC2TMR5              0x20
5377 #define _PSMC2TMR6              0x40
5378 #define _PSMC2TMR7              0x80
5379 
5380 //==============================================================================
5381 
5382 
5383 //==============================================================================
5384 //        PSMC2TMRH Bits
5385 
5386 extern __at(0x0848) __sfr PSMC2TMRH;
5387 
5388 typedef struct
5389   {
5390   unsigned PSMC2TMR8            : 1;
5391   unsigned PSMC2TMR9            : 1;
5392   unsigned PSMC2TMR10           : 1;
5393   unsigned PSMC2TMR11           : 1;
5394   unsigned PSMC2TMR12           : 1;
5395   unsigned PSMC2TMR13           : 1;
5396   unsigned PSMC2TMR14           : 1;
5397   unsigned PSMC2TMR15           : 1;
5398   } __PSMC2TMRHbits_t;
5399 
5400 extern __at(0x0848) volatile __PSMC2TMRHbits_t PSMC2TMRHbits;
5401 
5402 #define _PSMC2TMR8              0x01
5403 #define _PSMC2TMR9              0x02
5404 #define _PSMC2TMR10             0x04
5405 #define _PSMC2TMR11             0x08
5406 #define _PSMC2TMR12             0x10
5407 #define _PSMC2TMR13             0x20
5408 #define _PSMC2TMR14             0x40
5409 #define _PSMC2TMR15             0x80
5410 
5411 //==============================================================================
5412 
5413 
5414 //==============================================================================
5415 //        PSMC2DBR Bits
5416 
5417 extern __at(0x0849) __sfr PSMC2DBR;
5418 
5419 typedef struct
5420   {
5421   unsigned PSMC2DBR0            : 1;
5422   unsigned PSMC2DBR1            : 1;
5423   unsigned PSMC2DBR2            : 1;
5424   unsigned PSMC2DBR3            : 1;
5425   unsigned PSMC2DBR4            : 1;
5426   unsigned PSMC2DBR5            : 1;
5427   unsigned PSMC2DBR6            : 1;
5428   unsigned PSMC2DBR7            : 1;
5429   } __PSMC2DBRbits_t;
5430 
5431 extern __at(0x0849) volatile __PSMC2DBRbits_t PSMC2DBRbits;
5432 
5433 #define _PSMC2DBR0              0x01
5434 #define _PSMC2DBR1              0x02
5435 #define _PSMC2DBR2              0x04
5436 #define _PSMC2DBR3              0x08
5437 #define _PSMC2DBR4              0x10
5438 #define _PSMC2DBR5              0x20
5439 #define _PSMC2DBR6              0x40
5440 #define _PSMC2DBR7              0x80
5441 
5442 //==============================================================================
5443 
5444 
5445 //==============================================================================
5446 //        PSMC2DBF Bits
5447 
5448 extern __at(0x084A) __sfr PSMC2DBF;
5449 
5450 typedef struct
5451   {
5452   unsigned PSMC2DBF0            : 1;
5453   unsigned PSMC2DBF1            : 1;
5454   unsigned PSMC2DBF2            : 1;
5455   unsigned PSMC2DBF3            : 1;
5456   unsigned PSMC2DBF4            : 1;
5457   unsigned PSMC2DBF5            : 1;
5458   unsigned PSMC2DBF6            : 1;
5459   unsigned PSMC2DBF7            : 1;
5460   } __PSMC2DBFbits_t;
5461 
5462 extern __at(0x084A) volatile __PSMC2DBFbits_t PSMC2DBFbits;
5463 
5464 #define _PSMC2DBF0              0x01
5465 #define _PSMC2DBF1              0x02
5466 #define _PSMC2DBF2              0x04
5467 #define _PSMC2DBF3              0x08
5468 #define _PSMC2DBF4              0x10
5469 #define _PSMC2DBF5              0x20
5470 #define _PSMC2DBF6              0x40
5471 #define _PSMC2DBF7              0x80
5472 
5473 //==============================================================================
5474 
5475 
5476 //==============================================================================
5477 //        PSMC2BLKR Bits
5478 
5479 extern __at(0x084B) __sfr PSMC2BLKR;
5480 
5481 typedef struct
5482   {
5483   unsigned PSMC2BLKR0           : 1;
5484   unsigned PSMC2BLKR1           : 1;
5485   unsigned PSMC2BLKR2           : 1;
5486   unsigned PSMC2BLKR3           : 1;
5487   unsigned PSMC2BLKR4           : 1;
5488   unsigned PSMC2BLKR5           : 1;
5489   unsigned PSMC2BLKR6           : 1;
5490   unsigned PSMC2BLKR7           : 1;
5491   } __PSMC2BLKRbits_t;
5492 
5493 extern __at(0x084B) volatile __PSMC2BLKRbits_t PSMC2BLKRbits;
5494 
5495 #define _PSMC2BLKR0             0x01
5496 #define _PSMC2BLKR1             0x02
5497 #define _PSMC2BLKR2             0x04
5498 #define _PSMC2BLKR3             0x08
5499 #define _PSMC2BLKR4             0x10
5500 #define _PSMC2BLKR5             0x20
5501 #define _PSMC2BLKR6             0x40
5502 #define _PSMC2BLKR7             0x80
5503 
5504 //==============================================================================
5505 
5506 
5507 //==============================================================================
5508 //        PSMC2BLKF Bits
5509 
5510 extern __at(0x084C) __sfr PSMC2BLKF;
5511 
5512 typedef struct
5513   {
5514   unsigned PSMC2BLKF0           : 1;
5515   unsigned PSMC2BLKF1           : 1;
5516   unsigned PSMC2BLKF2           : 1;
5517   unsigned PSMC2BLKF3           : 1;
5518   unsigned PSMC2BLKF4           : 1;
5519   unsigned PSMC2BLKF5           : 1;
5520   unsigned PSMC2BLKF6           : 1;
5521   unsigned PSMC2BLKF7           : 1;
5522   } __PSMC2BLKFbits_t;
5523 
5524 extern __at(0x084C) volatile __PSMC2BLKFbits_t PSMC2BLKFbits;
5525 
5526 #define _PSMC2BLKF0             0x01
5527 #define _PSMC2BLKF1             0x02
5528 #define _PSMC2BLKF2             0x04
5529 #define _PSMC2BLKF3             0x08
5530 #define _PSMC2BLKF4             0x10
5531 #define _PSMC2BLKF5             0x20
5532 #define _PSMC2BLKF6             0x40
5533 #define _PSMC2BLKF7             0x80
5534 
5535 //==============================================================================
5536 
5537 
5538 //==============================================================================
5539 //        PSMC2FFA Bits
5540 
5541 extern __at(0x084D) __sfr PSMC2FFA;
5542 
5543 typedef union
5544   {
5545   struct
5546     {
5547     unsigned PSMC2FFA0          : 1;
5548     unsigned PSMC2FFA1          : 1;
5549     unsigned PSMC2FFA2          : 1;
5550     unsigned PSMC2FFA3          : 1;
5551     unsigned                    : 1;
5552     unsigned                    : 1;
5553     unsigned                    : 1;
5554     unsigned                    : 1;
5555     };
5556 
5557   struct
5558     {
5559     unsigned PSMC2FFA           : 4;
5560     unsigned                    : 4;
5561     };
5562   } __PSMC2FFAbits_t;
5563 
5564 extern __at(0x084D) volatile __PSMC2FFAbits_t PSMC2FFAbits;
5565 
5566 #define _PSMC2FFA0              0x01
5567 #define _PSMC2FFA1              0x02
5568 #define _PSMC2FFA2              0x04
5569 #define _PSMC2FFA3              0x08
5570 
5571 //==============================================================================
5572 
5573 
5574 //==============================================================================
5575 //        PSMC2STR0 Bits
5576 
5577 extern __at(0x084E) __sfr PSMC2STR0;
5578 
5579 typedef struct
5580   {
5581   unsigned P2STRA               : 1;
5582   unsigned P2STRB               : 1;
5583   unsigned                      : 1;
5584   unsigned                      : 1;
5585   unsigned                      : 1;
5586   unsigned                      : 1;
5587   unsigned                      : 1;
5588   unsigned                      : 1;
5589   } __PSMC2STR0bits_t;
5590 
5591 extern __at(0x084E) volatile __PSMC2STR0bits_t PSMC2STR0bits;
5592 
5593 #define _P2STRA                 0x01
5594 #define _P2STRB                 0x02
5595 
5596 //==============================================================================
5597 
5598 
5599 //==============================================================================
5600 //        PSMC2STR1 Bits
5601 
5602 extern __at(0x084F) __sfr PSMC2STR1;
5603 
5604 typedef struct
5605   {
5606   unsigned P2HSMEN              : 1;
5607   unsigned P2LSMEN              : 1;
5608   unsigned                      : 1;
5609   unsigned                      : 1;
5610   unsigned                      : 1;
5611   unsigned                      : 1;
5612   unsigned                      : 1;
5613   unsigned P2SSYNC              : 1;
5614   } __PSMC2STR1bits_t;
5615 
5616 extern __at(0x084F) volatile __PSMC2STR1bits_t PSMC2STR1bits;
5617 
5618 #define _P2HSMEN                0x01
5619 #define _P2LSMEN                0x02
5620 #define _P2SSYNC                0x80
5621 
5622 //==============================================================================
5623 
5624 
5625 //==============================================================================
5626 //        STATUS_SHAD Bits
5627 
5628 extern __at(0x0FE4) __sfr STATUS_SHAD;
5629 
5630 typedef struct
5631   {
5632   unsigned C_SHAD               : 1;
5633   unsigned DC_SHAD              : 1;
5634   unsigned Z_SHAD               : 1;
5635   unsigned                      : 1;
5636   unsigned                      : 1;
5637   unsigned                      : 1;
5638   unsigned                      : 1;
5639   unsigned                      : 1;
5640   } __STATUS_SHADbits_t;
5641 
5642 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
5643 
5644 #define _C_SHAD                 0x01
5645 #define _DC_SHAD                0x02
5646 #define _Z_SHAD                 0x04
5647 
5648 //==============================================================================
5649 
5650 extern __at(0x0FE5) __sfr WREG_SHAD;
5651 extern __at(0x0FE6) __sfr BSR_SHAD;
5652 extern __at(0x0FE7) __sfr PCLATH_SHAD;
5653 extern __at(0x0FE8) __sfr FSR0L_SHAD;
5654 extern __at(0x0FE9) __sfr FSR0H_SHAD;
5655 extern __at(0x0FEA) __sfr FSR1L_SHAD;
5656 extern __at(0x0FEB) __sfr FSR1H_SHAD;
5657 extern __at(0x0FED) __sfr STKPTR;
5658 extern __at(0x0FEE) __sfr TOSL;
5659 extern __at(0x0FEF) __sfr TOSH;
5660 
5661 //==============================================================================
5662 //
5663 //        Configuration Bits
5664 //
5665 //==============================================================================
5666 
5667 #define _CONFIG1                0x8007
5668 #define _CONFIG2                0x8008
5669 
5670 //----------------------------- CONFIG1 Options -------------------------------
5671 
5672 #define _FOSC_LP                0x3FF8  // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
5673 #define _FOSC_XT                0x3FF9  // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
5674 #define _FOSC_HS                0x3FFA  // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
5675 #define _FOSC_EXTRC             0x3FFB  // EXTRC oscillator: External RC circuit connected to CLKIN pin.
5676 #define _FOSC_INTOSC            0x3FFC  // INTOSC oscillator: I/O function on CLKIN pin.
5677 #define _FOSC_ECL               0x3FFD  // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
5678 #define _FOSC_ECM               0x3FFE  // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
5679 #define _FOSC_ECH               0x3FFF  // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin.
5680 #define _WDTE_OFF               0x3FE7  // WDT disabled.
5681 #define _WDTE_SWDTEN            0x3FEF  // WDT controlled by the SWDTEN bit in the WDTCON register.
5682 #define _WDTE_NSLEEP            0x3FF7  // WDT enabled while running and disabled in Sleep.
5683 #define _WDTE_ON                0x3FFF  // WDT enabled.
5684 #define _PWRTE_ON               0x3FDF  // PWRT enabled.
5685 #define _PWRTE_OFF              0x3FFF  // PWRT disabled.
5686 #define _MCLRE_OFF              0x3FBF  // MCLR/VPP pin function is digital input.
5687 #define _MCLRE_ON               0x3FFF  // MCLR/VPP pin function is MCLR.
5688 #define _CP_ON                  0x3F7F  // Program memory code protection is enabled.
5689 #define _CP_OFF                 0x3FFF  // Program memory code protection is disabled.
5690 #define _CPD_ON                 0x3EFF  // Data memory code protection is enabled.
5691 #define _CPD_OFF                0x3FFF  // Data memory code protection is disabled.
5692 #define _BOREN_OFF              0x39FF  // Brown-out Reset disabled.
5693 #define _BOREN_SBODEN           0x3BFF  // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
5694 #define _BOREN_NSLEEP           0x3DFF  // Brown-out Reset enabled while running and disabled in Sleep.
5695 #define _BOREN_ON               0x3FFF  // Brown-out Reset enabled.
5696 #define _CLKOUTEN_ON            0x37FF  // CLKOUT function is enabled on the CLKOUT pin.
5697 #define _CLKOUTEN_OFF           0x3FFF  // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
5698 #define _IESO_OFF               0x2FFF  // Internal/External Switchover mode is disabled.
5699 #define _IESO_ON                0x3FFF  // Internal/External Switchover mode is enabled.
5700 #define _FCMEN_OFF              0x1FFF  // Fail-Safe Clock Monitor is disabled.
5701 #define _FCMEN_ON               0x3FFF  // Fail-Safe Clock Monitor is enabled.
5702 
5703 //----------------------------- CONFIG2 Options -------------------------------
5704 
5705 #define _WRT_ALL                0x3FFC  // 000h to 7FFh write protected, no addresses may be modified by EECON control.
5706 #define _WRT_HALF               0x3FFD  // 000h to 3FFh write protected, 400h to 7FFh may be modified by EECON control.
5707 #define _WRT_BOOT               0x3FFE  // 000h to 1FFh write protected, 200h to 7FFh may be modified by EECON control.
5708 #define _WRT_OFF                0x3FFF  // Write protection off.
5709 #define _PLLEN_OFF              0x3EFF  // 4x PLL disabled.
5710 #define _PLLEN_ON               0x3FFF  // 4x PLL enabled.
5711 #define _STVREN_OFF             0x3DFF  // Stack Overflow or Underflow will not cause a Reset.
5712 #define _STVREN_ON              0x3FFF  // Stack Overflow or Underflow will cause a Reset.
5713 #define _BORV_HI                0x3BFF  // Brown-out Reset Voltage (Vbor), high trip point selected.
5714 #define _BORV_LO                0x3FFF  // Brown-out Reset Voltage (Vbor), low trip point selected.
5715 #define _BORV_19                0x3FFF  // Brown-out Reset Voltage (Vbor), low trip point selected.
5716 #define _LPBOR_ON               0x37FF  // Low power brown-out is enabled.
5717 #define _LPBOR_OFF              0x3FFF  // Low power brown-out is disabled.
5718 #define _DEBUG_ON               0x2FFF  // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
5719 #define _DEBUG_OFF              0x3FFF  // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
5720 #define _LVP_OFF                0x1FFF  // High-voltage on MCLR/VPP must be used for programming.
5721 #define _LVP_ON                 0x3FFF  // Low-voltage programming enabled.
5722 
5723 //==============================================================================
5724 
5725 #define _DEVID1                 0x8006
5726 
5727 #define _IDLOC0                 0x8000
5728 #define _IDLOC1                 0x8001
5729 #define _IDLOC2                 0x8002
5730 #define _IDLOC3                 0x8003
5731 
5732 //==============================================================================
5733 
5734 #ifndef NO_BIT_DEFINES
5735 
5736 #define ADON                    ADCON0bits.ADON                 // bit 0
5737 #define GO_NOT_DONE             ADCON0bits.GO_NOT_DONE          // bit 1, shadows bit in ADCON0bits
5738 #define ADGO                    ADCON0bits.ADGO                 // bit 1, shadows bit in ADCON0bits
5739 #define GO                      ADCON0bits.GO                   // bit 1, shadows bit in ADCON0bits
5740 #define DONE                    ADCON0bits.DONE                 // bit 1, shadows bit in ADCON0bits
5741 #define CHS0                    ADCON0bits.CHS0                 // bit 2
5742 #define CHS1                    ADCON0bits.CHS1                 // bit 3
5743 #define CHS2                    ADCON0bits.CHS2                 // bit 4
5744 #define CHS3                    ADCON0bits.CHS3                 // bit 5
5745 #define CHS4                    ADCON0bits.CHS4                 // bit 6
5746 #define ADRMD                   ADCON0bits.ADRMD                // bit 7
5747 
5748 #define ADPREF0                 ADCON1bits.ADPREF0              // bit 0
5749 #define ADPREF1                 ADCON1bits.ADPREF1              // bit 1
5750 #define ADNREF                  ADCON1bits.ADNREF               // bit 2
5751 #define ADCS0                   ADCON1bits.ADCS0                // bit 4
5752 #define ADCS1                   ADCON1bits.ADCS1                // bit 5
5753 #define ADCS2                   ADCON1bits.ADCS2                // bit 6
5754 #define ADFM                    ADCON1bits.ADFM                 // bit 7
5755 
5756 #define CHSN0                   ADCON2bits.CHSN0                // bit 0
5757 #define CHSN1                   ADCON2bits.CHSN1                // bit 1
5758 #define CHSN2                   ADCON2bits.CHSN2                // bit 2
5759 #define CHSN3                   ADCON2bits.CHSN3                // bit 3
5760 #define TRIGSEL0                ADCON2bits.TRIGSEL0             // bit 4
5761 #define TRIGSEL1                ADCON2bits.TRIGSEL1             // bit 5
5762 #define TRIGSEL2                ADCON2bits.TRIGSEL2             // bit 6
5763 #define TRIGSEL3                ADCON2bits.TRIGSEL3             // bit 7
5764 
5765 #define ANSA0                   ANSELAbits.ANSA0                // bit 0
5766 #define ANSA1                   ANSELAbits.ANSA1                // bit 1
5767 #define ANSA2                   ANSELAbits.ANSA2                // bit 2
5768 #define ANSA3                   ANSELAbits.ANSA3                // bit 3
5769 #define ANSA4                   ANSELAbits.ANSA4                // bit 4
5770 #define ANSA5                   ANSELAbits.ANSA5                // bit 5
5771 #define ANSA7                   ANSELAbits.ANSA7                // bit 7
5772 
5773 #define ANSB0                   ANSELBbits.ANSB0                // bit 0
5774 #define ANSB1                   ANSELBbits.ANSB1                // bit 1
5775 #define ANSB2                   ANSELBbits.ANSB2                // bit 2
5776 #define ANSB3                   ANSELBbits.ANSB3                // bit 3
5777 #define ANSB4                   ANSELBbits.ANSB4                // bit 4
5778 #define ANSB5                   ANSELBbits.ANSB5                // bit 5
5779 
5780 #define CCP2SEL                 APFCONbits.CCP2SEL              // bit 0
5781 #define RXSEL                   APFCONbits.RXSEL                // bit 1
5782 #define TXSEL                   APFCONbits.TXSEL                // bit 2
5783 #define SDISEL                  APFCONbits.SDISEL               // bit 3
5784 #define SCKSEL                  APFCONbits.SCKSEL               // bit 4
5785 #define SDOSEL                  APFCONbits.SDOSEL               // bit 5
5786 #define CCP1SEL                 APFCONbits.CCP1SEL              // bit 6
5787 #define C2OUTSEL                APFCONbits.C2OUTSEL             // bit 7
5788 
5789 #define ABDEN                   BAUD1CONbits.ABDEN              // bit 0
5790 #define WUE                     BAUD1CONbits.WUE                // bit 1
5791 #define BRG16                   BAUD1CONbits.BRG16              // bit 3
5792 #define SCKP                    BAUD1CONbits.SCKP               // bit 4
5793 #define RCIDL                   BAUD1CONbits.RCIDL              // bit 6
5794 #define ABDOVF                  BAUD1CONbits.ABDOVF             // bit 7
5795 
5796 #define BORRDY                  BORCONbits.BORRDY               // bit 0
5797 #define BORFS                   BORCONbits.BORFS                // bit 6
5798 #define SBOREN                  BORCONbits.SBOREN               // bit 7
5799 
5800 #define BSR0                    BSRbits.BSR0                    // bit 0
5801 #define BSR1                    BSRbits.BSR1                    // bit 1
5802 #define BSR2                    BSRbits.BSR2                    // bit 2
5803 #define BSR3                    BSRbits.BSR3                    // bit 3
5804 #define BSR4                    BSRbits.BSR4                    // bit 4
5805 
5806 #define CCP1M0                  CCP1CONbits.CCP1M0              // bit 0
5807 #define CCP1M1                  CCP1CONbits.CCP1M1              // bit 1
5808 #define CCP1M2                  CCP1CONbits.CCP1M2              // bit 2
5809 #define CCP1M3                  CCP1CONbits.CCP1M3              // bit 3
5810 #define DC1B0                   CCP1CONbits.DC1B0               // bit 4
5811 #define DC1B1                   CCP1CONbits.DC1B1               // bit 5
5812 #define P1M0                    CCP1CONbits.P1M0                // bit 6
5813 #define P1M1                    CCP1CONbits.P1M1                // bit 7
5814 
5815 #define CCP2M0                  CCP2CONbits.CCP2M0              // bit 0
5816 #define CCP2M1                  CCP2CONbits.CCP2M1              // bit 1
5817 #define CCP2M2                  CCP2CONbits.CCP2M2              // bit 2
5818 #define CCP2M3                  CCP2CONbits.CCP2M3              // bit 3
5819 #define DC2B0                   CCP2CONbits.DC2B0               // bit 4
5820 #define DC2B1                   CCP2CONbits.DC2B1               // bit 5
5821 #define P2M0                    CCP2CONbits.P2M0                // bit 6
5822 #define P2M1                    CCP2CONbits.P2M1                // bit 7
5823 
5824 #define CLKRDIV0                CLKRCONbits.CLKRDIV0            // bit 0
5825 #define CLKRDIV1                CLKRCONbits.CLKRDIV1            // bit 1
5826 #define CLKRDIV2                CLKRCONbits.CLKRDIV2            // bit 2
5827 #define CLKRDC0                 CLKRCONbits.CLKRDC0             // bit 3
5828 #define CLKRDC1                 CLKRCONbits.CLKRDC1             // bit 4
5829 #define CLKRSLR                 CLKRCONbits.CLKRSLR             // bit 5
5830 #define CLKROE                  CLKRCONbits.CLKROE              // bit 6
5831 #define CLKREN                  CLKRCONbits.CLKREN              // bit 7
5832 
5833 #define C1SYNC                  CM1CON0bits.C1SYNC              // bit 0
5834 #define C1HYS                   CM1CON0bits.C1HYS               // bit 1
5835 #define C1SP                    CM1CON0bits.C1SP                // bit 2
5836 #define C1ZLF                   CM1CON0bits.C1ZLF               // bit 3
5837 #define C1POL                   CM1CON0bits.C1POL               // bit 4
5838 #define C1OE                    CM1CON0bits.C1OE                // bit 5
5839 #define C1OUT                   CM1CON0bits.C1OUT               // bit 6
5840 #define C1ON                    CM1CON0bits.C1ON                // bit 7
5841 
5842 #define C1NCH0                  CM1CON1bits.C1NCH0              // bit 0
5843 #define C1NCH1                  CM1CON1bits.C1NCH1              // bit 1
5844 #define C1NCH2                  CM1CON1bits.C1NCH2              // bit 2
5845 #define C1PCH0                  CM1CON1bits.C1PCH0              // bit 3
5846 #define C1PCH1                  CM1CON1bits.C1PCH1              // bit 4
5847 #define C1PCH2                  CM1CON1bits.C1PCH2              // bit 5
5848 #define C1INTN                  CM1CON1bits.C1INTN              // bit 6
5849 #define C1INTP                  CM1CON1bits.C1INTP              // bit 7
5850 
5851 #define C2SYNC                  CM2CON0bits.C2SYNC              // bit 0
5852 #define C2HYS                   CM2CON0bits.C2HYS               // bit 1
5853 #define C2SP                    CM2CON0bits.C2SP                // bit 2
5854 #define C2ZLF                   CM2CON0bits.C2ZLF               // bit 3
5855 #define C2POL                   CM2CON0bits.C2POL               // bit 4
5856 #define C2OE                    CM2CON0bits.C2OE                // bit 5
5857 #define C2OUT                   CM2CON0bits.C2OUT               // bit 6
5858 #define C2ON                    CM2CON0bits.C2ON                // bit 7
5859 
5860 #define C2NCH0                  CM2CON1bits.C2NCH0              // bit 0
5861 #define C2NCH1                  CM2CON1bits.C2NCH1              // bit 1
5862 #define C2NCH2                  CM2CON1bits.C2NCH2              // bit 2
5863 #define C2PCH0                  CM2CON1bits.C2PCH0              // bit 3
5864 #define C2PCH1                  CM2CON1bits.C2PCH1              // bit 4
5865 #define C2PCH2                  CM2CON1bits.C2PCH2              // bit 5
5866 #define C2INTN                  CM2CON1bits.C2INTN              // bit 6
5867 #define C2INTP                  CM2CON1bits.C2INTP              // bit 7
5868 
5869 #define C3SYNC                  CM3CON0bits.C3SYNC              // bit 0
5870 #define C3HYS                   CM3CON0bits.C3HYS               // bit 1
5871 #define C3SP                    CM3CON0bits.C3SP                // bit 2
5872 #define C3ZLF                   CM3CON0bits.C3ZLF               // bit 3
5873 #define C3POL                   CM3CON0bits.C3POL               // bit 4
5874 #define C3OE                    CM3CON0bits.C3OE                // bit 5
5875 #define C3OUT                   CM3CON0bits.C3OUT               // bit 6
5876 #define C3ON                    CM3CON0bits.C3ON                // bit 7
5877 
5878 #define C3NCH0                  CM3CON1bits.C3NCH0              // bit 0
5879 #define C3NCH1                  CM3CON1bits.C3NCH1              // bit 1
5880 #define C3NCH2                  CM3CON1bits.C3NCH2              // bit 2
5881 #define C3PCH0                  CM3CON1bits.C3PCH0              // bit 3
5882 #define C3PCH1                  CM3CON1bits.C3PCH1              // bit 4
5883 #define C3PCH2                  CM3CON1bits.C3PCH2              // bit 5
5884 #define C3INTN                  CM3CON1bits.C3INTN              // bit 6
5885 #define C3INTP                  CM3CON1bits.C3INTP              // bit 7
5886 
5887 #define MC1OUT                  CMOUTbits.MC1OUT                // bit 0
5888 #define MC2OUT                  CMOUTbits.MC2OUT                // bit 1
5889 #define MC3OUT                  CMOUTbits.MC3OUT                // bit 2
5890 
5891 #define DACNSS                  DACCON0bits.DACNSS              // bit 0
5892 #define DACPSS0                 DACCON0bits.DACPSS0             // bit 2
5893 #define DACPSS1                 DACCON0bits.DACPSS1             // bit 3
5894 #define DACOE2                  DACCON0bits.DACOE2              // bit 4
5895 #define DACOE1                  DACCON0bits.DACOE1              // bit 5
5896 #define DACEN                   DACCON0bits.DACEN               // bit 7
5897 
5898 #define DACR0                   DACCON1bits.DACR0               // bit 0
5899 #define DACR1                   DACCON1bits.DACR1               // bit 1
5900 #define DACR2                   DACCON1bits.DACR2               // bit 2
5901 #define DACR3                   DACCON1bits.DACR3               // bit 3
5902 #define DACR4                   DACCON1bits.DACR4               // bit 4
5903 #define DACR5                   DACCON1bits.DACR5               // bit 5
5904 #define DACR6                   DACCON1bits.DACR6               // bit 6
5905 #define DACR7                   DACCON1bits.DACR7               // bit 7
5906 
5907 #define RD                      EECON1bits.RD                   // bit 0
5908 #define WR                      EECON1bits.WR                   // bit 1
5909 #define WREN                    EECON1bits.WREN                 // bit 2
5910 #define WRERR                   EECON1bits.WRERR                // bit 3
5911 #define FREE                    EECON1bits.FREE                 // bit 4
5912 #define LWLO                    EECON1bits.LWLO                 // bit 5
5913 #define CFGS                    EECON1bits.CFGS                 // bit 6
5914 #define EEPGD                   EECON1bits.EEPGD                // bit 7
5915 
5916 #define ADFVR0                  FVRCONbits.ADFVR0               // bit 0
5917 #define ADFVR1                  FVRCONbits.ADFVR1               // bit 1
5918 #define CDAFVR0                 FVRCONbits.CDAFVR0              // bit 2
5919 #define CDAFVR1                 FVRCONbits.CDAFVR1              // bit 3
5920 #define TSRNG                   FVRCONbits.TSRNG                // bit 4
5921 #define TSEN                    FVRCONbits.TSEN                 // bit 5
5922 #define FVRRDY                  FVRCONbits.FVRRDY               // bit 6
5923 #define FVREN                   FVRCONbits.FVREN                // bit 7
5924 
5925 #define INLVLA0                 INLVLAbits.INLVLA0              // bit 0
5926 #define INLVLA1                 INLVLAbits.INLVLA1              // bit 1
5927 #define INLVLA2                 INLVLAbits.INLVLA2              // bit 2
5928 #define INLVLA3                 INLVLAbits.INLVLA3              // bit 3
5929 #define INLVLA4                 INLVLAbits.INLVLA4              // bit 4
5930 #define INLVLA5                 INLVLAbits.INLVLA5              // bit 5
5931 #define INLVLA6                 INLVLAbits.INLVLA6              // bit 6
5932 #define INLVLA7                 INLVLAbits.INLVLA7              // bit 7
5933 
5934 #define INLVLB0                 INLVLBbits.INLVLB0              // bit 0
5935 #define INLVLB1                 INLVLBbits.INLVLB1              // bit 1
5936 #define INLVLB2                 INLVLBbits.INLVLB2              // bit 2
5937 #define INLVLB3                 INLVLBbits.INLVLB3              // bit 3
5938 #define INLVLB4                 INLVLBbits.INLVLB4              // bit 4
5939 #define INLVLB5                 INLVLBbits.INLVLB5              // bit 5
5940 #define INLVLB6                 INLVLBbits.INLVLB6              // bit 6
5941 #define INLVLB7                 INLVLBbits.INLVLB7              // bit 7
5942 
5943 #define INLVLC0                 INLVLCbits.INLVLC0              // bit 0
5944 #define INLVLC1                 INLVLCbits.INLVLC1              // bit 1
5945 #define INLVLC2                 INLVLCbits.INLVLC2              // bit 2
5946 #define INLVLC3                 INLVLCbits.INLVLC3              // bit 3
5947 #define INLVLC4                 INLVLCbits.INLVLC4              // bit 4
5948 #define INLVLC5                 INLVLCbits.INLVLC5              // bit 5
5949 #define INLVLC6                 INLVLCbits.INLVLC6              // bit 6
5950 #define INLVLC7                 INLVLCbits.INLVLC7              // bit 7
5951 
5952 #define INLVLE3                 INLVLEbits.INLVLE3              // bit 3
5953 
5954 #define IOCIF                   INTCONbits.IOCIF                // bit 0
5955 #define INTF                    INTCONbits.INTF                 // bit 1
5956 #define TMR0IF                  INTCONbits.TMR0IF               // bit 2, shadows bit in INTCONbits
5957 #define T0IF                    INTCONbits.T0IF                 // bit 2, shadows bit in INTCONbits
5958 #define IOCIE                   INTCONbits.IOCIE                // bit 3
5959 #define INTE                    INTCONbits.INTE                 // bit 4
5960 #define TMR0IE                  INTCONbits.TMR0IE               // bit 5, shadows bit in INTCONbits
5961 #define T0IE                    INTCONbits.T0IE                 // bit 5, shadows bit in INTCONbits
5962 #define PEIE                    INTCONbits.PEIE                 // bit 6
5963 #define GIE                     INTCONbits.GIE                  // bit 7
5964 
5965 #define IOCAF0                  IOCAFbits.IOCAF0                // bit 0
5966 #define IOCAF1                  IOCAFbits.IOCAF1                // bit 1
5967 #define IOCAF2                  IOCAFbits.IOCAF2                // bit 2
5968 #define IOCAF3                  IOCAFbits.IOCAF3                // bit 3
5969 #define IOCAF4                  IOCAFbits.IOCAF4                // bit 4
5970 #define IOCAF5                  IOCAFbits.IOCAF5                // bit 5
5971 #define IOCAF6                  IOCAFbits.IOCAF6                // bit 6
5972 #define IOCAF7                  IOCAFbits.IOCAF7                // bit 7
5973 
5974 #define IOCAN0                  IOCANbits.IOCAN0                // bit 0
5975 #define IOCAN1                  IOCANbits.IOCAN1                // bit 1
5976 #define IOCAN2                  IOCANbits.IOCAN2                // bit 2
5977 #define IOCAN3                  IOCANbits.IOCAN3                // bit 3
5978 #define IOCAN4                  IOCANbits.IOCAN4                // bit 4
5979 #define IOCAN5                  IOCANbits.IOCAN5                // bit 5
5980 #define IOCAN6                  IOCANbits.IOCAN6                // bit 6
5981 #define IOCAN7                  IOCANbits.IOCAN7                // bit 7
5982 
5983 #define IOCAP0                  IOCAPbits.IOCAP0                // bit 0
5984 #define IOCAP1                  IOCAPbits.IOCAP1                // bit 1
5985 #define IOCAP2                  IOCAPbits.IOCAP2                // bit 2
5986 #define IOCAP3                  IOCAPbits.IOCAP3                // bit 3
5987 #define IOCAP4                  IOCAPbits.IOCAP4                // bit 4
5988 #define IOCAP5                  IOCAPbits.IOCAP5                // bit 5
5989 #define IOCAP6                  IOCAPbits.IOCAP6                // bit 6
5990 #define IOCAP7                  IOCAPbits.IOCAP7                // bit 7
5991 
5992 #define IOCBF0                  IOCBFbits.IOCBF0                // bit 0
5993 #define IOCBF1                  IOCBFbits.IOCBF1                // bit 1
5994 #define IOCBF2                  IOCBFbits.IOCBF2                // bit 2
5995 #define IOCBF3                  IOCBFbits.IOCBF3                // bit 3
5996 #define IOCBF4                  IOCBFbits.IOCBF4                // bit 4
5997 #define IOCBF5                  IOCBFbits.IOCBF5                // bit 5
5998 #define IOCBF6                  IOCBFbits.IOCBF6                // bit 6
5999 #define IOCBF7                  IOCBFbits.IOCBF7                // bit 7
6000 
6001 #define IOCBN0                  IOCBNbits.IOCBN0                // bit 0
6002 #define IOCBN1                  IOCBNbits.IOCBN1                // bit 1
6003 #define IOCBN2                  IOCBNbits.IOCBN2                // bit 2
6004 #define IOCBN3                  IOCBNbits.IOCBN3                // bit 3
6005 #define IOCBN4                  IOCBNbits.IOCBN4                // bit 4
6006 #define IOCBN5                  IOCBNbits.IOCBN5                // bit 5
6007 #define IOCBN6                  IOCBNbits.IOCBN6                // bit 6
6008 #define IOCBN7                  IOCBNbits.IOCBN7                // bit 7
6009 
6010 #define IOCBP0                  IOCBPbits.IOCBP0                // bit 0
6011 #define IOCBP1                  IOCBPbits.IOCBP1                // bit 1
6012 #define IOCBP2                  IOCBPbits.IOCBP2                // bit 2
6013 #define IOCBP3                  IOCBPbits.IOCBP3                // bit 3
6014 #define IOCBP4                  IOCBPbits.IOCBP4                // bit 4
6015 #define IOCBP5                  IOCBPbits.IOCBP5                // bit 5
6016 #define IOCBP6                  IOCBPbits.IOCBP6                // bit 6
6017 #define IOCBP7                  IOCBPbits.IOCBP7                // bit 7
6018 
6019 #define IOCCF0                  IOCCFbits.IOCCF0                // bit 0
6020 #define IOCCF1                  IOCCFbits.IOCCF1                // bit 1
6021 #define IOCCF2                  IOCCFbits.IOCCF2                // bit 2
6022 #define IOCCF3                  IOCCFbits.IOCCF3                // bit 3
6023 #define IOCCF4                  IOCCFbits.IOCCF4                // bit 4
6024 #define IOCCF5                  IOCCFbits.IOCCF5                // bit 5
6025 #define IOCCF6                  IOCCFbits.IOCCF6                // bit 6
6026 #define IOCCF7                  IOCCFbits.IOCCF7                // bit 7
6027 
6028 #define IOCCN0                  IOCCNbits.IOCCN0                // bit 0
6029 #define IOCCN1                  IOCCNbits.IOCCN1                // bit 1
6030 #define IOCCN2                  IOCCNbits.IOCCN2                // bit 2
6031 #define IOCCN3                  IOCCNbits.IOCCN3                // bit 3
6032 #define IOCCN4                  IOCCNbits.IOCCN4                // bit 4
6033 #define IOCCN5                  IOCCNbits.IOCCN5                // bit 5
6034 #define IOCCN6                  IOCCNbits.IOCCN6                // bit 6
6035 #define IOCCN7                  IOCCNbits.IOCCN7                // bit 7
6036 
6037 #define IOCCP0                  IOCCPbits.IOCCP0                // bit 0
6038 #define IOCCP1                  IOCCPbits.IOCCP1                // bit 1
6039 #define IOCCP2                  IOCCPbits.IOCCP2                // bit 2
6040 #define IOCCP3                  IOCCPbits.IOCCP3                // bit 3
6041 #define IOCCP4                  IOCCPbits.IOCCP4                // bit 4
6042 #define IOCCP5                  IOCCPbits.IOCCP5                // bit 5
6043 #define IOCCP6                  IOCCPbits.IOCCP6                // bit 6
6044 #define IOCCP7                  IOCCPbits.IOCCP7                // bit 7
6045 
6046 #define IOCEF3                  IOCEFbits.IOCEF3                // bit 3
6047 
6048 #define IOCEN3                  IOCENbits.IOCEN3                // bit 3
6049 
6050 #define IOCEP3                  IOCEPbits.IOCEP3                // bit 3
6051 
6052 #define LATA0                   LATAbits.LATA0                  // bit 0
6053 #define LATA1                   LATAbits.LATA1                  // bit 1
6054 #define LATA2                   LATAbits.LATA2                  // bit 2
6055 #define LATA3                   LATAbits.LATA3                  // bit 3
6056 #define LATA4                   LATAbits.LATA4                  // bit 4
6057 #define LATA5                   LATAbits.LATA5                  // bit 5
6058 #define LATA6                   LATAbits.LATA6                  // bit 6
6059 #define LATA7                   LATAbits.LATA7                  // bit 7
6060 
6061 #define LATB0                   LATBbits.LATB0                  // bit 0
6062 #define LATB1                   LATBbits.LATB1                  // bit 1
6063 #define LATB2                   LATBbits.LATB2                  // bit 2
6064 #define LATB3                   LATBbits.LATB3                  // bit 3
6065 #define LATB4                   LATBbits.LATB4                  // bit 4
6066 #define LATB5                   LATBbits.LATB5                  // bit 5
6067 #define LATB6                   LATBbits.LATB6                  // bit 6
6068 #define LATB7                   LATBbits.LATB7                  // bit 7
6069 
6070 #define LATC0                   LATCbits.LATC0                  // bit 0
6071 #define LATC1                   LATCbits.LATC1                  // bit 1
6072 #define LATC2                   LATCbits.LATC2                  // bit 2
6073 #define LATC3                   LATCbits.LATC3                  // bit 3
6074 #define LATC4                   LATCbits.LATC4                  // bit 4
6075 #define LATC5                   LATCbits.LATC5                  // bit 5
6076 #define LATC6                   LATCbits.LATC6                  // bit 6
6077 #define LATC7                   LATCbits.LATC7                  // bit 7
6078 
6079 #define ODCONA0                 ODCONAbits.ODCONA0              // bit 0
6080 #define ODCONA1                 ODCONAbits.ODCONA1              // bit 1
6081 #define ODCONA2                 ODCONAbits.ODCONA2              // bit 2
6082 #define ODCONA3                 ODCONAbits.ODCONA3              // bit 3
6083 #define ODCONA4                 ODCONAbits.ODCONA4              // bit 4
6084 #define ODCONA5                 ODCONAbits.ODCONA5              // bit 5
6085 #define ODCONA6                 ODCONAbits.ODCONA6              // bit 6
6086 #define ODCONA7                 ODCONAbits.ODCONA7              // bit 7
6087 
6088 #define ODCONB0                 ODCONBbits.ODCONB0              // bit 0
6089 #define ODCONB1                 ODCONBbits.ODCONB1              // bit 1
6090 #define ODCONB2                 ODCONBbits.ODCONB2              // bit 2
6091 #define ODCONB3                 ODCONBbits.ODCONB3              // bit 3
6092 #define ODCONB4                 ODCONBbits.ODCONB4              // bit 4
6093 #define ODCONB5                 ODCONBbits.ODCONB5              // bit 5
6094 #define ODCONB6                 ODCONBbits.ODCONB6              // bit 6
6095 #define ODCONB7                 ODCONBbits.ODCONB7              // bit 7
6096 
6097 #define ODCONC0                 ODCONCbits.ODCONC0              // bit 0
6098 #define ODCONC1                 ODCONCbits.ODCONC1              // bit 1
6099 #define ODCONC2                 ODCONCbits.ODCONC2              // bit 2
6100 #define ODCONC3                 ODCONCbits.ODCONC3              // bit 3
6101 #define ODCONC4                 ODCONCbits.ODCONC4              // bit 4
6102 #define ODCONC5                 ODCONCbits.ODCONC5              // bit 5
6103 #define ODCONC6                 ODCONCbits.ODCONC6              // bit 6
6104 #define ODCONC7                 ODCONCbits.ODCONC7              // bit 7
6105 
6106 #define OPA1CH0                 OPA1CONbits.OPA1CH0             // bit 0
6107 #define OPA1CH1                 OPA1CONbits.OPA1CH1             // bit 1
6108 #define OPA1SP                  OPA1CONbits.OPA1SP              // bit 6
6109 #define OPA1EN                  OPA1CONbits.OPA1EN              // bit 7
6110 
6111 #define OPA2CH0                 OPA2CONbits.OPA2CH0             // bit 0
6112 #define OPA2CH1                 OPA2CONbits.OPA2CH1             // bit 1
6113 #define OPA2SP                  OPA2CONbits.OPA2SP              // bit 6
6114 #define OPA2EN                  OPA2CONbits.OPA2EN              // bit 7
6115 
6116 #define PS0                     OPTION_REGbits.PS0              // bit 0
6117 #define PS1                     OPTION_REGbits.PS1              // bit 1
6118 #define PS2                     OPTION_REGbits.PS2              // bit 2
6119 #define PSA                     OPTION_REGbits.PSA              // bit 3
6120 #define TMR0SE                  OPTION_REGbits.TMR0SE           // bit 4, shadows bit in OPTION_REGbits
6121 #define T0SE                    OPTION_REGbits.T0SE             // bit 4, shadows bit in OPTION_REGbits
6122 #define TMR0CS                  OPTION_REGbits.TMR0CS           // bit 5, shadows bit in OPTION_REGbits
6123 #define T0CS                    OPTION_REGbits.T0CS             // bit 5, shadows bit in OPTION_REGbits
6124 #define INTEDG                  OPTION_REGbits.INTEDG           // bit 6
6125 #define NOT_WPUEN               OPTION_REGbits.NOT_WPUEN        // bit 7
6126 
6127 #define SCS0                    OSCCONbits.SCS0                 // bit 0
6128 #define SCS1                    OSCCONbits.SCS1                 // bit 1
6129 #define IRCF0                   OSCCONbits.IRCF0                // bit 3
6130 #define IRCF1                   OSCCONbits.IRCF1                // bit 4
6131 #define IRCF2                   OSCCONbits.IRCF2                // bit 5
6132 #define IRCF3                   OSCCONbits.IRCF3                // bit 6
6133 #define SPLLEN                  OSCCONbits.SPLLEN               // bit 7
6134 
6135 #define HFIOFS                  OSCSTATbits.HFIOFS              // bit 0
6136 #define LFIOFR                  OSCSTATbits.LFIOFR              // bit 1
6137 #define MFIOFR                  OSCSTATbits.MFIOFR              // bit 2
6138 #define HFIOFL                  OSCSTATbits.HFIOFL              // bit 3
6139 #define HFIOFR                  OSCSTATbits.HFIOFR              // bit 4
6140 #define OSTS                    OSCSTATbits.OSTS                // bit 5
6141 #define PLLR                    OSCSTATbits.PLLR                // bit 6
6142 #define T1OSCR                  OSCSTATbits.T1OSCR              // bit 7
6143 
6144 #define TUN0                    OSCTUNEbits.TUN0                // bit 0
6145 #define TUN1                    OSCTUNEbits.TUN1                // bit 1
6146 #define TUN2                    OSCTUNEbits.TUN2                // bit 2
6147 #define TUN3                    OSCTUNEbits.TUN3                // bit 3
6148 #define TUN4                    OSCTUNEbits.TUN4                // bit 4
6149 #define TUN5                    OSCTUNEbits.TUN5                // bit 5
6150 
6151 #define NOT_BOR                 PCONbits.NOT_BOR                // bit 0
6152 #define NOT_POR                 PCONbits.NOT_POR                // bit 1
6153 #define NOT_RI                  PCONbits.NOT_RI                 // bit 2
6154 #define NOT_RMCLR               PCONbits.NOT_RMCLR              // bit 3
6155 #define NOT_RWDT                PCONbits.NOT_RWDT               // bit 4
6156 #define STKUNF                  PCONbits.STKUNF                 // bit 6
6157 #define STKOVF                  PCONbits.STKOVF                 // bit 7
6158 
6159 #define TMR1IE                  PIE1bits.TMR1IE                 // bit 0
6160 #define TMR2IE                  PIE1bits.TMR2IE                 // bit 1
6161 #define CCP1IE                  PIE1bits.CCP1IE                 // bit 2
6162 #define SSP1IE                  PIE1bits.SSP1IE                 // bit 3
6163 #define TXIE                    PIE1bits.TXIE                   // bit 4
6164 #define RCIE                    PIE1bits.RCIE                   // bit 5
6165 #define ADIE                    PIE1bits.ADIE                   // bit 6
6166 #define TMR1GIE                 PIE1bits.TMR1GIE                // bit 7
6167 
6168 #define CCP2IE                  PIE2bits.CCP2IE                 // bit 0
6169 #define C3IE                    PIE2bits.C3IE                   // bit 1
6170 #define BCL1IE                  PIE2bits.BCL1IE                 // bit 3
6171 #define EEIE                    PIE2bits.EEIE                   // bit 4
6172 #define C1IE                    PIE2bits.C1IE                   // bit 5
6173 #define C2IE                    PIE2bits.C2IE                   // bit 6
6174 #define OSFIE                   PIE2bits.OSFIE                  // bit 7
6175 
6176 #define PSMC1SIE                PIE4bits.PSMC1SIE               // bit 0
6177 #define PSMC2SIE                PIE4bits.PSMC2SIE               // bit 1
6178 #define PSMC1TIE                PIE4bits.PSMC1TIE               // bit 4
6179 #define PSMC2TIE                PIE4bits.PSMC2TIE               // bit 5
6180 
6181 #define TMR1IF                  PIR1bits.TMR1IF                 // bit 0
6182 #define TMR2IF                  PIR1bits.TMR2IF                 // bit 1
6183 #define CCP1IF                  PIR1bits.CCP1IF                 // bit 2
6184 #define SSP1IF                  PIR1bits.SSP1IF                 // bit 3
6185 #define TXIF                    PIR1bits.TXIF                   // bit 4
6186 #define RCIF                    PIR1bits.RCIF                   // bit 5
6187 #define ADIF                    PIR1bits.ADIF                   // bit 6
6188 #define TMR1GIF                 PIR1bits.TMR1GIF                // bit 7
6189 
6190 #define CCP2IF                  PIR2bits.CCP2IF                 // bit 0
6191 #define C3IF                    PIR2bits.C3IF                   // bit 1
6192 #define BCL1IF                  PIR2bits.BCL1IF                 // bit 3
6193 #define EEIF                    PIR2bits.EEIF                   // bit 4
6194 #define C1IF                    PIR2bits.C1IF                   // bit 5
6195 #define C2IF                    PIR2bits.C2IF                   // bit 6
6196 #define OSFIF                   PIR2bits.OSFIF                  // bit 7
6197 
6198 #define PSMC1SIF                PIR4bits.PSMC1SIF               // bit 0
6199 #define PSMC2SIF                PIR4bits.PSMC2SIF               // bit 1
6200 #define PSMC1TIF                PIR4bits.PSMC1TIF               // bit 4
6201 #define PSMC2TIF                PIR4bits.PSMC2TIF               // bit 5
6202 
6203 #define RA0                     PORTAbits.RA0                   // bit 0
6204 #define RA1                     PORTAbits.RA1                   // bit 1
6205 #define RA2                     PORTAbits.RA2                   // bit 2
6206 #define RA3                     PORTAbits.RA3                   // bit 3
6207 #define RA4                     PORTAbits.RA4                   // bit 4
6208 #define RA5                     PORTAbits.RA5                   // bit 5
6209 #define RA6                     PORTAbits.RA6                   // bit 6
6210 #define RA7                     PORTAbits.RA7                   // bit 7
6211 
6212 #define RB0                     PORTBbits.RB0                   // bit 0
6213 #define RB1                     PORTBbits.RB1                   // bit 1
6214 #define RB2                     PORTBbits.RB2                   // bit 2
6215 #define RB3                     PORTBbits.RB3                   // bit 3
6216 #define RB4                     PORTBbits.RB4                   // bit 4
6217 #define RB5                     PORTBbits.RB5                   // bit 5
6218 #define RB6                     PORTBbits.RB6                   // bit 6
6219 #define RB7                     PORTBbits.RB7                   // bit 7
6220 
6221 #define RC0                     PORTCbits.RC0                   // bit 0
6222 #define RC1                     PORTCbits.RC1                   // bit 1
6223 #define RC2                     PORTCbits.RC2                   // bit 2
6224 #define RC3                     PORTCbits.RC3                   // bit 3
6225 #define RC4                     PORTCbits.RC4                   // bit 4
6226 #define RC5                     PORTCbits.RC5                   // bit 5
6227 #define RC6                     PORTCbits.RC6                   // bit 6
6228 #define RC7                     PORTCbits.RC7                   // bit 7
6229 
6230 #define RE3                     PORTEbits.RE3                   // bit 3
6231 
6232 #define P1ASDOV                 PSMC1ASDCbits.P1ASDOV           // bit 0
6233 #define P1ARSEN                 PSMC1ASDCbits.P1ARSEN           // bit 5
6234 #define P1ASDEN                 PSMC1ASDCbits.P1ASDEN           // bit 6
6235 #define P1ASE                   PSMC1ASDCbits.P1ASE             // bit 7
6236 
6237 #define P1ASDLA                 PSMC1ASDLbits.P1ASDLA           // bit 0
6238 #define P1ASDLB                 PSMC1ASDLbits.P1ASDLB           // bit 1
6239 #define P1ASDLC                 PSMC1ASDLbits.P1ASDLC           // bit 2
6240 #define P1ASDLD                 PSMC1ASDLbits.P1ASDLD           // bit 3
6241 #define P1ASDLE                 PSMC1ASDLbits.P1ASDLE           // bit 4
6242 #define P1ASDLF                 PSMC1ASDLbits.P1ASDLF           // bit 5
6243 
6244 #define P1ASDSC1                PSMC1ASDSbits.P1ASDSC1          // bit 1
6245 #define P1ASDSC2                PSMC1ASDSbits.P1ASDSC2          // bit 2
6246 #define P1ASDSC3                PSMC1ASDSbits.P1ASDSC3          // bit 3
6247 #define P1ASDSIN                PSMC1ASDSbits.P1ASDSIN          // bit 7
6248 
6249 #define PSMC1BLKF0              PSMC1BLKFbits.PSMC1BLKF0        // bit 0
6250 #define PSMC1BLKF1              PSMC1BLKFbits.PSMC1BLKF1        // bit 1
6251 #define PSMC1BLKF2              PSMC1BLKFbits.PSMC1BLKF2        // bit 2
6252 #define PSMC1BLKF3              PSMC1BLKFbits.PSMC1BLKF3        // bit 3
6253 #define PSMC1BLKF4              PSMC1BLKFbits.PSMC1BLKF4        // bit 4
6254 #define PSMC1BLKF5              PSMC1BLKFbits.PSMC1BLKF5        // bit 5
6255 #define PSMC1BLKF6              PSMC1BLKFbits.PSMC1BLKF6        // bit 6
6256 #define PSMC1BLKF7              PSMC1BLKFbits.PSMC1BLKF7        // bit 7
6257 
6258 #define PSMC1BLKR0              PSMC1BLKRbits.PSMC1BLKR0        // bit 0
6259 #define PSMC1BLKR1              PSMC1BLKRbits.PSMC1BLKR1        // bit 1
6260 #define PSMC1BLKR2              PSMC1BLKRbits.PSMC1BLKR2        // bit 2
6261 #define PSMC1BLKR3              PSMC1BLKRbits.PSMC1BLKR3        // bit 3
6262 #define PSMC1BLKR4              PSMC1BLKRbits.PSMC1BLKR4        // bit 4
6263 #define PSMC1BLKR5              PSMC1BLKRbits.PSMC1BLKR5        // bit 5
6264 #define PSMC1BLKR6              PSMC1BLKRbits.PSMC1BLKR6        // bit 6
6265 #define PSMC1BLKR7              PSMC1BLKRbits.PSMC1BLKR7        // bit 7
6266 
6267 #define P1REBM0                 PSMC1BLNKbits.P1REBM0           // bit 0
6268 #define P1REBM1                 PSMC1BLNKbits.P1REBM1           // bit 1
6269 #define P1FEBM0                 PSMC1BLNKbits.P1FEBM0           // bit 4
6270 #define P1FEBM1                 PSMC1BLNKbits.P1FEBM1           // bit 5
6271 
6272 #define P1CSRC0                 PSMC1CLKbits.P1CSRC0            // bit 0
6273 #define P1CSRC1                 PSMC1CLKbits.P1CSRC1            // bit 1
6274 #define P1CPRE0                 PSMC1CLKbits.P1CPRE0            // bit 4
6275 #define P1CPRE1                 PSMC1CLKbits.P1CPRE1            // bit 5
6276 
6277 #define P1MODE0                 PSMC1CONbits.P1MODE0            // bit 0
6278 #define P1MODE1                 PSMC1CONbits.P1MODE1            // bit 1
6279 #define P1MODE2                 PSMC1CONbits.P1MODE2            // bit 2
6280 #define P1MODE3                 PSMC1CONbits.P1MODE3            // bit 3
6281 #define P1DBRE                  PSMC1CONbits.P1DBRE             // bit 4
6282 #define P1DBFE                  PSMC1CONbits.P1DBFE             // bit 5
6283 #define PSMC1LD                 PSMC1CONbits.PSMC1LD            // bit 6
6284 #define PSMC1EN                 PSMC1CONbits.PSMC1EN            // bit 7
6285 
6286 #define PSMC1DBF0               PSMC1DBFbits.PSMC1DBF0          // bit 0
6287 #define PSMC1DBF1               PSMC1DBFbits.PSMC1DBF1          // bit 1
6288 #define PSMC1DBF2               PSMC1DBFbits.PSMC1DBF2          // bit 2
6289 #define PSMC1DBF3               PSMC1DBFbits.PSMC1DBF3          // bit 3
6290 #define PSMC1DBF4               PSMC1DBFbits.PSMC1DBF4          // bit 4
6291 #define PSMC1DBF5               PSMC1DBFbits.PSMC1DBF5          // bit 5
6292 #define PSMC1DBF6               PSMC1DBFbits.PSMC1DBF6          // bit 6
6293 #define PSMC1DBF7               PSMC1DBFbits.PSMC1DBF7          // bit 7
6294 
6295 #define PSMC1DBR0               PSMC1DBRbits.PSMC1DBR0          // bit 0
6296 #define PSMC1DBR1               PSMC1DBRbits.PSMC1DBR1          // bit 1
6297 #define PSMC1DBR2               PSMC1DBRbits.PSMC1DBR2          // bit 2
6298 #define PSMC1DBR3               PSMC1DBRbits.PSMC1DBR3          // bit 3
6299 #define PSMC1DBR4               PSMC1DBRbits.PSMC1DBR4          // bit 4
6300 #define PSMC1DBR5               PSMC1DBRbits.PSMC1DBR5          // bit 5
6301 #define PSMC1DBR6               PSMC1DBRbits.PSMC1DBR6          // bit 6
6302 #define PSMC1DBR7               PSMC1DBRbits.PSMC1DBR7          // bit 7
6303 
6304 #define PSMC1DC8                PSMC1DCHbits.PSMC1DC8           // bit 0
6305 #define PSMC1DC9                PSMC1DCHbits.PSMC1DC9           // bit 1
6306 #define PSMC1DC10               PSMC1DCHbits.PSMC1DC10          // bit 2
6307 #define PSMC1DC11               PSMC1DCHbits.PSMC1DC11          // bit 3
6308 #define PSMC1DC12               PSMC1DCHbits.PSMC1DC12          // bit 4
6309 #define PSMC1DC13               PSMC1DCHbits.PSMC1DC13          // bit 5
6310 #define PSMC1DC14               PSMC1DCHbits.PSMC1DC14          // bit 6
6311 #define PSMC1DC15               PSMC1DCHbits.PSMC1DC15          // bit 7
6312 
6313 #define PSMC1DC0                PSMC1DCLbits.PSMC1DC0           // bit 0
6314 #define PSMC1DC1                PSMC1DCLbits.PSMC1DC1           // bit 1
6315 #define PSMC1DC2                PSMC1DCLbits.PSMC1DC2           // bit 2
6316 #define PSMC1DC3                PSMC1DCLbits.PSMC1DC3           // bit 3
6317 #define PSMC1DC4                PSMC1DCLbits.PSMC1DC4           // bit 4
6318 #define PSMC1DC5                PSMC1DCLbits.PSMC1DC5           // bit 5
6319 #define PSMC1DC6                PSMC1DCLbits.PSMC1DC6           // bit 6
6320 #define PSMC1DC7                PSMC1DCLbits.PSMC1DC7           // bit 7
6321 
6322 #define P1DCST                  PSMC1DCSbits.P1DCST             // bit 0
6323 #define P1DCSC1                 PSMC1DCSbits.P1DCSC1            // bit 1
6324 #define P1DCSC2                 PSMC1DCSbits.P1DCSC2            // bit 2
6325 #define P1DCSC3                 PSMC1DCSbits.P1DCSC3            // bit 3
6326 #define P1DCSIN                 PSMC1DCSbits.P1DCSIN            // bit 7
6327 
6328 #define P1FEBSC1                PSMC1FEBSbits.P1FEBSC1          // bit 1
6329 #define P1FEBSC2                PSMC1FEBSbits.P1FEBSC2          // bit 2
6330 #define P1FEBSC3                PSMC1FEBSbits.P1FEBSC3          // bit 3
6331 #define P1FEBSIN                PSMC1FEBSbits.P1FEBSIN          // bit 7
6332 
6333 #define PSMC1FFA0               PSMC1FFAbits.PSMC1FFA0          // bit 0
6334 #define PSMC1FFA1               PSMC1FFAbits.PSMC1FFA1          // bit 1
6335 #define PSMC1FFA2               PSMC1FFAbits.PSMC1FFA2          // bit 2
6336 #define PSMC1FFA3               PSMC1FFAbits.PSMC1FFA3          // bit 3
6337 
6338 #define P1TPRIF                 PSMC1INTbits.P1TPRIF            // bit 0
6339 #define P1TDCIF                 PSMC1INTbits.P1TDCIF            // bit 1
6340 #define P1TPHIF                 PSMC1INTbits.P1TPHIF            // bit 2
6341 #define P1TOVIF                 PSMC1INTbits.P1TOVIF            // bit 3
6342 #define P1TPRIE                 PSMC1INTbits.P1TPRIE            // bit 4
6343 #define P1TDCIE                 PSMC1INTbits.P1TDCIE            // bit 5
6344 #define P1TPHIE                 PSMC1INTbits.P1TPHIE            // bit 6
6345 #define P1TOVIE                 PSMC1INTbits.P1TOVIE            // bit 7
6346 
6347 #define P1MSRC0                 PSMC1MDLbits.P1MSRC0            // bit 0
6348 #define P1MSRC1                 PSMC1MDLbits.P1MSRC1            // bit 1
6349 #define P1MSRC2                 PSMC1MDLbits.P1MSRC2            // bit 2
6350 #define P1MSRC3                 PSMC1MDLbits.P1MSRC3            // bit 3
6351 #define P1MDLBIT                PSMC1MDLbits.P1MDLBIT           // bit 5
6352 #define P1MDLPOL                PSMC1MDLbits.P1MDLPOL           // bit 6
6353 #define P1MDLEN                 PSMC1MDLbits.P1MDLEN            // bit 7
6354 
6355 #define P1OEA                   PSMC1OENbits.P1OEA              // bit 0
6356 #define P1OEB                   PSMC1OENbits.P1OEB              // bit 1
6357 #define P1OEC                   PSMC1OENbits.P1OEC              // bit 2
6358 #define P1OED                   PSMC1OENbits.P1OED              // bit 3
6359 #define P1OEE                   PSMC1OENbits.P1OEE              // bit 4
6360 #define P1OEF                   PSMC1OENbits.P1OEF              // bit 5
6361 
6362 #define PSMC1PH8                PSMC1PHHbits.PSMC1PH8           // bit 0
6363 #define PSMC1PH9                PSMC1PHHbits.PSMC1PH9           // bit 1
6364 #define PSMC1PH10               PSMC1PHHbits.PSMC1PH10          // bit 2
6365 #define PSMC1PH11               PSMC1PHHbits.PSMC1PH11          // bit 3
6366 #define PSMC1PH12               PSMC1PHHbits.PSMC1PH12          // bit 4
6367 #define PSMC1PH13               PSMC1PHHbits.PSMC1PH13          // bit 5
6368 #define PSMC1PH14               PSMC1PHHbits.PSMC1PH14          // bit 6
6369 #define PSMC1PH15               PSMC1PHHbits.PSMC1PH15          // bit 7
6370 
6371 #define PSMC1PH0                PSMC1PHLbits.PSMC1PH0           // bit 0
6372 #define PSMC1PH1                PSMC1PHLbits.PSMC1PH1           // bit 1
6373 #define PSMC1PH2                PSMC1PHLbits.PSMC1PH2           // bit 2
6374 #define PSMC1PH3                PSMC1PHLbits.PSMC1PH3           // bit 3
6375 #define PSMC1PH4                PSMC1PHLbits.PSMC1PH4           // bit 4
6376 #define PSMC1PH5                PSMC1PHLbits.PSMC1PH5           // bit 5
6377 #define PSMC1PH6                PSMC1PHLbits.PSMC1PH6           // bit 6
6378 #define PSMC1PH7                PSMC1PHLbits.PSMC1PH7           // bit 7
6379 
6380 #define P1PHST                  PSMC1PHSbits.P1PHST             // bit 0
6381 #define P1PHSC1                 PSMC1PHSbits.P1PHSC1            // bit 1
6382 #define P1PHSC2                 PSMC1PHSbits.P1PHSC2            // bit 2
6383 #define P1PHSC3                 PSMC1PHSbits.P1PHSC3            // bit 3
6384 #define P1PHSIN                 PSMC1PHSbits.P1PHSIN            // bit 7
6385 
6386 #define P1POLA                  PSMC1POLbits.P1POLA             // bit 0
6387 #define P1POLB                  PSMC1POLbits.P1POLB             // bit 1
6388 #define P1POLC                  PSMC1POLbits.P1POLC             // bit 2
6389 #define P1POLD                  PSMC1POLbits.P1POLD             // bit 3
6390 #define P1POLE                  PSMC1POLbits.P1POLE             // bit 4
6391 #define P1POLF                  PSMC1POLbits.P1POLF             // bit 5
6392 #define P1INPOL                 PSMC1POLbits.P1INPOL            // bit 6
6393 
6394 #define PSMC1PR8                PSMC1PRHbits.PSMC1PR8           // bit 0
6395 #define PSMC1PR9                PSMC1PRHbits.PSMC1PR9           // bit 1
6396 #define PSMC1PR10               PSMC1PRHbits.PSMC1PR10          // bit 2
6397 #define PSMC1PR11               PSMC1PRHbits.PSMC1PR11          // bit 3
6398 #define PSMC1PR12               PSMC1PRHbits.PSMC1PR12          // bit 4
6399 #define PSMC1PR13               PSMC1PRHbits.PSMC1PR13          // bit 5
6400 #define PSMC1PR14               PSMC1PRHbits.PSMC1PR14          // bit 6
6401 #define PSMC1PR15               PSMC1PRHbits.PSMC1PR15          // bit 7
6402 
6403 #define PSMC1PR0                PSMC1PRLbits.PSMC1PR0           // bit 0
6404 #define PSMC1PR1                PSMC1PRLbits.PSMC1PR1           // bit 1
6405 #define PSMC1PR2                PSMC1PRLbits.PSMC1PR2           // bit 2
6406 #define PSMC1PR3                PSMC1PRLbits.PSMC1PR3           // bit 3
6407 #define PSMC1PR4                PSMC1PRLbits.PSMC1PR4           // bit 4
6408 #define PSMC1PR5                PSMC1PRLbits.PSMC1PR5           // bit 5
6409 #define PSMC1PR6                PSMC1PRLbits.PSMC1PR6           // bit 6
6410 #define PSMC1PR7                PSMC1PRLbits.PSMC1PR7           // bit 7
6411 
6412 #define P1PRST                  PSMC1PRSbits.P1PRST             // bit 0
6413 #define P1PRSC1                 PSMC1PRSbits.P1PRSC1            // bit 1
6414 #define P1PRSC2                 PSMC1PRSbits.P1PRSC2            // bit 2
6415 #define P1PRSC3                 PSMC1PRSbits.P1PRSC3            // bit 3
6416 #define P1PRSIN                 PSMC1PRSbits.P1PRSIN            // bit 7
6417 
6418 #define P1REBSC1                PSMC1REBSbits.P1REBSC1          // bit 1
6419 #define P1REBSC2                PSMC1REBSbits.P1REBSC2          // bit 2
6420 #define P1REBSC3                PSMC1REBSbits.P1REBSC3          // bit 3
6421 #define P1REBSIN                PSMC1REBSbits.P1REBSIN          // bit 7
6422 
6423 #define P1STRA                  PSMC1STR0bits.P1STRA            // bit 0
6424 #define P1STRB                  PSMC1STR0bits.P1STRB            // bit 1
6425 #define P1STRC                  PSMC1STR0bits.P1STRC            // bit 2
6426 #define P1STRD                  PSMC1STR0bits.P1STRD            // bit 3
6427 #define P1STRE                  PSMC1STR0bits.P1STRE            // bit 4
6428 #define P1STRF                  PSMC1STR0bits.P1STRF            // bit 5
6429 
6430 #define P1HSMEN                 PSMC1STR1bits.P1HSMEN           // bit 0
6431 #define P1LSMEN                 PSMC1STR1bits.P1LSMEN           // bit 1
6432 #define P1SSYNC                 PSMC1STR1bits.P1SSYNC           // bit 7
6433 
6434 #define P1SYNC0                 PSMC1SYNCbits.P1SYNC0           // bit 0
6435 #define P1SYNC1                 PSMC1SYNCbits.P1SYNC1           // bit 1
6436 
6437 #define PSMC1TMR8               PSMC1TMRHbits.PSMC1TMR8         // bit 0
6438 #define PSMC1TMR9               PSMC1TMRHbits.PSMC1TMR9         // bit 1
6439 #define PSMC1TMR10              PSMC1TMRHbits.PSMC1TMR10        // bit 2
6440 #define PSMC1TMR11              PSMC1TMRHbits.PSMC1TMR11        // bit 3
6441 #define PSMC1TMR12              PSMC1TMRHbits.PSMC1TMR12        // bit 4
6442 #define PSMC1TMR13              PSMC1TMRHbits.PSMC1TMR13        // bit 5
6443 #define PSMC1TMR14              PSMC1TMRHbits.PSMC1TMR14        // bit 6
6444 #define PSMC1TMR15              PSMC1TMRHbits.PSMC1TMR15        // bit 7
6445 
6446 #define PSMC1TMR0               PSMC1TMRLbits.PSMC1TMR0         // bit 0
6447 #define PSMC1TMR1               PSMC1TMRLbits.PSMC1TMR1         // bit 1
6448 #define PSMC1TMR2               PSMC1TMRLbits.PSMC1TMR2         // bit 2
6449 #define PSMC1TMR3               PSMC1TMRLbits.PSMC1TMR3         // bit 3
6450 #define PSMC1TMR4               PSMC1TMRLbits.PSMC1TMR4         // bit 4
6451 #define PSMC1TMR5               PSMC1TMRLbits.PSMC1TMR5         // bit 5
6452 #define PSMC1TMR6               PSMC1TMRLbits.PSMC1TMR6         // bit 6
6453 #define PSMC1TMR7               PSMC1TMRLbits.PSMC1TMR7         // bit 7
6454 
6455 #define P2ASDOV                 PSMC2ASDCbits.P2ASDOV           // bit 0
6456 #define P2ARSEN                 PSMC2ASDCbits.P2ARSEN           // bit 5
6457 #define P2ASDEN                 PSMC2ASDCbits.P2ASDEN           // bit 6
6458 #define P2ASE                   PSMC2ASDCbits.P2ASE             // bit 7
6459 
6460 #define P2ASDLA                 PSMC2ASDLbits.P2ASDLA           // bit 0
6461 #define P2ASDLB                 PSMC2ASDLbits.P2ASDLB           // bit 1
6462 
6463 #define P2ASDSC1                PSMC2ASDSbits.P2ASDSC1          // bit 1
6464 #define P2ASDSC2                PSMC2ASDSbits.P2ASDSC2          // bit 2
6465 #define P2ASDSC3                PSMC2ASDSbits.P2ASDSC3          // bit 3
6466 #define P2ASDSIN                PSMC2ASDSbits.P2ASDSIN          // bit 7
6467 
6468 #define PSMC2BLKF0              PSMC2BLKFbits.PSMC2BLKF0        // bit 0
6469 #define PSMC2BLKF1              PSMC2BLKFbits.PSMC2BLKF1        // bit 1
6470 #define PSMC2BLKF2              PSMC2BLKFbits.PSMC2BLKF2        // bit 2
6471 #define PSMC2BLKF3              PSMC2BLKFbits.PSMC2BLKF3        // bit 3
6472 #define PSMC2BLKF4              PSMC2BLKFbits.PSMC2BLKF4        // bit 4
6473 #define PSMC2BLKF5              PSMC2BLKFbits.PSMC2BLKF5        // bit 5
6474 #define PSMC2BLKF6              PSMC2BLKFbits.PSMC2BLKF6        // bit 6
6475 #define PSMC2BLKF7              PSMC2BLKFbits.PSMC2BLKF7        // bit 7
6476 
6477 #define PSMC2BLKR0              PSMC2BLKRbits.PSMC2BLKR0        // bit 0
6478 #define PSMC2BLKR1              PSMC2BLKRbits.PSMC2BLKR1        // bit 1
6479 #define PSMC2BLKR2              PSMC2BLKRbits.PSMC2BLKR2        // bit 2
6480 #define PSMC2BLKR3              PSMC2BLKRbits.PSMC2BLKR3        // bit 3
6481 #define PSMC2BLKR4              PSMC2BLKRbits.PSMC2BLKR4        // bit 4
6482 #define PSMC2BLKR5              PSMC2BLKRbits.PSMC2BLKR5        // bit 5
6483 #define PSMC2BLKR6              PSMC2BLKRbits.PSMC2BLKR6        // bit 6
6484 #define PSMC2BLKR7              PSMC2BLKRbits.PSMC2BLKR7        // bit 7
6485 
6486 #define P2REBM0                 PSMC2BLNKbits.P2REBM0           // bit 0
6487 #define P2REBM1                 PSMC2BLNKbits.P2REBM1           // bit 1
6488 #define P2FEBM0                 PSMC2BLNKbits.P2FEBM0           // bit 4
6489 #define P2FEBM1                 PSMC2BLNKbits.P2FEBM1           // bit 5
6490 
6491 #define P2CSRC0                 PSMC2CLKbits.P2CSRC0            // bit 0
6492 #define P2CSRC1                 PSMC2CLKbits.P2CSRC1            // bit 1
6493 #define P2CPRE0                 PSMC2CLKbits.P2CPRE0            // bit 4
6494 #define P2CPRE1                 PSMC2CLKbits.P2CPRE1            // bit 5
6495 
6496 #define P2MODE0                 PSMC2CONbits.P2MODE0            // bit 0
6497 #define P2MODE1                 PSMC2CONbits.P2MODE1            // bit 1
6498 #define P2MODE2                 PSMC2CONbits.P2MODE2            // bit 2
6499 #define P2MODE3                 PSMC2CONbits.P2MODE3            // bit 3
6500 #define P2DBRE                  PSMC2CONbits.P2DBRE             // bit 4
6501 #define P2DBFE                  PSMC2CONbits.P2DBFE             // bit 5
6502 #define PSMC2LD                 PSMC2CONbits.PSMC2LD            // bit 6
6503 #define PSMC2EN                 PSMC2CONbits.PSMC2EN            // bit 7
6504 
6505 #define PSMC2DBF0               PSMC2DBFbits.PSMC2DBF0          // bit 0
6506 #define PSMC2DBF1               PSMC2DBFbits.PSMC2DBF1          // bit 1
6507 #define PSMC2DBF2               PSMC2DBFbits.PSMC2DBF2          // bit 2
6508 #define PSMC2DBF3               PSMC2DBFbits.PSMC2DBF3          // bit 3
6509 #define PSMC2DBF4               PSMC2DBFbits.PSMC2DBF4          // bit 4
6510 #define PSMC2DBF5               PSMC2DBFbits.PSMC2DBF5          // bit 5
6511 #define PSMC2DBF6               PSMC2DBFbits.PSMC2DBF6          // bit 6
6512 #define PSMC2DBF7               PSMC2DBFbits.PSMC2DBF7          // bit 7
6513 
6514 #define PSMC2DBR0               PSMC2DBRbits.PSMC2DBR0          // bit 0
6515 #define PSMC2DBR1               PSMC2DBRbits.PSMC2DBR1          // bit 1
6516 #define PSMC2DBR2               PSMC2DBRbits.PSMC2DBR2          // bit 2
6517 #define PSMC2DBR3               PSMC2DBRbits.PSMC2DBR3          // bit 3
6518 #define PSMC2DBR4               PSMC2DBRbits.PSMC2DBR4          // bit 4
6519 #define PSMC2DBR5               PSMC2DBRbits.PSMC2DBR5          // bit 5
6520 #define PSMC2DBR6               PSMC2DBRbits.PSMC2DBR6          // bit 6
6521 #define PSMC2DBR7               PSMC2DBRbits.PSMC2DBR7          // bit 7
6522 
6523 #define PSMC2DC8                PSMC2DCHbits.PSMC2DC8           // bit 0
6524 #define PSMC2DC9                PSMC2DCHbits.PSMC2DC9           // bit 1
6525 #define PSMC2DC10               PSMC2DCHbits.PSMC2DC10          // bit 2
6526 #define PSMC2DC11               PSMC2DCHbits.PSMC2DC11          // bit 3
6527 #define PSMC2DC12               PSMC2DCHbits.PSMC2DC12          // bit 4
6528 #define PSMC2DC13               PSMC2DCHbits.PSMC2DC13          // bit 5
6529 #define PSMC2DC14               PSMC2DCHbits.PSMC2DC14          // bit 6
6530 #define PSMC2DC15               PSMC2DCHbits.PSMC2DC15          // bit 7
6531 
6532 #define PSMC2DC0                PSMC2DCLbits.PSMC2DC0           // bit 0
6533 #define PSMC2DC1                PSMC2DCLbits.PSMC2DC1           // bit 1
6534 #define PSMC2DC2                PSMC2DCLbits.PSMC2DC2           // bit 2
6535 #define PSMC2DC3                PSMC2DCLbits.PSMC2DC3           // bit 3
6536 #define PSMC2DC4                PSMC2DCLbits.PSMC2DC4           // bit 4
6537 #define PSMC2DC5                PSMC2DCLbits.PSMC2DC5           // bit 5
6538 #define PSMC2DC6                PSMC2DCLbits.PSMC2DC6           // bit 6
6539 #define PSMC2DC7                PSMC2DCLbits.PSMC2DC7           // bit 7
6540 
6541 #define P2DCST                  PSMC2DCSbits.P2DCST             // bit 0
6542 #define P2DCSC1                 PSMC2DCSbits.P2DCSC1            // bit 1
6543 #define P2DCSC2                 PSMC2DCSbits.P2DCSC2            // bit 2
6544 #define P2DCSC3                 PSMC2DCSbits.P2DCSC3            // bit 3
6545 #define P2DCSIN                 PSMC2DCSbits.P2DCSIN            // bit 7
6546 
6547 #define P2FEBSC1                PSMC2FEBSbits.P2FEBSC1          // bit 1
6548 #define P2FEBSC2                PSMC2FEBSbits.P2FEBSC2          // bit 2
6549 #define P2FEBSC3                PSMC2FEBSbits.P2FEBSC3          // bit 3
6550 #define P2FEBSIN                PSMC2FEBSbits.P2FEBSIN          // bit 7
6551 
6552 #define PSMC2FFA0               PSMC2FFAbits.PSMC2FFA0          // bit 0
6553 #define PSMC2FFA1               PSMC2FFAbits.PSMC2FFA1          // bit 1
6554 #define PSMC2FFA2               PSMC2FFAbits.PSMC2FFA2          // bit 2
6555 #define PSMC2FFA3               PSMC2FFAbits.PSMC2FFA3          // bit 3
6556 
6557 #define P2TPRIF                 PSMC2INTbits.P2TPRIF            // bit 0
6558 #define P2TDCIF                 PSMC2INTbits.P2TDCIF            // bit 1
6559 #define P2TPHIF                 PSMC2INTbits.P2TPHIF            // bit 2
6560 #define P2TOVIF                 PSMC2INTbits.P2TOVIF            // bit 3
6561 #define P2TPRIE                 PSMC2INTbits.P2TPRIE            // bit 4
6562 #define P2TDCIE                 PSMC2INTbits.P2TDCIE            // bit 5
6563 #define P2TPHIE                 PSMC2INTbits.P2TPHIE            // bit 6
6564 #define P2TOVIE                 PSMC2INTbits.P2TOVIE            // bit 7
6565 
6566 #define P2MSRC0                 PSMC2MDLbits.P2MSRC0            // bit 0
6567 #define P2MSRC1                 PSMC2MDLbits.P2MSRC1            // bit 1
6568 #define P2MSRC2                 PSMC2MDLbits.P2MSRC2            // bit 2
6569 #define P2MSRC3                 PSMC2MDLbits.P2MSRC3            // bit 3
6570 #define P2MDLBIT                PSMC2MDLbits.P2MDLBIT           // bit 5
6571 #define P2MDLPOL                PSMC2MDLbits.P2MDLPOL           // bit 6
6572 #define P2MDLEN                 PSMC2MDLbits.P2MDLEN            // bit 7
6573 
6574 #define P2OEA                   PSMC2OENbits.P2OEA              // bit 0
6575 #define P2OEB                   PSMC2OENbits.P2OEB              // bit 1
6576 
6577 #define PSMC2PH8                PSMC2PHHbits.PSMC2PH8           // bit 0
6578 #define PSMC2PH9                PSMC2PHHbits.PSMC2PH9           // bit 1
6579 #define PSMC2PH10               PSMC2PHHbits.PSMC2PH10          // bit 2
6580 #define PSMC2PH11               PSMC2PHHbits.PSMC2PH11          // bit 3
6581 #define PSMC2PH12               PSMC2PHHbits.PSMC2PH12          // bit 4
6582 #define PSMC2PH13               PSMC2PHHbits.PSMC2PH13          // bit 5
6583 #define PSMC2PH14               PSMC2PHHbits.PSMC2PH14          // bit 6
6584 #define PSMC2PH15               PSMC2PHHbits.PSMC2PH15          // bit 7
6585 
6586 #define PSMC2PH0                PSMC2PHLbits.PSMC2PH0           // bit 0
6587 #define PSMC2PH1                PSMC2PHLbits.PSMC2PH1           // bit 1
6588 #define PSMC2PH2                PSMC2PHLbits.PSMC2PH2           // bit 2
6589 #define PSMC2PH3                PSMC2PHLbits.PSMC2PH3           // bit 3
6590 #define PSMC2PH4                PSMC2PHLbits.PSMC2PH4           // bit 4
6591 #define PSMC2PH5                PSMC2PHLbits.PSMC2PH5           // bit 5
6592 #define PSMC2PH6                PSMC2PHLbits.PSMC2PH6           // bit 6
6593 #define PSMC2PH7                PSMC2PHLbits.PSMC2PH7           // bit 7
6594 
6595 #define P2PHST                  PSMC2PHSbits.P2PHST             // bit 0
6596 #define P2PHSC1                 PSMC2PHSbits.P2PHSC1            // bit 1
6597 #define P2PHSC2                 PSMC2PHSbits.P2PHSC2            // bit 2
6598 #define P2PHSC3                 PSMC2PHSbits.P2PHSC3            // bit 3
6599 #define P2PHSIN                 PSMC2PHSbits.P2PHSIN            // bit 7
6600 
6601 #define P2POLA                  PSMC2POLbits.P2POLA             // bit 0
6602 #define P2POLB                  PSMC2POLbits.P2POLB             // bit 1
6603 #define P2INPOL                 PSMC2POLbits.P2INPOL            // bit 6
6604 
6605 #define PSMC2PR8                PSMC2PRHbits.PSMC2PR8           // bit 0
6606 #define PSMC2PR9                PSMC2PRHbits.PSMC2PR9           // bit 1
6607 #define PSMC2PR10               PSMC2PRHbits.PSMC2PR10          // bit 2
6608 #define PSMC2PR11               PSMC2PRHbits.PSMC2PR11          // bit 3
6609 #define PSMC2PR12               PSMC2PRHbits.PSMC2PR12          // bit 4
6610 #define PSMC2PR13               PSMC2PRHbits.PSMC2PR13          // bit 5
6611 #define PSMC2PR14               PSMC2PRHbits.PSMC2PR14          // bit 6
6612 #define PSMC2PR15               PSMC2PRHbits.PSMC2PR15          // bit 7
6613 
6614 #define PSMC2PR0                PSMC2PRLbits.PSMC2PR0           // bit 0
6615 #define PSMC2PR1                PSMC2PRLbits.PSMC2PR1           // bit 1
6616 #define PSMC2PR2                PSMC2PRLbits.PSMC2PR2           // bit 2
6617 #define PSMC2PR3                PSMC2PRLbits.PSMC2PR3           // bit 3
6618 #define PSMC2PR4                PSMC2PRLbits.PSMC2PR4           // bit 4
6619 #define PSMC2PR5                PSMC2PRLbits.PSMC2PR5           // bit 5
6620 #define PSMC2PR6                PSMC2PRLbits.PSMC2PR6           // bit 6
6621 #define PSMC2PR7                PSMC2PRLbits.PSMC2PR7           // bit 7
6622 
6623 #define P2PRST                  PSMC2PRSbits.P2PRST             // bit 0
6624 #define P2PRSC1                 PSMC2PRSbits.P2PRSC1            // bit 1
6625 #define P2PRSC2                 PSMC2PRSbits.P2PRSC2            // bit 2
6626 #define P2PRSC3                 PSMC2PRSbits.P2PRSC3            // bit 3
6627 #define P2PRSIN                 PSMC2PRSbits.P2PRSIN            // bit 7
6628 
6629 #define P2REBSC1                PSMC2REBSbits.P2REBSC1          // bit 1
6630 #define P2REBSC2                PSMC2REBSbits.P2REBSC2          // bit 2
6631 #define P2REBSC3                PSMC2REBSbits.P2REBSC3          // bit 3
6632 #define P2REBSIN                PSMC2REBSbits.P2REBSIN          // bit 7
6633 
6634 #define P2STRA                  PSMC2STR0bits.P2STRA            // bit 0
6635 #define P2STRB                  PSMC2STR0bits.P2STRB            // bit 1
6636 
6637 #define P2HSMEN                 PSMC2STR1bits.P2HSMEN           // bit 0
6638 #define P2LSMEN                 PSMC2STR1bits.P2LSMEN           // bit 1
6639 #define P2SSYNC                 PSMC2STR1bits.P2SSYNC           // bit 7
6640 
6641 #define P2SYNC0                 PSMC2SYNCbits.P2SYNC0           // bit 0
6642 #define P2SYNC1                 PSMC2SYNCbits.P2SYNC1           // bit 1
6643 
6644 #define PSMC2TMR8               PSMC2TMRHbits.PSMC2TMR8         // bit 0
6645 #define PSMC2TMR9               PSMC2TMRHbits.PSMC2TMR9         // bit 1
6646 #define PSMC2TMR10              PSMC2TMRHbits.PSMC2TMR10        // bit 2
6647 #define PSMC2TMR11              PSMC2TMRHbits.PSMC2TMR11        // bit 3
6648 #define PSMC2TMR12              PSMC2TMRHbits.PSMC2TMR12        // bit 4
6649 #define PSMC2TMR13              PSMC2TMRHbits.PSMC2TMR13        // bit 5
6650 #define PSMC2TMR14              PSMC2TMRHbits.PSMC2TMR14        // bit 6
6651 #define PSMC2TMR15              PSMC2TMRHbits.PSMC2TMR15        // bit 7
6652 
6653 #define PSMC2TMR0               PSMC2TMRLbits.PSMC2TMR0         // bit 0
6654 #define PSMC2TMR1               PSMC2TMRLbits.PSMC2TMR1         // bit 1
6655 #define PSMC2TMR2               PSMC2TMRLbits.PSMC2TMR2         // bit 2
6656 #define PSMC2TMR3               PSMC2TMRLbits.PSMC2TMR3         // bit 3
6657 #define PSMC2TMR4               PSMC2TMRLbits.PSMC2TMR4         // bit 4
6658 #define PSMC2TMR5               PSMC2TMRLbits.PSMC2TMR5         // bit 5
6659 #define PSMC2TMR6               PSMC2TMRLbits.PSMC2TMR6         // bit 6
6660 #define PSMC2TMR7               PSMC2TMRLbits.PSMC2TMR7         // bit 7
6661 
6662 #define RX9D                    RC1STAbits.RX9D                 // bit 0
6663 #define OERR                    RC1STAbits.OERR                 // bit 1
6664 #define FERR                    RC1STAbits.FERR                 // bit 2
6665 #define ADDEN                   RC1STAbits.ADDEN                // bit 3
6666 #define CREN                    RC1STAbits.CREN                 // bit 4
6667 #define SREN                    RC1STAbits.SREN                 // bit 5
6668 #define RX9                     RC1STAbits.RX9                  // bit 6
6669 #define SPEN                    RC1STAbits.SPEN                 // bit 7
6670 
6671 #define SLRCONA0                SLRCONAbits.SLRCONA0            // bit 0
6672 #define SLRCONA1                SLRCONAbits.SLRCONA1            // bit 1
6673 #define SLRCONA2                SLRCONAbits.SLRCONA2            // bit 2
6674 #define SLRCONA3                SLRCONAbits.SLRCONA3            // bit 3
6675 #define SLRCONA4                SLRCONAbits.SLRCONA4            // bit 4
6676 #define SLRCONA5                SLRCONAbits.SLRCONA5            // bit 5
6677 #define SLRCONA6                SLRCONAbits.SLRCONA6            // bit 6
6678 #define SLRCONA7                SLRCONAbits.SLRCONA7            // bit 7
6679 
6680 #define SLRCONB0                SLRCONBbits.SLRCONB0            // bit 0
6681 #define SLRCONB1                SLRCONBbits.SLRCONB1            // bit 1
6682 #define SLRCONB2                SLRCONBbits.SLRCONB2            // bit 2
6683 #define SLRCONB3                SLRCONBbits.SLRCONB3            // bit 3
6684 #define SLRCONB4                SLRCONBbits.SLRCONB4            // bit 4
6685 #define SLRCONB5                SLRCONBbits.SLRCONB5            // bit 5
6686 #define SLRCONB6                SLRCONBbits.SLRCONB6            // bit 6
6687 #define SLRCONB7                SLRCONBbits.SLRCONB7            // bit 7
6688 
6689 #define SLRCONC0                SLRCONCbits.SLRCONC0            // bit 0
6690 #define SLRCONC1                SLRCONCbits.SLRCONC1            // bit 1
6691 #define SLRCONC2                SLRCONCbits.SLRCONC2            // bit 2
6692 #define SLRCONC3                SLRCONCbits.SLRCONC3            // bit 3
6693 #define SLRCONC4                SLRCONCbits.SLRCONC4            // bit 4
6694 #define SLRCONC5                SLRCONCbits.SLRCONC5            // bit 5
6695 #define SLRCONC6                SLRCONCbits.SLRCONC6            // bit 6
6696 #define SLRCONC7                SLRCONCbits.SLRCONC7            // bit 7
6697 
6698 #define SSPM0                   SSP1CONbits.SSPM0               // bit 0
6699 #define SSPM1                   SSP1CONbits.SSPM1               // bit 1
6700 #define SSPM2                   SSP1CONbits.SSPM2               // bit 2
6701 #define SSPM3                   SSP1CONbits.SSPM3               // bit 3
6702 #define CKP                     SSP1CONbits.CKP                 // bit 4
6703 #define SSPEN                   SSP1CONbits.SSPEN               // bit 5
6704 #define SSPOV                   SSP1CONbits.SSPOV               // bit 6
6705 #define WCOL                    SSP1CONbits.WCOL                // bit 7
6706 
6707 #define SEN                     SSP1CON2bits.SEN                // bit 0
6708 #define RSEN                    SSP1CON2bits.RSEN               // bit 1
6709 #define PEN                     SSP1CON2bits.PEN                // bit 2
6710 #define RCEN                    SSP1CON2bits.RCEN               // bit 3
6711 #define ACKEN                   SSP1CON2bits.ACKEN              // bit 4
6712 #define ACKDT                   SSP1CON2bits.ACKDT              // bit 5
6713 #define ACKSTAT                 SSP1CON2bits.ACKSTAT            // bit 6
6714 #define GCEN                    SSP1CON2bits.GCEN               // bit 7
6715 
6716 #define DHEN                    SSP1CON3bits.DHEN               // bit 0
6717 #define AHEN                    SSP1CON3bits.AHEN               // bit 1
6718 #define SBCDE                   SSP1CON3bits.SBCDE              // bit 2
6719 #define SDAHT                   SSP1CON3bits.SDAHT              // bit 3
6720 #define BOEN                    SSP1CON3bits.BOEN               // bit 4
6721 #define SCIE                    SSP1CON3bits.SCIE               // bit 5
6722 #define PCIE                    SSP1CON3bits.PCIE               // bit 6
6723 #define ACKTIM                  SSP1CON3bits.ACKTIM             // bit 7
6724 
6725 #define BF                      SSP1STATbits.BF                 // bit 0
6726 #define UA                      SSP1STATbits.UA                 // bit 1
6727 #define R_NOT_W                 SSP1STATbits.R_NOT_W            // bit 2
6728 #define S                       SSP1STATbits.S                  // bit 3
6729 #define P                       SSP1STATbits.P                  // bit 4
6730 #define D_NOT_A                 SSP1STATbits.D_NOT_A            // bit 5
6731 #define CKE                     SSP1STATbits.CKE                // bit 6
6732 #define SMP                     SSP1STATbits.SMP                // bit 7
6733 
6734 #define C                       STATUSbits.C                    // bit 0
6735 #define DC                      STATUSbits.DC                   // bit 1
6736 #define Z                       STATUSbits.Z                    // bit 2
6737 #define NOT_PD                  STATUSbits.NOT_PD               // bit 3
6738 #define NOT_TO                  STATUSbits.NOT_TO               // bit 4
6739 
6740 #define C_SHAD                  STATUS_SHADbits.C_SHAD          // bit 0
6741 #define DC_SHAD                 STATUS_SHADbits.DC_SHAD         // bit 1
6742 #define Z_SHAD                  STATUS_SHADbits.Z_SHAD          // bit 2
6743 
6744 #define TMR1ON                  T1CONbits.TMR1ON                // bit 0
6745 #define NOT_T1SYNC              T1CONbits.NOT_T1SYNC            // bit 2
6746 #define T1OSCEN                 T1CONbits.T1OSCEN               // bit 3
6747 #define T1CKPS0                 T1CONbits.T1CKPS0               // bit 4
6748 #define T1CKPS1                 T1CONbits.T1CKPS1               // bit 5
6749 #define TMR1CS0                 T1CONbits.TMR1CS0               // bit 6
6750 #define TMR1CS1                 T1CONbits.TMR1CS1               // bit 7
6751 
6752 #define T1GSS0                  T1GCONbits.T1GSS0               // bit 0
6753 #define T1GSS1                  T1GCONbits.T1GSS1               // bit 1
6754 #define T1GVAL                  T1GCONbits.T1GVAL               // bit 2
6755 #define T1GGO                   T1GCONbits.T1GGO                // bit 3
6756 #define T1GSPM                  T1GCONbits.T1GSPM               // bit 4
6757 #define T1GTM                   T1GCONbits.T1GTM                // bit 5
6758 #define T1GPOL                  T1GCONbits.T1GPOL               // bit 6
6759 #define TMR1GE                  T1GCONbits.TMR1GE               // bit 7
6760 
6761 #define T2CKPS0                 T2CONbits.T2CKPS0               // bit 0
6762 #define T2CKPS1                 T2CONbits.T2CKPS1               // bit 1
6763 #define TMR2ON                  T2CONbits.TMR2ON                // bit 2
6764 #define T2OUTPS0                T2CONbits.T2OUTPS0              // bit 3
6765 #define T2OUTPS1                T2CONbits.T2OUTPS1              // bit 4
6766 #define T2OUTPS2                T2CONbits.T2OUTPS2              // bit 5
6767 #define T2OUTPS3                T2CONbits.T2OUTPS3              // bit 6
6768 
6769 #define TRISA0                  TRISAbits.TRISA0                // bit 0
6770 #define TRISA1                  TRISAbits.TRISA1                // bit 1
6771 #define TRISA2                  TRISAbits.TRISA2                // bit 2
6772 #define TRISA3                  TRISAbits.TRISA3                // bit 3
6773 #define TRISA4                  TRISAbits.TRISA4                // bit 4
6774 #define TRISA5                  TRISAbits.TRISA5                // bit 5
6775 #define TRISA6                  TRISAbits.TRISA6                // bit 6
6776 #define TRISA7                  TRISAbits.TRISA7                // bit 7
6777 
6778 #define TRISB0                  TRISBbits.TRISB0                // bit 0
6779 #define TRISB1                  TRISBbits.TRISB1                // bit 1
6780 #define TRISB2                  TRISBbits.TRISB2                // bit 2
6781 #define TRISB3                  TRISBbits.TRISB3                // bit 3
6782 #define TRISB4                  TRISBbits.TRISB4                // bit 4
6783 #define TRISB5                  TRISBbits.TRISB5                // bit 5
6784 #define TRISB6                  TRISBbits.TRISB6                // bit 6
6785 #define TRISB7                  TRISBbits.TRISB7                // bit 7
6786 
6787 #define TRISC0                  TRISCbits.TRISC0                // bit 0
6788 #define TRISC1                  TRISCbits.TRISC1                // bit 1
6789 #define TRISC2                  TRISCbits.TRISC2                // bit 2
6790 #define TRISC3                  TRISCbits.TRISC3                // bit 3
6791 #define TRISC4                  TRISCbits.TRISC4                // bit 4
6792 #define TRISC5                  TRISCbits.TRISC5                // bit 5
6793 #define TRISC6                  TRISCbits.TRISC6                // bit 6
6794 #define TRISC7                  TRISCbits.TRISC7                // bit 7
6795 
6796 #define TRISE3                  TRISEbits.TRISE3                // bit 3
6797 
6798 #define TX9D                    TX1STAbits.TX9D                 // bit 0
6799 #define TRMT                    TX1STAbits.TRMT                 // bit 1
6800 #define BRGH                    TX1STAbits.BRGH                 // bit 2
6801 #define SENDB                   TX1STAbits.SENDB                // bit 3
6802 #define SYNC                    TX1STAbits.SYNC                 // bit 4
6803 #define TXEN                    TX1STAbits.TXEN                 // bit 5
6804 #define TX9                     TX1STAbits.TX9                  // bit 6
6805 #define CSRC                    TX1STAbits.CSRC                 // bit 7
6806 
6807 #define SWDTEN                  WDTCONbits.SWDTEN               // bit 0
6808 #define WDTPS0                  WDTCONbits.WDTPS0               // bit 1
6809 #define WDTPS1                  WDTCONbits.WDTPS1               // bit 2
6810 #define WDTPS2                  WDTCONbits.WDTPS2               // bit 3
6811 #define WDTPS3                  WDTCONbits.WDTPS3               // bit 4
6812 #define WDTPS4                  WDTCONbits.WDTPS4               // bit 5
6813 
6814 #define WPUA0                   WPUAbits.WPUA0                  // bit 0
6815 #define WPUA1                   WPUAbits.WPUA1                  // bit 1
6816 #define WPUA2                   WPUAbits.WPUA2                  // bit 2
6817 #define WPUA3                   WPUAbits.WPUA3                  // bit 3
6818 #define WPUA4                   WPUAbits.WPUA4                  // bit 4
6819 #define WPUA5                   WPUAbits.WPUA5                  // bit 5
6820 #define WPUA6                   WPUAbits.WPUA6                  // bit 6
6821 #define WPUA7                   WPUAbits.WPUA7                  // bit 7
6822 
6823 #define WPUB0                   WPUBbits.WPUB0                  // bit 0
6824 #define WPUB1                   WPUBbits.WPUB1                  // bit 1
6825 #define WPUB2                   WPUBbits.WPUB2                  // bit 2
6826 #define WPUB3                   WPUBbits.WPUB3                  // bit 3
6827 #define WPUB4                   WPUBbits.WPUB4                  // bit 4
6828 #define WPUB5                   WPUBbits.WPUB5                  // bit 5
6829 #define WPUB6                   WPUBbits.WPUB6                  // bit 6
6830 #define WPUB7                   WPUBbits.WPUB7                  // bit 7
6831 
6832 #define WPUC0                   WPUCbits.WPUC0                  // bit 0
6833 #define WPUC1                   WPUCbits.WPUC1                  // bit 1
6834 #define WPUC2                   WPUCbits.WPUC2                  // bit 2
6835 #define WPUC3                   WPUCbits.WPUC3                  // bit 3
6836 #define WPUC4                   WPUCbits.WPUC4                  // bit 4
6837 #define WPUC5                   WPUCbits.WPUC5                  // bit 5
6838 #define WPUC6                   WPUCbits.WPUC6                  // bit 6
6839 #define WPUC7                   WPUCbits.WPUC7                  // bit 7
6840 
6841 #define WPUE3                   WPUEbits.WPUE3                  // bit 3
6842 
6843 #endif // #ifndef NO_BIT_DEFINES
6844 
6845 #endif // #ifndef __PIC16LF1782_H__
6846