Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f18313.h
blob68862610a54b9694e6c1b16335226b6ae9982b9f
1 /*
2 * This declarations of the PIC16F18313 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:23 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 __PIC16F18313_H__
26 #define __PIC16F18313_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 PIR0_ADDR 0x0010
52 #define PIR1_ADDR 0x0011
53 #define PIR2_ADDR 0x0012
54 #define PIR3_ADDR 0x0013
55 #define PIR4_ADDR 0x0014
56 #define TMR0L_ADDR 0x0015
57 #define TMR0H_ADDR 0x0016
58 #define T0CON0_ADDR 0x0017
59 #define T0CON1_ADDR 0x0018
60 #define TMR1_ADDR 0x0019
61 #define TMR1L_ADDR 0x0019
62 #define TMR1H_ADDR 0x001A
63 #define T1CON_ADDR 0x001B
64 #define T1GCON_ADDR 0x001C
65 #define TMR2_ADDR 0x001D
66 #define PR2_ADDR 0x001E
67 #define T2CON_ADDR 0x001F
68 #define TRISA_ADDR 0x008C
69 #define PIE0_ADDR 0x0090
70 #define PIE1_ADDR 0x0091
71 #define PIE2_ADDR 0x0092
72 #define PIE3_ADDR 0x0093
73 #define PIE4_ADDR 0x0094
74 #define WDTCON_ADDR 0x0097
75 #define ADRES_ADDR 0x009B
76 #define ADRESL_ADDR 0x009B
77 #define ADRESH_ADDR 0x009C
78 #define ADCON0_ADDR 0x009D
79 #define ADCON1_ADDR 0x009E
80 #define ADACT_ADDR 0x009F
81 #define LATA_ADDR 0x010C
82 #define CM1CON0_ADDR 0x0111
83 #define CM1CON1_ADDR 0x0112
84 #define CMOUT_ADDR 0x0115
85 #define BORCON_ADDR 0x0116
86 #define FVRCON_ADDR 0x0117
87 #define DACCON0_ADDR 0x0118
88 #define DACCON1_ADDR 0x0119
89 #define ANSELA_ADDR 0x018C
90 #define VREGCON_ADDR 0x0197
91 #define RC1REG_ADDR 0x0199
92 #define RCREG_ADDR 0x0199
93 #define RCREG1_ADDR 0x0199
94 #define TX1REG_ADDR 0x019A
95 #define TXREG_ADDR 0x019A
96 #define TXREG1_ADDR 0x019A
97 #define SP1BRG_ADDR 0x019B
98 #define SP1BRGL_ADDR 0x019B
99 #define SPBRG_ADDR 0x019B
100 #define SPBRG1_ADDR 0x019B
101 #define SPBRGL_ADDR 0x019B
102 #define SP1BRGH_ADDR 0x019C
103 #define SPBRGH_ADDR 0x019C
104 #define SPBRGH1_ADDR 0x019C
105 #define RC1STA_ADDR 0x019D
106 #define RCSTA_ADDR 0x019D
107 #define RCSTA1_ADDR 0x019D
108 #define TX1STA_ADDR 0x019E
109 #define TXSTA_ADDR 0x019E
110 #define TXSTA1_ADDR 0x019E
111 #define BAUD1CON_ADDR 0x019F
112 #define BAUDCON_ADDR 0x019F
113 #define BAUDCON1_ADDR 0x019F
114 #define BAUDCTL_ADDR 0x019F
115 #define BAUDCTL1_ADDR 0x019F
116 #define WPUA_ADDR 0x020C
117 #define SSP1BUF_ADDR 0x0211
118 #define SSPBUF_ADDR 0x0211
119 #define SSP1ADD_ADDR 0x0212
120 #define SSPADD_ADDR 0x0212
121 #define SSP1MSK_ADDR 0x0213
122 #define SSPMSK_ADDR 0x0213
123 #define SSP1STAT_ADDR 0x0214
124 #define SSPSTAT_ADDR 0x0214
125 #define SSP1CON_ADDR 0x0215
126 #define SSP1CON1_ADDR 0x0215
127 #define SSPCON_ADDR 0x0215
128 #define SSPCON1_ADDR 0x0215
129 #define SSP1CON2_ADDR 0x0216
130 #define SSPCON2_ADDR 0x0216
131 #define SSP1CON3_ADDR 0x0217
132 #define SSPCON3_ADDR 0x0217
133 #define ODCONA_ADDR 0x028C
134 #define CCPR1_ADDR 0x0291
135 #define CCPR1L_ADDR 0x0291
136 #define CCPR1H_ADDR 0x0292
137 #define CCP1CON_ADDR 0x0293
138 #define CCP1CAP_ADDR 0x0294
139 #define CCPR2_ADDR 0x0295
140 #define CCPR2L_ADDR 0x0295
141 #define CCPR2H_ADDR 0x0296
142 #define CCP2CON_ADDR 0x0297
143 #define CCP2CAP_ADDR 0x0298
144 #define CCPTMRS_ADDR 0x029F
145 #define SLRCONA_ADDR 0x030C
146 #define INLVLA_ADDR 0x038C
147 #define IOCAP_ADDR 0x0391
148 #define IOCAN_ADDR 0x0392
149 #define IOCAF_ADDR 0x0393
150 #define CLKRCON_ADDR 0x039A
151 #define MDCON_ADDR 0x039C
152 #define MDSRC_ADDR 0x039D
153 #define MDCARH_ADDR 0x039E
154 #define MDCARL_ADDR 0x039F
155 #define CCDNA_ADDR 0x040C
156 #define CCDCON_ADDR 0x041F
157 #define CCDPA_ADDR 0x048C
158 #define NCO1ACC_ADDR 0x0498
159 #define NCO1ACCL_ADDR 0x0498
160 #define NCO1ACCH_ADDR 0x0499
161 #define NCO1ACCU_ADDR 0x049A
162 #define NCO1INC_ADDR 0x049B
163 #define NCO1INCL_ADDR 0x049B
164 #define NCO1INCH_ADDR 0x049C
165 #define NCO1INCU_ADDR 0x049D
166 #define NCO1CON_ADDR 0x049E
167 #define NCO1CLK_ADDR 0x049F
168 #define PWM5DCL_ADDR 0x0617
169 #define PWM5DCH_ADDR 0x0618
170 #define PWM5CON_ADDR 0x0619
171 #define PWM5CON0_ADDR 0x0619
172 #define PWM6DCL_ADDR 0x061A
173 #define PWM6DCH_ADDR 0x061B
174 #define PWM6CON_ADDR 0x061C
175 #define PWM6CON0_ADDR 0x061C
176 #define CWG1CLKCON_ADDR 0x0691
177 #define CWG1DAT_ADDR 0x0692
178 #define CWG1DBR_ADDR 0x0693
179 #define CWG1DBF_ADDR 0x0694
180 #define CWG1CON0_ADDR 0x0695
181 #define CWG1CON1_ADDR 0x0696
182 #define CWG1AS0_ADDR 0x0697
183 #define CWG1AS1_ADDR 0x0698
184 #define CWG1STR_ADDR 0x0699
185 #define NVMADR_ADDR 0x0891
186 #define NVMADRL_ADDR 0x0891
187 #define NVMADRH_ADDR 0x0892
188 #define NVMDAT_ADDR 0x0893
189 #define NVMDATL_ADDR 0x0893
190 #define NVMDATH_ADDR 0x0894
191 #define NVMCON1_ADDR 0x0895
192 #define NVMCON2_ADDR 0x0896
193 #define PCON0_ADDR 0x089B
194 #define PMD0_ADDR 0x0911
195 #define PMD1_ADDR 0x0912
196 #define PMD2_ADDR 0x0913
197 #define PMD3_ADDR 0x0914
198 #define PMD4_ADDR 0x0915
199 #define PMD5_ADDR 0x0916
200 #define CPUDOZE_ADDR 0x0918
201 #define OSCCON1_ADDR 0x0919
202 #define OSCCON2_ADDR 0x091A
203 #define OSCCON3_ADDR 0x091B
204 #define OSCSTAT1_ADDR 0x091C
205 #define OSCEN_ADDR 0x091D
206 #define OSCTUNE_ADDR 0x091E
207 #define OSCFRQ_ADDR 0x091F
208 #define PPSLOCK_ADDR 0x0E0F
209 #define INTPPS_ADDR 0x0E10
210 #define T0CKIPPS_ADDR 0x0E11
211 #define T1CKIPPS_ADDR 0x0E12
212 #define T1GPPS_ADDR 0x0E13
213 #define CCP1PPS_ADDR 0x0E14
214 #define CCP2PPS_ADDR 0x0E15
215 #define CWG1PPS_ADDR 0x0E18
216 #define MDCIN1PPS_ADDR 0x0E1A
217 #define MDCIN2PPS_ADDR 0x0E1B
218 #define MDMINPPS_ADDR 0x0E1C
219 #define SSP1CLKPPS_ADDR 0x0E20
220 #define SSP1DATPPS_ADDR 0x0E21
221 #define SSP1SSPPS_ADDR 0x0E22
222 #define RXPPS_ADDR 0x0E24
223 #define TXPPS_ADDR 0x0E25
224 #define CLCIN0PPS_ADDR 0x0E28
225 #define CLCIN1PPS_ADDR 0x0E29
226 #define CLCIN2PPS_ADDR 0x0E2A
227 #define CLCIN3PPS_ADDR 0x0E2B
228 #define RA0PPS_ADDR 0x0E90
229 #define RA1PPS_ADDR 0x0E91
230 #define RA2PPS_ADDR 0x0E92
231 #define RA4PPS_ADDR 0x0E94
232 #define RA5PPS_ADDR 0x0E95
233 #define CLCDATA_ADDR 0x0F0F
234 #define CLC1CON_ADDR 0x0F10
235 #define CLC1POL_ADDR 0x0F11
236 #define CLC1SEL0_ADDR 0x0F12
237 #define CLC1SEL1_ADDR 0x0F13
238 #define CLC1SEL2_ADDR 0x0F14
239 #define CLC1SEL3_ADDR 0x0F15
240 #define CLC1GLS0_ADDR 0x0F16
241 #define CLC1GLS1_ADDR 0x0F17
242 #define CLC1GLS2_ADDR 0x0F18
243 #define CLC1GLS3_ADDR 0x0F19
244 #define CLC2CON_ADDR 0x0F1A
245 #define CLC2POL_ADDR 0x0F1B
246 #define CLC2SEL0_ADDR 0x0F1C
247 #define CLC2SEL1_ADDR 0x0F1D
248 #define CLC2SEL2_ADDR 0x0F1E
249 #define CLC2SEL3_ADDR 0x0F1F
250 #define CLC2GLS0_ADDR 0x0F20
251 #define CLC2GLS1_ADDR 0x0F21
252 #define CLC2GLS2_ADDR 0x0F22
253 #define CLC2GLS3_ADDR 0x0F23
254 #define STATUS_SHAD_ADDR 0x0FE4
255 #define WREG_SHAD_ADDR 0x0FE5
256 #define BSR_SHAD_ADDR 0x0FE6
257 #define PCLATH_SHAD_ADDR 0x0FE7
258 #define FSR0L_SHAD_ADDR 0x0FE8
259 #define FSR0H_SHAD_ADDR 0x0FE9
260 #define FSR1L_SHAD_ADDR 0x0FEA
261 #define FSR1H_SHAD_ADDR 0x0FEB
262 #define STKPTR_ADDR 0x0FED
263 #define TOSL_ADDR 0x0FEE
264 #define TOSH_ADDR 0x0FEF
266 #endif // #ifndef NO_ADDR_DEFINES
268 //==============================================================================
270 // Register Definitions
272 //==============================================================================
274 extern __at(0x0000) __sfr INDF0;
275 extern __at(0x0001) __sfr INDF1;
276 extern __at(0x0002) __sfr PCL;
278 //==============================================================================
279 // STATUS Bits
281 extern __at(0x0003) __sfr STATUS;
283 typedef struct
285 unsigned C : 1;
286 unsigned DC : 1;
287 unsigned Z : 1;
288 unsigned NOT_PD : 1;
289 unsigned NOT_TO : 1;
290 unsigned : 1;
291 unsigned : 1;
292 unsigned : 1;
293 } __STATUSbits_t;
295 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
297 #define _C 0x01
298 #define _DC 0x02
299 #define _Z 0x04
300 #define _NOT_PD 0x08
301 #define _NOT_TO 0x10
303 //==============================================================================
305 extern __at(0x0004) __sfr FSR0;
306 extern __at(0x0004) __sfr FSR0L;
307 extern __at(0x0005) __sfr FSR0H;
308 extern __at(0x0006) __sfr FSR1;
309 extern __at(0x0006) __sfr FSR1L;
310 extern __at(0x0007) __sfr FSR1H;
312 //==============================================================================
313 // BSR Bits
315 extern __at(0x0008) __sfr BSR;
317 typedef union
319 struct
321 unsigned BSR0 : 1;
322 unsigned BSR1 : 1;
323 unsigned BSR2 : 1;
324 unsigned BSR3 : 1;
325 unsigned BSR4 : 1;
326 unsigned : 1;
327 unsigned : 1;
328 unsigned : 1;
331 struct
333 unsigned BSR : 5;
334 unsigned : 3;
336 } __BSRbits_t;
338 extern __at(0x0008) volatile __BSRbits_t BSRbits;
340 #define _BSR0 0x01
341 #define _BSR1 0x02
342 #define _BSR2 0x04
343 #define _BSR3 0x08
344 #define _BSR4 0x10
346 //==============================================================================
348 extern __at(0x0009) __sfr WREG;
349 extern __at(0x000A) __sfr PCLATH;
351 //==============================================================================
352 // INTCON Bits
354 extern __at(0x000B) __sfr INTCON;
356 typedef struct
358 unsigned INTEDG : 1;
359 unsigned : 1;
360 unsigned : 1;
361 unsigned : 1;
362 unsigned : 1;
363 unsigned : 1;
364 unsigned PEIE : 1;
365 unsigned GIE : 1;
366 } __INTCONbits_t;
368 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
370 #define _INTEDG 0x01
371 #define _PEIE 0x40
372 #define _GIE 0x80
374 //==============================================================================
377 //==============================================================================
378 // PORTA Bits
380 extern __at(0x000C) __sfr PORTA;
382 typedef union
384 struct
386 unsigned RA0 : 1;
387 unsigned RA1 : 1;
388 unsigned RA2 : 1;
389 unsigned RA3 : 1;
390 unsigned RA4 : 1;
391 unsigned RA5 : 1;
392 unsigned : 1;
393 unsigned : 1;
396 struct
398 unsigned RA : 6;
399 unsigned : 2;
401 } __PORTAbits_t;
403 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
405 #define _RA0 0x01
406 #define _RA1 0x02
407 #define _RA2 0x04
408 #define _RA3 0x08
409 #define _RA4 0x10
410 #define _RA5 0x20
412 //==============================================================================
415 //==============================================================================
416 // PIR0 Bits
418 extern __at(0x0010) __sfr PIR0;
420 typedef struct
422 unsigned INTF : 1;
423 unsigned : 1;
424 unsigned : 1;
425 unsigned : 1;
426 unsigned IOCIF : 1;
427 unsigned TMR0IF : 1;
428 unsigned : 1;
429 unsigned : 1;
430 } __PIR0bits_t;
432 extern __at(0x0010) volatile __PIR0bits_t PIR0bits;
434 #define _INTF 0x01
435 #define _IOCIF 0x10
436 #define _TMR0IF 0x20
438 //==============================================================================
441 //==============================================================================
442 // PIR1 Bits
444 extern __at(0x0011) __sfr PIR1;
446 typedef struct
448 unsigned TMR1IF : 1;
449 unsigned TMR2IF : 1;
450 unsigned BCL1IF : 1;
451 unsigned SSP1IF : 1;
452 unsigned TXIF : 1;
453 unsigned RCIF : 1;
454 unsigned ADIF : 1;
455 unsigned TMR1GIF : 1;
456 } __PIR1bits_t;
458 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
460 #define _TMR1IF 0x01
461 #define _TMR2IF 0x02
462 #define _BCL1IF 0x04
463 #define _SSP1IF 0x08
464 #define _TXIF 0x10
465 #define _RCIF 0x20
466 #define _ADIF 0x40
467 #define _TMR1GIF 0x80
469 //==============================================================================
472 //==============================================================================
473 // PIR2 Bits
475 extern __at(0x0012) __sfr PIR2;
477 typedef struct
479 unsigned NCO1IF : 1;
480 unsigned : 1;
481 unsigned : 1;
482 unsigned : 1;
483 unsigned NVMIF : 1;
484 unsigned C1IF : 1;
485 unsigned : 1;
486 unsigned : 1;
487 } __PIR2bits_t;
489 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
491 #define _NCO1IF 0x01
492 #define _NVMIF 0x10
493 #define _C1IF 0x20
495 //==============================================================================
498 //==============================================================================
499 // PIR3 Bits
501 extern __at(0x0013) __sfr PIR3;
503 typedef struct
505 unsigned CLC1IF : 1;
506 unsigned CLC2IF : 1;
507 unsigned : 1;
508 unsigned : 1;
509 unsigned : 1;
510 unsigned : 1;
511 unsigned CSWIF : 1;
512 unsigned OSFIF : 1;
513 } __PIR3bits_t;
515 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
517 #define _CLC1IF 0x01
518 #define _CLC2IF 0x02
519 #define _CSWIF 0x40
520 #define _OSFIF 0x80
522 //==============================================================================
525 //==============================================================================
526 // PIR4 Bits
528 extern __at(0x0014) __sfr PIR4;
530 typedef struct
532 unsigned CCP1IF : 1;
533 unsigned CCP2IF : 1;
534 unsigned : 1;
535 unsigned : 1;
536 unsigned : 1;
537 unsigned : 1;
538 unsigned CWG1IF : 1;
539 unsigned : 1;
540 } __PIR4bits_t;
542 extern __at(0x0014) volatile __PIR4bits_t PIR4bits;
544 #define _CCP1IF 0x01
545 #define _CCP2IF 0x02
546 #define _CWG1IF 0x40
548 //==============================================================================
551 //==============================================================================
552 // TMR0L Bits
554 extern __at(0x0015) __sfr TMR0L;
556 typedef struct
558 unsigned TMR00 : 1;
559 unsigned TMR01 : 1;
560 unsigned TMR02 : 1;
561 unsigned TMR03 : 1;
562 unsigned TMR04 : 1;
563 unsigned TMR05 : 1;
564 unsigned TMR06 : 1;
565 unsigned TMR07 : 1;
566 } __TMR0Lbits_t;
568 extern __at(0x0015) volatile __TMR0Lbits_t TMR0Lbits;
570 #define _TMR00 0x01
571 #define _TMR01 0x02
572 #define _TMR02 0x04
573 #define _TMR03 0x08
574 #define _TMR04 0x10
575 #define _TMR05 0x20
576 #define _TMR06 0x40
577 #define _TMR07 0x80
579 //==============================================================================
582 //==============================================================================
583 // TMR0H Bits
585 extern __at(0x0016) __sfr TMR0H;
587 typedef struct
589 unsigned TMR08 : 1;
590 unsigned TMR09 : 1;
591 unsigned TMR010 : 1;
592 unsigned TMR011 : 1;
593 unsigned TMR012 : 1;
594 unsigned TMR013 : 1;
595 unsigned TMR014 : 1;
596 unsigned TMR015 : 1;
597 } __TMR0Hbits_t;
599 extern __at(0x0016) volatile __TMR0Hbits_t TMR0Hbits;
601 #define _TMR08 0x01
602 #define _TMR09 0x02
603 #define _TMR010 0x04
604 #define _TMR011 0x08
605 #define _TMR012 0x10
606 #define _TMR013 0x20
607 #define _TMR014 0x40
608 #define _TMR015 0x80
610 //==============================================================================
613 //==============================================================================
614 // T0CON0 Bits
616 extern __at(0x0017) __sfr T0CON0;
618 typedef union
620 struct
622 unsigned T0OUTPS0 : 1;
623 unsigned T0OUTPS1 : 1;
624 unsigned T0OUTPS2 : 1;
625 unsigned T0OUTPS3 : 1;
626 unsigned T016BIT : 1;
627 unsigned T0OUT : 1;
628 unsigned : 1;
629 unsigned T0EN : 1;
632 struct
634 unsigned T0OUTPS : 4;
635 unsigned : 4;
637 } __T0CON0bits_t;
639 extern __at(0x0017) volatile __T0CON0bits_t T0CON0bits;
641 #define _T0OUTPS0 0x01
642 #define _T0OUTPS1 0x02
643 #define _T0OUTPS2 0x04
644 #define _T0OUTPS3 0x08
645 #define _T016BIT 0x10
646 #define _T0OUT 0x20
647 #define _T0EN 0x80
649 //==============================================================================
652 //==============================================================================
653 // T0CON1 Bits
655 extern __at(0x0018) __sfr T0CON1;
657 typedef union
659 struct
661 unsigned T0CKPS0 : 1;
662 unsigned T0CKPS1 : 1;
663 unsigned T0CKPS2 : 1;
664 unsigned T0CKPS3 : 1;
665 unsigned T0ASYNC : 1;
666 unsigned T0CS0 : 1;
667 unsigned T0CS1 : 1;
668 unsigned T0CS2 : 1;
671 struct
673 unsigned T0CKPS : 4;
674 unsigned : 4;
677 struct
679 unsigned : 5;
680 unsigned T0CS : 3;
682 } __T0CON1bits_t;
684 extern __at(0x0018) volatile __T0CON1bits_t T0CON1bits;
686 #define _T0CKPS0 0x01
687 #define _T0CKPS1 0x02
688 #define _T0CKPS2 0x04
689 #define _T0CKPS3 0x08
690 #define _T0ASYNC 0x10
691 #define _T0CS0 0x20
692 #define _T0CS1 0x40
693 #define _T0CS2 0x80
695 //==============================================================================
697 extern __at(0x0019) __sfr TMR1;
698 extern __at(0x0019) __sfr TMR1L;
699 extern __at(0x001A) __sfr TMR1H;
701 //==============================================================================
702 // T1CON Bits
704 extern __at(0x001B) __sfr T1CON;
706 typedef union
708 struct
710 unsigned TMR1ON : 1;
711 unsigned : 1;
712 unsigned T1SYNC : 1;
713 unsigned T1SOSC : 1;
714 unsigned T1CKPS0 : 1;
715 unsigned T1CKPS1 : 1;
716 unsigned TMR1CS0 : 1;
717 unsigned TMR1CS1 : 1;
720 struct
722 unsigned : 4;
723 unsigned T1CKPS : 2;
724 unsigned : 2;
727 struct
729 unsigned : 6;
730 unsigned TMR1CS : 2;
732 } __T1CONbits_t;
734 extern __at(0x001B) volatile __T1CONbits_t T1CONbits;
736 #define _TMR1ON 0x01
737 #define _T1SYNC 0x04
738 #define _T1SOSC 0x08
739 #define _T1CKPS0 0x10
740 #define _T1CKPS1 0x20
741 #define _TMR1CS0 0x40
742 #define _TMR1CS1 0x80
744 //==============================================================================
747 //==============================================================================
748 // T1GCON Bits
750 extern __at(0x001C) __sfr T1GCON;
752 typedef union
754 struct
756 unsigned T1GSS0 : 1;
757 unsigned T1GSS1 : 1;
758 unsigned T1GVAL : 1;
759 unsigned T1GGO_NOT_DONE : 1;
760 unsigned T1GSPM : 1;
761 unsigned T1GTM : 1;
762 unsigned T1GPOL : 1;
763 unsigned TMR1GE : 1;
766 struct
768 unsigned T1GSS : 2;
769 unsigned : 6;
771 } __T1GCONbits_t;
773 extern __at(0x001C) volatile __T1GCONbits_t T1GCONbits;
775 #define _T1GSS0 0x01
776 #define _T1GSS1 0x02
777 #define _T1GVAL 0x04
778 #define _T1GGO_NOT_DONE 0x08
779 #define _T1GSPM 0x10
780 #define _T1GTM 0x20
781 #define _T1GPOL 0x40
782 #define _TMR1GE 0x80
784 //==============================================================================
786 extern __at(0x001D) __sfr TMR2;
787 extern __at(0x001E) __sfr PR2;
789 //==============================================================================
790 // T2CON Bits
792 extern __at(0x001F) __sfr T2CON;
794 typedef union
796 struct
798 unsigned T2CKPS0 : 1;
799 unsigned T2CKPS1 : 1;
800 unsigned TMR2ON : 1;
801 unsigned T2OUTPS0 : 1;
802 unsigned T2OUTPS1 : 1;
803 unsigned T2OUTPS2 : 1;
804 unsigned T2OUTPS3 : 1;
805 unsigned : 1;
808 struct
810 unsigned T2CKPS : 2;
811 unsigned : 6;
814 struct
816 unsigned : 3;
817 unsigned T2OUTPS : 4;
818 unsigned : 1;
820 } __T2CONbits_t;
822 extern __at(0x001F) volatile __T2CONbits_t T2CONbits;
824 #define _T2CKPS0 0x01
825 #define _T2CKPS1 0x02
826 #define _TMR2ON 0x04
827 #define _T2OUTPS0 0x08
828 #define _T2OUTPS1 0x10
829 #define _T2OUTPS2 0x20
830 #define _T2OUTPS3 0x40
832 //==============================================================================
835 //==============================================================================
836 // TRISA Bits
838 extern __at(0x008C) __sfr TRISA;
840 typedef struct
842 unsigned TRISA0 : 1;
843 unsigned TRISA1 : 1;
844 unsigned TRISA2 : 1;
845 unsigned : 1;
846 unsigned TRISA4 : 1;
847 unsigned TRISA5 : 1;
848 unsigned : 1;
849 unsigned : 1;
850 } __TRISAbits_t;
852 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
854 #define _TRISA0 0x01
855 #define _TRISA1 0x02
856 #define _TRISA2 0x04
857 #define _TRISA4 0x10
858 #define _TRISA5 0x20
860 //==============================================================================
863 //==============================================================================
864 // PIE0 Bits
866 extern __at(0x0090) __sfr PIE0;
868 typedef struct
870 unsigned INTE : 1;
871 unsigned : 1;
872 unsigned : 1;
873 unsigned : 1;
874 unsigned IOCIE : 1;
875 unsigned TMR0IE : 1;
876 unsigned : 1;
877 unsigned : 1;
878 } __PIE0bits_t;
880 extern __at(0x0090) volatile __PIE0bits_t PIE0bits;
882 #define _INTE 0x01
883 #define _IOCIE 0x10
884 #define _TMR0IE 0x20
886 //==============================================================================
889 //==============================================================================
890 // PIE1 Bits
892 extern __at(0x0091) __sfr PIE1;
894 typedef struct
896 unsigned TMR1IE : 1;
897 unsigned TMR2IE : 1;
898 unsigned BCL1IE : 1;
899 unsigned SSP1IE : 1;
900 unsigned TXIE : 1;
901 unsigned RCIE : 1;
902 unsigned ADIE : 1;
903 unsigned TMR1GIE : 1;
904 } __PIE1bits_t;
906 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
908 #define _TMR1IE 0x01
909 #define _TMR2IE 0x02
910 #define _BCL1IE 0x04
911 #define _SSP1IE 0x08
912 #define _TXIE 0x10
913 #define _RCIE 0x20
914 #define _ADIE 0x40
915 #define _TMR1GIE 0x80
917 //==============================================================================
920 //==============================================================================
921 // PIE2 Bits
923 extern __at(0x0092) __sfr PIE2;
925 typedef struct
927 unsigned NCO1IE : 1;
928 unsigned : 1;
929 unsigned : 1;
930 unsigned : 1;
931 unsigned NVMIE : 1;
932 unsigned C1IE : 1;
933 unsigned : 1;
934 unsigned : 1;
935 } __PIE2bits_t;
937 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
939 #define _NCO1IE 0x01
940 #define _NVMIE 0x10
941 #define _C1IE 0x20
943 //==============================================================================
946 //==============================================================================
947 // PIE3 Bits
949 extern __at(0x0093) __sfr PIE3;
951 typedef struct
953 unsigned CLC1IE : 1;
954 unsigned CLC2IE : 1;
955 unsigned : 1;
956 unsigned : 1;
957 unsigned : 1;
958 unsigned : 1;
959 unsigned CSWIE : 1;
960 unsigned OSFIE : 1;
961 } __PIE3bits_t;
963 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
965 #define _CLC1IE 0x01
966 #define _CLC2IE 0x02
967 #define _CSWIE 0x40
968 #define _OSFIE 0x80
970 //==============================================================================
973 //==============================================================================
974 // PIE4 Bits
976 extern __at(0x0094) __sfr PIE4;
978 typedef struct
980 unsigned CCP1IE : 1;
981 unsigned CCP2IE : 1;
982 unsigned : 1;
983 unsigned : 1;
984 unsigned : 1;
985 unsigned : 1;
986 unsigned CWG1IE : 1;
987 unsigned : 1;
988 } __PIE4bits_t;
990 extern __at(0x0094) volatile __PIE4bits_t PIE4bits;
992 #define _CCP1IE 0x01
993 #define _CCP2IE 0x02
994 #define _CWG1IE 0x40
996 //==============================================================================
999 //==============================================================================
1000 // WDTCON Bits
1002 extern __at(0x0097) __sfr WDTCON;
1004 typedef union
1006 struct
1008 unsigned SWDTEN : 1;
1009 unsigned WDTPS0 : 1;
1010 unsigned WDTPS1 : 1;
1011 unsigned WDTPS2 : 1;
1012 unsigned WDTPS3 : 1;
1013 unsigned WDTPS4 : 1;
1014 unsigned : 1;
1015 unsigned : 1;
1018 struct
1020 unsigned : 1;
1021 unsigned WDTPS : 5;
1022 unsigned : 2;
1024 } __WDTCONbits_t;
1026 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1028 #define _SWDTEN 0x01
1029 #define _WDTPS0 0x02
1030 #define _WDTPS1 0x04
1031 #define _WDTPS2 0x08
1032 #define _WDTPS3 0x10
1033 #define _WDTPS4 0x20
1035 //==============================================================================
1037 extern __at(0x009B) __sfr ADRES;
1038 extern __at(0x009B) __sfr ADRESL;
1039 extern __at(0x009C) __sfr ADRESH;
1041 //==============================================================================
1042 // ADCON0 Bits
1044 extern __at(0x009D) __sfr ADCON0;
1046 typedef union
1048 struct
1050 unsigned ADON : 1;
1051 unsigned GO_NOT_DONE : 1;
1052 unsigned CHS0 : 1;
1053 unsigned CHS1 : 1;
1054 unsigned CHS2 : 1;
1055 unsigned CHS3 : 1;
1056 unsigned CHS4 : 1;
1057 unsigned CHS5 : 1;
1060 struct
1062 unsigned : 1;
1063 unsigned ADGO : 1;
1064 unsigned : 1;
1065 unsigned : 1;
1066 unsigned : 1;
1067 unsigned : 1;
1068 unsigned : 1;
1069 unsigned : 1;
1072 struct
1074 unsigned : 1;
1075 unsigned GO : 1;
1076 unsigned : 1;
1077 unsigned : 1;
1078 unsigned : 1;
1079 unsigned : 1;
1080 unsigned : 1;
1081 unsigned : 1;
1084 struct
1086 unsigned : 2;
1087 unsigned CHS : 6;
1089 } __ADCON0bits_t;
1091 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1093 #define _ADON 0x01
1094 #define _GO_NOT_DONE 0x02
1095 #define _ADGO 0x02
1096 #define _GO 0x02
1097 #define _CHS0 0x04
1098 #define _CHS1 0x08
1099 #define _CHS2 0x10
1100 #define _CHS3 0x20
1101 #define _CHS4 0x40
1102 #define _CHS5 0x80
1104 //==============================================================================
1107 //==============================================================================
1108 // ADCON1 Bits
1110 extern __at(0x009E) __sfr ADCON1;
1112 typedef union
1114 struct
1116 unsigned ADPREF0 : 1;
1117 unsigned ADPREF1 : 1;
1118 unsigned ADNREF : 1;
1119 unsigned : 1;
1120 unsigned ADCS0 : 1;
1121 unsigned ADCS1 : 1;
1122 unsigned ADCS2 : 1;
1123 unsigned ADFM : 1;
1126 struct
1128 unsigned ADPREF : 2;
1129 unsigned : 6;
1132 struct
1134 unsigned : 4;
1135 unsigned ADCS : 3;
1136 unsigned : 1;
1138 } __ADCON1bits_t;
1140 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1142 #define _ADPREF0 0x01
1143 #define _ADPREF1 0x02
1144 #define _ADNREF 0x04
1145 #define _ADCS0 0x10
1146 #define _ADCS1 0x20
1147 #define _ADCS2 0x40
1148 #define _ADFM 0x80
1150 //==============================================================================
1153 //==============================================================================
1154 // ADACT Bits
1156 extern __at(0x009F) __sfr ADACT;
1158 typedef union
1160 struct
1162 unsigned ADACT0 : 1;
1163 unsigned ADACT1 : 1;
1164 unsigned ADACT2 : 1;
1165 unsigned ADACT3 : 1;
1166 unsigned : 1;
1167 unsigned : 1;
1168 unsigned : 1;
1169 unsigned : 1;
1172 struct
1174 unsigned ADACT : 4;
1175 unsigned : 4;
1177 } __ADACTbits_t;
1179 extern __at(0x009F) volatile __ADACTbits_t ADACTbits;
1181 #define _ADACT0 0x01
1182 #define _ADACT1 0x02
1183 #define _ADACT2 0x04
1184 #define _ADACT3 0x08
1186 //==============================================================================
1189 //==============================================================================
1190 // LATA Bits
1192 extern __at(0x010C) __sfr LATA;
1194 typedef struct
1196 unsigned LATA0 : 1;
1197 unsigned LATA1 : 1;
1198 unsigned LATA2 : 1;
1199 unsigned : 1;
1200 unsigned LATA4 : 1;
1201 unsigned LATA5 : 1;
1202 unsigned : 1;
1203 unsigned : 1;
1204 } __LATAbits_t;
1206 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1208 #define _LATA0 0x01
1209 #define _LATA1 0x02
1210 #define _LATA2 0x04
1211 #define _LATA4 0x10
1212 #define _LATA5 0x20
1214 //==============================================================================
1217 //==============================================================================
1218 // CM1CON0 Bits
1220 extern __at(0x0111) __sfr CM1CON0;
1222 typedef struct
1224 unsigned C1SYNC : 1;
1225 unsigned C1HYS : 1;
1226 unsigned C1SP : 1;
1227 unsigned : 1;
1228 unsigned C1POL : 1;
1229 unsigned : 1;
1230 unsigned C1OUT : 1;
1231 unsigned C1ON : 1;
1232 } __CM1CON0bits_t;
1234 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1236 #define _C1SYNC 0x01
1237 #define _C1HYS 0x02
1238 #define _C1SP 0x04
1239 #define _C1POL 0x10
1240 #define _C1OUT 0x40
1241 #define _C1ON 0x80
1243 //==============================================================================
1246 //==============================================================================
1247 // CM1CON1 Bits
1249 extern __at(0x0112) __sfr CM1CON1;
1251 typedef union
1253 struct
1255 unsigned C1NCH0 : 1;
1256 unsigned C1NCH1 : 1;
1257 unsigned C1NCH2 : 1;
1258 unsigned C1PCH0 : 1;
1259 unsigned C1PCH1 : 1;
1260 unsigned C1PCH2 : 1;
1261 unsigned C1INTN : 1;
1262 unsigned C1INTP : 1;
1265 struct
1267 unsigned C1NCH : 3;
1268 unsigned : 5;
1271 struct
1273 unsigned : 3;
1274 unsigned C1PCH : 3;
1275 unsigned : 2;
1277 } __CM1CON1bits_t;
1279 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1281 #define _C1NCH0 0x01
1282 #define _C1NCH1 0x02
1283 #define _C1NCH2 0x04
1284 #define _C1PCH0 0x08
1285 #define _C1PCH1 0x10
1286 #define _C1PCH2 0x20
1287 #define _C1INTN 0x40
1288 #define _C1INTP 0x80
1290 //==============================================================================
1293 //==============================================================================
1294 // CMOUT Bits
1296 extern __at(0x0115) __sfr CMOUT;
1298 typedef struct
1300 unsigned MC1OUT : 1;
1301 unsigned : 1;
1302 unsigned : 1;
1303 unsigned : 1;
1304 unsigned : 1;
1305 unsigned : 1;
1306 unsigned : 1;
1307 unsigned : 1;
1308 } __CMOUTbits_t;
1310 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1312 #define _MC1OUT 0x01
1314 //==============================================================================
1317 //==============================================================================
1318 // BORCON Bits
1320 extern __at(0x0116) __sfr BORCON;
1322 typedef struct
1324 unsigned BORRDY : 1;
1325 unsigned : 1;
1326 unsigned : 1;
1327 unsigned : 1;
1328 unsigned : 1;
1329 unsigned : 1;
1330 unsigned : 1;
1331 unsigned SBOREN : 1;
1332 } __BORCONbits_t;
1334 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1336 #define _BORRDY 0x01
1337 #define _SBOREN 0x80
1339 //==============================================================================
1342 //==============================================================================
1343 // FVRCON Bits
1345 extern __at(0x0117) __sfr FVRCON;
1347 typedef union
1349 struct
1351 unsigned ADFVR0 : 1;
1352 unsigned ADFVR1 : 1;
1353 unsigned CDAFVR0 : 1;
1354 unsigned CDAFVR1 : 1;
1355 unsigned TSRNG : 1;
1356 unsigned TSEN : 1;
1357 unsigned FVRRDY : 1;
1358 unsigned FVREN : 1;
1361 struct
1363 unsigned ADFVR : 2;
1364 unsigned : 6;
1367 struct
1369 unsigned : 2;
1370 unsigned CDAFVR : 2;
1371 unsigned : 4;
1373 } __FVRCONbits_t;
1375 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1377 #define _ADFVR0 0x01
1378 #define _ADFVR1 0x02
1379 #define _CDAFVR0 0x04
1380 #define _CDAFVR1 0x08
1381 #define _TSRNG 0x10
1382 #define _TSEN 0x20
1383 #define _FVRRDY 0x40
1384 #define _FVREN 0x80
1386 //==============================================================================
1389 //==============================================================================
1390 // DACCON0 Bits
1392 extern __at(0x0118) __sfr DACCON0;
1394 typedef union
1396 struct
1398 unsigned DAC1NSS : 1;
1399 unsigned : 1;
1400 unsigned DAC1PSS0 : 1;
1401 unsigned DAC1PSS1 : 1;
1402 unsigned : 1;
1403 unsigned DAC1OE : 1;
1404 unsigned : 1;
1405 unsigned DAC1EN : 1;
1408 struct
1410 unsigned : 2;
1411 unsigned DAC1PSS : 2;
1412 unsigned : 4;
1414 } __DACCON0bits_t;
1416 extern __at(0x0118) volatile __DACCON0bits_t DACCON0bits;
1418 #define _DAC1NSS 0x01
1419 #define _DAC1PSS0 0x04
1420 #define _DAC1PSS1 0x08
1421 #define _DAC1OE 0x20
1422 #define _DAC1EN 0x80
1424 //==============================================================================
1427 //==============================================================================
1428 // DACCON1 Bits
1430 extern __at(0x0119) __sfr DACCON1;
1432 typedef union
1434 struct
1436 unsigned DAC1R0 : 1;
1437 unsigned DAC1R1 : 1;
1438 unsigned DAC1R2 : 1;
1439 unsigned DAC1R3 : 1;
1440 unsigned DAC1R4 : 1;
1441 unsigned : 1;
1442 unsigned : 1;
1443 unsigned : 1;
1446 struct
1448 unsigned DAC1R : 5;
1449 unsigned : 3;
1451 } __DACCON1bits_t;
1453 extern __at(0x0119) volatile __DACCON1bits_t DACCON1bits;
1455 #define _DAC1R0 0x01
1456 #define _DAC1R1 0x02
1457 #define _DAC1R2 0x04
1458 #define _DAC1R3 0x08
1459 #define _DAC1R4 0x10
1461 //==============================================================================
1464 //==============================================================================
1465 // ANSELA Bits
1467 extern __at(0x018C) __sfr ANSELA;
1469 typedef struct
1471 unsigned ANSA0 : 1;
1472 unsigned ANSA1 : 1;
1473 unsigned ANSA2 : 1;
1474 unsigned : 1;
1475 unsigned ANSA4 : 1;
1476 unsigned ANSA5 : 1;
1477 unsigned : 1;
1478 unsigned : 1;
1479 } __ANSELAbits_t;
1481 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1483 #define _ANSA0 0x01
1484 #define _ANSA1 0x02
1485 #define _ANSA2 0x04
1486 #define _ANSA4 0x10
1487 #define _ANSA5 0x20
1489 //==============================================================================
1492 //==============================================================================
1493 // VREGCON Bits
1495 extern __at(0x0197) __sfr VREGCON;
1497 typedef struct
1499 unsigned : 1;
1500 unsigned VREGPM : 1;
1501 unsigned : 1;
1502 unsigned : 1;
1503 unsigned : 1;
1504 unsigned : 1;
1505 unsigned : 1;
1506 unsigned : 1;
1507 } __VREGCONbits_t;
1509 extern __at(0x0197) volatile __VREGCONbits_t VREGCONbits;
1511 #define _VREGPM 0x02
1513 //==============================================================================
1515 extern __at(0x0199) __sfr RC1REG;
1516 extern __at(0x0199) __sfr RCREG;
1517 extern __at(0x0199) __sfr RCREG1;
1518 extern __at(0x019A) __sfr TX1REG;
1519 extern __at(0x019A) __sfr TXREG;
1520 extern __at(0x019A) __sfr TXREG1;
1521 extern __at(0x019B) __sfr SP1BRG;
1522 extern __at(0x019B) __sfr SP1BRGL;
1523 extern __at(0x019B) __sfr SPBRG;
1524 extern __at(0x019B) __sfr SPBRG1;
1525 extern __at(0x019B) __sfr SPBRGL;
1526 extern __at(0x019C) __sfr SP1BRGH;
1527 extern __at(0x019C) __sfr SPBRGH;
1528 extern __at(0x019C) __sfr SPBRGH1;
1530 //==============================================================================
1531 // RC1STA Bits
1533 extern __at(0x019D) __sfr RC1STA;
1535 typedef struct
1537 unsigned RX9D : 1;
1538 unsigned OERR : 1;
1539 unsigned FERR : 1;
1540 unsigned ADDEN : 1;
1541 unsigned CREN : 1;
1542 unsigned SREN : 1;
1543 unsigned RX9 : 1;
1544 unsigned SPEN : 1;
1545 } __RC1STAbits_t;
1547 extern __at(0x019D) volatile __RC1STAbits_t RC1STAbits;
1549 #define _RX9D 0x01
1550 #define _OERR 0x02
1551 #define _FERR 0x04
1552 #define _ADDEN 0x08
1553 #define _CREN 0x10
1554 #define _SREN 0x20
1555 #define _RX9 0x40
1556 #define _SPEN 0x80
1558 //==============================================================================
1561 //==============================================================================
1562 // RCSTA Bits
1564 extern __at(0x019D) __sfr RCSTA;
1566 typedef struct
1568 unsigned RX9D : 1;
1569 unsigned OERR : 1;
1570 unsigned FERR : 1;
1571 unsigned ADDEN : 1;
1572 unsigned CREN : 1;
1573 unsigned SREN : 1;
1574 unsigned RX9 : 1;
1575 unsigned SPEN : 1;
1576 } __RCSTAbits_t;
1578 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1580 #define _RCSTA_RX9D 0x01
1581 #define _RCSTA_OERR 0x02
1582 #define _RCSTA_FERR 0x04
1583 #define _RCSTA_ADDEN 0x08
1584 #define _RCSTA_CREN 0x10
1585 #define _RCSTA_SREN 0x20
1586 #define _RCSTA_RX9 0x40
1587 #define _RCSTA_SPEN 0x80
1589 //==============================================================================
1592 //==============================================================================
1593 // RCSTA1 Bits
1595 extern __at(0x019D) __sfr RCSTA1;
1597 typedef struct
1599 unsigned RX9D : 1;
1600 unsigned OERR : 1;
1601 unsigned FERR : 1;
1602 unsigned ADDEN : 1;
1603 unsigned CREN : 1;
1604 unsigned SREN : 1;
1605 unsigned RX9 : 1;
1606 unsigned SPEN : 1;
1607 } __RCSTA1bits_t;
1609 extern __at(0x019D) volatile __RCSTA1bits_t RCSTA1bits;
1611 #define _RCSTA1_RX9D 0x01
1612 #define _RCSTA1_OERR 0x02
1613 #define _RCSTA1_FERR 0x04
1614 #define _RCSTA1_ADDEN 0x08
1615 #define _RCSTA1_CREN 0x10
1616 #define _RCSTA1_SREN 0x20
1617 #define _RCSTA1_RX9 0x40
1618 #define _RCSTA1_SPEN 0x80
1620 //==============================================================================
1623 //==============================================================================
1624 // TX1STA Bits
1626 extern __at(0x019E) __sfr TX1STA;
1628 typedef struct
1630 unsigned TX9D : 1;
1631 unsigned TRMT : 1;
1632 unsigned BRGH : 1;
1633 unsigned SENDB : 1;
1634 unsigned SYNC : 1;
1635 unsigned TXEN : 1;
1636 unsigned TX9 : 1;
1637 unsigned CSRC : 1;
1638 } __TX1STAbits_t;
1640 extern __at(0x019E) volatile __TX1STAbits_t TX1STAbits;
1642 #define _TX9D 0x01
1643 #define _TRMT 0x02
1644 #define _BRGH 0x04
1645 #define _SENDB 0x08
1646 #define _SYNC 0x10
1647 #define _TXEN 0x20
1648 #define _TX9 0x40
1649 #define _CSRC 0x80
1651 //==============================================================================
1654 //==============================================================================
1655 // TXSTA Bits
1657 extern __at(0x019E) __sfr TXSTA;
1659 typedef struct
1661 unsigned TX9D : 1;
1662 unsigned TRMT : 1;
1663 unsigned BRGH : 1;
1664 unsigned SENDB : 1;
1665 unsigned SYNC : 1;
1666 unsigned TXEN : 1;
1667 unsigned TX9 : 1;
1668 unsigned CSRC : 1;
1669 } __TXSTAbits_t;
1671 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
1673 #define _TXSTA_TX9D 0x01
1674 #define _TXSTA_TRMT 0x02
1675 #define _TXSTA_BRGH 0x04
1676 #define _TXSTA_SENDB 0x08
1677 #define _TXSTA_SYNC 0x10
1678 #define _TXSTA_TXEN 0x20
1679 #define _TXSTA_TX9 0x40
1680 #define _TXSTA_CSRC 0x80
1682 //==============================================================================
1685 //==============================================================================
1686 // TXSTA1 Bits
1688 extern __at(0x019E) __sfr TXSTA1;
1690 typedef struct
1692 unsigned TX9D : 1;
1693 unsigned TRMT : 1;
1694 unsigned BRGH : 1;
1695 unsigned SENDB : 1;
1696 unsigned SYNC : 1;
1697 unsigned TXEN : 1;
1698 unsigned TX9 : 1;
1699 unsigned CSRC : 1;
1700 } __TXSTA1bits_t;
1702 extern __at(0x019E) volatile __TXSTA1bits_t TXSTA1bits;
1704 #define _TXSTA1_TX9D 0x01
1705 #define _TXSTA1_TRMT 0x02
1706 #define _TXSTA1_BRGH 0x04
1707 #define _TXSTA1_SENDB 0x08
1708 #define _TXSTA1_SYNC 0x10
1709 #define _TXSTA1_TXEN 0x20
1710 #define _TXSTA1_TX9 0x40
1711 #define _TXSTA1_CSRC 0x80
1713 //==============================================================================
1716 //==============================================================================
1717 // BAUD1CON Bits
1719 extern __at(0x019F) __sfr BAUD1CON;
1721 typedef struct
1723 unsigned ABDEN : 1;
1724 unsigned WUE : 1;
1725 unsigned : 1;
1726 unsigned BRG16 : 1;
1727 unsigned SCKP : 1;
1728 unsigned : 1;
1729 unsigned RCIDL : 1;
1730 unsigned ABDOVF : 1;
1731 } __BAUD1CONbits_t;
1733 extern __at(0x019F) volatile __BAUD1CONbits_t BAUD1CONbits;
1735 #define _ABDEN 0x01
1736 #define _WUE 0x02
1737 #define _BRG16 0x08
1738 #define _SCKP 0x10
1739 #define _RCIDL 0x40
1740 #define _ABDOVF 0x80
1742 //==============================================================================
1745 //==============================================================================
1746 // BAUDCON Bits
1748 extern __at(0x019F) __sfr BAUDCON;
1750 typedef struct
1752 unsigned ABDEN : 1;
1753 unsigned WUE : 1;
1754 unsigned : 1;
1755 unsigned BRG16 : 1;
1756 unsigned SCKP : 1;
1757 unsigned : 1;
1758 unsigned RCIDL : 1;
1759 unsigned ABDOVF : 1;
1760 } __BAUDCONbits_t;
1762 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
1764 #define _BAUDCON_ABDEN 0x01
1765 #define _BAUDCON_WUE 0x02
1766 #define _BAUDCON_BRG16 0x08
1767 #define _BAUDCON_SCKP 0x10
1768 #define _BAUDCON_RCIDL 0x40
1769 #define _BAUDCON_ABDOVF 0x80
1771 //==============================================================================
1774 //==============================================================================
1775 // BAUDCON1 Bits
1777 extern __at(0x019F) __sfr BAUDCON1;
1779 typedef struct
1781 unsigned ABDEN : 1;
1782 unsigned WUE : 1;
1783 unsigned : 1;
1784 unsigned BRG16 : 1;
1785 unsigned SCKP : 1;
1786 unsigned : 1;
1787 unsigned RCIDL : 1;
1788 unsigned ABDOVF : 1;
1789 } __BAUDCON1bits_t;
1791 extern __at(0x019F) volatile __BAUDCON1bits_t BAUDCON1bits;
1793 #define _BAUDCON1_ABDEN 0x01
1794 #define _BAUDCON1_WUE 0x02
1795 #define _BAUDCON1_BRG16 0x08
1796 #define _BAUDCON1_SCKP 0x10
1797 #define _BAUDCON1_RCIDL 0x40
1798 #define _BAUDCON1_ABDOVF 0x80
1800 //==============================================================================
1803 //==============================================================================
1804 // BAUDCTL Bits
1806 extern __at(0x019F) __sfr BAUDCTL;
1808 typedef struct
1810 unsigned ABDEN : 1;
1811 unsigned WUE : 1;
1812 unsigned : 1;
1813 unsigned BRG16 : 1;
1814 unsigned SCKP : 1;
1815 unsigned : 1;
1816 unsigned RCIDL : 1;
1817 unsigned ABDOVF : 1;
1818 } __BAUDCTLbits_t;
1820 extern __at(0x019F) volatile __BAUDCTLbits_t BAUDCTLbits;
1822 #define _BAUDCTL_ABDEN 0x01
1823 #define _BAUDCTL_WUE 0x02
1824 #define _BAUDCTL_BRG16 0x08
1825 #define _BAUDCTL_SCKP 0x10
1826 #define _BAUDCTL_RCIDL 0x40
1827 #define _BAUDCTL_ABDOVF 0x80
1829 //==============================================================================
1832 //==============================================================================
1833 // BAUDCTL1 Bits
1835 extern __at(0x019F) __sfr BAUDCTL1;
1837 typedef struct
1839 unsigned ABDEN : 1;
1840 unsigned WUE : 1;
1841 unsigned : 1;
1842 unsigned BRG16 : 1;
1843 unsigned SCKP : 1;
1844 unsigned : 1;
1845 unsigned RCIDL : 1;
1846 unsigned ABDOVF : 1;
1847 } __BAUDCTL1bits_t;
1849 extern __at(0x019F) volatile __BAUDCTL1bits_t BAUDCTL1bits;
1851 #define _BAUDCTL1_ABDEN 0x01
1852 #define _BAUDCTL1_WUE 0x02
1853 #define _BAUDCTL1_BRG16 0x08
1854 #define _BAUDCTL1_SCKP 0x10
1855 #define _BAUDCTL1_RCIDL 0x40
1856 #define _BAUDCTL1_ABDOVF 0x80
1858 //==============================================================================
1861 //==============================================================================
1862 // WPUA Bits
1864 extern __at(0x020C) __sfr WPUA;
1866 typedef union
1868 struct
1870 unsigned WPUA0 : 1;
1871 unsigned WPUA1 : 1;
1872 unsigned WPUA2 : 1;
1873 unsigned WPUA3 : 1;
1874 unsigned WPUA4 : 1;
1875 unsigned WPUA5 : 1;
1876 unsigned : 1;
1877 unsigned : 1;
1880 struct
1882 unsigned WPUA : 6;
1883 unsigned : 2;
1885 } __WPUAbits_t;
1887 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
1889 #define _WPUA0 0x01
1890 #define _WPUA1 0x02
1891 #define _WPUA2 0x04
1892 #define _WPUA3 0x08
1893 #define _WPUA4 0x10
1894 #define _WPUA5 0x20
1896 //==============================================================================
1899 //==============================================================================
1900 // SSP1BUF Bits
1902 extern __at(0x0211) __sfr SSP1BUF;
1904 typedef union
1906 struct
1908 unsigned SSP1BUF0 : 1;
1909 unsigned SSP1BUF1 : 1;
1910 unsigned SSP1BUF2 : 1;
1911 unsigned SSP1BUF3 : 1;
1912 unsigned SSP1BUF4 : 1;
1913 unsigned SSP1BUF5 : 1;
1914 unsigned SSP1BUF6 : 1;
1915 unsigned SSP1BUF7 : 1;
1918 struct
1920 unsigned BUF0 : 1;
1921 unsigned BUF1 : 1;
1922 unsigned BUF2 : 1;
1923 unsigned BUF3 : 1;
1924 unsigned BUF4 : 1;
1925 unsigned BUF5 : 1;
1926 unsigned BUF6 : 1;
1927 unsigned BUF7 : 1;
1929 } __SSP1BUFbits_t;
1931 extern __at(0x0211) volatile __SSP1BUFbits_t SSP1BUFbits;
1933 #define _SSP1BUF0 0x01
1934 #define _BUF0 0x01
1935 #define _SSP1BUF1 0x02
1936 #define _BUF1 0x02
1937 #define _SSP1BUF2 0x04
1938 #define _BUF2 0x04
1939 #define _SSP1BUF3 0x08
1940 #define _BUF3 0x08
1941 #define _SSP1BUF4 0x10
1942 #define _BUF4 0x10
1943 #define _SSP1BUF5 0x20
1944 #define _BUF5 0x20
1945 #define _SSP1BUF6 0x40
1946 #define _BUF6 0x40
1947 #define _SSP1BUF7 0x80
1948 #define _BUF7 0x80
1950 //==============================================================================
1953 //==============================================================================
1954 // SSPBUF Bits
1956 extern __at(0x0211) __sfr SSPBUF;
1958 typedef union
1960 struct
1962 unsigned SSP1BUF0 : 1;
1963 unsigned SSP1BUF1 : 1;
1964 unsigned SSP1BUF2 : 1;
1965 unsigned SSP1BUF3 : 1;
1966 unsigned SSP1BUF4 : 1;
1967 unsigned SSP1BUF5 : 1;
1968 unsigned SSP1BUF6 : 1;
1969 unsigned SSP1BUF7 : 1;
1972 struct
1974 unsigned BUF0 : 1;
1975 unsigned BUF1 : 1;
1976 unsigned BUF2 : 1;
1977 unsigned BUF3 : 1;
1978 unsigned BUF4 : 1;
1979 unsigned BUF5 : 1;
1980 unsigned BUF6 : 1;
1981 unsigned BUF7 : 1;
1983 } __SSPBUFbits_t;
1985 extern __at(0x0211) volatile __SSPBUFbits_t SSPBUFbits;
1987 #define _SSPBUF_SSP1BUF0 0x01
1988 #define _SSPBUF_BUF0 0x01
1989 #define _SSPBUF_SSP1BUF1 0x02
1990 #define _SSPBUF_BUF1 0x02
1991 #define _SSPBUF_SSP1BUF2 0x04
1992 #define _SSPBUF_BUF2 0x04
1993 #define _SSPBUF_SSP1BUF3 0x08
1994 #define _SSPBUF_BUF3 0x08
1995 #define _SSPBUF_SSP1BUF4 0x10
1996 #define _SSPBUF_BUF4 0x10
1997 #define _SSPBUF_SSP1BUF5 0x20
1998 #define _SSPBUF_BUF5 0x20
1999 #define _SSPBUF_SSP1BUF6 0x40
2000 #define _SSPBUF_BUF6 0x40
2001 #define _SSPBUF_SSP1BUF7 0x80
2002 #define _SSPBUF_BUF7 0x80
2004 //==============================================================================
2007 //==============================================================================
2008 // SSP1ADD Bits
2010 extern __at(0x0212) __sfr SSP1ADD;
2012 typedef union
2014 struct
2016 unsigned SSP1ADD0 : 1;
2017 unsigned SSP1ADD1 : 1;
2018 unsigned SSP1ADD2 : 1;
2019 unsigned SSP1ADD3 : 1;
2020 unsigned SSP1ADD4 : 1;
2021 unsigned SSP1ADD5 : 1;
2022 unsigned SSP1ADD6 : 1;
2023 unsigned SSP1ADD7 : 1;
2026 struct
2028 unsigned ADD0 : 1;
2029 unsigned ADD1 : 1;
2030 unsigned ADD2 : 1;
2031 unsigned ADD3 : 1;
2032 unsigned ADD4 : 1;
2033 unsigned ADD5 : 1;
2034 unsigned ADD6 : 1;
2035 unsigned ADD7 : 1;
2037 } __SSP1ADDbits_t;
2039 extern __at(0x0212) volatile __SSP1ADDbits_t SSP1ADDbits;
2041 #define _SSP1ADD0 0x01
2042 #define _ADD0 0x01
2043 #define _SSP1ADD1 0x02
2044 #define _ADD1 0x02
2045 #define _SSP1ADD2 0x04
2046 #define _ADD2 0x04
2047 #define _SSP1ADD3 0x08
2048 #define _ADD3 0x08
2049 #define _SSP1ADD4 0x10
2050 #define _ADD4 0x10
2051 #define _SSP1ADD5 0x20
2052 #define _ADD5 0x20
2053 #define _SSP1ADD6 0x40
2054 #define _ADD6 0x40
2055 #define _SSP1ADD7 0x80
2056 #define _ADD7 0x80
2058 //==============================================================================
2061 //==============================================================================
2062 // SSPADD Bits
2064 extern __at(0x0212) __sfr SSPADD;
2066 typedef union
2068 struct
2070 unsigned SSP1ADD0 : 1;
2071 unsigned SSP1ADD1 : 1;
2072 unsigned SSP1ADD2 : 1;
2073 unsigned SSP1ADD3 : 1;
2074 unsigned SSP1ADD4 : 1;
2075 unsigned SSP1ADD5 : 1;
2076 unsigned SSP1ADD6 : 1;
2077 unsigned SSP1ADD7 : 1;
2080 struct
2082 unsigned ADD0 : 1;
2083 unsigned ADD1 : 1;
2084 unsigned ADD2 : 1;
2085 unsigned ADD3 : 1;
2086 unsigned ADD4 : 1;
2087 unsigned ADD5 : 1;
2088 unsigned ADD6 : 1;
2089 unsigned ADD7 : 1;
2091 } __SSPADDbits_t;
2093 extern __at(0x0212) volatile __SSPADDbits_t SSPADDbits;
2095 #define _SSPADD_SSP1ADD0 0x01
2096 #define _SSPADD_ADD0 0x01
2097 #define _SSPADD_SSP1ADD1 0x02
2098 #define _SSPADD_ADD1 0x02
2099 #define _SSPADD_SSP1ADD2 0x04
2100 #define _SSPADD_ADD2 0x04
2101 #define _SSPADD_SSP1ADD3 0x08
2102 #define _SSPADD_ADD3 0x08
2103 #define _SSPADD_SSP1ADD4 0x10
2104 #define _SSPADD_ADD4 0x10
2105 #define _SSPADD_SSP1ADD5 0x20
2106 #define _SSPADD_ADD5 0x20
2107 #define _SSPADD_SSP1ADD6 0x40
2108 #define _SSPADD_ADD6 0x40
2109 #define _SSPADD_SSP1ADD7 0x80
2110 #define _SSPADD_ADD7 0x80
2112 //==============================================================================
2115 //==============================================================================
2116 // SSP1MSK Bits
2118 extern __at(0x0213) __sfr SSP1MSK;
2120 typedef union
2122 struct
2124 unsigned SSP1MSK0 : 1;
2125 unsigned SSP1MSK1 : 1;
2126 unsigned SSP1MSK2 : 1;
2127 unsigned SSP1MSK3 : 1;
2128 unsigned SSP1MSK4 : 1;
2129 unsigned SSP1MSK5 : 1;
2130 unsigned SSP1MSK6 : 1;
2131 unsigned SSP1MSK7 : 1;
2134 struct
2136 unsigned MSK0 : 1;
2137 unsigned MSK1 : 1;
2138 unsigned MSK2 : 1;
2139 unsigned MSK3 : 1;
2140 unsigned MSK4 : 1;
2141 unsigned MSK5 : 1;
2142 unsigned MSK6 : 1;
2143 unsigned MSK7 : 1;
2145 } __SSP1MSKbits_t;
2147 extern __at(0x0213) volatile __SSP1MSKbits_t SSP1MSKbits;
2149 #define _SSP1MSK0 0x01
2150 #define _MSK0 0x01
2151 #define _SSP1MSK1 0x02
2152 #define _MSK1 0x02
2153 #define _SSP1MSK2 0x04
2154 #define _MSK2 0x04
2155 #define _SSP1MSK3 0x08
2156 #define _MSK3 0x08
2157 #define _SSP1MSK4 0x10
2158 #define _MSK4 0x10
2159 #define _SSP1MSK5 0x20
2160 #define _MSK5 0x20
2161 #define _SSP1MSK6 0x40
2162 #define _MSK6 0x40
2163 #define _SSP1MSK7 0x80
2164 #define _MSK7 0x80
2166 //==============================================================================
2169 //==============================================================================
2170 // SSPMSK Bits
2172 extern __at(0x0213) __sfr SSPMSK;
2174 typedef union
2176 struct
2178 unsigned SSP1MSK0 : 1;
2179 unsigned SSP1MSK1 : 1;
2180 unsigned SSP1MSK2 : 1;
2181 unsigned SSP1MSK3 : 1;
2182 unsigned SSP1MSK4 : 1;
2183 unsigned SSP1MSK5 : 1;
2184 unsigned SSP1MSK6 : 1;
2185 unsigned SSP1MSK7 : 1;
2188 struct
2190 unsigned MSK0 : 1;
2191 unsigned MSK1 : 1;
2192 unsigned MSK2 : 1;
2193 unsigned MSK3 : 1;
2194 unsigned MSK4 : 1;
2195 unsigned MSK5 : 1;
2196 unsigned MSK6 : 1;
2197 unsigned MSK7 : 1;
2199 } __SSPMSKbits_t;
2201 extern __at(0x0213) volatile __SSPMSKbits_t SSPMSKbits;
2203 #define _SSPMSK_SSP1MSK0 0x01
2204 #define _SSPMSK_MSK0 0x01
2205 #define _SSPMSK_SSP1MSK1 0x02
2206 #define _SSPMSK_MSK1 0x02
2207 #define _SSPMSK_SSP1MSK2 0x04
2208 #define _SSPMSK_MSK2 0x04
2209 #define _SSPMSK_SSP1MSK3 0x08
2210 #define _SSPMSK_MSK3 0x08
2211 #define _SSPMSK_SSP1MSK4 0x10
2212 #define _SSPMSK_MSK4 0x10
2213 #define _SSPMSK_SSP1MSK5 0x20
2214 #define _SSPMSK_MSK5 0x20
2215 #define _SSPMSK_SSP1MSK6 0x40
2216 #define _SSPMSK_MSK6 0x40
2217 #define _SSPMSK_SSP1MSK7 0x80
2218 #define _SSPMSK_MSK7 0x80
2220 //==============================================================================
2223 //==============================================================================
2224 // SSP1STAT Bits
2226 extern __at(0x0214) __sfr SSP1STAT;
2228 typedef struct
2230 unsigned BF : 1;
2231 unsigned UA : 1;
2232 unsigned R_NOT_W : 1;
2233 unsigned S : 1;
2234 unsigned P : 1;
2235 unsigned D_NOT_A : 1;
2236 unsigned CKE : 1;
2237 unsigned SMP : 1;
2238 } __SSP1STATbits_t;
2240 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2242 #define _BF 0x01
2243 #define _UA 0x02
2244 #define _R_NOT_W 0x04
2245 #define _S 0x08
2246 #define _P 0x10
2247 #define _D_NOT_A 0x20
2248 #define _CKE 0x40
2249 #define _SMP 0x80
2251 //==============================================================================
2254 //==============================================================================
2255 // SSPSTAT Bits
2257 extern __at(0x0214) __sfr SSPSTAT;
2259 typedef struct
2261 unsigned BF : 1;
2262 unsigned UA : 1;
2263 unsigned R_NOT_W : 1;
2264 unsigned S : 1;
2265 unsigned P : 1;
2266 unsigned D_NOT_A : 1;
2267 unsigned CKE : 1;
2268 unsigned SMP : 1;
2269 } __SSPSTATbits_t;
2271 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2273 #define _SSPSTAT_BF 0x01
2274 #define _SSPSTAT_UA 0x02
2275 #define _SSPSTAT_R_NOT_W 0x04
2276 #define _SSPSTAT_S 0x08
2277 #define _SSPSTAT_P 0x10
2278 #define _SSPSTAT_D_NOT_A 0x20
2279 #define _SSPSTAT_CKE 0x40
2280 #define _SSPSTAT_SMP 0x80
2282 //==============================================================================
2285 //==============================================================================
2286 // SSP1CON Bits
2288 extern __at(0x0215) __sfr SSP1CON;
2290 typedef union
2292 struct
2294 unsigned SSPM0 : 1;
2295 unsigned SSPM1 : 1;
2296 unsigned SSPM2 : 1;
2297 unsigned SSPM3 : 1;
2298 unsigned CKP : 1;
2299 unsigned SSPEN : 1;
2300 unsigned SSPOV : 1;
2301 unsigned WCOL : 1;
2304 struct
2306 unsigned SSPM : 4;
2307 unsigned : 4;
2309 } __SSP1CONbits_t;
2311 extern __at(0x0215) volatile __SSP1CONbits_t SSP1CONbits;
2313 #define _SSPM0 0x01
2314 #define _SSPM1 0x02
2315 #define _SSPM2 0x04
2316 #define _SSPM3 0x08
2317 #define _CKP 0x10
2318 #define _SSPEN 0x20
2319 #define _SSPOV 0x40
2320 #define _WCOL 0x80
2322 //==============================================================================
2325 //==============================================================================
2326 // SSP1CON1 Bits
2328 extern __at(0x0215) __sfr SSP1CON1;
2330 typedef union
2332 struct
2334 unsigned SSPM0 : 1;
2335 unsigned SSPM1 : 1;
2336 unsigned SSPM2 : 1;
2337 unsigned SSPM3 : 1;
2338 unsigned CKP : 1;
2339 unsigned SSPEN : 1;
2340 unsigned SSPOV : 1;
2341 unsigned WCOL : 1;
2344 struct
2346 unsigned SSPM : 4;
2347 unsigned : 4;
2349 } __SSP1CON1bits_t;
2351 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2353 #define _SSP1CON1_SSPM0 0x01
2354 #define _SSP1CON1_SSPM1 0x02
2355 #define _SSP1CON1_SSPM2 0x04
2356 #define _SSP1CON1_SSPM3 0x08
2357 #define _SSP1CON1_CKP 0x10
2358 #define _SSP1CON1_SSPEN 0x20
2359 #define _SSP1CON1_SSPOV 0x40
2360 #define _SSP1CON1_WCOL 0x80
2362 //==============================================================================
2365 //==============================================================================
2366 // SSPCON Bits
2368 extern __at(0x0215) __sfr SSPCON;
2370 typedef union
2372 struct
2374 unsigned SSPM0 : 1;
2375 unsigned SSPM1 : 1;
2376 unsigned SSPM2 : 1;
2377 unsigned SSPM3 : 1;
2378 unsigned CKP : 1;
2379 unsigned SSPEN : 1;
2380 unsigned SSPOV : 1;
2381 unsigned WCOL : 1;
2384 struct
2386 unsigned SSPM : 4;
2387 unsigned : 4;
2389 } __SSPCONbits_t;
2391 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2393 #define _SSPCON_SSPM0 0x01
2394 #define _SSPCON_SSPM1 0x02
2395 #define _SSPCON_SSPM2 0x04
2396 #define _SSPCON_SSPM3 0x08
2397 #define _SSPCON_CKP 0x10
2398 #define _SSPCON_SSPEN 0x20
2399 #define _SSPCON_SSPOV 0x40
2400 #define _SSPCON_WCOL 0x80
2402 //==============================================================================
2405 //==============================================================================
2406 // SSPCON1 Bits
2408 extern __at(0x0215) __sfr SSPCON1;
2410 typedef union
2412 struct
2414 unsigned SSPM0 : 1;
2415 unsigned SSPM1 : 1;
2416 unsigned SSPM2 : 1;
2417 unsigned SSPM3 : 1;
2418 unsigned CKP : 1;
2419 unsigned SSPEN : 1;
2420 unsigned SSPOV : 1;
2421 unsigned WCOL : 1;
2424 struct
2426 unsigned SSPM : 4;
2427 unsigned : 4;
2429 } __SSPCON1bits_t;
2431 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2433 #define _SSPCON1_SSPM0 0x01
2434 #define _SSPCON1_SSPM1 0x02
2435 #define _SSPCON1_SSPM2 0x04
2436 #define _SSPCON1_SSPM3 0x08
2437 #define _SSPCON1_CKP 0x10
2438 #define _SSPCON1_SSPEN 0x20
2439 #define _SSPCON1_SSPOV 0x40
2440 #define _SSPCON1_WCOL 0x80
2442 //==============================================================================
2445 //==============================================================================
2446 // SSP1CON2 Bits
2448 extern __at(0x0216) __sfr SSP1CON2;
2450 typedef struct
2452 unsigned SEN : 1;
2453 unsigned RSEN : 1;
2454 unsigned PEN : 1;
2455 unsigned RCEN : 1;
2456 unsigned ACKEN : 1;
2457 unsigned ACKDT : 1;
2458 unsigned ACKSTAT : 1;
2459 unsigned GCEN : 1;
2460 } __SSP1CON2bits_t;
2462 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2464 #define _SEN 0x01
2465 #define _RSEN 0x02
2466 #define _PEN 0x04
2467 #define _RCEN 0x08
2468 #define _ACKEN 0x10
2469 #define _ACKDT 0x20
2470 #define _ACKSTAT 0x40
2471 #define _GCEN 0x80
2473 //==============================================================================
2476 //==============================================================================
2477 // SSPCON2 Bits
2479 extern __at(0x0216) __sfr SSPCON2;
2481 typedef struct
2483 unsigned SEN : 1;
2484 unsigned RSEN : 1;
2485 unsigned PEN : 1;
2486 unsigned RCEN : 1;
2487 unsigned ACKEN : 1;
2488 unsigned ACKDT : 1;
2489 unsigned ACKSTAT : 1;
2490 unsigned GCEN : 1;
2491 } __SSPCON2bits_t;
2493 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2495 #define _SSPCON2_SEN 0x01
2496 #define _SSPCON2_RSEN 0x02
2497 #define _SSPCON2_PEN 0x04
2498 #define _SSPCON2_RCEN 0x08
2499 #define _SSPCON2_ACKEN 0x10
2500 #define _SSPCON2_ACKDT 0x20
2501 #define _SSPCON2_ACKSTAT 0x40
2502 #define _SSPCON2_GCEN 0x80
2504 //==============================================================================
2507 //==============================================================================
2508 // SSP1CON3 Bits
2510 extern __at(0x0217) __sfr SSP1CON3;
2512 typedef struct
2514 unsigned DHEN : 1;
2515 unsigned AHEN : 1;
2516 unsigned SBCDE : 1;
2517 unsigned SDAHT : 1;
2518 unsigned BOEN : 1;
2519 unsigned SCIE : 1;
2520 unsigned PCIE : 1;
2521 unsigned ACKTIM : 1;
2522 } __SSP1CON3bits_t;
2524 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2526 #define _DHEN 0x01
2527 #define _AHEN 0x02
2528 #define _SBCDE 0x04
2529 #define _SDAHT 0x08
2530 #define _BOEN 0x10
2531 #define _SCIE 0x20
2532 #define _PCIE 0x40
2533 #define _ACKTIM 0x80
2535 //==============================================================================
2538 //==============================================================================
2539 // SSPCON3 Bits
2541 extern __at(0x0217) __sfr SSPCON3;
2543 typedef struct
2545 unsigned DHEN : 1;
2546 unsigned AHEN : 1;
2547 unsigned SBCDE : 1;
2548 unsigned SDAHT : 1;
2549 unsigned BOEN : 1;
2550 unsigned SCIE : 1;
2551 unsigned PCIE : 1;
2552 unsigned ACKTIM : 1;
2553 } __SSPCON3bits_t;
2555 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2557 #define _SSPCON3_DHEN 0x01
2558 #define _SSPCON3_AHEN 0x02
2559 #define _SSPCON3_SBCDE 0x04
2560 #define _SSPCON3_SDAHT 0x08
2561 #define _SSPCON3_BOEN 0x10
2562 #define _SSPCON3_SCIE 0x20
2563 #define _SSPCON3_PCIE 0x40
2564 #define _SSPCON3_ACKTIM 0x80
2566 //==============================================================================
2569 //==============================================================================
2570 // ODCONA Bits
2572 extern __at(0x028C) __sfr ODCONA;
2574 typedef struct
2576 unsigned ODCA0 : 1;
2577 unsigned ODCA1 : 1;
2578 unsigned ODCA2 : 1;
2579 unsigned : 1;
2580 unsigned ODCA4 : 1;
2581 unsigned ODCA5 : 1;
2582 unsigned : 1;
2583 unsigned : 1;
2584 } __ODCONAbits_t;
2586 extern __at(0x028C) volatile __ODCONAbits_t ODCONAbits;
2588 #define _ODCA0 0x01
2589 #define _ODCA1 0x02
2590 #define _ODCA2 0x04
2591 #define _ODCA4 0x10
2592 #define _ODCA5 0x20
2594 //==============================================================================
2596 extern __at(0x0291) __sfr CCPR1;
2597 extern __at(0x0291) __sfr CCPR1L;
2598 extern __at(0x0292) __sfr CCPR1H;
2600 //==============================================================================
2601 // CCP1CON Bits
2603 extern __at(0x0293) __sfr CCP1CON;
2605 typedef union
2607 struct
2609 unsigned CCP1MODE0 : 1;
2610 unsigned CCP1MODE1 : 1;
2611 unsigned CCP1MODE2 : 1;
2612 unsigned CCP1MODE3 : 1;
2613 unsigned CCP1FMT : 1;
2614 unsigned CCP1OUT : 1;
2615 unsigned : 1;
2616 unsigned CCP1EN : 1;
2619 struct
2621 unsigned CCP1MODE : 4;
2622 unsigned : 4;
2624 } __CCP1CONbits_t;
2626 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2628 #define _CCP1MODE0 0x01
2629 #define _CCP1MODE1 0x02
2630 #define _CCP1MODE2 0x04
2631 #define _CCP1MODE3 0x08
2632 #define _CCP1FMT 0x10
2633 #define _CCP1OUT 0x20
2634 #define _CCP1EN 0x80
2636 //==============================================================================
2639 //==============================================================================
2640 // CCP1CAP Bits
2642 extern __at(0x0294) __sfr CCP1CAP;
2644 typedef union
2646 struct
2648 unsigned CCP1CTS0 : 1;
2649 unsigned CCP1CTS1 : 1;
2650 unsigned CCP1CTS2 : 1;
2651 unsigned : 1;
2652 unsigned : 1;
2653 unsigned : 1;
2654 unsigned : 1;
2655 unsigned : 1;
2658 struct
2660 unsigned CCP1CTS : 3;
2661 unsigned : 5;
2663 } __CCP1CAPbits_t;
2665 extern __at(0x0294) volatile __CCP1CAPbits_t CCP1CAPbits;
2667 #define _CCP1CTS0 0x01
2668 #define _CCP1CTS1 0x02
2669 #define _CCP1CTS2 0x04
2671 //==============================================================================
2673 extern __at(0x0295) __sfr CCPR2;
2674 extern __at(0x0295) __sfr CCPR2L;
2675 extern __at(0x0296) __sfr CCPR2H;
2677 //==============================================================================
2678 // CCP2CON Bits
2680 extern __at(0x0297) __sfr CCP2CON;
2682 typedef union
2684 struct
2686 unsigned CCP2MODE0 : 1;
2687 unsigned CCP2MODE1 : 1;
2688 unsigned CCP2MODE2 : 1;
2689 unsigned CCP2MODE3 : 1;
2690 unsigned CCP2FMT : 1;
2691 unsigned CCP2OUT : 1;
2692 unsigned : 1;
2693 unsigned CCP2EN : 1;
2696 struct
2698 unsigned CCP2MODE : 4;
2699 unsigned : 4;
2701 } __CCP2CONbits_t;
2703 extern __at(0x0297) volatile __CCP2CONbits_t CCP2CONbits;
2705 #define _CCP2MODE0 0x01
2706 #define _CCP2MODE1 0x02
2707 #define _CCP2MODE2 0x04
2708 #define _CCP2MODE3 0x08
2709 #define _CCP2FMT 0x10
2710 #define _CCP2OUT 0x20
2711 #define _CCP2EN 0x80
2713 //==============================================================================
2716 //==============================================================================
2717 // CCP2CAP Bits
2719 extern __at(0x0298) __sfr CCP2CAP;
2721 typedef union
2723 struct
2725 unsigned CCP2CTS0 : 1;
2726 unsigned CCP2CTS1 : 1;
2727 unsigned CCP2CTS2 : 1;
2728 unsigned : 1;
2729 unsigned : 1;
2730 unsigned : 1;
2731 unsigned : 1;
2732 unsigned : 1;
2735 struct
2737 unsigned CCP2CTS : 3;
2738 unsigned : 5;
2740 } __CCP2CAPbits_t;
2742 extern __at(0x0298) volatile __CCP2CAPbits_t CCP2CAPbits;
2744 #define _CCP2CTS0 0x01
2745 #define _CCP2CTS1 0x02
2746 #define _CCP2CTS2 0x04
2748 //==============================================================================
2751 //==============================================================================
2752 // CCPTMRS Bits
2754 extern __at(0x029F) __sfr CCPTMRS;
2756 typedef struct
2758 unsigned C1TSEL : 1;
2759 unsigned : 1;
2760 unsigned C2TSEL : 1;
2761 unsigned : 1;
2762 unsigned : 1;
2763 unsigned : 1;
2764 unsigned : 1;
2765 unsigned : 1;
2766 } __CCPTMRSbits_t;
2768 extern __at(0x029F) volatile __CCPTMRSbits_t CCPTMRSbits;
2770 #define _C1TSEL 0x01
2771 #define _C2TSEL 0x04
2773 //==============================================================================
2776 //==============================================================================
2777 // SLRCONA Bits
2779 extern __at(0x030C) __sfr SLRCONA;
2781 typedef struct
2783 unsigned SLRA0 : 1;
2784 unsigned SLRA1 : 1;
2785 unsigned SLRA2 : 1;
2786 unsigned : 1;
2787 unsigned SLRA4 : 1;
2788 unsigned SLRA5 : 1;
2789 unsigned : 1;
2790 unsigned : 1;
2791 } __SLRCONAbits_t;
2793 extern __at(0x030C) volatile __SLRCONAbits_t SLRCONAbits;
2795 #define _SLRA0 0x01
2796 #define _SLRA1 0x02
2797 #define _SLRA2 0x04
2798 #define _SLRA4 0x10
2799 #define _SLRA5 0x20
2801 //==============================================================================
2804 //==============================================================================
2805 // INLVLA Bits
2807 extern __at(0x038C) __sfr INLVLA;
2809 typedef union
2811 struct
2813 unsigned INLVLA0 : 1;
2814 unsigned INLVLA1 : 1;
2815 unsigned INLVLA2 : 1;
2816 unsigned INLVLA3 : 1;
2817 unsigned INLVLA4 : 1;
2818 unsigned INLVLA5 : 1;
2819 unsigned : 1;
2820 unsigned : 1;
2823 struct
2825 unsigned INLVLA : 6;
2826 unsigned : 2;
2828 } __INLVLAbits_t;
2830 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
2832 #define _INLVLA0 0x01
2833 #define _INLVLA1 0x02
2834 #define _INLVLA2 0x04
2835 #define _INLVLA3 0x08
2836 #define _INLVLA4 0x10
2837 #define _INLVLA5 0x20
2839 //==============================================================================
2842 //==============================================================================
2843 // IOCAP Bits
2845 extern __at(0x0391) __sfr IOCAP;
2847 typedef union
2849 struct
2851 unsigned IOCAP0 : 1;
2852 unsigned IOCAP1 : 1;
2853 unsigned IOCAP2 : 1;
2854 unsigned IOCAP3 : 1;
2855 unsigned IOCAP4 : 1;
2856 unsigned IOCAP5 : 1;
2857 unsigned : 1;
2858 unsigned : 1;
2861 struct
2863 unsigned IOCAP : 6;
2864 unsigned : 2;
2866 } __IOCAPbits_t;
2868 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
2870 #define _IOCAP0 0x01
2871 #define _IOCAP1 0x02
2872 #define _IOCAP2 0x04
2873 #define _IOCAP3 0x08
2874 #define _IOCAP4 0x10
2875 #define _IOCAP5 0x20
2877 //==============================================================================
2880 //==============================================================================
2881 // IOCAN Bits
2883 extern __at(0x0392) __sfr IOCAN;
2885 typedef union
2887 struct
2889 unsigned IOCAN0 : 1;
2890 unsigned IOCAN1 : 1;
2891 unsigned IOCAN2 : 1;
2892 unsigned IOCAN3 : 1;
2893 unsigned IOCAN4 : 1;
2894 unsigned IOCAN5 : 1;
2895 unsigned : 1;
2896 unsigned : 1;
2899 struct
2901 unsigned IOCAN : 6;
2902 unsigned : 2;
2904 } __IOCANbits_t;
2906 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
2908 #define _IOCAN0 0x01
2909 #define _IOCAN1 0x02
2910 #define _IOCAN2 0x04
2911 #define _IOCAN3 0x08
2912 #define _IOCAN4 0x10
2913 #define _IOCAN5 0x20
2915 //==============================================================================
2918 //==============================================================================
2919 // IOCAF Bits
2921 extern __at(0x0393) __sfr IOCAF;
2923 typedef union
2925 struct
2927 unsigned IOCAF0 : 1;
2928 unsigned IOCAF1 : 1;
2929 unsigned IOCAF2 : 1;
2930 unsigned IOCAF3 : 1;
2931 unsigned IOCAF4 : 1;
2932 unsigned IOCAF5 : 1;
2933 unsigned : 1;
2934 unsigned : 1;
2937 struct
2939 unsigned IOCAF : 6;
2940 unsigned : 2;
2942 } __IOCAFbits_t;
2944 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
2946 #define _IOCAF0 0x01
2947 #define _IOCAF1 0x02
2948 #define _IOCAF2 0x04
2949 #define _IOCAF3 0x08
2950 #define _IOCAF4 0x10
2951 #define _IOCAF5 0x20
2953 //==============================================================================
2956 //==============================================================================
2957 // CLKRCON Bits
2959 extern __at(0x039A) __sfr CLKRCON;
2961 typedef union
2963 struct
2965 unsigned CLKRDIV0 : 1;
2966 unsigned CLKRDIV1 : 1;
2967 unsigned CLKRDIV2 : 1;
2968 unsigned CLKRDC0 : 1;
2969 unsigned CLKRDC1 : 1;
2970 unsigned : 1;
2971 unsigned : 1;
2972 unsigned CLKREN : 1;
2975 struct
2977 unsigned CLKRDIV : 3;
2978 unsigned : 5;
2981 struct
2983 unsigned : 3;
2984 unsigned CLKRDC : 2;
2985 unsigned : 3;
2987 } __CLKRCONbits_t;
2989 extern __at(0x039A) volatile __CLKRCONbits_t CLKRCONbits;
2991 #define _CLKRDIV0 0x01
2992 #define _CLKRDIV1 0x02
2993 #define _CLKRDIV2 0x04
2994 #define _CLKRDC0 0x08
2995 #define _CLKRDC1 0x10
2996 #define _CLKREN 0x80
2998 //==============================================================================
3001 //==============================================================================
3002 // MDCON Bits
3004 extern __at(0x039C) __sfr MDCON;
3006 typedef struct
3008 unsigned MDBIT : 1;
3009 unsigned : 1;
3010 unsigned : 1;
3011 unsigned MDOUT : 1;
3012 unsigned MDOPOL : 1;
3013 unsigned : 1;
3014 unsigned : 1;
3015 unsigned MDEN : 1;
3016 } __MDCONbits_t;
3018 extern __at(0x039C) volatile __MDCONbits_t MDCONbits;
3020 #define _MDBIT 0x01
3021 #define _MDOUT 0x08
3022 #define _MDOPOL 0x10
3023 #define _MDEN 0x80
3025 //==============================================================================
3028 //==============================================================================
3029 // MDSRC Bits
3031 extern __at(0x039D) __sfr MDSRC;
3033 typedef union
3035 struct
3037 unsigned MDMS0 : 1;
3038 unsigned MDMS1 : 1;
3039 unsigned MDMS2 : 1;
3040 unsigned MDMS3 : 1;
3041 unsigned : 1;
3042 unsigned : 1;
3043 unsigned : 1;
3044 unsigned : 1;
3047 struct
3049 unsigned MDMS : 4;
3050 unsigned : 4;
3052 } __MDSRCbits_t;
3054 extern __at(0x039D) volatile __MDSRCbits_t MDSRCbits;
3056 #define _MDMS0 0x01
3057 #define _MDMS1 0x02
3058 #define _MDMS2 0x04
3059 #define _MDMS3 0x08
3061 //==============================================================================
3064 //==============================================================================
3065 // MDCARH Bits
3067 extern __at(0x039E) __sfr MDCARH;
3069 typedef union
3071 struct
3073 unsigned MDCH0 : 1;
3074 unsigned MDCH1 : 1;
3075 unsigned MDCH2 : 1;
3076 unsigned MDCH3 : 1;
3077 unsigned : 1;
3078 unsigned MDCHSYNC : 1;
3079 unsigned MDCHPOL : 1;
3080 unsigned : 1;
3083 struct
3085 unsigned MDCH : 4;
3086 unsigned : 4;
3088 } __MDCARHbits_t;
3090 extern __at(0x039E) volatile __MDCARHbits_t MDCARHbits;
3092 #define _MDCH0 0x01
3093 #define _MDCH1 0x02
3094 #define _MDCH2 0x04
3095 #define _MDCH3 0x08
3096 #define _MDCHSYNC 0x20
3097 #define _MDCHPOL 0x40
3099 //==============================================================================
3102 //==============================================================================
3103 // MDCARL Bits
3105 extern __at(0x039F) __sfr MDCARL;
3107 typedef union
3109 struct
3111 unsigned MDCL0 : 1;
3112 unsigned MDCL1 : 1;
3113 unsigned MDCL2 : 1;
3114 unsigned MDCL3 : 1;
3115 unsigned : 1;
3116 unsigned MDCLSYNC : 1;
3117 unsigned MDCLPOL : 1;
3118 unsigned : 1;
3121 struct
3123 unsigned MDCL : 4;
3124 unsigned : 4;
3126 } __MDCARLbits_t;
3128 extern __at(0x039F) volatile __MDCARLbits_t MDCARLbits;
3130 #define _MDCL0 0x01
3131 #define _MDCL1 0x02
3132 #define _MDCL2 0x04
3133 #define _MDCL3 0x08
3134 #define _MDCLSYNC 0x20
3135 #define _MDCLPOL 0x40
3137 //==============================================================================
3140 //==============================================================================
3141 // CCDNA Bits
3143 extern __at(0x040C) __sfr CCDNA;
3145 typedef struct
3147 unsigned CCDNA0 : 1;
3148 unsigned CCDNA1 : 1;
3149 unsigned CCDNA2 : 1;
3150 unsigned : 1;
3151 unsigned CCDNA4 : 1;
3152 unsigned CCDNA5 : 1;
3153 unsigned : 1;
3154 unsigned : 1;
3155 } __CCDNAbits_t;
3157 extern __at(0x040C) volatile __CCDNAbits_t CCDNAbits;
3159 #define _CCDNA0 0x01
3160 #define _CCDNA1 0x02
3161 #define _CCDNA2 0x04
3162 #define _CCDNA4 0x10
3163 #define _CCDNA5 0x20
3165 //==============================================================================
3168 //==============================================================================
3169 // CCDCON Bits
3171 extern __at(0x041F) __sfr CCDCON;
3173 typedef union
3175 struct
3177 unsigned CCDS0 : 1;
3178 unsigned CCDS1 : 1;
3179 unsigned : 1;
3180 unsigned : 1;
3181 unsigned : 1;
3182 unsigned : 1;
3183 unsigned : 1;
3184 unsigned CCDEN : 1;
3187 struct
3189 unsigned CCDS : 2;
3190 unsigned : 6;
3192 } __CCDCONbits_t;
3194 extern __at(0x041F) volatile __CCDCONbits_t CCDCONbits;
3196 #define _CCDS0 0x01
3197 #define _CCDS1 0x02
3198 #define _CCDEN 0x80
3200 //==============================================================================
3203 //==============================================================================
3204 // CCDPA Bits
3206 extern __at(0x048C) __sfr CCDPA;
3208 typedef struct
3210 unsigned CCDPA0 : 1;
3211 unsigned CCDPA1 : 1;
3212 unsigned CCDPA2 : 1;
3213 unsigned : 1;
3214 unsigned CCDPA4 : 1;
3215 unsigned CCDPA5 : 1;
3216 unsigned : 1;
3217 unsigned : 1;
3218 } __CCDPAbits_t;
3220 extern __at(0x048C) volatile __CCDPAbits_t CCDPAbits;
3222 #define _CCDPA0 0x01
3223 #define _CCDPA1 0x02
3224 #define _CCDPA2 0x04
3225 #define _CCDPA4 0x10
3226 #define _CCDPA5 0x20
3228 //==============================================================================
3230 extern __at(0x0498) __sfr NCO1ACC;
3231 extern __at(0x0498) __sfr NCO1ACCL;
3232 extern __at(0x0499) __sfr NCO1ACCH;
3233 extern __at(0x049A) __sfr NCO1ACCU;
3234 extern __at(0x049B) __sfr NCO1INC;
3235 extern __at(0x049B) __sfr NCO1INCL;
3236 extern __at(0x049C) __sfr NCO1INCH;
3237 extern __at(0x049D) __sfr NCO1INCU;
3239 //==============================================================================
3240 // NCO1CON Bits
3242 extern __at(0x049E) __sfr NCO1CON;
3244 typedef struct
3246 unsigned N1PFM : 1;
3247 unsigned : 1;
3248 unsigned : 1;
3249 unsigned : 1;
3250 unsigned N1POL : 1;
3251 unsigned N1OUT : 1;
3252 unsigned : 1;
3253 unsigned N1EN : 1;
3254 } __NCO1CONbits_t;
3256 extern __at(0x049E) volatile __NCO1CONbits_t NCO1CONbits;
3258 #define _N1PFM 0x01
3259 #define _N1POL 0x10
3260 #define _N1OUT 0x20
3261 #define _N1EN 0x80
3263 //==============================================================================
3265 extern __at(0x049F) __sfr NCO1CLK;
3267 //==============================================================================
3268 // PWM5DCL Bits
3270 extern __at(0x0617) __sfr PWM5DCL;
3272 typedef union
3274 struct
3276 unsigned : 1;
3277 unsigned : 1;
3278 unsigned : 1;
3279 unsigned : 1;
3280 unsigned : 1;
3281 unsigned : 1;
3282 unsigned PWM5DCL0 : 1;
3283 unsigned PWM5DCL1 : 1;
3286 struct
3288 unsigned : 6;
3289 unsigned PWM5DCL : 2;
3291 } __PWM5DCLbits_t;
3293 extern __at(0x0617) volatile __PWM5DCLbits_t PWM5DCLbits;
3295 #define _PWM5DCL0 0x40
3296 #define _PWM5DCL1 0x80
3298 //==============================================================================
3301 //==============================================================================
3302 // PWM5DCH Bits
3304 extern __at(0x0618) __sfr PWM5DCH;
3306 typedef struct
3308 unsigned PWM5DCH0 : 1;
3309 unsigned PWM5DCH1 : 1;
3310 unsigned PWM5DCH2 : 1;
3311 unsigned PWM5DCH3 : 1;
3312 unsigned PWM5DCH4 : 1;
3313 unsigned PWM5DCH5 : 1;
3314 unsigned PWM5DCH6 : 1;
3315 unsigned PWM5DCH7 : 1;
3316 } __PWM5DCHbits_t;
3318 extern __at(0x0618) volatile __PWM5DCHbits_t PWM5DCHbits;
3320 #define _PWM5DCH0 0x01
3321 #define _PWM5DCH1 0x02
3322 #define _PWM5DCH2 0x04
3323 #define _PWM5DCH3 0x08
3324 #define _PWM5DCH4 0x10
3325 #define _PWM5DCH5 0x20
3326 #define _PWM5DCH6 0x40
3327 #define _PWM5DCH7 0x80
3329 //==============================================================================
3332 //==============================================================================
3333 // PWM5CON Bits
3335 extern __at(0x0619) __sfr PWM5CON;
3337 typedef struct
3339 unsigned : 1;
3340 unsigned : 1;
3341 unsigned : 1;
3342 unsigned : 1;
3343 unsigned PWM5POL : 1;
3344 unsigned PWM5OUT : 1;
3345 unsigned : 1;
3346 unsigned PWM5EN : 1;
3347 } __PWM5CONbits_t;
3349 extern __at(0x0619) volatile __PWM5CONbits_t PWM5CONbits;
3351 #define _PWM5POL 0x10
3352 #define _PWM5OUT 0x20
3353 #define _PWM5EN 0x80
3355 //==============================================================================
3358 //==============================================================================
3359 // PWM5CON0 Bits
3361 extern __at(0x0619) __sfr PWM5CON0;
3363 typedef struct
3365 unsigned : 1;
3366 unsigned : 1;
3367 unsigned : 1;
3368 unsigned : 1;
3369 unsigned PWM5POL : 1;
3370 unsigned PWM5OUT : 1;
3371 unsigned : 1;
3372 unsigned PWM5EN : 1;
3373 } __PWM5CON0bits_t;
3375 extern __at(0x0619) volatile __PWM5CON0bits_t PWM5CON0bits;
3377 #define _PWM5CON0_PWM5POL 0x10
3378 #define _PWM5CON0_PWM5OUT 0x20
3379 #define _PWM5CON0_PWM5EN 0x80
3381 //==============================================================================
3384 //==============================================================================
3385 // PWM6DCL Bits
3387 extern __at(0x061A) __sfr PWM6DCL;
3389 typedef union
3391 struct
3393 unsigned : 1;
3394 unsigned : 1;
3395 unsigned : 1;
3396 unsigned : 1;
3397 unsigned : 1;
3398 unsigned : 1;
3399 unsigned PWM6DCL0 : 1;
3400 unsigned PWM6DCL1 : 1;
3403 struct
3405 unsigned : 6;
3406 unsigned PWM6DCL : 2;
3408 } __PWM6DCLbits_t;
3410 extern __at(0x061A) volatile __PWM6DCLbits_t PWM6DCLbits;
3412 #define _PWM6DCL0 0x40
3413 #define _PWM6DCL1 0x80
3415 //==============================================================================
3418 //==============================================================================
3419 // PWM6DCH Bits
3421 extern __at(0x061B) __sfr PWM6DCH;
3423 typedef struct
3425 unsigned PWM6DCH0 : 1;
3426 unsigned PWM6DCH1 : 1;
3427 unsigned PWM6DCH2 : 1;
3428 unsigned PWM6DCH3 : 1;
3429 unsigned PWM6DCH4 : 1;
3430 unsigned PWM6DCH5 : 1;
3431 unsigned PWM6DCH6 : 1;
3432 unsigned PWM6DCH7 : 1;
3433 } __PWM6DCHbits_t;
3435 extern __at(0x061B) volatile __PWM6DCHbits_t PWM6DCHbits;
3437 #define _PWM6DCH0 0x01
3438 #define _PWM6DCH1 0x02
3439 #define _PWM6DCH2 0x04
3440 #define _PWM6DCH3 0x08
3441 #define _PWM6DCH4 0x10
3442 #define _PWM6DCH5 0x20
3443 #define _PWM6DCH6 0x40
3444 #define _PWM6DCH7 0x80
3446 //==============================================================================
3449 //==============================================================================
3450 // PWM6CON Bits
3452 extern __at(0x061C) __sfr PWM6CON;
3454 typedef struct
3456 unsigned : 1;
3457 unsigned : 1;
3458 unsigned : 1;
3459 unsigned : 1;
3460 unsigned PWM6POL : 1;
3461 unsigned PWM6OUT : 1;
3462 unsigned : 1;
3463 unsigned PWM6EN : 1;
3464 } __PWM6CONbits_t;
3466 extern __at(0x061C) volatile __PWM6CONbits_t PWM6CONbits;
3468 #define _PWM6POL 0x10
3469 #define _PWM6OUT 0x20
3470 #define _PWM6EN 0x80
3472 //==============================================================================
3475 //==============================================================================
3476 // PWM6CON0 Bits
3478 extern __at(0x061C) __sfr PWM6CON0;
3480 typedef struct
3482 unsigned : 1;
3483 unsigned : 1;
3484 unsigned : 1;
3485 unsigned : 1;
3486 unsigned PWM6POL : 1;
3487 unsigned PWM6OUT : 1;
3488 unsigned : 1;
3489 unsigned PWM6EN : 1;
3490 } __PWM6CON0bits_t;
3492 extern __at(0x061C) volatile __PWM6CON0bits_t PWM6CON0bits;
3494 #define _PWM6CON0_PWM6POL 0x10
3495 #define _PWM6CON0_PWM6OUT 0x20
3496 #define _PWM6CON0_PWM6EN 0x80
3498 //==============================================================================
3501 //==============================================================================
3502 // CWG1CLKCON Bits
3504 extern __at(0x0691) __sfr CWG1CLKCON;
3506 typedef union
3508 struct
3510 unsigned CS : 1;
3511 unsigned : 1;
3512 unsigned : 1;
3513 unsigned : 1;
3514 unsigned : 1;
3515 unsigned : 1;
3516 unsigned : 1;
3517 unsigned : 1;
3520 struct
3522 unsigned CWG1CS : 1;
3523 unsigned : 1;
3524 unsigned : 1;
3525 unsigned : 1;
3526 unsigned : 1;
3527 unsigned : 1;
3528 unsigned : 1;
3529 unsigned : 1;
3531 } __CWG1CLKCONbits_t;
3533 extern __at(0x0691) volatile __CWG1CLKCONbits_t CWG1CLKCONbits;
3535 #define _CS 0x01
3536 #define _CWG1CS 0x01
3538 //==============================================================================
3541 //==============================================================================
3542 // CWG1DAT Bits
3544 extern __at(0x0692) __sfr CWG1DAT;
3546 typedef union
3548 struct
3550 unsigned CWG1DAT0 : 1;
3551 unsigned CWG1DAT1 : 1;
3552 unsigned CWG1DAT2 : 1;
3553 unsigned CWG1DAT3 : 1;
3554 unsigned : 1;
3555 unsigned : 1;
3556 unsigned : 1;
3557 unsigned : 1;
3560 struct
3562 unsigned CWG1DAT : 4;
3563 unsigned : 4;
3565 } __CWG1DATbits_t;
3567 extern __at(0x0692) volatile __CWG1DATbits_t CWG1DATbits;
3569 #define _CWG1DAT0 0x01
3570 #define _CWG1DAT1 0x02
3571 #define _CWG1DAT2 0x04
3572 #define _CWG1DAT3 0x08
3574 //==============================================================================
3577 //==============================================================================
3578 // CWG1DBR Bits
3580 extern __at(0x0693) __sfr CWG1DBR;
3582 typedef union
3584 struct
3586 unsigned DBR0 : 1;
3587 unsigned DBR1 : 1;
3588 unsigned DBR2 : 1;
3589 unsigned DBR3 : 1;
3590 unsigned DBR4 : 1;
3591 unsigned DBR5 : 1;
3592 unsigned : 1;
3593 unsigned : 1;
3596 struct
3598 unsigned CWG1DBR0 : 1;
3599 unsigned CWG1DBR1 : 1;
3600 unsigned CWG1DBR2 : 1;
3601 unsigned CWG1DBR3 : 1;
3602 unsigned CWG1DBR4 : 1;
3603 unsigned CWG1DBR5 : 1;
3604 unsigned : 1;
3605 unsigned : 1;
3608 struct
3610 unsigned DBR : 6;
3611 unsigned : 2;
3614 struct
3616 unsigned CWG1DBR : 6;
3617 unsigned : 2;
3619 } __CWG1DBRbits_t;
3621 extern __at(0x0693) volatile __CWG1DBRbits_t CWG1DBRbits;
3623 #define _DBR0 0x01
3624 #define _CWG1DBR0 0x01
3625 #define _DBR1 0x02
3626 #define _CWG1DBR1 0x02
3627 #define _DBR2 0x04
3628 #define _CWG1DBR2 0x04
3629 #define _DBR3 0x08
3630 #define _CWG1DBR3 0x08
3631 #define _DBR4 0x10
3632 #define _CWG1DBR4 0x10
3633 #define _DBR5 0x20
3634 #define _CWG1DBR5 0x20
3636 //==============================================================================
3639 //==============================================================================
3640 // CWG1DBF Bits
3642 extern __at(0x0694) __sfr CWG1DBF;
3644 typedef union
3646 struct
3648 unsigned DBF0 : 1;
3649 unsigned DBF1 : 1;
3650 unsigned DBF2 : 1;
3651 unsigned DBF3 : 1;
3652 unsigned DBF4 : 1;
3653 unsigned DBF5 : 1;
3654 unsigned : 1;
3655 unsigned : 1;
3658 struct
3660 unsigned CWG1DBF0 : 1;
3661 unsigned CWG1DBF1 : 1;
3662 unsigned CWG1DBF2 : 1;
3663 unsigned CWG1DBF3 : 1;
3664 unsigned CWG1DBF4 : 1;
3665 unsigned CWG1DBF5 : 1;
3666 unsigned : 1;
3667 unsigned : 1;
3670 struct
3672 unsigned DBF : 6;
3673 unsigned : 2;
3676 struct
3678 unsigned CWG1DBF : 6;
3679 unsigned : 2;
3681 } __CWG1DBFbits_t;
3683 extern __at(0x0694) volatile __CWG1DBFbits_t CWG1DBFbits;
3685 #define _DBF0 0x01
3686 #define _CWG1DBF0 0x01
3687 #define _DBF1 0x02
3688 #define _CWG1DBF1 0x02
3689 #define _DBF2 0x04
3690 #define _CWG1DBF2 0x04
3691 #define _DBF3 0x08
3692 #define _CWG1DBF3 0x08
3693 #define _DBF4 0x10
3694 #define _CWG1DBF4 0x10
3695 #define _DBF5 0x20
3696 #define _CWG1DBF5 0x20
3698 //==============================================================================
3701 //==============================================================================
3702 // CWG1CON0 Bits
3704 extern __at(0x0695) __sfr CWG1CON0;
3706 typedef union
3708 struct
3710 unsigned MODE0 : 1;
3711 unsigned MODE1 : 1;
3712 unsigned MODE2 : 1;
3713 unsigned : 1;
3714 unsigned : 1;
3715 unsigned : 1;
3716 unsigned LD : 1;
3717 unsigned EN : 1;
3720 struct
3722 unsigned CWG1MODE0 : 1;
3723 unsigned CWG1MODE1 : 1;
3724 unsigned CWG1MODE2 : 1;
3725 unsigned : 1;
3726 unsigned : 1;
3727 unsigned : 1;
3728 unsigned CWG1LD : 1;
3729 unsigned G1EN : 1;
3732 struct
3734 unsigned : 1;
3735 unsigned : 1;
3736 unsigned : 1;
3737 unsigned : 1;
3738 unsigned : 1;
3739 unsigned : 1;
3740 unsigned : 1;
3741 unsigned CWG1EN : 1;
3744 struct
3746 unsigned CWG1MODE : 3;
3747 unsigned : 5;
3750 struct
3752 unsigned MODE : 3;
3753 unsigned : 5;
3755 } __CWG1CON0bits_t;
3757 extern __at(0x0695) volatile __CWG1CON0bits_t CWG1CON0bits;
3759 #define _CWG1CON0_MODE0 0x01
3760 #define _CWG1CON0_CWG1MODE0 0x01
3761 #define _CWG1CON0_MODE1 0x02
3762 #define _CWG1CON0_CWG1MODE1 0x02
3763 #define _CWG1CON0_MODE2 0x04
3764 #define _CWG1CON0_CWG1MODE2 0x04
3765 #define _CWG1CON0_LD 0x40
3766 #define _CWG1CON0_CWG1LD 0x40
3767 #define _CWG1CON0_EN 0x80
3768 #define _CWG1CON0_G1EN 0x80
3769 #define _CWG1CON0_CWG1EN 0x80
3771 //==============================================================================
3774 //==============================================================================
3775 // CWG1CON1 Bits
3777 extern __at(0x0696) __sfr CWG1CON1;
3779 typedef union
3781 struct
3783 unsigned POLA : 1;
3784 unsigned POLB : 1;
3785 unsigned POLC : 1;
3786 unsigned POLD : 1;
3787 unsigned : 1;
3788 unsigned IN : 1;
3789 unsigned : 1;
3790 unsigned : 1;
3793 struct
3795 unsigned CWG1POLA : 1;
3796 unsigned CWG1POLB : 1;
3797 unsigned CWG1POLC : 1;
3798 unsigned CWG1POLD : 1;
3799 unsigned : 1;
3800 unsigned CWG1IN : 1;
3801 unsigned : 1;
3802 unsigned : 1;
3804 } __CWG1CON1bits_t;
3806 extern __at(0x0696) volatile __CWG1CON1bits_t CWG1CON1bits;
3808 #define _POLA 0x01
3809 #define _CWG1POLA 0x01
3810 #define _POLB 0x02
3811 #define _CWG1POLB 0x02
3812 #define _POLC 0x04
3813 #define _CWG1POLC 0x04
3814 #define _POLD 0x08
3815 #define _CWG1POLD 0x08
3816 #define _IN 0x20
3817 #define _CWG1IN 0x20
3819 //==============================================================================
3822 //==============================================================================
3823 // CWG1AS0 Bits
3825 extern __at(0x0697) __sfr CWG1AS0;
3827 typedef union
3829 struct
3831 unsigned : 1;
3832 unsigned : 1;
3833 unsigned LSAC0 : 1;
3834 unsigned LSAC1 : 1;
3835 unsigned LSBD0 : 1;
3836 unsigned LSBD1 : 1;
3837 unsigned REN : 1;
3838 unsigned SHUTDOWN : 1;
3841 struct
3843 unsigned : 1;
3844 unsigned : 1;
3845 unsigned CWG1LSAC0 : 1;
3846 unsigned CWG1LSAC1 : 1;
3847 unsigned CWG1LSBD0 : 1;
3848 unsigned CWG1LSBD1 : 1;
3849 unsigned CWG1REN : 1;
3850 unsigned CWG1SHUTDOWN : 1;
3853 struct
3855 unsigned : 2;
3856 unsigned CWG1LSAC : 2;
3857 unsigned : 4;
3860 struct
3862 unsigned : 2;
3863 unsigned LSAC : 2;
3864 unsigned : 4;
3867 struct
3869 unsigned : 4;
3870 unsigned CWG1LSBD : 2;
3871 unsigned : 2;
3874 struct
3876 unsigned : 4;
3877 unsigned LSBD : 2;
3878 unsigned : 2;
3880 } __CWG1AS0bits_t;
3882 extern __at(0x0697) volatile __CWG1AS0bits_t CWG1AS0bits;
3884 #define _LSAC0 0x04
3885 #define _CWG1LSAC0 0x04
3886 #define _LSAC1 0x08
3887 #define _CWG1LSAC1 0x08
3888 #define _LSBD0 0x10
3889 #define _CWG1LSBD0 0x10
3890 #define _LSBD1 0x20
3891 #define _CWG1LSBD1 0x20
3892 #define _REN 0x40
3893 #define _CWG1REN 0x40
3894 #define _SHUTDOWN 0x80
3895 #define _CWG1SHUTDOWN 0x80
3897 //==============================================================================
3900 //==============================================================================
3901 // CWG1AS1 Bits
3903 extern __at(0x0698) __sfr CWG1AS1;
3905 typedef struct
3907 unsigned AS0E : 1;
3908 unsigned AS1E : 1;
3909 unsigned : 1;
3910 unsigned AS3E : 1;
3911 unsigned : 1;
3912 unsigned : 1;
3913 unsigned : 1;
3914 unsigned : 1;
3915 } __CWG1AS1bits_t;
3917 extern __at(0x0698) volatile __CWG1AS1bits_t CWG1AS1bits;
3919 #define _AS0E 0x01
3920 #define _AS1E 0x02
3921 #define _AS3E 0x08
3923 //==============================================================================
3926 //==============================================================================
3927 // CWG1STR Bits
3929 extern __at(0x0699) __sfr CWG1STR;
3931 typedef union
3933 struct
3935 unsigned STRA : 1;
3936 unsigned STRB : 1;
3937 unsigned STRC : 1;
3938 unsigned STRD : 1;
3939 unsigned OVRA : 1;
3940 unsigned OVRB : 1;
3941 unsigned OVRC : 1;
3942 unsigned OVRD : 1;
3945 struct
3947 unsigned CWG1STRA : 1;
3948 unsigned CWG1STRB : 1;
3949 unsigned CWG1STRC : 1;
3950 unsigned CWG1STRD : 1;
3951 unsigned CWG1OVRA : 1;
3952 unsigned CWG1OVRB : 1;
3953 unsigned CWG1OVRC : 1;
3954 unsigned CWG1OVRD : 1;
3956 } __CWG1STRbits_t;
3958 extern __at(0x0699) volatile __CWG1STRbits_t CWG1STRbits;
3960 #define _STRA 0x01
3961 #define _CWG1STRA 0x01
3962 #define _STRB 0x02
3963 #define _CWG1STRB 0x02
3964 #define _STRC 0x04
3965 #define _CWG1STRC 0x04
3966 #define _STRD 0x08
3967 #define _CWG1STRD 0x08
3968 #define _OVRA 0x10
3969 #define _CWG1OVRA 0x10
3970 #define _OVRB 0x20
3971 #define _CWG1OVRB 0x20
3972 #define _OVRC 0x40
3973 #define _CWG1OVRC 0x40
3974 #define _OVRD 0x80
3975 #define _CWG1OVRD 0x80
3977 //==============================================================================
3979 extern __at(0x0891) __sfr NVMADR;
3981 //==============================================================================
3982 // NVMADRL Bits
3984 extern __at(0x0891) __sfr NVMADRL;
3986 typedef struct
3988 unsigned NVMADR0 : 1;
3989 unsigned NVMADR1 : 1;
3990 unsigned NVMADR2 : 1;
3991 unsigned NVMADR3 : 1;
3992 unsigned NVMADR4 : 1;
3993 unsigned NVMADR5 : 1;
3994 unsigned NVMADR6 : 1;
3995 unsigned NVMADR7 : 1;
3996 } __NVMADRLbits_t;
3998 extern __at(0x0891) volatile __NVMADRLbits_t NVMADRLbits;
4000 #define _NVMADR0 0x01
4001 #define _NVMADR1 0x02
4002 #define _NVMADR2 0x04
4003 #define _NVMADR3 0x08
4004 #define _NVMADR4 0x10
4005 #define _NVMADR5 0x20
4006 #define _NVMADR6 0x40
4007 #define _NVMADR7 0x80
4009 //==============================================================================
4012 //==============================================================================
4013 // NVMADRH Bits
4015 extern __at(0x0892) __sfr NVMADRH;
4017 typedef struct
4019 unsigned NVMADR8 : 1;
4020 unsigned NVMADR9 : 1;
4021 unsigned NVMADR10 : 1;
4022 unsigned NVMADR11 : 1;
4023 unsigned NVMADR12 : 1;
4024 unsigned NVMADR13 : 1;
4025 unsigned NVMADR14 : 1;
4026 unsigned : 1;
4027 } __NVMADRHbits_t;
4029 extern __at(0x0892) volatile __NVMADRHbits_t NVMADRHbits;
4031 #define _NVMADR8 0x01
4032 #define _NVMADR9 0x02
4033 #define _NVMADR10 0x04
4034 #define _NVMADR11 0x08
4035 #define _NVMADR12 0x10
4036 #define _NVMADR13 0x20
4037 #define _NVMADR14 0x40
4039 //==============================================================================
4041 extern __at(0x0893) __sfr NVMDAT;
4043 //==============================================================================
4044 // NVMDATL Bits
4046 extern __at(0x0893) __sfr NVMDATL;
4048 typedef struct
4050 unsigned NVMDAT0 : 1;
4051 unsigned NVMDAT1 : 1;
4052 unsigned NVMDAT2 : 1;
4053 unsigned NVMDAT3 : 1;
4054 unsigned NVMDAT4 : 1;
4055 unsigned NVMDAT5 : 1;
4056 unsigned NVMDAT6 : 1;
4057 unsigned NVMDAT7 : 1;
4058 } __NVMDATLbits_t;
4060 extern __at(0x0893) volatile __NVMDATLbits_t NVMDATLbits;
4062 #define _NVMDAT0 0x01
4063 #define _NVMDAT1 0x02
4064 #define _NVMDAT2 0x04
4065 #define _NVMDAT3 0x08
4066 #define _NVMDAT4 0x10
4067 #define _NVMDAT5 0x20
4068 #define _NVMDAT6 0x40
4069 #define _NVMDAT7 0x80
4071 //==============================================================================
4074 //==============================================================================
4075 // NVMDATH Bits
4077 extern __at(0x0894) __sfr NVMDATH;
4079 typedef struct
4081 unsigned NVMDAT8 : 1;
4082 unsigned NVMDAT9 : 1;
4083 unsigned NVMDAT10 : 1;
4084 unsigned NVMDAT11 : 1;
4085 unsigned NVMDAT12 : 1;
4086 unsigned NVMDAT13 : 1;
4087 unsigned : 1;
4088 unsigned : 1;
4089 } __NVMDATHbits_t;
4091 extern __at(0x0894) volatile __NVMDATHbits_t NVMDATHbits;
4093 #define _NVMDAT8 0x01
4094 #define _NVMDAT9 0x02
4095 #define _NVMDAT10 0x04
4096 #define _NVMDAT11 0x08
4097 #define _NVMDAT12 0x10
4098 #define _NVMDAT13 0x20
4100 //==============================================================================
4103 //==============================================================================
4104 // NVMCON1 Bits
4106 extern __at(0x0895) __sfr NVMCON1;
4108 typedef struct
4110 unsigned RD : 1;
4111 unsigned WR : 1;
4112 unsigned WREN : 1;
4113 unsigned WRERR : 1;
4114 unsigned FREE : 1;
4115 unsigned LWLO : 1;
4116 unsigned NVMREGS : 1;
4117 unsigned : 1;
4118 } __NVMCON1bits_t;
4120 extern __at(0x0895) volatile __NVMCON1bits_t NVMCON1bits;
4122 #define _RD 0x01
4123 #define _WR 0x02
4124 #define _WREN 0x04
4125 #define _WRERR 0x08
4126 #define _FREE 0x10
4127 #define _LWLO 0x20
4128 #define _NVMREGS 0x40
4130 //==============================================================================
4132 extern __at(0x0896) __sfr NVMCON2;
4134 //==============================================================================
4135 // PCON0 Bits
4137 extern __at(0x089B) __sfr PCON0;
4139 typedef struct
4141 unsigned NOT_BOR : 1;
4142 unsigned NOT_POR : 1;
4143 unsigned NOT_RI : 1;
4144 unsigned NOT_RMCLR : 1;
4145 unsigned NOT_RWDT : 1;
4146 unsigned : 1;
4147 unsigned STKUNF : 1;
4148 unsigned STKOVF : 1;
4149 } __PCON0bits_t;
4151 extern __at(0x089B) volatile __PCON0bits_t PCON0bits;
4153 #define _NOT_BOR 0x01
4154 #define _NOT_POR 0x02
4155 #define _NOT_RI 0x04
4156 #define _NOT_RMCLR 0x08
4157 #define _NOT_RWDT 0x10
4158 #define _STKUNF 0x40
4159 #define _STKOVF 0x80
4161 //==============================================================================
4164 //==============================================================================
4165 // PMD0 Bits
4167 extern __at(0x0911) __sfr PMD0;
4169 typedef struct
4171 unsigned IOCMD : 1;
4172 unsigned CLKRMD : 1;
4173 unsigned NVMMD : 1;
4174 unsigned : 1;
4175 unsigned : 1;
4176 unsigned : 1;
4177 unsigned FVRMD : 1;
4178 unsigned SYSCMD : 1;
4179 } __PMD0bits_t;
4181 extern __at(0x0911) volatile __PMD0bits_t PMD0bits;
4183 #define _IOCMD 0x01
4184 #define _CLKRMD 0x02
4185 #define _NVMMD 0x04
4186 #define _FVRMD 0x40
4187 #define _SYSCMD 0x80
4189 //==============================================================================
4192 //==============================================================================
4193 // PMD1 Bits
4195 extern __at(0x0912) __sfr PMD1;
4197 typedef struct
4199 unsigned TMR0MD : 1;
4200 unsigned TMR1MD : 1;
4201 unsigned TMR2MD : 1;
4202 unsigned : 1;
4203 unsigned : 1;
4204 unsigned : 1;
4205 unsigned : 1;
4206 unsigned NCOMD : 1;
4207 } __PMD1bits_t;
4209 extern __at(0x0912) volatile __PMD1bits_t PMD1bits;
4211 #define _TMR0MD 0x01
4212 #define _TMR1MD 0x02
4213 #define _TMR2MD 0x04
4214 #define _NCOMD 0x80
4216 //==============================================================================
4219 //==============================================================================
4220 // PMD2 Bits
4222 extern __at(0x0913) __sfr PMD2;
4224 typedef struct
4226 unsigned : 1;
4227 unsigned CMP1MD : 1;
4228 unsigned : 1;
4229 unsigned : 1;
4230 unsigned : 1;
4231 unsigned ADCMD : 1;
4232 unsigned DACMD : 1;
4233 unsigned : 1;
4234 } __PMD2bits_t;
4236 extern __at(0x0913) volatile __PMD2bits_t PMD2bits;
4238 #define _CMP1MD 0x02
4239 #define _ADCMD 0x20
4240 #define _DACMD 0x40
4242 //==============================================================================
4245 //==============================================================================
4246 // PMD3 Bits
4248 extern __at(0x0914) __sfr PMD3;
4250 typedef struct
4252 unsigned CCP1MD : 1;
4253 unsigned CCP2MD : 1;
4254 unsigned : 1;
4255 unsigned : 1;
4256 unsigned PWM5MD : 1;
4257 unsigned PWM6MD : 1;
4258 unsigned CWG1MD : 1;
4259 unsigned : 1;
4260 } __PMD3bits_t;
4262 extern __at(0x0914) volatile __PMD3bits_t PMD3bits;
4264 #define _CCP1MD 0x01
4265 #define _CCP2MD 0x02
4266 #define _PWM5MD 0x10
4267 #define _PWM6MD 0x20
4268 #define _CWG1MD 0x40
4270 //==============================================================================
4273 //==============================================================================
4274 // PMD4 Bits
4276 extern __at(0x0915) __sfr PMD4;
4278 typedef struct
4280 unsigned : 1;
4281 unsigned MSSP1MD : 1;
4282 unsigned : 1;
4283 unsigned : 1;
4284 unsigned : 1;
4285 unsigned UART1MD : 1;
4286 unsigned : 1;
4287 unsigned : 1;
4288 } __PMD4bits_t;
4290 extern __at(0x0915) volatile __PMD4bits_t PMD4bits;
4292 #define _MSSP1MD 0x02
4293 #define _UART1MD 0x20
4295 //==============================================================================
4298 //==============================================================================
4299 // PMD5 Bits
4301 extern __at(0x0916) __sfr PMD5;
4303 typedef struct
4305 unsigned DSMMD : 1;
4306 unsigned CLC1MD : 1;
4307 unsigned CLC2MD : 1;
4308 unsigned : 1;
4309 unsigned : 1;
4310 unsigned : 1;
4311 unsigned : 1;
4312 unsigned : 1;
4313 } __PMD5bits_t;
4315 extern __at(0x0916) volatile __PMD5bits_t PMD5bits;
4317 #define _DSMMD 0x01
4318 #define _CLC1MD 0x02
4319 #define _CLC2MD 0x04
4321 //==============================================================================
4324 //==============================================================================
4325 // CPUDOZE Bits
4327 extern __at(0x0918) __sfr CPUDOZE;
4329 typedef union
4331 struct
4333 unsigned DOZE0 : 1;
4334 unsigned DOZE1 : 1;
4335 unsigned DOZE2 : 1;
4336 unsigned : 1;
4337 unsigned DOE : 1;
4338 unsigned ROI : 1;
4339 unsigned DOZEN : 1;
4340 unsigned IDLEN : 1;
4343 struct
4345 unsigned DOZE : 3;
4346 unsigned : 5;
4348 } __CPUDOZEbits_t;
4350 extern __at(0x0918) volatile __CPUDOZEbits_t CPUDOZEbits;
4352 #define _DOZE0 0x01
4353 #define _DOZE1 0x02
4354 #define _DOZE2 0x04
4355 #define _DOE 0x10
4356 #define _ROI 0x20
4357 #define _DOZEN 0x40
4358 #define _IDLEN 0x80
4360 //==============================================================================
4363 //==============================================================================
4364 // OSCCON1 Bits
4366 extern __at(0x0919) __sfr OSCCON1;
4368 typedef union
4370 struct
4372 unsigned NDIV0 : 1;
4373 unsigned NDIV1 : 1;
4374 unsigned NDIV2 : 1;
4375 unsigned NDIV3 : 1;
4376 unsigned NOSC0 : 1;
4377 unsigned NOSC1 : 1;
4378 unsigned NOSC2 : 1;
4379 unsigned : 1;
4382 struct
4384 unsigned NDIV : 4;
4385 unsigned : 4;
4388 struct
4390 unsigned : 4;
4391 unsigned NOSC : 3;
4392 unsigned : 1;
4394 } __OSCCON1bits_t;
4396 extern __at(0x0919) volatile __OSCCON1bits_t OSCCON1bits;
4398 #define _NDIV0 0x01
4399 #define _NDIV1 0x02
4400 #define _NDIV2 0x04
4401 #define _NDIV3 0x08
4402 #define _NOSC0 0x10
4403 #define _NOSC1 0x20
4404 #define _NOSC2 0x40
4406 //==============================================================================
4409 //==============================================================================
4410 // OSCCON2 Bits
4412 extern __at(0x091A) __sfr OSCCON2;
4414 typedef union
4416 struct
4418 unsigned CDIV0 : 1;
4419 unsigned CDIV1 : 1;
4420 unsigned CDIV2 : 1;
4421 unsigned CDIV3 : 1;
4422 unsigned COSC0 : 1;
4423 unsigned COSC1 : 1;
4424 unsigned COSC2 : 1;
4425 unsigned : 1;
4428 struct
4430 unsigned CDIV : 4;
4431 unsigned : 4;
4434 struct
4436 unsigned : 4;
4437 unsigned COSC : 3;
4438 unsigned : 1;
4440 } __OSCCON2bits_t;
4442 extern __at(0x091A) volatile __OSCCON2bits_t OSCCON2bits;
4444 #define _CDIV0 0x01
4445 #define _CDIV1 0x02
4446 #define _CDIV2 0x04
4447 #define _CDIV3 0x08
4448 #define _COSC0 0x10
4449 #define _COSC1 0x20
4450 #define _COSC2 0x40
4452 //==============================================================================
4455 //==============================================================================
4456 // OSCCON3 Bits
4458 extern __at(0x091B) __sfr OSCCON3;
4460 typedef struct
4462 unsigned : 1;
4463 unsigned : 1;
4464 unsigned : 1;
4465 unsigned NOSCR : 1;
4466 unsigned ORDY : 1;
4467 unsigned SOSCBE : 1;
4468 unsigned SOSCPWR : 1;
4469 unsigned CSWHOLD : 1;
4470 } __OSCCON3bits_t;
4472 extern __at(0x091B) volatile __OSCCON3bits_t OSCCON3bits;
4474 #define _NOSCR 0x08
4475 #define _ORDY 0x10
4476 #define _SOSCBE 0x20
4477 #define _SOSCPWR 0x40
4478 #define _CSWHOLD 0x80
4480 //==============================================================================
4483 //==============================================================================
4484 // OSCSTAT1 Bits
4486 extern __at(0x091C) __sfr OSCSTAT1;
4488 typedef struct
4490 unsigned PLLR : 1;
4491 unsigned : 1;
4492 unsigned ADOR : 1;
4493 unsigned SOR : 1;
4494 unsigned LFOR : 1;
4495 unsigned : 1;
4496 unsigned HFOR : 1;
4497 unsigned EXTOR : 1;
4498 } __OSCSTAT1bits_t;
4500 extern __at(0x091C) volatile __OSCSTAT1bits_t OSCSTAT1bits;
4502 #define _PLLR 0x01
4503 #define _ADOR 0x04
4504 #define _SOR 0x08
4505 #define _LFOR 0x10
4506 #define _HFOR 0x40
4507 #define _EXTOR 0x80
4509 //==============================================================================
4512 //==============================================================================
4513 // OSCEN Bits
4515 extern __at(0x091D) __sfr OSCEN;
4517 typedef struct
4519 unsigned : 1;
4520 unsigned : 1;
4521 unsigned ADOEN : 1;
4522 unsigned SOSCEN : 1;
4523 unsigned LFOEN : 1;
4524 unsigned : 1;
4525 unsigned HFOEN : 1;
4526 unsigned EXTOEN : 1;
4527 } __OSCENbits_t;
4529 extern __at(0x091D) volatile __OSCENbits_t OSCENbits;
4531 #define _ADOEN 0x04
4532 #define _SOSCEN 0x08
4533 #define _LFOEN 0x10
4534 #define _HFOEN 0x40
4535 #define _EXTOEN 0x80
4537 //==============================================================================
4540 //==============================================================================
4541 // OSCTUNE Bits
4543 extern __at(0x091E) __sfr OSCTUNE;
4545 typedef union
4547 struct
4549 unsigned HFTUN0 : 1;
4550 unsigned HFTUN1 : 1;
4551 unsigned HFTUN2 : 1;
4552 unsigned HFTUN3 : 1;
4553 unsigned HFTUN4 : 1;
4554 unsigned HFTUN5 : 1;
4555 unsigned : 1;
4556 unsigned : 1;
4559 struct
4561 unsigned HFTUN : 6;
4562 unsigned : 2;
4564 } __OSCTUNEbits_t;
4566 extern __at(0x091E) volatile __OSCTUNEbits_t OSCTUNEbits;
4568 #define _HFTUN0 0x01
4569 #define _HFTUN1 0x02
4570 #define _HFTUN2 0x04
4571 #define _HFTUN3 0x08
4572 #define _HFTUN4 0x10
4573 #define _HFTUN5 0x20
4575 //==============================================================================
4578 //==============================================================================
4579 // OSCFRQ Bits
4581 extern __at(0x091F) __sfr OSCFRQ;
4583 typedef union
4585 struct
4587 unsigned HFFRQ0 : 1;
4588 unsigned HFFRQ1 : 1;
4589 unsigned HFFRQ2 : 1;
4590 unsigned HFFRQ3 : 1;
4591 unsigned : 1;
4592 unsigned : 1;
4593 unsigned : 1;
4594 unsigned : 1;
4597 struct
4599 unsigned HFFRQ : 4;
4600 unsigned : 4;
4602 } __OSCFRQbits_t;
4604 extern __at(0x091F) volatile __OSCFRQbits_t OSCFRQbits;
4606 #define _HFFRQ0 0x01
4607 #define _HFFRQ1 0x02
4608 #define _HFFRQ2 0x04
4609 #define _HFFRQ3 0x08
4611 //==============================================================================
4614 //==============================================================================
4615 // PPSLOCK Bits
4617 extern __at(0x0E0F) __sfr PPSLOCK;
4619 typedef struct
4621 unsigned PPSLOCKED : 1;
4622 unsigned : 1;
4623 unsigned : 1;
4624 unsigned : 1;
4625 unsigned : 1;
4626 unsigned : 1;
4627 unsigned : 1;
4628 unsigned : 1;
4629 } __PPSLOCKbits_t;
4631 extern __at(0x0E0F) volatile __PPSLOCKbits_t PPSLOCKbits;
4633 #define _PPSLOCKED 0x01
4635 //==============================================================================
4638 //==============================================================================
4639 // INTPPS Bits
4641 extern __at(0x0E10) __sfr INTPPS;
4643 typedef union
4645 struct
4647 unsigned INTPPS0 : 1;
4648 unsigned INTPPS1 : 1;
4649 unsigned INTPPS2 : 1;
4650 unsigned INTPPS3 : 1;
4651 unsigned INTPPS4 : 1;
4652 unsigned : 1;
4653 unsigned : 1;
4654 unsigned : 1;
4657 struct
4659 unsigned INTPPS : 5;
4660 unsigned : 3;
4662 } __INTPPSbits_t;
4664 extern __at(0x0E10) volatile __INTPPSbits_t INTPPSbits;
4666 #define _INTPPS0 0x01
4667 #define _INTPPS1 0x02
4668 #define _INTPPS2 0x04
4669 #define _INTPPS3 0x08
4670 #define _INTPPS4 0x10
4672 //==============================================================================
4675 //==============================================================================
4676 // T0CKIPPS Bits
4678 extern __at(0x0E11) __sfr T0CKIPPS;
4680 typedef union
4682 struct
4684 unsigned T0CKIPPS0 : 1;
4685 unsigned T0CKIPPS1 : 1;
4686 unsigned T0CKIPPS2 : 1;
4687 unsigned T0CKIPPS3 : 1;
4688 unsigned T0CKIPPS4 : 1;
4689 unsigned : 1;
4690 unsigned : 1;
4691 unsigned : 1;
4694 struct
4696 unsigned T0CKIPPS : 5;
4697 unsigned : 3;
4699 } __T0CKIPPSbits_t;
4701 extern __at(0x0E11) volatile __T0CKIPPSbits_t T0CKIPPSbits;
4703 #define _T0CKIPPS0 0x01
4704 #define _T0CKIPPS1 0x02
4705 #define _T0CKIPPS2 0x04
4706 #define _T0CKIPPS3 0x08
4707 #define _T0CKIPPS4 0x10
4709 //==============================================================================
4712 //==============================================================================
4713 // T1CKIPPS Bits
4715 extern __at(0x0E12) __sfr T1CKIPPS;
4717 typedef union
4719 struct
4721 unsigned T1CKIPPS0 : 1;
4722 unsigned T1CKIPPS1 : 1;
4723 unsigned T1CKIPPS2 : 1;
4724 unsigned T1CKIPPS3 : 1;
4725 unsigned T1CKIPPS4 : 1;
4726 unsigned : 1;
4727 unsigned : 1;
4728 unsigned : 1;
4731 struct
4733 unsigned T1CKIPPS : 5;
4734 unsigned : 3;
4736 } __T1CKIPPSbits_t;
4738 extern __at(0x0E12) volatile __T1CKIPPSbits_t T1CKIPPSbits;
4740 #define _T1CKIPPS0 0x01
4741 #define _T1CKIPPS1 0x02
4742 #define _T1CKIPPS2 0x04
4743 #define _T1CKIPPS3 0x08
4744 #define _T1CKIPPS4 0x10
4746 //==============================================================================
4749 //==============================================================================
4750 // T1GPPS Bits
4752 extern __at(0x0E13) __sfr T1GPPS;
4754 typedef union
4756 struct
4758 unsigned T1GPPS0 : 1;
4759 unsigned T1GPPS1 : 1;
4760 unsigned T1GPPS2 : 1;
4761 unsigned T1GPPS3 : 1;
4762 unsigned T1GPPS4 : 1;
4763 unsigned : 1;
4764 unsigned : 1;
4765 unsigned : 1;
4768 struct
4770 unsigned T1GPPS : 5;
4771 unsigned : 3;
4773 } __T1GPPSbits_t;
4775 extern __at(0x0E13) volatile __T1GPPSbits_t T1GPPSbits;
4777 #define _T1GPPS0 0x01
4778 #define _T1GPPS1 0x02
4779 #define _T1GPPS2 0x04
4780 #define _T1GPPS3 0x08
4781 #define _T1GPPS4 0x10
4783 //==============================================================================
4786 //==============================================================================
4787 // CCP1PPS Bits
4789 extern __at(0x0E14) __sfr CCP1PPS;
4791 typedef union
4793 struct
4795 unsigned CCP1PPS0 : 1;
4796 unsigned CCP1PPS1 : 1;
4797 unsigned CCP1PPS2 : 1;
4798 unsigned CCP1PPS3 : 1;
4799 unsigned CCP1PPS4 : 1;
4800 unsigned : 1;
4801 unsigned : 1;
4802 unsigned : 1;
4805 struct
4807 unsigned CCP1PPS : 5;
4808 unsigned : 3;
4810 } __CCP1PPSbits_t;
4812 extern __at(0x0E14) volatile __CCP1PPSbits_t CCP1PPSbits;
4814 #define _CCP1PPS0 0x01
4815 #define _CCP1PPS1 0x02
4816 #define _CCP1PPS2 0x04
4817 #define _CCP1PPS3 0x08
4818 #define _CCP1PPS4 0x10
4820 //==============================================================================
4823 //==============================================================================
4824 // CCP2PPS Bits
4826 extern __at(0x0E15) __sfr CCP2PPS;
4828 typedef union
4830 struct
4832 unsigned CCP2PPS0 : 1;
4833 unsigned CCP2PPS1 : 1;
4834 unsigned CCP2PPS2 : 1;
4835 unsigned CCP2PPS3 : 1;
4836 unsigned CCP2PPS4 : 1;
4837 unsigned : 1;
4838 unsigned : 1;
4839 unsigned : 1;
4842 struct
4844 unsigned CCP2PPS : 5;
4845 unsigned : 3;
4847 } __CCP2PPSbits_t;
4849 extern __at(0x0E15) volatile __CCP2PPSbits_t CCP2PPSbits;
4851 #define _CCP2PPS0 0x01
4852 #define _CCP2PPS1 0x02
4853 #define _CCP2PPS2 0x04
4854 #define _CCP2PPS3 0x08
4855 #define _CCP2PPS4 0x10
4857 //==============================================================================
4860 //==============================================================================
4861 // CWG1PPS Bits
4863 extern __at(0x0E18) __sfr CWG1PPS;
4865 typedef union
4867 struct
4869 unsigned CWG1PPS0 : 1;
4870 unsigned CWG1PPS1 : 1;
4871 unsigned CWG1PPS2 : 1;
4872 unsigned CWG1PPS3 : 1;
4873 unsigned CWG1PPS4 : 1;
4874 unsigned : 1;
4875 unsigned : 1;
4876 unsigned : 1;
4879 struct
4881 unsigned CWG1PPS : 5;
4882 unsigned : 3;
4884 } __CWG1PPSbits_t;
4886 extern __at(0x0E18) volatile __CWG1PPSbits_t CWG1PPSbits;
4888 #define _CWG1PPS0 0x01
4889 #define _CWG1PPS1 0x02
4890 #define _CWG1PPS2 0x04
4891 #define _CWG1PPS3 0x08
4892 #define _CWG1PPS4 0x10
4894 //==============================================================================
4897 //==============================================================================
4898 // MDCIN1PPS Bits
4900 extern __at(0x0E1A) __sfr MDCIN1PPS;
4902 typedef union
4904 struct
4906 unsigned MDCIN1PPS0 : 1;
4907 unsigned MDCIN1PPS1 : 1;
4908 unsigned MDCIN1PPS2 : 1;
4909 unsigned MDCIN1PPS3 : 1;
4910 unsigned MDCIN1PPS4 : 1;
4911 unsigned : 1;
4912 unsigned : 1;
4913 unsigned : 1;
4916 struct
4918 unsigned MDCIN1PPS : 5;
4919 unsigned : 3;
4921 } __MDCIN1PPSbits_t;
4923 extern __at(0x0E1A) volatile __MDCIN1PPSbits_t MDCIN1PPSbits;
4925 #define _MDCIN1PPS0 0x01
4926 #define _MDCIN1PPS1 0x02
4927 #define _MDCIN1PPS2 0x04
4928 #define _MDCIN1PPS3 0x08
4929 #define _MDCIN1PPS4 0x10
4931 //==============================================================================
4934 //==============================================================================
4935 // MDCIN2PPS Bits
4937 extern __at(0x0E1B) __sfr MDCIN2PPS;
4939 typedef union
4941 struct
4943 unsigned MDCIN2PPS0 : 1;
4944 unsigned MDCIN2PPS1 : 1;
4945 unsigned MDCIN2PPS2 : 1;
4946 unsigned MDCIN2PPS3 : 1;
4947 unsigned MDCIN2PPS4 : 1;
4948 unsigned : 1;
4949 unsigned : 1;
4950 unsigned : 1;
4953 struct
4955 unsigned MDCIN2PPS : 5;
4956 unsigned : 3;
4958 } __MDCIN2PPSbits_t;
4960 extern __at(0x0E1B) volatile __MDCIN2PPSbits_t MDCIN2PPSbits;
4962 #define _MDCIN2PPS0 0x01
4963 #define _MDCIN2PPS1 0x02
4964 #define _MDCIN2PPS2 0x04
4965 #define _MDCIN2PPS3 0x08
4966 #define _MDCIN2PPS4 0x10
4968 //==============================================================================
4971 //==============================================================================
4972 // MDMINPPS Bits
4974 extern __at(0x0E1C) __sfr MDMINPPS;
4976 typedef union
4978 struct
4980 unsigned MDMINPPS0 : 1;
4981 unsigned MDMINPPS1 : 1;
4982 unsigned MDMINPPS2 : 1;
4983 unsigned MDMINPPS3 : 1;
4984 unsigned MDMINPPS4 : 1;
4985 unsigned : 1;
4986 unsigned : 1;
4987 unsigned : 1;
4990 struct
4992 unsigned MDMINPPS : 5;
4993 unsigned : 3;
4995 } __MDMINPPSbits_t;
4997 extern __at(0x0E1C) volatile __MDMINPPSbits_t MDMINPPSbits;
4999 #define _MDMINPPS0 0x01
5000 #define _MDMINPPS1 0x02
5001 #define _MDMINPPS2 0x04
5002 #define _MDMINPPS3 0x08
5003 #define _MDMINPPS4 0x10
5005 //==============================================================================
5008 //==============================================================================
5009 // SSP1CLKPPS Bits
5011 extern __at(0x0E20) __sfr SSP1CLKPPS;
5013 typedef union
5015 struct
5017 unsigned SSP1CLKPPS0 : 1;
5018 unsigned SSP1CLKPPS1 : 1;
5019 unsigned SSP1CLKPPS2 : 1;
5020 unsigned SSP1CLKPPS3 : 1;
5021 unsigned SSP1CLKPPS4 : 1;
5022 unsigned : 1;
5023 unsigned : 1;
5024 unsigned : 1;
5027 struct
5029 unsigned SSP1CLKPPS : 5;
5030 unsigned : 3;
5032 } __SSP1CLKPPSbits_t;
5034 extern __at(0x0E20) volatile __SSP1CLKPPSbits_t SSP1CLKPPSbits;
5036 #define _SSP1CLKPPS0 0x01
5037 #define _SSP1CLKPPS1 0x02
5038 #define _SSP1CLKPPS2 0x04
5039 #define _SSP1CLKPPS3 0x08
5040 #define _SSP1CLKPPS4 0x10
5042 //==============================================================================
5045 //==============================================================================
5046 // SSP1DATPPS Bits
5048 extern __at(0x0E21) __sfr SSP1DATPPS;
5050 typedef union
5052 struct
5054 unsigned SSP1DATPPS0 : 1;
5055 unsigned SSP1DATPPS1 : 1;
5056 unsigned SSP1DATPPS2 : 1;
5057 unsigned SSP1DATPPS3 : 1;
5058 unsigned SSP1DATPPS4 : 1;
5059 unsigned : 1;
5060 unsigned : 1;
5061 unsigned : 1;
5064 struct
5066 unsigned SSP1DATPPS : 5;
5067 unsigned : 3;
5069 } __SSP1DATPPSbits_t;
5071 extern __at(0x0E21) volatile __SSP1DATPPSbits_t SSP1DATPPSbits;
5073 #define _SSP1DATPPS0 0x01
5074 #define _SSP1DATPPS1 0x02
5075 #define _SSP1DATPPS2 0x04
5076 #define _SSP1DATPPS3 0x08
5077 #define _SSP1DATPPS4 0x10
5079 //==============================================================================
5082 //==============================================================================
5083 // SSP1SSPPS Bits
5085 extern __at(0x0E22) __sfr SSP1SSPPS;
5087 typedef union
5089 struct
5091 unsigned SSP1SSPPS0 : 1;
5092 unsigned SSP1SSPPS1 : 1;
5093 unsigned SSP1SSPPS2 : 1;
5094 unsigned SSP1SSPPS3 : 1;
5095 unsigned SSP1SSPPS4 : 1;
5096 unsigned : 1;
5097 unsigned : 1;
5098 unsigned : 1;
5101 struct
5103 unsigned SSP1SSPPS : 5;
5104 unsigned : 3;
5106 } __SSP1SSPPSbits_t;
5108 extern __at(0x0E22) volatile __SSP1SSPPSbits_t SSP1SSPPSbits;
5110 #define _SSP1SSPPS0 0x01
5111 #define _SSP1SSPPS1 0x02
5112 #define _SSP1SSPPS2 0x04
5113 #define _SSP1SSPPS3 0x08
5114 #define _SSP1SSPPS4 0x10
5116 //==============================================================================
5119 //==============================================================================
5120 // RXPPS Bits
5122 extern __at(0x0E24) __sfr RXPPS;
5124 typedef union
5126 struct
5128 unsigned RXPPS0 : 1;
5129 unsigned RXPPS1 : 1;
5130 unsigned RXPPS2 : 1;
5131 unsigned RXPPS3 : 1;
5132 unsigned RXPPS4 : 1;
5133 unsigned : 1;
5134 unsigned : 1;
5135 unsigned : 1;
5138 struct
5140 unsigned RXPPS : 5;
5141 unsigned : 3;
5143 } __RXPPSbits_t;
5145 extern __at(0x0E24) volatile __RXPPSbits_t RXPPSbits;
5147 #define _RXPPS0 0x01
5148 #define _RXPPS1 0x02
5149 #define _RXPPS2 0x04
5150 #define _RXPPS3 0x08
5151 #define _RXPPS4 0x10
5153 //==============================================================================
5156 //==============================================================================
5157 // TXPPS Bits
5159 extern __at(0x0E25) __sfr TXPPS;
5161 typedef union
5163 struct
5165 unsigned TXPPS0 : 1;
5166 unsigned TXPPS1 : 1;
5167 unsigned TXPPS2 : 1;
5168 unsigned TXPPS3 : 1;
5169 unsigned TXPPS4 : 1;
5170 unsigned : 1;
5171 unsigned : 1;
5172 unsigned : 1;
5175 struct
5177 unsigned TXPPS : 5;
5178 unsigned : 3;
5180 } __TXPPSbits_t;
5182 extern __at(0x0E25) volatile __TXPPSbits_t TXPPSbits;
5184 #define _TXPPS0 0x01
5185 #define _TXPPS1 0x02
5186 #define _TXPPS2 0x04
5187 #define _TXPPS3 0x08
5188 #define _TXPPS4 0x10
5190 //==============================================================================
5193 //==============================================================================
5194 // CLCIN0PPS Bits
5196 extern __at(0x0E28) __sfr CLCIN0PPS;
5198 typedef union
5200 struct
5202 unsigned CLCIN0PPS0 : 1;
5203 unsigned CLCIN0PPS1 : 1;
5204 unsigned CLCIN0PPS2 : 1;
5205 unsigned CLCIN0PPS3 : 1;
5206 unsigned CLCIN0PPS4 : 1;
5207 unsigned : 1;
5208 unsigned : 1;
5209 unsigned : 1;
5212 struct
5214 unsigned CLCIN0PPS : 5;
5215 unsigned : 3;
5217 } __CLCIN0PPSbits_t;
5219 extern __at(0x0E28) volatile __CLCIN0PPSbits_t CLCIN0PPSbits;
5221 #define _CLCIN0PPS0 0x01
5222 #define _CLCIN0PPS1 0x02
5223 #define _CLCIN0PPS2 0x04
5224 #define _CLCIN0PPS3 0x08
5225 #define _CLCIN0PPS4 0x10
5227 //==============================================================================
5230 //==============================================================================
5231 // CLCIN1PPS Bits
5233 extern __at(0x0E29) __sfr CLCIN1PPS;
5235 typedef union
5237 struct
5239 unsigned CLCIN1PPS0 : 1;
5240 unsigned CLCIN1PPS1 : 1;
5241 unsigned CLCIN1PPS2 : 1;
5242 unsigned CLCIN1PPS3 : 1;
5243 unsigned CLCIN1PPS4 : 1;
5244 unsigned : 1;
5245 unsigned : 1;
5246 unsigned : 1;
5249 struct
5251 unsigned CLCIN1PPS : 5;
5252 unsigned : 3;
5254 } __CLCIN1PPSbits_t;
5256 extern __at(0x0E29) volatile __CLCIN1PPSbits_t CLCIN1PPSbits;
5258 #define _CLCIN1PPS0 0x01
5259 #define _CLCIN1PPS1 0x02
5260 #define _CLCIN1PPS2 0x04
5261 #define _CLCIN1PPS3 0x08
5262 #define _CLCIN1PPS4 0x10
5264 //==============================================================================
5267 //==============================================================================
5268 // CLCIN2PPS Bits
5270 extern __at(0x0E2A) __sfr CLCIN2PPS;
5272 typedef union
5274 struct
5276 unsigned CLCIN2PPS0 : 1;
5277 unsigned CLCIN2PPS1 : 1;
5278 unsigned CLCIN2PPS2 : 1;
5279 unsigned CLCIN2PPS3 : 1;
5280 unsigned CLCIN2PPS4 : 1;
5281 unsigned : 1;
5282 unsigned : 1;
5283 unsigned : 1;
5286 struct
5288 unsigned CLCIN2PPS : 5;
5289 unsigned : 3;
5291 } __CLCIN2PPSbits_t;
5293 extern __at(0x0E2A) volatile __CLCIN2PPSbits_t CLCIN2PPSbits;
5295 #define _CLCIN2PPS0 0x01
5296 #define _CLCIN2PPS1 0x02
5297 #define _CLCIN2PPS2 0x04
5298 #define _CLCIN2PPS3 0x08
5299 #define _CLCIN2PPS4 0x10
5301 //==============================================================================
5304 //==============================================================================
5305 // CLCIN3PPS Bits
5307 extern __at(0x0E2B) __sfr CLCIN3PPS;
5309 typedef union
5311 struct
5313 unsigned CLCIN3PPS0 : 1;
5314 unsigned CLCIN3PPS1 : 1;
5315 unsigned CLCIN3PPS2 : 1;
5316 unsigned CLCIN3PPS3 : 1;
5317 unsigned CLCIN3PPS4 : 1;
5318 unsigned : 1;
5319 unsigned : 1;
5320 unsigned : 1;
5323 struct
5325 unsigned CLCIN3PPS : 5;
5326 unsigned : 3;
5328 } __CLCIN3PPSbits_t;
5330 extern __at(0x0E2B) volatile __CLCIN3PPSbits_t CLCIN3PPSbits;
5332 #define _CLCIN3PPS0 0x01
5333 #define _CLCIN3PPS1 0x02
5334 #define _CLCIN3PPS2 0x04
5335 #define _CLCIN3PPS3 0x08
5336 #define _CLCIN3PPS4 0x10
5338 //==============================================================================
5341 //==============================================================================
5342 // RA0PPS Bits
5344 extern __at(0x0E90) __sfr RA0PPS;
5346 typedef union
5348 struct
5350 unsigned RA0PPS0 : 1;
5351 unsigned RA0PPS1 : 1;
5352 unsigned RA0PPS2 : 1;
5353 unsigned RA0PPS3 : 1;
5354 unsigned RA0PPS4 : 1;
5355 unsigned : 1;
5356 unsigned : 1;
5357 unsigned : 1;
5360 struct
5362 unsigned RA0PPS : 5;
5363 unsigned : 3;
5365 } __RA0PPSbits_t;
5367 extern __at(0x0E90) volatile __RA0PPSbits_t RA0PPSbits;
5369 #define _RA0PPS0 0x01
5370 #define _RA0PPS1 0x02
5371 #define _RA0PPS2 0x04
5372 #define _RA0PPS3 0x08
5373 #define _RA0PPS4 0x10
5375 //==============================================================================
5378 //==============================================================================
5379 // RA1PPS Bits
5381 extern __at(0x0E91) __sfr RA1PPS;
5383 typedef union
5385 struct
5387 unsigned RA1PPS0 : 1;
5388 unsigned RA1PPS1 : 1;
5389 unsigned RA1PPS2 : 1;
5390 unsigned RA1PPS3 : 1;
5391 unsigned RA1PPS4 : 1;
5392 unsigned : 1;
5393 unsigned : 1;
5394 unsigned : 1;
5397 struct
5399 unsigned RA1PPS : 5;
5400 unsigned : 3;
5402 } __RA1PPSbits_t;
5404 extern __at(0x0E91) volatile __RA1PPSbits_t RA1PPSbits;
5406 #define _RA1PPS0 0x01
5407 #define _RA1PPS1 0x02
5408 #define _RA1PPS2 0x04
5409 #define _RA1PPS3 0x08
5410 #define _RA1PPS4 0x10
5412 //==============================================================================
5415 //==============================================================================
5416 // RA2PPS Bits
5418 extern __at(0x0E92) __sfr RA2PPS;
5420 typedef union
5422 struct
5424 unsigned RA2PPS0 : 1;
5425 unsigned RA2PPS1 : 1;
5426 unsigned RA2PPS2 : 1;
5427 unsigned RA2PPS3 : 1;
5428 unsigned RA2PPS4 : 1;
5429 unsigned : 1;
5430 unsigned : 1;
5431 unsigned : 1;
5434 struct
5436 unsigned RA2PPS : 5;
5437 unsigned : 3;
5439 } __RA2PPSbits_t;
5441 extern __at(0x0E92) volatile __RA2PPSbits_t RA2PPSbits;
5443 #define _RA2PPS0 0x01
5444 #define _RA2PPS1 0x02
5445 #define _RA2PPS2 0x04
5446 #define _RA2PPS3 0x08
5447 #define _RA2PPS4 0x10
5449 //==============================================================================
5452 //==============================================================================
5453 // RA4PPS Bits
5455 extern __at(0x0E94) __sfr RA4PPS;
5457 typedef union
5459 struct
5461 unsigned RA4PPS0 : 1;
5462 unsigned RA4PPS1 : 1;
5463 unsigned RA4PPS2 : 1;
5464 unsigned RA4PPS3 : 1;
5465 unsigned RA4PPS4 : 1;
5466 unsigned : 1;
5467 unsigned : 1;
5468 unsigned : 1;
5471 struct
5473 unsigned RA4PPS : 5;
5474 unsigned : 3;
5476 } __RA4PPSbits_t;
5478 extern __at(0x0E94) volatile __RA4PPSbits_t RA4PPSbits;
5480 #define _RA4PPS0 0x01
5481 #define _RA4PPS1 0x02
5482 #define _RA4PPS2 0x04
5483 #define _RA4PPS3 0x08
5484 #define _RA4PPS4 0x10
5486 //==============================================================================
5489 //==============================================================================
5490 // RA5PPS Bits
5492 extern __at(0x0E95) __sfr RA5PPS;
5494 typedef union
5496 struct
5498 unsigned RA5PPS0 : 1;
5499 unsigned RA5PPS1 : 1;
5500 unsigned RA5PPS2 : 1;
5501 unsigned RA5PPS3 : 1;
5502 unsigned RA5PPS4 : 1;
5503 unsigned : 1;
5504 unsigned : 1;
5505 unsigned : 1;
5508 struct
5510 unsigned RA5PPS : 5;
5511 unsigned : 3;
5513 } __RA5PPSbits_t;
5515 extern __at(0x0E95) volatile __RA5PPSbits_t RA5PPSbits;
5517 #define _RA5PPS0 0x01
5518 #define _RA5PPS1 0x02
5519 #define _RA5PPS2 0x04
5520 #define _RA5PPS3 0x08
5521 #define _RA5PPS4 0x10
5523 //==============================================================================
5526 //==============================================================================
5527 // CLCDATA Bits
5529 extern __at(0x0F0F) __sfr CLCDATA;
5531 typedef struct
5533 unsigned MLC1OUT : 1;
5534 unsigned MLC2OUT : 1;
5535 unsigned : 1;
5536 unsigned : 1;
5537 unsigned : 1;
5538 unsigned : 1;
5539 unsigned : 1;
5540 unsigned : 1;
5541 } __CLCDATAbits_t;
5543 extern __at(0x0F0F) volatile __CLCDATAbits_t CLCDATAbits;
5545 #define _MLC1OUT 0x01
5546 #define _MLC2OUT 0x02
5548 //==============================================================================
5551 //==============================================================================
5552 // CLC1CON Bits
5554 extern __at(0x0F10) __sfr CLC1CON;
5556 typedef union
5558 struct
5560 unsigned LC1MODE0 : 1;
5561 unsigned LC1MODE1 : 1;
5562 unsigned LC1MODE2 : 1;
5563 unsigned LC1INTN : 1;
5564 unsigned LC1INTP : 1;
5565 unsigned LC1OUT : 1;
5566 unsigned : 1;
5567 unsigned LC1EN : 1;
5570 struct
5572 unsigned MODE0 : 1;
5573 unsigned MODE1 : 1;
5574 unsigned MODE2 : 1;
5575 unsigned INTN : 1;
5576 unsigned INTP : 1;
5577 unsigned OUT : 1;
5578 unsigned : 1;
5579 unsigned EN : 1;
5582 struct
5584 unsigned MODE : 3;
5585 unsigned : 5;
5588 struct
5590 unsigned LC1MODE : 3;
5591 unsigned : 5;
5593 } __CLC1CONbits_t;
5595 extern __at(0x0F10) volatile __CLC1CONbits_t CLC1CONbits;
5597 #define _LC1MODE0 0x01
5598 #define _MODE0 0x01
5599 #define _LC1MODE1 0x02
5600 #define _MODE1 0x02
5601 #define _LC1MODE2 0x04
5602 #define _MODE2 0x04
5603 #define _LC1INTN 0x08
5604 #define _INTN 0x08
5605 #define _LC1INTP 0x10
5606 #define _INTP 0x10
5607 #define _LC1OUT 0x20
5608 #define _OUT 0x20
5609 #define _LC1EN 0x80
5610 #define _EN 0x80
5612 //==============================================================================
5615 //==============================================================================
5616 // CLC1POL Bits
5618 extern __at(0x0F11) __sfr CLC1POL;
5620 typedef union
5622 struct
5624 unsigned LC1G1POL : 1;
5625 unsigned LC1G2POL : 1;
5626 unsigned LC1G3POL : 1;
5627 unsigned LC1G4POL : 1;
5628 unsigned : 1;
5629 unsigned : 1;
5630 unsigned : 1;
5631 unsigned LC1POL : 1;
5634 struct
5636 unsigned G1POL : 1;
5637 unsigned G2POL : 1;
5638 unsigned G3POL : 1;
5639 unsigned G4POL : 1;
5640 unsigned : 1;
5641 unsigned : 1;
5642 unsigned : 1;
5643 unsigned POL : 1;
5645 } __CLC1POLbits_t;
5647 extern __at(0x0F11) volatile __CLC1POLbits_t CLC1POLbits;
5649 #define _LC1G1POL 0x01
5650 #define _G1POL 0x01
5651 #define _LC1G2POL 0x02
5652 #define _G2POL 0x02
5653 #define _LC1G3POL 0x04
5654 #define _G3POL 0x04
5655 #define _LC1G4POL 0x08
5656 #define _G4POL 0x08
5657 #define _LC1POL 0x80
5658 #define _POL 0x80
5660 //==============================================================================
5663 //==============================================================================
5664 // CLC1SEL0 Bits
5666 extern __at(0x0F12) __sfr CLC1SEL0;
5668 typedef union
5670 struct
5672 unsigned LC1D1S0 : 1;
5673 unsigned LC1D1S1 : 1;
5674 unsigned LC1D1S2 : 1;
5675 unsigned LC1D1S3 : 1;
5676 unsigned LC1D1S4 : 1;
5677 unsigned : 1;
5678 unsigned : 1;
5679 unsigned : 1;
5682 struct
5684 unsigned D1S0 : 1;
5685 unsigned D1S1 : 1;
5686 unsigned D1S2 : 1;
5687 unsigned D1S3 : 1;
5688 unsigned D1S4 : 1;
5689 unsigned : 1;
5690 unsigned : 1;
5691 unsigned : 1;
5694 struct
5696 unsigned LC1D1S : 5;
5697 unsigned : 3;
5700 struct
5702 unsigned D1S : 5;
5703 unsigned : 3;
5705 } __CLC1SEL0bits_t;
5707 extern __at(0x0F12) volatile __CLC1SEL0bits_t CLC1SEL0bits;
5709 #define _LC1D1S0 0x01
5710 #define _D1S0 0x01
5711 #define _LC1D1S1 0x02
5712 #define _D1S1 0x02
5713 #define _LC1D1S2 0x04
5714 #define _D1S2 0x04
5715 #define _LC1D1S3 0x08
5716 #define _D1S3 0x08
5717 #define _LC1D1S4 0x10
5718 #define _D1S4 0x10
5720 //==============================================================================
5723 //==============================================================================
5724 // CLC1SEL1 Bits
5726 extern __at(0x0F13) __sfr CLC1SEL1;
5728 typedef union
5730 struct
5732 unsigned LC1D2S0 : 1;
5733 unsigned LC1D2S1 : 1;
5734 unsigned LC1D2S2 : 1;
5735 unsigned LC1D2S3 : 1;
5736 unsigned LC1D2S4 : 1;
5737 unsigned : 1;
5738 unsigned : 1;
5739 unsigned : 1;
5742 struct
5744 unsigned D2S0 : 1;
5745 unsigned D2S1 : 1;
5746 unsigned D2S2 : 1;
5747 unsigned D2S3 : 1;
5748 unsigned D2S4 : 1;
5749 unsigned : 1;
5750 unsigned : 1;
5751 unsigned : 1;
5754 struct
5756 unsigned D2S : 5;
5757 unsigned : 3;
5760 struct
5762 unsigned LC1D2S : 5;
5763 unsigned : 3;
5765 } __CLC1SEL1bits_t;
5767 extern __at(0x0F13) volatile __CLC1SEL1bits_t CLC1SEL1bits;
5769 #define _LC1D2S0 0x01
5770 #define _D2S0 0x01
5771 #define _LC1D2S1 0x02
5772 #define _D2S1 0x02
5773 #define _LC1D2S2 0x04
5774 #define _D2S2 0x04
5775 #define _LC1D2S3 0x08
5776 #define _D2S3 0x08
5777 #define _LC1D2S4 0x10
5778 #define _D2S4 0x10
5780 //==============================================================================
5783 //==============================================================================
5784 // CLC1SEL2 Bits
5786 extern __at(0x0F14) __sfr CLC1SEL2;
5788 typedef union
5790 struct
5792 unsigned LC1D3S0 : 1;
5793 unsigned LC1D3S1 : 1;
5794 unsigned LC1D3S2 : 1;
5795 unsigned LC1D3S3 : 1;
5796 unsigned LC1D3S4 : 1;
5797 unsigned : 1;
5798 unsigned : 1;
5799 unsigned : 1;
5802 struct
5804 unsigned D3S0 : 1;
5805 unsigned D3S1 : 1;
5806 unsigned D3S2 : 1;
5807 unsigned D3S3 : 1;
5808 unsigned D3S4 : 1;
5809 unsigned : 1;
5810 unsigned : 1;
5811 unsigned : 1;
5814 struct
5816 unsigned LC1D3S : 5;
5817 unsigned : 3;
5820 struct
5822 unsigned D3S : 5;
5823 unsigned : 3;
5825 } __CLC1SEL2bits_t;
5827 extern __at(0x0F14) volatile __CLC1SEL2bits_t CLC1SEL2bits;
5829 #define _LC1D3S0 0x01
5830 #define _D3S0 0x01
5831 #define _LC1D3S1 0x02
5832 #define _D3S1 0x02
5833 #define _LC1D3S2 0x04
5834 #define _D3S2 0x04
5835 #define _LC1D3S3 0x08
5836 #define _D3S3 0x08
5837 #define _LC1D3S4 0x10
5838 #define _D3S4 0x10
5840 //==============================================================================
5843 //==============================================================================
5844 // CLC1SEL3 Bits
5846 extern __at(0x0F15) __sfr CLC1SEL3;
5848 typedef union
5850 struct
5852 unsigned LC1D4S0 : 1;
5853 unsigned LC1D4S1 : 1;
5854 unsigned LC1D4S2 : 1;
5855 unsigned LC1D4S3 : 1;
5856 unsigned LC1D4S4 : 1;
5857 unsigned : 1;
5858 unsigned : 1;
5859 unsigned : 1;
5862 struct
5864 unsigned D4S0 : 1;
5865 unsigned D4S1 : 1;
5866 unsigned D4S2 : 1;
5867 unsigned D4S3 : 1;
5868 unsigned D4S4 : 1;
5869 unsigned : 1;
5870 unsigned : 1;
5871 unsigned : 1;
5874 struct
5876 unsigned D4S : 5;
5877 unsigned : 3;
5880 struct
5882 unsigned LC1D4S : 5;
5883 unsigned : 3;
5885 } __CLC1SEL3bits_t;
5887 extern __at(0x0F15) volatile __CLC1SEL3bits_t CLC1SEL3bits;
5889 #define _LC1D4S0 0x01
5890 #define _D4S0 0x01
5891 #define _LC1D4S1 0x02
5892 #define _D4S1 0x02
5893 #define _LC1D4S2 0x04
5894 #define _D4S2 0x04
5895 #define _LC1D4S3 0x08
5896 #define _D4S3 0x08
5897 #define _LC1D4S4 0x10
5898 #define _D4S4 0x10
5900 //==============================================================================
5903 //==============================================================================
5904 // CLC1GLS0 Bits
5906 extern __at(0x0F16) __sfr CLC1GLS0;
5908 typedef union
5910 struct
5912 unsigned LC1G1D1N : 1;
5913 unsigned LC1G1D1T : 1;
5914 unsigned LC1G1D2N : 1;
5915 unsigned LC1G1D2T : 1;
5916 unsigned LC1G1D3N : 1;
5917 unsigned LC1G1D3T : 1;
5918 unsigned LC1G1D4N : 1;
5919 unsigned LC1G1D4T : 1;
5922 struct
5924 unsigned D1N : 1;
5925 unsigned D1T : 1;
5926 unsigned D2N : 1;
5927 unsigned D2T : 1;
5928 unsigned D3N : 1;
5929 unsigned D3T : 1;
5930 unsigned D4N : 1;
5931 unsigned D4T : 1;
5933 } __CLC1GLS0bits_t;
5935 extern __at(0x0F16) volatile __CLC1GLS0bits_t CLC1GLS0bits;
5937 #define _LC1G1D1N 0x01
5938 #define _D1N 0x01
5939 #define _LC1G1D1T 0x02
5940 #define _D1T 0x02
5941 #define _LC1G1D2N 0x04
5942 #define _D2N 0x04
5943 #define _LC1G1D2T 0x08
5944 #define _D2T 0x08
5945 #define _LC1G1D3N 0x10
5946 #define _D3N 0x10
5947 #define _LC1G1D3T 0x20
5948 #define _D3T 0x20
5949 #define _LC1G1D4N 0x40
5950 #define _D4N 0x40
5951 #define _LC1G1D4T 0x80
5952 #define _D4T 0x80
5954 //==============================================================================
5957 //==============================================================================
5958 // CLC1GLS1 Bits
5960 extern __at(0x0F17) __sfr CLC1GLS1;
5962 typedef union
5964 struct
5966 unsigned LC1G2D1N : 1;
5967 unsigned LC1G2D1T : 1;
5968 unsigned LC1G2D2N : 1;
5969 unsigned LC1G2D2T : 1;
5970 unsigned LC1G2D3N : 1;
5971 unsigned LC1G2D3T : 1;
5972 unsigned LC1G2D4N : 1;
5973 unsigned LC1G2D4T : 1;
5976 struct
5978 unsigned D1N : 1;
5979 unsigned D1T : 1;
5980 unsigned D2N : 1;
5981 unsigned D2T : 1;
5982 unsigned D3N : 1;
5983 unsigned D3T : 1;
5984 unsigned D4N : 1;
5985 unsigned D4T : 1;
5987 } __CLC1GLS1bits_t;
5989 extern __at(0x0F17) volatile __CLC1GLS1bits_t CLC1GLS1bits;
5991 #define _CLC1GLS1_LC1G2D1N 0x01
5992 #define _CLC1GLS1_D1N 0x01
5993 #define _CLC1GLS1_LC1G2D1T 0x02
5994 #define _CLC1GLS1_D1T 0x02
5995 #define _CLC1GLS1_LC1G2D2N 0x04
5996 #define _CLC1GLS1_D2N 0x04
5997 #define _CLC1GLS1_LC1G2D2T 0x08
5998 #define _CLC1GLS1_D2T 0x08
5999 #define _CLC1GLS1_LC1G2D3N 0x10
6000 #define _CLC1GLS1_D3N 0x10
6001 #define _CLC1GLS1_LC1G2D3T 0x20
6002 #define _CLC1GLS1_D3T 0x20
6003 #define _CLC1GLS1_LC1G2D4N 0x40
6004 #define _CLC1GLS1_D4N 0x40
6005 #define _CLC1GLS1_LC1G2D4T 0x80
6006 #define _CLC1GLS1_D4T 0x80
6008 //==============================================================================
6011 //==============================================================================
6012 // CLC1GLS2 Bits
6014 extern __at(0x0F18) __sfr CLC1GLS2;
6016 typedef union
6018 struct
6020 unsigned LC1G3D1N : 1;
6021 unsigned LC1G3D1T : 1;
6022 unsigned LC1G3D2N : 1;
6023 unsigned LC1G3D2T : 1;
6024 unsigned LC1G3D3N : 1;
6025 unsigned LC1G3D3T : 1;
6026 unsigned LC1G3D4N : 1;
6027 unsigned LC1G3D4T : 1;
6030 struct
6032 unsigned D1N : 1;
6033 unsigned D1T : 1;
6034 unsigned D2N : 1;
6035 unsigned D2T : 1;
6036 unsigned D3N : 1;
6037 unsigned D3T : 1;
6038 unsigned D4N : 1;
6039 unsigned D4T : 1;
6041 } __CLC1GLS2bits_t;
6043 extern __at(0x0F18) volatile __CLC1GLS2bits_t CLC1GLS2bits;
6045 #define _CLC1GLS2_LC1G3D1N 0x01
6046 #define _CLC1GLS2_D1N 0x01
6047 #define _CLC1GLS2_LC1G3D1T 0x02
6048 #define _CLC1GLS2_D1T 0x02
6049 #define _CLC1GLS2_LC1G3D2N 0x04
6050 #define _CLC1GLS2_D2N 0x04
6051 #define _CLC1GLS2_LC1G3D2T 0x08
6052 #define _CLC1GLS2_D2T 0x08
6053 #define _CLC1GLS2_LC1G3D3N 0x10
6054 #define _CLC1GLS2_D3N 0x10
6055 #define _CLC1GLS2_LC1G3D3T 0x20
6056 #define _CLC1GLS2_D3T 0x20
6057 #define _CLC1GLS2_LC1G3D4N 0x40
6058 #define _CLC1GLS2_D4N 0x40
6059 #define _CLC1GLS2_LC1G3D4T 0x80
6060 #define _CLC1GLS2_D4T 0x80
6062 //==============================================================================
6065 //==============================================================================
6066 // CLC1GLS3 Bits
6068 extern __at(0x0F19) __sfr CLC1GLS3;
6070 typedef union
6072 struct
6074 unsigned LC1G4D1N : 1;
6075 unsigned LC1G4D1T : 1;
6076 unsigned LC1G4D2N : 1;
6077 unsigned LC1G4D2T : 1;
6078 unsigned LC1G4D3N : 1;
6079 unsigned LC1G4D3T : 1;
6080 unsigned LC1G4D4N : 1;
6081 unsigned LC1G4D4T : 1;
6084 struct
6086 unsigned G4D1N : 1;
6087 unsigned G4D1T : 1;
6088 unsigned G4D2N : 1;
6089 unsigned G4D2T : 1;
6090 unsigned G4D3N : 1;
6091 unsigned G4D3T : 1;
6092 unsigned G4D4N : 1;
6093 unsigned G4D4T : 1;
6095 } __CLC1GLS3bits_t;
6097 extern __at(0x0F19) volatile __CLC1GLS3bits_t CLC1GLS3bits;
6099 #define _LC1G4D1N 0x01
6100 #define _G4D1N 0x01
6101 #define _LC1G4D1T 0x02
6102 #define _G4D1T 0x02
6103 #define _LC1G4D2N 0x04
6104 #define _G4D2N 0x04
6105 #define _LC1G4D2T 0x08
6106 #define _G4D2T 0x08
6107 #define _LC1G4D3N 0x10
6108 #define _G4D3N 0x10
6109 #define _LC1G4D3T 0x20
6110 #define _G4D3T 0x20
6111 #define _LC1G4D4N 0x40
6112 #define _G4D4N 0x40
6113 #define _LC1G4D4T 0x80
6114 #define _G4D4T 0x80
6116 //==============================================================================
6119 //==============================================================================
6120 // CLC2CON Bits
6122 extern __at(0x0F1A) __sfr CLC2CON;
6124 typedef union
6126 struct
6128 unsigned LC2MODE0 : 1;
6129 unsigned LC2MODE1 : 1;
6130 unsigned LC2MODE2 : 1;
6131 unsigned LC2INTN : 1;
6132 unsigned LC2INTP : 1;
6133 unsigned LC2OUT : 1;
6134 unsigned : 1;
6135 unsigned LC2EN : 1;
6138 struct
6140 unsigned MODE0 : 1;
6141 unsigned MODE1 : 1;
6142 unsigned MODE2 : 1;
6143 unsigned INTN : 1;
6144 unsigned INTP : 1;
6145 unsigned OUT : 1;
6146 unsigned : 1;
6147 unsigned EN : 1;
6150 struct
6152 unsigned LC2MODE : 3;
6153 unsigned : 5;
6156 struct
6158 unsigned MODE : 3;
6159 unsigned : 5;
6161 } __CLC2CONbits_t;
6163 extern __at(0x0F1A) volatile __CLC2CONbits_t CLC2CONbits;
6165 #define _CLC2CON_LC2MODE0 0x01
6166 #define _CLC2CON_MODE0 0x01
6167 #define _CLC2CON_LC2MODE1 0x02
6168 #define _CLC2CON_MODE1 0x02
6169 #define _CLC2CON_LC2MODE2 0x04
6170 #define _CLC2CON_MODE2 0x04
6171 #define _CLC2CON_LC2INTN 0x08
6172 #define _CLC2CON_INTN 0x08
6173 #define _CLC2CON_LC2INTP 0x10
6174 #define _CLC2CON_INTP 0x10
6175 #define _CLC2CON_LC2OUT 0x20
6176 #define _CLC2CON_OUT 0x20
6177 #define _CLC2CON_LC2EN 0x80
6178 #define _CLC2CON_EN 0x80
6180 //==============================================================================
6183 //==============================================================================
6184 // CLC2POL Bits
6186 extern __at(0x0F1B) __sfr CLC2POL;
6188 typedef union
6190 struct
6192 unsigned LC2G1POL : 1;
6193 unsigned LC2G2POL : 1;
6194 unsigned LC2G3POL : 1;
6195 unsigned LC2G4POL : 1;
6196 unsigned : 1;
6197 unsigned : 1;
6198 unsigned : 1;
6199 unsigned LC2POL : 1;
6202 struct
6204 unsigned G1POL : 1;
6205 unsigned G2POL : 1;
6206 unsigned G3POL : 1;
6207 unsigned G4POL : 1;
6208 unsigned : 1;
6209 unsigned : 1;
6210 unsigned : 1;
6211 unsigned POL : 1;
6213 } __CLC2POLbits_t;
6215 extern __at(0x0F1B) volatile __CLC2POLbits_t CLC2POLbits;
6217 #define _CLC2POL_LC2G1POL 0x01
6218 #define _CLC2POL_G1POL 0x01
6219 #define _CLC2POL_LC2G2POL 0x02
6220 #define _CLC2POL_G2POL 0x02
6221 #define _CLC2POL_LC2G3POL 0x04
6222 #define _CLC2POL_G3POL 0x04
6223 #define _CLC2POL_LC2G4POL 0x08
6224 #define _CLC2POL_G4POL 0x08
6225 #define _CLC2POL_LC2POL 0x80
6226 #define _CLC2POL_POL 0x80
6228 //==============================================================================
6231 //==============================================================================
6232 // CLC2SEL0 Bits
6234 extern __at(0x0F1C) __sfr CLC2SEL0;
6236 typedef union
6238 struct
6240 unsigned LC2D1S0 : 1;
6241 unsigned LC2D1S1 : 1;
6242 unsigned LC2D1S2 : 1;
6243 unsigned LC2D1S3 : 1;
6244 unsigned LC2D1S4 : 1;
6245 unsigned : 1;
6246 unsigned : 1;
6247 unsigned : 1;
6250 struct
6252 unsigned D1S0 : 1;
6253 unsigned D1S1 : 1;
6254 unsigned D1S2 : 1;
6255 unsigned D1S3 : 1;
6256 unsigned D1S4 : 1;
6257 unsigned : 1;
6258 unsigned : 1;
6259 unsigned : 1;
6262 struct
6264 unsigned D1S : 5;
6265 unsigned : 3;
6268 struct
6270 unsigned LC2D1S : 5;
6271 unsigned : 3;
6273 } __CLC2SEL0bits_t;
6275 extern __at(0x0F1C) volatile __CLC2SEL0bits_t CLC2SEL0bits;
6277 #define _CLC2SEL0_LC2D1S0 0x01
6278 #define _CLC2SEL0_D1S0 0x01
6279 #define _CLC2SEL0_LC2D1S1 0x02
6280 #define _CLC2SEL0_D1S1 0x02
6281 #define _CLC2SEL0_LC2D1S2 0x04
6282 #define _CLC2SEL0_D1S2 0x04
6283 #define _CLC2SEL0_LC2D1S3 0x08
6284 #define _CLC2SEL0_D1S3 0x08
6285 #define _CLC2SEL0_LC2D1S4 0x10
6286 #define _CLC2SEL0_D1S4 0x10
6288 //==============================================================================
6291 //==============================================================================
6292 // CLC2SEL1 Bits
6294 extern __at(0x0F1D) __sfr CLC2SEL1;
6296 typedef union
6298 struct
6300 unsigned LC2D2S0 : 1;
6301 unsigned LC2D2S1 : 1;
6302 unsigned LC2D2S2 : 1;
6303 unsigned LC2D2S3 : 1;
6304 unsigned LC2D2S4 : 1;
6305 unsigned : 1;
6306 unsigned : 1;
6307 unsigned : 1;
6310 struct
6312 unsigned D2S0 : 1;
6313 unsigned D2S1 : 1;
6314 unsigned D2S2 : 1;
6315 unsigned D2S3 : 1;
6316 unsigned D2S4 : 1;
6317 unsigned : 1;
6318 unsigned : 1;
6319 unsigned : 1;
6322 struct
6324 unsigned LC2D2S : 5;
6325 unsigned : 3;
6328 struct
6330 unsigned D2S : 5;
6331 unsigned : 3;
6333 } __CLC2SEL1bits_t;
6335 extern __at(0x0F1D) volatile __CLC2SEL1bits_t CLC2SEL1bits;
6337 #define _CLC2SEL1_LC2D2S0 0x01
6338 #define _CLC2SEL1_D2S0 0x01
6339 #define _CLC2SEL1_LC2D2S1 0x02
6340 #define _CLC2SEL1_D2S1 0x02
6341 #define _CLC2SEL1_LC2D2S2 0x04
6342 #define _CLC2SEL1_D2S2 0x04
6343 #define _CLC2SEL1_LC2D2S3 0x08
6344 #define _CLC2SEL1_D2S3 0x08
6345 #define _CLC2SEL1_LC2D2S4 0x10
6346 #define _CLC2SEL1_D2S4 0x10
6348 //==============================================================================
6351 //==============================================================================
6352 // CLC2SEL2 Bits
6354 extern __at(0x0F1E) __sfr CLC2SEL2;
6356 typedef union
6358 struct
6360 unsigned LC2D3S0 : 1;
6361 unsigned LC2D3S1 : 1;
6362 unsigned LC2D3S2 : 1;
6363 unsigned LC2D3S3 : 1;
6364 unsigned LC2D3S4 : 1;
6365 unsigned : 1;
6366 unsigned : 1;
6367 unsigned : 1;
6370 struct
6372 unsigned D3S0 : 1;
6373 unsigned D3S1 : 1;
6374 unsigned D3S2 : 1;
6375 unsigned D3S3 : 1;
6376 unsigned D3S4 : 1;
6377 unsigned : 1;
6378 unsigned : 1;
6379 unsigned : 1;
6382 struct
6384 unsigned LC2D3S : 5;
6385 unsigned : 3;
6388 struct
6390 unsigned D3S : 5;
6391 unsigned : 3;
6393 } __CLC2SEL2bits_t;
6395 extern __at(0x0F1E) volatile __CLC2SEL2bits_t CLC2SEL2bits;
6397 #define _CLC2SEL2_LC2D3S0 0x01
6398 #define _CLC2SEL2_D3S0 0x01
6399 #define _CLC2SEL2_LC2D3S1 0x02
6400 #define _CLC2SEL2_D3S1 0x02
6401 #define _CLC2SEL2_LC2D3S2 0x04
6402 #define _CLC2SEL2_D3S2 0x04
6403 #define _CLC2SEL2_LC2D3S3 0x08
6404 #define _CLC2SEL2_D3S3 0x08
6405 #define _CLC2SEL2_LC2D3S4 0x10
6406 #define _CLC2SEL2_D3S4 0x10
6408 //==============================================================================
6411 //==============================================================================
6412 // CLC2SEL3 Bits
6414 extern __at(0x0F1F) __sfr CLC2SEL3;
6416 typedef union
6418 struct
6420 unsigned LC2D4S0 : 1;
6421 unsigned LC2D4S1 : 1;
6422 unsigned LC2D4S2 : 1;
6423 unsigned LC2D4S3 : 1;
6424 unsigned LC2D4S4 : 1;
6425 unsigned : 1;
6426 unsigned : 1;
6427 unsigned : 1;
6430 struct
6432 unsigned D4S0 : 1;
6433 unsigned D4S1 : 1;
6434 unsigned D4S2 : 1;
6435 unsigned D4S3 : 1;
6436 unsigned D4S4 : 1;
6437 unsigned : 1;
6438 unsigned : 1;
6439 unsigned : 1;
6442 struct
6444 unsigned LC2D4S : 5;
6445 unsigned : 3;
6448 struct
6450 unsigned D4S : 5;
6451 unsigned : 3;
6453 } __CLC2SEL3bits_t;
6455 extern __at(0x0F1F) volatile __CLC2SEL3bits_t CLC2SEL3bits;
6457 #define _CLC2SEL3_LC2D4S0 0x01
6458 #define _CLC2SEL3_D4S0 0x01
6459 #define _CLC2SEL3_LC2D4S1 0x02
6460 #define _CLC2SEL3_D4S1 0x02
6461 #define _CLC2SEL3_LC2D4S2 0x04
6462 #define _CLC2SEL3_D4S2 0x04
6463 #define _CLC2SEL3_LC2D4S3 0x08
6464 #define _CLC2SEL3_D4S3 0x08
6465 #define _CLC2SEL3_LC2D4S4 0x10
6466 #define _CLC2SEL3_D4S4 0x10
6468 //==============================================================================
6471 //==============================================================================
6472 // CLC2GLS0 Bits
6474 extern __at(0x0F20) __sfr CLC2GLS0;
6476 typedef union
6478 struct
6480 unsigned LC2G1D1N : 1;
6481 unsigned LC2G1D1T : 1;
6482 unsigned LC2G1D2N : 1;
6483 unsigned LC2G1D2T : 1;
6484 unsigned LC2G1D3N : 1;
6485 unsigned LC2G1D3T : 1;
6486 unsigned LC2G1D4N : 1;
6487 unsigned LC2G1D4T : 1;
6490 struct
6492 unsigned D1N : 1;
6493 unsigned D1T : 1;
6494 unsigned D2N : 1;
6495 unsigned D2T : 1;
6496 unsigned D3N : 1;
6497 unsigned D3T : 1;
6498 unsigned D4N : 1;
6499 unsigned D4T : 1;
6501 } __CLC2GLS0bits_t;
6503 extern __at(0x0F20) volatile __CLC2GLS0bits_t CLC2GLS0bits;
6505 #define _CLC2GLS0_LC2G1D1N 0x01
6506 #define _CLC2GLS0_D1N 0x01
6507 #define _CLC2GLS0_LC2G1D1T 0x02
6508 #define _CLC2GLS0_D1T 0x02
6509 #define _CLC2GLS0_LC2G1D2N 0x04
6510 #define _CLC2GLS0_D2N 0x04
6511 #define _CLC2GLS0_LC2G1D2T 0x08
6512 #define _CLC2GLS0_D2T 0x08
6513 #define _CLC2GLS0_LC2G1D3N 0x10
6514 #define _CLC2GLS0_D3N 0x10
6515 #define _CLC2GLS0_LC2G1D3T 0x20
6516 #define _CLC2GLS0_D3T 0x20
6517 #define _CLC2GLS0_LC2G1D4N 0x40
6518 #define _CLC2GLS0_D4N 0x40
6519 #define _CLC2GLS0_LC2G1D4T 0x80
6520 #define _CLC2GLS0_D4T 0x80
6522 //==============================================================================
6525 //==============================================================================
6526 // CLC2GLS1 Bits
6528 extern __at(0x0F21) __sfr CLC2GLS1;
6530 typedef union
6532 struct
6534 unsigned LC2G2D1N : 1;
6535 unsigned LC2G2D1T : 1;
6536 unsigned LC2G2D2N : 1;
6537 unsigned LC2G2D2T : 1;
6538 unsigned LC2G2D3N : 1;
6539 unsigned LC2G2D3T : 1;
6540 unsigned LC2G2D4N : 1;
6541 unsigned LC2G2D4T : 1;
6544 struct
6546 unsigned D1N : 1;
6547 unsigned D1T : 1;
6548 unsigned D2N : 1;
6549 unsigned D2T : 1;
6550 unsigned D3N : 1;
6551 unsigned D3T : 1;
6552 unsigned D4N : 1;
6553 unsigned D4T : 1;
6555 } __CLC2GLS1bits_t;
6557 extern __at(0x0F21) volatile __CLC2GLS1bits_t CLC2GLS1bits;
6559 #define _CLC2GLS1_LC2G2D1N 0x01
6560 #define _CLC2GLS1_D1N 0x01
6561 #define _CLC2GLS1_LC2G2D1T 0x02
6562 #define _CLC2GLS1_D1T 0x02
6563 #define _CLC2GLS1_LC2G2D2N 0x04
6564 #define _CLC2GLS1_D2N 0x04
6565 #define _CLC2GLS1_LC2G2D2T 0x08
6566 #define _CLC2GLS1_D2T 0x08
6567 #define _CLC2GLS1_LC2G2D3N 0x10
6568 #define _CLC2GLS1_D3N 0x10
6569 #define _CLC2GLS1_LC2G2D3T 0x20
6570 #define _CLC2GLS1_D3T 0x20
6571 #define _CLC2GLS1_LC2G2D4N 0x40
6572 #define _CLC2GLS1_D4N 0x40
6573 #define _CLC2GLS1_LC2G2D4T 0x80
6574 #define _CLC2GLS1_D4T 0x80
6576 //==============================================================================
6579 //==============================================================================
6580 // CLC2GLS2 Bits
6582 extern __at(0x0F22) __sfr CLC2GLS2;
6584 typedef union
6586 struct
6588 unsigned LC2G3D1N : 1;
6589 unsigned LC2G3D1T : 1;
6590 unsigned LC2G3D2N : 1;
6591 unsigned LC2G3D2T : 1;
6592 unsigned LC2G3D3N : 1;
6593 unsigned LC2G3D3T : 1;
6594 unsigned LC2G3D4N : 1;
6595 unsigned LC2G3D4T : 1;
6598 struct
6600 unsigned D1N : 1;
6601 unsigned D1T : 1;
6602 unsigned D2N : 1;
6603 unsigned D2T : 1;
6604 unsigned D3N : 1;
6605 unsigned D3T : 1;
6606 unsigned D4N : 1;
6607 unsigned D4T : 1;
6609 } __CLC2GLS2bits_t;
6611 extern __at(0x0F22) volatile __CLC2GLS2bits_t CLC2GLS2bits;
6613 #define _CLC2GLS2_LC2G3D1N 0x01
6614 #define _CLC2GLS2_D1N 0x01
6615 #define _CLC2GLS2_LC2G3D1T 0x02
6616 #define _CLC2GLS2_D1T 0x02
6617 #define _CLC2GLS2_LC2G3D2N 0x04
6618 #define _CLC2GLS2_D2N 0x04
6619 #define _CLC2GLS2_LC2G3D2T 0x08
6620 #define _CLC2GLS2_D2T 0x08
6621 #define _CLC2GLS2_LC2G3D3N 0x10
6622 #define _CLC2GLS2_D3N 0x10
6623 #define _CLC2GLS2_LC2G3D3T 0x20
6624 #define _CLC2GLS2_D3T 0x20
6625 #define _CLC2GLS2_LC2G3D4N 0x40
6626 #define _CLC2GLS2_D4N 0x40
6627 #define _CLC2GLS2_LC2G3D4T 0x80
6628 #define _CLC2GLS2_D4T 0x80
6630 //==============================================================================
6633 //==============================================================================
6634 // CLC2GLS3 Bits
6636 extern __at(0x0F23) __sfr CLC2GLS3;
6638 typedef union
6640 struct
6642 unsigned LC2G4D1N : 1;
6643 unsigned LC2G4D1T : 1;
6644 unsigned LC2G4D2N : 1;
6645 unsigned LC2G4D2T : 1;
6646 unsigned LC2G4D3N : 1;
6647 unsigned LC2G4D3T : 1;
6648 unsigned LC2G4D4N : 1;
6649 unsigned LC2G4D4T : 1;
6652 struct
6654 unsigned G4D1N : 1;
6655 unsigned G4D1T : 1;
6656 unsigned G4D2N : 1;
6657 unsigned G4D2T : 1;
6658 unsigned G4D3N : 1;
6659 unsigned G4D3T : 1;
6660 unsigned G4D4N : 1;
6661 unsigned G4D4T : 1;
6663 } __CLC2GLS3bits_t;
6665 extern __at(0x0F23) volatile __CLC2GLS3bits_t CLC2GLS3bits;
6667 #define _CLC2GLS3_LC2G4D1N 0x01
6668 #define _CLC2GLS3_G4D1N 0x01
6669 #define _CLC2GLS3_LC2G4D1T 0x02
6670 #define _CLC2GLS3_G4D1T 0x02
6671 #define _CLC2GLS3_LC2G4D2N 0x04
6672 #define _CLC2GLS3_G4D2N 0x04
6673 #define _CLC2GLS3_LC2G4D2T 0x08
6674 #define _CLC2GLS3_G4D2T 0x08
6675 #define _CLC2GLS3_LC2G4D3N 0x10
6676 #define _CLC2GLS3_G4D3N 0x10
6677 #define _CLC2GLS3_LC2G4D3T 0x20
6678 #define _CLC2GLS3_G4D3T 0x20
6679 #define _CLC2GLS3_LC2G4D4N 0x40
6680 #define _CLC2GLS3_G4D4N 0x40
6681 #define _CLC2GLS3_LC2G4D4T 0x80
6682 #define _CLC2GLS3_G4D4T 0x80
6684 //==============================================================================
6687 //==============================================================================
6688 // STATUS_SHAD Bits
6690 extern __at(0x0FE4) __sfr STATUS_SHAD;
6692 typedef struct
6694 unsigned C_SHAD : 1;
6695 unsigned DC_SHAD : 1;
6696 unsigned Z_SHAD : 1;
6697 unsigned : 1;
6698 unsigned : 1;
6699 unsigned : 1;
6700 unsigned : 1;
6701 unsigned : 1;
6702 } __STATUS_SHADbits_t;
6704 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
6706 #define _C_SHAD 0x01
6707 #define _DC_SHAD 0x02
6708 #define _Z_SHAD 0x04
6710 //==============================================================================
6712 extern __at(0x0FE5) __sfr WREG_SHAD;
6713 extern __at(0x0FE6) __sfr BSR_SHAD;
6714 extern __at(0x0FE7) __sfr PCLATH_SHAD;
6715 extern __at(0x0FE8) __sfr FSR0L_SHAD;
6716 extern __at(0x0FE9) __sfr FSR0H_SHAD;
6717 extern __at(0x0FEA) __sfr FSR1L_SHAD;
6718 extern __at(0x0FEB) __sfr FSR1H_SHAD;
6719 extern __at(0x0FED) __sfr STKPTR;
6720 extern __at(0x0FEE) __sfr TOSL;
6721 extern __at(0x0FEF) __sfr TOSH;
6723 //==============================================================================
6725 // Configuration Bits
6727 //==============================================================================
6729 #define _CONFIG1 0x8007
6730 #define _CONFIG2 0x8008
6731 #define _CONFIG3 0x8009
6732 #define _CONFIG4 0x800A
6734 //----------------------------- CONFIG1 Options -------------------------------
6736 #define _FEXTOSC_LP 0x3FF8 // LP (crystal oscillator) optimized for 32.768 kHz.
6737 #define _FEXTOSC_XT 0x3FF9 // XT (crystal oscillator) from 100 kHz to 4 MHz.
6738 #define _FEXTOSC_HS 0x3FFA // HS (crystal oscillator) above 4 MHz.
6739 #define _FEXTOSC_OFF 0x3FFC // Oscillator not enabled.
6740 #define _FEXTOSC_ECL 0x3FFD // EC (external clock) below 100 kHz.
6741 #define _FEXTOSC_ECM 0x3FFE // EC (external clock) for 100 kHz to 8 MHz.
6742 #define _FEXTOSC_ECH 0x3FFF // EC (external clock) above 8 MHz.
6743 #define _RSTOSC_HFINT32 0x3F8F // HFINTOSC with 2x PLL (32MHz).
6744 #define _RSTOSC_EXT4X 0x3F9F // EXTOSC with 4x PLL, with EXTOSC operating per FEXTOSC bits.
6745 #define _RSTOSC_SOSC 0x3FBF // SOSC (31kHz).
6746 #define _RSTOSC_LFINT 0x3FCF // LFINTOSC (31kHz).
6747 #define _RSTOSC_HFINT1 0x3FEF // HFINTOSC (1MHz).
6748 #define _RSTOSC_EXT1X 0x3FFF // EXTOSC operating per FEXTOSC bits.
6749 #define _CLKOUTEN_ON 0x3EFF // CLKOUT function is enabled; FOSC/4 clock appears at OSC2.
6750 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled; I/O or oscillator function on OSC2.
6751 #define _CSWEN_OFF 0x37FF // The NOSC and NDIV bits cannot be changed by user software.
6752 #define _CSWEN_ON 0x3FFF // Writing to NOSC and NDIV is allowed.
6753 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
6754 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
6756 //----------------------------- CONFIG2 Options -------------------------------
6758 #define _MCLRE_OFF 0x3FFE // MCLR/VPP pin function is digital input; MCLR internally disabled; Weak pull-up under control of port pin's WPU control bit.
6759 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR; Weak pull-up enabled.
6760 #define _PWRTE_ON 0x3FFD // PWRT enabled.
6761 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
6762 #define _WDTE_OFF 0x3FF3 // WDT disabled; SWDTEN is ignored.
6763 #define _WDTE_SWDTEN 0x3FF7 // WDT controlled by the SWDTEN bit in the WDTCON register.
6764 #define _WDTE_SLEEP 0x3FFB // WDT enabled while running and disabled while in SLEEP/IDLE; SWDTEN is ignored.
6765 #define _WDTE_ON 0x3FFF // WDT enabled, SWDTEN is ignored.
6766 #define _LPBOREN_ON 0x3FDF // ULPBOR enabled.
6767 #define _LPBOREN_OFF 0x3FFF // ULPBOR disabled.
6768 #define _BOREN_OFF 0x3F3F // Brown-out Reset disabled.
6769 #define _BOREN_SBOREN 0x3F7F // Brown-out Reset enabled according to SBOREN.
6770 #define _BOREN_SLEEP 0x3FBF // Brown-out Reset enabled while running, disabled in Sleep; SBOREN is ignored.
6771 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled, SBOREN bit ignored.
6772 #define _BORV_HIGH 0x3DFF // Brown-out voltage (Vbor) set to 2.7V.
6773 #define _BORV_LOW 0x3FFF // Brown-out voltage (Vbor) set to 2.45V.
6774 #define _PPS1WAY_OFF 0x37FF // The PPSLOCK bit can be set and cleared repeatedly (subject to the unlock sequence).
6775 #define _PPS1WAY_ON 0x3FFF // The PPSLOCK bit can be cleared and set only once; PPS registers remain locked after one clear/set cycle.
6776 #define _STVREN_OFF 0x2FFF // Stack Overflow or Underflow will not cause a Reset.
6777 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
6778 #define _DEBUG_ON 0x1FFF // Background debugger enabled.
6779 #define _DEBUG_OFF 0x3FFF // Background debugger disabled.
6781 //----------------------------- CONFIG3 Options -------------------------------
6783 #define _WRT_ALL 0x3FFC // 0000h to 07FFh write protected, no addresses may be modified.
6784 #define _WRT_HALF 0x3FFD // 0000h to 03FFh write-protected, 0400h to 07FFh may be modified.
6785 #define _WRT_BOOT 0x3FFE // 0000h to 01FFh write-protected, 0200h to 07FFh may be modified.
6786 #define _WRT_OFF 0x3FFF // Write protection off.
6787 #define _LVP_OFF 0x1FFF // HV on MCLR/VPP must be used for programming.
6788 #define _LVP_ON 0x3FFF // Low voltage programming enabled. MCLR/VPP pin function is MCLR. MCLRE configuration bit is ignored.
6790 //----------------------------- CONFIG4 Options -------------------------------
6792 #define _CP_ON 0x3FFE // User NVM code protection enabled.
6793 #define _CP_OFF 0x3FFF // User NVM code protection disabled.
6794 #define _CPD_ON 0x3FFD // Data NVM code protection enabled.
6795 #define _CPD_OFF 0x3FFF // Data NVM code protection disabled.
6797 //==============================================================================
6799 #define _DEVID1 0x8006
6801 #define _IDLOC0 0x8000
6802 #define _IDLOC1 0x8001
6803 #define _IDLOC2 0x8002
6804 #define _IDLOC3 0x8003
6806 //==============================================================================
6808 #ifndef NO_BIT_DEFINES
6810 #define ADACT0 ADACTbits.ADACT0 // bit 0
6811 #define ADACT1 ADACTbits.ADACT1 // bit 1
6812 #define ADACT2 ADACTbits.ADACT2 // bit 2
6813 #define ADACT3 ADACTbits.ADACT3 // bit 3
6815 #define ADON ADCON0bits.ADON // bit 0
6816 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
6817 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
6818 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
6819 #define CHS0 ADCON0bits.CHS0 // bit 2
6820 #define CHS1 ADCON0bits.CHS1 // bit 3
6821 #define CHS2 ADCON0bits.CHS2 // bit 4
6822 #define CHS3 ADCON0bits.CHS3 // bit 5
6823 #define CHS4 ADCON0bits.CHS4 // bit 6
6824 #define CHS5 ADCON0bits.CHS5 // bit 7
6826 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
6827 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
6828 #define ADNREF ADCON1bits.ADNREF // bit 2
6829 #define ADCS0 ADCON1bits.ADCS0 // bit 4
6830 #define ADCS1 ADCON1bits.ADCS1 // bit 5
6831 #define ADCS2 ADCON1bits.ADCS2 // bit 6
6832 #define ADFM ADCON1bits.ADFM // bit 7
6834 #define ANSA0 ANSELAbits.ANSA0 // bit 0
6835 #define ANSA1 ANSELAbits.ANSA1 // bit 1
6836 #define ANSA2 ANSELAbits.ANSA2 // bit 2
6837 #define ANSA4 ANSELAbits.ANSA4 // bit 4
6838 #define ANSA5 ANSELAbits.ANSA5 // bit 5
6840 #define ABDEN BAUD1CONbits.ABDEN // bit 0
6841 #define WUE BAUD1CONbits.WUE // bit 1
6842 #define BRG16 BAUD1CONbits.BRG16 // bit 3
6843 #define SCKP BAUD1CONbits.SCKP // bit 4
6844 #define RCIDL BAUD1CONbits.RCIDL // bit 6
6845 #define ABDOVF BAUD1CONbits.ABDOVF // bit 7
6847 #define BORRDY BORCONbits.BORRDY // bit 0
6848 #define SBOREN BORCONbits.SBOREN // bit 7
6850 #define BSR0 BSRbits.BSR0 // bit 0
6851 #define BSR1 BSRbits.BSR1 // bit 1
6852 #define BSR2 BSRbits.BSR2 // bit 2
6853 #define BSR3 BSRbits.BSR3 // bit 3
6854 #define BSR4 BSRbits.BSR4 // bit 4
6856 #define CCDS0 CCDCONbits.CCDS0 // bit 0
6857 #define CCDS1 CCDCONbits.CCDS1 // bit 1
6858 #define CCDEN CCDCONbits.CCDEN // bit 7
6860 #define CCDNA0 CCDNAbits.CCDNA0 // bit 0
6861 #define CCDNA1 CCDNAbits.CCDNA1 // bit 1
6862 #define CCDNA2 CCDNAbits.CCDNA2 // bit 2
6863 #define CCDNA4 CCDNAbits.CCDNA4 // bit 4
6864 #define CCDNA5 CCDNAbits.CCDNA5 // bit 5
6866 #define CCDPA0 CCDPAbits.CCDPA0 // bit 0
6867 #define CCDPA1 CCDPAbits.CCDPA1 // bit 1
6868 #define CCDPA2 CCDPAbits.CCDPA2 // bit 2
6869 #define CCDPA4 CCDPAbits.CCDPA4 // bit 4
6870 #define CCDPA5 CCDPAbits.CCDPA5 // bit 5
6872 #define CCP1CTS0 CCP1CAPbits.CCP1CTS0 // bit 0
6873 #define CCP1CTS1 CCP1CAPbits.CCP1CTS1 // bit 1
6874 #define CCP1CTS2 CCP1CAPbits.CCP1CTS2 // bit 2
6876 #define CCP1MODE0 CCP1CONbits.CCP1MODE0 // bit 0
6877 #define CCP1MODE1 CCP1CONbits.CCP1MODE1 // bit 1
6878 #define CCP1MODE2 CCP1CONbits.CCP1MODE2 // bit 2
6879 #define CCP1MODE3 CCP1CONbits.CCP1MODE3 // bit 3
6880 #define CCP1FMT CCP1CONbits.CCP1FMT // bit 4
6881 #define CCP1OUT CCP1CONbits.CCP1OUT // bit 5
6882 #define CCP1EN CCP1CONbits.CCP1EN // bit 7
6884 #define CCP1PPS0 CCP1PPSbits.CCP1PPS0 // bit 0
6885 #define CCP1PPS1 CCP1PPSbits.CCP1PPS1 // bit 1
6886 #define CCP1PPS2 CCP1PPSbits.CCP1PPS2 // bit 2
6887 #define CCP1PPS3 CCP1PPSbits.CCP1PPS3 // bit 3
6888 #define CCP1PPS4 CCP1PPSbits.CCP1PPS4 // bit 4
6890 #define CCP2CTS0 CCP2CAPbits.CCP2CTS0 // bit 0
6891 #define CCP2CTS1 CCP2CAPbits.CCP2CTS1 // bit 1
6892 #define CCP2CTS2 CCP2CAPbits.CCP2CTS2 // bit 2
6894 #define CCP2MODE0 CCP2CONbits.CCP2MODE0 // bit 0
6895 #define CCP2MODE1 CCP2CONbits.CCP2MODE1 // bit 1
6896 #define CCP2MODE2 CCP2CONbits.CCP2MODE2 // bit 2
6897 #define CCP2MODE3 CCP2CONbits.CCP2MODE3 // bit 3
6898 #define CCP2FMT CCP2CONbits.CCP2FMT // bit 4
6899 #define CCP2OUT CCP2CONbits.CCP2OUT // bit 5
6900 #define CCP2EN CCP2CONbits.CCP2EN // bit 7
6902 #define CCP2PPS0 CCP2PPSbits.CCP2PPS0 // bit 0
6903 #define CCP2PPS1 CCP2PPSbits.CCP2PPS1 // bit 1
6904 #define CCP2PPS2 CCP2PPSbits.CCP2PPS2 // bit 2
6905 #define CCP2PPS3 CCP2PPSbits.CCP2PPS3 // bit 3
6906 #define CCP2PPS4 CCP2PPSbits.CCP2PPS4 // bit 4
6908 #define C1TSEL CCPTMRSbits.C1TSEL // bit 0
6909 #define C2TSEL CCPTMRSbits.C2TSEL // bit 2
6911 #define LC1MODE0 CLC1CONbits.LC1MODE0 // bit 0, shadows bit in CLC1CONbits
6912 #define MODE0 CLC1CONbits.MODE0 // bit 0, shadows bit in CLC1CONbits
6913 #define LC1MODE1 CLC1CONbits.LC1MODE1 // bit 1, shadows bit in CLC1CONbits
6914 #define MODE1 CLC1CONbits.MODE1 // bit 1, shadows bit in CLC1CONbits
6915 #define LC1MODE2 CLC1CONbits.LC1MODE2 // bit 2, shadows bit in CLC1CONbits
6916 #define MODE2 CLC1CONbits.MODE2 // bit 2, shadows bit in CLC1CONbits
6917 #define LC1INTN CLC1CONbits.LC1INTN // bit 3, shadows bit in CLC1CONbits
6918 #define INTN CLC1CONbits.INTN // bit 3, shadows bit in CLC1CONbits
6919 #define LC1INTP CLC1CONbits.LC1INTP // bit 4, shadows bit in CLC1CONbits
6920 #define INTP CLC1CONbits.INTP // bit 4, shadows bit in CLC1CONbits
6921 #define LC1OUT CLC1CONbits.LC1OUT // bit 5, shadows bit in CLC1CONbits
6922 #define OUT CLC1CONbits.OUT // bit 5, shadows bit in CLC1CONbits
6923 #define LC1EN CLC1CONbits.LC1EN // bit 7, shadows bit in CLC1CONbits
6924 #define EN CLC1CONbits.EN // bit 7, shadows bit in CLC1CONbits
6926 #define LC1G1D1N CLC1GLS0bits.LC1G1D1N // bit 0, shadows bit in CLC1GLS0bits
6927 #define D1N CLC1GLS0bits.D1N // bit 0, shadows bit in CLC1GLS0bits
6928 #define LC1G1D1T CLC1GLS0bits.LC1G1D1T // bit 1, shadows bit in CLC1GLS0bits
6929 #define D1T CLC1GLS0bits.D1T // bit 1, shadows bit in CLC1GLS0bits
6930 #define LC1G1D2N CLC1GLS0bits.LC1G1D2N // bit 2, shadows bit in CLC1GLS0bits
6931 #define D2N CLC1GLS0bits.D2N // bit 2, shadows bit in CLC1GLS0bits
6932 #define LC1G1D2T CLC1GLS0bits.LC1G1D2T // bit 3, shadows bit in CLC1GLS0bits
6933 #define D2T CLC1GLS0bits.D2T // bit 3, shadows bit in CLC1GLS0bits
6934 #define LC1G1D3N CLC1GLS0bits.LC1G1D3N // bit 4, shadows bit in CLC1GLS0bits
6935 #define D3N CLC1GLS0bits.D3N // bit 4, shadows bit in CLC1GLS0bits
6936 #define LC1G1D3T CLC1GLS0bits.LC1G1D3T // bit 5, shadows bit in CLC1GLS0bits
6937 #define D3T CLC1GLS0bits.D3T // bit 5, shadows bit in CLC1GLS0bits
6938 #define LC1G1D4N CLC1GLS0bits.LC1G1D4N // bit 6, shadows bit in CLC1GLS0bits
6939 #define D4N CLC1GLS0bits.D4N // bit 6, shadows bit in CLC1GLS0bits
6940 #define LC1G1D4T CLC1GLS0bits.LC1G1D4T // bit 7, shadows bit in CLC1GLS0bits
6941 #define D4T CLC1GLS0bits.D4T // bit 7, shadows bit in CLC1GLS0bits
6943 #define LC1G4D1N CLC1GLS3bits.LC1G4D1N // bit 0, shadows bit in CLC1GLS3bits
6944 #define G4D1N CLC1GLS3bits.G4D1N // bit 0, shadows bit in CLC1GLS3bits
6945 #define LC1G4D1T CLC1GLS3bits.LC1G4D1T // bit 1, shadows bit in CLC1GLS3bits
6946 #define G4D1T CLC1GLS3bits.G4D1T // bit 1, shadows bit in CLC1GLS3bits
6947 #define LC1G4D2N CLC1GLS3bits.LC1G4D2N // bit 2, shadows bit in CLC1GLS3bits
6948 #define G4D2N CLC1GLS3bits.G4D2N // bit 2, shadows bit in CLC1GLS3bits
6949 #define LC1G4D2T CLC1GLS3bits.LC1G4D2T // bit 3, shadows bit in CLC1GLS3bits
6950 #define G4D2T CLC1GLS3bits.G4D2T // bit 3, shadows bit in CLC1GLS3bits
6951 #define LC1G4D3N CLC1GLS3bits.LC1G4D3N // bit 4, shadows bit in CLC1GLS3bits
6952 #define G4D3N CLC1GLS3bits.G4D3N // bit 4, shadows bit in CLC1GLS3bits
6953 #define LC1G4D3T CLC1GLS3bits.LC1G4D3T // bit 5, shadows bit in CLC1GLS3bits
6954 #define G4D3T CLC1GLS3bits.G4D3T // bit 5, shadows bit in CLC1GLS3bits
6955 #define LC1G4D4N CLC1GLS3bits.LC1G4D4N // bit 6, shadows bit in CLC1GLS3bits
6956 #define G4D4N CLC1GLS3bits.G4D4N // bit 6, shadows bit in CLC1GLS3bits
6957 #define LC1G4D4T CLC1GLS3bits.LC1G4D4T // bit 7, shadows bit in CLC1GLS3bits
6958 #define G4D4T CLC1GLS3bits.G4D4T // bit 7, shadows bit in CLC1GLS3bits
6960 #define LC1G1POL CLC1POLbits.LC1G1POL // bit 0, shadows bit in CLC1POLbits
6961 #define G1POL CLC1POLbits.G1POL // bit 0, shadows bit in CLC1POLbits
6962 #define LC1G2POL CLC1POLbits.LC1G2POL // bit 1, shadows bit in CLC1POLbits
6963 #define G2POL CLC1POLbits.G2POL // bit 1, shadows bit in CLC1POLbits
6964 #define LC1G3POL CLC1POLbits.LC1G3POL // bit 2, shadows bit in CLC1POLbits
6965 #define G3POL CLC1POLbits.G3POL // bit 2, shadows bit in CLC1POLbits
6966 #define LC1G4POL CLC1POLbits.LC1G4POL // bit 3, shadows bit in CLC1POLbits
6967 #define G4POL CLC1POLbits.G4POL // bit 3, shadows bit in CLC1POLbits
6968 #define LC1POL CLC1POLbits.LC1POL // bit 7, shadows bit in CLC1POLbits
6969 #define POL CLC1POLbits.POL // bit 7, shadows bit in CLC1POLbits
6971 #define LC1D1S0 CLC1SEL0bits.LC1D1S0 // bit 0, shadows bit in CLC1SEL0bits
6972 #define D1S0 CLC1SEL0bits.D1S0 // bit 0, shadows bit in CLC1SEL0bits
6973 #define LC1D1S1 CLC1SEL0bits.LC1D1S1 // bit 1, shadows bit in CLC1SEL0bits
6974 #define D1S1 CLC1SEL0bits.D1S1 // bit 1, shadows bit in CLC1SEL0bits
6975 #define LC1D1S2 CLC1SEL0bits.LC1D1S2 // bit 2, shadows bit in CLC1SEL0bits
6976 #define D1S2 CLC1SEL0bits.D1S2 // bit 2, shadows bit in CLC1SEL0bits
6977 #define LC1D1S3 CLC1SEL0bits.LC1D1S3 // bit 3, shadows bit in CLC1SEL0bits
6978 #define D1S3 CLC1SEL0bits.D1S3 // bit 3, shadows bit in CLC1SEL0bits
6979 #define LC1D1S4 CLC1SEL0bits.LC1D1S4 // bit 4, shadows bit in CLC1SEL0bits
6980 #define D1S4 CLC1SEL0bits.D1S4 // bit 4, shadows bit in CLC1SEL0bits
6982 #define LC1D2S0 CLC1SEL1bits.LC1D2S0 // bit 0, shadows bit in CLC1SEL1bits
6983 #define D2S0 CLC1SEL1bits.D2S0 // bit 0, shadows bit in CLC1SEL1bits
6984 #define LC1D2S1 CLC1SEL1bits.LC1D2S1 // bit 1, shadows bit in CLC1SEL1bits
6985 #define D2S1 CLC1SEL1bits.D2S1 // bit 1, shadows bit in CLC1SEL1bits
6986 #define LC1D2S2 CLC1SEL1bits.LC1D2S2 // bit 2, shadows bit in CLC1SEL1bits
6987 #define D2S2 CLC1SEL1bits.D2S2 // bit 2, shadows bit in CLC1SEL1bits
6988 #define LC1D2S3 CLC1SEL1bits.LC1D2S3 // bit 3, shadows bit in CLC1SEL1bits
6989 #define D2S3 CLC1SEL1bits.D2S3 // bit 3, shadows bit in CLC1SEL1bits
6990 #define LC1D2S4 CLC1SEL1bits.LC1D2S4 // bit 4, shadows bit in CLC1SEL1bits
6991 #define D2S4 CLC1SEL1bits.D2S4 // bit 4, shadows bit in CLC1SEL1bits
6993 #define LC1D3S0 CLC1SEL2bits.LC1D3S0 // bit 0, shadows bit in CLC1SEL2bits
6994 #define D3S0 CLC1SEL2bits.D3S0 // bit 0, shadows bit in CLC1SEL2bits
6995 #define LC1D3S1 CLC1SEL2bits.LC1D3S1 // bit 1, shadows bit in CLC1SEL2bits
6996 #define D3S1 CLC1SEL2bits.D3S1 // bit 1, shadows bit in CLC1SEL2bits
6997 #define LC1D3S2 CLC1SEL2bits.LC1D3S2 // bit 2, shadows bit in CLC1SEL2bits
6998 #define D3S2 CLC1SEL2bits.D3S2 // bit 2, shadows bit in CLC1SEL2bits
6999 #define LC1D3S3 CLC1SEL2bits.LC1D3S3 // bit 3, shadows bit in CLC1SEL2bits
7000 #define D3S3 CLC1SEL2bits.D3S3 // bit 3, shadows bit in CLC1SEL2bits
7001 #define LC1D3S4 CLC1SEL2bits.LC1D3S4 // bit 4, shadows bit in CLC1SEL2bits
7002 #define D3S4 CLC1SEL2bits.D3S4 // bit 4, shadows bit in CLC1SEL2bits
7004 #define LC1D4S0 CLC1SEL3bits.LC1D4S0 // bit 0, shadows bit in CLC1SEL3bits
7005 #define D4S0 CLC1SEL3bits.D4S0 // bit 0, shadows bit in CLC1SEL3bits
7006 #define LC1D4S1 CLC1SEL3bits.LC1D4S1 // bit 1, shadows bit in CLC1SEL3bits
7007 #define D4S1 CLC1SEL3bits.D4S1 // bit 1, shadows bit in CLC1SEL3bits
7008 #define LC1D4S2 CLC1SEL3bits.LC1D4S2 // bit 2, shadows bit in CLC1SEL3bits
7009 #define D4S2 CLC1SEL3bits.D4S2 // bit 2, shadows bit in CLC1SEL3bits
7010 #define LC1D4S3 CLC1SEL3bits.LC1D4S3 // bit 3, shadows bit in CLC1SEL3bits
7011 #define D4S3 CLC1SEL3bits.D4S3 // bit 3, shadows bit in CLC1SEL3bits
7012 #define LC1D4S4 CLC1SEL3bits.LC1D4S4 // bit 4, shadows bit in CLC1SEL3bits
7013 #define D4S4 CLC1SEL3bits.D4S4 // bit 4, shadows bit in CLC1SEL3bits
7015 #define MLC1OUT CLCDATAbits.MLC1OUT // bit 0
7016 #define MLC2OUT CLCDATAbits.MLC2OUT // bit 1
7018 #define CLCIN0PPS0 CLCIN0PPSbits.CLCIN0PPS0 // bit 0
7019 #define CLCIN0PPS1 CLCIN0PPSbits.CLCIN0PPS1 // bit 1
7020 #define CLCIN0PPS2 CLCIN0PPSbits.CLCIN0PPS2 // bit 2
7021 #define CLCIN0PPS3 CLCIN0PPSbits.CLCIN0PPS3 // bit 3
7022 #define CLCIN0PPS4 CLCIN0PPSbits.CLCIN0PPS4 // bit 4
7024 #define CLCIN1PPS0 CLCIN1PPSbits.CLCIN1PPS0 // bit 0
7025 #define CLCIN1PPS1 CLCIN1PPSbits.CLCIN1PPS1 // bit 1
7026 #define CLCIN1PPS2 CLCIN1PPSbits.CLCIN1PPS2 // bit 2
7027 #define CLCIN1PPS3 CLCIN1PPSbits.CLCIN1PPS3 // bit 3
7028 #define CLCIN1PPS4 CLCIN1PPSbits.CLCIN1PPS4 // bit 4
7030 #define CLCIN2PPS0 CLCIN2PPSbits.CLCIN2PPS0 // bit 0
7031 #define CLCIN2PPS1 CLCIN2PPSbits.CLCIN2PPS1 // bit 1
7032 #define CLCIN2PPS2 CLCIN2PPSbits.CLCIN2PPS2 // bit 2
7033 #define CLCIN2PPS3 CLCIN2PPSbits.CLCIN2PPS3 // bit 3
7034 #define CLCIN2PPS4 CLCIN2PPSbits.CLCIN2PPS4 // bit 4
7036 #define CLCIN3PPS0 CLCIN3PPSbits.CLCIN3PPS0 // bit 0
7037 #define CLCIN3PPS1 CLCIN3PPSbits.CLCIN3PPS1 // bit 1
7038 #define CLCIN3PPS2 CLCIN3PPSbits.CLCIN3PPS2 // bit 2
7039 #define CLCIN3PPS3 CLCIN3PPSbits.CLCIN3PPS3 // bit 3
7040 #define CLCIN3PPS4 CLCIN3PPSbits.CLCIN3PPS4 // bit 4
7042 #define CLKRDIV0 CLKRCONbits.CLKRDIV0 // bit 0
7043 #define CLKRDIV1 CLKRCONbits.CLKRDIV1 // bit 1
7044 #define CLKRDIV2 CLKRCONbits.CLKRDIV2 // bit 2
7045 #define CLKRDC0 CLKRCONbits.CLKRDC0 // bit 3
7046 #define CLKRDC1 CLKRCONbits.CLKRDC1 // bit 4
7047 #define CLKREN CLKRCONbits.CLKREN // bit 7
7049 #define C1SYNC CM1CON0bits.C1SYNC // bit 0
7050 #define C1HYS CM1CON0bits.C1HYS // bit 1
7051 #define C1SP CM1CON0bits.C1SP // bit 2
7052 #define C1POL CM1CON0bits.C1POL // bit 4
7053 #define C1OUT CM1CON0bits.C1OUT // bit 6
7054 #define C1ON CM1CON0bits.C1ON // bit 7
7056 #define C1NCH0 CM1CON1bits.C1NCH0 // bit 0
7057 #define C1NCH1 CM1CON1bits.C1NCH1 // bit 1
7058 #define C1NCH2 CM1CON1bits.C1NCH2 // bit 2
7059 #define C1PCH0 CM1CON1bits.C1PCH0 // bit 3
7060 #define C1PCH1 CM1CON1bits.C1PCH1 // bit 4
7061 #define C1PCH2 CM1CON1bits.C1PCH2 // bit 5
7062 #define C1INTN CM1CON1bits.C1INTN // bit 6
7063 #define C1INTP CM1CON1bits.C1INTP // bit 7
7065 #define MC1OUT CMOUTbits.MC1OUT // bit 0
7067 #define DOZE0 CPUDOZEbits.DOZE0 // bit 0
7068 #define DOZE1 CPUDOZEbits.DOZE1 // bit 1
7069 #define DOZE2 CPUDOZEbits.DOZE2 // bit 2
7070 #define DOE CPUDOZEbits.DOE // bit 4
7071 #define ROI CPUDOZEbits.ROI // bit 5
7072 #define DOZEN CPUDOZEbits.DOZEN // bit 6
7073 #define IDLEN CPUDOZEbits.IDLEN // bit 7
7075 #define LSAC0 CWG1AS0bits.LSAC0 // bit 2, shadows bit in CWG1AS0bits
7076 #define CWG1LSAC0 CWG1AS0bits.CWG1LSAC0 // bit 2, shadows bit in CWG1AS0bits
7077 #define LSAC1 CWG1AS0bits.LSAC1 // bit 3, shadows bit in CWG1AS0bits
7078 #define CWG1LSAC1 CWG1AS0bits.CWG1LSAC1 // bit 3, shadows bit in CWG1AS0bits
7079 #define LSBD0 CWG1AS0bits.LSBD0 // bit 4, shadows bit in CWG1AS0bits
7080 #define CWG1LSBD0 CWG1AS0bits.CWG1LSBD0 // bit 4, shadows bit in CWG1AS0bits
7081 #define LSBD1 CWG1AS0bits.LSBD1 // bit 5, shadows bit in CWG1AS0bits
7082 #define CWG1LSBD1 CWG1AS0bits.CWG1LSBD1 // bit 5, shadows bit in CWG1AS0bits
7083 #define REN CWG1AS0bits.REN // bit 6, shadows bit in CWG1AS0bits
7084 #define CWG1REN CWG1AS0bits.CWG1REN // bit 6, shadows bit in CWG1AS0bits
7085 #define SHUTDOWN CWG1AS0bits.SHUTDOWN // bit 7, shadows bit in CWG1AS0bits
7086 #define CWG1SHUTDOWN CWG1AS0bits.CWG1SHUTDOWN // bit 7, shadows bit in CWG1AS0bits
7088 #define AS0E CWG1AS1bits.AS0E // bit 0
7089 #define AS1E CWG1AS1bits.AS1E // bit 1
7090 #define AS3E CWG1AS1bits.AS3E // bit 3
7092 #define CS CWG1CLKCONbits.CS // bit 0, shadows bit in CWG1CLKCONbits
7093 #define CWG1CS CWG1CLKCONbits.CWG1CS // bit 0, shadows bit in CWG1CLKCONbits
7095 #define POLA CWG1CON1bits.POLA // bit 0, shadows bit in CWG1CON1bits
7096 #define CWG1POLA CWG1CON1bits.CWG1POLA // bit 0, shadows bit in CWG1CON1bits
7097 #define POLB CWG1CON1bits.POLB // bit 1, shadows bit in CWG1CON1bits
7098 #define CWG1POLB CWG1CON1bits.CWG1POLB // bit 1, shadows bit in CWG1CON1bits
7099 #define POLC CWG1CON1bits.POLC // bit 2, shadows bit in CWG1CON1bits
7100 #define CWG1POLC CWG1CON1bits.CWG1POLC // bit 2, shadows bit in CWG1CON1bits
7101 #define POLD CWG1CON1bits.POLD // bit 3, shadows bit in CWG1CON1bits
7102 #define CWG1POLD CWG1CON1bits.CWG1POLD // bit 3, shadows bit in CWG1CON1bits
7103 #define IN CWG1CON1bits.IN // bit 5, shadows bit in CWG1CON1bits
7104 #define CWG1IN CWG1CON1bits.CWG1IN // bit 5, shadows bit in CWG1CON1bits
7106 #define CWG1DAT0 CWG1DATbits.CWG1DAT0 // bit 0
7107 #define CWG1DAT1 CWG1DATbits.CWG1DAT1 // bit 1
7108 #define CWG1DAT2 CWG1DATbits.CWG1DAT2 // bit 2
7109 #define CWG1DAT3 CWG1DATbits.CWG1DAT3 // bit 3
7111 #define DBF0 CWG1DBFbits.DBF0 // bit 0, shadows bit in CWG1DBFbits
7112 #define CWG1DBF0 CWG1DBFbits.CWG1DBF0 // bit 0, shadows bit in CWG1DBFbits
7113 #define DBF1 CWG1DBFbits.DBF1 // bit 1, shadows bit in CWG1DBFbits
7114 #define CWG1DBF1 CWG1DBFbits.CWG1DBF1 // bit 1, shadows bit in CWG1DBFbits
7115 #define DBF2 CWG1DBFbits.DBF2 // bit 2, shadows bit in CWG1DBFbits
7116 #define CWG1DBF2 CWG1DBFbits.CWG1DBF2 // bit 2, shadows bit in CWG1DBFbits
7117 #define DBF3 CWG1DBFbits.DBF3 // bit 3, shadows bit in CWG1DBFbits
7118 #define CWG1DBF3 CWG1DBFbits.CWG1DBF3 // bit 3, shadows bit in CWG1DBFbits
7119 #define DBF4 CWG1DBFbits.DBF4 // bit 4, shadows bit in CWG1DBFbits
7120 #define CWG1DBF4 CWG1DBFbits.CWG1DBF4 // bit 4, shadows bit in CWG1DBFbits
7121 #define DBF5 CWG1DBFbits.DBF5 // bit 5, shadows bit in CWG1DBFbits
7122 #define CWG1DBF5 CWG1DBFbits.CWG1DBF5 // bit 5, shadows bit in CWG1DBFbits
7124 #define DBR0 CWG1DBRbits.DBR0 // bit 0, shadows bit in CWG1DBRbits
7125 #define CWG1DBR0 CWG1DBRbits.CWG1DBR0 // bit 0, shadows bit in CWG1DBRbits
7126 #define DBR1 CWG1DBRbits.DBR1 // bit 1, shadows bit in CWG1DBRbits
7127 #define CWG1DBR1 CWG1DBRbits.CWG1DBR1 // bit 1, shadows bit in CWG1DBRbits
7128 #define DBR2 CWG1DBRbits.DBR2 // bit 2, shadows bit in CWG1DBRbits
7129 #define CWG1DBR2 CWG1DBRbits.CWG1DBR2 // bit 2, shadows bit in CWG1DBRbits
7130 #define DBR3 CWG1DBRbits.DBR3 // bit 3, shadows bit in CWG1DBRbits
7131 #define CWG1DBR3 CWG1DBRbits.CWG1DBR3 // bit 3, shadows bit in CWG1DBRbits
7132 #define DBR4 CWG1DBRbits.DBR4 // bit 4, shadows bit in CWG1DBRbits
7133 #define CWG1DBR4 CWG1DBRbits.CWG1DBR4 // bit 4, shadows bit in CWG1DBRbits
7134 #define DBR5 CWG1DBRbits.DBR5 // bit 5, shadows bit in CWG1DBRbits
7135 #define CWG1DBR5 CWG1DBRbits.CWG1DBR5 // bit 5, shadows bit in CWG1DBRbits
7137 #define CWG1PPS0 CWG1PPSbits.CWG1PPS0 // bit 0
7138 #define CWG1PPS1 CWG1PPSbits.CWG1PPS1 // bit 1
7139 #define CWG1PPS2 CWG1PPSbits.CWG1PPS2 // bit 2
7140 #define CWG1PPS3 CWG1PPSbits.CWG1PPS3 // bit 3
7141 #define CWG1PPS4 CWG1PPSbits.CWG1PPS4 // bit 4
7143 #define STRA CWG1STRbits.STRA // bit 0, shadows bit in CWG1STRbits
7144 #define CWG1STRA CWG1STRbits.CWG1STRA // bit 0, shadows bit in CWG1STRbits
7145 #define STRB CWG1STRbits.STRB // bit 1, shadows bit in CWG1STRbits
7146 #define CWG1STRB CWG1STRbits.CWG1STRB // bit 1, shadows bit in CWG1STRbits
7147 #define STRC CWG1STRbits.STRC // bit 2, shadows bit in CWG1STRbits
7148 #define CWG1STRC CWG1STRbits.CWG1STRC // bit 2, shadows bit in CWG1STRbits
7149 #define STRD CWG1STRbits.STRD // bit 3, shadows bit in CWG1STRbits
7150 #define CWG1STRD CWG1STRbits.CWG1STRD // bit 3, shadows bit in CWG1STRbits
7151 #define OVRA CWG1STRbits.OVRA // bit 4, shadows bit in CWG1STRbits
7152 #define CWG1OVRA CWG1STRbits.CWG1OVRA // bit 4, shadows bit in CWG1STRbits
7153 #define OVRB CWG1STRbits.OVRB // bit 5, shadows bit in CWG1STRbits
7154 #define CWG1OVRB CWG1STRbits.CWG1OVRB // bit 5, shadows bit in CWG1STRbits
7155 #define OVRC CWG1STRbits.OVRC // bit 6, shadows bit in CWG1STRbits
7156 #define CWG1OVRC CWG1STRbits.CWG1OVRC // bit 6, shadows bit in CWG1STRbits
7157 #define OVRD CWG1STRbits.OVRD // bit 7, shadows bit in CWG1STRbits
7158 #define CWG1OVRD CWG1STRbits.CWG1OVRD // bit 7, shadows bit in CWG1STRbits
7160 #define DAC1NSS DACCON0bits.DAC1NSS // bit 0
7161 #define DAC1PSS0 DACCON0bits.DAC1PSS0 // bit 2
7162 #define DAC1PSS1 DACCON0bits.DAC1PSS1 // bit 3
7163 #define DAC1OE DACCON0bits.DAC1OE // bit 5
7164 #define DAC1EN DACCON0bits.DAC1EN // bit 7
7166 #define DAC1R0 DACCON1bits.DAC1R0 // bit 0
7167 #define DAC1R1 DACCON1bits.DAC1R1 // bit 1
7168 #define DAC1R2 DACCON1bits.DAC1R2 // bit 2
7169 #define DAC1R3 DACCON1bits.DAC1R3 // bit 3
7170 #define DAC1R4 DACCON1bits.DAC1R4 // bit 4
7172 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
7173 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
7174 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
7175 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
7176 #define TSRNG FVRCONbits.TSRNG // bit 4
7177 #define TSEN FVRCONbits.TSEN // bit 5
7178 #define FVRRDY FVRCONbits.FVRRDY // bit 6
7179 #define FVREN FVRCONbits.FVREN // bit 7
7181 #define INLVLA0 INLVLAbits.INLVLA0 // bit 0
7182 #define INLVLA1 INLVLAbits.INLVLA1 // bit 1
7183 #define INLVLA2 INLVLAbits.INLVLA2 // bit 2
7184 #define INLVLA3 INLVLAbits.INLVLA3 // bit 3
7185 #define INLVLA4 INLVLAbits.INLVLA4 // bit 4
7186 #define INLVLA5 INLVLAbits.INLVLA5 // bit 5
7188 #define INTEDG INTCONbits.INTEDG // bit 0
7189 #define PEIE INTCONbits.PEIE // bit 6
7190 #define GIE INTCONbits.GIE // bit 7
7192 #define INTPPS0 INTPPSbits.INTPPS0 // bit 0
7193 #define INTPPS1 INTPPSbits.INTPPS1 // bit 1
7194 #define INTPPS2 INTPPSbits.INTPPS2 // bit 2
7195 #define INTPPS3 INTPPSbits.INTPPS3 // bit 3
7196 #define INTPPS4 INTPPSbits.INTPPS4 // bit 4
7198 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
7199 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
7200 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
7201 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
7202 #define IOCAF4 IOCAFbits.IOCAF4 // bit 4
7203 #define IOCAF5 IOCAFbits.IOCAF5 // bit 5
7205 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
7206 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
7207 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
7208 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
7209 #define IOCAN4 IOCANbits.IOCAN4 // bit 4
7210 #define IOCAN5 IOCANbits.IOCAN5 // bit 5
7212 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
7213 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
7214 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
7215 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
7216 #define IOCAP4 IOCAPbits.IOCAP4 // bit 4
7217 #define IOCAP5 IOCAPbits.IOCAP5 // bit 5
7219 #define LATA0 LATAbits.LATA0 // bit 0
7220 #define LATA1 LATAbits.LATA1 // bit 1
7221 #define LATA2 LATAbits.LATA2 // bit 2
7222 #define LATA4 LATAbits.LATA4 // bit 4
7223 #define LATA5 LATAbits.LATA5 // bit 5
7225 #define MDCH0 MDCARHbits.MDCH0 // bit 0
7226 #define MDCH1 MDCARHbits.MDCH1 // bit 1
7227 #define MDCH2 MDCARHbits.MDCH2 // bit 2
7228 #define MDCH3 MDCARHbits.MDCH3 // bit 3
7229 #define MDCHSYNC MDCARHbits.MDCHSYNC // bit 5
7230 #define MDCHPOL MDCARHbits.MDCHPOL // bit 6
7232 #define MDCL0 MDCARLbits.MDCL0 // bit 0
7233 #define MDCL1 MDCARLbits.MDCL1 // bit 1
7234 #define MDCL2 MDCARLbits.MDCL2 // bit 2
7235 #define MDCL3 MDCARLbits.MDCL3 // bit 3
7236 #define MDCLSYNC MDCARLbits.MDCLSYNC // bit 5
7237 #define MDCLPOL MDCARLbits.MDCLPOL // bit 6
7239 #define MDCIN1PPS0 MDCIN1PPSbits.MDCIN1PPS0 // bit 0
7240 #define MDCIN1PPS1 MDCIN1PPSbits.MDCIN1PPS1 // bit 1
7241 #define MDCIN1PPS2 MDCIN1PPSbits.MDCIN1PPS2 // bit 2
7242 #define MDCIN1PPS3 MDCIN1PPSbits.MDCIN1PPS3 // bit 3
7243 #define MDCIN1PPS4 MDCIN1PPSbits.MDCIN1PPS4 // bit 4
7245 #define MDCIN2PPS0 MDCIN2PPSbits.MDCIN2PPS0 // bit 0
7246 #define MDCIN2PPS1 MDCIN2PPSbits.MDCIN2PPS1 // bit 1
7247 #define MDCIN2PPS2 MDCIN2PPSbits.MDCIN2PPS2 // bit 2
7248 #define MDCIN2PPS3 MDCIN2PPSbits.MDCIN2PPS3 // bit 3
7249 #define MDCIN2PPS4 MDCIN2PPSbits.MDCIN2PPS4 // bit 4
7251 #define MDBIT MDCONbits.MDBIT // bit 0
7252 #define MDOUT MDCONbits.MDOUT // bit 3
7253 #define MDOPOL MDCONbits.MDOPOL // bit 4
7254 #define MDEN MDCONbits.MDEN // bit 7
7256 #define MDMINPPS0 MDMINPPSbits.MDMINPPS0 // bit 0
7257 #define MDMINPPS1 MDMINPPSbits.MDMINPPS1 // bit 1
7258 #define MDMINPPS2 MDMINPPSbits.MDMINPPS2 // bit 2
7259 #define MDMINPPS3 MDMINPPSbits.MDMINPPS3 // bit 3
7260 #define MDMINPPS4 MDMINPPSbits.MDMINPPS4 // bit 4
7262 #define MDMS0 MDSRCbits.MDMS0 // bit 0
7263 #define MDMS1 MDSRCbits.MDMS1 // bit 1
7264 #define MDMS2 MDSRCbits.MDMS2 // bit 2
7265 #define MDMS3 MDSRCbits.MDMS3 // bit 3
7267 #define N1PFM NCO1CONbits.N1PFM // bit 0
7268 #define N1POL NCO1CONbits.N1POL // bit 4
7269 #define N1OUT NCO1CONbits.N1OUT // bit 5
7270 #define N1EN NCO1CONbits.N1EN // bit 7
7272 #define NVMADR8 NVMADRHbits.NVMADR8 // bit 0
7273 #define NVMADR9 NVMADRHbits.NVMADR9 // bit 1
7274 #define NVMADR10 NVMADRHbits.NVMADR10 // bit 2
7275 #define NVMADR11 NVMADRHbits.NVMADR11 // bit 3
7276 #define NVMADR12 NVMADRHbits.NVMADR12 // bit 4
7277 #define NVMADR13 NVMADRHbits.NVMADR13 // bit 5
7278 #define NVMADR14 NVMADRHbits.NVMADR14 // bit 6
7280 #define NVMADR0 NVMADRLbits.NVMADR0 // bit 0
7281 #define NVMADR1 NVMADRLbits.NVMADR1 // bit 1
7282 #define NVMADR2 NVMADRLbits.NVMADR2 // bit 2
7283 #define NVMADR3 NVMADRLbits.NVMADR3 // bit 3
7284 #define NVMADR4 NVMADRLbits.NVMADR4 // bit 4
7285 #define NVMADR5 NVMADRLbits.NVMADR5 // bit 5
7286 #define NVMADR6 NVMADRLbits.NVMADR6 // bit 6
7287 #define NVMADR7 NVMADRLbits.NVMADR7 // bit 7
7289 #define RD NVMCON1bits.RD // bit 0
7290 #define WR NVMCON1bits.WR // bit 1
7291 #define WREN NVMCON1bits.WREN // bit 2
7292 #define WRERR NVMCON1bits.WRERR // bit 3
7293 #define FREE NVMCON1bits.FREE // bit 4
7294 #define LWLO NVMCON1bits.LWLO // bit 5
7295 #define NVMREGS NVMCON1bits.NVMREGS // bit 6
7297 #define NVMDAT8 NVMDATHbits.NVMDAT8 // bit 0
7298 #define NVMDAT9 NVMDATHbits.NVMDAT9 // bit 1
7299 #define NVMDAT10 NVMDATHbits.NVMDAT10 // bit 2
7300 #define NVMDAT11 NVMDATHbits.NVMDAT11 // bit 3
7301 #define NVMDAT12 NVMDATHbits.NVMDAT12 // bit 4
7302 #define NVMDAT13 NVMDATHbits.NVMDAT13 // bit 5
7304 #define NVMDAT0 NVMDATLbits.NVMDAT0 // bit 0
7305 #define NVMDAT1 NVMDATLbits.NVMDAT1 // bit 1
7306 #define NVMDAT2 NVMDATLbits.NVMDAT2 // bit 2
7307 #define NVMDAT3 NVMDATLbits.NVMDAT3 // bit 3
7308 #define NVMDAT4 NVMDATLbits.NVMDAT4 // bit 4
7309 #define NVMDAT5 NVMDATLbits.NVMDAT5 // bit 5
7310 #define NVMDAT6 NVMDATLbits.NVMDAT6 // bit 6
7311 #define NVMDAT7 NVMDATLbits.NVMDAT7 // bit 7
7313 #define ODCA0 ODCONAbits.ODCA0 // bit 0
7314 #define ODCA1 ODCONAbits.ODCA1 // bit 1
7315 #define ODCA2 ODCONAbits.ODCA2 // bit 2
7316 #define ODCA4 ODCONAbits.ODCA4 // bit 4
7317 #define ODCA5 ODCONAbits.ODCA5 // bit 5
7319 #define NDIV0 OSCCON1bits.NDIV0 // bit 0
7320 #define NDIV1 OSCCON1bits.NDIV1 // bit 1
7321 #define NDIV2 OSCCON1bits.NDIV2 // bit 2
7322 #define NDIV3 OSCCON1bits.NDIV3 // bit 3
7323 #define NOSC0 OSCCON1bits.NOSC0 // bit 4
7324 #define NOSC1 OSCCON1bits.NOSC1 // bit 5
7325 #define NOSC2 OSCCON1bits.NOSC2 // bit 6
7327 #define CDIV0 OSCCON2bits.CDIV0 // bit 0
7328 #define CDIV1 OSCCON2bits.CDIV1 // bit 1
7329 #define CDIV2 OSCCON2bits.CDIV2 // bit 2
7330 #define CDIV3 OSCCON2bits.CDIV3 // bit 3
7331 #define COSC0 OSCCON2bits.COSC0 // bit 4
7332 #define COSC1 OSCCON2bits.COSC1 // bit 5
7333 #define COSC2 OSCCON2bits.COSC2 // bit 6
7335 #define NOSCR OSCCON3bits.NOSCR // bit 3
7336 #define ORDY OSCCON3bits.ORDY // bit 4
7337 #define SOSCBE OSCCON3bits.SOSCBE // bit 5
7338 #define SOSCPWR OSCCON3bits.SOSCPWR // bit 6
7339 #define CSWHOLD OSCCON3bits.CSWHOLD // bit 7
7341 #define ADOEN OSCENbits.ADOEN // bit 2
7342 #define SOSCEN OSCENbits.SOSCEN // bit 3
7343 #define LFOEN OSCENbits.LFOEN // bit 4
7344 #define HFOEN OSCENbits.HFOEN // bit 6
7345 #define EXTOEN OSCENbits.EXTOEN // bit 7
7347 #define HFFRQ0 OSCFRQbits.HFFRQ0 // bit 0
7348 #define HFFRQ1 OSCFRQbits.HFFRQ1 // bit 1
7349 #define HFFRQ2 OSCFRQbits.HFFRQ2 // bit 2
7350 #define HFFRQ3 OSCFRQbits.HFFRQ3 // bit 3
7352 #define PLLR OSCSTAT1bits.PLLR // bit 0
7353 #define ADOR OSCSTAT1bits.ADOR // bit 2
7354 #define SOR OSCSTAT1bits.SOR // bit 3
7355 #define LFOR OSCSTAT1bits.LFOR // bit 4
7356 #define HFOR OSCSTAT1bits.HFOR // bit 6
7357 #define EXTOR OSCSTAT1bits.EXTOR // bit 7
7359 #define HFTUN0 OSCTUNEbits.HFTUN0 // bit 0
7360 #define HFTUN1 OSCTUNEbits.HFTUN1 // bit 1
7361 #define HFTUN2 OSCTUNEbits.HFTUN2 // bit 2
7362 #define HFTUN3 OSCTUNEbits.HFTUN3 // bit 3
7363 #define HFTUN4 OSCTUNEbits.HFTUN4 // bit 4
7364 #define HFTUN5 OSCTUNEbits.HFTUN5 // bit 5
7366 #define NOT_BOR PCON0bits.NOT_BOR // bit 0
7367 #define NOT_POR PCON0bits.NOT_POR // bit 1
7368 #define NOT_RI PCON0bits.NOT_RI // bit 2
7369 #define NOT_RMCLR PCON0bits.NOT_RMCLR // bit 3
7370 #define NOT_RWDT PCON0bits.NOT_RWDT // bit 4
7371 #define STKUNF PCON0bits.STKUNF // bit 6
7372 #define STKOVF PCON0bits.STKOVF // bit 7
7374 #define INTE PIE0bits.INTE // bit 0
7375 #define IOCIE PIE0bits.IOCIE // bit 4
7376 #define TMR0IE PIE0bits.TMR0IE // bit 5
7378 #define TMR1IE PIE1bits.TMR1IE // bit 0
7379 #define TMR2IE PIE1bits.TMR2IE // bit 1
7380 #define BCL1IE PIE1bits.BCL1IE // bit 2
7381 #define SSP1IE PIE1bits.SSP1IE // bit 3
7382 #define TXIE PIE1bits.TXIE // bit 4
7383 #define RCIE PIE1bits.RCIE // bit 5
7384 #define ADIE PIE1bits.ADIE // bit 6
7385 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
7387 #define NCO1IE PIE2bits.NCO1IE // bit 0
7388 #define NVMIE PIE2bits.NVMIE // bit 4
7389 #define C1IE PIE2bits.C1IE // bit 5
7391 #define CLC1IE PIE3bits.CLC1IE // bit 0
7392 #define CLC2IE PIE3bits.CLC2IE // bit 1
7393 #define CSWIE PIE3bits.CSWIE // bit 6
7394 #define OSFIE PIE3bits.OSFIE // bit 7
7396 #define CCP1IE PIE4bits.CCP1IE // bit 0
7397 #define CCP2IE PIE4bits.CCP2IE // bit 1
7398 #define CWG1IE PIE4bits.CWG1IE // bit 6
7400 #define INTF PIR0bits.INTF // bit 0
7401 #define IOCIF PIR0bits.IOCIF // bit 4
7402 #define TMR0IF PIR0bits.TMR0IF // bit 5
7404 #define TMR1IF PIR1bits.TMR1IF // bit 0
7405 #define TMR2IF PIR1bits.TMR2IF // bit 1
7406 #define BCL1IF PIR1bits.BCL1IF // bit 2
7407 #define SSP1IF PIR1bits.SSP1IF // bit 3
7408 #define TXIF PIR1bits.TXIF // bit 4
7409 #define RCIF PIR1bits.RCIF // bit 5
7410 #define ADIF PIR1bits.ADIF // bit 6
7411 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
7413 #define NCO1IF PIR2bits.NCO1IF // bit 0
7414 #define NVMIF PIR2bits.NVMIF // bit 4
7415 #define C1IF PIR2bits.C1IF // bit 5
7417 #define CLC1IF PIR3bits.CLC1IF // bit 0
7418 #define CLC2IF PIR3bits.CLC2IF // bit 1
7419 #define CSWIF PIR3bits.CSWIF // bit 6
7420 #define OSFIF PIR3bits.OSFIF // bit 7
7422 #define CCP1IF PIR4bits.CCP1IF // bit 0
7423 #define CCP2IF PIR4bits.CCP2IF // bit 1
7424 #define CWG1IF PIR4bits.CWG1IF // bit 6
7426 #define IOCMD PMD0bits.IOCMD // bit 0
7427 #define CLKRMD PMD0bits.CLKRMD // bit 1
7428 #define NVMMD PMD0bits.NVMMD // bit 2
7429 #define FVRMD PMD0bits.FVRMD // bit 6
7430 #define SYSCMD PMD0bits.SYSCMD // bit 7
7432 #define TMR0MD PMD1bits.TMR0MD // bit 0
7433 #define TMR1MD PMD1bits.TMR1MD // bit 1
7434 #define TMR2MD PMD1bits.TMR2MD // bit 2
7435 #define NCOMD PMD1bits.NCOMD // bit 7
7437 #define CMP1MD PMD2bits.CMP1MD // bit 1
7438 #define ADCMD PMD2bits.ADCMD // bit 5
7439 #define DACMD PMD2bits.DACMD // bit 6
7441 #define CCP1MD PMD3bits.CCP1MD // bit 0
7442 #define CCP2MD PMD3bits.CCP2MD // bit 1
7443 #define PWM5MD PMD3bits.PWM5MD // bit 4
7444 #define PWM6MD PMD3bits.PWM6MD // bit 5
7445 #define CWG1MD PMD3bits.CWG1MD // bit 6
7447 #define MSSP1MD PMD4bits.MSSP1MD // bit 1
7448 #define UART1MD PMD4bits.UART1MD // bit 5
7450 #define DSMMD PMD5bits.DSMMD // bit 0
7451 #define CLC1MD PMD5bits.CLC1MD // bit 1
7452 #define CLC2MD PMD5bits.CLC2MD // bit 2
7454 #define RA0 PORTAbits.RA0 // bit 0
7455 #define RA1 PORTAbits.RA1 // bit 1
7456 #define RA2 PORTAbits.RA2 // bit 2
7457 #define RA3 PORTAbits.RA3 // bit 3
7458 #define RA4 PORTAbits.RA4 // bit 4
7459 #define RA5 PORTAbits.RA5 // bit 5
7461 #define PPSLOCKED PPSLOCKbits.PPSLOCKED // bit 0
7463 #define PWM5POL PWM5CONbits.PWM5POL // bit 4
7464 #define PWM5OUT PWM5CONbits.PWM5OUT // bit 5
7465 #define PWM5EN PWM5CONbits.PWM5EN // bit 7
7467 #define PWM5DCH0 PWM5DCHbits.PWM5DCH0 // bit 0
7468 #define PWM5DCH1 PWM5DCHbits.PWM5DCH1 // bit 1
7469 #define PWM5DCH2 PWM5DCHbits.PWM5DCH2 // bit 2
7470 #define PWM5DCH3 PWM5DCHbits.PWM5DCH3 // bit 3
7471 #define PWM5DCH4 PWM5DCHbits.PWM5DCH4 // bit 4
7472 #define PWM5DCH5 PWM5DCHbits.PWM5DCH5 // bit 5
7473 #define PWM5DCH6 PWM5DCHbits.PWM5DCH6 // bit 6
7474 #define PWM5DCH7 PWM5DCHbits.PWM5DCH7 // bit 7
7476 #define PWM5DCL0 PWM5DCLbits.PWM5DCL0 // bit 6
7477 #define PWM5DCL1 PWM5DCLbits.PWM5DCL1 // bit 7
7479 #define PWM6POL PWM6CONbits.PWM6POL // bit 4
7480 #define PWM6OUT PWM6CONbits.PWM6OUT // bit 5
7481 #define PWM6EN PWM6CONbits.PWM6EN // bit 7
7483 #define PWM6DCH0 PWM6DCHbits.PWM6DCH0 // bit 0
7484 #define PWM6DCH1 PWM6DCHbits.PWM6DCH1 // bit 1
7485 #define PWM6DCH2 PWM6DCHbits.PWM6DCH2 // bit 2
7486 #define PWM6DCH3 PWM6DCHbits.PWM6DCH3 // bit 3
7487 #define PWM6DCH4 PWM6DCHbits.PWM6DCH4 // bit 4
7488 #define PWM6DCH5 PWM6DCHbits.PWM6DCH5 // bit 5
7489 #define PWM6DCH6 PWM6DCHbits.PWM6DCH6 // bit 6
7490 #define PWM6DCH7 PWM6DCHbits.PWM6DCH7 // bit 7
7492 #define PWM6DCL0 PWM6DCLbits.PWM6DCL0 // bit 6
7493 #define PWM6DCL1 PWM6DCLbits.PWM6DCL1 // bit 7
7495 #define RA0PPS0 RA0PPSbits.RA0PPS0 // bit 0
7496 #define RA0PPS1 RA0PPSbits.RA0PPS1 // bit 1
7497 #define RA0PPS2 RA0PPSbits.RA0PPS2 // bit 2
7498 #define RA0PPS3 RA0PPSbits.RA0PPS3 // bit 3
7499 #define RA0PPS4 RA0PPSbits.RA0PPS4 // bit 4
7501 #define RA1PPS0 RA1PPSbits.RA1PPS0 // bit 0
7502 #define RA1PPS1 RA1PPSbits.RA1PPS1 // bit 1
7503 #define RA1PPS2 RA1PPSbits.RA1PPS2 // bit 2
7504 #define RA1PPS3 RA1PPSbits.RA1PPS3 // bit 3
7505 #define RA1PPS4 RA1PPSbits.RA1PPS4 // bit 4
7507 #define RA2PPS0 RA2PPSbits.RA2PPS0 // bit 0
7508 #define RA2PPS1 RA2PPSbits.RA2PPS1 // bit 1
7509 #define RA2PPS2 RA2PPSbits.RA2PPS2 // bit 2
7510 #define RA2PPS3 RA2PPSbits.RA2PPS3 // bit 3
7511 #define RA2PPS4 RA2PPSbits.RA2PPS4 // bit 4
7513 #define RA4PPS0 RA4PPSbits.RA4PPS0 // bit 0
7514 #define RA4PPS1 RA4PPSbits.RA4PPS1 // bit 1
7515 #define RA4PPS2 RA4PPSbits.RA4PPS2 // bit 2
7516 #define RA4PPS3 RA4PPSbits.RA4PPS3 // bit 3
7517 #define RA4PPS4 RA4PPSbits.RA4PPS4 // bit 4
7519 #define RA5PPS0 RA5PPSbits.RA5PPS0 // bit 0
7520 #define RA5PPS1 RA5PPSbits.RA5PPS1 // bit 1
7521 #define RA5PPS2 RA5PPSbits.RA5PPS2 // bit 2
7522 #define RA5PPS3 RA5PPSbits.RA5PPS3 // bit 3
7523 #define RA5PPS4 RA5PPSbits.RA5PPS4 // bit 4
7525 #define RX9D RC1STAbits.RX9D // bit 0
7526 #define OERR RC1STAbits.OERR // bit 1
7527 #define FERR RC1STAbits.FERR // bit 2
7528 #define ADDEN RC1STAbits.ADDEN // bit 3
7529 #define CREN RC1STAbits.CREN // bit 4
7530 #define SREN RC1STAbits.SREN // bit 5
7531 #define RX9 RC1STAbits.RX9 // bit 6
7532 #define SPEN RC1STAbits.SPEN // bit 7
7534 #define RXPPS0 RXPPSbits.RXPPS0 // bit 0
7535 #define RXPPS1 RXPPSbits.RXPPS1 // bit 1
7536 #define RXPPS2 RXPPSbits.RXPPS2 // bit 2
7537 #define RXPPS3 RXPPSbits.RXPPS3 // bit 3
7538 #define RXPPS4 RXPPSbits.RXPPS4 // bit 4
7540 #define SLRA0 SLRCONAbits.SLRA0 // bit 0
7541 #define SLRA1 SLRCONAbits.SLRA1 // bit 1
7542 #define SLRA2 SLRCONAbits.SLRA2 // bit 2
7543 #define SLRA4 SLRCONAbits.SLRA4 // bit 4
7544 #define SLRA5 SLRCONAbits.SLRA5 // bit 5
7546 #define SSP1ADD0 SSP1ADDbits.SSP1ADD0 // bit 0, shadows bit in SSP1ADDbits
7547 #define ADD0 SSP1ADDbits.ADD0 // bit 0, shadows bit in SSP1ADDbits
7548 #define SSP1ADD1 SSP1ADDbits.SSP1ADD1 // bit 1, shadows bit in SSP1ADDbits
7549 #define ADD1 SSP1ADDbits.ADD1 // bit 1, shadows bit in SSP1ADDbits
7550 #define SSP1ADD2 SSP1ADDbits.SSP1ADD2 // bit 2, shadows bit in SSP1ADDbits
7551 #define ADD2 SSP1ADDbits.ADD2 // bit 2, shadows bit in SSP1ADDbits
7552 #define SSP1ADD3 SSP1ADDbits.SSP1ADD3 // bit 3, shadows bit in SSP1ADDbits
7553 #define ADD3 SSP1ADDbits.ADD3 // bit 3, shadows bit in SSP1ADDbits
7554 #define SSP1ADD4 SSP1ADDbits.SSP1ADD4 // bit 4, shadows bit in SSP1ADDbits
7555 #define ADD4 SSP1ADDbits.ADD4 // bit 4, shadows bit in SSP1ADDbits
7556 #define SSP1ADD5 SSP1ADDbits.SSP1ADD5 // bit 5, shadows bit in SSP1ADDbits
7557 #define ADD5 SSP1ADDbits.ADD5 // bit 5, shadows bit in SSP1ADDbits
7558 #define SSP1ADD6 SSP1ADDbits.SSP1ADD6 // bit 6, shadows bit in SSP1ADDbits
7559 #define ADD6 SSP1ADDbits.ADD6 // bit 6, shadows bit in SSP1ADDbits
7560 #define SSP1ADD7 SSP1ADDbits.SSP1ADD7 // bit 7, shadows bit in SSP1ADDbits
7561 #define ADD7 SSP1ADDbits.ADD7 // bit 7, shadows bit in SSP1ADDbits
7563 #define SSP1BUF0 SSP1BUFbits.SSP1BUF0 // bit 0, shadows bit in SSP1BUFbits
7564 #define BUF0 SSP1BUFbits.BUF0 // bit 0, shadows bit in SSP1BUFbits
7565 #define SSP1BUF1 SSP1BUFbits.SSP1BUF1 // bit 1, shadows bit in SSP1BUFbits
7566 #define BUF1 SSP1BUFbits.BUF1 // bit 1, shadows bit in SSP1BUFbits
7567 #define SSP1BUF2 SSP1BUFbits.SSP1BUF2 // bit 2, shadows bit in SSP1BUFbits
7568 #define BUF2 SSP1BUFbits.BUF2 // bit 2, shadows bit in SSP1BUFbits
7569 #define SSP1BUF3 SSP1BUFbits.SSP1BUF3 // bit 3, shadows bit in SSP1BUFbits
7570 #define BUF3 SSP1BUFbits.BUF3 // bit 3, shadows bit in SSP1BUFbits
7571 #define SSP1BUF4 SSP1BUFbits.SSP1BUF4 // bit 4, shadows bit in SSP1BUFbits
7572 #define BUF4 SSP1BUFbits.BUF4 // bit 4, shadows bit in SSP1BUFbits
7573 #define SSP1BUF5 SSP1BUFbits.SSP1BUF5 // bit 5, shadows bit in SSP1BUFbits
7574 #define BUF5 SSP1BUFbits.BUF5 // bit 5, shadows bit in SSP1BUFbits
7575 #define SSP1BUF6 SSP1BUFbits.SSP1BUF6 // bit 6, shadows bit in SSP1BUFbits
7576 #define BUF6 SSP1BUFbits.BUF6 // bit 6, shadows bit in SSP1BUFbits
7577 #define SSP1BUF7 SSP1BUFbits.SSP1BUF7 // bit 7, shadows bit in SSP1BUFbits
7578 #define BUF7 SSP1BUFbits.BUF7 // bit 7, shadows bit in SSP1BUFbits
7580 #define SSP1CLKPPS0 SSP1CLKPPSbits.SSP1CLKPPS0 // bit 0
7581 #define SSP1CLKPPS1 SSP1CLKPPSbits.SSP1CLKPPS1 // bit 1
7582 #define SSP1CLKPPS2 SSP1CLKPPSbits.SSP1CLKPPS2 // bit 2
7583 #define SSP1CLKPPS3 SSP1CLKPPSbits.SSP1CLKPPS3 // bit 3
7584 #define SSP1CLKPPS4 SSP1CLKPPSbits.SSP1CLKPPS4 // bit 4
7586 #define SSPM0 SSP1CONbits.SSPM0 // bit 0
7587 #define SSPM1 SSP1CONbits.SSPM1 // bit 1
7588 #define SSPM2 SSP1CONbits.SSPM2 // bit 2
7589 #define SSPM3 SSP1CONbits.SSPM3 // bit 3
7590 #define CKP SSP1CONbits.CKP // bit 4
7591 #define SSPEN SSP1CONbits.SSPEN // bit 5
7592 #define SSPOV SSP1CONbits.SSPOV // bit 6
7593 #define WCOL SSP1CONbits.WCOL // bit 7
7595 #define SEN SSP1CON2bits.SEN // bit 0
7596 #define RSEN SSP1CON2bits.RSEN // bit 1
7597 #define PEN SSP1CON2bits.PEN // bit 2
7598 #define RCEN SSP1CON2bits.RCEN // bit 3
7599 #define ACKEN SSP1CON2bits.ACKEN // bit 4
7600 #define ACKDT SSP1CON2bits.ACKDT // bit 5
7601 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
7602 #define GCEN SSP1CON2bits.GCEN // bit 7
7604 #define DHEN SSP1CON3bits.DHEN // bit 0
7605 #define AHEN SSP1CON3bits.AHEN // bit 1
7606 #define SBCDE SSP1CON3bits.SBCDE // bit 2
7607 #define SDAHT SSP1CON3bits.SDAHT // bit 3
7608 #define BOEN SSP1CON3bits.BOEN // bit 4
7609 #define SCIE SSP1CON3bits.SCIE // bit 5
7610 #define PCIE SSP1CON3bits.PCIE // bit 6
7611 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
7613 #define SSP1DATPPS0 SSP1DATPPSbits.SSP1DATPPS0 // bit 0
7614 #define SSP1DATPPS1 SSP1DATPPSbits.SSP1DATPPS1 // bit 1
7615 #define SSP1DATPPS2 SSP1DATPPSbits.SSP1DATPPS2 // bit 2
7616 #define SSP1DATPPS3 SSP1DATPPSbits.SSP1DATPPS3 // bit 3
7617 #define SSP1DATPPS4 SSP1DATPPSbits.SSP1DATPPS4 // bit 4
7619 #define SSP1MSK0 SSP1MSKbits.SSP1MSK0 // bit 0, shadows bit in SSP1MSKbits
7620 #define MSK0 SSP1MSKbits.MSK0 // bit 0, shadows bit in SSP1MSKbits
7621 #define SSP1MSK1 SSP1MSKbits.SSP1MSK1 // bit 1, shadows bit in SSP1MSKbits
7622 #define MSK1 SSP1MSKbits.MSK1 // bit 1, shadows bit in SSP1MSKbits
7623 #define SSP1MSK2 SSP1MSKbits.SSP1MSK2 // bit 2, shadows bit in SSP1MSKbits
7624 #define MSK2 SSP1MSKbits.MSK2 // bit 2, shadows bit in SSP1MSKbits
7625 #define SSP1MSK3 SSP1MSKbits.SSP1MSK3 // bit 3, shadows bit in SSP1MSKbits
7626 #define MSK3 SSP1MSKbits.MSK3 // bit 3, shadows bit in SSP1MSKbits
7627 #define SSP1MSK4 SSP1MSKbits.SSP1MSK4 // bit 4, shadows bit in SSP1MSKbits
7628 #define MSK4 SSP1MSKbits.MSK4 // bit 4, shadows bit in SSP1MSKbits
7629 #define SSP1MSK5 SSP1MSKbits.SSP1MSK5 // bit 5, shadows bit in SSP1MSKbits
7630 #define MSK5 SSP1MSKbits.MSK5 // bit 5, shadows bit in SSP1MSKbits
7631 #define SSP1MSK6 SSP1MSKbits.SSP1MSK6 // bit 6, shadows bit in SSP1MSKbits
7632 #define MSK6 SSP1MSKbits.MSK6 // bit 6, shadows bit in SSP1MSKbits
7633 #define SSP1MSK7 SSP1MSKbits.SSP1MSK7 // bit 7, shadows bit in SSP1MSKbits
7634 #define MSK7 SSP1MSKbits.MSK7 // bit 7, shadows bit in SSP1MSKbits
7636 #define SSP1SSPPS0 SSP1SSPPSbits.SSP1SSPPS0 // bit 0
7637 #define SSP1SSPPS1 SSP1SSPPSbits.SSP1SSPPS1 // bit 1
7638 #define SSP1SSPPS2 SSP1SSPPSbits.SSP1SSPPS2 // bit 2
7639 #define SSP1SSPPS3 SSP1SSPPSbits.SSP1SSPPS3 // bit 3
7640 #define SSP1SSPPS4 SSP1SSPPSbits.SSP1SSPPS4 // bit 4
7642 #define BF SSP1STATbits.BF // bit 0
7643 #define UA SSP1STATbits.UA // bit 1
7644 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
7645 #define S SSP1STATbits.S // bit 3
7646 #define P SSP1STATbits.P // bit 4
7647 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
7648 #define CKE SSP1STATbits.CKE // bit 6
7649 #define SMP SSP1STATbits.SMP // bit 7
7651 #define C STATUSbits.C // bit 0
7652 #define DC STATUSbits.DC // bit 1
7653 #define Z STATUSbits.Z // bit 2
7654 #define NOT_PD STATUSbits.NOT_PD // bit 3
7655 #define NOT_TO STATUSbits.NOT_TO // bit 4
7657 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
7658 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
7659 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
7661 #define T0CKIPPS0 T0CKIPPSbits.T0CKIPPS0 // bit 0
7662 #define T0CKIPPS1 T0CKIPPSbits.T0CKIPPS1 // bit 1
7663 #define T0CKIPPS2 T0CKIPPSbits.T0CKIPPS2 // bit 2
7664 #define T0CKIPPS3 T0CKIPPSbits.T0CKIPPS3 // bit 3
7665 #define T0CKIPPS4 T0CKIPPSbits.T0CKIPPS4 // bit 4
7667 #define T0OUTPS0 T0CON0bits.T0OUTPS0 // bit 0
7668 #define T0OUTPS1 T0CON0bits.T0OUTPS1 // bit 1
7669 #define T0OUTPS2 T0CON0bits.T0OUTPS2 // bit 2
7670 #define T0OUTPS3 T0CON0bits.T0OUTPS3 // bit 3
7671 #define T016BIT T0CON0bits.T016BIT // bit 4
7672 #define T0OUT T0CON0bits.T0OUT // bit 5
7673 #define T0EN T0CON0bits.T0EN // bit 7
7675 #define T0CKPS0 T0CON1bits.T0CKPS0 // bit 0
7676 #define T0CKPS1 T0CON1bits.T0CKPS1 // bit 1
7677 #define T0CKPS2 T0CON1bits.T0CKPS2 // bit 2
7678 #define T0CKPS3 T0CON1bits.T0CKPS3 // bit 3
7679 #define T0ASYNC T0CON1bits.T0ASYNC // bit 4
7680 #define T0CS0 T0CON1bits.T0CS0 // bit 5
7681 #define T0CS1 T0CON1bits.T0CS1 // bit 6
7682 #define T0CS2 T0CON1bits.T0CS2 // bit 7
7684 #define T1CKIPPS0 T1CKIPPSbits.T1CKIPPS0 // bit 0
7685 #define T1CKIPPS1 T1CKIPPSbits.T1CKIPPS1 // bit 1
7686 #define T1CKIPPS2 T1CKIPPSbits.T1CKIPPS2 // bit 2
7687 #define T1CKIPPS3 T1CKIPPSbits.T1CKIPPS3 // bit 3
7688 #define T1CKIPPS4 T1CKIPPSbits.T1CKIPPS4 // bit 4
7690 #define TMR1ON T1CONbits.TMR1ON // bit 0
7691 #define T1SYNC T1CONbits.T1SYNC // bit 2
7692 #define T1SOSC T1CONbits.T1SOSC // bit 3
7693 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
7694 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
7695 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
7696 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
7698 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
7699 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
7700 #define T1GVAL T1GCONbits.T1GVAL // bit 2
7701 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
7702 #define T1GSPM T1GCONbits.T1GSPM // bit 4
7703 #define T1GTM T1GCONbits.T1GTM // bit 5
7704 #define T1GPOL T1GCONbits.T1GPOL // bit 6
7705 #define TMR1GE T1GCONbits.TMR1GE // bit 7
7707 #define T1GPPS0 T1GPPSbits.T1GPPS0 // bit 0
7708 #define T1GPPS1 T1GPPSbits.T1GPPS1 // bit 1
7709 #define T1GPPS2 T1GPPSbits.T1GPPS2 // bit 2
7710 #define T1GPPS3 T1GPPSbits.T1GPPS3 // bit 3
7711 #define T1GPPS4 T1GPPSbits.T1GPPS4 // bit 4
7713 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
7714 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
7715 #define TMR2ON T2CONbits.TMR2ON // bit 2
7716 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
7717 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
7718 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
7719 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
7721 #define TMR08 TMR0Hbits.TMR08 // bit 0
7722 #define TMR09 TMR0Hbits.TMR09 // bit 1
7723 #define TMR010 TMR0Hbits.TMR010 // bit 2
7724 #define TMR011 TMR0Hbits.TMR011 // bit 3
7725 #define TMR012 TMR0Hbits.TMR012 // bit 4
7726 #define TMR013 TMR0Hbits.TMR013 // bit 5
7727 #define TMR014 TMR0Hbits.TMR014 // bit 6
7728 #define TMR015 TMR0Hbits.TMR015 // bit 7
7730 #define TMR00 TMR0Lbits.TMR00 // bit 0
7731 #define TMR01 TMR0Lbits.TMR01 // bit 1
7732 #define TMR02 TMR0Lbits.TMR02 // bit 2
7733 #define TMR03 TMR0Lbits.TMR03 // bit 3
7734 #define TMR04 TMR0Lbits.TMR04 // bit 4
7735 #define TMR05 TMR0Lbits.TMR05 // bit 5
7736 #define TMR06 TMR0Lbits.TMR06 // bit 6
7737 #define TMR07 TMR0Lbits.TMR07 // bit 7
7739 #define TRISA0 TRISAbits.TRISA0 // bit 0
7740 #define TRISA1 TRISAbits.TRISA1 // bit 1
7741 #define TRISA2 TRISAbits.TRISA2 // bit 2
7742 #define TRISA4 TRISAbits.TRISA4 // bit 4
7743 #define TRISA5 TRISAbits.TRISA5 // bit 5
7745 #define TX9D TX1STAbits.TX9D // bit 0
7746 #define TRMT TX1STAbits.TRMT // bit 1
7747 #define BRGH TX1STAbits.BRGH // bit 2
7748 #define SENDB TX1STAbits.SENDB // bit 3
7749 #define SYNC TX1STAbits.SYNC // bit 4
7750 #define TXEN TX1STAbits.TXEN // bit 5
7751 #define TX9 TX1STAbits.TX9 // bit 6
7752 #define CSRC TX1STAbits.CSRC // bit 7
7754 #define TXPPS0 TXPPSbits.TXPPS0 // bit 0
7755 #define TXPPS1 TXPPSbits.TXPPS1 // bit 1
7756 #define TXPPS2 TXPPSbits.TXPPS2 // bit 2
7757 #define TXPPS3 TXPPSbits.TXPPS3 // bit 3
7758 #define TXPPS4 TXPPSbits.TXPPS4 // bit 4
7760 #define VREGPM VREGCONbits.VREGPM // bit 1
7762 #define SWDTEN WDTCONbits.SWDTEN // bit 0
7763 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
7764 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
7765 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
7766 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
7767 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
7769 #define WPUA0 WPUAbits.WPUA0 // bit 0
7770 #define WPUA1 WPUAbits.WPUA1 // bit 1
7771 #define WPUA2 WPUAbits.WPUA2 // bit 2
7772 #define WPUA3 WPUAbits.WPUA3 // bit 3
7773 #define WPUA4 WPUAbits.WPUA4 // bit 4
7774 #define WPUA5 WPUAbits.WPUA5 // bit 5
7776 #endif // #ifndef NO_BIT_DEFINES
7778 #endif // #ifndef __PIC16F18313_H__