Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f1613.h
blob98258e49e9d0cadb4b4ff6fd3af52fe85527c754
1 /*
2 * This declarations of the PIC16F1613 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:09 UTC.
9 * SDCC is licensed under the GNU Public license (GPL) v2. Note that
10 * this license covers the code to the compiler and other executables,
11 * but explicitly does not cover any code or objects generated by sdcc.
13 * For pic device libraries and header files which are derived from
14 * Microchip header (.inc) and linker script (.lkr) files Microchip
15 * requires that "The header files should state that they are only to be
16 * used with authentic Microchip devices" which makes them incompatible
17 * with the GPL. Pic device libraries and header files are located at
18 * non-free/lib and non-free/include directories respectively.
19 * Sdcc should be run with the --use-non-free command line option in
20 * order to include non-free header files and libraries.
22 * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
25 #ifndef __PIC16F1613_H__
26 #define __PIC16F1613_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF0_ADDR 0x0000
37 #define INDF1_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR0_ADDR 0x0004
41 #define FSR0L_ADDR 0x0004
42 #define FSR0H_ADDR 0x0005
43 #define FSR1_ADDR 0x0006
44 #define FSR1L_ADDR 0x0006
45 #define FSR1H_ADDR 0x0007
46 #define BSR_ADDR 0x0008
47 #define WREG_ADDR 0x0009
48 #define PCLATH_ADDR 0x000A
49 #define INTCON_ADDR 0x000B
50 #define PORTA_ADDR 0x000C
51 #define PORTC_ADDR 0x000E
52 #define PIR1_ADDR 0x0011
53 #define PIR2_ADDR 0x0012
54 #define PIR3_ADDR 0x0013
55 #define PIR4_ADDR 0x0014
56 #define TMR0_ADDR 0x0015
57 #define TMR1_ADDR 0x0016
58 #define TMR1L_ADDR 0x0016
59 #define TMR1H_ADDR 0x0017
60 #define T1CON_ADDR 0x0018
61 #define T1GCON_ADDR 0x0019
62 #define T2TMR_ADDR 0x001A
63 #define TMR2_ADDR 0x001A
64 #define PR2_ADDR 0x001B
65 #define T2PR_ADDR 0x001B
66 #define T2CON_ADDR 0x001C
67 #define T2HLT_ADDR 0x001D
68 #define T2CLKCON_ADDR 0x001E
69 #define T2RST_ADDR 0x001F
70 #define TRISA_ADDR 0x008C
71 #define TRISC_ADDR 0x008E
72 #define PIE1_ADDR 0x0091
73 #define PIE2_ADDR 0x0092
74 #define PIE3_ADDR 0x0093
75 #define PIE4_ADDR 0x0094
76 #define OPTION_REG_ADDR 0x0095
77 #define PCON_ADDR 0x0096
78 #define OSCTUNE_ADDR 0x0098
79 #define OSCCON_ADDR 0x0099
80 #define OSCSTAT_ADDR 0x009A
81 #define ADRES_ADDR 0x009B
82 #define ADRESL_ADDR 0x009B
83 #define ADRESH_ADDR 0x009C
84 #define ADCON0_ADDR 0x009D
85 #define ADCON1_ADDR 0x009E
86 #define ADCON2_ADDR 0x009F
87 #define LATA_ADDR 0x010C
88 #define LATC_ADDR 0x010E
89 #define CM1CON0_ADDR 0x0111
90 #define CM1CON1_ADDR 0x0112
91 #define CM2CON0_ADDR 0x0113
92 #define CM2CON1_ADDR 0x0114
93 #define CMOUT_ADDR 0x0115
94 #define BORCON_ADDR 0x0116
95 #define FVRCON_ADDR 0x0117
96 #define DAC1CON0_ADDR 0x0118
97 #define DAC1CON1_ADDR 0x0119
98 #define ZCD1CON_ADDR 0x011C
99 #define APFCON_ADDR 0x011D
100 #define ANSELA_ADDR 0x018C
101 #define ANSELC_ADDR 0x018E
102 #define PMADR_ADDR 0x0191
103 #define PMADRL_ADDR 0x0191
104 #define PMADRH_ADDR 0x0192
105 #define PMDAT_ADDR 0x0193
106 #define PMDATL_ADDR 0x0193
107 #define PMDATH_ADDR 0x0194
108 #define PMCON1_ADDR 0x0195
109 #define PMCON2_ADDR 0x0196
110 #define VREGCON_ADDR 0x0197
111 #define WPUA_ADDR 0x020C
112 #define WPUC_ADDR 0x020E
113 #define ODCONA_ADDR 0x028C
114 #define ODCONC_ADDR 0x028E
115 #define CCPR1_ADDR 0x0291
116 #define CCPR1L_ADDR 0x0291
117 #define CCPR1H_ADDR 0x0292
118 #define CCP1CON_ADDR 0x0293
119 #define CCP1CAP_ADDR 0x0294
120 #define CCPR2_ADDR 0x0298
121 #define CCPR2L_ADDR 0x0298
122 #define CCPR2H_ADDR 0x0299
123 #define CCP2CON_ADDR 0x029A
124 #define CCP2CAP_ADDR 0x029B
125 #define CCPTMRS_ADDR 0x029E
126 #define SLRCONA_ADDR 0x030C
127 #define SLRCONC_ADDR 0x030E
128 #define INLVLA_ADDR 0x038C
129 #define INLVLC_ADDR 0x038E
130 #define IOCAP_ADDR 0x0391
131 #define IOCAN_ADDR 0x0392
132 #define IOCAF_ADDR 0x0393
133 #define IOCCP_ADDR 0x0397
134 #define IOCCN_ADDR 0x0398
135 #define IOCCF_ADDR 0x0399
136 #define T4TMR_ADDR 0x0413
137 #define TMR4_ADDR 0x0413
138 #define PR4_ADDR 0x0414
139 #define T4PR_ADDR 0x0414
140 #define T4CON_ADDR 0x0415
141 #define T4HLT_ADDR 0x0416
142 #define T4CLKCON_ADDR 0x0417
143 #define T4RST_ADDR 0x0418
144 #define T6TMR_ADDR 0x041A
145 #define TMR6_ADDR 0x041A
146 #define PR6_ADDR 0x041B
147 #define T6PR_ADDR 0x041B
148 #define T6CON_ADDR 0x041C
149 #define T6HLT_ADDR 0x041D
150 #define T6CLKCON_ADDR 0x041E
151 #define T6RST_ADDR 0x041F
152 #define CWG1DBR_ADDR 0x0691
153 #define CWG1DBF_ADDR 0x0692
154 #define CWG1AS0_ADDR 0x0693
155 #define CWG1AS1_ADDR 0x0694
156 #define CWG1OCON0_ADDR 0x0695
157 #define CWG1CON0_ADDR 0x0696
158 #define CWG1CON1_ADDR 0x0697
159 #define CWG1OCON1_ADDR 0x0698
160 #define CWG1CLKCON_ADDR 0x0699
161 #define CWG1ISM_ADDR 0x069A
162 #define WDTCON0_ADDR 0x0711
163 #define WDTCON1_ADDR 0x0712
164 #define WDTPSL_ADDR 0x0713
165 #define WDTPSH_ADDR 0x0714
166 #define WDTTMR_ADDR 0x0715
167 #define SCANLADR_ADDR 0x0718
168 #define SCANLADRL_ADDR 0x0718
169 #define SCANLADRH_ADDR 0x0719
170 #define SCANHADR_ADDR 0x071A
171 #define SCANHADRL_ADDR 0x071A
172 #define SCANHADRH_ADDR 0x071B
173 #define SCANCON0_ADDR 0x071C
174 #define SCANTRIG_ADDR 0x071D
175 #define CRCDAT_ADDR 0x0791
176 #define CRCDATL_ADDR 0x0791
177 #define CRCDATH_ADDR 0x0792
178 #define CRCACC_ADDR 0x0793
179 #define CRCACCL_ADDR 0x0793
180 #define CRCACCH_ADDR 0x0794
181 #define CRCSHIFT_ADDR 0x0795
182 #define CRCSHIFTL_ADDR 0x0795
183 #define CRCSHIFTH_ADDR 0x0796
184 #define CRCXOR_ADDR 0x0797
185 #define CRCXORL_ADDR 0x0797
186 #define CRCXORH_ADDR 0x0798
187 #define CRCCON0_ADDR 0x0799
188 #define CRCCON1_ADDR 0x079A
189 #define SMT1TMR_ADDR 0x0D8C
190 #define SMT1TMRL_ADDR 0x0D8C
191 #define SMT1TMRH_ADDR 0x0D8D
192 #define SMT1TMRU_ADDR 0x0D8E
193 #define SMT1CPR_ADDR 0x0D8F
194 #define SMT1CPRL_ADDR 0x0D8F
195 #define SMT1CPRH_ADDR 0x0D90
196 #define SMT1CPRU_ADDR 0x0D91
197 #define SMT1CPW_ADDR 0x0D92
198 #define SMT1CPWL_ADDR 0x0D92
199 #define SMT1CPWH_ADDR 0x0D93
200 #define SMT1CPWU_ADDR 0x0D94
201 #define SMT1PR_ADDR 0x0D95
202 #define SMT1PRL_ADDR 0x0D95
203 #define SMT1PRH_ADDR 0x0D96
204 #define SMT1PRU_ADDR 0x0D97
205 #define SMT1CON0_ADDR 0x0D98
206 #define SMT1CON1_ADDR 0x0D99
207 #define SMT1STAT_ADDR 0x0D9A
208 #define SMT1CLK_ADDR 0x0D9B
209 #define SMT1SIG_ADDR 0x0D9C
210 #define SMT1WIN_ADDR 0x0D9D
211 #define SMT2TMR_ADDR 0x0D9E
212 #define SMT2TMRL_ADDR 0x0D9E
213 #define SMT2TMRH_ADDR 0x0D9F
214 #define SMT2TMRU_ADDR 0x0DA0
215 #define SMT2CPR_ADDR 0x0DA1
216 #define SMT2CPRL_ADDR 0x0DA1
217 #define SMT2CPRH_ADDR 0x0DA2
218 #define SMT2CPRU_ADDR 0x0DA3
219 #define SMT2CPW_ADDR 0x0DA4
220 #define SMT2CPWL_ADDR 0x0DA4
221 #define SMT2CPWH_ADDR 0x0DA5
222 #define SMT2CPWU_ADDR 0x0DA6
223 #define SMT2PR_ADDR 0x0DA7
224 #define SMT2PRL_ADDR 0x0DA7
225 #define SMT2PRH_ADDR 0x0DA8
226 #define SMT2PRU_ADDR 0x0DA9
227 #define SMT2CON0_ADDR 0x0DAA
228 #define SMT2CON1_ADDR 0x0DAB
229 #define SMT2STAT_ADDR 0x0DAC
230 #define SMT2CLK_ADDR 0x0DAD
231 #define SMT2SIG_ADDR 0x0DAE
232 #define SMT2WIN_ADDR 0x0DAF
233 #define STATUS_SHAD_ADDR 0x0FE4
234 #define WREG_SHAD_ADDR 0x0FE5
235 #define BSR_SHAD_ADDR 0x0FE6
236 #define PCLATH_SHAD_ADDR 0x0FE7
237 #define FSR0L_SHAD_ADDR 0x0FE8
238 #define FSR0H_SHAD_ADDR 0x0FE9
239 #define FSR1L_SHAD_ADDR 0x0FEA
240 #define FSR1H_SHAD_ADDR 0x0FEB
241 #define STKPTR_ADDR 0x0FED
242 #define TOSL_ADDR 0x0FEE
243 #define TOSH_ADDR 0x0FEF
245 #endif // #ifndef NO_ADDR_DEFINES
247 //==============================================================================
249 // Register Definitions
251 //==============================================================================
253 extern __at(0x0000) __sfr INDF0;
254 extern __at(0x0001) __sfr INDF1;
255 extern __at(0x0002) __sfr PCL;
257 //==============================================================================
258 // STATUS Bits
260 extern __at(0x0003) __sfr STATUS;
262 typedef struct
264 unsigned C : 1;
265 unsigned DC : 1;
266 unsigned Z : 1;
267 unsigned NOT_PD : 1;
268 unsigned NOT_TO : 1;
269 unsigned : 1;
270 unsigned : 1;
271 unsigned : 1;
272 } __STATUSbits_t;
274 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
276 #define _C 0x01
277 #define _DC 0x02
278 #define _Z 0x04
279 #define _NOT_PD 0x08
280 #define _NOT_TO 0x10
282 //==============================================================================
284 extern __at(0x0004) __sfr FSR0;
285 extern __at(0x0004) __sfr FSR0L;
286 extern __at(0x0005) __sfr FSR0H;
287 extern __at(0x0006) __sfr FSR1;
288 extern __at(0x0006) __sfr FSR1L;
289 extern __at(0x0007) __sfr FSR1H;
291 //==============================================================================
292 // BSR Bits
294 extern __at(0x0008) __sfr BSR;
296 typedef union
298 struct
300 unsigned BSR0 : 1;
301 unsigned BSR1 : 1;
302 unsigned BSR2 : 1;
303 unsigned BSR3 : 1;
304 unsigned BSR4 : 1;
305 unsigned : 1;
306 unsigned : 1;
307 unsigned : 1;
310 struct
312 unsigned BSR : 5;
313 unsigned : 3;
315 } __BSRbits_t;
317 extern __at(0x0008) volatile __BSRbits_t BSRbits;
319 #define _BSR0 0x01
320 #define _BSR1 0x02
321 #define _BSR2 0x04
322 #define _BSR3 0x08
323 #define _BSR4 0x10
325 //==============================================================================
327 extern __at(0x0009) __sfr WREG;
328 extern __at(0x000A) __sfr PCLATH;
330 //==============================================================================
331 // INTCON Bits
333 extern __at(0x000B) __sfr INTCON;
335 typedef union
337 struct
339 unsigned IOCIF : 1;
340 unsigned INTF : 1;
341 unsigned TMR0IF : 1;
342 unsigned IOCIE : 1;
343 unsigned INTE : 1;
344 unsigned TMR0IE : 1;
345 unsigned PEIE : 1;
346 unsigned GIE : 1;
349 struct
351 unsigned : 1;
352 unsigned : 1;
353 unsigned T0IF : 1;
354 unsigned : 1;
355 unsigned : 1;
356 unsigned T0IE : 1;
357 unsigned : 1;
358 unsigned : 1;
360 } __INTCONbits_t;
362 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
364 #define _IOCIF 0x01
365 #define _INTF 0x02
366 #define _TMR0IF 0x04
367 #define _T0IF 0x04
368 #define _IOCIE 0x08
369 #define _INTE 0x10
370 #define _TMR0IE 0x20
371 #define _T0IE 0x20
372 #define _PEIE 0x40
373 #define _GIE 0x80
375 //==============================================================================
378 //==============================================================================
379 // PORTA Bits
381 extern __at(0x000C) __sfr PORTA;
383 typedef union
385 struct
387 unsigned RA0 : 1;
388 unsigned RA1 : 1;
389 unsigned RA2 : 1;
390 unsigned RA3 : 1;
391 unsigned RA4 : 1;
392 unsigned RA5 : 1;
393 unsigned : 1;
394 unsigned : 1;
397 struct
399 unsigned RA : 6;
400 unsigned : 2;
402 } __PORTAbits_t;
404 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
406 #define _RA0 0x01
407 #define _RA1 0x02
408 #define _RA2 0x04
409 #define _RA3 0x08
410 #define _RA4 0x10
411 #define _RA5 0x20
413 //==============================================================================
416 //==============================================================================
417 // PORTC Bits
419 extern __at(0x000E) __sfr PORTC;
421 typedef union
423 struct
425 unsigned RC0 : 1;
426 unsigned RC1 : 1;
427 unsigned RC2 : 1;
428 unsigned RC3 : 1;
429 unsigned RC4 : 1;
430 unsigned RC5 : 1;
431 unsigned : 1;
432 unsigned : 1;
435 struct
437 unsigned RC : 6;
438 unsigned : 2;
440 } __PORTCbits_t;
442 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
444 #define _RC0 0x01
445 #define _RC1 0x02
446 #define _RC2 0x04
447 #define _RC3 0x08
448 #define _RC4 0x10
449 #define _RC5 0x20
451 //==============================================================================
454 //==============================================================================
455 // PIR1 Bits
457 extern __at(0x0011) __sfr PIR1;
459 typedef struct
461 unsigned TMR1IF : 1;
462 unsigned TMR2IF : 1;
463 unsigned CCP1IF : 1;
464 unsigned : 1;
465 unsigned : 1;
466 unsigned : 1;
467 unsigned ADIF : 1;
468 unsigned TMR1GIF : 1;
469 } __PIR1bits_t;
471 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
473 #define _TMR1IF 0x01
474 #define _TMR2IF 0x02
475 #define _CCP1IF 0x04
476 #define _ADIF 0x40
477 #define _TMR1GIF 0x80
479 //==============================================================================
482 //==============================================================================
483 // PIR2 Bits
485 extern __at(0x0012) __sfr PIR2;
487 typedef struct
489 unsigned CCP2IF : 1;
490 unsigned TMR4IF : 1;
491 unsigned TMR6IF : 1;
492 unsigned : 1;
493 unsigned : 1;
494 unsigned C1IF : 1;
495 unsigned C2IF : 1;
496 unsigned : 1;
497 } __PIR2bits_t;
499 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
501 #define _CCP2IF 0x01
502 #define _TMR4IF 0x02
503 #define _TMR6IF 0x04
504 #define _C1IF 0x20
505 #define _C2IF 0x40
507 //==============================================================================
510 //==============================================================================
511 // PIR3 Bits
513 extern __at(0x0013) __sfr PIR3;
515 typedef struct
517 unsigned : 1;
518 unsigned : 1;
519 unsigned : 1;
520 unsigned : 1;
521 unsigned ZCDIF : 1;
522 unsigned CWGIF : 1;
523 unsigned : 1;
524 unsigned : 1;
525 } __PIR3bits_t;
527 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
529 #define _ZCDIF 0x10
530 #define _CWGIF 0x20
532 //==============================================================================
535 //==============================================================================
536 // PIR4 Bits
538 extern __at(0x0014) __sfr PIR4;
540 typedef struct
542 unsigned SMT1IF : 1;
543 unsigned SMT1PRAIF : 1;
544 unsigned SMT1PWAIF : 1;
545 unsigned SMT2IF : 1;
546 unsigned SMT2PRAIF : 1;
547 unsigned SMT2PWAIF : 1;
548 unsigned CRCIF : 1;
549 unsigned SCANIF : 1;
550 } __PIR4bits_t;
552 extern __at(0x0014) volatile __PIR4bits_t PIR4bits;
554 #define _SMT1IF 0x01
555 #define _SMT1PRAIF 0x02
556 #define _SMT1PWAIF 0x04
557 #define _SMT2IF 0x08
558 #define _SMT2PRAIF 0x10
559 #define _SMT2PWAIF 0x20
560 #define _CRCIF 0x40
561 #define _SCANIF 0x80
563 //==============================================================================
565 extern __at(0x0015) __sfr TMR0;
566 extern __at(0x0016) __sfr TMR1;
567 extern __at(0x0016) __sfr TMR1L;
568 extern __at(0x0017) __sfr TMR1H;
570 //==============================================================================
571 // T1CON Bits
573 extern __at(0x0018) __sfr T1CON;
575 typedef union
577 struct
579 unsigned TMR1ON : 1;
580 unsigned : 1;
581 unsigned NOT_T1SYNC : 1;
582 unsigned : 1;
583 unsigned T1CKPS0 : 1;
584 unsigned T1CKPS1 : 1;
585 unsigned TMR1CS0 : 1;
586 unsigned TMR1CS1 : 1;
589 struct
591 unsigned : 4;
592 unsigned T1CKPS : 2;
593 unsigned : 2;
596 struct
598 unsigned : 6;
599 unsigned TMR1CS : 2;
601 } __T1CONbits_t;
603 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
605 #define _TMR1ON 0x01
606 #define _NOT_T1SYNC 0x04
607 #define _T1CKPS0 0x10
608 #define _T1CKPS1 0x20
609 #define _TMR1CS0 0x40
610 #define _TMR1CS1 0x80
612 //==============================================================================
615 //==============================================================================
616 // T1GCON Bits
618 extern __at(0x0019) __sfr T1GCON;
620 typedef union
622 struct
624 unsigned T1GSS0 : 1;
625 unsigned T1GSS1 : 1;
626 unsigned T1GVAL : 1;
627 unsigned T1GGO_NOT_DONE : 1;
628 unsigned T1GSPM : 1;
629 unsigned T1GTM : 1;
630 unsigned T1GPOL : 1;
631 unsigned TMR1GE : 1;
634 struct
636 unsigned T1GSS : 2;
637 unsigned : 6;
639 } __T1GCONbits_t;
641 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
643 #define _T1GSS0 0x01
644 #define _T1GSS1 0x02
645 #define _T1GVAL 0x04
646 #define _T1GGO_NOT_DONE 0x08
647 #define _T1GSPM 0x10
648 #define _T1GTM 0x20
649 #define _T1GPOL 0x40
650 #define _TMR1GE 0x80
652 //==============================================================================
654 extern __at(0x001A) __sfr T2TMR;
655 extern __at(0x001A) __sfr TMR2;
656 extern __at(0x001B) __sfr PR2;
657 extern __at(0x001B) __sfr T2PR;
659 //==============================================================================
660 // T2CON Bits
662 extern __at(0x001C) __sfr T2CON;
664 typedef union
666 struct
668 unsigned T2OUTPS0 : 1;
669 unsigned T2OUTPS1 : 1;
670 unsigned T2OUTPS2 : 1;
671 unsigned T2OUTPS3 : 1;
672 unsigned T2CKPS0 : 1;
673 unsigned T2CKPS1 : 1;
674 unsigned T2CKPS2 : 1;
675 unsigned ON : 1;
678 struct
680 unsigned OUTPS0 : 1;
681 unsigned OUTPS1 : 1;
682 unsigned OUTPS2 : 1;
683 unsigned OUTPS3 : 1;
684 unsigned CKPS0 : 1;
685 unsigned CKPS1 : 1;
686 unsigned CKPS2 : 1;
687 unsigned T2ON : 1;
690 struct
692 unsigned : 1;
693 unsigned : 1;
694 unsigned : 1;
695 unsigned : 1;
696 unsigned : 1;
697 unsigned : 1;
698 unsigned : 1;
699 unsigned TMR2ON : 1;
702 struct
704 unsigned OUTPS : 4;
705 unsigned : 4;
708 struct
710 unsigned T2OUTPS : 4;
711 unsigned : 4;
714 struct
716 unsigned : 4;
717 unsigned CKPS : 3;
718 unsigned : 1;
721 struct
723 unsigned : 4;
724 unsigned T2CKPS : 3;
725 unsigned : 1;
727 } __T2CONbits_t;
729 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
731 #define _T2OUTPS0 0x01
732 #define _OUTPS0 0x01
733 #define _T2OUTPS1 0x02
734 #define _OUTPS1 0x02
735 #define _T2OUTPS2 0x04
736 #define _OUTPS2 0x04
737 #define _T2OUTPS3 0x08
738 #define _OUTPS3 0x08
739 #define _T2CKPS0 0x10
740 #define _CKPS0 0x10
741 #define _T2CKPS1 0x20
742 #define _CKPS1 0x20
743 #define _T2CKPS2 0x40
744 #define _CKPS2 0x40
745 #define _ON 0x80
746 #define _T2ON 0x80
747 #define _TMR2ON 0x80
749 //==============================================================================
752 //==============================================================================
753 // T2HLT Bits
755 extern __at(0x001D) __sfr T2HLT;
757 typedef union
759 struct
761 unsigned MODE0 : 1;
762 unsigned MODE1 : 1;
763 unsigned MODE2 : 1;
764 unsigned MODE3 : 1;
765 unsigned : 1;
766 unsigned CKSYNC : 1;
767 unsigned CKPOL : 1;
768 unsigned PSYNC : 1;
771 struct
773 unsigned T2MODE0 : 1;
774 unsigned T2MODE1 : 1;
775 unsigned T2MODE2 : 1;
776 unsigned T2MODE3 : 1;
777 unsigned : 1;
778 unsigned T2CKSYNC : 1;
779 unsigned T2CKPOL : 1;
780 unsigned T2PSYNC : 1;
783 struct
785 unsigned T2MODE : 4;
786 unsigned : 4;
789 struct
791 unsigned MODE : 4;
792 unsigned : 4;
794 } __T2HLTbits_t;
796 extern __at(0x001D) volatile __T2HLTbits_t T2HLTbits;
798 #define _T2HLT_MODE0 0x01
799 #define _T2HLT_T2MODE0 0x01
800 #define _T2HLT_MODE1 0x02
801 #define _T2HLT_T2MODE1 0x02
802 #define _T2HLT_MODE2 0x04
803 #define _T2HLT_T2MODE2 0x04
804 #define _T2HLT_MODE3 0x08
805 #define _T2HLT_T2MODE3 0x08
806 #define _T2HLT_CKSYNC 0x20
807 #define _T2HLT_T2CKSYNC 0x20
808 #define _T2HLT_CKPOL 0x40
809 #define _T2HLT_T2CKPOL 0x40
810 #define _T2HLT_PSYNC 0x80
811 #define _T2HLT_T2PSYNC 0x80
813 //==============================================================================
816 //==============================================================================
817 // T2CLKCON Bits
819 extern __at(0x001E) __sfr T2CLKCON;
821 typedef union
823 struct
825 unsigned T2CS0 : 1;
826 unsigned T2CS1 : 1;
827 unsigned T2CS2 : 1;
828 unsigned : 1;
829 unsigned : 1;
830 unsigned : 1;
831 unsigned : 1;
832 unsigned : 1;
835 struct
837 unsigned T2CS : 3;
838 unsigned : 5;
840 } __T2CLKCONbits_t;
842 extern __at(0x001E) volatile __T2CLKCONbits_t T2CLKCONbits;
844 #define _T2CS0 0x01
845 #define _T2CS1 0x02
846 #define _T2CS2 0x04
848 //==============================================================================
851 //==============================================================================
852 // T2RST Bits
854 extern __at(0x001F) __sfr T2RST;
856 typedef union
858 struct
860 unsigned RSEL0 : 1;
861 unsigned RSEL1 : 1;
862 unsigned RSEL2 : 1;
863 unsigned RSEL3 : 1;
864 unsigned : 1;
865 unsigned : 1;
866 unsigned : 1;
867 unsigned : 1;
870 struct
872 unsigned T2RSEL0 : 1;
873 unsigned T2RSEL1 : 1;
874 unsigned T2RSEL2 : 1;
875 unsigned T2RSEL3 : 1;
876 unsigned : 1;
877 unsigned : 1;
878 unsigned : 1;
879 unsigned : 1;
882 struct
884 unsigned T2RSEL : 4;
885 unsigned : 4;
888 struct
890 unsigned RSEL : 4;
891 unsigned : 4;
893 } __T2RSTbits_t;
895 extern __at(0x001F) volatile __T2RSTbits_t T2RSTbits;
897 #define _RSEL0 0x01
898 #define _T2RSEL0 0x01
899 #define _RSEL1 0x02
900 #define _T2RSEL1 0x02
901 #define _RSEL2 0x04
902 #define _T2RSEL2 0x04
903 #define _RSEL3 0x08
904 #define _T2RSEL3 0x08
906 //==============================================================================
909 //==============================================================================
910 // TRISA Bits
912 extern __at(0x008C) __sfr TRISA;
914 typedef union
916 struct
918 unsigned TRISA0 : 1;
919 unsigned TRISA1 : 1;
920 unsigned TRISA2 : 1;
921 unsigned TRISA3 : 1;
922 unsigned TRISA4 : 1;
923 unsigned TRISA5 : 1;
924 unsigned : 1;
925 unsigned : 1;
928 struct
930 unsigned TRISA : 6;
931 unsigned : 2;
933 } __TRISAbits_t;
935 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
937 #define _TRISA0 0x01
938 #define _TRISA1 0x02
939 #define _TRISA2 0x04
940 #define _TRISA3 0x08
941 #define _TRISA4 0x10
942 #define _TRISA5 0x20
944 //==============================================================================
947 //==============================================================================
948 // TRISC Bits
950 extern __at(0x008E) __sfr TRISC;
952 typedef union
954 struct
956 unsigned TRISC0 : 1;
957 unsigned TRISC1 : 1;
958 unsigned TRISC2 : 1;
959 unsigned TRISC3 : 1;
960 unsigned TRISC4 : 1;
961 unsigned TRISC5 : 1;
962 unsigned : 1;
963 unsigned : 1;
966 struct
968 unsigned TRISC : 6;
969 unsigned : 2;
971 } __TRISCbits_t;
973 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
975 #define _TRISC0 0x01
976 #define _TRISC1 0x02
977 #define _TRISC2 0x04
978 #define _TRISC3 0x08
979 #define _TRISC4 0x10
980 #define _TRISC5 0x20
982 //==============================================================================
985 //==============================================================================
986 // PIE1 Bits
988 extern __at(0x0091) __sfr PIE1;
990 typedef struct
992 unsigned TMR1IE : 1;
993 unsigned TMR2IE : 1;
994 unsigned CCP1IE : 1;
995 unsigned : 1;
996 unsigned : 1;
997 unsigned : 1;
998 unsigned ADIE : 1;
999 unsigned TMR1GIE : 1;
1000 } __PIE1bits_t;
1002 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
1004 #define _TMR1IE 0x01
1005 #define _TMR2IE 0x02
1006 #define _CCP1IE 0x04
1007 #define _ADIE 0x40
1008 #define _TMR1GIE 0x80
1010 //==============================================================================
1013 //==============================================================================
1014 // PIE2 Bits
1016 extern __at(0x0092) __sfr PIE2;
1018 typedef struct
1020 unsigned CCP2IE : 1;
1021 unsigned TMR4IE : 1;
1022 unsigned TMR6IE : 1;
1023 unsigned : 1;
1024 unsigned : 1;
1025 unsigned C1IE : 1;
1026 unsigned C2IE : 1;
1027 unsigned : 1;
1028 } __PIE2bits_t;
1030 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
1032 #define _CCP2IE 0x01
1033 #define _TMR4IE 0x02
1034 #define _TMR6IE 0x04
1035 #define _C1IE 0x20
1036 #define _C2IE 0x40
1038 //==============================================================================
1041 //==============================================================================
1042 // PIE3 Bits
1044 extern __at(0x0093) __sfr PIE3;
1046 typedef struct
1048 unsigned : 1;
1049 unsigned : 1;
1050 unsigned : 1;
1051 unsigned : 1;
1052 unsigned ZCDIE : 1;
1053 unsigned CWGIE : 1;
1054 unsigned : 1;
1055 unsigned : 1;
1056 } __PIE3bits_t;
1058 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
1060 #define _ZCDIE 0x10
1061 #define _CWGIE 0x20
1063 //==============================================================================
1066 //==============================================================================
1067 // PIE4 Bits
1069 extern __at(0x0094) __sfr PIE4;
1071 typedef struct
1073 unsigned SMT1IE : 1;
1074 unsigned SMT1PRAIE : 1;
1075 unsigned SMT1PWAIE : 1;
1076 unsigned SMT2IE : 1;
1077 unsigned SMT2PRAIE : 1;
1078 unsigned SMT2PWAIE : 1;
1079 unsigned CRCIE : 1;
1080 unsigned SCANIE : 1;
1081 } __PIE4bits_t;
1083 extern __at(0x0094) volatile __PIE4bits_t PIE4bits;
1085 #define _SMT1IE 0x01
1086 #define _SMT1PRAIE 0x02
1087 #define _SMT1PWAIE 0x04
1088 #define _SMT2IE 0x08
1089 #define _SMT2PRAIE 0x10
1090 #define _SMT2PWAIE 0x20
1091 #define _CRCIE 0x40
1092 #define _SCANIE 0x80
1094 //==============================================================================
1097 //==============================================================================
1098 // OPTION_REG Bits
1100 extern __at(0x0095) __sfr OPTION_REG;
1102 typedef union
1104 struct
1106 unsigned PS0 : 1;
1107 unsigned PS1 : 1;
1108 unsigned PS2 : 1;
1109 unsigned PSA : 1;
1110 unsigned TMR0SE : 1;
1111 unsigned TMR0CS : 1;
1112 unsigned INTEDG : 1;
1113 unsigned NOT_WPUEN : 1;
1116 struct
1118 unsigned : 1;
1119 unsigned : 1;
1120 unsigned : 1;
1121 unsigned : 1;
1122 unsigned T0SE : 1;
1123 unsigned T0CS : 1;
1124 unsigned : 1;
1125 unsigned : 1;
1128 struct
1130 unsigned PS : 3;
1131 unsigned : 5;
1133 } __OPTION_REGbits_t;
1135 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
1137 #define _PS0 0x01
1138 #define _PS1 0x02
1139 #define _PS2 0x04
1140 #define _PSA 0x08
1141 #define _TMR0SE 0x10
1142 #define _T0SE 0x10
1143 #define _TMR0CS 0x20
1144 #define _T0CS 0x20
1145 #define _INTEDG 0x40
1146 #define _NOT_WPUEN 0x80
1148 //==============================================================================
1151 //==============================================================================
1152 // PCON Bits
1154 extern __at(0x0096) __sfr PCON;
1156 typedef struct
1158 unsigned NOT_BOR : 1;
1159 unsigned NOT_POR : 1;
1160 unsigned NOT_RI : 1;
1161 unsigned NOT_RMCLR : 1;
1162 unsigned NOT_RWDT : 1;
1163 unsigned NOT_WDTWV : 1;
1164 unsigned STKUNF : 1;
1165 unsigned STKOVF : 1;
1166 } __PCONbits_t;
1168 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1170 #define _NOT_BOR 0x01
1171 #define _NOT_POR 0x02
1172 #define _NOT_RI 0x04
1173 #define _NOT_RMCLR 0x08
1174 #define _NOT_RWDT 0x10
1175 #define _NOT_WDTWV 0x20
1176 #define _STKUNF 0x40
1177 #define _STKOVF 0x80
1179 //==============================================================================
1182 //==============================================================================
1183 // OSCTUNE Bits
1185 extern __at(0x0098) __sfr OSCTUNE;
1187 typedef union
1189 struct
1191 unsigned TUN0 : 1;
1192 unsigned TUN1 : 1;
1193 unsigned TUN2 : 1;
1194 unsigned TUN3 : 1;
1195 unsigned TUN4 : 1;
1196 unsigned TUN5 : 1;
1197 unsigned : 1;
1198 unsigned : 1;
1201 struct
1203 unsigned TUN : 6;
1204 unsigned : 2;
1206 } __OSCTUNEbits_t;
1208 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1210 #define _TUN0 0x01
1211 #define _TUN1 0x02
1212 #define _TUN2 0x04
1213 #define _TUN3 0x08
1214 #define _TUN4 0x10
1215 #define _TUN5 0x20
1217 //==============================================================================
1220 //==============================================================================
1221 // OSCCON Bits
1223 extern __at(0x0099) __sfr OSCCON;
1225 typedef union
1227 struct
1229 unsigned SCS0 : 1;
1230 unsigned SCS1 : 1;
1231 unsigned : 1;
1232 unsigned IRCF0 : 1;
1233 unsigned IRCF1 : 1;
1234 unsigned IRCF2 : 1;
1235 unsigned IRCF3 : 1;
1236 unsigned SPLLEN : 1;
1239 struct
1241 unsigned SCS : 2;
1242 unsigned : 6;
1245 struct
1247 unsigned : 3;
1248 unsigned IRCF : 4;
1249 unsigned : 1;
1251 } __OSCCONbits_t;
1253 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1255 #define _SCS0 0x01
1256 #define _SCS1 0x02
1257 #define _IRCF0 0x08
1258 #define _IRCF1 0x10
1259 #define _IRCF2 0x20
1260 #define _IRCF3 0x40
1261 #define _SPLLEN 0x80
1263 //==============================================================================
1266 //==============================================================================
1267 // OSCSTAT Bits
1269 extern __at(0x009A) __sfr OSCSTAT;
1271 typedef struct
1273 unsigned HFIOFS : 1;
1274 unsigned LFIOFR : 1;
1275 unsigned MFIOFR : 1;
1276 unsigned HFIOFL : 1;
1277 unsigned HFIOFR : 1;
1278 unsigned : 1;
1279 unsigned PLLR : 1;
1280 unsigned : 1;
1281 } __OSCSTATbits_t;
1283 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1285 #define _HFIOFS 0x01
1286 #define _LFIOFR 0x02
1287 #define _MFIOFR 0x04
1288 #define _HFIOFL 0x08
1289 #define _HFIOFR 0x10
1290 #define _PLLR 0x40
1292 //==============================================================================
1294 extern __at(0x009B) __sfr ADRES;
1295 extern __at(0x009B) __sfr ADRESL;
1296 extern __at(0x009C) __sfr ADRESH;
1298 //==============================================================================
1299 // ADCON0 Bits
1301 extern __at(0x009D) __sfr ADCON0;
1303 typedef union
1305 struct
1307 unsigned ADON : 1;
1308 unsigned GO_NOT_DONE : 1;
1309 unsigned CHS0 : 1;
1310 unsigned CHS1 : 1;
1311 unsigned CHS2 : 1;
1312 unsigned CHS3 : 1;
1313 unsigned CHS4 : 1;
1314 unsigned : 1;
1317 struct
1319 unsigned : 1;
1320 unsigned ADGO : 1;
1321 unsigned : 1;
1322 unsigned : 1;
1323 unsigned : 1;
1324 unsigned : 1;
1325 unsigned : 1;
1326 unsigned : 1;
1329 struct
1331 unsigned : 1;
1332 unsigned GO : 1;
1333 unsigned : 1;
1334 unsigned : 1;
1335 unsigned : 1;
1336 unsigned : 1;
1337 unsigned : 1;
1338 unsigned : 1;
1341 struct
1343 unsigned : 2;
1344 unsigned CHS : 5;
1345 unsigned : 1;
1347 } __ADCON0bits_t;
1349 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1351 #define _ADON 0x01
1352 #define _GO_NOT_DONE 0x02
1353 #define _ADGO 0x02
1354 #define _GO 0x02
1355 #define _CHS0 0x04
1356 #define _CHS1 0x08
1357 #define _CHS2 0x10
1358 #define _CHS3 0x20
1359 #define _CHS4 0x40
1361 //==============================================================================
1364 //==============================================================================
1365 // ADCON1 Bits
1367 extern __at(0x009E) __sfr ADCON1;
1369 typedef union
1371 struct
1373 unsigned ADPREF0 : 1;
1374 unsigned ADPREF1 : 1;
1375 unsigned : 1;
1376 unsigned : 1;
1377 unsigned ADCS0 : 1;
1378 unsigned ADCS1 : 1;
1379 unsigned ADCS2 : 1;
1380 unsigned ADFM : 1;
1383 struct
1385 unsigned ADPREF : 2;
1386 unsigned : 6;
1389 struct
1391 unsigned : 4;
1392 unsigned ADCS : 3;
1393 unsigned : 1;
1395 } __ADCON1bits_t;
1397 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1399 #define _ADPREF0 0x01
1400 #define _ADPREF1 0x02
1401 #define _ADCS0 0x10
1402 #define _ADCS1 0x20
1403 #define _ADCS2 0x40
1404 #define _ADFM 0x80
1406 //==============================================================================
1409 //==============================================================================
1410 // ADCON2 Bits
1412 extern __at(0x009F) __sfr ADCON2;
1414 typedef union
1416 struct
1418 unsigned : 1;
1419 unsigned : 1;
1420 unsigned : 1;
1421 unsigned : 1;
1422 unsigned TRIGSEL0 : 1;
1423 unsigned TRIGSEL1 : 1;
1424 unsigned TRIGSEL2 : 1;
1425 unsigned TRIGSEL3 : 1;
1428 struct
1430 unsigned : 4;
1431 unsigned TRIGSEL : 4;
1433 } __ADCON2bits_t;
1435 extern __at(0x009F) volatile __ADCON2bits_t ADCON2bits;
1437 #define _TRIGSEL0 0x10
1438 #define _TRIGSEL1 0x20
1439 #define _TRIGSEL2 0x40
1440 #define _TRIGSEL3 0x80
1442 //==============================================================================
1445 //==============================================================================
1446 // LATA Bits
1448 extern __at(0x010C) __sfr LATA;
1450 typedef union
1452 struct
1454 unsigned LATA0 : 1;
1455 unsigned LATA1 : 1;
1456 unsigned LATA2 : 1;
1457 unsigned LATA3 : 1;
1458 unsigned LATA4 : 1;
1459 unsigned LATA5 : 1;
1460 unsigned : 1;
1461 unsigned : 1;
1464 struct
1466 unsigned LATA : 6;
1467 unsigned : 2;
1469 } __LATAbits_t;
1471 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1473 #define _LATA0 0x01
1474 #define _LATA1 0x02
1475 #define _LATA2 0x04
1476 #define _LATA3 0x08
1477 #define _LATA4 0x10
1478 #define _LATA5 0x20
1480 //==============================================================================
1483 //==============================================================================
1484 // LATC Bits
1486 extern __at(0x010E) __sfr LATC;
1488 typedef union
1490 struct
1492 unsigned LATC0 : 1;
1493 unsigned LATC1 : 1;
1494 unsigned LATC2 : 1;
1495 unsigned LATC3 : 1;
1496 unsigned LATC4 : 1;
1497 unsigned LATC5 : 1;
1498 unsigned : 1;
1499 unsigned : 1;
1502 struct
1504 unsigned LATC : 6;
1505 unsigned : 2;
1507 } __LATCbits_t;
1509 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1511 #define _LATC0 0x01
1512 #define _LATC1 0x02
1513 #define _LATC2 0x04
1514 #define _LATC3 0x08
1515 #define _LATC4 0x10
1516 #define _LATC5 0x20
1518 //==============================================================================
1521 //==============================================================================
1522 // CM1CON0 Bits
1524 extern __at(0x0111) __sfr CM1CON0;
1526 typedef struct
1528 unsigned C1SYNC : 1;
1529 unsigned C1HYS : 1;
1530 unsigned C1SP : 1;
1531 unsigned : 1;
1532 unsigned C1POL : 1;
1533 unsigned C1OE : 1;
1534 unsigned C1OUT : 1;
1535 unsigned C1ON : 1;
1536 } __CM1CON0bits_t;
1538 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1540 #define _C1SYNC 0x01
1541 #define _C1HYS 0x02
1542 #define _C1SP 0x04
1543 #define _C1POL 0x10
1544 #define _C1OE 0x20
1545 #define _C1OUT 0x40
1546 #define _C1ON 0x80
1548 //==============================================================================
1551 //==============================================================================
1552 // CM1CON1 Bits
1554 extern __at(0x0112) __sfr CM1CON1;
1556 typedef union
1558 struct
1560 unsigned C1NCH0 : 1;
1561 unsigned C1NCH1 : 1;
1562 unsigned C1NCH2 : 1;
1563 unsigned : 1;
1564 unsigned C1PCH0 : 1;
1565 unsigned C1PCH1 : 1;
1566 unsigned C1INTN : 1;
1567 unsigned C1INTP : 1;
1570 struct
1572 unsigned C1NCH : 3;
1573 unsigned : 5;
1576 struct
1578 unsigned : 4;
1579 unsigned C1PCH : 2;
1580 unsigned : 2;
1582 } __CM1CON1bits_t;
1584 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1586 #define _C1NCH0 0x01
1587 #define _C1NCH1 0x02
1588 #define _C1NCH2 0x04
1589 #define _C1PCH0 0x10
1590 #define _C1PCH1 0x20
1591 #define _C1INTN 0x40
1592 #define _C1INTP 0x80
1594 //==============================================================================
1597 //==============================================================================
1598 // CM2CON0 Bits
1600 extern __at(0x0113) __sfr CM2CON0;
1602 typedef struct
1604 unsigned C2SYNC : 1;
1605 unsigned C2HYS : 1;
1606 unsigned C2SP : 1;
1607 unsigned : 1;
1608 unsigned C2POL : 1;
1609 unsigned C2OE : 1;
1610 unsigned C2OUT : 1;
1611 unsigned C2ON : 1;
1612 } __CM2CON0bits_t;
1614 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
1616 #define _C2SYNC 0x01
1617 #define _C2HYS 0x02
1618 #define _C2SP 0x04
1619 #define _C2POL 0x10
1620 #define _C2OE 0x20
1621 #define _C2OUT 0x40
1622 #define _C2ON 0x80
1624 //==============================================================================
1627 //==============================================================================
1628 // CM2CON1 Bits
1630 extern __at(0x0114) __sfr CM2CON1;
1632 typedef union
1634 struct
1636 unsigned C2NCH0 : 1;
1637 unsigned C2NCH1 : 1;
1638 unsigned C2NCH2 : 1;
1639 unsigned : 1;
1640 unsigned C2PCH0 : 1;
1641 unsigned C2PCH1 : 1;
1642 unsigned C2INTN : 1;
1643 unsigned C2INTP : 1;
1646 struct
1648 unsigned C2NCH : 3;
1649 unsigned : 5;
1652 struct
1654 unsigned : 4;
1655 unsigned C2PCH : 2;
1656 unsigned : 2;
1658 } __CM2CON1bits_t;
1660 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
1662 #define _C2NCH0 0x01
1663 #define _C2NCH1 0x02
1664 #define _C2NCH2 0x04
1665 #define _C2PCH0 0x10
1666 #define _C2PCH1 0x20
1667 #define _C2INTN 0x40
1668 #define _C2INTP 0x80
1670 //==============================================================================
1673 //==============================================================================
1674 // CMOUT Bits
1676 extern __at(0x0115) __sfr CMOUT;
1678 typedef struct
1680 unsigned MC1OUT : 1;
1681 unsigned MC2OUT : 1;
1682 unsigned : 1;
1683 unsigned : 1;
1684 unsigned : 1;
1685 unsigned : 1;
1686 unsigned : 1;
1687 unsigned : 1;
1688 } __CMOUTbits_t;
1690 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1692 #define _MC1OUT 0x01
1693 #define _MC2OUT 0x02
1695 //==============================================================================
1698 //==============================================================================
1699 // BORCON Bits
1701 extern __at(0x0116) __sfr BORCON;
1703 typedef struct
1705 unsigned BORRDY : 1;
1706 unsigned : 1;
1707 unsigned : 1;
1708 unsigned : 1;
1709 unsigned : 1;
1710 unsigned : 1;
1711 unsigned BORFS : 1;
1712 unsigned SBOREN : 1;
1713 } __BORCONbits_t;
1715 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1717 #define _BORRDY 0x01
1718 #define _BORFS 0x40
1719 #define _SBOREN 0x80
1721 //==============================================================================
1724 //==============================================================================
1725 // FVRCON Bits
1727 extern __at(0x0117) __sfr FVRCON;
1729 typedef union
1731 struct
1733 unsigned ADFVR0 : 1;
1734 unsigned ADFVR1 : 1;
1735 unsigned CDAFVR0 : 1;
1736 unsigned CDAFVR1 : 1;
1737 unsigned TSRNG : 1;
1738 unsigned TSEN : 1;
1739 unsigned FVRRDY : 1;
1740 unsigned FVREN : 1;
1743 struct
1745 unsigned ADFVR : 2;
1746 unsigned : 6;
1749 struct
1751 unsigned : 2;
1752 unsigned CDAFVR : 2;
1753 unsigned : 4;
1755 } __FVRCONbits_t;
1757 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1759 #define _ADFVR0 0x01
1760 #define _ADFVR1 0x02
1761 #define _CDAFVR0 0x04
1762 #define _CDAFVR1 0x08
1763 #define _TSRNG 0x10
1764 #define _TSEN 0x20
1765 #define _FVRRDY 0x40
1766 #define _FVREN 0x80
1768 //==============================================================================
1771 //==============================================================================
1772 // DAC1CON0 Bits
1774 extern __at(0x0118) __sfr DAC1CON0;
1776 typedef union
1778 struct
1780 unsigned : 1;
1781 unsigned : 1;
1782 unsigned D1PSS0 : 1;
1783 unsigned D1PSS1 : 1;
1784 unsigned : 1;
1785 unsigned DAC1OE : 1;
1786 unsigned : 1;
1787 unsigned DAC1EN : 1;
1790 struct
1792 unsigned : 2;
1793 unsigned D1PSS : 2;
1794 unsigned : 4;
1796 } __DAC1CON0bits_t;
1798 extern __at(0x0118) volatile __DAC1CON0bits_t DAC1CON0bits;
1800 #define _D1PSS0 0x04
1801 #define _D1PSS1 0x08
1802 #define _DAC1OE 0x20
1803 #define _DAC1EN 0x80
1805 //==============================================================================
1808 //==============================================================================
1809 // DAC1CON1 Bits
1811 extern __at(0x0119) __sfr DAC1CON1;
1813 typedef struct
1815 unsigned DAC1R0 : 1;
1816 unsigned DAC1R1 : 1;
1817 unsigned DAC1R2 : 1;
1818 unsigned DAC1R3 : 1;
1819 unsigned DAC1R4 : 1;
1820 unsigned DAC1R5 : 1;
1821 unsigned DAC1R6 : 1;
1822 unsigned DAC1R7 : 1;
1823 } __DAC1CON1bits_t;
1825 extern __at(0x0119) volatile __DAC1CON1bits_t DAC1CON1bits;
1827 #define _DAC1R0 0x01
1828 #define _DAC1R1 0x02
1829 #define _DAC1R2 0x04
1830 #define _DAC1R3 0x08
1831 #define _DAC1R4 0x10
1832 #define _DAC1R5 0x20
1833 #define _DAC1R6 0x40
1834 #define _DAC1R7 0x80
1836 //==============================================================================
1839 //==============================================================================
1840 // ZCD1CON Bits
1842 extern __at(0x011C) __sfr ZCD1CON;
1844 typedef struct
1846 unsigned ZCD1INTN : 1;
1847 unsigned ZCD1INTP : 1;
1848 unsigned : 1;
1849 unsigned : 1;
1850 unsigned ZCD1POL : 1;
1851 unsigned ZCD1OUT : 1;
1852 unsigned ZCD1OE : 1;
1853 unsigned ZCD1EN : 1;
1854 } __ZCD1CONbits_t;
1856 extern __at(0x011C) volatile __ZCD1CONbits_t ZCD1CONbits;
1858 #define _ZCD1INTN 0x01
1859 #define _ZCD1INTP 0x02
1860 #define _ZCD1POL 0x10
1861 #define _ZCD1OUT 0x20
1862 #define _ZCD1OE 0x40
1863 #define _ZCD1EN 0x80
1865 //==============================================================================
1868 //==============================================================================
1869 // APFCON Bits
1871 extern __at(0x011D) __sfr APFCON;
1873 typedef struct
1875 unsigned : 1;
1876 unsigned CCP2SEL : 1;
1877 unsigned : 1;
1878 unsigned T1GSEL : 1;
1879 unsigned : 1;
1880 unsigned : 1;
1881 unsigned : 1;
1882 unsigned : 1;
1883 } __APFCONbits_t;
1885 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1887 #define _CCP2SEL 0x02
1888 #define _T1GSEL 0x08
1890 //==============================================================================
1893 //==============================================================================
1894 // ANSELA Bits
1896 extern __at(0x018C) __sfr ANSELA;
1898 typedef struct
1900 unsigned ANSA0 : 1;
1901 unsigned ANSA1 : 1;
1902 unsigned ANSA2 : 1;
1903 unsigned : 1;
1904 unsigned ANSA4 : 1;
1905 unsigned : 1;
1906 unsigned : 1;
1907 unsigned : 1;
1908 } __ANSELAbits_t;
1910 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1912 #define _ANSA0 0x01
1913 #define _ANSA1 0x02
1914 #define _ANSA2 0x04
1915 #define _ANSA4 0x10
1917 //==============================================================================
1920 //==============================================================================
1921 // ANSELC Bits
1923 extern __at(0x018E) __sfr ANSELC;
1925 typedef union
1927 struct
1929 unsigned ANSC0 : 1;
1930 unsigned ANSC1 : 1;
1931 unsigned ANSC2 : 1;
1932 unsigned ANSC3 : 1;
1933 unsigned : 1;
1934 unsigned : 1;
1935 unsigned : 1;
1936 unsigned : 1;
1939 struct
1941 unsigned ANSC : 4;
1942 unsigned : 4;
1944 } __ANSELCbits_t;
1946 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1948 #define _ANSC0 0x01
1949 #define _ANSC1 0x02
1950 #define _ANSC2 0x04
1951 #define _ANSC3 0x08
1953 //==============================================================================
1955 extern __at(0x0191) __sfr PMADR;
1956 extern __at(0x0191) __sfr PMADRL;
1957 extern __at(0x0192) __sfr PMADRH;
1958 extern __at(0x0193) __sfr PMDAT;
1959 extern __at(0x0193) __sfr PMDATL;
1960 extern __at(0x0194) __sfr PMDATH;
1962 //==============================================================================
1963 // PMCON1 Bits
1965 extern __at(0x0195) __sfr PMCON1;
1967 typedef struct
1969 unsigned RD : 1;
1970 unsigned WR : 1;
1971 unsigned WREN : 1;
1972 unsigned WRERR : 1;
1973 unsigned FREE : 1;
1974 unsigned LWLO : 1;
1975 unsigned CFGS : 1;
1976 unsigned : 1;
1977 } __PMCON1bits_t;
1979 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1981 #define _RD 0x01
1982 #define _WR 0x02
1983 #define _WREN 0x04
1984 #define _WRERR 0x08
1985 #define _FREE 0x10
1986 #define _LWLO 0x20
1987 #define _CFGS 0x40
1989 //==============================================================================
1991 extern __at(0x0196) __sfr PMCON2;
1993 //==============================================================================
1994 // VREGCON Bits
1996 extern __at(0x0197) __sfr VREGCON;
1998 typedef union
2000 struct
2002 unsigned VREGPM0 : 1;
2003 unsigned VREGPM1 : 1;
2004 unsigned : 1;
2005 unsigned : 1;
2006 unsigned : 1;
2007 unsigned : 1;
2008 unsigned : 1;
2009 unsigned : 1;
2012 struct
2014 unsigned VREGPM : 2;
2015 unsigned : 6;
2017 } __VREGCONbits_t;
2019 extern __at(0x0197) volatile __VREGCONbits_t VREGCONbits;
2021 #define _VREGPM0 0x01
2022 #define _VREGPM1 0x02
2024 //==============================================================================
2027 //==============================================================================
2028 // WPUA Bits
2030 extern __at(0x020C) __sfr WPUA;
2032 typedef union
2034 struct
2036 unsigned WPUA0 : 1;
2037 unsigned WPUA1 : 1;
2038 unsigned WPUA2 : 1;
2039 unsigned WPUA3 : 1;
2040 unsigned WPUA4 : 1;
2041 unsigned WPUA5 : 1;
2042 unsigned : 1;
2043 unsigned : 1;
2046 struct
2048 unsigned WPUA : 6;
2049 unsigned : 2;
2051 } __WPUAbits_t;
2053 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
2055 #define _WPUA0 0x01
2056 #define _WPUA1 0x02
2057 #define _WPUA2 0x04
2058 #define _WPUA3 0x08
2059 #define _WPUA4 0x10
2060 #define _WPUA5 0x20
2062 //==============================================================================
2065 //==============================================================================
2066 // WPUC Bits
2068 extern __at(0x020E) __sfr WPUC;
2070 typedef union
2072 struct
2074 unsigned WPUC0 : 1;
2075 unsigned WPUC1 : 1;
2076 unsigned WPUC2 : 1;
2077 unsigned WPUC3 : 1;
2078 unsigned WPUC4 : 1;
2079 unsigned WPUC5 : 1;
2080 unsigned : 1;
2081 unsigned : 1;
2084 struct
2086 unsigned WPUC : 6;
2087 unsigned : 2;
2089 } __WPUCbits_t;
2091 extern __at(0x020E) volatile __WPUCbits_t WPUCbits;
2093 #define _WPUC0 0x01
2094 #define _WPUC1 0x02
2095 #define _WPUC2 0x04
2096 #define _WPUC3 0x08
2097 #define _WPUC4 0x10
2098 #define _WPUC5 0x20
2100 //==============================================================================
2103 //==============================================================================
2104 // ODCONA Bits
2106 extern __at(0x028C) __sfr ODCONA;
2108 typedef struct
2110 unsigned ODA0 : 1;
2111 unsigned ODA1 : 1;
2112 unsigned ODA2 : 1;
2113 unsigned : 1;
2114 unsigned ODA4 : 1;
2115 unsigned ODA5 : 1;
2116 unsigned : 1;
2117 unsigned : 1;
2118 } __ODCONAbits_t;
2120 extern __at(0x028C) volatile __ODCONAbits_t ODCONAbits;
2122 #define _ODA0 0x01
2123 #define _ODA1 0x02
2124 #define _ODA2 0x04
2125 #define _ODA4 0x10
2126 #define _ODA5 0x20
2128 //==============================================================================
2131 //==============================================================================
2132 // ODCONC Bits
2134 extern __at(0x028E) __sfr ODCONC;
2136 typedef union
2138 struct
2140 unsigned ODC0 : 1;
2141 unsigned ODC1 : 1;
2142 unsigned ODC2 : 1;
2143 unsigned ODC3 : 1;
2144 unsigned ODC4 : 1;
2145 unsigned ODC5 : 1;
2146 unsigned : 1;
2147 unsigned : 1;
2150 struct
2152 unsigned ODC : 6;
2153 unsigned : 2;
2155 } __ODCONCbits_t;
2157 extern __at(0x028E) volatile __ODCONCbits_t ODCONCbits;
2159 #define _ODC0 0x01
2160 #define _ODC1 0x02
2161 #define _ODC2 0x04
2162 #define _ODC3 0x08
2163 #define _ODC4 0x10
2164 #define _ODC5 0x20
2166 //==============================================================================
2168 extern __at(0x0291) __sfr CCPR1;
2169 extern __at(0x0291) __sfr CCPR1L;
2170 extern __at(0x0292) __sfr CCPR1H;
2172 //==============================================================================
2173 // CCP1CON Bits
2175 extern __at(0x0293) __sfr CCP1CON;
2177 typedef union
2179 struct
2181 unsigned MODE0 : 1;
2182 unsigned MODE1 : 1;
2183 unsigned MODE2 : 1;
2184 unsigned MODE3 : 1;
2185 unsigned FMT : 1;
2186 unsigned OUT : 1;
2187 unsigned OE : 1;
2188 unsigned EN : 1;
2191 struct
2193 unsigned CCP1MODE0 : 1;
2194 unsigned CCP1MODE1 : 1;
2195 unsigned CCP1MODE2 : 1;
2196 unsigned CCP1MODE3 : 1;
2197 unsigned CCP1FMT : 1;
2198 unsigned CCP1OUT : 1;
2199 unsigned CCP1OE : 1;
2200 unsigned CCP1EN : 1;
2203 struct
2205 unsigned CCP1MODE : 4;
2206 unsigned : 4;
2209 struct
2211 unsigned MODE : 4;
2212 unsigned : 4;
2214 } __CCP1CONbits_t;
2216 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2218 #define _MODE0 0x01
2219 #define _CCP1MODE0 0x01
2220 #define _MODE1 0x02
2221 #define _CCP1MODE1 0x02
2222 #define _MODE2 0x04
2223 #define _CCP1MODE2 0x04
2224 #define _MODE3 0x08
2225 #define _CCP1MODE3 0x08
2226 #define _FMT 0x10
2227 #define _CCP1FMT 0x10
2228 #define _OUT 0x20
2229 #define _CCP1OUT 0x20
2230 #define _OE 0x40
2231 #define _CCP1OE 0x40
2232 #define _EN 0x80
2233 #define _CCP1EN 0x80
2235 //==============================================================================
2238 //==============================================================================
2239 // CCP1CAP Bits
2241 extern __at(0x0294) __sfr CCP1CAP;
2243 typedef union
2245 struct
2247 unsigned CTS0 : 1;
2248 unsigned CTS1 : 1;
2249 unsigned : 1;
2250 unsigned : 1;
2251 unsigned : 1;
2252 unsigned : 1;
2253 unsigned : 1;
2254 unsigned : 1;
2257 struct
2259 unsigned CCP1CTS0 : 1;
2260 unsigned CCP1CTS1 : 1;
2261 unsigned : 1;
2262 unsigned : 1;
2263 unsigned : 1;
2264 unsigned : 1;
2265 unsigned : 1;
2266 unsigned : 1;
2269 struct
2271 unsigned CTS : 2;
2272 unsigned : 6;
2275 struct
2277 unsigned CCP1CTS : 2;
2278 unsigned : 6;
2280 } __CCP1CAPbits_t;
2282 extern __at(0x0294) volatile __CCP1CAPbits_t CCP1CAPbits;
2284 #define _CTS0 0x01
2285 #define _CCP1CTS0 0x01
2286 #define _CTS1 0x02
2287 #define _CCP1CTS1 0x02
2289 //==============================================================================
2291 extern __at(0x0298) __sfr CCPR2;
2292 extern __at(0x0298) __sfr CCPR2L;
2293 extern __at(0x0299) __sfr CCPR2H;
2295 //==============================================================================
2296 // CCP2CON Bits
2298 extern __at(0x029A) __sfr CCP2CON;
2300 typedef union
2302 struct
2304 unsigned MODE0 : 1;
2305 unsigned MODE1 : 1;
2306 unsigned MODE2 : 1;
2307 unsigned MODE3 : 1;
2308 unsigned FMT : 1;
2309 unsigned OUT : 1;
2310 unsigned OE : 1;
2311 unsigned EN : 1;
2314 struct
2316 unsigned CCP2MODE0 : 1;
2317 unsigned CCP2MODE1 : 1;
2318 unsigned CCP2MODE2 : 1;
2319 unsigned CCP2MODE3 : 1;
2320 unsigned CCP2FMT : 1;
2321 unsigned CCP2OUT : 1;
2322 unsigned CCP2OE : 1;
2323 unsigned CCP2EN : 1;
2326 struct
2328 unsigned MODE : 4;
2329 unsigned : 4;
2332 struct
2334 unsigned CCP2MODE : 4;
2335 unsigned : 4;
2337 } __CCP2CONbits_t;
2339 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2341 #define _CCP2CON_MODE0 0x01
2342 #define _CCP2CON_CCP2MODE0 0x01
2343 #define _CCP2CON_MODE1 0x02
2344 #define _CCP2CON_CCP2MODE1 0x02
2345 #define _CCP2CON_MODE2 0x04
2346 #define _CCP2CON_CCP2MODE2 0x04
2347 #define _CCP2CON_MODE3 0x08
2348 #define _CCP2CON_CCP2MODE3 0x08
2349 #define _CCP2CON_FMT 0x10
2350 #define _CCP2CON_CCP2FMT 0x10
2351 #define _CCP2CON_OUT 0x20
2352 #define _CCP2CON_CCP2OUT 0x20
2353 #define _CCP2CON_OE 0x40
2354 #define _CCP2CON_CCP2OE 0x40
2355 #define _CCP2CON_EN 0x80
2356 #define _CCP2CON_CCP2EN 0x80
2358 //==============================================================================
2361 //==============================================================================
2362 // CCP2CAP Bits
2364 extern __at(0x029B) __sfr CCP2CAP;
2366 typedef union
2368 struct
2370 unsigned CTS0 : 1;
2371 unsigned CTS1 : 1;
2372 unsigned : 1;
2373 unsigned : 1;
2374 unsigned : 1;
2375 unsigned : 1;
2376 unsigned : 1;
2377 unsigned : 1;
2380 struct
2382 unsigned CCP2CTS0 : 1;
2383 unsigned CCP2CTS1 : 1;
2384 unsigned : 1;
2385 unsigned : 1;
2386 unsigned : 1;
2387 unsigned : 1;
2388 unsigned : 1;
2389 unsigned : 1;
2392 struct
2394 unsigned CCP2CTS : 2;
2395 unsigned : 6;
2398 struct
2400 unsigned CTS : 2;
2401 unsigned : 6;
2403 } __CCP2CAPbits_t;
2405 extern __at(0x029B) volatile __CCP2CAPbits_t CCP2CAPbits;
2407 #define _CCP2CAP_CTS0 0x01
2408 #define _CCP2CAP_CCP2CTS0 0x01
2409 #define _CCP2CAP_CTS1 0x02
2410 #define _CCP2CAP_CCP2CTS1 0x02
2412 //==============================================================================
2415 //==============================================================================
2416 // CCPTMRS Bits
2418 extern __at(0x029E) __sfr CCPTMRS;
2420 typedef union
2422 struct
2424 unsigned CCP1TSEL0 : 1;
2425 unsigned CCP1TSEL1 : 1;
2426 unsigned CCP2TSEL0 : 1;
2427 unsigned CCP2TSEL1 : 1;
2428 unsigned : 1;
2429 unsigned : 1;
2430 unsigned : 1;
2431 unsigned : 1;
2434 struct
2436 unsigned CCP1TSEL : 2;
2437 unsigned : 6;
2440 struct
2442 unsigned : 2;
2443 unsigned CCP2TSEL : 2;
2444 unsigned : 4;
2446 } __CCPTMRSbits_t;
2448 extern __at(0x029E) volatile __CCPTMRSbits_t CCPTMRSbits;
2450 #define _CCP1TSEL0 0x01
2451 #define _CCP1TSEL1 0x02
2452 #define _CCP2TSEL0 0x04
2453 #define _CCP2TSEL1 0x08
2455 //==============================================================================
2458 //==============================================================================
2459 // SLRCONA Bits
2461 extern __at(0x030C) __sfr SLRCONA;
2463 typedef struct
2465 unsigned SLRA0 : 1;
2466 unsigned SLRA1 : 1;
2467 unsigned SLRA2 : 1;
2468 unsigned : 1;
2469 unsigned SLRA4 : 1;
2470 unsigned SLRA5 : 1;
2471 unsigned : 1;
2472 unsigned : 1;
2473 } __SLRCONAbits_t;
2475 extern __at(0x030C) volatile __SLRCONAbits_t SLRCONAbits;
2477 #define _SLRA0 0x01
2478 #define _SLRA1 0x02
2479 #define _SLRA2 0x04
2480 #define _SLRA4 0x10
2481 #define _SLRA5 0x20
2483 //==============================================================================
2486 //==============================================================================
2487 // SLRCONC Bits
2489 extern __at(0x030E) __sfr SLRCONC;
2491 typedef union
2493 struct
2495 unsigned SLRC0 : 1;
2496 unsigned SLRC1 : 1;
2497 unsigned SLRC2 : 1;
2498 unsigned SLRC3 : 1;
2499 unsigned SLRC4 : 1;
2500 unsigned SLRC5 : 1;
2501 unsigned : 1;
2502 unsigned : 1;
2505 struct
2507 unsigned SLRC : 6;
2508 unsigned : 2;
2510 } __SLRCONCbits_t;
2512 extern __at(0x030E) volatile __SLRCONCbits_t SLRCONCbits;
2514 #define _SLRC0 0x01
2515 #define _SLRC1 0x02
2516 #define _SLRC2 0x04
2517 #define _SLRC3 0x08
2518 #define _SLRC4 0x10
2519 #define _SLRC5 0x20
2521 //==============================================================================
2524 //==============================================================================
2525 // INLVLA Bits
2527 extern __at(0x038C) __sfr INLVLA;
2529 typedef union
2531 struct
2533 unsigned INLVLA0 : 1;
2534 unsigned INLVLA1 : 1;
2535 unsigned INLVLA2 : 1;
2536 unsigned INLVLA3 : 1;
2537 unsigned INLVLA4 : 1;
2538 unsigned INLVLA5 : 1;
2539 unsigned : 1;
2540 unsigned : 1;
2543 struct
2545 unsigned INLVLA : 6;
2546 unsigned : 2;
2548 } __INLVLAbits_t;
2550 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
2552 #define _INLVLA0 0x01
2553 #define _INLVLA1 0x02
2554 #define _INLVLA2 0x04
2555 #define _INLVLA3 0x08
2556 #define _INLVLA4 0x10
2557 #define _INLVLA5 0x20
2559 //==============================================================================
2562 //==============================================================================
2563 // INLVLC Bits
2565 extern __at(0x038E) __sfr INLVLC;
2567 typedef union
2569 struct
2571 unsigned INLVLC0 : 1;
2572 unsigned INLVLC1 : 1;
2573 unsigned INLVLC2 : 1;
2574 unsigned INLVLC3 : 1;
2575 unsigned INLVLC4 : 1;
2576 unsigned INLVLC5 : 1;
2577 unsigned : 1;
2578 unsigned : 1;
2581 struct
2583 unsigned INLVLC : 6;
2584 unsigned : 2;
2586 } __INLVLCbits_t;
2588 extern __at(0x038E) volatile __INLVLCbits_t INLVLCbits;
2590 #define _INLVLC0 0x01
2591 #define _INLVLC1 0x02
2592 #define _INLVLC2 0x04
2593 #define _INLVLC3 0x08
2594 #define _INLVLC4 0x10
2595 #define _INLVLC5 0x20
2597 //==============================================================================
2600 //==============================================================================
2601 // IOCAP Bits
2603 extern __at(0x0391) __sfr IOCAP;
2605 typedef union
2607 struct
2609 unsigned IOCAP0 : 1;
2610 unsigned IOCAP1 : 1;
2611 unsigned IOCAP2 : 1;
2612 unsigned IOCAP3 : 1;
2613 unsigned IOCAP4 : 1;
2614 unsigned IOCAP5 : 1;
2615 unsigned : 1;
2616 unsigned : 1;
2619 struct
2621 unsigned IOCAP : 6;
2622 unsigned : 2;
2624 } __IOCAPbits_t;
2626 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
2628 #define _IOCAP0 0x01
2629 #define _IOCAP1 0x02
2630 #define _IOCAP2 0x04
2631 #define _IOCAP3 0x08
2632 #define _IOCAP4 0x10
2633 #define _IOCAP5 0x20
2635 //==============================================================================
2638 //==============================================================================
2639 // IOCAN Bits
2641 extern __at(0x0392) __sfr IOCAN;
2643 typedef union
2645 struct
2647 unsigned IOCAN0 : 1;
2648 unsigned IOCAN1 : 1;
2649 unsigned IOCAN2 : 1;
2650 unsigned IOCAN3 : 1;
2651 unsigned IOCAN4 : 1;
2652 unsigned IOCAN5 : 1;
2653 unsigned : 1;
2654 unsigned : 1;
2657 struct
2659 unsigned IOCAN : 6;
2660 unsigned : 2;
2662 } __IOCANbits_t;
2664 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
2666 #define _IOCAN0 0x01
2667 #define _IOCAN1 0x02
2668 #define _IOCAN2 0x04
2669 #define _IOCAN3 0x08
2670 #define _IOCAN4 0x10
2671 #define _IOCAN5 0x20
2673 //==============================================================================
2676 //==============================================================================
2677 // IOCAF Bits
2679 extern __at(0x0393) __sfr IOCAF;
2681 typedef union
2683 struct
2685 unsigned IOCAF0 : 1;
2686 unsigned IOCAF1 : 1;
2687 unsigned IOCAF2 : 1;
2688 unsigned IOCAF3 : 1;
2689 unsigned IOCAF4 : 1;
2690 unsigned IOCAF5 : 1;
2691 unsigned : 1;
2692 unsigned : 1;
2695 struct
2697 unsigned IOCAF : 6;
2698 unsigned : 2;
2700 } __IOCAFbits_t;
2702 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
2704 #define _IOCAF0 0x01
2705 #define _IOCAF1 0x02
2706 #define _IOCAF2 0x04
2707 #define _IOCAF3 0x08
2708 #define _IOCAF4 0x10
2709 #define _IOCAF5 0x20
2711 //==============================================================================
2714 //==============================================================================
2715 // IOCCP Bits
2717 extern __at(0x0397) __sfr IOCCP;
2719 typedef union
2721 struct
2723 unsigned IOCCP0 : 1;
2724 unsigned IOCCP1 : 1;
2725 unsigned IOCCP2 : 1;
2726 unsigned IOCCP3 : 1;
2727 unsigned IOCCP4 : 1;
2728 unsigned IOCCP5 : 1;
2729 unsigned : 1;
2730 unsigned : 1;
2733 struct
2735 unsigned IOCCP : 6;
2736 unsigned : 2;
2738 } __IOCCPbits_t;
2740 extern __at(0x0397) volatile __IOCCPbits_t IOCCPbits;
2742 #define _IOCCP0 0x01
2743 #define _IOCCP1 0x02
2744 #define _IOCCP2 0x04
2745 #define _IOCCP3 0x08
2746 #define _IOCCP4 0x10
2747 #define _IOCCP5 0x20
2749 //==============================================================================
2752 //==============================================================================
2753 // IOCCN Bits
2755 extern __at(0x0398) __sfr IOCCN;
2757 typedef union
2759 struct
2761 unsigned IOCCN0 : 1;
2762 unsigned IOCCN1 : 1;
2763 unsigned IOCCN2 : 1;
2764 unsigned IOCCN3 : 1;
2765 unsigned IOCCN4 : 1;
2766 unsigned IOCCN5 : 1;
2767 unsigned : 1;
2768 unsigned : 1;
2771 struct
2773 unsigned IOCCN : 6;
2774 unsigned : 2;
2776 } __IOCCNbits_t;
2778 extern __at(0x0398) volatile __IOCCNbits_t IOCCNbits;
2780 #define _IOCCN0 0x01
2781 #define _IOCCN1 0x02
2782 #define _IOCCN2 0x04
2783 #define _IOCCN3 0x08
2784 #define _IOCCN4 0x10
2785 #define _IOCCN5 0x20
2787 //==============================================================================
2790 //==============================================================================
2791 // IOCCF Bits
2793 extern __at(0x0399) __sfr IOCCF;
2795 typedef union
2797 struct
2799 unsigned IOCCF0 : 1;
2800 unsigned IOCCF1 : 1;
2801 unsigned IOCCF2 : 1;
2802 unsigned IOCCF3 : 1;
2803 unsigned IOCCF4 : 1;
2804 unsigned IOCCF5 : 1;
2805 unsigned : 1;
2806 unsigned : 1;
2809 struct
2811 unsigned IOCCF : 6;
2812 unsigned : 2;
2814 } __IOCCFbits_t;
2816 extern __at(0x0399) volatile __IOCCFbits_t IOCCFbits;
2818 #define _IOCCF0 0x01
2819 #define _IOCCF1 0x02
2820 #define _IOCCF2 0x04
2821 #define _IOCCF3 0x08
2822 #define _IOCCF4 0x10
2823 #define _IOCCF5 0x20
2825 //==============================================================================
2827 extern __at(0x0413) __sfr T4TMR;
2828 extern __at(0x0413) __sfr TMR4;
2829 extern __at(0x0414) __sfr PR4;
2830 extern __at(0x0414) __sfr T4PR;
2832 //==============================================================================
2833 // T4CON Bits
2835 extern __at(0x0415) __sfr T4CON;
2837 typedef union
2839 struct
2841 unsigned T4OUTPS0 : 1;
2842 unsigned T4OUTPS1 : 1;
2843 unsigned T4OUTPS2 : 1;
2844 unsigned T4OUTPS3 : 1;
2845 unsigned T4CKPS0 : 1;
2846 unsigned T4CKPS1 : 1;
2847 unsigned T4CKPS2 : 1;
2848 unsigned ON : 1;
2851 struct
2853 unsigned OUTPS0 : 1;
2854 unsigned OUTPS1 : 1;
2855 unsigned OUTPS2 : 1;
2856 unsigned OUTPS3 : 1;
2857 unsigned CKPS0 : 1;
2858 unsigned CKPS1 : 1;
2859 unsigned CKPS2 : 1;
2860 unsigned T4ON : 1;
2863 struct
2865 unsigned : 1;
2866 unsigned : 1;
2867 unsigned : 1;
2868 unsigned : 1;
2869 unsigned : 1;
2870 unsigned : 1;
2871 unsigned : 1;
2872 unsigned TMR4ON : 1;
2875 struct
2877 unsigned OUTPS : 4;
2878 unsigned : 4;
2881 struct
2883 unsigned T4OUTPS : 4;
2884 unsigned : 4;
2887 struct
2889 unsigned : 4;
2890 unsigned CKPS : 3;
2891 unsigned : 1;
2894 struct
2896 unsigned : 4;
2897 unsigned T4CKPS : 3;
2898 unsigned : 1;
2900 } __T4CONbits_t;
2902 extern __at(0x0415) volatile __T4CONbits_t T4CONbits;
2904 #define _T4CON_T4OUTPS0 0x01
2905 #define _T4CON_OUTPS0 0x01
2906 #define _T4CON_T4OUTPS1 0x02
2907 #define _T4CON_OUTPS1 0x02
2908 #define _T4CON_T4OUTPS2 0x04
2909 #define _T4CON_OUTPS2 0x04
2910 #define _T4CON_T4OUTPS3 0x08
2911 #define _T4CON_OUTPS3 0x08
2912 #define _T4CON_T4CKPS0 0x10
2913 #define _T4CON_CKPS0 0x10
2914 #define _T4CON_T4CKPS1 0x20
2915 #define _T4CON_CKPS1 0x20
2916 #define _T4CON_T4CKPS2 0x40
2917 #define _T4CON_CKPS2 0x40
2918 #define _T4CON_ON 0x80
2919 #define _T4CON_T4ON 0x80
2920 #define _T4CON_TMR4ON 0x80
2922 //==============================================================================
2925 //==============================================================================
2926 // T4HLT Bits
2928 extern __at(0x0416) __sfr T4HLT;
2930 typedef union
2932 struct
2934 unsigned MODE0 : 1;
2935 unsigned MODE1 : 1;
2936 unsigned MODE2 : 1;
2937 unsigned MODE3 : 1;
2938 unsigned : 1;
2939 unsigned CKSYNC : 1;
2940 unsigned CKPOL : 1;
2941 unsigned PSYNC : 1;
2944 struct
2946 unsigned T4MODE0 : 1;
2947 unsigned T4MODE1 : 1;
2948 unsigned T4MODE2 : 1;
2949 unsigned T4MODE3 : 1;
2950 unsigned : 1;
2951 unsigned T4CKSYNC : 1;
2952 unsigned T4CKPOL : 1;
2953 unsigned T4PSYNC : 1;
2956 struct
2958 unsigned MODE : 4;
2959 unsigned : 4;
2962 struct
2964 unsigned T4MODE : 4;
2965 unsigned : 4;
2967 } __T4HLTbits_t;
2969 extern __at(0x0416) volatile __T4HLTbits_t T4HLTbits;
2971 #define _T4HLT_MODE0 0x01
2972 #define _T4HLT_T4MODE0 0x01
2973 #define _T4HLT_MODE1 0x02
2974 #define _T4HLT_T4MODE1 0x02
2975 #define _T4HLT_MODE2 0x04
2976 #define _T4HLT_T4MODE2 0x04
2977 #define _T4HLT_MODE3 0x08
2978 #define _T4HLT_T4MODE3 0x08
2979 #define _T4HLT_CKSYNC 0x20
2980 #define _T4HLT_T4CKSYNC 0x20
2981 #define _T4HLT_CKPOL 0x40
2982 #define _T4HLT_T4CKPOL 0x40
2983 #define _T4HLT_PSYNC 0x80
2984 #define _T4HLT_T4PSYNC 0x80
2986 //==============================================================================
2989 //==============================================================================
2990 // T4CLKCON Bits
2992 extern __at(0x0417) __sfr T4CLKCON;
2994 typedef union
2996 struct
2998 unsigned T4CS0 : 1;
2999 unsigned T4CS1 : 1;
3000 unsigned T4CS2 : 1;
3001 unsigned : 1;
3002 unsigned : 1;
3003 unsigned : 1;
3004 unsigned : 1;
3005 unsigned : 1;
3008 struct
3010 unsigned T4CS : 3;
3011 unsigned : 5;
3013 } __T4CLKCONbits_t;
3015 extern __at(0x0417) volatile __T4CLKCONbits_t T4CLKCONbits;
3017 #define _T4CS0 0x01
3018 #define _T4CS1 0x02
3019 #define _T4CS2 0x04
3021 //==============================================================================
3024 //==============================================================================
3025 // T4RST Bits
3027 extern __at(0x0418) __sfr T4RST;
3029 typedef union
3031 struct
3033 unsigned RSEL0 : 1;
3034 unsigned RSEL1 : 1;
3035 unsigned RSEL2 : 1;
3036 unsigned RSEL3 : 1;
3037 unsigned : 1;
3038 unsigned : 1;
3039 unsigned : 1;
3040 unsigned : 1;
3043 struct
3045 unsigned T4RSEL0 : 1;
3046 unsigned T4RSEL1 : 1;
3047 unsigned T4RSEL2 : 1;
3048 unsigned T4RSEL3 : 1;
3049 unsigned : 1;
3050 unsigned : 1;
3051 unsigned : 1;
3052 unsigned : 1;
3055 struct
3057 unsigned RSEL : 4;
3058 unsigned : 4;
3061 struct
3063 unsigned T4RSEL : 4;
3064 unsigned : 4;
3066 } __T4RSTbits_t;
3068 extern __at(0x0418) volatile __T4RSTbits_t T4RSTbits;
3070 #define _T4RST_RSEL0 0x01
3071 #define _T4RST_T4RSEL0 0x01
3072 #define _T4RST_RSEL1 0x02
3073 #define _T4RST_T4RSEL1 0x02
3074 #define _T4RST_RSEL2 0x04
3075 #define _T4RST_T4RSEL2 0x04
3076 #define _T4RST_RSEL3 0x08
3077 #define _T4RST_T4RSEL3 0x08
3079 //==============================================================================
3081 extern __at(0x041A) __sfr T6TMR;
3082 extern __at(0x041A) __sfr TMR6;
3083 extern __at(0x041B) __sfr PR6;
3084 extern __at(0x041B) __sfr T6PR;
3086 //==============================================================================
3087 // T6CON Bits
3089 extern __at(0x041C) __sfr T6CON;
3091 typedef union
3093 struct
3095 unsigned T6OUTPS0 : 1;
3096 unsigned T6OUTPS1 : 1;
3097 unsigned T6OUTPS2 : 1;
3098 unsigned T6OUTPS3 : 1;
3099 unsigned T6CKPS0 : 1;
3100 unsigned T6CKPS1 : 1;
3101 unsigned T6CKPS2 : 1;
3102 unsigned ON : 1;
3105 struct
3107 unsigned OUTPS0 : 1;
3108 unsigned OUTPS1 : 1;
3109 unsigned OUTPS2 : 1;
3110 unsigned OUTPS3 : 1;
3111 unsigned CKPS0 : 1;
3112 unsigned CKPS1 : 1;
3113 unsigned CKPS2 : 1;
3114 unsigned T6ON : 1;
3117 struct
3119 unsigned : 1;
3120 unsigned : 1;
3121 unsigned : 1;
3122 unsigned : 1;
3123 unsigned : 1;
3124 unsigned : 1;
3125 unsigned : 1;
3126 unsigned TMR6ON : 1;
3129 struct
3131 unsigned T6OUTPS : 4;
3132 unsigned : 4;
3135 struct
3137 unsigned OUTPS : 4;
3138 unsigned : 4;
3141 struct
3143 unsigned : 4;
3144 unsigned CKPS : 3;
3145 unsigned : 1;
3148 struct
3150 unsigned : 4;
3151 unsigned T6CKPS : 3;
3152 unsigned : 1;
3154 } __T6CONbits_t;
3156 extern __at(0x041C) volatile __T6CONbits_t T6CONbits;
3158 #define _T6CON_T6OUTPS0 0x01
3159 #define _T6CON_OUTPS0 0x01
3160 #define _T6CON_T6OUTPS1 0x02
3161 #define _T6CON_OUTPS1 0x02
3162 #define _T6CON_T6OUTPS2 0x04
3163 #define _T6CON_OUTPS2 0x04
3164 #define _T6CON_T6OUTPS3 0x08
3165 #define _T6CON_OUTPS3 0x08
3166 #define _T6CON_T6CKPS0 0x10
3167 #define _T6CON_CKPS0 0x10
3168 #define _T6CON_T6CKPS1 0x20
3169 #define _T6CON_CKPS1 0x20
3170 #define _T6CON_T6CKPS2 0x40
3171 #define _T6CON_CKPS2 0x40
3172 #define _T6CON_ON 0x80
3173 #define _T6CON_T6ON 0x80
3174 #define _T6CON_TMR6ON 0x80
3176 //==============================================================================
3179 //==============================================================================
3180 // T6HLT Bits
3182 extern __at(0x041D) __sfr T6HLT;
3184 typedef union
3186 struct
3188 unsigned MODE0 : 1;
3189 unsigned MODE1 : 1;
3190 unsigned MODE2 : 1;
3191 unsigned MODE3 : 1;
3192 unsigned : 1;
3193 unsigned CKSYNC : 1;
3194 unsigned CKPOL : 1;
3195 unsigned PSYNC : 1;
3198 struct
3200 unsigned T6MODE0 : 1;
3201 unsigned T6MODE1 : 1;
3202 unsigned T6MODE2 : 1;
3203 unsigned T6MODE3 : 1;
3204 unsigned : 1;
3205 unsigned T6CKSYNC : 1;
3206 unsigned T6CKPOL : 1;
3207 unsigned T6PSYNC : 1;
3210 struct
3212 unsigned MODE : 4;
3213 unsigned : 4;
3216 struct
3218 unsigned T6MODE : 4;
3219 unsigned : 4;
3221 } __T6HLTbits_t;
3223 extern __at(0x041D) volatile __T6HLTbits_t T6HLTbits;
3225 #define _T6HLT_MODE0 0x01
3226 #define _T6HLT_T6MODE0 0x01
3227 #define _T6HLT_MODE1 0x02
3228 #define _T6HLT_T6MODE1 0x02
3229 #define _T6HLT_MODE2 0x04
3230 #define _T6HLT_T6MODE2 0x04
3231 #define _T6HLT_MODE3 0x08
3232 #define _T6HLT_T6MODE3 0x08
3233 #define _T6HLT_CKSYNC 0x20
3234 #define _T6HLT_T6CKSYNC 0x20
3235 #define _T6HLT_CKPOL 0x40
3236 #define _T6HLT_T6CKPOL 0x40
3237 #define _T6HLT_PSYNC 0x80
3238 #define _T6HLT_T6PSYNC 0x80
3240 //==============================================================================
3243 //==============================================================================
3244 // T6CLKCON Bits
3246 extern __at(0x041E) __sfr T6CLKCON;
3248 typedef union
3250 struct
3252 unsigned T6CS0 : 1;
3253 unsigned T6CS1 : 1;
3254 unsigned T6CS2 : 1;
3255 unsigned : 1;
3256 unsigned : 1;
3257 unsigned : 1;
3258 unsigned : 1;
3259 unsigned : 1;
3262 struct
3264 unsigned T6CS : 3;
3265 unsigned : 5;
3267 } __T6CLKCONbits_t;
3269 extern __at(0x041E) volatile __T6CLKCONbits_t T6CLKCONbits;
3271 #define _T6CS0 0x01
3272 #define _T6CS1 0x02
3273 #define _T6CS2 0x04
3275 //==============================================================================
3278 //==============================================================================
3279 // T6RST Bits
3281 extern __at(0x041F) __sfr T6RST;
3283 typedef union
3285 struct
3287 unsigned RSEL0 : 1;
3288 unsigned RSEL1 : 1;
3289 unsigned RSEL2 : 1;
3290 unsigned RSEL3 : 1;
3291 unsigned : 1;
3292 unsigned : 1;
3293 unsigned : 1;
3294 unsigned : 1;
3297 struct
3299 unsigned T6RSEL0 : 1;
3300 unsigned T6RSEL1 : 1;
3301 unsigned T6RSEL2 : 1;
3302 unsigned T6RSEL3 : 1;
3303 unsigned : 1;
3304 unsigned : 1;
3305 unsigned : 1;
3306 unsigned : 1;
3309 struct
3311 unsigned T6RSEL : 4;
3312 unsigned : 4;
3315 struct
3317 unsigned RSEL : 4;
3318 unsigned : 4;
3320 } __T6RSTbits_t;
3322 extern __at(0x041F) volatile __T6RSTbits_t T6RSTbits;
3324 #define _T6RST_RSEL0 0x01
3325 #define _T6RST_T6RSEL0 0x01
3326 #define _T6RST_RSEL1 0x02
3327 #define _T6RST_T6RSEL1 0x02
3328 #define _T6RST_RSEL2 0x04
3329 #define _T6RST_T6RSEL2 0x04
3330 #define _T6RST_RSEL3 0x08
3331 #define _T6RST_T6RSEL3 0x08
3333 //==============================================================================
3336 //==============================================================================
3337 // CWG1DBR Bits
3339 extern __at(0x0691) __sfr CWG1DBR;
3341 typedef union
3343 struct
3345 unsigned DBR0 : 1;
3346 unsigned DBR1 : 1;
3347 unsigned DBR2 : 1;
3348 unsigned DBR3 : 1;
3349 unsigned DBR4 : 1;
3350 unsigned DBR5 : 1;
3351 unsigned : 1;
3352 unsigned : 1;
3355 struct
3357 unsigned CWG1DBR0 : 1;
3358 unsigned CWG1DBR1 : 1;
3359 unsigned CWG1DBR2 : 1;
3360 unsigned CWG1DBR3 : 1;
3361 unsigned CWG1DBR4 : 1;
3362 unsigned CWG1DBR5 : 1;
3363 unsigned : 1;
3364 unsigned : 1;
3367 struct
3369 unsigned DBR : 6;
3370 unsigned : 2;
3373 struct
3375 unsigned CWG1DBR : 6;
3376 unsigned : 2;
3378 } __CWG1DBRbits_t;
3380 extern __at(0x0691) volatile __CWG1DBRbits_t CWG1DBRbits;
3382 #define _DBR0 0x01
3383 #define _CWG1DBR0 0x01
3384 #define _DBR1 0x02
3385 #define _CWG1DBR1 0x02
3386 #define _DBR2 0x04
3387 #define _CWG1DBR2 0x04
3388 #define _DBR3 0x08
3389 #define _CWG1DBR3 0x08
3390 #define _DBR4 0x10
3391 #define _CWG1DBR4 0x10
3392 #define _DBR5 0x20
3393 #define _CWG1DBR5 0x20
3395 //==============================================================================
3398 //==============================================================================
3399 // CWG1DBF Bits
3401 extern __at(0x0692) __sfr CWG1DBF;
3403 typedef union
3405 struct
3407 unsigned DBF0 : 1;
3408 unsigned DBF1 : 1;
3409 unsigned DBF2 : 1;
3410 unsigned DBF3 : 1;
3411 unsigned DBF4 : 1;
3412 unsigned DBF5 : 1;
3413 unsigned : 1;
3414 unsigned : 1;
3417 struct
3419 unsigned CWG1DBF0 : 1;
3420 unsigned CWG1DBF1 : 1;
3421 unsigned CWG1DBF2 : 1;
3422 unsigned CWG1DBF3 : 1;
3423 unsigned CWG1DBF4 : 1;
3424 unsigned CWG1DBF5 : 1;
3425 unsigned : 1;
3426 unsigned : 1;
3429 struct
3431 unsigned DBF : 6;
3432 unsigned : 2;
3435 struct
3437 unsigned CWG1DBF : 6;
3438 unsigned : 2;
3440 } __CWG1DBFbits_t;
3442 extern __at(0x0692) volatile __CWG1DBFbits_t CWG1DBFbits;
3444 #define _DBF0 0x01
3445 #define _CWG1DBF0 0x01
3446 #define _DBF1 0x02
3447 #define _CWG1DBF1 0x02
3448 #define _DBF2 0x04
3449 #define _CWG1DBF2 0x04
3450 #define _DBF3 0x08
3451 #define _CWG1DBF3 0x08
3452 #define _DBF4 0x10
3453 #define _CWG1DBF4 0x10
3454 #define _DBF5 0x20
3455 #define _CWG1DBF5 0x20
3457 //==============================================================================
3460 //==============================================================================
3461 // CWG1AS0 Bits
3463 extern __at(0x0693) __sfr CWG1AS0;
3465 typedef union
3467 struct
3469 unsigned : 1;
3470 unsigned : 1;
3471 unsigned LSAC0 : 1;
3472 unsigned LSAC1 : 1;
3473 unsigned LSBD0 : 1;
3474 unsigned LSBD1 : 1;
3475 unsigned REN : 1;
3476 unsigned SHUTDOWN : 1;
3479 struct
3481 unsigned : 1;
3482 unsigned : 1;
3483 unsigned CWG1LSAC0 : 1;
3484 unsigned CWG1LSAC1 : 1;
3485 unsigned CWG1LSBD0 : 1;
3486 unsigned CWG1LSBD1 : 1;
3487 unsigned CWG1REN : 1;
3488 unsigned CWG1SHUTDOWN : 1;
3491 struct
3493 unsigned : 2;
3494 unsigned CWG1LSAC : 2;
3495 unsigned : 4;
3498 struct
3500 unsigned : 2;
3501 unsigned LSAC : 2;
3502 unsigned : 4;
3505 struct
3507 unsigned : 4;
3508 unsigned CWG1LSBD : 2;
3509 unsigned : 2;
3512 struct
3514 unsigned : 4;
3515 unsigned LSBD : 2;
3516 unsigned : 2;
3518 } __CWG1AS0bits_t;
3520 extern __at(0x0693) volatile __CWG1AS0bits_t CWG1AS0bits;
3522 #define _LSAC0 0x04
3523 #define _CWG1LSAC0 0x04
3524 #define _LSAC1 0x08
3525 #define _CWG1LSAC1 0x08
3526 #define _LSBD0 0x10
3527 #define _CWG1LSBD0 0x10
3528 #define _LSBD1 0x20
3529 #define _CWG1LSBD1 0x20
3530 #define _REN 0x40
3531 #define _CWG1REN 0x40
3532 #define _SHUTDOWN 0x80
3533 #define _CWG1SHUTDOWN 0x80
3535 //==============================================================================
3538 //==============================================================================
3539 // CWG1AS1 Bits
3541 extern __at(0x0694) __sfr CWG1AS1;
3543 typedef union
3545 struct
3547 unsigned INAS : 1;
3548 unsigned C1AS : 1;
3549 unsigned C2AS : 1;
3550 unsigned : 1;
3551 unsigned TMR2AS : 1;
3552 unsigned TMR4AS : 1;
3553 unsigned TMR6AS : 1;
3554 unsigned : 1;
3557 struct
3559 unsigned CWG1INAS : 1;
3560 unsigned CWG1C1AS : 1;
3561 unsigned CWG1C2AS : 1;
3562 unsigned : 1;
3563 unsigned CWG1TMR2AS : 1;
3564 unsigned CWG1TMR4AS : 1;
3565 unsigned CWG1TMR6AS : 1;
3566 unsigned : 1;
3568 } __CWG1AS1bits_t;
3570 extern __at(0x0694) volatile __CWG1AS1bits_t CWG1AS1bits;
3572 #define _INAS 0x01
3573 #define _CWG1INAS 0x01
3574 #define _C1AS 0x02
3575 #define _CWG1C1AS 0x02
3576 #define _C2AS 0x04
3577 #define _CWG1C2AS 0x04
3578 #define _TMR2AS 0x10
3579 #define _CWG1TMR2AS 0x10
3580 #define _TMR4AS 0x20
3581 #define _CWG1TMR4AS 0x20
3582 #define _TMR6AS 0x40
3583 #define _CWG1TMR6AS 0x40
3585 //==============================================================================
3588 //==============================================================================
3589 // CWG1OCON0 Bits
3591 extern __at(0x0695) __sfr CWG1OCON0;
3593 typedef union
3595 struct
3597 unsigned STRA : 1;
3598 unsigned STRB : 1;
3599 unsigned STRC : 1;
3600 unsigned STRD : 1;
3601 unsigned OVRA : 1;
3602 unsigned OVRB : 1;
3603 unsigned OVRC : 1;
3604 unsigned OVRD : 1;
3607 struct
3609 unsigned CWG1STRA : 1;
3610 unsigned CWG1STRB : 1;
3611 unsigned CWG1STRC : 1;
3612 unsigned CWG1STRD : 1;
3613 unsigned CWG1OVRA : 1;
3614 unsigned CWG1OVRB : 1;
3615 unsigned CWG1OVRC : 1;
3616 unsigned CWG1OVRD : 1;
3618 } __CWG1OCON0bits_t;
3620 extern __at(0x0695) volatile __CWG1OCON0bits_t CWG1OCON0bits;
3622 #define _STRA 0x01
3623 #define _CWG1STRA 0x01
3624 #define _STRB 0x02
3625 #define _CWG1STRB 0x02
3626 #define _STRC 0x04
3627 #define _CWG1STRC 0x04
3628 #define _STRD 0x08
3629 #define _CWG1STRD 0x08
3630 #define _OVRA 0x10
3631 #define _CWG1OVRA 0x10
3632 #define _OVRB 0x20
3633 #define _CWG1OVRB 0x20
3634 #define _OVRC 0x40
3635 #define _CWG1OVRC 0x40
3636 #define _OVRD 0x80
3637 #define _CWG1OVRD 0x80
3639 //==============================================================================
3642 //==============================================================================
3643 // CWG1CON0 Bits
3645 extern __at(0x0696) __sfr CWG1CON0;
3647 typedef union
3649 struct
3651 unsigned MODE0 : 1;
3652 unsigned MODE1 : 1;
3653 unsigned MODE2 : 1;
3654 unsigned : 1;
3655 unsigned : 1;
3656 unsigned : 1;
3657 unsigned LD : 1;
3658 unsigned EN : 1;
3661 struct
3663 unsigned CWG1MODE0 : 1;
3664 unsigned CWG1MODE1 : 1;
3665 unsigned CWG1MODE2 : 1;
3666 unsigned : 1;
3667 unsigned : 1;
3668 unsigned : 1;
3669 unsigned CWG1LD : 1;
3670 unsigned G1EN : 1;
3673 struct
3675 unsigned : 1;
3676 unsigned : 1;
3677 unsigned : 1;
3678 unsigned : 1;
3679 unsigned : 1;
3680 unsigned : 1;
3681 unsigned : 1;
3682 unsigned CWG1EN : 1;
3685 struct
3687 unsigned MODE : 3;
3688 unsigned : 5;
3691 struct
3693 unsigned CWG1MODE : 3;
3694 unsigned : 5;
3696 } __CWG1CON0bits_t;
3698 extern __at(0x0696) volatile __CWG1CON0bits_t CWG1CON0bits;
3700 #define _CWG1CON0_MODE0 0x01
3701 #define _CWG1CON0_CWG1MODE0 0x01
3702 #define _CWG1CON0_MODE1 0x02
3703 #define _CWG1CON0_CWG1MODE1 0x02
3704 #define _CWG1CON0_MODE2 0x04
3705 #define _CWG1CON0_CWG1MODE2 0x04
3706 #define _CWG1CON0_LD 0x40
3707 #define _CWG1CON0_CWG1LD 0x40
3708 #define _CWG1CON0_EN 0x80
3709 #define _CWG1CON0_G1EN 0x80
3710 #define _CWG1CON0_CWG1EN 0x80
3712 //==============================================================================
3715 //==============================================================================
3716 // CWG1CON1 Bits
3718 extern __at(0x0697) __sfr CWG1CON1;
3720 typedef union
3722 struct
3724 unsigned POLA : 1;
3725 unsigned POLB : 1;
3726 unsigned POLC : 1;
3727 unsigned POLD : 1;
3728 unsigned : 1;
3729 unsigned IN : 1;
3730 unsigned : 1;
3731 unsigned : 1;
3734 struct
3736 unsigned CWG1POLA : 1;
3737 unsigned CWG1POLB : 1;
3738 unsigned CWG1POLC : 1;
3739 unsigned CWG1POLD : 1;
3740 unsigned : 1;
3741 unsigned CWG1IN : 1;
3742 unsigned : 1;
3743 unsigned : 1;
3745 } __CWG1CON1bits_t;
3747 extern __at(0x0697) volatile __CWG1CON1bits_t CWG1CON1bits;
3749 #define _POLA 0x01
3750 #define _CWG1POLA 0x01
3751 #define _POLB 0x02
3752 #define _CWG1POLB 0x02
3753 #define _POLC 0x04
3754 #define _CWG1POLC 0x04
3755 #define _POLD 0x08
3756 #define _CWG1POLD 0x08
3757 #define _IN 0x20
3758 #define _CWG1IN 0x20
3760 //==============================================================================
3763 //==============================================================================
3764 // CWG1OCON1 Bits
3766 extern __at(0x0698) __sfr CWG1OCON1;
3768 typedef union
3770 struct
3772 unsigned OEA : 1;
3773 unsigned OEB : 1;
3774 unsigned OEC : 1;
3775 unsigned OED : 1;
3776 unsigned : 1;
3777 unsigned : 1;
3778 unsigned : 1;
3779 unsigned : 1;
3782 struct
3784 unsigned CWG1OEA : 1;
3785 unsigned CWG1OEB : 1;
3786 unsigned CWG1OEC : 1;
3787 unsigned CWG1OED : 1;
3788 unsigned : 1;
3789 unsigned : 1;
3790 unsigned : 1;
3791 unsigned : 1;
3793 } __CWG1OCON1bits_t;
3795 extern __at(0x0698) volatile __CWG1OCON1bits_t CWG1OCON1bits;
3797 #define _OEA 0x01
3798 #define _CWG1OEA 0x01
3799 #define _OEB 0x02
3800 #define _CWG1OEB 0x02
3801 #define _OEC 0x04
3802 #define _CWG1OEC 0x04
3803 #define _OED 0x08
3804 #define _CWG1OED 0x08
3806 //==============================================================================
3809 //==============================================================================
3810 // CWG1CLKCON Bits
3812 extern __at(0x0699) __sfr CWG1CLKCON;
3814 typedef union
3816 struct
3818 unsigned CS : 1;
3819 unsigned : 1;
3820 unsigned : 1;
3821 unsigned : 1;
3822 unsigned : 1;
3823 unsigned : 1;
3824 unsigned : 1;
3825 unsigned : 1;
3828 struct
3830 unsigned CWG1CS : 1;
3831 unsigned : 1;
3832 unsigned : 1;
3833 unsigned : 1;
3834 unsigned : 1;
3835 unsigned : 1;
3836 unsigned : 1;
3837 unsigned : 1;
3839 } __CWG1CLKCONbits_t;
3841 extern __at(0x0699) volatile __CWG1CLKCONbits_t CWG1CLKCONbits;
3843 #define _CS 0x01
3844 #define _CWG1CS 0x01
3846 //==============================================================================
3849 //==============================================================================
3850 // CWG1ISM Bits
3852 extern __at(0x069A) __sfr CWG1ISM;
3854 typedef union
3856 struct
3858 unsigned IS0 : 1;
3859 unsigned IS1 : 1;
3860 unsigned IS2 : 1;
3861 unsigned : 1;
3862 unsigned : 1;
3863 unsigned : 1;
3864 unsigned : 1;
3865 unsigned : 1;
3868 struct
3870 unsigned CWG1IS0 : 1;
3871 unsigned CWG1IS1 : 1;
3872 unsigned CWG1IS2 : 1;
3873 unsigned : 1;
3874 unsigned : 1;
3875 unsigned : 1;
3876 unsigned : 1;
3877 unsigned : 1;
3880 struct
3882 unsigned CWG1IS : 3;
3883 unsigned : 5;
3886 struct
3888 unsigned IS : 3;
3889 unsigned : 5;
3891 } __CWG1ISMbits_t;
3893 extern __at(0x069A) volatile __CWG1ISMbits_t CWG1ISMbits;
3895 #define _IS0 0x01
3896 #define _CWG1IS0 0x01
3897 #define _IS1 0x02
3898 #define _CWG1IS1 0x02
3899 #define _IS2 0x04
3900 #define _CWG1IS2 0x04
3902 //==============================================================================
3905 //==============================================================================
3906 // WDTCON0 Bits
3908 extern __at(0x0711) __sfr WDTCON0;
3910 typedef union
3912 struct
3914 unsigned SEN : 1;
3915 unsigned WDTPS0 : 1;
3916 unsigned WDTPS1 : 1;
3917 unsigned WDTPS2 : 1;
3918 unsigned WDTPS3 : 1;
3919 unsigned WDTPS4 : 1;
3920 unsigned : 1;
3921 unsigned : 1;
3924 struct
3926 unsigned SWDTEN : 1;
3927 unsigned : 1;
3928 unsigned : 1;
3929 unsigned : 1;
3930 unsigned : 1;
3931 unsigned : 1;
3932 unsigned : 1;
3933 unsigned : 1;
3936 struct
3938 unsigned WDTSEN : 1;
3939 unsigned : 1;
3940 unsigned : 1;
3941 unsigned : 1;
3942 unsigned : 1;
3943 unsigned : 1;
3944 unsigned : 1;
3945 unsigned : 1;
3948 struct
3950 unsigned : 1;
3951 unsigned WDTPS : 5;
3952 unsigned : 2;
3954 } __WDTCON0bits_t;
3956 extern __at(0x0711) volatile __WDTCON0bits_t WDTCON0bits;
3958 #define _SEN 0x01
3959 #define _SWDTEN 0x01
3960 #define _WDTSEN 0x01
3961 #define _WDTPS0 0x02
3962 #define _WDTPS1 0x04
3963 #define _WDTPS2 0x08
3964 #define _WDTPS3 0x10
3965 #define _WDTPS4 0x20
3967 //==============================================================================
3970 //==============================================================================
3971 // WDTCON1 Bits
3973 extern __at(0x0712) __sfr WDTCON1;
3975 typedef union
3977 struct
3979 unsigned WINDOW0 : 1;
3980 unsigned WINDOW1 : 1;
3981 unsigned WINDOW2 : 1;
3982 unsigned : 1;
3983 unsigned WDTCS0 : 1;
3984 unsigned WDTCS1 : 1;
3985 unsigned WDTCS2 : 1;
3986 unsigned : 1;
3989 struct
3991 unsigned WDTWINDOW0 : 1;
3992 unsigned WDTWINDOW1 : 1;
3993 unsigned WDTWINDOW2 : 1;
3994 unsigned : 1;
3995 unsigned : 1;
3996 unsigned : 1;
3997 unsigned : 1;
3998 unsigned : 1;
4001 struct
4003 unsigned WDTWINDOW : 3;
4004 unsigned : 5;
4007 struct
4009 unsigned WINDOW : 3;
4010 unsigned : 5;
4013 struct
4015 unsigned : 4;
4016 unsigned WDTCS : 3;
4017 unsigned : 1;
4019 } __WDTCON1bits_t;
4021 extern __at(0x0712) volatile __WDTCON1bits_t WDTCON1bits;
4023 #define _WINDOW0 0x01
4024 #define _WDTWINDOW0 0x01
4025 #define _WINDOW1 0x02
4026 #define _WDTWINDOW1 0x02
4027 #define _WINDOW2 0x04
4028 #define _WDTWINDOW2 0x04
4029 #define _WDTCS0 0x10
4030 #define _WDTCS1 0x20
4031 #define _WDTCS2 0x40
4033 //==============================================================================
4036 //==============================================================================
4037 // WDTPSL Bits
4039 extern __at(0x0713) __sfr WDTPSL;
4041 typedef union
4043 struct
4045 unsigned PSCNT0 : 1;
4046 unsigned PSCNT1 : 1;
4047 unsigned PSCNT2 : 1;
4048 unsigned PSCNT3 : 1;
4049 unsigned PSCNT4 : 1;
4050 unsigned PSCNT5 : 1;
4051 unsigned PSCNT6 : 1;
4052 unsigned PSCNT7 : 1;
4055 struct
4057 unsigned WDTPSCNT0 : 1;
4058 unsigned WDTPSCNT1 : 1;
4059 unsigned WDTPSCNT2 : 1;
4060 unsigned WDTPSCNT3 : 1;
4061 unsigned WDTPSCNT4 : 1;
4062 unsigned WDTPSCNT5 : 1;
4063 unsigned WDTPSCNT6 : 1;
4064 unsigned WDTPSCNT7 : 1;
4066 } __WDTPSLbits_t;
4068 extern __at(0x0713) volatile __WDTPSLbits_t WDTPSLbits;
4070 #define _PSCNT0 0x01
4071 #define _WDTPSCNT0 0x01
4072 #define _PSCNT1 0x02
4073 #define _WDTPSCNT1 0x02
4074 #define _PSCNT2 0x04
4075 #define _WDTPSCNT2 0x04
4076 #define _PSCNT3 0x08
4077 #define _WDTPSCNT3 0x08
4078 #define _PSCNT4 0x10
4079 #define _WDTPSCNT4 0x10
4080 #define _PSCNT5 0x20
4081 #define _WDTPSCNT5 0x20
4082 #define _PSCNT6 0x40
4083 #define _WDTPSCNT6 0x40
4084 #define _PSCNT7 0x80
4085 #define _WDTPSCNT7 0x80
4087 //==============================================================================
4090 //==============================================================================
4091 // WDTPSH Bits
4093 extern __at(0x0714) __sfr WDTPSH;
4095 typedef union
4097 struct
4099 unsigned PSCNT8 : 1;
4100 unsigned PSCNT9 : 1;
4101 unsigned PSCNT10 : 1;
4102 unsigned PSCNT11 : 1;
4103 unsigned PSCNT12 : 1;
4104 unsigned PSCNT13 : 1;
4105 unsigned PSCNT14 : 1;
4106 unsigned PSCNT15 : 1;
4109 struct
4111 unsigned WDTPSCNT8 : 1;
4112 unsigned WDTPSCNT9 : 1;
4113 unsigned WDTPSCNT10 : 1;
4114 unsigned WDTPSCNT11 : 1;
4115 unsigned WDTPSCNT12 : 1;
4116 unsigned WDTPSCNT13 : 1;
4117 unsigned WDTPSCNT14 : 1;
4118 unsigned WDTPSCNT15 : 1;
4120 } __WDTPSHbits_t;
4122 extern __at(0x0714) volatile __WDTPSHbits_t WDTPSHbits;
4124 #define _PSCNT8 0x01
4125 #define _WDTPSCNT8 0x01
4126 #define _PSCNT9 0x02
4127 #define _WDTPSCNT9 0x02
4128 #define _PSCNT10 0x04
4129 #define _WDTPSCNT10 0x04
4130 #define _PSCNT11 0x08
4131 #define _WDTPSCNT11 0x08
4132 #define _PSCNT12 0x10
4133 #define _WDTPSCNT12 0x10
4134 #define _PSCNT13 0x20
4135 #define _WDTPSCNT13 0x20
4136 #define _PSCNT14 0x40
4137 #define _WDTPSCNT14 0x40
4138 #define _PSCNT15 0x80
4139 #define _WDTPSCNT15 0x80
4141 //==============================================================================
4144 //==============================================================================
4145 // WDTTMR Bits
4147 extern __at(0x0715) __sfr WDTTMR;
4149 typedef union
4151 struct
4153 unsigned PSCNT16 : 1;
4154 unsigned PSCNT17 : 1;
4155 unsigned STATE : 1;
4156 unsigned WDTTMR0 : 1;
4157 unsigned WDTTMR1 : 1;
4158 unsigned WDTTMR2 : 1;
4159 unsigned WDTTMR3 : 1;
4160 unsigned WDTTMR4 : 1;
4163 struct
4165 unsigned WDTPSCNT16 : 1;
4166 unsigned WDTPSCNT17 : 1;
4167 unsigned WDTSTATE : 1;
4168 unsigned : 1;
4169 unsigned : 1;
4170 unsigned : 1;
4171 unsigned : 1;
4172 unsigned : 1;
4175 struct
4177 unsigned : 3;
4178 unsigned WDTTMR : 5;
4180 } __WDTTMRbits_t;
4182 extern __at(0x0715) volatile __WDTTMRbits_t WDTTMRbits;
4184 #define _PSCNT16 0x01
4185 #define _WDTPSCNT16 0x01
4186 #define _PSCNT17 0x02
4187 #define _WDTPSCNT17 0x02
4188 #define _STATE 0x04
4189 #define _WDTSTATE 0x04
4190 #define _WDTTMR0 0x08
4191 #define _WDTTMR1 0x10
4192 #define _WDTTMR2 0x20
4193 #define _WDTTMR3 0x40
4194 #define _WDTTMR4 0x80
4196 //==============================================================================
4198 extern __at(0x0718) __sfr SCANLADR;
4200 //==============================================================================
4201 // SCANLADRL Bits
4203 extern __at(0x0718) __sfr SCANLADRL;
4205 typedef union
4207 struct
4209 unsigned LDAR0 : 1;
4210 unsigned LDAR1 : 1;
4211 unsigned LADR2 : 1;
4212 unsigned LADR3 : 1;
4213 unsigned LADR4 : 1;
4214 unsigned LADR5 : 1;
4215 unsigned LADR6 : 1;
4216 unsigned LADR7 : 1;
4219 struct
4221 unsigned SCANLADR0 : 1;
4222 unsigned SCANLADR1 : 1;
4223 unsigned SCANLADR2 : 1;
4224 unsigned SCANLADR3 : 1;
4225 unsigned SCANLADR4 : 1;
4226 unsigned SCANLADR5 : 1;
4227 unsigned SCANLADR6 : 1;
4228 unsigned SCANLADR7 : 1;
4231 struct
4233 unsigned LDAR : 2;
4234 unsigned : 6;
4236 } __SCANLADRLbits_t;
4238 extern __at(0x0718) volatile __SCANLADRLbits_t SCANLADRLbits;
4240 #define _LDAR0 0x01
4241 #define _SCANLADR0 0x01
4242 #define _LDAR1 0x02
4243 #define _SCANLADR1 0x02
4244 #define _LADR2 0x04
4245 #define _SCANLADR2 0x04
4246 #define _LADR3 0x08
4247 #define _SCANLADR3 0x08
4248 #define _LADR4 0x10
4249 #define _SCANLADR4 0x10
4250 #define _LADR5 0x20
4251 #define _SCANLADR5 0x20
4252 #define _LADR6 0x40
4253 #define _SCANLADR6 0x40
4254 #define _LADR7 0x80
4255 #define _SCANLADR7 0x80
4257 //==============================================================================
4260 //==============================================================================
4261 // SCANLADRH Bits
4263 extern __at(0x0719) __sfr SCANLADRH;
4265 typedef union
4267 struct
4269 unsigned LADR8 : 1;
4270 unsigned LADR9 : 1;
4271 unsigned LADR10 : 1;
4272 unsigned LADR11 : 1;
4273 unsigned LADR12 : 1;
4274 unsigned LADR13 : 1;
4275 unsigned LADR14 : 1;
4276 unsigned LADR15 : 1;
4279 struct
4281 unsigned SCANLADR8 : 1;
4282 unsigned SCANLADR9 : 1;
4283 unsigned SCANLADR10 : 1;
4284 unsigned SCANLADR11 : 1;
4285 unsigned SCANLADR12 : 1;
4286 unsigned SCANLADR13 : 1;
4287 unsigned SCANLADR14 : 1;
4288 unsigned SCANLADR15 : 1;
4290 } __SCANLADRHbits_t;
4292 extern __at(0x0719) volatile __SCANLADRHbits_t SCANLADRHbits;
4294 #define _LADR8 0x01
4295 #define _SCANLADR8 0x01
4296 #define _LADR9 0x02
4297 #define _SCANLADR9 0x02
4298 #define _LADR10 0x04
4299 #define _SCANLADR10 0x04
4300 #define _LADR11 0x08
4301 #define _SCANLADR11 0x08
4302 #define _LADR12 0x10
4303 #define _SCANLADR12 0x10
4304 #define _LADR13 0x20
4305 #define _SCANLADR13 0x20
4306 #define _LADR14 0x40
4307 #define _SCANLADR14 0x40
4308 #define _LADR15 0x80
4309 #define _SCANLADR15 0x80
4311 //==============================================================================
4313 extern __at(0x071A) __sfr SCANHADR;
4315 //==============================================================================
4316 // SCANHADRL Bits
4318 extern __at(0x071A) __sfr SCANHADRL;
4320 typedef union
4322 struct
4324 unsigned HADR0 : 1;
4325 unsigned HADR1 : 1;
4326 unsigned HARD2 : 1;
4327 unsigned HADR3 : 1;
4328 unsigned HADR4 : 1;
4329 unsigned HADR5 : 1;
4330 unsigned HADR6 : 1;
4331 unsigned HADR7 : 1;
4334 struct
4336 unsigned SCANHADR0 : 1;
4337 unsigned SCANHADR1 : 1;
4338 unsigned SCANHADR2 : 1;
4339 unsigned SCANHADR3 : 1;
4340 unsigned SCANHADR4 : 1;
4341 unsigned SCANHADR5 : 1;
4342 unsigned SCANHADR6 : 1;
4343 unsigned SCANHADR7 : 1;
4345 } __SCANHADRLbits_t;
4347 extern __at(0x071A) volatile __SCANHADRLbits_t SCANHADRLbits;
4349 #define _HADR0 0x01
4350 #define _SCANHADR0 0x01
4351 #define _HADR1 0x02
4352 #define _SCANHADR1 0x02
4353 #define _HARD2 0x04
4354 #define _SCANHADR2 0x04
4355 #define _HADR3 0x08
4356 #define _SCANHADR3 0x08
4357 #define _HADR4 0x10
4358 #define _SCANHADR4 0x10
4359 #define _HADR5 0x20
4360 #define _SCANHADR5 0x20
4361 #define _HADR6 0x40
4362 #define _SCANHADR6 0x40
4363 #define _HADR7 0x80
4364 #define _SCANHADR7 0x80
4366 //==============================================================================
4369 //==============================================================================
4370 // SCANHADRH Bits
4372 extern __at(0x071B) __sfr SCANHADRH;
4374 typedef union
4376 struct
4378 unsigned HADR8 : 1;
4379 unsigned HADR9 : 1;
4380 unsigned HADR10 : 1;
4381 unsigned HADR11 : 1;
4382 unsigned HADR12 : 1;
4383 unsigned HADR13 : 1;
4384 unsigned HADR14 : 1;
4385 unsigned HADR15 : 1;
4388 struct
4390 unsigned SCANHADR8 : 1;
4391 unsigned SCANHADR9 : 1;
4392 unsigned SCANHADR10 : 1;
4393 unsigned SCANHADR11 : 1;
4394 unsigned SCANHADR12 : 1;
4395 unsigned SCANHADR13 : 1;
4396 unsigned SCANHADR14 : 1;
4397 unsigned SCANHADR15 : 1;
4399 } __SCANHADRHbits_t;
4401 extern __at(0x071B) volatile __SCANHADRHbits_t SCANHADRHbits;
4403 #define _HADR8 0x01
4404 #define _SCANHADR8 0x01
4405 #define _HADR9 0x02
4406 #define _SCANHADR9 0x02
4407 #define _HADR10 0x04
4408 #define _SCANHADR10 0x04
4409 #define _HADR11 0x08
4410 #define _SCANHADR11 0x08
4411 #define _HADR12 0x10
4412 #define _SCANHADR12 0x10
4413 #define _HADR13 0x20
4414 #define _SCANHADR13 0x20
4415 #define _HADR14 0x40
4416 #define _SCANHADR14 0x40
4417 #define _HADR15 0x80
4418 #define _SCANHADR15 0x80
4420 //==============================================================================
4423 //==============================================================================
4424 // SCANCON0 Bits
4426 extern __at(0x071C) __sfr SCANCON0;
4428 typedef union
4430 struct
4432 unsigned MODE0 : 1;
4433 unsigned MODE1 : 1;
4434 unsigned : 1;
4435 unsigned INTM : 1;
4436 unsigned INVALID : 1;
4437 unsigned BUSY : 1;
4438 unsigned SCANGO : 1;
4439 unsigned EN : 1;
4442 struct
4444 unsigned SCANMODE0 : 1;
4445 unsigned SCANMODE1 : 1;
4446 unsigned : 1;
4447 unsigned SCANINTM : 1;
4448 unsigned SCANINVALID : 1;
4449 unsigned SCANBUSY : 1;
4450 unsigned : 1;
4451 unsigned SCANEN : 1;
4454 struct
4456 unsigned MODE : 2;
4457 unsigned : 6;
4460 struct
4462 unsigned SCANMODE : 2;
4463 unsigned : 6;
4465 } __SCANCON0bits_t;
4467 extern __at(0x071C) volatile __SCANCON0bits_t SCANCON0bits;
4469 #define _SCANCON0_MODE0 0x01
4470 #define _SCANCON0_SCANMODE0 0x01
4471 #define _SCANCON0_MODE1 0x02
4472 #define _SCANCON0_SCANMODE1 0x02
4473 #define _SCANCON0_INTM 0x08
4474 #define _SCANCON0_SCANINTM 0x08
4475 #define _SCANCON0_INVALID 0x10
4476 #define _SCANCON0_SCANINVALID 0x10
4477 #define _SCANCON0_BUSY 0x20
4478 #define _SCANCON0_SCANBUSY 0x20
4479 #define _SCANCON0_SCANGO 0x40
4480 #define _SCANCON0_EN 0x80
4481 #define _SCANCON0_SCANEN 0x80
4483 //==============================================================================
4486 //==============================================================================
4487 // SCANTRIG Bits
4489 extern __at(0x071D) __sfr SCANTRIG;
4491 typedef union
4493 struct
4495 unsigned TSEL0 : 1;
4496 unsigned TSEL1 : 1;
4497 unsigned : 1;
4498 unsigned : 1;
4499 unsigned : 1;
4500 unsigned : 1;
4501 unsigned : 1;
4502 unsigned : 1;
4505 struct
4507 unsigned SCANTSEL0 : 1;
4508 unsigned SCANTSEL1 : 1;
4509 unsigned : 1;
4510 unsigned : 1;
4511 unsigned : 1;
4512 unsigned : 1;
4513 unsigned : 1;
4514 unsigned : 1;
4517 struct
4519 unsigned TSEL : 2;
4520 unsigned : 6;
4523 struct
4525 unsigned SCANTSEL : 2;
4526 unsigned : 6;
4528 } __SCANTRIGbits_t;
4530 extern __at(0x071D) volatile __SCANTRIGbits_t SCANTRIGbits;
4532 #define _TSEL0 0x01
4533 #define _SCANTSEL0 0x01
4534 #define _TSEL1 0x02
4535 #define _SCANTSEL1 0x02
4537 //==============================================================================
4539 extern __at(0x0791) __sfr CRCDAT;
4541 //==============================================================================
4542 // CRCDATL Bits
4544 extern __at(0x0791) __sfr CRCDATL;
4546 typedef union
4548 struct
4550 unsigned DAT0 : 1;
4551 unsigned DAT1 : 1;
4552 unsigned DAT2 : 1;
4553 unsigned DAT3 : 1;
4554 unsigned DAT4 : 1;
4555 unsigned DAT5 : 1;
4556 unsigned DAT6 : 1;
4557 unsigned DAT7 : 1;
4560 struct
4562 unsigned CRCDAT0 : 1;
4563 unsigned CRCDAT1 : 1;
4564 unsigned CRCDAT2 : 1;
4565 unsigned CRCDAT3 : 1;
4566 unsigned CRCDAT4 : 1;
4567 unsigned CRCDAT5 : 1;
4568 unsigned CRCDAT6 : 1;
4569 unsigned CRDCDAT7 : 1;
4572 struct
4574 unsigned CRCDAT : 7;
4575 unsigned : 1;
4577 } __CRCDATLbits_t;
4579 extern __at(0x0791) volatile __CRCDATLbits_t CRCDATLbits;
4581 #define _DAT0 0x01
4582 #define _CRCDAT0 0x01
4583 #define _DAT1 0x02
4584 #define _CRCDAT1 0x02
4585 #define _DAT2 0x04
4586 #define _CRCDAT2 0x04
4587 #define _DAT3 0x08
4588 #define _CRCDAT3 0x08
4589 #define _DAT4 0x10
4590 #define _CRCDAT4 0x10
4591 #define _DAT5 0x20
4592 #define _CRCDAT5 0x20
4593 #define _DAT6 0x40
4594 #define _CRCDAT6 0x40
4595 #define _DAT7 0x80
4596 #define _CRDCDAT7 0x80
4598 //==============================================================================
4601 //==============================================================================
4602 // CRCDATH Bits
4604 extern __at(0x0792) __sfr CRCDATH;
4606 typedef union
4608 struct
4610 unsigned DAT8 : 1;
4611 unsigned DAT9 : 1;
4612 unsigned DAT10 : 1;
4613 unsigned DAT11 : 1;
4614 unsigned DAT12 : 1;
4615 unsigned DAT13 : 1;
4616 unsigned DAT14 : 1;
4617 unsigned DAT15 : 1;
4620 struct
4622 unsigned CRCDAT8 : 1;
4623 unsigned CRCDAT9 : 1;
4624 unsigned CRCDAT10 : 1;
4625 unsigned CRCDAT11 : 1;
4626 unsigned CRCDAT12 : 1;
4627 unsigned CRCDAT13 : 1;
4628 unsigned CRCDAT14 : 1;
4629 unsigned CRCDAT15 : 1;
4631 } __CRCDATHbits_t;
4633 extern __at(0x0792) volatile __CRCDATHbits_t CRCDATHbits;
4635 #define _DAT8 0x01
4636 #define _CRCDAT8 0x01
4637 #define _DAT9 0x02
4638 #define _CRCDAT9 0x02
4639 #define _DAT10 0x04
4640 #define _CRCDAT10 0x04
4641 #define _DAT11 0x08
4642 #define _CRCDAT11 0x08
4643 #define _DAT12 0x10
4644 #define _CRCDAT12 0x10
4645 #define _DAT13 0x20
4646 #define _CRCDAT13 0x20
4647 #define _DAT14 0x40
4648 #define _CRCDAT14 0x40
4649 #define _DAT15 0x80
4650 #define _CRCDAT15 0x80
4652 //==============================================================================
4654 extern __at(0x0793) __sfr CRCACC;
4656 //==============================================================================
4657 // CRCACCL Bits
4659 extern __at(0x0793) __sfr CRCACCL;
4661 typedef union
4663 struct
4665 unsigned ACC0 : 1;
4666 unsigned ACC1 : 1;
4667 unsigned ACC2 : 1;
4668 unsigned ACC3 : 1;
4669 unsigned ACC4 : 1;
4670 unsigned ACC5 : 1;
4671 unsigned ACC6 : 1;
4672 unsigned ACC7 : 1;
4675 struct
4677 unsigned CRCACC0 : 1;
4678 unsigned CRCACC1 : 1;
4679 unsigned CRCACC2 : 1;
4680 unsigned CRCACC3 : 1;
4681 unsigned CRCACC4 : 1;
4682 unsigned CRCACC5 : 1;
4683 unsigned CRCACC6 : 1;
4684 unsigned CRCACC7 : 1;
4686 } __CRCACCLbits_t;
4688 extern __at(0x0793) volatile __CRCACCLbits_t CRCACCLbits;
4690 #define _ACC0 0x01
4691 #define _CRCACC0 0x01
4692 #define _ACC1 0x02
4693 #define _CRCACC1 0x02
4694 #define _ACC2 0x04
4695 #define _CRCACC2 0x04
4696 #define _ACC3 0x08
4697 #define _CRCACC3 0x08
4698 #define _ACC4 0x10
4699 #define _CRCACC4 0x10
4700 #define _ACC5 0x20
4701 #define _CRCACC5 0x20
4702 #define _ACC6 0x40
4703 #define _CRCACC6 0x40
4704 #define _ACC7 0x80
4705 #define _CRCACC7 0x80
4707 //==============================================================================
4710 //==============================================================================
4711 // CRCACCH Bits
4713 extern __at(0x0794) __sfr CRCACCH;
4715 typedef union
4717 struct
4719 unsigned ACC8 : 1;
4720 unsigned ACC9 : 1;
4721 unsigned ACC10 : 1;
4722 unsigned ACC11 : 1;
4723 unsigned ACC12 : 1;
4724 unsigned ACC13 : 1;
4725 unsigned ACC14 : 1;
4726 unsigned ACC15 : 1;
4729 struct
4731 unsigned CRCACC8 : 1;
4732 unsigned CRCACC9 : 1;
4733 unsigned CRCACC10 : 1;
4734 unsigned CRCACC11 : 1;
4735 unsigned CRCACC12 : 1;
4736 unsigned CRCACC13 : 1;
4737 unsigned CRCACC14 : 1;
4738 unsigned CRCACC15 : 1;
4740 } __CRCACCHbits_t;
4742 extern __at(0x0794) volatile __CRCACCHbits_t CRCACCHbits;
4744 #define _ACC8 0x01
4745 #define _CRCACC8 0x01
4746 #define _ACC9 0x02
4747 #define _CRCACC9 0x02
4748 #define _ACC10 0x04
4749 #define _CRCACC10 0x04
4750 #define _ACC11 0x08
4751 #define _CRCACC11 0x08
4752 #define _ACC12 0x10
4753 #define _CRCACC12 0x10
4754 #define _ACC13 0x20
4755 #define _CRCACC13 0x20
4756 #define _ACC14 0x40
4757 #define _CRCACC14 0x40
4758 #define _ACC15 0x80
4759 #define _CRCACC15 0x80
4761 //==============================================================================
4763 extern __at(0x0795) __sfr CRCSHIFT;
4765 //==============================================================================
4766 // CRCSHIFTL Bits
4768 extern __at(0x0795) __sfr CRCSHIFTL;
4770 typedef union
4772 struct
4774 unsigned SHIFT0 : 1;
4775 unsigned SHIFT1 : 1;
4776 unsigned SHIFT2 : 1;
4777 unsigned SHIFT3 : 1;
4778 unsigned SHIFT4 : 1;
4779 unsigned SHIFT5 : 1;
4780 unsigned SHIFT6 : 1;
4781 unsigned SHIFT7 : 1;
4784 struct
4786 unsigned CRCSHIFT0 : 1;
4787 unsigned CRCSHIFT1 : 1;
4788 unsigned CRCSHIFT2 : 1;
4789 unsigned CRCSHIFT3 : 1;
4790 unsigned CRCSHIFT4 : 1;
4791 unsigned CRCSHIFT5 : 1;
4792 unsigned CRCSHIFT6 : 1;
4793 unsigned CRCSHIFT7 : 1;
4795 } __CRCSHIFTLbits_t;
4797 extern __at(0x0795) volatile __CRCSHIFTLbits_t CRCSHIFTLbits;
4799 #define _SHIFT0 0x01
4800 #define _CRCSHIFT0 0x01
4801 #define _SHIFT1 0x02
4802 #define _CRCSHIFT1 0x02
4803 #define _SHIFT2 0x04
4804 #define _CRCSHIFT2 0x04
4805 #define _SHIFT3 0x08
4806 #define _CRCSHIFT3 0x08
4807 #define _SHIFT4 0x10
4808 #define _CRCSHIFT4 0x10
4809 #define _SHIFT5 0x20
4810 #define _CRCSHIFT5 0x20
4811 #define _SHIFT6 0x40
4812 #define _CRCSHIFT6 0x40
4813 #define _SHIFT7 0x80
4814 #define _CRCSHIFT7 0x80
4816 //==============================================================================
4819 //==============================================================================
4820 // CRCSHIFTH Bits
4822 extern __at(0x0796) __sfr CRCSHIFTH;
4824 typedef union
4826 struct
4828 unsigned SHIFT8 : 1;
4829 unsigned SHIFT9 : 1;
4830 unsigned SHIFT10 : 1;
4831 unsigned SHIFT11 : 1;
4832 unsigned SHIFT12 : 1;
4833 unsigned SHIFT13 : 1;
4834 unsigned SHIFT14 : 1;
4835 unsigned SHIFT15 : 1;
4838 struct
4840 unsigned CRCSHIFT8 : 1;
4841 unsigned CRCSHIFT9 : 1;
4842 unsigned CRCSHIFT10 : 1;
4843 unsigned CRCSHIFT11 : 1;
4844 unsigned CRCSHIFT12 : 1;
4845 unsigned CRCSHIFT13 : 1;
4846 unsigned CRCSHIFT14 : 1;
4847 unsigned CRCSHIFT15 : 1;
4849 } __CRCSHIFTHbits_t;
4851 extern __at(0x0796) volatile __CRCSHIFTHbits_t CRCSHIFTHbits;
4853 #define _SHIFT8 0x01
4854 #define _CRCSHIFT8 0x01
4855 #define _SHIFT9 0x02
4856 #define _CRCSHIFT9 0x02
4857 #define _SHIFT10 0x04
4858 #define _CRCSHIFT10 0x04
4859 #define _SHIFT11 0x08
4860 #define _CRCSHIFT11 0x08
4861 #define _SHIFT12 0x10
4862 #define _CRCSHIFT12 0x10
4863 #define _SHIFT13 0x20
4864 #define _CRCSHIFT13 0x20
4865 #define _SHIFT14 0x40
4866 #define _CRCSHIFT14 0x40
4867 #define _SHIFT15 0x80
4868 #define _CRCSHIFT15 0x80
4870 //==============================================================================
4872 extern __at(0x0797) __sfr CRCXOR;
4874 //==============================================================================
4875 // CRCXORL Bits
4877 extern __at(0x0797) __sfr CRCXORL;
4879 typedef union
4881 struct
4883 unsigned : 1;
4884 unsigned XOR1 : 1;
4885 unsigned XOR2 : 1;
4886 unsigned XOR3 : 1;
4887 unsigned XOR4 : 1;
4888 unsigned XOR5 : 1;
4889 unsigned XOR6 : 1;
4890 unsigned XOR7 : 1;
4893 struct
4895 unsigned : 1;
4896 unsigned CRCXOR1 : 1;
4897 unsigned CRCXOR2 : 1;
4898 unsigned CRCXOR3 : 1;
4899 unsigned CRCXOR4 : 1;
4900 unsigned CRCXOR5 : 1;
4901 unsigned CRCXOR6 : 1;
4902 unsigned CRCXOR7 : 1;
4904 } __CRCXORLbits_t;
4906 extern __at(0x0797) volatile __CRCXORLbits_t CRCXORLbits;
4908 #define _XOR1 0x02
4909 #define _CRCXOR1 0x02
4910 #define _XOR2 0x04
4911 #define _CRCXOR2 0x04
4912 #define _XOR3 0x08
4913 #define _CRCXOR3 0x08
4914 #define _XOR4 0x10
4915 #define _CRCXOR4 0x10
4916 #define _XOR5 0x20
4917 #define _CRCXOR5 0x20
4918 #define _XOR6 0x40
4919 #define _CRCXOR6 0x40
4920 #define _XOR7 0x80
4921 #define _CRCXOR7 0x80
4923 //==============================================================================
4926 //==============================================================================
4927 // CRCXORH Bits
4929 extern __at(0x0798) __sfr CRCXORH;
4931 typedef union
4933 struct
4935 unsigned XOR8 : 1;
4936 unsigned XOR9 : 1;
4937 unsigned XOR10 : 1;
4938 unsigned XOR11 : 1;
4939 unsigned XOR12 : 1;
4940 unsigned XOR13 : 1;
4941 unsigned XOR14 : 1;
4942 unsigned XOR15 : 1;
4945 struct
4947 unsigned CRCXOR8 : 1;
4948 unsigned CRCXOR9 : 1;
4949 unsigned CRCXOR10 : 1;
4950 unsigned CRCXOR11 : 1;
4951 unsigned CRCXOR12 : 1;
4952 unsigned CRCXOR13 : 1;
4953 unsigned CRCXOR14 : 1;
4954 unsigned CRCXOR15 : 1;
4956 } __CRCXORHbits_t;
4958 extern __at(0x0798) volatile __CRCXORHbits_t CRCXORHbits;
4960 #define _XOR8 0x01
4961 #define _CRCXOR8 0x01
4962 #define _XOR9 0x02
4963 #define _CRCXOR9 0x02
4964 #define _XOR10 0x04
4965 #define _CRCXOR10 0x04
4966 #define _XOR11 0x08
4967 #define _CRCXOR11 0x08
4968 #define _XOR12 0x10
4969 #define _CRCXOR12 0x10
4970 #define _XOR13 0x20
4971 #define _CRCXOR13 0x20
4972 #define _XOR14 0x40
4973 #define _CRCXOR14 0x40
4974 #define _XOR15 0x80
4975 #define _CRCXOR15 0x80
4977 //==============================================================================
4980 //==============================================================================
4981 // CRCCON0 Bits
4983 extern __at(0x0799) __sfr CRCCON0;
4985 typedef union
4987 struct
4989 unsigned FULL : 1;
4990 unsigned SHIFTM : 1;
4991 unsigned : 1;
4992 unsigned : 1;
4993 unsigned ACCM : 1;
4994 unsigned BUSY : 1;
4995 unsigned CRCGO : 1;
4996 unsigned EN : 1;
4999 struct
5001 unsigned CRCFULL : 1;
5002 unsigned CRCSHIFTM : 1;
5003 unsigned : 1;
5004 unsigned : 1;
5005 unsigned CRCACCM : 1;
5006 unsigned CRCBUSY : 1;
5007 unsigned : 1;
5008 unsigned CRCEN : 1;
5010 } __CRCCON0bits_t;
5012 extern __at(0x0799) volatile __CRCCON0bits_t CRCCON0bits;
5014 #define _CRCCON0_FULL 0x01
5015 #define _CRCCON0_CRCFULL 0x01
5016 #define _CRCCON0_SHIFTM 0x02
5017 #define _CRCCON0_CRCSHIFTM 0x02
5018 #define _CRCCON0_ACCM 0x10
5019 #define _CRCCON0_CRCACCM 0x10
5020 #define _CRCCON0_BUSY 0x20
5021 #define _CRCCON0_CRCBUSY 0x20
5022 #define _CRCCON0_CRCGO 0x40
5023 #define _CRCCON0_EN 0x80
5024 #define _CRCCON0_CRCEN 0x80
5026 //==============================================================================
5029 //==============================================================================
5030 // CRCCON1 Bits
5032 extern __at(0x079A) __sfr CRCCON1;
5034 typedef union
5036 struct
5038 unsigned PLEN0 : 1;
5039 unsigned PLEN1 : 1;
5040 unsigned PLEN2 : 1;
5041 unsigned PLEN3 : 1;
5042 unsigned DLEN0 : 1;
5043 unsigned DLEN1 : 1;
5044 unsigned DLEN2 : 1;
5045 unsigned DLEN3 : 1;
5048 struct
5050 unsigned CRCPLEN0 : 1;
5051 unsigned CRCPLEN1 : 1;
5052 unsigned CRCPLEN2 : 1;
5053 unsigned CRCPLEN3 : 1;
5054 unsigned CRCDLEN0 : 1;
5055 unsigned CRCDLEN1 : 1;
5056 unsigned CRCDLEN2 : 1;
5057 unsigned CRCDLEN3 : 1;
5060 struct
5062 unsigned PLEN : 4;
5063 unsigned : 4;
5066 struct
5068 unsigned CRCPLEN : 4;
5069 unsigned : 4;
5072 struct
5074 unsigned : 4;
5075 unsigned CRCDLEN : 4;
5078 struct
5080 unsigned : 4;
5081 unsigned DLEN : 4;
5083 } __CRCCON1bits_t;
5085 extern __at(0x079A) volatile __CRCCON1bits_t CRCCON1bits;
5087 #define _PLEN0 0x01
5088 #define _CRCPLEN0 0x01
5089 #define _PLEN1 0x02
5090 #define _CRCPLEN1 0x02
5091 #define _PLEN2 0x04
5092 #define _CRCPLEN2 0x04
5093 #define _PLEN3 0x08
5094 #define _CRCPLEN3 0x08
5095 #define _DLEN0 0x10
5096 #define _CRCDLEN0 0x10
5097 #define _DLEN1 0x20
5098 #define _CRCDLEN1 0x20
5099 #define _DLEN2 0x40
5100 #define _CRCDLEN2 0x40
5101 #define _DLEN3 0x80
5102 #define _CRCDLEN3 0x80
5104 //==============================================================================
5106 extern __at(0x0D8C) __sfr SMT1TMR;
5108 //==============================================================================
5109 // SMT1TMRL Bits
5111 extern __at(0x0D8C) __sfr SMT1TMRL;
5113 typedef struct
5115 unsigned SMT1TMR0 : 1;
5116 unsigned SMT1TMR1 : 1;
5117 unsigned SMT1TMR2 : 1;
5118 unsigned SMT1TMR3 : 1;
5119 unsigned SMT1TMR4 : 1;
5120 unsigned SMT1TMR5 : 1;
5121 unsigned SMT1TMR6 : 1;
5122 unsigned SMT1TMR7 : 1;
5123 } __SMT1TMRLbits_t;
5125 extern __at(0x0D8C) volatile __SMT1TMRLbits_t SMT1TMRLbits;
5127 #define _SMT1TMR0 0x01
5128 #define _SMT1TMR1 0x02
5129 #define _SMT1TMR2 0x04
5130 #define _SMT1TMR3 0x08
5131 #define _SMT1TMR4 0x10
5132 #define _SMT1TMR5 0x20
5133 #define _SMT1TMR6 0x40
5134 #define _SMT1TMR7 0x80
5136 //==============================================================================
5139 //==============================================================================
5140 // SMT1TMRH Bits
5142 extern __at(0x0D8D) __sfr SMT1TMRH;
5144 typedef struct
5146 unsigned SMT1TMR8 : 1;
5147 unsigned SMT1TMR9 : 1;
5148 unsigned SMT1TMR10 : 1;
5149 unsigned SMT1TMR11 : 1;
5150 unsigned SMT1TMR12 : 1;
5151 unsigned SMT1TMR13 : 1;
5152 unsigned SMT1TMR14 : 1;
5153 unsigned SMT1TMR15 : 1;
5154 } __SMT1TMRHbits_t;
5156 extern __at(0x0D8D) volatile __SMT1TMRHbits_t SMT1TMRHbits;
5158 #define _SMT1TMR8 0x01
5159 #define _SMT1TMR9 0x02
5160 #define _SMT1TMR10 0x04
5161 #define _SMT1TMR11 0x08
5162 #define _SMT1TMR12 0x10
5163 #define _SMT1TMR13 0x20
5164 #define _SMT1TMR14 0x40
5165 #define _SMT1TMR15 0x80
5167 //==============================================================================
5170 //==============================================================================
5171 // SMT1TMRU Bits
5173 extern __at(0x0D8E) __sfr SMT1TMRU;
5175 typedef struct
5177 unsigned SMT1TMR16 : 1;
5178 unsigned SMT1TMR17 : 1;
5179 unsigned SMT1TMR18 : 1;
5180 unsigned SMT1TMR19 : 1;
5181 unsigned SMT1TMR20 : 1;
5182 unsigned SMT1TMR21 : 1;
5183 unsigned SMT1TMR22 : 1;
5184 unsigned SMT1TMR23 : 1;
5185 } __SMT1TMRUbits_t;
5187 extern __at(0x0D8E) volatile __SMT1TMRUbits_t SMT1TMRUbits;
5189 #define _SMT1TMR16 0x01
5190 #define _SMT1TMR17 0x02
5191 #define _SMT1TMR18 0x04
5192 #define _SMT1TMR19 0x08
5193 #define _SMT1TMR20 0x10
5194 #define _SMT1TMR21 0x20
5195 #define _SMT1TMR22 0x40
5196 #define _SMT1TMR23 0x80
5198 //==============================================================================
5200 extern __at(0x0D8F) __sfr SMT1CPR;
5202 //==============================================================================
5203 // SMT1CPRL Bits
5205 extern __at(0x0D8F) __sfr SMT1CPRL;
5207 typedef struct
5209 unsigned SMT1CPR0 : 1;
5210 unsigned SMT1CPR1 : 1;
5211 unsigned SMT1CPR2 : 1;
5212 unsigned SMT1CPR3 : 1;
5213 unsigned SMT1CPR4 : 1;
5214 unsigned SMT1CPR5 : 1;
5215 unsigned SMT1CPR6 : 1;
5216 unsigned SMT1CPR7 : 1;
5217 } __SMT1CPRLbits_t;
5219 extern __at(0x0D8F) volatile __SMT1CPRLbits_t SMT1CPRLbits;
5221 #define _SMT1CPR0 0x01
5222 #define _SMT1CPR1 0x02
5223 #define _SMT1CPR2 0x04
5224 #define _SMT1CPR3 0x08
5225 #define _SMT1CPR4 0x10
5226 #define _SMT1CPR5 0x20
5227 #define _SMT1CPR6 0x40
5228 #define _SMT1CPR7 0x80
5230 //==============================================================================
5233 //==============================================================================
5234 // SMT1CPRH Bits
5236 extern __at(0x0D90) __sfr SMT1CPRH;
5238 typedef struct
5240 unsigned SMT1CPR8 : 1;
5241 unsigned SMT1CPR9 : 1;
5242 unsigned SMT1CPR10 : 1;
5243 unsigned SMT1CPR11 : 1;
5244 unsigned SMT1CPR12 : 1;
5245 unsigned SMT1CPR13 : 1;
5246 unsigned SMT1CPR14 : 1;
5247 unsigned SMT1CPR15 : 1;
5248 } __SMT1CPRHbits_t;
5250 extern __at(0x0D90) volatile __SMT1CPRHbits_t SMT1CPRHbits;
5252 #define _SMT1CPR8 0x01
5253 #define _SMT1CPR9 0x02
5254 #define _SMT1CPR10 0x04
5255 #define _SMT1CPR11 0x08
5256 #define _SMT1CPR12 0x10
5257 #define _SMT1CPR13 0x20
5258 #define _SMT1CPR14 0x40
5259 #define _SMT1CPR15 0x80
5261 //==============================================================================
5264 //==============================================================================
5265 // SMT1CPRU Bits
5267 extern __at(0x0D91) __sfr SMT1CPRU;
5269 typedef struct
5271 unsigned SMT1CPR16 : 1;
5272 unsigned SMT1CPR17 : 1;
5273 unsigned SMT1CPR18 : 1;
5274 unsigned SMT1CPR19 : 1;
5275 unsigned SMT1CPR20 : 1;
5276 unsigned SMT1CPR21 : 1;
5277 unsigned SMT1CPR22 : 1;
5278 unsigned SMT1CPR23 : 1;
5279 } __SMT1CPRUbits_t;
5281 extern __at(0x0D91) volatile __SMT1CPRUbits_t SMT1CPRUbits;
5283 #define _SMT1CPR16 0x01
5284 #define _SMT1CPR17 0x02
5285 #define _SMT1CPR18 0x04
5286 #define _SMT1CPR19 0x08
5287 #define _SMT1CPR20 0x10
5288 #define _SMT1CPR21 0x20
5289 #define _SMT1CPR22 0x40
5290 #define _SMT1CPR23 0x80
5292 //==============================================================================
5294 extern __at(0x0D92) __sfr SMT1CPW;
5296 //==============================================================================
5297 // SMT1CPWL Bits
5299 extern __at(0x0D92) __sfr SMT1CPWL;
5301 typedef struct
5303 unsigned SMT1CPW0 : 1;
5304 unsigned SMT1CPW1 : 1;
5305 unsigned SMT1CPW2 : 1;
5306 unsigned SMT1CPW3 : 1;
5307 unsigned SMT1CPW4 : 1;
5308 unsigned SMT1CPW5 : 1;
5309 unsigned SMT1CPW6 : 1;
5310 unsigned SMT1CPW7 : 1;
5311 } __SMT1CPWLbits_t;
5313 extern __at(0x0D92) volatile __SMT1CPWLbits_t SMT1CPWLbits;
5315 #define _SMT1CPW0 0x01
5316 #define _SMT1CPW1 0x02
5317 #define _SMT1CPW2 0x04
5318 #define _SMT1CPW3 0x08
5319 #define _SMT1CPW4 0x10
5320 #define _SMT1CPW5 0x20
5321 #define _SMT1CPW6 0x40
5322 #define _SMT1CPW7 0x80
5324 //==============================================================================
5327 //==============================================================================
5328 // SMT1CPWH Bits
5330 extern __at(0x0D93) __sfr SMT1CPWH;
5332 typedef struct
5334 unsigned SMT1CPW8 : 1;
5335 unsigned SMT1CPW9 : 1;
5336 unsigned SMT1CPW10 : 1;
5337 unsigned SMT1CPW11 : 1;
5338 unsigned SMT1CPW12 : 1;
5339 unsigned SMT1CPW13 : 1;
5340 unsigned SMT1CPW14 : 1;
5341 unsigned SMT1CPW15 : 1;
5342 } __SMT1CPWHbits_t;
5344 extern __at(0x0D93) volatile __SMT1CPWHbits_t SMT1CPWHbits;
5346 #define _SMT1CPW8 0x01
5347 #define _SMT1CPW9 0x02
5348 #define _SMT1CPW10 0x04
5349 #define _SMT1CPW11 0x08
5350 #define _SMT1CPW12 0x10
5351 #define _SMT1CPW13 0x20
5352 #define _SMT1CPW14 0x40
5353 #define _SMT1CPW15 0x80
5355 //==============================================================================
5358 //==============================================================================
5359 // SMT1CPWU Bits
5361 extern __at(0x0D94) __sfr SMT1CPWU;
5363 typedef struct
5365 unsigned SMT1CPW16 : 1;
5366 unsigned SMT1CPW17 : 1;
5367 unsigned SMT1CPW18 : 1;
5368 unsigned SMT1CPW19 : 1;
5369 unsigned SMT1CPW20 : 1;
5370 unsigned SMT1CPW21 : 1;
5371 unsigned SMT1CPW22 : 1;
5372 unsigned SMT1CPW23 : 1;
5373 } __SMT1CPWUbits_t;
5375 extern __at(0x0D94) volatile __SMT1CPWUbits_t SMT1CPWUbits;
5377 #define _SMT1CPW16 0x01
5378 #define _SMT1CPW17 0x02
5379 #define _SMT1CPW18 0x04
5380 #define _SMT1CPW19 0x08
5381 #define _SMT1CPW20 0x10
5382 #define _SMT1CPW21 0x20
5383 #define _SMT1CPW22 0x40
5384 #define _SMT1CPW23 0x80
5386 //==============================================================================
5388 extern __at(0x0D95) __sfr SMT1PR;
5390 //==============================================================================
5391 // SMT1PRL Bits
5393 extern __at(0x0D95) __sfr SMT1PRL;
5395 typedef struct
5397 unsigned SMT1PR0 : 1;
5398 unsigned SMT1PR1 : 1;
5399 unsigned SMT1PR2 : 1;
5400 unsigned SMT1PR3 : 1;
5401 unsigned SMT1PR4 : 1;
5402 unsigned SMT1PR5 : 1;
5403 unsigned SMT1PR6 : 1;
5404 unsigned SMT1PR7 : 1;
5405 } __SMT1PRLbits_t;
5407 extern __at(0x0D95) volatile __SMT1PRLbits_t SMT1PRLbits;
5409 #define _SMT1PR0 0x01
5410 #define _SMT1PR1 0x02
5411 #define _SMT1PR2 0x04
5412 #define _SMT1PR3 0x08
5413 #define _SMT1PR4 0x10
5414 #define _SMT1PR5 0x20
5415 #define _SMT1PR6 0x40
5416 #define _SMT1PR7 0x80
5418 //==============================================================================
5421 //==============================================================================
5422 // SMT1PRH Bits
5424 extern __at(0x0D96) __sfr SMT1PRH;
5426 typedef struct
5428 unsigned SMT1PR8 : 1;
5429 unsigned SMT1PR9 : 1;
5430 unsigned SMT1PR10 : 1;
5431 unsigned SMT1PR11 : 1;
5432 unsigned SMT1PR12 : 1;
5433 unsigned SMT1PR13 : 1;
5434 unsigned SMT1PR14 : 1;
5435 unsigned SMT1PR15 : 1;
5436 } __SMT1PRHbits_t;
5438 extern __at(0x0D96) volatile __SMT1PRHbits_t SMT1PRHbits;
5440 #define _SMT1PR8 0x01
5441 #define _SMT1PR9 0x02
5442 #define _SMT1PR10 0x04
5443 #define _SMT1PR11 0x08
5444 #define _SMT1PR12 0x10
5445 #define _SMT1PR13 0x20
5446 #define _SMT1PR14 0x40
5447 #define _SMT1PR15 0x80
5449 //==============================================================================
5452 //==============================================================================
5453 // SMT1PRU Bits
5455 extern __at(0x0D97) __sfr SMT1PRU;
5457 typedef struct
5459 unsigned SMT1PR16 : 1;
5460 unsigned SMT1PR17 : 1;
5461 unsigned SMT1PR18 : 1;
5462 unsigned SMT1PR19 : 1;
5463 unsigned SMT1PR20 : 1;
5464 unsigned SMT1PR21 : 1;
5465 unsigned SMT1PR22 : 1;
5466 unsigned SMT1PR23 : 1;
5467 } __SMT1PRUbits_t;
5469 extern __at(0x0D97) volatile __SMT1PRUbits_t SMT1PRUbits;
5471 #define _SMT1PR16 0x01
5472 #define _SMT1PR17 0x02
5473 #define _SMT1PR18 0x04
5474 #define _SMT1PR19 0x08
5475 #define _SMT1PR20 0x10
5476 #define _SMT1PR21 0x20
5477 #define _SMT1PR22 0x40
5478 #define _SMT1PR23 0x80
5480 //==============================================================================
5483 //==============================================================================
5484 // SMT1CON0 Bits
5486 extern __at(0x0D98) __sfr SMT1CON0;
5488 typedef union
5490 struct
5492 unsigned SMT1PS0 : 1;
5493 unsigned SMT1PS1 : 1;
5494 unsigned CPOL : 1;
5495 unsigned SPOL : 1;
5496 unsigned WPOL : 1;
5497 unsigned STP : 1;
5498 unsigned : 1;
5499 unsigned EN : 1;
5502 struct
5504 unsigned SMT1PS : 2;
5505 unsigned : 6;
5507 } __SMT1CON0bits_t;
5509 extern __at(0x0D98) volatile __SMT1CON0bits_t SMT1CON0bits;
5511 #define _SMT1CON0_SMT1PS0 0x01
5512 #define _SMT1CON0_SMT1PS1 0x02
5513 #define _SMT1CON0_CPOL 0x04
5514 #define _SMT1CON0_SPOL 0x08
5515 #define _SMT1CON0_WPOL 0x10
5516 #define _SMT1CON0_STP 0x20
5517 #define _SMT1CON0_EN 0x80
5519 //==============================================================================
5522 //==============================================================================
5523 // SMT1CON1 Bits
5525 extern __at(0x0D99) __sfr SMT1CON1;
5527 typedef union
5529 struct
5531 unsigned MODE0 : 1;
5532 unsigned MODE1 : 1;
5533 unsigned MODE2 : 1;
5534 unsigned MODE3 : 1;
5535 unsigned : 1;
5536 unsigned : 1;
5537 unsigned REPEAT : 1;
5538 unsigned SMT1GO : 1;
5541 struct
5543 unsigned SMT1MODE0 : 1;
5544 unsigned SMT1MODE1 : 1;
5545 unsigned SMT1MODE2 : 1;
5546 unsigned SMT1MODE3 : 1;
5547 unsigned : 1;
5548 unsigned : 1;
5549 unsigned SMT1REPEAT : 1;
5550 unsigned : 1;
5553 struct
5555 unsigned SMT1MODE : 4;
5556 unsigned : 4;
5559 struct
5561 unsigned MODE : 4;
5562 unsigned : 4;
5564 } __SMT1CON1bits_t;
5566 extern __at(0x0D99) volatile __SMT1CON1bits_t SMT1CON1bits;
5568 #define _SMT1CON1_MODE0 0x01
5569 #define _SMT1CON1_SMT1MODE0 0x01
5570 #define _SMT1CON1_MODE1 0x02
5571 #define _SMT1CON1_SMT1MODE1 0x02
5572 #define _SMT1CON1_MODE2 0x04
5573 #define _SMT1CON1_SMT1MODE2 0x04
5574 #define _SMT1CON1_MODE3 0x08
5575 #define _SMT1CON1_SMT1MODE3 0x08
5576 #define _SMT1CON1_REPEAT 0x40
5577 #define _SMT1CON1_SMT1REPEAT 0x40
5578 #define _SMT1CON1_SMT1GO 0x80
5580 //==============================================================================
5583 //==============================================================================
5584 // SMT1STAT Bits
5586 extern __at(0x0D9A) __sfr SMT1STAT;
5588 typedef union
5590 struct
5592 unsigned AS : 1;
5593 unsigned WS : 1;
5594 unsigned TS : 1;
5595 unsigned : 1;
5596 unsigned : 1;
5597 unsigned RST : 1;
5598 unsigned CPWUP : 1;
5599 unsigned CPRUP : 1;
5602 struct
5604 unsigned SMT1AS : 1;
5605 unsigned SMT1WS : 1;
5606 unsigned SMT1TS : 1;
5607 unsigned : 1;
5608 unsigned : 1;
5609 unsigned SMT1RESET : 1;
5610 unsigned SMT1CPWUP : 1;
5611 unsigned SMT1CPRUP : 1;
5613 } __SMT1STATbits_t;
5615 extern __at(0x0D9A) volatile __SMT1STATbits_t SMT1STATbits;
5617 #define _AS 0x01
5618 #define _SMT1AS 0x01
5619 #define _WS 0x02
5620 #define _SMT1WS 0x02
5621 #define _TS 0x04
5622 #define _SMT1TS 0x04
5623 #define _RST 0x20
5624 #define _SMT1RESET 0x20
5625 #define _CPWUP 0x40
5626 #define _SMT1CPWUP 0x40
5627 #define _CPRUP 0x80
5628 #define _SMT1CPRUP 0x80
5630 //==============================================================================
5633 //==============================================================================
5634 // SMT1CLK Bits
5636 extern __at(0x0D9B) __sfr SMT1CLK;
5638 typedef union
5640 struct
5642 unsigned CSEL0 : 1;
5643 unsigned CSEL1 : 1;
5644 unsigned CSEL2 : 1;
5645 unsigned : 1;
5646 unsigned : 1;
5647 unsigned : 1;
5648 unsigned : 1;
5649 unsigned : 1;
5652 struct
5654 unsigned SMT1CSEL0 : 1;
5655 unsigned SMT1CSEL1 : 1;
5656 unsigned SMT1CSEL2 : 1;
5657 unsigned : 1;
5658 unsigned : 1;
5659 unsigned : 1;
5660 unsigned : 1;
5661 unsigned : 1;
5664 struct
5666 unsigned SMT1CSEL : 3;
5667 unsigned : 5;
5670 struct
5672 unsigned CSEL : 3;
5673 unsigned : 5;
5675 } __SMT1CLKbits_t;
5677 extern __at(0x0D9B) volatile __SMT1CLKbits_t SMT1CLKbits;
5679 #define _CSEL0 0x01
5680 #define _SMT1CSEL0 0x01
5681 #define _CSEL1 0x02
5682 #define _SMT1CSEL1 0x02
5683 #define _CSEL2 0x04
5684 #define _SMT1CSEL2 0x04
5686 //==============================================================================
5689 //==============================================================================
5690 // SMT1SIG Bits
5692 extern __at(0x0D9C) __sfr SMT1SIG;
5694 typedef union
5696 struct
5698 unsigned SSEL0 : 1;
5699 unsigned SSEL1 : 1;
5700 unsigned SSEL2 : 1;
5701 unsigned : 1;
5702 unsigned : 1;
5703 unsigned : 1;
5704 unsigned : 1;
5705 unsigned : 1;
5708 struct
5710 unsigned SMT1SSEL0 : 1;
5711 unsigned SMT1SSEL1 : 1;
5712 unsigned SMT1SSEL2 : 1;
5713 unsigned : 1;
5714 unsigned : 1;
5715 unsigned : 1;
5716 unsigned : 1;
5717 unsigned : 1;
5720 struct
5722 unsigned SMT1SSEL : 3;
5723 unsigned : 5;
5726 struct
5728 unsigned SSEL : 3;
5729 unsigned : 5;
5731 } __SMT1SIGbits_t;
5733 extern __at(0x0D9C) volatile __SMT1SIGbits_t SMT1SIGbits;
5735 #define _SSEL0 0x01
5736 #define _SMT1SSEL0 0x01
5737 #define _SSEL1 0x02
5738 #define _SMT1SSEL1 0x02
5739 #define _SSEL2 0x04
5740 #define _SMT1SSEL2 0x04
5742 //==============================================================================
5745 //==============================================================================
5746 // SMT1WIN Bits
5748 extern __at(0x0D9D) __sfr SMT1WIN;
5750 typedef union
5752 struct
5754 unsigned WSEL0 : 1;
5755 unsigned WSEL1 : 1;
5756 unsigned WSEL2 : 1;
5757 unsigned WSEL3 : 1;
5758 unsigned : 1;
5759 unsigned : 1;
5760 unsigned : 1;
5761 unsigned : 1;
5764 struct
5766 unsigned SMT1WSEL0 : 1;
5767 unsigned SMT1WSEL1 : 1;
5768 unsigned SMT1WSEL2 : 1;
5769 unsigned SMT1WSEL3 : 1;
5770 unsigned : 1;
5771 unsigned : 1;
5772 unsigned : 1;
5773 unsigned : 1;
5776 struct
5778 unsigned WSEL : 4;
5779 unsigned : 4;
5782 struct
5784 unsigned SMT1WSEL : 4;
5785 unsigned : 4;
5787 } __SMT1WINbits_t;
5789 extern __at(0x0D9D) volatile __SMT1WINbits_t SMT1WINbits;
5791 #define _WSEL0 0x01
5792 #define _SMT1WSEL0 0x01
5793 #define _WSEL1 0x02
5794 #define _SMT1WSEL1 0x02
5795 #define _WSEL2 0x04
5796 #define _SMT1WSEL2 0x04
5797 #define _WSEL3 0x08
5798 #define _SMT1WSEL3 0x08
5800 //==============================================================================
5802 extern __at(0x0D9E) __sfr SMT2TMR;
5804 //==============================================================================
5805 // SMT2TMRL Bits
5807 extern __at(0x0D9E) __sfr SMT2TMRL;
5809 typedef struct
5811 unsigned SMT2TMR0 : 1;
5812 unsigned SMT2TMR1 : 1;
5813 unsigned SMT2TMR2 : 1;
5814 unsigned SMT2TMR3 : 1;
5815 unsigned SMT2TMR4 : 1;
5816 unsigned SMT2TMR5 : 1;
5817 unsigned SMT2TMR6 : 1;
5818 unsigned SMT2TMR7 : 1;
5819 } __SMT2TMRLbits_t;
5821 extern __at(0x0D9E) volatile __SMT2TMRLbits_t SMT2TMRLbits;
5823 #define _SMT2TMR0 0x01
5824 #define _SMT2TMR1 0x02
5825 #define _SMT2TMR2 0x04
5826 #define _SMT2TMR3 0x08
5827 #define _SMT2TMR4 0x10
5828 #define _SMT2TMR5 0x20
5829 #define _SMT2TMR6 0x40
5830 #define _SMT2TMR7 0x80
5832 //==============================================================================
5835 //==============================================================================
5836 // SMT2TMRH Bits
5838 extern __at(0x0D9F) __sfr SMT2TMRH;
5840 typedef struct
5842 unsigned SMT2TMR8 : 1;
5843 unsigned SMT2TMR9 : 1;
5844 unsigned SMT2TMR10 : 1;
5845 unsigned SMT2TMR11 : 1;
5846 unsigned SMT2TMR12 : 1;
5847 unsigned SMT2TMR13 : 1;
5848 unsigned SMT2TMR14 : 1;
5849 unsigned SMT2TMR15 : 1;
5850 } __SMT2TMRHbits_t;
5852 extern __at(0x0D9F) volatile __SMT2TMRHbits_t SMT2TMRHbits;
5854 #define _SMT2TMR8 0x01
5855 #define _SMT2TMR9 0x02
5856 #define _SMT2TMR10 0x04
5857 #define _SMT2TMR11 0x08
5858 #define _SMT2TMR12 0x10
5859 #define _SMT2TMR13 0x20
5860 #define _SMT2TMR14 0x40
5861 #define _SMT2TMR15 0x80
5863 //==============================================================================
5866 //==============================================================================
5867 // SMT2TMRU Bits
5869 extern __at(0x0DA0) __sfr SMT2TMRU;
5871 typedef struct
5873 unsigned SMT2TMR16 : 1;
5874 unsigned SMT2TMR17 : 1;
5875 unsigned SMT2TMR18 : 1;
5876 unsigned SMT2TMR19 : 1;
5877 unsigned SMT2TMR20 : 1;
5878 unsigned SMT2TMR21 : 1;
5879 unsigned SMT2TMR22 : 1;
5880 unsigned SMT2TMR23 : 1;
5881 } __SMT2TMRUbits_t;
5883 extern __at(0x0DA0) volatile __SMT2TMRUbits_t SMT2TMRUbits;
5885 #define _SMT2TMR16 0x01
5886 #define _SMT2TMR17 0x02
5887 #define _SMT2TMR18 0x04
5888 #define _SMT2TMR19 0x08
5889 #define _SMT2TMR20 0x10
5890 #define _SMT2TMR21 0x20
5891 #define _SMT2TMR22 0x40
5892 #define _SMT2TMR23 0x80
5894 //==============================================================================
5896 extern __at(0x0DA1) __sfr SMT2CPR;
5898 //==============================================================================
5899 // SMT2CPRL Bits
5901 extern __at(0x0DA1) __sfr SMT2CPRL;
5903 typedef struct
5905 unsigned SMT2CPR0 : 1;
5906 unsigned SMT2CPR1 : 1;
5907 unsigned SMT2CPR2 : 1;
5908 unsigned SMT2CPR3 : 1;
5909 unsigned SMT2CPR4 : 1;
5910 unsigned SMT2CPR5 : 1;
5911 unsigned SMT2CPR6 : 1;
5912 unsigned SMT2CPR7 : 1;
5913 } __SMT2CPRLbits_t;
5915 extern __at(0x0DA1) volatile __SMT2CPRLbits_t SMT2CPRLbits;
5917 #define _SMT2CPR0 0x01
5918 #define _SMT2CPR1 0x02
5919 #define _SMT2CPR2 0x04
5920 #define _SMT2CPR3 0x08
5921 #define _SMT2CPR4 0x10
5922 #define _SMT2CPR5 0x20
5923 #define _SMT2CPR6 0x40
5924 #define _SMT2CPR7 0x80
5926 //==============================================================================
5929 //==============================================================================
5930 // SMT2CPRH Bits
5932 extern __at(0x0DA2) __sfr SMT2CPRH;
5934 typedef struct
5936 unsigned SMT2CPR8 : 1;
5937 unsigned SMT2CPR9 : 1;
5938 unsigned SMT2CPR10 : 1;
5939 unsigned SMT2CPR11 : 1;
5940 unsigned SMT2CPR12 : 1;
5941 unsigned SMT2CPR13 : 1;
5942 unsigned SMT2CPR14 : 1;
5943 unsigned SMT2CPR15 : 1;
5944 } __SMT2CPRHbits_t;
5946 extern __at(0x0DA2) volatile __SMT2CPRHbits_t SMT2CPRHbits;
5948 #define _SMT2CPR8 0x01
5949 #define _SMT2CPR9 0x02
5950 #define _SMT2CPR10 0x04
5951 #define _SMT2CPR11 0x08
5952 #define _SMT2CPR12 0x10
5953 #define _SMT2CPR13 0x20
5954 #define _SMT2CPR14 0x40
5955 #define _SMT2CPR15 0x80
5957 //==============================================================================
5960 //==============================================================================
5961 // SMT2CPRU Bits
5963 extern __at(0x0DA3) __sfr SMT2CPRU;
5965 typedef struct
5967 unsigned SMT2CPR16 : 1;
5968 unsigned SMT2CPR17 : 1;
5969 unsigned SMT2CPR18 : 1;
5970 unsigned SMT2CPR19 : 1;
5971 unsigned SMT2CPR20 : 1;
5972 unsigned SMT2CPR21 : 1;
5973 unsigned SMT2CPR22 : 1;
5974 unsigned SMT2CPR23 : 1;
5975 } __SMT2CPRUbits_t;
5977 extern __at(0x0DA3) volatile __SMT2CPRUbits_t SMT2CPRUbits;
5979 #define _SMT2CPR16 0x01
5980 #define _SMT2CPR17 0x02
5981 #define _SMT2CPR18 0x04
5982 #define _SMT2CPR19 0x08
5983 #define _SMT2CPR20 0x10
5984 #define _SMT2CPR21 0x20
5985 #define _SMT2CPR22 0x40
5986 #define _SMT2CPR23 0x80
5988 //==============================================================================
5990 extern __at(0x0DA4) __sfr SMT2CPW;
5992 //==============================================================================
5993 // SMT2CPWL Bits
5995 extern __at(0x0DA4) __sfr SMT2CPWL;
5997 typedef struct
5999 unsigned SMT2CPW0 : 1;
6000 unsigned SMT2CPW1 : 1;
6001 unsigned SMT2CPW2 : 1;
6002 unsigned SMT2CPW3 : 1;
6003 unsigned SMT2CPW4 : 1;
6004 unsigned SMT2CPW5 : 1;
6005 unsigned SMT2CPW6 : 1;
6006 unsigned SMT2CPW7 : 1;
6007 } __SMT2CPWLbits_t;
6009 extern __at(0x0DA4) volatile __SMT2CPWLbits_t SMT2CPWLbits;
6011 #define _SMT2CPW0 0x01
6012 #define _SMT2CPW1 0x02
6013 #define _SMT2CPW2 0x04
6014 #define _SMT2CPW3 0x08
6015 #define _SMT2CPW4 0x10
6016 #define _SMT2CPW5 0x20
6017 #define _SMT2CPW6 0x40
6018 #define _SMT2CPW7 0x80
6020 //==============================================================================
6023 //==============================================================================
6024 // SMT2CPWH Bits
6026 extern __at(0x0DA5) __sfr SMT2CPWH;
6028 typedef struct
6030 unsigned SMT2CPW8 : 1;
6031 unsigned SMT2CPW9 : 1;
6032 unsigned SMT2CPW10 : 1;
6033 unsigned SMT2CPW11 : 1;
6034 unsigned SMT2CPW12 : 1;
6035 unsigned SMT2CPW13 : 1;
6036 unsigned SMT2CPW14 : 1;
6037 unsigned SMT2CPW15 : 1;
6038 } __SMT2CPWHbits_t;
6040 extern __at(0x0DA5) volatile __SMT2CPWHbits_t SMT2CPWHbits;
6042 #define _SMT2CPW8 0x01
6043 #define _SMT2CPW9 0x02
6044 #define _SMT2CPW10 0x04
6045 #define _SMT2CPW11 0x08
6046 #define _SMT2CPW12 0x10
6047 #define _SMT2CPW13 0x20
6048 #define _SMT2CPW14 0x40
6049 #define _SMT2CPW15 0x80
6051 //==============================================================================
6054 //==============================================================================
6055 // SMT2CPWU Bits
6057 extern __at(0x0DA6) __sfr SMT2CPWU;
6059 typedef struct
6061 unsigned SMT2CPW16 : 1;
6062 unsigned SMT2CPW17 : 1;
6063 unsigned SMT2CPW18 : 1;
6064 unsigned SMT2CPW19 : 1;
6065 unsigned SMT2CPW20 : 1;
6066 unsigned SMT2CPW21 : 1;
6067 unsigned SMT2CPW22 : 1;
6068 unsigned SMT2CPW23 : 1;
6069 } __SMT2CPWUbits_t;
6071 extern __at(0x0DA6) volatile __SMT2CPWUbits_t SMT2CPWUbits;
6073 #define _SMT2CPW16 0x01
6074 #define _SMT2CPW17 0x02
6075 #define _SMT2CPW18 0x04
6076 #define _SMT2CPW19 0x08
6077 #define _SMT2CPW20 0x10
6078 #define _SMT2CPW21 0x20
6079 #define _SMT2CPW22 0x40
6080 #define _SMT2CPW23 0x80
6082 //==============================================================================
6084 extern __at(0x0DA7) __sfr SMT2PR;
6086 //==============================================================================
6087 // SMT2PRL Bits
6089 extern __at(0x0DA7) __sfr SMT2PRL;
6091 typedef struct
6093 unsigned SMT2PR0 : 1;
6094 unsigned SMT2PR1 : 1;
6095 unsigned SMT2PR2 : 1;
6096 unsigned SMT2PR3 : 1;
6097 unsigned SMT2PR4 : 1;
6098 unsigned SMT2PR5 : 1;
6099 unsigned SMT2PR6 : 1;
6100 unsigned SMT2PR7 : 1;
6101 } __SMT2PRLbits_t;
6103 extern __at(0x0DA7) volatile __SMT2PRLbits_t SMT2PRLbits;
6105 #define _SMT2PR0 0x01
6106 #define _SMT2PR1 0x02
6107 #define _SMT2PR2 0x04
6108 #define _SMT2PR3 0x08
6109 #define _SMT2PR4 0x10
6110 #define _SMT2PR5 0x20
6111 #define _SMT2PR6 0x40
6112 #define _SMT2PR7 0x80
6114 //==============================================================================
6117 //==============================================================================
6118 // SMT2PRH Bits
6120 extern __at(0x0DA8) __sfr SMT2PRH;
6122 typedef struct
6124 unsigned SMT2PR8 : 1;
6125 unsigned SMT2PR9 : 1;
6126 unsigned SMT2PR10 : 1;
6127 unsigned SMT2PR11 : 1;
6128 unsigned SMT2PR12 : 1;
6129 unsigned SMT2PR13 : 1;
6130 unsigned SMT2PR14 : 1;
6131 unsigned SMT2PR15 : 1;
6132 } __SMT2PRHbits_t;
6134 extern __at(0x0DA8) volatile __SMT2PRHbits_t SMT2PRHbits;
6136 #define _SMT2PR8 0x01
6137 #define _SMT2PR9 0x02
6138 #define _SMT2PR10 0x04
6139 #define _SMT2PR11 0x08
6140 #define _SMT2PR12 0x10
6141 #define _SMT2PR13 0x20
6142 #define _SMT2PR14 0x40
6143 #define _SMT2PR15 0x80
6145 //==============================================================================
6148 //==============================================================================
6149 // SMT2PRU Bits
6151 extern __at(0x0DA9) __sfr SMT2PRU;
6153 typedef struct
6155 unsigned SMT2PR16 : 1;
6156 unsigned SMT2PR17 : 1;
6157 unsigned SMT2PR18 : 1;
6158 unsigned SMT2PR19 : 1;
6159 unsigned SMT2PR20 : 1;
6160 unsigned SMT2PR21 : 1;
6161 unsigned SMT2PR22 : 1;
6162 unsigned SMT2PR23 : 1;
6163 } __SMT2PRUbits_t;
6165 extern __at(0x0DA9) volatile __SMT2PRUbits_t SMT2PRUbits;
6167 #define _SMT2PR16 0x01
6168 #define _SMT2PR17 0x02
6169 #define _SMT2PR18 0x04
6170 #define _SMT2PR19 0x08
6171 #define _SMT2PR20 0x10
6172 #define _SMT2PR21 0x20
6173 #define _SMT2PR22 0x40
6174 #define _SMT2PR23 0x80
6176 //==============================================================================
6179 //==============================================================================
6180 // SMT2CON0 Bits
6182 extern __at(0x0DAA) __sfr SMT2CON0;
6184 typedef union
6186 struct
6188 unsigned SMT2PS0 : 1;
6189 unsigned SMT2PS1 : 1;
6190 unsigned CPOL : 1;
6191 unsigned SPOL : 1;
6192 unsigned WPOL : 1;
6193 unsigned STP : 1;
6194 unsigned : 1;
6195 unsigned EN : 1;
6198 struct
6200 unsigned SMT2PS : 2;
6201 unsigned : 6;
6203 } __SMT2CON0bits_t;
6205 extern __at(0x0DAA) volatile __SMT2CON0bits_t SMT2CON0bits;
6207 #define _SMT2CON0_SMT2PS0 0x01
6208 #define _SMT2CON0_SMT2PS1 0x02
6209 #define _SMT2CON0_CPOL 0x04
6210 #define _SMT2CON0_SPOL 0x08
6211 #define _SMT2CON0_WPOL 0x10
6212 #define _SMT2CON0_STP 0x20
6213 #define _SMT2CON0_EN 0x80
6215 //==============================================================================
6218 //==============================================================================
6219 // SMT2CON1 Bits
6221 extern __at(0x0DAB) __sfr SMT2CON1;
6223 typedef union
6225 struct
6227 unsigned MODE0 : 1;
6228 unsigned MODE1 : 1;
6229 unsigned MODE2 : 1;
6230 unsigned MODE3 : 1;
6231 unsigned : 1;
6232 unsigned : 1;
6233 unsigned REPEAT : 1;
6234 unsigned SMT2GO : 1;
6237 struct
6239 unsigned SMT2MODE0 : 1;
6240 unsigned SMT2MODE1 : 1;
6241 unsigned SMT2MODE2 : 1;
6242 unsigned SMT2MODE3 : 1;
6243 unsigned : 1;
6244 unsigned : 1;
6245 unsigned SMT2REPEAT : 1;
6246 unsigned : 1;
6249 struct
6251 unsigned MODE : 4;
6252 unsigned : 4;
6255 struct
6257 unsigned SMT2MODE : 4;
6258 unsigned : 4;
6260 } __SMT2CON1bits_t;
6262 extern __at(0x0DAB) volatile __SMT2CON1bits_t SMT2CON1bits;
6264 #define _SMT2CON1_MODE0 0x01
6265 #define _SMT2CON1_SMT2MODE0 0x01
6266 #define _SMT2CON1_MODE1 0x02
6267 #define _SMT2CON1_SMT2MODE1 0x02
6268 #define _SMT2CON1_MODE2 0x04
6269 #define _SMT2CON1_SMT2MODE2 0x04
6270 #define _SMT2CON1_MODE3 0x08
6271 #define _SMT2CON1_SMT2MODE3 0x08
6272 #define _SMT2CON1_REPEAT 0x40
6273 #define _SMT2CON1_SMT2REPEAT 0x40
6274 #define _SMT2CON1_SMT2GO 0x80
6276 //==============================================================================
6279 //==============================================================================
6280 // SMT2STAT Bits
6282 extern __at(0x0DAC) __sfr SMT2STAT;
6284 typedef union
6286 struct
6288 unsigned AS : 1;
6289 unsigned WS : 1;
6290 unsigned TS : 1;
6291 unsigned : 1;
6292 unsigned : 1;
6293 unsigned RST : 1;
6294 unsigned CPWUP : 1;
6295 unsigned CPRUP : 1;
6298 struct
6300 unsigned SMT2AS : 1;
6301 unsigned SMT2WS : 1;
6302 unsigned SMT2TS : 1;
6303 unsigned : 1;
6304 unsigned : 1;
6305 unsigned SMT2RESET : 1;
6306 unsigned SMT2CPWUP : 1;
6307 unsigned SMT2CPRUP : 1;
6309 } __SMT2STATbits_t;
6311 extern __at(0x0DAC) volatile __SMT2STATbits_t SMT2STATbits;
6313 #define _SMT2STAT_AS 0x01
6314 #define _SMT2STAT_SMT2AS 0x01
6315 #define _SMT2STAT_WS 0x02
6316 #define _SMT2STAT_SMT2WS 0x02
6317 #define _SMT2STAT_TS 0x04
6318 #define _SMT2STAT_SMT2TS 0x04
6319 #define _SMT2STAT_RST 0x20
6320 #define _SMT2STAT_SMT2RESET 0x20
6321 #define _SMT2STAT_CPWUP 0x40
6322 #define _SMT2STAT_SMT2CPWUP 0x40
6323 #define _SMT2STAT_CPRUP 0x80
6324 #define _SMT2STAT_SMT2CPRUP 0x80
6326 //==============================================================================
6329 //==============================================================================
6330 // SMT2CLK Bits
6332 extern __at(0x0DAD) __sfr SMT2CLK;
6334 typedef union
6336 struct
6338 unsigned CSEL0 : 1;
6339 unsigned CSEL1 : 1;
6340 unsigned CSEL2 : 1;
6341 unsigned : 1;
6342 unsigned : 1;
6343 unsigned : 1;
6344 unsigned : 1;
6345 unsigned : 1;
6348 struct
6350 unsigned SMT2CSEL0 : 1;
6351 unsigned SMT2CSEL1 : 1;
6352 unsigned SMT2CSEL2 : 1;
6353 unsigned : 1;
6354 unsigned : 1;
6355 unsigned : 1;
6356 unsigned : 1;
6357 unsigned : 1;
6360 struct
6362 unsigned SMT2CSEL : 3;
6363 unsigned : 5;
6366 struct
6368 unsigned CSEL : 3;
6369 unsigned : 5;
6371 } __SMT2CLKbits_t;
6373 extern __at(0x0DAD) volatile __SMT2CLKbits_t SMT2CLKbits;
6375 #define _SMT2CLK_CSEL0 0x01
6376 #define _SMT2CLK_SMT2CSEL0 0x01
6377 #define _SMT2CLK_CSEL1 0x02
6378 #define _SMT2CLK_SMT2CSEL1 0x02
6379 #define _SMT2CLK_CSEL2 0x04
6380 #define _SMT2CLK_SMT2CSEL2 0x04
6382 //==============================================================================
6385 //==============================================================================
6386 // SMT2SIG Bits
6388 extern __at(0x0DAE) __sfr SMT2SIG;
6390 typedef union
6392 struct
6394 unsigned SSEL0 : 1;
6395 unsigned SSEL1 : 1;
6396 unsigned SSEL2 : 1;
6397 unsigned : 1;
6398 unsigned : 1;
6399 unsigned : 1;
6400 unsigned : 1;
6401 unsigned : 1;
6404 struct
6406 unsigned SMT2SSEL0 : 1;
6407 unsigned SMT2SSEL1 : 1;
6408 unsigned SMT2SSEL2 : 1;
6409 unsigned : 1;
6410 unsigned : 1;
6411 unsigned : 1;
6412 unsigned : 1;
6413 unsigned : 1;
6416 struct
6418 unsigned SSEL : 3;
6419 unsigned : 5;
6422 struct
6424 unsigned SMT2SSEL : 3;
6425 unsigned : 5;
6427 } __SMT2SIGbits_t;
6429 extern __at(0x0DAE) volatile __SMT2SIGbits_t SMT2SIGbits;
6431 #define _SMT2SIG_SSEL0 0x01
6432 #define _SMT2SIG_SMT2SSEL0 0x01
6433 #define _SMT2SIG_SSEL1 0x02
6434 #define _SMT2SIG_SMT2SSEL1 0x02
6435 #define _SMT2SIG_SSEL2 0x04
6436 #define _SMT2SIG_SMT2SSEL2 0x04
6438 //==============================================================================
6441 //==============================================================================
6442 // SMT2WIN Bits
6444 extern __at(0x0DAF) __sfr SMT2WIN;
6446 typedef union
6448 struct
6450 unsigned WSEL0 : 1;
6451 unsigned WSEL1 : 1;
6452 unsigned WSEL2 : 1;
6453 unsigned WSEL3 : 1;
6454 unsigned : 1;
6455 unsigned : 1;
6456 unsigned : 1;
6457 unsigned : 1;
6460 struct
6462 unsigned SMT2WSEL0 : 1;
6463 unsigned SMT2WSEL1 : 1;
6464 unsigned SMT2WSEL2 : 1;
6465 unsigned SMT2WSEL3 : 1;
6466 unsigned : 1;
6467 unsigned : 1;
6468 unsigned : 1;
6469 unsigned : 1;
6472 struct
6474 unsigned WSEL : 4;
6475 unsigned : 4;
6478 struct
6480 unsigned SMT2WSEL : 4;
6481 unsigned : 4;
6483 } __SMT2WINbits_t;
6485 extern __at(0x0DAF) volatile __SMT2WINbits_t SMT2WINbits;
6487 #define _SMT2WIN_WSEL0 0x01
6488 #define _SMT2WIN_SMT2WSEL0 0x01
6489 #define _SMT2WIN_WSEL1 0x02
6490 #define _SMT2WIN_SMT2WSEL1 0x02
6491 #define _SMT2WIN_WSEL2 0x04
6492 #define _SMT2WIN_SMT2WSEL2 0x04
6493 #define _SMT2WIN_WSEL3 0x08
6494 #define _SMT2WIN_SMT2WSEL3 0x08
6496 //==============================================================================
6499 //==============================================================================
6500 // STATUS_SHAD Bits
6502 extern __at(0x0FE4) __sfr STATUS_SHAD;
6504 typedef struct
6506 unsigned C_SHAD : 1;
6507 unsigned DC_SHAD : 1;
6508 unsigned Z_SHAD : 1;
6509 unsigned : 1;
6510 unsigned : 1;
6511 unsigned : 1;
6512 unsigned : 1;
6513 unsigned : 1;
6514 } __STATUS_SHADbits_t;
6516 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
6518 #define _C_SHAD 0x01
6519 #define _DC_SHAD 0x02
6520 #define _Z_SHAD 0x04
6522 //==============================================================================
6524 extern __at(0x0FE5) __sfr WREG_SHAD;
6525 extern __at(0x0FE6) __sfr BSR_SHAD;
6526 extern __at(0x0FE7) __sfr PCLATH_SHAD;
6527 extern __at(0x0FE8) __sfr FSR0L_SHAD;
6528 extern __at(0x0FE9) __sfr FSR0H_SHAD;
6529 extern __at(0x0FEA) __sfr FSR1L_SHAD;
6530 extern __at(0x0FEB) __sfr FSR1H_SHAD;
6531 extern __at(0x0FED) __sfr STKPTR;
6532 extern __at(0x0FEE) __sfr TOSL;
6533 extern __at(0x0FEF) __sfr TOSH;
6535 //==============================================================================
6537 // Configuration Bits
6539 //==============================================================================
6541 #define _CONFIG1 0x8007
6542 #define _CONFIG2 0x8008
6543 #define _CONFIG3 0x8009
6545 //----------------------------- CONFIG1 Options -------------------------------
6547 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
6548 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pins.
6549 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pins.
6550 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pins.
6551 #define _PWRTE_ON 0x3FDF // PWRT enabled.
6552 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
6553 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
6554 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
6555 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
6556 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
6557 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
6558 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
6559 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
6560 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
6561 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
6562 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
6564 //----------------------------- CONFIG2 Options -------------------------------
6566 #define _WRT_ALL 0x3FFC // 000h to 1FFFh write protected, no addresses may be modified by EECON control.
6567 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 1000h to 1FFFh may be modified by EECON control.
6568 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 1FFFh may be modified by EECON control.
6569 #define _WRT_OFF 0x3FFF // Write protection off.
6570 #define _ZCD_ON 0x3F7F // ZCD always enabled.
6571 #define _ZCD_OFF 0x3FFF // ZCD disable. ZCD can be enabled by setting the ZCDSEN bit of ZCDCON.
6572 #define _PLLEN_OFF 0x3EFF // 4x PLL is enabled when software sets the SPLLEN bit.
6573 #define _PLLEN_ON 0x3FFF // 4x PLL is always enabled.
6574 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
6575 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
6576 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
6577 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
6578 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
6579 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
6580 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
6581 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
6582 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
6583 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
6585 //----------------------------- CONFIG3 Options -------------------------------
6587 #define _WDTCPS_WDTCPS0 0x3FE0 // 1:32 (1 ms period).
6588 #define _WDTCPS_WDTCPS1 0x3FE1 // 1:64 (2 ms period).
6589 #define _WDTCPS_WDTCPS2 0x3FE2 // 1:128 (4 ms period).
6590 #define _WDTCPS_WDTCPS3 0x3FE3 // 1:256 (8 ms period).
6591 #define _WDTCPS_WDTCPS4 0x3FE4 // 1:512 (16 ms period).
6592 #define _WDTCPS_WDTCPS5 0x3FE5 // 1:1024 (32 ms period).
6593 #define _WDTCPS_WDTCPS6 0x3FE6 // 1:2048 (64 ms period).
6594 #define _WDTCPS_WDTCPS7 0x3FE7 // 1:4096 (128 ms period).
6595 #define _WDTCPS_WDTCPS8 0x3FE8 // 1:8192 (256 ms period).
6596 #define _WDTCPS_WDTCPS9 0x3FE9 // 1:16384 (512 ms period).
6597 #define _WDTCPS_WDTCPSA 0x3FEA // 1:32768 (1 s period).
6598 #define _WDTCPS_WDTCPSB 0x3FEB // 1:65536 (2 s period).
6599 #define _WDTCPS_WDTCPSC 0x3FEC // 1:131072 (4 s period).
6600 #define _WDTCPS_WDTCPSD 0x3FED // 1:262144 (8 s period).
6601 #define _WDTCPS_WDTCPSE 0x3FEE // 1:524299 (16 s period).
6602 #define _WDTCPS_WDTCPSF 0x3FEF // 1:1048576 (32 s period).
6603 #define _WDTCPS_WDTCPS10 0x3FF0 // 1:2097152 (64 s period).
6604 #define _WDTCPS_WDTCPS11 0x3FF1 // 1:4194304 (128 s period).
6605 #define _WDTCPS_WDTCPS12 0x3FF2 // 1:8388608 (256 s period).
6606 #define _WDTCPS_WDTCPS1F 0x3FFF // Software Control (WDTPS).
6607 #define _WDTE_OFF 0x3F9F // WDT disabled.
6608 #define _WDTE_SWDTEN 0x3FBF // WDT controlled by the SWDTEN bit in the WDTCON register.
6609 #define _WDTE_NSLEEP 0x3FDF // WDT enabled while running and disabled in Sleep.
6610 #define _WDTE_ON 0x3FFF // WDT enabled.
6611 #define _WDTCWS_WDTCWS125 0x38FF // 12.5 percent window open time.
6612 #define _WDTCWS_WDTCWS25 0x39FF // 25 percent window open time.
6613 #define _WDTCWS_WDTCWS375 0x3AFF // 37.5 percent window open time.
6614 #define _WDTCWS_WDTCWS50 0x3BFF // 50 percent window open time.
6615 #define _WDTCWS_WDTCWS625 0x3CFF // 62.5 percent window open time.
6616 #define _WDTCWS_WDTCWS75 0x3DFF // 75 percent window open time.
6617 #define _WDTCWS_WDTCWS100 0x3EFF // 100 percent window open time (Legacy WDT).
6618 #define _WDTCWS_WDTCWSSW 0x3FFF // Software WDT window size control (WDTWS bits).
6619 #define _WDTCCS_LFINTOSC 0x07FF // 31.0kHz LFINTOSC.
6620 #define _WDTCCS_MFINTOSC 0x0FFF // 31.25 kHz HFINTOSC (MFINTOSC).
6621 #define _WDTCCS_SWC 0x3FFF // Software control, controlled by WDTCS bits.
6623 //==============================================================================
6625 #define _DEVID1 0x8006
6627 #define _IDLOC0 0x8000
6628 #define _IDLOC1 0x8001
6629 #define _IDLOC2 0x8002
6630 #define _IDLOC3 0x8003
6632 //==============================================================================
6634 #ifndef NO_BIT_DEFINES
6636 #define ADON ADCON0bits.ADON // bit 0
6637 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
6638 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
6639 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
6640 #define CHS0 ADCON0bits.CHS0 // bit 2
6641 #define CHS1 ADCON0bits.CHS1 // bit 3
6642 #define CHS2 ADCON0bits.CHS2 // bit 4
6643 #define CHS3 ADCON0bits.CHS3 // bit 5
6644 #define CHS4 ADCON0bits.CHS4 // bit 6
6646 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
6647 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
6648 #define ADCS0 ADCON1bits.ADCS0 // bit 4
6649 #define ADCS1 ADCON1bits.ADCS1 // bit 5
6650 #define ADCS2 ADCON1bits.ADCS2 // bit 6
6651 #define ADFM ADCON1bits.ADFM // bit 7
6653 #define TRIGSEL0 ADCON2bits.TRIGSEL0 // bit 4
6654 #define TRIGSEL1 ADCON2bits.TRIGSEL1 // bit 5
6655 #define TRIGSEL2 ADCON2bits.TRIGSEL2 // bit 6
6656 #define TRIGSEL3 ADCON2bits.TRIGSEL3 // bit 7
6658 #define ANSA0 ANSELAbits.ANSA0 // bit 0
6659 #define ANSA1 ANSELAbits.ANSA1 // bit 1
6660 #define ANSA2 ANSELAbits.ANSA2 // bit 2
6661 #define ANSA4 ANSELAbits.ANSA4 // bit 4
6663 #define ANSC0 ANSELCbits.ANSC0 // bit 0
6664 #define ANSC1 ANSELCbits.ANSC1 // bit 1
6665 #define ANSC2 ANSELCbits.ANSC2 // bit 2
6666 #define ANSC3 ANSELCbits.ANSC3 // bit 3
6668 #define CCP2SEL APFCONbits.CCP2SEL // bit 1
6669 #define T1GSEL APFCONbits.T1GSEL // bit 3
6671 #define BORRDY BORCONbits.BORRDY // bit 0
6672 #define BORFS BORCONbits.BORFS // bit 6
6673 #define SBOREN BORCONbits.SBOREN // bit 7
6675 #define BSR0 BSRbits.BSR0 // bit 0
6676 #define BSR1 BSRbits.BSR1 // bit 1
6677 #define BSR2 BSRbits.BSR2 // bit 2
6678 #define BSR3 BSRbits.BSR3 // bit 3
6679 #define BSR4 BSRbits.BSR4 // bit 4
6681 #define CTS0 CCP1CAPbits.CTS0 // bit 0, shadows bit in CCP1CAPbits
6682 #define CCP1CTS0 CCP1CAPbits.CCP1CTS0 // bit 0, shadows bit in CCP1CAPbits
6683 #define CTS1 CCP1CAPbits.CTS1 // bit 1, shadows bit in CCP1CAPbits
6684 #define CCP1CTS1 CCP1CAPbits.CCP1CTS1 // bit 1, shadows bit in CCP1CAPbits
6686 #define MODE0 CCP1CONbits.MODE0 // bit 0, shadows bit in CCP1CONbits
6687 #define CCP1MODE0 CCP1CONbits.CCP1MODE0 // bit 0, shadows bit in CCP1CONbits
6688 #define MODE1 CCP1CONbits.MODE1 // bit 1, shadows bit in CCP1CONbits
6689 #define CCP1MODE1 CCP1CONbits.CCP1MODE1 // bit 1, shadows bit in CCP1CONbits
6690 #define MODE2 CCP1CONbits.MODE2 // bit 2, shadows bit in CCP1CONbits
6691 #define CCP1MODE2 CCP1CONbits.CCP1MODE2 // bit 2, shadows bit in CCP1CONbits
6692 #define MODE3 CCP1CONbits.MODE3 // bit 3, shadows bit in CCP1CONbits
6693 #define CCP1MODE3 CCP1CONbits.CCP1MODE3 // bit 3, shadows bit in CCP1CONbits
6694 #define FMT CCP1CONbits.FMT // bit 4, shadows bit in CCP1CONbits
6695 #define CCP1FMT CCP1CONbits.CCP1FMT // bit 4, shadows bit in CCP1CONbits
6696 #define OUT CCP1CONbits.OUT // bit 5, shadows bit in CCP1CONbits
6697 #define CCP1OUT CCP1CONbits.CCP1OUT // bit 5, shadows bit in CCP1CONbits
6698 #define OE CCP1CONbits.OE // bit 6, shadows bit in CCP1CONbits
6699 #define CCP1OE CCP1CONbits.CCP1OE // bit 6, shadows bit in CCP1CONbits
6700 #define EN CCP1CONbits.EN // bit 7, shadows bit in CCP1CONbits
6701 #define CCP1EN CCP1CONbits.CCP1EN // bit 7, shadows bit in CCP1CONbits
6703 #define CCP1TSEL0 CCPTMRSbits.CCP1TSEL0 // bit 0
6704 #define CCP1TSEL1 CCPTMRSbits.CCP1TSEL1 // bit 1
6705 #define CCP2TSEL0 CCPTMRSbits.CCP2TSEL0 // bit 2
6706 #define CCP2TSEL1 CCPTMRSbits.CCP2TSEL1 // bit 3
6708 #define C1SYNC CM1CON0bits.C1SYNC // bit 0
6709 #define C1HYS CM1CON0bits.C1HYS // bit 1
6710 #define C1SP CM1CON0bits.C1SP // bit 2
6711 #define C1POL CM1CON0bits.C1POL // bit 4
6712 #define C1OE CM1CON0bits.C1OE // bit 5
6713 #define C1OUT CM1CON0bits.C1OUT // bit 6
6714 #define C1ON CM1CON0bits.C1ON // bit 7
6716 #define C1NCH0 CM1CON1bits.C1NCH0 // bit 0
6717 #define C1NCH1 CM1CON1bits.C1NCH1 // bit 1
6718 #define C1NCH2 CM1CON1bits.C1NCH2 // bit 2
6719 #define C1PCH0 CM1CON1bits.C1PCH0 // bit 4
6720 #define C1PCH1 CM1CON1bits.C1PCH1 // bit 5
6721 #define C1INTN CM1CON1bits.C1INTN // bit 6
6722 #define C1INTP CM1CON1bits.C1INTP // bit 7
6724 #define C2SYNC CM2CON0bits.C2SYNC // bit 0
6725 #define C2HYS CM2CON0bits.C2HYS // bit 1
6726 #define C2SP CM2CON0bits.C2SP // bit 2
6727 #define C2POL CM2CON0bits.C2POL // bit 4
6728 #define C2OE CM2CON0bits.C2OE // bit 5
6729 #define C2OUT CM2CON0bits.C2OUT // bit 6
6730 #define C2ON CM2CON0bits.C2ON // bit 7
6732 #define C2NCH0 CM2CON1bits.C2NCH0 // bit 0
6733 #define C2NCH1 CM2CON1bits.C2NCH1 // bit 1
6734 #define C2NCH2 CM2CON1bits.C2NCH2 // bit 2
6735 #define C2PCH0 CM2CON1bits.C2PCH0 // bit 4
6736 #define C2PCH1 CM2CON1bits.C2PCH1 // bit 5
6737 #define C2INTN CM2CON1bits.C2INTN // bit 6
6738 #define C2INTP CM2CON1bits.C2INTP // bit 7
6740 #define MC1OUT CMOUTbits.MC1OUT // bit 0
6741 #define MC2OUT CMOUTbits.MC2OUT // bit 1
6743 #define ACC8 CRCACCHbits.ACC8 // bit 0, shadows bit in CRCACCHbits
6744 #define CRCACC8 CRCACCHbits.CRCACC8 // bit 0, shadows bit in CRCACCHbits
6745 #define ACC9 CRCACCHbits.ACC9 // bit 1, shadows bit in CRCACCHbits
6746 #define CRCACC9 CRCACCHbits.CRCACC9 // bit 1, shadows bit in CRCACCHbits
6747 #define ACC10 CRCACCHbits.ACC10 // bit 2, shadows bit in CRCACCHbits
6748 #define CRCACC10 CRCACCHbits.CRCACC10 // bit 2, shadows bit in CRCACCHbits
6749 #define ACC11 CRCACCHbits.ACC11 // bit 3, shadows bit in CRCACCHbits
6750 #define CRCACC11 CRCACCHbits.CRCACC11 // bit 3, shadows bit in CRCACCHbits
6751 #define ACC12 CRCACCHbits.ACC12 // bit 4, shadows bit in CRCACCHbits
6752 #define CRCACC12 CRCACCHbits.CRCACC12 // bit 4, shadows bit in CRCACCHbits
6753 #define ACC13 CRCACCHbits.ACC13 // bit 5, shadows bit in CRCACCHbits
6754 #define CRCACC13 CRCACCHbits.CRCACC13 // bit 5, shadows bit in CRCACCHbits
6755 #define ACC14 CRCACCHbits.ACC14 // bit 6, shadows bit in CRCACCHbits
6756 #define CRCACC14 CRCACCHbits.CRCACC14 // bit 6, shadows bit in CRCACCHbits
6757 #define ACC15 CRCACCHbits.ACC15 // bit 7, shadows bit in CRCACCHbits
6758 #define CRCACC15 CRCACCHbits.CRCACC15 // bit 7, shadows bit in CRCACCHbits
6760 #define ACC0 CRCACCLbits.ACC0 // bit 0, shadows bit in CRCACCLbits
6761 #define CRCACC0 CRCACCLbits.CRCACC0 // bit 0, shadows bit in CRCACCLbits
6762 #define ACC1 CRCACCLbits.ACC1 // bit 1, shadows bit in CRCACCLbits
6763 #define CRCACC1 CRCACCLbits.CRCACC1 // bit 1, shadows bit in CRCACCLbits
6764 #define ACC2 CRCACCLbits.ACC2 // bit 2, shadows bit in CRCACCLbits
6765 #define CRCACC2 CRCACCLbits.CRCACC2 // bit 2, shadows bit in CRCACCLbits
6766 #define ACC3 CRCACCLbits.ACC3 // bit 3, shadows bit in CRCACCLbits
6767 #define CRCACC3 CRCACCLbits.CRCACC3 // bit 3, shadows bit in CRCACCLbits
6768 #define ACC4 CRCACCLbits.ACC4 // bit 4, shadows bit in CRCACCLbits
6769 #define CRCACC4 CRCACCLbits.CRCACC4 // bit 4, shadows bit in CRCACCLbits
6770 #define ACC5 CRCACCLbits.ACC5 // bit 5, shadows bit in CRCACCLbits
6771 #define CRCACC5 CRCACCLbits.CRCACC5 // bit 5, shadows bit in CRCACCLbits
6772 #define ACC6 CRCACCLbits.ACC6 // bit 6, shadows bit in CRCACCLbits
6773 #define CRCACC6 CRCACCLbits.CRCACC6 // bit 6, shadows bit in CRCACCLbits
6774 #define ACC7 CRCACCLbits.ACC7 // bit 7, shadows bit in CRCACCLbits
6775 #define CRCACC7 CRCACCLbits.CRCACC7 // bit 7, shadows bit in CRCACCLbits
6777 #define PLEN0 CRCCON1bits.PLEN0 // bit 0, shadows bit in CRCCON1bits
6778 #define CRCPLEN0 CRCCON1bits.CRCPLEN0 // bit 0, shadows bit in CRCCON1bits
6779 #define PLEN1 CRCCON1bits.PLEN1 // bit 1, shadows bit in CRCCON1bits
6780 #define CRCPLEN1 CRCCON1bits.CRCPLEN1 // bit 1, shadows bit in CRCCON1bits
6781 #define PLEN2 CRCCON1bits.PLEN2 // bit 2, shadows bit in CRCCON1bits
6782 #define CRCPLEN2 CRCCON1bits.CRCPLEN2 // bit 2, shadows bit in CRCCON1bits
6783 #define PLEN3 CRCCON1bits.PLEN3 // bit 3, shadows bit in CRCCON1bits
6784 #define CRCPLEN3 CRCCON1bits.CRCPLEN3 // bit 3, shadows bit in CRCCON1bits
6785 #define DLEN0 CRCCON1bits.DLEN0 // bit 4, shadows bit in CRCCON1bits
6786 #define CRCDLEN0 CRCCON1bits.CRCDLEN0 // bit 4, shadows bit in CRCCON1bits
6787 #define DLEN1 CRCCON1bits.DLEN1 // bit 5, shadows bit in CRCCON1bits
6788 #define CRCDLEN1 CRCCON1bits.CRCDLEN1 // bit 5, shadows bit in CRCCON1bits
6789 #define DLEN2 CRCCON1bits.DLEN2 // bit 6, shadows bit in CRCCON1bits
6790 #define CRCDLEN2 CRCCON1bits.CRCDLEN2 // bit 6, shadows bit in CRCCON1bits
6791 #define DLEN3 CRCCON1bits.DLEN3 // bit 7, shadows bit in CRCCON1bits
6792 #define CRCDLEN3 CRCCON1bits.CRCDLEN3 // bit 7, shadows bit in CRCCON1bits
6794 #define DAT8 CRCDATHbits.DAT8 // bit 0, shadows bit in CRCDATHbits
6795 #define CRCDAT8 CRCDATHbits.CRCDAT8 // bit 0, shadows bit in CRCDATHbits
6796 #define DAT9 CRCDATHbits.DAT9 // bit 1, shadows bit in CRCDATHbits
6797 #define CRCDAT9 CRCDATHbits.CRCDAT9 // bit 1, shadows bit in CRCDATHbits
6798 #define DAT10 CRCDATHbits.DAT10 // bit 2, shadows bit in CRCDATHbits
6799 #define CRCDAT10 CRCDATHbits.CRCDAT10 // bit 2, shadows bit in CRCDATHbits
6800 #define DAT11 CRCDATHbits.DAT11 // bit 3, shadows bit in CRCDATHbits
6801 #define CRCDAT11 CRCDATHbits.CRCDAT11 // bit 3, shadows bit in CRCDATHbits
6802 #define DAT12 CRCDATHbits.DAT12 // bit 4, shadows bit in CRCDATHbits
6803 #define CRCDAT12 CRCDATHbits.CRCDAT12 // bit 4, shadows bit in CRCDATHbits
6804 #define DAT13 CRCDATHbits.DAT13 // bit 5, shadows bit in CRCDATHbits
6805 #define CRCDAT13 CRCDATHbits.CRCDAT13 // bit 5, shadows bit in CRCDATHbits
6806 #define DAT14 CRCDATHbits.DAT14 // bit 6, shadows bit in CRCDATHbits
6807 #define CRCDAT14 CRCDATHbits.CRCDAT14 // bit 6, shadows bit in CRCDATHbits
6808 #define DAT15 CRCDATHbits.DAT15 // bit 7, shadows bit in CRCDATHbits
6809 #define CRCDAT15 CRCDATHbits.CRCDAT15 // bit 7, shadows bit in CRCDATHbits
6811 #define DAT0 CRCDATLbits.DAT0 // bit 0, shadows bit in CRCDATLbits
6812 #define CRCDAT0 CRCDATLbits.CRCDAT0 // bit 0, shadows bit in CRCDATLbits
6813 #define DAT1 CRCDATLbits.DAT1 // bit 1, shadows bit in CRCDATLbits
6814 #define CRCDAT1 CRCDATLbits.CRCDAT1 // bit 1, shadows bit in CRCDATLbits
6815 #define DAT2 CRCDATLbits.DAT2 // bit 2, shadows bit in CRCDATLbits
6816 #define CRCDAT2 CRCDATLbits.CRCDAT2 // bit 2, shadows bit in CRCDATLbits
6817 #define DAT3 CRCDATLbits.DAT3 // bit 3, shadows bit in CRCDATLbits
6818 #define CRCDAT3 CRCDATLbits.CRCDAT3 // bit 3, shadows bit in CRCDATLbits
6819 #define DAT4 CRCDATLbits.DAT4 // bit 4, shadows bit in CRCDATLbits
6820 #define CRCDAT4 CRCDATLbits.CRCDAT4 // bit 4, shadows bit in CRCDATLbits
6821 #define DAT5 CRCDATLbits.DAT5 // bit 5, shadows bit in CRCDATLbits
6822 #define CRCDAT5 CRCDATLbits.CRCDAT5 // bit 5, shadows bit in CRCDATLbits
6823 #define DAT6 CRCDATLbits.DAT6 // bit 6, shadows bit in CRCDATLbits
6824 #define CRCDAT6 CRCDATLbits.CRCDAT6 // bit 6, shadows bit in CRCDATLbits
6825 #define DAT7 CRCDATLbits.DAT7 // bit 7, shadows bit in CRCDATLbits
6826 #define CRDCDAT7 CRCDATLbits.CRDCDAT7 // bit 7, shadows bit in CRCDATLbits
6828 #define SHIFT8 CRCSHIFTHbits.SHIFT8 // bit 0, shadows bit in CRCSHIFTHbits
6829 #define CRCSHIFT8 CRCSHIFTHbits.CRCSHIFT8 // bit 0, shadows bit in CRCSHIFTHbits
6830 #define SHIFT9 CRCSHIFTHbits.SHIFT9 // bit 1, shadows bit in CRCSHIFTHbits
6831 #define CRCSHIFT9 CRCSHIFTHbits.CRCSHIFT9 // bit 1, shadows bit in CRCSHIFTHbits
6832 #define SHIFT10 CRCSHIFTHbits.SHIFT10 // bit 2, shadows bit in CRCSHIFTHbits
6833 #define CRCSHIFT10 CRCSHIFTHbits.CRCSHIFT10 // bit 2, shadows bit in CRCSHIFTHbits
6834 #define SHIFT11 CRCSHIFTHbits.SHIFT11 // bit 3, shadows bit in CRCSHIFTHbits
6835 #define CRCSHIFT11 CRCSHIFTHbits.CRCSHIFT11 // bit 3, shadows bit in CRCSHIFTHbits
6836 #define SHIFT12 CRCSHIFTHbits.SHIFT12 // bit 4, shadows bit in CRCSHIFTHbits
6837 #define CRCSHIFT12 CRCSHIFTHbits.CRCSHIFT12 // bit 4, shadows bit in CRCSHIFTHbits
6838 #define SHIFT13 CRCSHIFTHbits.SHIFT13 // bit 5, shadows bit in CRCSHIFTHbits
6839 #define CRCSHIFT13 CRCSHIFTHbits.CRCSHIFT13 // bit 5, shadows bit in CRCSHIFTHbits
6840 #define SHIFT14 CRCSHIFTHbits.SHIFT14 // bit 6, shadows bit in CRCSHIFTHbits
6841 #define CRCSHIFT14 CRCSHIFTHbits.CRCSHIFT14 // bit 6, shadows bit in CRCSHIFTHbits
6842 #define SHIFT15 CRCSHIFTHbits.SHIFT15 // bit 7, shadows bit in CRCSHIFTHbits
6843 #define CRCSHIFT15 CRCSHIFTHbits.CRCSHIFT15 // bit 7, shadows bit in CRCSHIFTHbits
6845 #define SHIFT0 CRCSHIFTLbits.SHIFT0 // bit 0, shadows bit in CRCSHIFTLbits
6846 #define CRCSHIFT0 CRCSHIFTLbits.CRCSHIFT0 // bit 0, shadows bit in CRCSHIFTLbits
6847 #define SHIFT1 CRCSHIFTLbits.SHIFT1 // bit 1, shadows bit in CRCSHIFTLbits
6848 #define CRCSHIFT1 CRCSHIFTLbits.CRCSHIFT1 // bit 1, shadows bit in CRCSHIFTLbits
6849 #define SHIFT2 CRCSHIFTLbits.SHIFT2 // bit 2, shadows bit in CRCSHIFTLbits
6850 #define CRCSHIFT2 CRCSHIFTLbits.CRCSHIFT2 // bit 2, shadows bit in CRCSHIFTLbits
6851 #define SHIFT3 CRCSHIFTLbits.SHIFT3 // bit 3, shadows bit in CRCSHIFTLbits
6852 #define CRCSHIFT3 CRCSHIFTLbits.CRCSHIFT3 // bit 3, shadows bit in CRCSHIFTLbits
6853 #define SHIFT4 CRCSHIFTLbits.SHIFT4 // bit 4, shadows bit in CRCSHIFTLbits
6854 #define CRCSHIFT4 CRCSHIFTLbits.CRCSHIFT4 // bit 4, shadows bit in CRCSHIFTLbits
6855 #define SHIFT5 CRCSHIFTLbits.SHIFT5 // bit 5, shadows bit in CRCSHIFTLbits
6856 #define CRCSHIFT5 CRCSHIFTLbits.CRCSHIFT5 // bit 5, shadows bit in CRCSHIFTLbits
6857 #define SHIFT6 CRCSHIFTLbits.SHIFT6 // bit 6, shadows bit in CRCSHIFTLbits
6858 #define CRCSHIFT6 CRCSHIFTLbits.CRCSHIFT6 // bit 6, shadows bit in CRCSHIFTLbits
6859 #define SHIFT7 CRCSHIFTLbits.SHIFT7 // bit 7, shadows bit in CRCSHIFTLbits
6860 #define CRCSHIFT7 CRCSHIFTLbits.CRCSHIFT7 // bit 7, shadows bit in CRCSHIFTLbits
6862 #define XOR8 CRCXORHbits.XOR8 // bit 0, shadows bit in CRCXORHbits
6863 #define CRCXOR8 CRCXORHbits.CRCXOR8 // bit 0, shadows bit in CRCXORHbits
6864 #define XOR9 CRCXORHbits.XOR9 // bit 1, shadows bit in CRCXORHbits
6865 #define CRCXOR9 CRCXORHbits.CRCXOR9 // bit 1, shadows bit in CRCXORHbits
6866 #define XOR10 CRCXORHbits.XOR10 // bit 2, shadows bit in CRCXORHbits
6867 #define CRCXOR10 CRCXORHbits.CRCXOR10 // bit 2, shadows bit in CRCXORHbits
6868 #define XOR11 CRCXORHbits.XOR11 // bit 3, shadows bit in CRCXORHbits
6869 #define CRCXOR11 CRCXORHbits.CRCXOR11 // bit 3, shadows bit in CRCXORHbits
6870 #define XOR12 CRCXORHbits.XOR12 // bit 4, shadows bit in CRCXORHbits
6871 #define CRCXOR12 CRCXORHbits.CRCXOR12 // bit 4, shadows bit in CRCXORHbits
6872 #define XOR13 CRCXORHbits.XOR13 // bit 5, shadows bit in CRCXORHbits
6873 #define CRCXOR13 CRCXORHbits.CRCXOR13 // bit 5, shadows bit in CRCXORHbits
6874 #define XOR14 CRCXORHbits.XOR14 // bit 6, shadows bit in CRCXORHbits
6875 #define CRCXOR14 CRCXORHbits.CRCXOR14 // bit 6, shadows bit in CRCXORHbits
6876 #define XOR15 CRCXORHbits.XOR15 // bit 7, shadows bit in CRCXORHbits
6877 #define CRCXOR15 CRCXORHbits.CRCXOR15 // bit 7, shadows bit in CRCXORHbits
6879 #define XOR1 CRCXORLbits.XOR1 // bit 1, shadows bit in CRCXORLbits
6880 #define CRCXOR1 CRCXORLbits.CRCXOR1 // bit 1, shadows bit in CRCXORLbits
6881 #define XOR2 CRCXORLbits.XOR2 // bit 2, shadows bit in CRCXORLbits
6882 #define CRCXOR2 CRCXORLbits.CRCXOR2 // bit 2, shadows bit in CRCXORLbits
6883 #define XOR3 CRCXORLbits.XOR3 // bit 3, shadows bit in CRCXORLbits
6884 #define CRCXOR3 CRCXORLbits.CRCXOR3 // bit 3, shadows bit in CRCXORLbits
6885 #define XOR4 CRCXORLbits.XOR4 // bit 4, shadows bit in CRCXORLbits
6886 #define CRCXOR4 CRCXORLbits.CRCXOR4 // bit 4, shadows bit in CRCXORLbits
6887 #define XOR5 CRCXORLbits.XOR5 // bit 5, shadows bit in CRCXORLbits
6888 #define CRCXOR5 CRCXORLbits.CRCXOR5 // bit 5, shadows bit in CRCXORLbits
6889 #define XOR6 CRCXORLbits.XOR6 // bit 6, shadows bit in CRCXORLbits
6890 #define CRCXOR6 CRCXORLbits.CRCXOR6 // bit 6, shadows bit in CRCXORLbits
6891 #define XOR7 CRCXORLbits.XOR7 // bit 7, shadows bit in CRCXORLbits
6892 #define CRCXOR7 CRCXORLbits.CRCXOR7 // bit 7, shadows bit in CRCXORLbits
6894 #define LSAC0 CWG1AS0bits.LSAC0 // bit 2, shadows bit in CWG1AS0bits
6895 #define CWG1LSAC0 CWG1AS0bits.CWG1LSAC0 // bit 2, shadows bit in CWG1AS0bits
6896 #define LSAC1 CWG1AS0bits.LSAC1 // bit 3, shadows bit in CWG1AS0bits
6897 #define CWG1LSAC1 CWG1AS0bits.CWG1LSAC1 // bit 3, shadows bit in CWG1AS0bits
6898 #define LSBD0 CWG1AS0bits.LSBD0 // bit 4, shadows bit in CWG1AS0bits
6899 #define CWG1LSBD0 CWG1AS0bits.CWG1LSBD0 // bit 4, shadows bit in CWG1AS0bits
6900 #define LSBD1 CWG1AS0bits.LSBD1 // bit 5, shadows bit in CWG1AS0bits
6901 #define CWG1LSBD1 CWG1AS0bits.CWG1LSBD1 // bit 5, shadows bit in CWG1AS0bits
6902 #define REN CWG1AS0bits.REN // bit 6, shadows bit in CWG1AS0bits
6903 #define CWG1REN CWG1AS0bits.CWG1REN // bit 6, shadows bit in CWG1AS0bits
6904 #define SHUTDOWN CWG1AS0bits.SHUTDOWN // bit 7, shadows bit in CWG1AS0bits
6905 #define CWG1SHUTDOWN CWG1AS0bits.CWG1SHUTDOWN // bit 7, shadows bit in CWG1AS0bits
6907 #define INAS CWG1AS1bits.INAS // bit 0, shadows bit in CWG1AS1bits
6908 #define CWG1INAS CWG1AS1bits.CWG1INAS // bit 0, shadows bit in CWG1AS1bits
6909 #define C1AS CWG1AS1bits.C1AS // bit 1, shadows bit in CWG1AS1bits
6910 #define CWG1C1AS CWG1AS1bits.CWG1C1AS // bit 1, shadows bit in CWG1AS1bits
6911 #define C2AS CWG1AS1bits.C2AS // bit 2, shadows bit in CWG1AS1bits
6912 #define CWG1C2AS CWG1AS1bits.CWG1C2AS // bit 2, shadows bit in CWG1AS1bits
6913 #define TMR2AS CWG1AS1bits.TMR2AS // bit 4, shadows bit in CWG1AS1bits
6914 #define CWG1TMR2AS CWG1AS1bits.CWG1TMR2AS // bit 4, shadows bit in CWG1AS1bits
6915 #define TMR4AS CWG1AS1bits.TMR4AS // bit 5, shadows bit in CWG1AS1bits
6916 #define CWG1TMR4AS CWG1AS1bits.CWG1TMR4AS // bit 5, shadows bit in CWG1AS1bits
6917 #define TMR6AS CWG1AS1bits.TMR6AS // bit 6, shadows bit in CWG1AS1bits
6918 #define CWG1TMR6AS CWG1AS1bits.CWG1TMR6AS // bit 6, shadows bit in CWG1AS1bits
6920 #define CS CWG1CLKCONbits.CS // bit 0, shadows bit in CWG1CLKCONbits
6921 #define CWG1CS CWG1CLKCONbits.CWG1CS // bit 0, shadows bit in CWG1CLKCONbits
6923 #define POLA CWG1CON1bits.POLA // bit 0, shadows bit in CWG1CON1bits
6924 #define CWG1POLA CWG1CON1bits.CWG1POLA // bit 0, shadows bit in CWG1CON1bits
6925 #define POLB CWG1CON1bits.POLB // bit 1, shadows bit in CWG1CON1bits
6926 #define CWG1POLB CWG1CON1bits.CWG1POLB // bit 1, shadows bit in CWG1CON1bits
6927 #define POLC CWG1CON1bits.POLC // bit 2, shadows bit in CWG1CON1bits
6928 #define CWG1POLC CWG1CON1bits.CWG1POLC // bit 2, shadows bit in CWG1CON1bits
6929 #define POLD CWG1CON1bits.POLD // bit 3, shadows bit in CWG1CON1bits
6930 #define CWG1POLD CWG1CON1bits.CWG1POLD // bit 3, shadows bit in CWG1CON1bits
6931 #define IN CWG1CON1bits.IN // bit 5, shadows bit in CWG1CON1bits
6932 #define CWG1IN CWG1CON1bits.CWG1IN // bit 5, shadows bit in CWG1CON1bits
6934 #define DBF0 CWG1DBFbits.DBF0 // bit 0, shadows bit in CWG1DBFbits
6935 #define CWG1DBF0 CWG1DBFbits.CWG1DBF0 // bit 0, shadows bit in CWG1DBFbits
6936 #define DBF1 CWG1DBFbits.DBF1 // bit 1, shadows bit in CWG1DBFbits
6937 #define CWG1DBF1 CWG1DBFbits.CWG1DBF1 // bit 1, shadows bit in CWG1DBFbits
6938 #define DBF2 CWG1DBFbits.DBF2 // bit 2, shadows bit in CWG1DBFbits
6939 #define CWG1DBF2 CWG1DBFbits.CWG1DBF2 // bit 2, shadows bit in CWG1DBFbits
6940 #define DBF3 CWG1DBFbits.DBF3 // bit 3, shadows bit in CWG1DBFbits
6941 #define CWG1DBF3 CWG1DBFbits.CWG1DBF3 // bit 3, shadows bit in CWG1DBFbits
6942 #define DBF4 CWG1DBFbits.DBF4 // bit 4, shadows bit in CWG1DBFbits
6943 #define CWG1DBF4 CWG1DBFbits.CWG1DBF4 // bit 4, shadows bit in CWG1DBFbits
6944 #define DBF5 CWG1DBFbits.DBF5 // bit 5, shadows bit in CWG1DBFbits
6945 #define CWG1DBF5 CWG1DBFbits.CWG1DBF5 // bit 5, shadows bit in CWG1DBFbits
6947 #define DBR0 CWG1DBRbits.DBR0 // bit 0, shadows bit in CWG1DBRbits
6948 #define CWG1DBR0 CWG1DBRbits.CWG1DBR0 // bit 0, shadows bit in CWG1DBRbits
6949 #define DBR1 CWG1DBRbits.DBR1 // bit 1, shadows bit in CWG1DBRbits
6950 #define CWG1DBR1 CWG1DBRbits.CWG1DBR1 // bit 1, shadows bit in CWG1DBRbits
6951 #define DBR2 CWG1DBRbits.DBR2 // bit 2, shadows bit in CWG1DBRbits
6952 #define CWG1DBR2 CWG1DBRbits.CWG1DBR2 // bit 2, shadows bit in CWG1DBRbits
6953 #define DBR3 CWG1DBRbits.DBR3 // bit 3, shadows bit in CWG1DBRbits
6954 #define CWG1DBR3 CWG1DBRbits.CWG1DBR3 // bit 3, shadows bit in CWG1DBRbits
6955 #define DBR4 CWG1DBRbits.DBR4 // bit 4, shadows bit in CWG1DBRbits
6956 #define CWG1DBR4 CWG1DBRbits.CWG1DBR4 // bit 4, shadows bit in CWG1DBRbits
6957 #define DBR5 CWG1DBRbits.DBR5 // bit 5, shadows bit in CWG1DBRbits
6958 #define CWG1DBR5 CWG1DBRbits.CWG1DBR5 // bit 5, shadows bit in CWG1DBRbits
6960 #define IS0 CWG1ISMbits.IS0 // bit 0, shadows bit in CWG1ISMbits
6961 #define CWG1IS0 CWG1ISMbits.CWG1IS0 // bit 0, shadows bit in CWG1ISMbits
6962 #define IS1 CWG1ISMbits.IS1 // bit 1, shadows bit in CWG1ISMbits
6963 #define CWG1IS1 CWG1ISMbits.CWG1IS1 // bit 1, shadows bit in CWG1ISMbits
6964 #define IS2 CWG1ISMbits.IS2 // bit 2, shadows bit in CWG1ISMbits
6965 #define CWG1IS2 CWG1ISMbits.CWG1IS2 // bit 2, shadows bit in CWG1ISMbits
6967 #define STRA CWG1OCON0bits.STRA // bit 0, shadows bit in CWG1OCON0bits
6968 #define CWG1STRA CWG1OCON0bits.CWG1STRA // bit 0, shadows bit in CWG1OCON0bits
6969 #define STRB CWG1OCON0bits.STRB // bit 1, shadows bit in CWG1OCON0bits
6970 #define CWG1STRB CWG1OCON0bits.CWG1STRB // bit 1, shadows bit in CWG1OCON0bits
6971 #define STRC CWG1OCON0bits.STRC // bit 2, shadows bit in CWG1OCON0bits
6972 #define CWG1STRC CWG1OCON0bits.CWG1STRC // bit 2, shadows bit in CWG1OCON0bits
6973 #define STRD CWG1OCON0bits.STRD // bit 3, shadows bit in CWG1OCON0bits
6974 #define CWG1STRD CWG1OCON0bits.CWG1STRD // bit 3, shadows bit in CWG1OCON0bits
6975 #define OVRA CWG1OCON0bits.OVRA // bit 4, shadows bit in CWG1OCON0bits
6976 #define CWG1OVRA CWG1OCON0bits.CWG1OVRA // bit 4, shadows bit in CWG1OCON0bits
6977 #define OVRB CWG1OCON0bits.OVRB // bit 5, shadows bit in CWG1OCON0bits
6978 #define CWG1OVRB CWG1OCON0bits.CWG1OVRB // bit 5, shadows bit in CWG1OCON0bits
6979 #define OVRC CWG1OCON0bits.OVRC // bit 6, shadows bit in CWG1OCON0bits
6980 #define CWG1OVRC CWG1OCON0bits.CWG1OVRC // bit 6, shadows bit in CWG1OCON0bits
6981 #define OVRD CWG1OCON0bits.OVRD // bit 7, shadows bit in CWG1OCON0bits
6982 #define CWG1OVRD CWG1OCON0bits.CWG1OVRD // bit 7, shadows bit in CWG1OCON0bits
6984 #define OEA CWG1OCON1bits.OEA // bit 0, shadows bit in CWG1OCON1bits
6985 #define CWG1OEA CWG1OCON1bits.CWG1OEA // bit 0, shadows bit in CWG1OCON1bits
6986 #define OEB CWG1OCON1bits.OEB // bit 1, shadows bit in CWG1OCON1bits
6987 #define CWG1OEB CWG1OCON1bits.CWG1OEB // bit 1, shadows bit in CWG1OCON1bits
6988 #define OEC CWG1OCON1bits.OEC // bit 2, shadows bit in CWG1OCON1bits
6989 #define CWG1OEC CWG1OCON1bits.CWG1OEC // bit 2, shadows bit in CWG1OCON1bits
6990 #define OED CWG1OCON1bits.OED // bit 3, shadows bit in CWG1OCON1bits
6991 #define CWG1OED CWG1OCON1bits.CWG1OED // bit 3, shadows bit in CWG1OCON1bits
6993 #define D1PSS0 DAC1CON0bits.D1PSS0 // bit 2
6994 #define D1PSS1 DAC1CON0bits.D1PSS1 // bit 3
6995 #define DAC1OE DAC1CON0bits.DAC1OE // bit 5
6996 #define DAC1EN DAC1CON0bits.DAC1EN // bit 7
6998 #define DAC1R0 DAC1CON1bits.DAC1R0 // bit 0
6999 #define DAC1R1 DAC1CON1bits.DAC1R1 // bit 1
7000 #define DAC1R2 DAC1CON1bits.DAC1R2 // bit 2
7001 #define DAC1R3 DAC1CON1bits.DAC1R3 // bit 3
7002 #define DAC1R4 DAC1CON1bits.DAC1R4 // bit 4
7003 #define DAC1R5 DAC1CON1bits.DAC1R5 // bit 5
7004 #define DAC1R6 DAC1CON1bits.DAC1R6 // bit 6
7005 #define DAC1R7 DAC1CON1bits.DAC1R7 // bit 7
7007 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
7008 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
7009 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
7010 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
7011 #define TSRNG FVRCONbits.TSRNG // bit 4
7012 #define TSEN FVRCONbits.TSEN // bit 5
7013 #define FVRRDY FVRCONbits.FVRRDY // bit 6
7014 #define FVREN FVRCONbits.FVREN // bit 7
7016 #define INLVLA0 INLVLAbits.INLVLA0 // bit 0
7017 #define INLVLA1 INLVLAbits.INLVLA1 // bit 1
7018 #define INLVLA2 INLVLAbits.INLVLA2 // bit 2
7019 #define INLVLA3 INLVLAbits.INLVLA3 // bit 3
7020 #define INLVLA4 INLVLAbits.INLVLA4 // bit 4
7021 #define INLVLA5 INLVLAbits.INLVLA5 // bit 5
7023 #define INLVLC0 INLVLCbits.INLVLC0 // bit 0
7024 #define INLVLC1 INLVLCbits.INLVLC1 // bit 1
7025 #define INLVLC2 INLVLCbits.INLVLC2 // bit 2
7026 #define INLVLC3 INLVLCbits.INLVLC3 // bit 3
7027 #define INLVLC4 INLVLCbits.INLVLC4 // bit 4
7028 #define INLVLC5 INLVLCbits.INLVLC5 // bit 5
7030 #define IOCIF INTCONbits.IOCIF // bit 0
7031 #define INTF INTCONbits.INTF // bit 1
7032 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
7033 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
7034 #define IOCIE INTCONbits.IOCIE // bit 3
7035 #define INTE INTCONbits.INTE // bit 4
7036 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
7037 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
7038 #define PEIE INTCONbits.PEIE // bit 6
7039 #define GIE INTCONbits.GIE // bit 7
7041 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
7042 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
7043 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
7044 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
7045 #define IOCAF4 IOCAFbits.IOCAF4 // bit 4
7046 #define IOCAF5 IOCAFbits.IOCAF5 // bit 5
7048 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
7049 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
7050 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
7051 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
7052 #define IOCAN4 IOCANbits.IOCAN4 // bit 4
7053 #define IOCAN5 IOCANbits.IOCAN5 // bit 5
7055 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
7056 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
7057 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
7058 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
7059 #define IOCAP4 IOCAPbits.IOCAP4 // bit 4
7060 #define IOCAP5 IOCAPbits.IOCAP5 // bit 5
7062 #define IOCCF0 IOCCFbits.IOCCF0 // bit 0
7063 #define IOCCF1 IOCCFbits.IOCCF1 // bit 1
7064 #define IOCCF2 IOCCFbits.IOCCF2 // bit 2
7065 #define IOCCF3 IOCCFbits.IOCCF3 // bit 3
7066 #define IOCCF4 IOCCFbits.IOCCF4 // bit 4
7067 #define IOCCF5 IOCCFbits.IOCCF5 // bit 5
7069 #define IOCCN0 IOCCNbits.IOCCN0 // bit 0
7070 #define IOCCN1 IOCCNbits.IOCCN1 // bit 1
7071 #define IOCCN2 IOCCNbits.IOCCN2 // bit 2
7072 #define IOCCN3 IOCCNbits.IOCCN3 // bit 3
7073 #define IOCCN4 IOCCNbits.IOCCN4 // bit 4
7074 #define IOCCN5 IOCCNbits.IOCCN5 // bit 5
7076 #define IOCCP0 IOCCPbits.IOCCP0 // bit 0
7077 #define IOCCP1 IOCCPbits.IOCCP1 // bit 1
7078 #define IOCCP2 IOCCPbits.IOCCP2 // bit 2
7079 #define IOCCP3 IOCCPbits.IOCCP3 // bit 3
7080 #define IOCCP4 IOCCPbits.IOCCP4 // bit 4
7081 #define IOCCP5 IOCCPbits.IOCCP5 // bit 5
7083 #define LATA0 LATAbits.LATA0 // bit 0
7084 #define LATA1 LATAbits.LATA1 // bit 1
7085 #define LATA2 LATAbits.LATA2 // bit 2
7086 #define LATA3 LATAbits.LATA3 // bit 3
7087 #define LATA4 LATAbits.LATA4 // bit 4
7088 #define LATA5 LATAbits.LATA5 // bit 5
7090 #define LATC0 LATCbits.LATC0 // bit 0
7091 #define LATC1 LATCbits.LATC1 // bit 1
7092 #define LATC2 LATCbits.LATC2 // bit 2
7093 #define LATC3 LATCbits.LATC3 // bit 3
7094 #define LATC4 LATCbits.LATC4 // bit 4
7095 #define LATC5 LATCbits.LATC5 // bit 5
7097 #define ODA0 ODCONAbits.ODA0 // bit 0
7098 #define ODA1 ODCONAbits.ODA1 // bit 1
7099 #define ODA2 ODCONAbits.ODA2 // bit 2
7100 #define ODA4 ODCONAbits.ODA4 // bit 4
7101 #define ODA5 ODCONAbits.ODA5 // bit 5
7103 #define ODC0 ODCONCbits.ODC0 // bit 0
7104 #define ODC1 ODCONCbits.ODC1 // bit 1
7105 #define ODC2 ODCONCbits.ODC2 // bit 2
7106 #define ODC3 ODCONCbits.ODC3 // bit 3
7107 #define ODC4 ODCONCbits.ODC4 // bit 4
7108 #define ODC5 ODCONCbits.ODC5 // bit 5
7110 #define PS0 OPTION_REGbits.PS0 // bit 0
7111 #define PS1 OPTION_REGbits.PS1 // bit 1
7112 #define PS2 OPTION_REGbits.PS2 // bit 2
7113 #define PSA OPTION_REGbits.PSA // bit 3
7114 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
7115 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
7116 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
7117 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
7118 #define INTEDG OPTION_REGbits.INTEDG // bit 6
7119 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
7121 #define SCS0 OSCCONbits.SCS0 // bit 0
7122 #define SCS1 OSCCONbits.SCS1 // bit 1
7123 #define IRCF0 OSCCONbits.IRCF0 // bit 3
7124 #define IRCF1 OSCCONbits.IRCF1 // bit 4
7125 #define IRCF2 OSCCONbits.IRCF2 // bit 5
7126 #define IRCF3 OSCCONbits.IRCF3 // bit 6
7127 #define SPLLEN OSCCONbits.SPLLEN // bit 7
7129 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
7130 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
7131 #define MFIOFR OSCSTATbits.MFIOFR // bit 2
7132 #define HFIOFL OSCSTATbits.HFIOFL // bit 3
7133 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
7134 #define PLLR OSCSTATbits.PLLR // bit 6
7136 #define TUN0 OSCTUNEbits.TUN0 // bit 0
7137 #define TUN1 OSCTUNEbits.TUN1 // bit 1
7138 #define TUN2 OSCTUNEbits.TUN2 // bit 2
7139 #define TUN3 OSCTUNEbits.TUN3 // bit 3
7140 #define TUN4 OSCTUNEbits.TUN4 // bit 4
7141 #define TUN5 OSCTUNEbits.TUN5 // bit 5
7143 #define NOT_BOR PCONbits.NOT_BOR // bit 0
7144 #define NOT_POR PCONbits.NOT_POR // bit 1
7145 #define NOT_RI PCONbits.NOT_RI // bit 2
7146 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
7147 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
7148 #define NOT_WDTWV PCONbits.NOT_WDTWV // bit 5
7149 #define STKUNF PCONbits.STKUNF // bit 6
7150 #define STKOVF PCONbits.STKOVF // bit 7
7152 #define TMR1IE PIE1bits.TMR1IE // bit 0
7153 #define TMR2IE PIE1bits.TMR2IE // bit 1
7154 #define CCP1IE PIE1bits.CCP1IE // bit 2
7155 #define ADIE PIE1bits.ADIE // bit 6
7156 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
7158 #define CCP2IE PIE2bits.CCP2IE // bit 0
7159 #define TMR4IE PIE2bits.TMR4IE // bit 1
7160 #define TMR6IE PIE2bits.TMR6IE // bit 2
7161 #define C1IE PIE2bits.C1IE // bit 5
7162 #define C2IE PIE2bits.C2IE // bit 6
7164 #define ZCDIE PIE3bits.ZCDIE // bit 4
7165 #define CWGIE PIE3bits.CWGIE // bit 5
7167 #define SMT1IE PIE4bits.SMT1IE // bit 0
7168 #define SMT1PRAIE PIE4bits.SMT1PRAIE // bit 1
7169 #define SMT1PWAIE PIE4bits.SMT1PWAIE // bit 2
7170 #define SMT2IE PIE4bits.SMT2IE // bit 3
7171 #define SMT2PRAIE PIE4bits.SMT2PRAIE // bit 4
7172 #define SMT2PWAIE PIE4bits.SMT2PWAIE // bit 5
7173 #define CRCIE PIE4bits.CRCIE // bit 6
7174 #define SCANIE PIE4bits.SCANIE // bit 7
7176 #define TMR1IF PIR1bits.TMR1IF // bit 0
7177 #define TMR2IF PIR1bits.TMR2IF // bit 1
7178 #define CCP1IF PIR1bits.CCP1IF // bit 2
7179 #define ADIF PIR1bits.ADIF // bit 6
7180 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
7182 #define CCP2IF PIR2bits.CCP2IF // bit 0
7183 #define TMR4IF PIR2bits.TMR4IF // bit 1
7184 #define TMR6IF PIR2bits.TMR6IF // bit 2
7185 #define C1IF PIR2bits.C1IF // bit 5
7186 #define C2IF PIR2bits.C2IF // bit 6
7188 #define ZCDIF PIR3bits.ZCDIF // bit 4
7189 #define CWGIF PIR3bits.CWGIF // bit 5
7191 #define SMT1IF PIR4bits.SMT1IF // bit 0
7192 #define SMT1PRAIF PIR4bits.SMT1PRAIF // bit 1
7193 #define SMT1PWAIF PIR4bits.SMT1PWAIF // bit 2
7194 #define SMT2IF PIR4bits.SMT2IF // bit 3
7195 #define SMT2PRAIF PIR4bits.SMT2PRAIF // bit 4
7196 #define SMT2PWAIF PIR4bits.SMT2PWAIF // bit 5
7197 #define CRCIF PIR4bits.CRCIF // bit 6
7198 #define SCANIF PIR4bits.SCANIF // bit 7
7200 #define RD PMCON1bits.RD // bit 0
7201 #define WR PMCON1bits.WR // bit 1
7202 #define WREN PMCON1bits.WREN // bit 2
7203 #define WRERR PMCON1bits.WRERR // bit 3
7204 #define FREE PMCON1bits.FREE // bit 4
7205 #define LWLO PMCON1bits.LWLO // bit 5
7206 #define CFGS PMCON1bits.CFGS // bit 6
7208 #define RA0 PORTAbits.RA0 // bit 0
7209 #define RA1 PORTAbits.RA1 // bit 1
7210 #define RA2 PORTAbits.RA2 // bit 2
7211 #define RA3 PORTAbits.RA3 // bit 3
7212 #define RA4 PORTAbits.RA4 // bit 4
7213 #define RA5 PORTAbits.RA5 // bit 5
7215 #define RC0 PORTCbits.RC0 // bit 0
7216 #define RC1 PORTCbits.RC1 // bit 1
7217 #define RC2 PORTCbits.RC2 // bit 2
7218 #define RC3 PORTCbits.RC3 // bit 3
7219 #define RC4 PORTCbits.RC4 // bit 4
7220 #define RC5 PORTCbits.RC5 // bit 5
7222 #define HADR8 SCANHADRHbits.HADR8 // bit 0, shadows bit in SCANHADRHbits
7223 #define SCANHADR8 SCANHADRHbits.SCANHADR8 // bit 0, shadows bit in SCANHADRHbits
7224 #define HADR9 SCANHADRHbits.HADR9 // bit 1, shadows bit in SCANHADRHbits
7225 #define SCANHADR9 SCANHADRHbits.SCANHADR9 // bit 1, shadows bit in SCANHADRHbits
7226 #define HADR10 SCANHADRHbits.HADR10 // bit 2, shadows bit in SCANHADRHbits
7227 #define SCANHADR10 SCANHADRHbits.SCANHADR10 // bit 2, shadows bit in SCANHADRHbits
7228 #define HADR11 SCANHADRHbits.HADR11 // bit 3, shadows bit in SCANHADRHbits
7229 #define SCANHADR11 SCANHADRHbits.SCANHADR11 // bit 3, shadows bit in SCANHADRHbits
7230 #define HADR12 SCANHADRHbits.HADR12 // bit 4, shadows bit in SCANHADRHbits
7231 #define SCANHADR12 SCANHADRHbits.SCANHADR12 // bit 4, shadows bit in SCANHADRHbits
7232 #define HADR13 SCANHADRHbits.HADR13 // bit 5, shadows bit in SCANHADRHbits
7233 #define SCANHADR13 SCANHADRHbits.SCANHADR13 // bit 5, shadows bit in SCANHADRHbits
7234 #define HADR14 SCANHADRHbits.HADR14 // bit 6, shadows bit in SCANHADRHbits
7235 #define SCANHADR14 SCANHADRHbits.SCANHADR14 // bit 6, shadows bit in SCANHADRHbits
7236 #define HADR15 SCANHADRHbits.HADR15 // bit 7, shadows bit in SCANHADRHbits
7237 #define SCANHADR15 SCANHADRHbits.SCANHADR15 // bit 7, shadows bit in SCANHADRHbits
7239 #define HADR0 SCANHADRLbits.HADR0 // bit 0, shadows bit in SCANHADRLbits
7240 #define SCANHADR0 SCANHADRLbits.SCANHADR0 // bit 0, shadows bit in SCANHADRLbits
7241 #define HADR1 SCANHADRLbits.HADR1 // bit 1, shadows bit in SCANHADRLbits
7242 #define SCANHADR1 SCANHADRLbits.SCANHADR1 // bit 1, shadows bit in SCANHADRLbits
7243 #define HARD2 SCANHADRLbits.HARD2 // bit 2, shadows bit in SCANHADRLbits
7244 #define SCANHADR2 SCANHADRLbits.SCANHADR2 // bit 2, shadows bit in SCANHADRLbits
7245 #define HADR3 SCANHADRLbits.HADR3 // bit 3, shadows bit in SCANHADRLbits
7246 #define SCANHADR3 SCANHADRLbits.SCANHADR3 // bit 3, shadows bit in SCANHADRLbits
7247 #define HADR4 SCANHADRLbits.HADR4 // bit 4, shadows bit in SCANHADRLbits
7248 #define SCANHADR4 SCANHADRLbits.SCANHADR4 // bit 4, shadows bit in SCANHADRLbits
7249 #define HADR5 SCANHADRLbits.HADR5 // bit 5, shadows bit in SCANHADRLbits
7250 #define SCANHADR5 SCANHADRLbits.SCANHADR5 // bit 5, shadows bit in SCANHADRLbits
7251 #define HADR6 SCANHADRLbits.HADR6 // bit 6, shadows bit in SCANHADRLbits
7252 #define SCANHADR6 SCANHADRLbits.SCANHADR6 // bit 6, shadows bit in SCANHADRLbits
7253 #define HADR7 SCANHADRLbits.HADR7 // bit 7, shadows bit in SCANHADRLbits
7254 #define SCANHADR7 SCANHADRLbits.SCANHADR7 // bit 7, shadows bit in SCANHADRLbits
7256 #define LADR8 SCANLADRHbits.LADR8 // bit 0, shadows bit in SCANLADRHbits
7257 #define SCANLADR8 SCANLADRHbits.SCANLADR8 // bit 0, shadows bit in SCANLADRHbits
7258 #define LADR9 SCANLADRHbits.LADR9 // bit 1, shadows bit in SCANLADRHbits
7259 #define SCANLADR9 SCANLADRHbits.SCANLADR9 // bit 1, shadows bit in SCANLADRHbits
7260 #define LADR10 SCANLADRHbits.LADR10 // bit 2, shadows bit in SCANLADRHbits
7261 #define SCANLADR10 SCANLADRHbits.SCANLADR10 // bit 2, shadows bit in SCANLADRHbits
7262 #define LADR11 SCANLADRHbits.LADR11 // bit 3, shadows bit in SCANLADRHbits
7263 #define SCANLADR11 SCANLADRHbits.SCANLADR11 // bit 3, shadows bit in SCANLADRHbits
7264 #define LADR12 SCANLADRHbits.LADR12 // bit 4, shadows bit in SCANLADRHbits
7265 #define SCANLADR12 SCANLADRHbits.SCANLADR12 // bit 4, shadows bit in SCANLADRHbits
7266 #define LADR13 SCANLADRHbits.LADR13 // bit 5, shadows bit in SCANLADRHbits
7267 #define SCANLADR13 SCANLADRHbits.SCANLADR13 // bit 5, shadows bit in SCANLADRHbits
7268 #define LADR14 SCANLADRHbits.LADR14 // bit 6, shadows bit in SCANLADRHbits
7269 #define SCANLADR14 SCANLADRHbits.SCANLADR14 // bit 6, shadows bit in SCANLADRHbits
7270 #define LADR15 SCANLADRHbits.LADR15 // bit 7, shadows bit in SCANLADRHbits
7271 #define SCANLADR15 SCANLADRHbits.SCANLADR15 // bit 7, shadows bit in SCANLADRHbits
7273 #define LDAR0 SCANLADRLbits.LDAR0 // bit 0, shadows bit in SCANLADRLbits
7274 #define SCANLADR0 SCANLADRLbits.SCANLADR0 // bit 0, shadows bit in SCANLADRLbits
7275 #define LDAR1 SCANLADRLbits.LDAR1 // bit 1, shadows bit in SCANLADRLbits
7276 #define SCANLADR1 SCANLADRLbits.SCANLADR1 // bit 1, shadows bit in SCANLADRLbits
7277 #define LADR2 SCANLADRLbits.LADR2 // bit 2, shadows bit in SCANLADRLbits
7278 #define SCANLADR2 SCANLADRLbits.SCANLADR2 // bit 2, shadows bit in SCANLADRLbits
7279 #define LADR3 SCANLADRLbits.LADR3 // bit 3, shadows bit in SCANLADRLbits
7280 #define SCANLADR3 SCANLADRLbits.SCANLADR3 // bit 3, shadows bit in SCANLADRLbits
7281 #define LADR4 SCANLADRLbits.LADR4 // bit 4, shadows bit in SCANLADRLbits
7282 #define SCANLADR4 SCANLADRLbits.SCANLADR4 // bit 4, shadows bit in SCANLADRLbits
7283 #define LADR5 SCANLADRLbits.LADR5 // bit 5, shadows bit in SCANLADRLbits
7284 #define SCANLADR5 SCANLADRLbits.SCANLADR5 // bit 5, shadows bit in SCANLADRLbits
7285 #define LADR6 SCANLADRLbits.LADR6 // bit 6, shadows bit in SCANLADRLbits
7286 #define SCANLADR6 SCANLADRLbits.SCANLADR6 // bit 6, shadows bit in SCANLADRLbits
7287 #define LADR7 SCANLADRLbits.LADR7 // bit 7, shadows bit in SCANLADRLbits
7288 #define SCANLADR7 SCANLADRLbits.SCANLADR7 // bit 7, shadows bit in SCANLADRLbits
7290 #define TSEL0 SCANTRIGbits.TSEL0 // bit 0, shadows bit in SCANTRIGbits
7291 #define SCANTSEL0 SCANTRIGbits.SCANTSEL0 // bit 0, shadows bit in SCANTRIGbits
7292 #define TSEL1 SCANTRIGbits.TSEL1 // bit 1, shadows bit in SCANTRIGbits
7293 #define SCANTSEL1 SCANTRIGbits.SCANTSEL1 // bit 1, shadows bit in SCANTRIGbits
7295 #define SLRA0 SLRCONAbits.SLRA0 // bit 0
7296 #define SLRA1 SLRCONAbits.SLRA1 // bit 1
7297 #define SLRA2 SLRCONAbits.SLRA2 // bit 2
7298 #define SLRA4 SLRCONAbits.SLRA4 // bit 4
7299 #define SLRA5 SLRCONAbits.SLRA5 // bit 5
7301 #define SLRC0 SLRCONCbits.SLRC0 // bit 0
7302 #define SLRC1 SLRCONCbits.SLRC1 // bit 1
7303 #define SLRC2 SLRCONCbits.SLRC2 // bit 2
7304 #define SLRC3 SLRCONCbits.SLRC3 // bit 3
7305 #define SLRC4 SLRCONCbits.SLRC4 // bit 4
7306 #define SLRC5 SLRCONCbits.SLRC5 // bit 5
7308 #define CSEL0 SMT1CLKbits.CSEL0 // bit 0, shadows bit in SMT1CLKbits
7309 #define SMT1CSEL0 SMT1CLKbits.SMT1CSEL0 // bit 0, shadows bit in SMT1CLKbits
7310 #define CSEL1 SMT1CLKbits.CSEL1 // bit 1, shadows bit in SMT1CLKbits
7311 #define SMT1CSEL1 SMT1CLKbits.SMT1CSEL1 // bit 1, shadows bit in SMT1CLKbits
7312 #define CSEL2 SMT1CLKbits.CSEL2 // bit 2, shadows bit in SMT1CLKbits
7313 #define SMT1CSEL2 SMT1CLKbits.SMT1CSEL2 // bit 2, shadows bit in SMT1CLKbits
7315 #define SMT1CPR8 SMT1CPRHbits.SMT1CPR8 // bit 0
7316 #define SMT1CPR9 SMT1CPRHbits.SMT1CPR9 // bit 1
7317 #define SMT1CPR10 SMT1CPRHbits.SMT1CPR10 // bit 2
7318 #define SMT1CPR11 SMT1CPRHbits.SMT1CPR11 // bit 3
7319 #define SMT1CPR12 SMT1CPRHbits.SMT1CPR12 // bit 4
7320 #define SMT1CPR13 SMT1CPRHbits.SMT1CPR13 // bit 5
7321 #define SMT1CPR14 SMT1CPRHbits.SMT1CPR14 // bit 6
7322 #define SMT1CPR15 SMT1CPRHbits.SMT1CPR15 // bit 7
7324 #define SMT1CPR0 SMT1CPRLbits.SMT1CPR0 // bit 0
7325 #define SMT1CPR1 SMT1CPRLbits.SMT1CPR1 // bit 1
7326 #define SMT1CPR2 SMT1CPRLbits.SMT1CPR2 // bit 2
7327 #define SMT1CPR3 SMT1CPRLbits.SMT1CPR3 // bit 3
7328 #define SMT1CPR4 SMT1CPRLbits.SMT1CPR4 // bit 4
7329 #define SMT1CPR5 SMT1CPRLbits.SMT1CPR5 // bit 5
7330 #define SMT1CPR6 SMT1CPRLbits.SMT1CPR6 // bit 6
7331 #define SMT1CPR7 SMT1CPRLbits.SMT1CPR7 // bit 7
7333 #define SMT1CPR16 SMT1CPRUbits.SMT1CPR16 // bit 0
7334 #define SMT1CPR17 SMT1CPRUbits.SMT1CPR17 // bit 1
7335 #define SMT1CPR18 SMT1CPRUbits.SMT1CPR18 // bit 2
7336 #define SMT1CPR19 SMT1CPRUbits.SMT1CPR19 // bit 3
7337 #define SMT1CPR20 SMT1CPRUbits.SMT1CPR20 // bit 4
7338 #define SMT1CPR21 SMT1CPRUbits.SMT1CPR21 // bit 5
7339 #define SMT1CPR22 SMT1CPRUbits.SMT1CPR22 // bit 6
7340 #define SMT1CPR23 SMT1CPRUbits.SMT1CPR23 // bit 7
7342 #define SMT1CPW8 SMT1CPWHbits.SMT1CPW8 // bit 0
7343 #define SMT1CPW9 SMT1CPWHbits.SMT1CPW9 // bit 1
7344 #define SMT1CPW10 SMT1CPWHbits.SMT1CPW10 // bit 2
7345 #define SMT1CPW11 SMT1CPWHbits.SMT1CPW11 // bit 3
7346 #define SMT1CPW12 SMT1CPWHbits.SMT1CPW12 // bit 4
7347 #define SMT1CPW13 SMT1CPWHbits.SMT1CPW13 // bit 5
7348 #define SMT1CPW14 SMT1CPWHbits.SMT1CPW14 // bit 6
7349 #define SMT1CPW15 SMT1CPWHbits.SMT1CPW15 // bit 7
7351 #define SMT1CPW0 SMT1CPWLbits.SMT1CPW0 // bit 0
7352 #define SMT1CPW1 SMT1CPWLbits.SMT1CPW1 // bit 1
7353 #define SMT1CPW2 SMT1CPWLbits.SMT1CPW2 // bit 2
7354 #define SMT1CPW3 SMT1CPWLbits.SMT1CPW3 // bit 3
7355 #define SMT1CPW4 SMT1CPWLbits.SMT1CPW4 // bit 4
7356 #define SMT1CPW5 SMT1CPWLbits.SMT1CPW5 // bit 5
7357 #define SMT1CPW6 SMT1CPWLbits.SMT1CPW6 // bit 6
7358 #define SMT1CPW7 SMT1CPWLbits.SMT1CPW7 // bit 7
7360 #define SMT1CPW16 SMT1CPWUbits.SMT1CPW16 // bit 0
7361 #define SMT1CPW17 SMT1CPWUbits.SMT1CPW17 // bit 1
7362 #define SMT1CPW18 SMT1CPWUbits.SMT1CPW18 // bit 2
7363 #define SMT1CPW19 SMT1CPWUbits.SMT1CPW19 // bit 3
7364 #define SMT1CPW20 SMT1CPWUbits.SMT1CPW20 // bit 4
7365 #define SMT1CPW21 SMT1CPWUbits.SMT1CPW21 // bit 5
7366 #define SMT1CPW22 SMT1CPWUbits.SMT1CPW22 // bit 6
7367 #define SMT1CPW23 SMT1CPWUbits.SMT1CPW23 // bit 7
7369 #define SMT1PR8 SMT1PRHbits.SMT1PR8 // bit 0
7370 #define SMT1PR9 SMT1PRHbits.SMT1PR9 // bit 1
7371 #define SMT1PR10 SMT1PRHbits.SMT1PR10 // bit 2
7372 #define SMT1PR11 SMT1PRHbits.SMT1PR11 // bit 3
7373 #define SMT1PR12 SMT1PRHbits.SMT1PR12 // bit 4
7374 #define SMT1PR13 SMT1PRHbits.SMT1PR13 // bit 5
7375 #define SMT1PR14 SMT1PRHbits.SMT1PR14 // bit 6
7376 #define SMT1PR15 SMT1PRHbits.SMT1PR15 // bit 7
7378 #define SMT1PR0 SMT1PRLbits.SMT1PR0 // bit 0
7379 #define SMT1PR1 SMT1PRLbits.SMT1PR1 // bit 1
7380 #define SMT1PR2 SMT1PRLbits.SMT1PR2 // bit 2
7381 #define SMT1PR3 SMT1PRLbits.SMT1PR3 // bit 3
7382 #define SMT1PR4 SMT1PRLbits.SMT1PR4 // bit 4
7383 #define SMT1PR5 SMT1PRLbits.SMT1PR5 // bit 5
7384 #define SMT1PR6 SMT1PRLbits.SMT1PR6 // bit 6
7385 #define SMT1PR7 SMT1PRLbits.SMT1PR7 // bit 7
7387 #define SMT1PR16 SMT1PRUbits.SMT1PR16 // bit 0
7388 #define SMT1PR17 SMT1PRUbits.SMT1PR17 // bit 1
7389 #define SMT1PR18 SMT1PRUbits.SMT1PR18 // bit 2
7390 #define SMT1PR19 SMT1PRUbits.SMT1PR19 // bit 3
7391 #define SMT1PR20 SMT1PRUbits.SMT1PR20 // bit 4
7392 #define SMT1PR21 SMT1PRUbits.SMT1PR21 // bit 5
7393 #define SMT1PR22 SMT1PRUbits.SMT1PR22 // bit 6
7394 #define SMT1PR23 SMT1PRUbits.SMT1PR23 // bit 7
7396 #define SSEL0 SMT1SIGbits.SSEL0 // bit 0, shadows bit in SMT1SIGbits
7397 #define SMT1SSEL0 SMT1SIGbits.SMT1SSEL0 // bit 0, shadows bit in SMT1SIGbits
7398 #define SSEL1 SMT1SIGbits.SSEL1 // bit 1, shadows bit in SMT1SIGbits
7399 #define SMT1SSEL1 SMT1SIGbits.SMT1SSEL1 // bit 1, shadows bit in SMT1SIGbits
7400 #define SSEL2 SMT1SIGbits.SSEL2 // bit 2, shadows bit in SMT1SIGbits
7401 #define SMT1SSEL2 SMT1SIGbits.SMT1SSEL2 // bit 2, shadows bit in SMT1SIGbits
7403 #define AS SMT1STATbits.AS // bit 0, shadows bit in SMT1STATbits
7404 #define SMT1AS SMT1STATbits.SMT1AS // bit 0, shadows bit in SMT1STATbits
7405 #define WS SMT1STATbits.WS // bit 1, shadows bit in SMT1STATbits
7406 #define SMT1WS SMT1STATbits.SMT1WS // bit 1, shadows bit in SMT1STATbits
7407 #define TS SMT1STATbits.TS // bit 2, shadows bit in SMT1STATbits
7408 #define SMT1TS SMT1STATbits.SMT1TS // bit 2, shadows bit in SMT1STATbits
7409 #define RST SMT1STATbits.RST // bit 5, shadows bit in SMT1STATbits
7410 #define SMT1RESET SMT1STATbits.SMT1RESET // bit 5, shadows bit in SMT1STATbits
7411 #define CPWUP SMT1STATbits.CPWUP // bit 6, shadows bit in SMT1STATbits
7412 #define SMT1CPWUP SMT1STATbits.SMT1CPWUP // bit 6, shadows bit in SMT1STATbits
7413 #define CPRUP SMT1STATbits.CPRUP // bit 7, shadows bit in SMT1STATbits
7414 #define SMT1CPRUP SMT1STATbits.SMT1CPRUP // bit 7, shadows bit in SMT1STATbits
7416 #define SMT1TMR8 SMT1TMRHbits.SMT1TMR8 // bit 0
7417 #define SMT1TMR9 SMT1TMRHbits.SMT1TMR9 // bit 1
7418 #define SMT1TMR10 SMT1TMRHbits.SMT1TMR10 // bit 2
7419 #define SMT1TMR11 SMT1TMRHbits.SMT1TMR11 // bit 3
7420 #define SMT1TMR12 SMT1TMRHbits.SMT1TMR12 // bit 4
7421 #define SMT1TMR13 SMT1TMRHbits.SMT1TMR13 // bit 5
7422 #define SMT1TMR14 SMT1TMRHbits.SMT1TMR14 // bit 6
7423 #define SMT1TMR15 SMT1TMRHbits.SMT1TMR15 // bit 7
7425 #define SMT1TMR0 SMT1TMRLbits.SMT1TMR0 // bit 0
7426 #define SMT1TMR1 SMT1TMRLbits.SMT1TMR1 // bit 1
7427 #define SMT1TMR2 SMT1TMRLbits.SMT1TMR2 // bit 2
7428 #define SMT1TMR3 SMT1TMRLbits.SMT1TMR3 // bit 3
7429 #define SMT1TMR4 SMT1TMRLbits.SMT1TMR4 // bit 4
7430 #define SMT1TMR5 SMT1TMRLbits.SMT1TMR5 // bit 5
7431 #define SMT1TMR6 SMT1TMRLbits.SMT1TMR6 // bit 6
7432 #define SMT1TMR7 SMT1TMRLbits.SMT1TMR7 // bit 7
7434 #define SMT1TMR16 SMT1TMRUbits.SMT1TMR16 // bit 0
7435 #define SMT1TMR17 SMT1TMRUbits.SMT1TMR17 // bit 1
7436 #define SMT1TMR18 SMT1TMRUbits.SMT1TMR18 // bit 2
7437 #define SMT1TMR19 SMT1TMRUbits.SMT1TMR19 // bit 3
7438 #define SMT1TMR20 SMT1TMRUbits.SMT1TMR20 // bit 4
7439 #define SMT1TMR21 SMT1TMRUbits.SMT1TMR21 // bit 5
7440 #define SMT1TMR22 SMT1TMRUbits.SMT1TMR22 // bit 6
7441 #define SMT1TMR23 SMT1TMRUbits.SMT1TMR23 // bit 7
7443 #define WSEL0 SMT1WINbits.WSEL0 // bit 0, shadows bit in SMT1WINbits
7444 #define SMT1WSEL0 SMT1WINbits.SMT1WSEL0 // bit 0, shadows bit in SMT1WINbits
7445 #define WSEL1 SMT1WINbits.WSEL1 // bit 1, shadows bit in SMT1WINbits
7446 #define SMT1WSEL1 SMT1WINbits.SMT1WSEL1 // bit 1, shadows bit in SMT1WINbits
7447 #define WSEL2 SMT1WINbits.WSEL2 // bit 2, shadows bit in SMT1WINbits
7448 #define SMT1WSEL2 SMT1WINbits.SMT1WSEL2 // bit 2, shadows bit in SMT1WINbits
7449 #define WSEL3 SMT1WINbits.WSEL3 // bit 3, shadows bit in SMT1WINbits
7450 #define SMT1WSEL3 SMT1WINbits.SMT1WSEL3 // bit 3, shadows bit in SMT1WINbits
7452 #define SMT2CPR8 SMT2CPRHbits.SMT2CPR8 // bit 0
7453 #define SMT2CPR9 SMT2CPRHbits.SMT2CPR9 // bit 1
7454 #define SMT2CPR10 SMT2CPRHbits.SMT2CPR10 // bit 2
7455 #define SMT2CPR11 SMT2CPRHbits.SMT2CPR11 // bit 3
7456 #define SMT2CPR12 SMT2CPRHbits.SMT2CPR12 // bit 4
7457 #define SMT2CPR13 SMT2CPRHbits.SMT2CPR13 // bit 5
7458 #define SMT2CPR14 SMT2CPRHbits.SMT2CPR14 // bit 6
7459 #define SMT2CPR15 SMT2CPRHbits.SMT2CPR15 // bit 7
7461 #define SMT2CPR0 SMT2CPRLbits.SMT2CPR0 // bit 0
7462 #define SMT2CPR1 SMT2CPRLbits.SMT2CPR1 // bit 1
7463 #define SMT2CPR2 SMT2CPRLbits.SMT2CPR2 // bit 2
7464 #define SMT2CPR3 SMT2CPRLbits.SMT2CPR3 // bit 3
7465 #define SMT2CPR4 SMT2CPRLbits.SMT2CPR4 // bit 4
7466 #define SMT2CPR5 SMT2CPRLbits.SMT2CPR5 // bit 5
7467 #define SMT2CPR6 SMT2CPRLbits.SMT2CPR6 // bit 6
7468 #define SMT2CPR7 SMT2CPRLbits.SMT2CPR7 // bit 7
7470 #define SMT2CPR16 SMT2CPRUbits.SMT2CPR16 // bit 0
7471 #define SMT2CPR17 SMT2CPRUbits.SMT2CPR17 // bit 1
7472 #define SMT2CPR18 SMT2CPRUbits.SMT2CPR18 // bit 2
7473 #define SMT2CPR19 SMT2CPRUbits.SMT2CPR19 // bit 3
7474 #define SMT2CPR20 SMT2CPRUbits.SMT2CPR20 // bit 4
7475 #define SMT2CPR21 SMT2CPRUbits.SMT2CPR21 // bit 5
7476 #define SMT2CPR22 SMT2CPRUbits.SMT2CPR22 // bit 6
7477 #define SMT2CPR23 SMT2CPRUbits.SMT2CPR23 // bit 7
7479 #define SMT2CPW8 SMT2CPWHbits.SMT2CPW8 // bit 0
7480 #define SMT2CPW9 SMT2CPWHbits.SMT2CPW9 // bit 1
7481 #define SMT2CPW10 SMT2CPWHbits.SMT2CPW10 // bit 2
7482 #define SMT2CPW11 SMT2CPWHbits.SMT2CPW11 // bit 3
7483 #define SMT2CPW12 SMT2CPWHbits.SMT2CPW12 // bit 4
7484 #define SMT2CPW13 SMT2CPWHbits.SMT2CPW13 // bit 5
7485 #define SMT2CPW14 SMT2CPWHbits.SMT2CPW14 // bit 6
7486 #define SMT2CPW15 SMT2CPWHbits.SMT2CPW15 // bit 7
7488 #define SMT2CPW0 SMT2CPWLbits.SMT2CPW0 // bit 0
7489 #define SMT2CPW1 SMT2CPWLbits.SMT2CPW1 // bit 1
7490 #define SMT2CPW2 SMT2CPWLbits.SMT2CPW2 // bit 2
7491 #define SMT2CPW3 SMT2CPWLbits.SMT2CPW3 // bit 3
7492 #define SMT2CPW4 SMT2CPWLbits.SMT2CPW4 // bit 4
7493 #define SMT2CPW5 SMT2CPWLbits.SMT2CPW5 // bit 5
7494 #define SMT2CPW6 SMT2CPWLbits.SMT2CPW6 // bit 6
7495 #define SMT2CPW7 SMT2CPWLbits.SMT2CPW7 // bit 7
7497 #define SMT2CPW16 SMT2CPWUbits.SMT2CPW16 // bit 0
7498 #define SMT2CPW17 SMT2CPWUbits.SMT2CPW17 // bit 1
7499 #define SMT2CPW18 SMT2CPWUbits.SMT2CPW18 // bit 2
7500 #define SMT2CPW19 SMT2CPWUbits.SMT2CPW19 // bit 3
7501 #define SMT2CPW20 SMT2CPWUbits.SMT2CPW20 // bit 4
7502 #define SMT2CPW21 SMT2CPWUbits.SMT2CPW21 // bit 5
7503 #define SMT2CPW22 SMT2CPWUbits.SMT2CPW22 // bit 6
7504 #define SMT2CPW23 SMT2CPWUbits.SMT2CPW23 // bit 7
7506 #define SMT2PR8 SMT2PRHbits.SMT2PR8 // bit 0
7507 #define SMT2PR9 SMT2PRHbits.SMT2PR9 // bit 1
7508 #define SMT2PR10 SMT2PRHbits.SMT2PR10 // bit 2
7509 #define SMT2PR11 SMT2PRHbits.SMT2PR11 // bit 3
7510 #define SMT2PR12 SMT2PRHbits.SMT2PR12 // bit 4
7511 #define SMT2PR13 SMT2PRHbits.SMT2PR13 // bit 5
7512 #define SMT2PR14 SMT2PRHbits.SMT2PR14 // bit 6
7513 #define SMT2PR15 SMT2PRHbits.SMT2PR15 // bit 7
7515 #define SMT2PR0 SMT2PRLbits.SMT2PR0 // bit 0
7516 #define SMT2PR1 SMT2PRLbits.SMT2PR1 // bit 1
7517 #define SMT2PR2 SMT2PRLbits.SMT2PR2 // bit 2
7518 #define SMT2PR3 SMT2PRLbits.SMT2PR3 // bit 3
7519 #define SMT2PR4 SMT2PRLbits.SMT2PR4 // bit 4
7520 #define SMT2PR5 SMT2PRLbits.SMT2PR5 // bit 5
7521 #define SMT2PR6 SMT2PRLbits.SMT2PR6 // bit 6
7522 #define SMT2PR7 SMT2PRLbits.SMT2PR7 // bit 7
7524 #define SMT2PR16 SMT2PRUbits.SMT2PR16 // bit 0
7525 #define SMT2PR17 SMT2PRUbits.SMT2PR17 // bit 1
7526 #define SMT2PR18 SMT2PRUbits.SMT2PR18 // bit 2
7527 #define SMT2PR19 SMT2PRUbits.SMT2PR19 // bit 3
7528 #define SMT2PR20 SMT2PRUbits.SMT2PR20 // bit 4
7529 #define SMT2PR21 SMT2PRUbits.SMT2PR21 // bit 5
7530 #define SMT2PR22 SMT2PRUbits.SMT2PR22 // bit 6
7531 #define SMT2PR23 SMT2PRUbits.SMT2PR23 // bit 7
7533 #define SMT2TMR8 SMT2TMRHbits.SMT2TMR8 // bit 0
7534 #define SMT2TMR9 SMT2TMRHbits.SMT2TMR9 // bit 1
7535 #define SMT2TMR10 SMT2TMRHbits.SMT2TMR10 // bit 2
7536 #define SMT2TMR11 SMT2TMRHbits.SMT2TMR11 // bit 3
7537 #define SMT2TMR12 SMT2TMRHbits.SMT2TMR12 // bit 4
7538 #define SMT2TMR13 SMT2TMRHbits.SMT2TMR13 // bit 5
7539 #define SMT2TMR14 SMT2TMRHbits.SMT2TMR14 // bit 6
7540 #define SMT2TMR15 SMT2TMRHbits.SMT2TMR15 // bit 7
7542 #define SMT2TMR0 SMT2TMRLbits.SMT2TMR0 // bit 0
7543 #define SMT2TMR1 SMT2TMRLbits.SMT2TMR1 // bit 1
7544 #define SMT2TMR2 SMT2TMRLbits.SMT2TMR2 // bit 2
7545 #define SMT2TMR3 SMT2TMRLbits.SMT2TMR3 // bit 3
7546 #define SMT2TMR4 SMT2TMRLbits.SMT2TMR4 // bit 4
7547 #define SMT2TMR5 SMT2TMRLbits.SMT2TMR5 // bit 5
7548 #define SMT2TMR6 SMT2TMRLbits.SMT2TMR6 // bit 6
7549 #define SMT2TMR7 SMT2TMRLbits.SMT2TMR7 // bit 7
7551 #define SMT2TMR16 SMT2TMRUbits.SMT2TMR16 // bit 0
7552 #define SMT2TMR17 SMT2TMRUbits.SMT2TMR17 // bit 1
7553 #define SMT2TMR18 SMT2TMRUbits.SMT2TMR18 // bit 2
7554 #define SMT2TMR19 SMT2TMRUbits.SMT2TMR19 // bit 3
7555 #define SMT2TMR20 SMT2TMRUbits.SMT2TMR20 // bit 4
7556 #define SMT2TMR21 SMT2TMRUbits.SMT2TMR21 // bit 5
7557 #define SMT2TMR22 SMT2TMRUbits.SMT2TMR22 // bit 6
7558 #define SMT2TMR23 SMT2TMRUbits.SMT2TMR23 // bit 7
7560 #define C STATUSbits.C // bit 0
7561 #define DC STATUSbits.DC // bit 1
7562 #define Z STATUSbits.Z // bit 2
7563 #define NOT_PD STATUSbits.NOT_PD // bit 3
7564 #define NOT_TO STATUSbits.NOT_TO // bit 4
7566 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
7567 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
7568 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
7570 #define TMR1ON T1CONbits.TMR1ON // bit 0
7571 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
7572 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
7573 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
7574 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
7575 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
7577 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
7578 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
7579 #define T1GVAL T1GCONbits.T1GVAL // bit 2
7580 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
7581 #define T1GSPM T1GCONbits.T1GSPM // bit 4
7582 #define T1GTM T1GCONbits.T1GTM // bit 5
7583 #define T1GPOL T1GCONbits.T1GPOL // bit 6
7584 #define TMR1GE T1GCONbits.TMR1GE // bit 7
7586 #define T2CS0 T2CLKCONbits.T2CS0 // bit 0
7587 #define T2CS1 T2CLKCONbits.T2CS1 // bit 1
7588 #define T2CS2 T2CLKCONbits.T2CS2 // bit 2
7590 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 0, shadows bit in T2CONbits
7591 #define OUTPS0 T2CONbits.OUTPS0 // bit 0, shadows bit in T2CONbits
7592 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 1, shadows bit in T2CONbits
7593 #define OUTPS1 T2CONbits.OUTPS1 // bit 1, shadows bit in T2CONbits
7594 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 2, shadows bit in T2CONbits
7595 #define OUTPS2 T2CONbits.OUTPS2 // bit 2, shadows bit in T2CONbits
7596 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 3, shadows bit in T2CONbits
7597 #define OUTPS3 T2CONbits.OUTPS3 // bit 3, shadows bit in T2CONbits
7598 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 4, shadows bit in T2CONbits
7599 #define CKPS0 T2CONbits.CKPS0 // bit 4, shadows bit in T2CONbits
7600 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 5, shadows bit in T2CONbits
7601 #define CKPS1 T2CONbits.CKPS1 // bit 5, shadows bit in T2CONbits
7602 #define T2CKPS2 T2CONbits.T2CKPS2 // bit 6, shadows bit in T2CONbits
7603 #define CKPS2 T2CONbits.CKPS2 // bit 6, shadows bit in T2CONbits
7604 #define ON T2CONbits.ON // bit 7, shadows bit in T2CONbits
7605 #define T2ON T2CONbits.T2ON // bit 7, shadows bit in T2CONbits
7606 #define TMR2ON T2CONbits.TMR2ON // bit 7, shadows bit in T2CONbits
7608 #define RSEL0 T2RSTbits.RSEL0 // bit 0, shadows bit in T2RSTbits
7609 #define T2RSEL0 T2RSTbits.T2RSEL0 // bit 0, shadows bit in T2RSTbits
7610 #define RSEL1 T2RSTbits.RSEL1 // bit 1, shadows bit in T2RSTbits
7611 #define T2RSEL1 T2RSTbits.T2RSEL1 // bit 1, shadows bit in T2RSTbits
7612 #define RSEL2 T2RSTbits.RSEL2 // bit 2, shadows bit in T2RSTbits
7613 #define T2RSEL2 T2RSTbits.T2RSEL2 // bit 2, shadows bit in T2RSTbits
7614 #define RSEL3 T2RSTbits.RSEL3 // bit 3, shadows bit in T2RSTbits
7615 #define T2RSEL3 T2RSTbits.T2RSEL3 // bit 3, shadows bit in T2RSTbits
7617 #define T4CS0 T4CLKCONbits.T4CS0 // bit 0
7618 #define T4CS1 T4CLKCONbits.T4CS1 // bit 1
7619 #define T4CS2 T4CLKCONbits.T4CS2 // bit 2
7621 #define T6CS0 T6CLKCONbits.T6CS0 // bit 0
7622 #define T6CS1 T6CLKCONbits.T6CS1 // bit 1
7623 #define T6CS2 T6CLKCONbits.T6CS2 // bit 2
7625 #define TRISA0 TRISAbits.TRISA0 // bit 0
7626 #define TRISA1 TRISAbits.TRISA1 // bit 1
7627 #define TRISA2 TRISAbits.TRISA2 // bit 2
7628 #define TRISA3 TRISAbits.TRISA3 // bit 3
7629 #define TRISA4 TRISAbits.TRISA4 // bit 4
7630 #define TRISA5 TRISAbits.TRISA5 // bit 5
7632 #define TRISC0 TRISCbits.TRISC0 // bit 0
7633 #define TRISC1 TRISCbits.TRISC1 // bit 1
7634 #define TRISC2 TRISCbits.TRISC2 // bit 2
7635 #define TRISC3 TRISCbits.TRISC3 // bit 3
7636 #define TRISC4 TRISCbits.TRISC4 // bit 4
7637 #define TRISC5 TRISCbits.TRISC5 // bit 5
7639 #define VREGPM0 VREGCONbits.VREGPM0 // bit 0
7640 #define VREGPM1 VREGCONbits.VREGPM1 // bit 1
7642 #define SEN WDTCON0bits.SEN // bit 0, shadows bit in WDTCON0bits
7643 #define SWDTEN WDTCON0bits.SWDTEN // bit 0, shadows bit in WDTCON0bits
7644 #define WDTSEN WDTCON0bits.WDTSEN // bit 0, shadows bit in WDTCON0bits
7645 #define WDTPS0 WDTCON0bits.WDTPS0 // bit 1
7646 #define WDTPS1 WDTCON0bits.WDTPS1 // bit 2
7647 #define WDTPS2 WDTCON0bits.WDTPS2 // bit 3
7648 #define WDTPS3 WDTCON0bits.WDTPS3 // bit 4
7649 #define WDTPS4 WDTCON0bits.WDTPS4 // bit 5
7651 #define WINDOW0 WDTCON1bits.WINDOW0 // bit 0, shadows bit in WDTCON1bits
7652 #define WDTWINDOW0 WDTCON1bits.WDTWINDOW0 // bit 0, shadows bit in WDTCON1bits
7653 #define WINDOW1 WDTCON1bits.WINDOW1 // bit 1, shadows bit in WDTCON1bits
7654 #define WDTWINDOW1 WDTCON1bits.WDTWINDOW1 // bit 1, shadows bit in WDTCON1bits
7655 #define WINDOW2 WDTCON1bits.WINDOW2 // bit 2, shadows bit in WDTCON1bits
7656 #define WDTWINDOW2 WDTCON1bits.WDTWINDOW2 // bit 2, shadows bit in WDTCON1bits
7657 #define WDTCS0 WDTCON1bits.WDTCS0 // bit 4
7658 #define WDTCS1 WDTCON1bits.WDTCS1 // bit 5
7659 #define WDTCS2 WDTCON1bits.WDTCS2 // bit 6
7661 #define PSCNT8 WDTPSHbits.PSCNT8 // bit 0, shadows bit in WDTPSHbits
7662 #define WDTPSCNT8 WDTPSHbits.WDTPSCNT8 // bit 0, shadows bit in WDTPSHbits
7663 #define PSCNT9 WDTPSHbits.PSCNT9 // bit 1, shadows bit in WDTPSHbits
7664 #define WDTPSCNT9 WDTPSHbits.WDTPSCNT9 // bit 1, shadows bit in WDTPSHbits
7665 #define PSCNT10 WDTPSHbits.PSCNT10 // bit 2, shadows bit in WDTPSHbits
7666 #define WDTPSCNT10 WDTPSHbits.WDTPSCNT10 // bit 2, shadows bit in WDTPSHbits
7667 #define PSCNT11 WDTPSHbits.PSCNT11 // bit 3, shadows bit in WDTPSHbits
7668 #define WDTPSCNT11 WDTPSHbits.WDTPSCNT11 // bit 3, shadows bit in WDTPSHbits
7669 #define PSCNT12 WDTPSHbits.PSCNT12 // bit 4, shadows bit in WDTPSHbits
7670 #define WDTPSCNT12 WDTPSHbits.WDTPSCNT12 // bit 4, shadows bit in WDTPSHbits
7671 #define PSCNT13 WDTPSHbits.PSCNT13 // bit 5, shadows bit in WDTPSHbits
7672 #define WDTPSCNT13 WDTPSHbits.WDTPSCNT13 // bit 5, shadows bit in WDTPSHbits
7673 #define PSCNT14 WDTPSHbits.PSCNT14 // bit 6, shadows bit in WDTPSHbits
7674 #define WDTPSCNT14 WDTPSHbits.WDTPSCNT14 // bit 6, shadows bit in WDTPSHbits
7675 #define PSCNT15 WDTPSHbits.PSCNT15 // bit 7, shadows bit in WDTPSHbits
7676 #define WDTPSCNT15 WDTPSHbits.WDTPSCNT15 // bit 7, shadows bit in WDTPSHbits
7678 #define PSCNT0 WDTPSLbits.PSCNT0 // bit 0, shadows bit in WDTPSLbits
7679 #define WDTPSCNT0 WDTPSLbits.WDTPSCNT0 // bit 0, shadows bit in WDTPSLbits
7680 #define PSCNT1 WDTPSLbits.PSCNT1 // bit 1, shadows bit in WDTPSLbits
7681 #define WDTPSCNT1 WDTPSLbits.WDTPSCNT1 // bit 1, shadows bit in WDTPSLbits
7682 #define PSCNT2 WDTPSLbits.PSCNT2 // bit 2, shadows bit in WDTPSLbits
7683 #define WDTPSCNT2 WDTPSLbits.WDTPSCNT2 // bit 2, shadows bit in WDTPSLbits
7684 #define PSCNT3 WDTPSLbits.PSCNT3 // bit 3, shadows bit in WDTPSLbits
7685 #define WDTPSCNT3 WDTPSLbits.WDTPSCNT3 // bit 3, shadows bit in WDTPSLbits
7686 #define PSCNT4 WDTPSLbits.PSCNT4 // bit 4, shadows bit in WDTPSLbits
7687 #define WDTPSCNT4 WDTPSLbits.WDTPSCNT4 // bit 4, shadows bit in WDTPSLbits
7688 #define PSCNT5 WDTPSLbits.PSCNT5 // bit 5, shadows bit in WDTPSLbits
7689 #define WDTPSCNT5 WDTPSLbits.WDTPSCNT5 // bit 5, shadows bit in WDTPSLbits
7690 #define PSCNT6 WDTPSLbits.PSCNT6 // bit 6, shadows bit in WDTPSLbits
7691 #define WDTPSCNT6 WDTPSLbits.WDTPSCNT6 // bit 6, shadows bit in WDTPSLbits
7692 #define PSCNT7 WDTPSLbits.PSCNT7 // bit 7, shadows bit in WDTPSLbits
7693 #define WDTPSCNT7 WDTPSLbits.WDTPSCNT7 // bit 7, shadows bit in WDTPSLbits
7695 #define PSCNT16 WDTTMRbits.PSCNT16 // bit 0, shadows bit in WDTTMRbits
7696 #define WDTPSCNT16 WDTTMRbits.WDTPSCNT16 // bit 0, shadows bit in WDTTMRbits
7697 #define PSCNT17 WDTTMRbits.PSCNT17 // bit 1, shadows bit in WDTTMRbits
7698 #define WDTPSCNT17 WDTTMRbits.WDTPSCNT17 // bit 1, shadows bit in WDTTMRbits
7699 #define STATE WDTTMRbits.STATE // bit 2, shadows bit in WDTTMRbits
7700 #define WDTSTATE WDTTMRbits.WDTSTATE // bit 2, shadows bit in WDTTMRbits
7701 #define WDTTMR0 WDTTMRbits.WDTTMR0 // bit 3
7702 #define WDTTMR1 WDTTMRbits.WDTTMR1 // bit 4
7703 #define WDTTMR2 WDTTMRbits.WDTTMR2 // bit 5
7704 #define WDTTMR3 WDTTMRbits.WDTTMR3 // bit 6
7705 #define WDTTMR4 WDTTMRbits.WDTTMR4 // bit 7
7707 #define WPUA0 WPUAbits.WPUA0 // bit 0
7708 #define WPUA1 WPUAbits.WPUA1 // bit 1
7709 #define WPUA2 WPUAbits.WPUA2 // bit 2
7710 #define WPUA3 WPUAbits.WPUA3 // bit 3
7711 #define WPUA4 WPUAbits.WPUA4 // bit 4
7712 #define WPUA5 WPUAbits.WPUA5 // bit 5
7714 #define WPUC0 WPUCbits.WPUC0 // bit 0
7715 #define WPUC1 WPUCbits.WPUC1 // bit 1
7716 #define WPUC2 WPUCbits.WPUC2 // bit 2
7717 #define WPUC3 WPUCbits.WPUC3 // bit 3
7718 #define WPUC4 WPUCbits.WPUC4 // bit 4
7719 #define WPUC5 WPUCbits.WPUC5 // bit 5
7721 #define ZCD1INTN ZCD1CONbits.ZCD1INTN // bit 0
7722 #define ZCD1INTP ZCD1CONbits.ZCD1INTP // bit 1
7723 #define ZCD1POL ZCD1CONbits.ZCD1POL // bit 4
7724 #define ZCD1OUT ZCD1CONbits.ZCD1OUT // bit 5
7725 #define ZCD1OE ZCD1CONbits.ZCD1OE // bit 6
7726 #define ZCD1EN ZCD1CONbits.ZCD1EN // bit 7
7728 #endif // #ifndef NO_BIT_DEFINES
7730 #endif // #ifndef __PIC16F1613_H__