Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16lf1566.h
blob7e6951f020a02c9939f44e33f0b93a79d5c1b221
1 /*
2 * This declarations of the PIC16LF1566 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:08 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 __PIC16LF1566_H__
26 #define __PIC16LF1566_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF0_ADDR 0x0000
37 #define INDF1_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR0_ADDR 0x0004
41 #define FSR0L_ADDR 0x0004
42 #define FSR0H_ADDR 0x0005
43 #define FSR1_ADDR 0x0006
44 #define FSR1L_ADDR 0x0006
45 #define FSR1H_ADDR 0x0007
46 #define BSR_ADDR 0x0008
47 #define WREG_ADDR 0x0009
48 #define PCLATH_ADDR 0x000A
49 #define INTCON_ADDR 0x000B
50 #define PORTA_ADDR 0x000C
51 #define PORTB_ADDR 0x000D
52 #define PORTC_ADDR 0x000E
53 #define PORTE_ADDR 0x0010
54 #define PIR1_ADDR 0x0011
55 #define PIR2_ADDR 0x0012
56 #define TMR0_ADDR 0x0015
57 #define TMR1_ADDR 0x0016
58 #define TMR1L_ADDR 0x0016
59 #define TMR1H_ADDR 0x0017
60 #define T1CON_ADDR 0x0018
61 #define T1GCON_ADDR 0x0019
62 #define TMR2_ADDR 0x001A
63 #define PR2_ADDR 0x001B
64 #define T2CON_ADDR 0x001C
65 #define TRISA_ADDR 0x008C
66 #define TRISB_ADDR 0x008D
67 #define TRISC_ADDR 0x008E
68 #define PIE1_ADDR 0x0091
69 #define PIE2_ADDR 0x0092
70 #define OPTION_REG_ADDR 0x0095
71 #define PCON_ADDR 0x0096
72 #define WDTCON_ADDR 0x0097
73 #define OSCCON_ADDR 0x0099
74 #define OSCSTAT_ADDR 0x009A
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 ADCON2_ADDR 0x009F
81 #define LATA_ADDR 0x010C
82 #define LATB_ADDR 0x010D
83 #define LATC_ADDR 0x010E
84 #define BORCON_ADDR 0x0116
85 #define FVRCON_ADDR 0x0117
86 #define APFCON_ADDR 0x011D
87 #define ANSELA_ADDR 0x018C
88 #define ANSELB_ADDR 0x018D
89 #define ANSELC_ADDR 0x018E
90 #define PMADR_ADDR 0x0191
91 #define PMADRL_ADDR 0x0191
92 #define PMADRH_ADDR 0x0192
93 #define PMDAT_ADDR 0x0193
94 #define PMDATL_ADDR 0x0193
95 #define PMDATH_ADDR 0x0194
96 #define PMCON1_ADDR 0x0195
97 #define PMCON2_ADDR 0x0196
98 #define RCREG_ADDR 0x0199
99 #define TXREG_ADDR 0x019A
100 #define SPBRG_ADDR 0x019B
101 #define SPBRGL_ADDR 0x019B
102 #define SPBRGH_ADDR 0x019C
103 #define RCSTA_ADDR 0x019D
104 #define TXSTA_ADDR 0x019E
105 #define BAUDCON_ADDR 0x019F
106 #define WPUB_ADDR 0x020D
107 #define WPUE_ADDR 0x0210
108 #define SSP1BUF_ADDR 0x0211
109 #define SSPBUF_ADDR 0x0211
110 #define SSP1ADD_ADDR 0x0212
111 #define SSPADD_ADDR 0x0212
112 #define SSP1MSK_ADDR 0x0213
113 #define SSPMSK_ADDR 0x0213
114 #define SSP1STAT_ADDR 0x0214
115 #define SSPSTAT_ADDR 0x0214
116 #define SSP1CON_ADDR 0x0215
117 #define SSP1CON1_ADDR 0x0215
118 #define SSPCON_ADDR 0x0215
119 #define SSPCON1_ADDR 0x0215
120 #define SSP1CON2_ADDR 0x0216
121 #define SSPCON2_ADDR 0x0216
122 #define SSP1CON3_ADDR 0x0217
123 #define SSPCON3_ADDR 0x0217
124 #define SSPLVL_ADDR 0x0218
125 #define SSP2BUF_ADDR 0x0219
126 #define SSP2ADD_ADDR 0x021A
127 #define SSP2MSK_ADDR 0x021B
128 #define SSP2STAT_ADDR 0x021C
129 #define SSP2CON_ADDR 0x021D
130 #define SSP2CON1_ADDR 0x021D
131 #define SSP2CON2_ADDR 0x021E
132 #define SSP2CON3_ADDR 0x021F
133 #define IOCBP_ADDR 0x0394
134 #define IOCBN_ADDR 0x0395
135 #define IOCBF_ADDR 0x0396
136 #define TMR4_ADDR 0x0415
137 #define PR4_ADDR 0x0416
138 #define T4CON_ADDR 0x0417
139 #define PWM1DCL_ADDR 0x0611
140 #define PWM1DCH_ADDR 0x0612
141 #define PWM1CON_ADDR 0x0613
142 #define PWM1CON0_ADDR 0x0613
143 #define PWM2DCL_ADDR 0x0614
144 #define PWM2DCH_ADDR 0x0615
145 #define PWM2CON_ADDR 0x0616
146 #define PWM2CON0_ADDR 0x0616
147 #define PWMTMRS_ADDR 0x061D
148 #define PWM1AOE_ADDR 0x061E
149 #define PWM2AOE_ADDR 0x061F
150 #define ADCTX_ADDR 0x0691
151 #define AAD1TX_ADDR 0x0692
152 #define AAD1TX0_ADDR 0x0692
153 #define AD1TX_ADDR 0x0692
154 #define AD1TX0_ADDR 0x0692
155 #define AAD1TX1_ADDR 0x0693
156 #define AD1TX1_ADDR 0x0693
157 #define AAD2TX_ADDR 0x0694
158 #define AAD2TX0_ADDR 0x0694
159 #define AD2TX_ADDR 0x0694
160 #define AD2TX0_ADDR 0x0694
161 #define AAD2TX1_ADDR 0x0695
162 #define AD2TX1_ADDR 0x0695
163 #define AAD1CON0_ADDR 0x0711
164 #define AADCON0_ADDR 0x0711
165 #define AD1CON0_ADDR 0x0711
166 #define AADCON1_ADDR 0x0712
167 #define ADCOMCON_ADDR 0x0712
168 #define AAD1CON2_ADDR 0x0713
169 #define AADCON2_ADDR 0x0713
170 #define AD1CON2_ADDR 0x0713
171 #define AAD1CON3_ADDR 0x0714
172 #define AADCON3_ADDR 0x0714
173 #define AD1CON3_ADDR 0x0714
174 #define AADSTAT_ADDR 0x0715
175 #define ADSTAT_ADDR 0x0715
176 #define AAD1PRE_ADDR 0x0716
177 #define AADPRE_ADDR 0x0716
178 #define AD1PRE_ADDR 0x0716
179 #define AD1PRECON_ADDR 0x0716
180 #define AAD1ACQ_ADDR 0x0717
181 #define AADACQ_ADDR 0x0717
182 #define AD1ACQ_ADDR 0x0717
183 #define AD1ACQCON_ADDR 0x0717
184 #define AAD1GRD_ADDR 0x0718
185 #define AADGRD_ADDR 0x0718
186 #define AD1GRD_ADDR 0x0718
187 #define AAD1CAP_ADDR 0x0719
188 #define AAD1CAPCON_ADDR 0x0719
189 #define AADCAP_ADDR 0x0719
190 #define AD1CAPCON_ADDR 0x0719
191 #define AAD1RES0_ADDR 0x071A
192 #define AAD1RES0L_ADDR 0x071A
193 #define AD1RES0_ADDR 0x071A
194 #define AD1RES0L_ADDR 0x071A
195 #define ADRES0_ADDR 0x071A
196 #define AAD1RES0H_ADDR 0x071B
197 #define AD1RES0H_ADDR 0x071B
198 #define AAD1RES1_ADDR 0x071C
199 #define AAD1RES1L_ADDR 0x071C
200 #define AD1RES1_ADDR 0x071C
201 #define AD1RES1L_ADDR 0x071C
202 #define ADRES1_ADDR 0x071C
203 #define AAD1RES1H_ADDR 0x071D
204 #define AD1RES1H_ADDR 0x071D
205 #define AAD1CH_ADDR 0x071E
206 #define AAD1CH0_ADDR 0x071E
207 #define AD1CH_ADDR 0x071E
208 #define AD1CH0_ADDR 0x071E
209 #define AAD1CH1_ADDR 0x071F
210 #define AD1CH1_ADDR 0x071F
211 #define AAD2CON0_ADDR 0x0791
212 #define AD2CON0_ADDR 0x0791
213 #define AAD2CON2_ADDR 0x0793
214 #define AD2CON2_ADDR 0x0793
215 #define AAD2CON3_ADDR 0x0794
216 #define AD2CON3_ADDR 0x0794
217 #define AAD2PRE_ADDR 0x0796
218 #define AD2PRE_ADDR 0x0796
219 #define AD2PRECON_ADDR 0x0796
220 #define AAD2ACQ_ADDR 0x0797
221 #define AD2ACQ_ADDR 0x0797
222 #define AD2ACQCON_ADDR 0x0797
223 #define AAD2GRD_ADDR 0x0798
224 #define AD2GRD_ADDR 0x0798
225 #define AAD2CAP_ADDR 0x0799
226 #define AAD2CAPCON_ADDR 0x0799
227 #define AD2CAPCON_ADDR 0x0799
228 #define AAD2RES0_ADDR 0x079A
229 #define AAD2RES0L_ADDR 0x079A
230 #define AD2RES0_ADDR 0x079A
231 #define AAD2RES0H_ADDR 0x079B
232 #define AAD2RES1_ADDR 0x079C
233 #define AAD2RES1L_ADDR 0x079C
234 #define AD2RES1_ADDR 0x079C
235 #define AAD2RES1H_ADDR 0x079D
236 #define AAD2CH_ADDR 0x079E
237 #define AAD2CH0_ADDR 0x079E
238 #define AD2CH_ADDR 0x079E
239 #define AD2CH0_ADDR 0x079E
240 #define AAD2CH1_ADDR 0x079F
241 #define AD2CH1_ADDR 0x079F
242 #define ICDIO_ADDR 0x0F8C
243 #define ICDCON0_ADDR 0x0F8D
244 #define ICDSTAT_ADDR 0x0F91
245 #define ICDINSTL_ADDR 0x0F96
246 #define ICDINSTH_ADDR 0x0F97
247 #define ICDBK0CON_ADDR 0x0F9C
248 #define ICDBK0L_ADDR 0x0F9D
249 #define ICDBK0H_ADDR 0x0F9E
250 #define BSRICDSHAD_ADDR 0x0FE3
251 #define STATUS_SHAD_ADDR 0x0FE4
252 #define WREG_SHAD_ADDR 0x0FE5
253 #define BSR_SHAD_ADDR 0x0FE6
254 #define PCLATH_SHAD_ADDR 0x0FE7
255 #define FSR0L_SHAD_ADDR 0x0FE8
256 #define FSR0H_SHAD_ADDR 0x0FE9
257 #define FSR1L_SHAD_ADDR 0x0FEA
258 #define FSR1H_SHAD_ADDR 0x0FEB
259 #define STKPTR_ADDR 0x0FED
260 #define TOSL_ADDR 0x0FEE
261 #define TOSH_ADDR 0x0FEF
263 #endif // #ifndef NO_ADDR_DEFINES
265 //==============================================================================
267 // Register Definitions
269 //==============================================================================
271 extern __at(0x0000) __sfr INDF0;
272 extern __at(0x0001) __sfr INDF1;
273 extern __at(0x0002) __sfr PCL;
275 //==============================================================================
276 // STATUS Bits
278 extern __at(0x0003) __sfr STATUS;
280 typedef struct
282 unsigned C : 1;
283 unsigned DC : 1;
284 unsigned Z : 1;
285 unsigned NOT_PD : 1;
286 unsigned NOT_TO : 1;
287 unsigned : 1;
288 unsigned : 1;
289 unsigned : 1;
290 } __STATUSbits_t;
292 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
294 #define _C 0x01
295 #define _DC 0x02
296 #define _Z 0x04
297 #define _NOT_PD 0x08
298 #define _NOT_TO 0x10
300 //==============================================================================
302 extern __at(0x0004) __sfr FSR0;
303 extern __at(0x0004) __sfr FSR0L;
304 extern __at(0x0005) __sfr FSR0H;
305 extern __at(0x0006) __sfr FSR1;
306 extern __at(0x0006) __sfr FSR1L;
307 extern __at(0x0007) __sfr FSR1H;
309 //==============================================================================
310 // BSR Bits
312 extern __at(0x0008) __sfr BSR;
314 typedef union
316 struct
318 unsigned BSR0 : 1;
319 unsigned BSR1 : 1;
320 unsigned BSR2 : 1;
321 unsigned BSR3 : 1;
322 unsigned BSR4 : 1;
323 unsigned : 1;
324 unsigned : 1;
325 unsigned : 1;
328 struct
330 unsigned BSR : 5;
331 unsigned : 3;
333 } __BSRbits_t;
335 extern __at(0x0008) volatile __BSRbits_t BSRbits;
337 #define _BSR0 0x01
338 #define _BSR1 0x02
339 #define _BSR2 0x04
340 #define _BSR3 0x08
341 #define _BSR4 0x10
343 //==============================================================================
345 extern __at(0x0009) __sfr WREG;
346 extern __at(0x000A) __sfr PCLATH;
348 //==============================================================================
349 // INTCON Bits
351 extern __at(0x000B) __sfr INTCON;
353 typedef union
355 struct
357 unsigned IOCIF : 1;
358 unsigned INTF : 1;
359 unsigned TMR0IF : 1;
360 unsigned IOCIE : 1;
361 unsigned INTE : 1;
362 unsigned TMR0IE : 1;
363 unsigned PEIE : 1;
364 unsigned GIE : 1;
367 struct
369 unsigned : 1;
370 unsigned : 1;
371 unsigned T0IF : 1;
372 unsigned : 1;
373 unsigned : 1;
374 unsigned T0IE : 1;
375 unsigned : 1;
376 unsigned : 1;
378 } __INTCONbits_t;
380 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
382 #define _IOCIF 0x01
383 #define _INTF 0x02
384 #define _TMR0IF 0x04
385 #define _T0IF 0x04
386 #define _IOCIE 0x08
387 #define _INTE 0x10
388 #define _TMR0IE 0x20
389 #define _T0IE 0x20
390 #define _PEIE 0x40
391 #define _GIE 0x80
393 //==============================================================================
396 //==============================================================================
397 // PORTA Bits
399 extern __at(0x000C) __sfr PORTA;
401 typedef struct
403 unsigned RA0 : 1;
404 unsigned RA1 : 1;
405 unsigned RA2 : 1;
406 unsigned RA3 : 1;
407 unsigned RA4 : 1;
408 unsigned RA5 : 1;
409 unsigned RA6 : 1;
410 unsigned RA7 : 1;
411 } __PORTAbits_t;
413 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
415 #define _RA0 0x01
416 #define _RA1 0x02
417 #define _RA2 0x04
418 #define _RA3 0x08
419 #define _RA4 0x10
420 #define _RA5 0x20
421 #define _RA6 0x40
422 #define _RA7 0x80
424 //==============================================================================
427 //==============================================================================
428 // PORTB Bits
430 extern __at(0x000D) __sfr PORTB;
432 typedef struct
434 unsigned RB0 : 1;
435 unsigned RB1 : 1;
436 unsigned RB2 : 1;
437 unsigned RB3 : 1;
438 unsigned RB4 : 1;
439 unsigned RB5 : 1;
440 unsigned RB6 : 1;
441 unsigned RB7 : 1;
442 } __PORTBbits_t;
444 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
446 #define _RB0 0x01
447 #define _RB1 0x02
448 #define _RB2 0x04
449 #define _RB3 0x08
450 #define _RB4 0x10
451 #define _RB5 0x20
452 #define _RB6 0x40
453 #define _RB7 0x80
455 //==============================================================================
458 //==============================================================================
459 // PORTC Bits
461 extern __at(0x000E) __sfr PORTC;
463 typedef struct
465 unsigned RC0 : 1;
466 unsigned RC1 : 1;
467 unsigned RC2 : 1;
468 unsigned RC3 : 1;
469 unsigned RC4 : 1;
470 unsigned RC5 : 1;
471 unsigned RC6 : 1;
472 unsigned RC7 : 1;
473 } __PORTCbits_t;
475 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
477 #define _RC0 0x01
478 #define _RC1 0x02
479 #define _RC2 0x04
480 #define _RC3 0x08
481 #define _RC4 0x10
482 #define _RC5 0x20
483 #define _RC6 0x40
484 #define _RC7 0x80
486 //==============================================================================
489 //==============================================================================
490 // PORTE Bits
492 extern __at(0x0010) __sfr PORTE;
494 typedef struct
496 unsigned : 1;
497 unsigned : 1;
498 unsigned : 1;
499 unsigned RE3 : 1;
500 unsigned : 1;
501 unsigned : 1;
502 unsigned : 1;
503 unsigned : 1;
504 } __PORTEbits_t;
506 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
508 #define _RE3 0x08
510 //==============================================================================
513 //==============================================================================
514 // PIR1 Bits
516 extern __at(0x0011) __sfr PIR1;
518 typedef union
520 struct
522 unsigned TMR1IF : 1;
523 unsigned TMR2IF : 1;
524 unsigned SSP2IF : 1;
525 unsigned SSP1IF : 1;
526 unsigned TXIF : 1;
527 unsigned RCIF : 1;
528 unsigned ADIF : 1;
529 unsigned TMR1GIF : 1;
532 struct
534 unsigned : 1;
535 unsigned : 1;
536 unsigned : 1;
537 unsigned : 1;
538 unsigned : 1;
539 unsigned : 1;
540 unsigned AD1IF : 1;
541 unsigned : 1;
543 } __PIR1bits_t;
545 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
547 #define _TMR1IF 0x01
548 #define _TMR2IF 0x02
549 #define _SSP2IF 0x04
550 #define _SSP1IF 0x08
551 #define _TXIF 0x10
552 #define _RCIF 0x20
553 #define _ADIF 0x40
554 #define _AD1IF 0x40
555 #define _TMR1GIF 0x80
557 //==============================================================================
560 //==============================================================================
561 // PIR2 Bits
563 extern __at(0x0012) __sfr PIR2;
565 typedef struct
567 unsigned : 1;
568 unsigned TMR4IF : 1;
569 unsigned BCL2IF : 1;
570 unsigned BCL1IF : 1;
571 unsigned : 1;
572 unsigned : 1;
573 unsigned AD2IF : 1;
574 unsigned : 1;
575 } __PIR2bits_t;
577 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
579 #define _TMR4IF 0x02
580 #define _BCL2IF 0x04
581 #define _BCL1IF 0x08
582 #define _AD2IF 0x40
584 //==============================================================================
586 extern __at(0x0015) __sfr TMR0;
587 extern __at(0x0016) __sfr TMR1;
588 extern __at(0x0016) __sfr TMR1L;
589 extern __at(0x0017) __sfr TMR1H;
591 //==============================================================================
592 // T1CON Bits
594 extern __at(0x0018) __sfr T1CON;
596 typedef union
598 struct
600 unsigned TMR1ON : 1;
601 unsigned : 1;
602 unsigned NOT_T1SYNC : 1;
603 unsigned : 1;
604 unsigned T1CKPS0 : 1;
605 unsigned T1CKPS1 : 1;
606 unsigned TMR1CS0 : 1;
607 unsigned TMR1CS1 : 1;
610 struct
612 unsigned : 4;
613 unsigned T1CKPS : 2;
614 unsigned : 2;
617 struct
619 unsigned : 6;
620 unsigned TMR1CS : 2;
622 } __T1CONbits_t;
624 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
626 #define _TMR1ON 0x01
627 #define _NOT_T1SYNC 0x04
628 #define _T1CKPS0 0x10
629 #define _T1CKPS1 0x20
630 #define _TMR1CS0 0x40
631 #define _TMR1CS1 0x80
633 //==============================================================================
636 //==============================================================================
637 // T1GCON Bits
639 extern __at(0x0019) __sfr T1GCON;
641 typedef union
643 struct
645 unsigned T1GSS : 1;
646 unsigned : 1;
647 unsigned T1GVAL : 1;
648 unsigned T1GGO_NOT_DONE : 1;
649 unsigned T1GSPM : 1;
650 unsigned T1GTM : 1;
651 unsigned T1GPOL : 1;
652 unsigned TMR1GE : 1;
655 struct
657 unsigned T1GSS0 : 1;
658 unsigned : 1;
659 unsigned : 1;
660 unsigned GO : 1;
661 unsigned : 1;
662 unsigned : 1;
663 unsigned : 1;
664 unsigned : 1;
666 } __T1GCONbits_t;
668 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
670 #define _T1GCON_T1GSS 0x01
671 #define _T1GCON_T1GSS0 0x01
672 #define _T1GCON_T1GVAL 0x04
673 #define _T1GCON_T1GGO_NOT_DONE 0x08
674 #define _T1GCON_GO 0x08
675 #define _T1GCON_T1GSPM 0x10
676 #define _T1GCON_T1GTM 0x20
677 #define _T1GCON_T1GPOL 0x40
678 #define _T1GCON_TMR1GE 0x80
680 //==============================================================================
682 extern __at(0x001A) __sfr TMR2;
683 extern __at(0x001B) __sfr PR2;
685 //==============================================================================
686 // T2CON Bits
688 extern __at(0x001C) __sfr T2CON;
690 typedef union
692 struct
694 unsigned T2CKPS0 : 1;
695 unsigned T2CKPS1 : 1;
696 unsigned TMR2ON : 1;
697 unsigned T2OUTPS0 : 1;
698 unsigned T2OUTPS1 : 1;
699 unsigned T2OUTPS2 : 1;
700 unsigned T2OUTPS3 : 1;
701 unsigned : 1;
704 struct
706 unsigned T2CKPS : 2;
707 unsigned : 6;
710 struct
712 unsigned : 3;
713 unsigned T2OUTPS : 4;
714 unsigned : 1;
716 } __T2CONbits_t;
718 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
720 #define _T2CKPS0 0x01
721 #define _T2CKPS1 0x02
722 #define _TMR2ON 0x04
723 #define _T2OUTPS0 0x08
724 #define _T2OUTPS1 0x10
725 #define _T2OUTPS2 0x20
726 #define _T2OUTPS3 0x40
728 //==============================================================================
731 //==============================================================================
732 // TRISA Bits
734 extern __at(0x008C) __sfr TRISA;
736 typedef struct
738 unsigned TRISA0 : 1;
739 unsigned TRISA1 : 1;
740 unsigned TRISA2 : 1;
741 unsigned TRISA3 : 1;
742 unsigned TRISA4 : 1;
743 unsigned TRISA5 : 1;
744 unsigned TRISA6 : 1;
745 unsigned TRISA7 : 1;
746 } __TRISAbits_t;
748 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
750 #define _TRISA0 0x01
751 #define _TRISA1 0x02
752 #define _TRISA2 0x04
753 #define _TRISA3 0x08
754 #define _TRISA4 0x10
755 #define _TRISA5 0x20
756 #define _TRISA6 0x40
757 #define _TRISA7 0x80
759 //==============================================================================
762 //==============================================================================
763 // TRISB Bits
765 extern __at(0x008D) __sfr TRISB;
767 typedef struct
769 unsigned TRISB0 : 1;
770 unsigned TRISB1 : 1;
771 unsigned TRISB2 : 1;
772 unsigned TRISB3 : 1;
773 unsigned TRISB4 : 1;
774 unsigned TRISB5 : 1;
775 unsigned TRISB6 : 1;
776 unsigned TRISB7 : 1;
777 } __TRISBbits_t;
779 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
781 #define _TRISB0 0x01
782 #define _TRISB1 0x02
783 #define _TRISB2 0x04
784 #define _TRISB3 0x08
785 #define _TRISB4 0x10
786 #define _TRISB5 0x20
787 #define _TRISB6 0x40
788 #define _TRISB7 0x80
790 //==============================================================================
793 //==============================================================================
794 // TRISC Bits
796 extern __at(0x008E) __sfr TRISC;
798 typedef struct
800 unsigned TRISC0 : 1;
801 unsigned TRISC1 : 1;
802 unsigned TRISC2 : 1;
803 unsigned TRISC3 : 1;
804 unsigned TRISC4 : 1;
805 unsigned TRISC5 : 1;
806 unsigned TRISC6 : 1;
807 unsigned TRISC7 : 1;
808 } __TRISCbits_t;
810 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
812 #define _TRISC0 0x01
813 #define _TRISC1 0x02
814 #define _TRISC2 0x04
815 #define _TRISC3 0x08
816 #define _TRISC4 0x10
817 #define _TRISC5 0x20
818 #define _TRISC6 0x40
819 #define _TRISC7 0x80
821 //==============================================================================
824 //==============================================================================
825 // PIE1 Bits
827 extern __at(0x0091) __sfr PIE1;
829 typedef union
831 struct
833 unsigned TMR1IE : 1;
834 unsigned TMR2IE : 1;
835 unsigned SSP2IE : 1;
836 unsigned SSP1IE : 1;
837 unsigned TXIE : 1;
838 unsigned RCIE : 1;
839 unsigned ADIE : 1;
840 unsigned TMR1GIE : 1;
843 struct
845 unsigned : 1;
846 unsigned : 1;
847 unsigned : 1;
848 unsigned SSPIE : 1;
849 unsigned : 1;
850 unsigned : 1;
851 unsigned AD1IE : 1;
852 unsigned : 1;
854 } __PIE1bits_t;
856 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
858 #define _TMR1IE 0x01
859 #define _TMR2IE 0x02
860 #define _SSP2IE 0x04
861 #define _SSP1IE 0x08
862 #define _SSPIE 0x08
863 #define _TXIE 0x10
864 #define _RCIE 0x20
865 #define _ADIE 0x40
866 #define _AD1IE 0x40
867 #define _TMR1GIE 0x80
869 //==============================================================================
872 //==============================================================================
873 // PIE2 Bits
875 extern __at(0x0092) __sfr PIE2;
877 typedef struct
879 unsigned : 1;
880 unsigned TMR4IE : 1;
881 unsigned BCL2IE : 1;
882 unsigned BCL1IE : 1;
883 unsigned : 1;
884 unsigned : 1;
885 unsigned AD2IE : 1;
886 unsigned : 1;
887 } __PIE2bits_t;
889 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
891 #define _TMR4IE 0x02
892 #define _BCL2IE 0x04
893 #define _BCL1IE 0x08
894 #define _AD2IE 0x40
896 //==============================================================================
899 //==============================================================================
900 // OPTION_REG Bits
902 extern __at(0x0095) __sfr OPTION_REG;
904 typedef union
906 struct
908 unsigned PS0 : 1;
909 unsigned PS1 : 1;
910 unsigned PS2 : 1;
911 unsigned PSA : 1;
912 unsigned TMR0SE : 1;
913 unsigned TMR0CS : 1;
914 unsigned INTEDG : 1;
915 unsigned NOT_WPUEN : 1;
918 struct
920 unsigned : 1;
921 unsigned : 1;
922 unsigned : 1;
923 unsigned : 1;
924 unsigned T0SE : 1;
925 unsigned T0CS : 1;
926 unsigned : 1;
927 unsigned : 1;
930 struct
932 unsigned PS : 3;
933 unsigned : 5;
935 } __OPTION_REGbits_t;
937 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
939 #define _PS0 0x01
940 #define _PS1 0x02
941 #define _PS2 0x04
942 #define _PSA 0x08
943 #define _TMR0SE 0x10
944 #define _T0SE 0x10
945 #define _TMR0CS 0x20
946 #define _T0CS 0x20
947 #define _INTEDG 0x40
948 #define _NOT_WPUEN 0x80
950 //==============================================================================
953 //==============================================================================
954 // PCON Bits
956 extern __at(0x0096) __sfr PCON;
958 typedef struct
960 unsigned NOT_BOR : 1;
961 unsigned NOT_POR : 1;
962 unsigned NOT_RI : 1;
963 unsigned NOT_RMCLR : 1;
964 unsigned NOT_RWDT : 1;
965 unsigned : 1;
966 unsigned STKUNF : 1;
967 unsigned STKOVF : 1;
968 } __PCONbits_t;
970 extern __at(0x0096) volatile __PCONbits_t PCONbits;
972 #define _NOT_BOR 0x01
973 #define _NOT_POR 0x02
974 #define _NOT_RI 0x04
975 #define _NOT_RMCLR 0x08
976 #define _NOT_RWDT 0x10
977 #define _STKUNF 0x40
978 #define _STKOVF 0x80
980 //==============================================================================
983 //==============================================================================
984 // WDTCON Bits
986 extern __at(0x0097) __sfr WDTCON;
988 typedef union
990 struct
992 unsigned SWDTEN : 1;
993 unsigned WDTPS0 : 1;
994 unsigned WDTPS1 : 1;
995 unsigned WDTPS2 : 1;
996 unsigned WDTPS3 : 1;
997 unsigned WDTPS4 : 1;
998 unsigned : 1;
999 unsigned : 1;
1002 struct
1004 unsigned : 1;
1005 unsigned WDTPS : 5;
1006 unsigned : 2;
1008 } __WDTCONbits_t;
1010 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1012 #define _SWDTEN 0x01
1013 #define _WDTPS0 0x02
1014 #define _WDTPS1 0x04
1015 #define _WDTPS2 0x08
1016 #define _WDTPS3 0x10
1017 #define _WDTPS4 0x20
1019 //==============================================================================
1022 //==============================================================================
1023 // OSCCON Bits
1025 extern __at(0x0099) __sfr OSCCON;
1027 typedef union
1029 struct
1031 unsigned SCS0 : 1;
1032 unsigned SCS1 : 1;
1033 unsigned : 1;
1034 unsigned IRCF0 : 1;
1035 unsigned IRCF1 : 1;
1036 unsigned IRCF2 : 1;
1037 unsigned IRCF3 : 1;
1038 unsigned SPLLEN : 1;
1041 struct
1043 unsigned SCS : 2;
1044 unsigned : 6;
1047 struct
1049 unsigned : 3;
1050 unsigned IRCF : 4;
1051 unsigned : 1;
1053 } __OSCCONbits_t;
1055 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1057 #define _SCS0 0x01
1058 #define _SCS1 0x02
1059 #define _IRCF0 0x08
1060 #define _IRCF1 0x10
1061 #define _IRCF2 0x20
1062 #define _IRCF3 0x40
1063 #define _SPLLEN 0x80
1065 //==============================================================================
1068 //==============================================================================
1069 // OSCSTAT Bits
1071 extern __at(0x009A) __sfr OSCSTAT;
1073 typedef struct
1075 unsigned HFIOFS : 1;
1076 unsigned LFIOFR : 1;
1077 unsigned : 1;
1078 unsigned : 1;
1079 unsigned HFIOFR : 1;
1080 unsigned : 1;
1081 unsigned PLLSR : 1;
1082 unsigned : 1;
1083 } __OSCSTATbits_t;
1085 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1087 #define _HFIOFS 0x01
1088 #define _LFIOFR 0x02
1089 #define _HFIOFR 0x10
1090 #define _PLLSR 0x40
1092 //==============================================================================
1094 extern __at(0x009B) __sfr ADRES;
1095 extern __at(0x009B) __sfr ADRESL;
1096 extern __at(0x009C) __sfr ADRESH;
1098 //==============================================================================
1099 // ADCON0 Bits
1101 extern __at(0x009D) __sfr ADCON0;
1103 typedef union
1105 struct
1107 unsigned ADON : 1;
1108 unsigned GO_NOT_DONE : 1;
1109 unsigned CHS0 : 1;
1110 unsigned CHS1 : 1;
1111 unsigned CHS2 : 1;
1112 unsigned CHS3 : 1;
1113 unsigned CHS4 : 1;
1114 unsigned CHS5 : 1;
1117 struct
1119 unsigned AD1ON : 1;
1120 unsigned ADGO : 1;
1121 unsigned : 1;
1122 unsigned : 1;
1123 unsigned : 1;
1124 unsigned : 1;
1125 unsigned : 1;
1126 unsigned : 1;
1129 struct
1131 unsigned : 1;
1132 unsigned GO : 1;
1133 unsigned : 1;
1134 unsigned : 1;
1135 unsigned : 1;
1136 unsigned : 1;
1137 unsigned : 1;
1138 unsigned : 1;
1141 struct
1143 unsigned : 2;
1144 unsigned CHS : 6;
1146 } __ADCON0bits_t;
1148 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1150 #define _ADCON0_ADON 0x01
1151 #define _ADCON0_AD1ON 0x01
1152 #define _ADCON0_GO_NOT_DONE 0x02
1153 #define _ADCON0_ADGO 0x02
1154 #define _ADCON0_GO 0x02
1155 #define _ADCON0_CHS0 0x04
1156 #define _ADCON0_CHS1 0x08
1157 #define _ADCON0_CHS2 0x10
1158 #define _ADCON0_CHS3 0x20
1159 #define _ADCON0_CHS4 0x40
1160 #define _ADCON0_CHS5 0x80
1162 //==============================================================================
1165 //==============================================================================
1166 // ADCON1 Bits
1168 extern __at(0x009E) __sfr ADCON1;
1170 typedef union
1172 struct
1174 unsigned ADPREF0 : 1;
1175 unsigned ADPREF1 : 1;
1176 unsigned GO_NOT_DONE_ALL : 1;
1177 unsigned ADNREF : 1;
1178 unsigned : 1;
1179 unsigned : 1;
1180 unsigned : 1;
1181 unsigned ADFM : 1;
1184 struct
1186 unsigned : 1;
1187 unsigned : 1;
1188 unsigned GO_ALL : 1;
1189 unsigned : 1;
1190 unsigned : 1;
1191 unsigned : 1;
1192 unsigned : 1;
1193 unsigned : 1;
1196 struct
1198 unsigned ADPREF : 2;
1199 unsigned : 6;
1201 } __ADCON1bits_t;
1203 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1205 #define _ADCON1_ADPREF0 0x01
1206 #define _ADCON1_ADPREF1 0x02
1207 #define _ADCON1_GO_NOT_DONE_ALL 0x04
1208 #define _ADCON1_GO_ALL 0x04
1209 #define _ADCON1_ADNREF 0x08
1210 #define _ADCON1_ADFM 0x80
1212 //==============================================================================
1215 //==============================================================================
1216 // ADCON2 Bits
1218 extern __at(0x009F) __sfr ADCON2;
1220 typedef union
1222 struct
1224 unsigned : 1;
1225 unsigned : 1;
1226 unsigned : 1;
1227 unsigned : 1;
1228 unsigned TRIGSEL0 : 1;
1229 unsigned TRIGSEL1 : 1;
1230 unsigned TRIGSEL2 : 1;
1231 unsigned : 1;
1234 struct
1236 unsigned : 4;
1237 unsigned TRIGSEL : 3;
1238 unsigned : 1;
1240 } __ADCON2bits_t;
1242 extern __at(0x009F) volatile __ADCON2bits_t ADCON2bits;
1244 #define _ADCON2_TRIGSEL0 0x10
1245 #define _ADCON2_TRIGSEL1 0x20
1246 #define _ADCON2_TRIGSEL2 0x40
1248 //==============================================================================
1251 //==============================================================================
1252 // LATA Bits
1254 extern __at(0x010C) __sfr LATA;
1256 typedef struct
1258 unsigned LATA0 : 1;
1259 unsigned LATA1 : 1;
1260 unsigned LATA2 : 1;
1261 unsigned LATA3 : 1;
1262 unsigned LATA4 : 1;
1263 unsigned LATA5 : 1;
1264 unsigned LATA6 : 1;
1265 unsigned LATA7 : 1;
1266 } __LATAbits_t;
1268 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1270 #define _LATA0 0x01
1271 #define _LATA1 0x02
1272 #define _LATA2 0x04
1273 #define _LATA3 0x08
1274 #define _LATA4 0x10
1275 #define _LATA5 0x20
1276 #define _LATA6 0x40
1277 #define _LATA7 0x80
1279 //==============================================================================
1282 //==============================================================================
1283 // LATB Bits
1285 extern __at(0x010D) __sfr LATB;
1287 typedef struct
1289 unsigned LATB0 : 1;
1290 unsigned LATB1 : 1;
1291 unsigned LATB2 : 1;
1292 unsigned LATB3 : 1;
1293 unsigned LATB4 : 1;
1294 unsigned LATB5 : 1;
1295 unsigned LATB6 : 1;
1296 unsigned LATB7 : 1;
1297 } __LATBbits_t;
1299 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1301 #define _LATB0 0x01
1302 #define _LATB1 0x02
1303 #define _LATB2 0x04
1304 #define _LATB3 0x08
1305 #define _LATB4 0x10
1306 #define _LATB5 0x20
1307 #define _LATB6 0x40
1308 #define _LATB7 0x80
1310 //==============================================================================
1313 //==============================================================================
1314 // LATC Bits
1316 extern __at(0x010E) __sfr LATC;
1318 typedef struct
1320 unsigned LATC0 : 1;
1321 unsigned LATC1 : 1;
1322 unsigned LATC2 : 1;
1323 unsigned LATC3 : 1;
1324 unsigned LATC4 : 1;
1325 unsigned LATC5 : 1;
1326 unsigned LATC6 : 1;
1327 unsigned LATC7 : 1;
1328 } __LATCbits_t;
1330 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1332 #define _LATC0 0x01
1333 #define _LATC1 0x02
1334 #define _LATC2 0x04
1335 #define _LATC3 0x08
1336 #define _LATC4 0x10
1337 #define _LATC5 0x20
1338 #define _LATC6 0x40
1339 #define _LATC7 0x80
1341 //==============================================================================
1344 //==============================================================================
1345 // BORCON Bits
1347 extern __at(0x0116) __sfr BORCON;
1349 typedef struct
1351 unsigned BORRDY : 1;
1352 unsigned : 1;
1353 unsigned : 1;
1354 unsigned : 1;
1355 unsigned : 1;
1356 unsigned : 1;
1357 unsigned BORFS : 1;
1358 unsigned SBOREN : 1;
1359 } __BORCONbits_t;
1361 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1363 #define _BORRDY 0x01
1364 #define _BORFS 0x40
1365 #define _SBOREN 0x80
1367 //==============================================================================
1370 //==============================================================================
1371 // FVRCON Bits
1373 extern __at(0x0117) __sfr FVRCON;
1375 typedef union
1377 struct
1379 unsigned ADFVR0 : 1;
1380 unsigned ADFVR1 : 1;
1381 unsigned : 1;
1382 unsigned : 1;
1383 unsigned TSRNG : 1;
1384 unsigned TSEN : 1;
1385 unsigned FVRRDY : 1;
1386 unsigned FVREN : 1;
1389 struct
1391 unsigned ADFVR : 2;
1392 unsigned : 6;
1394 } __FVRCONbits_t;
1396 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1398 #define _ADFVR0 0x01
1399 #define _ADFVR1 0x02
1400 #define _TSRNG 0x10
1401 #define _TSEN 0x20
1402 #define _FVRRDY 0x40
1403 #define _FVREN 0x80
1405 //==============================================================================
1408 //==============================================================================
1409 // APFCON Bits
1411 extern __at(0x011D) __sfr APFCON;
1413 typedef struct
1415 unsigned GRDASEL : 1;
1416 unsigned GRDBSEL : 1;
1417 unsigned : 1;
1418 unsigned : 1;
1419 unsigned : 1;
1420 unsigned SSSEL : 1;
1421 unsigned : 1;
1422 unsigned : 1;
1423 } __APFCONbits_t;
1425 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1427 #define _GRDASEL 0x01
1428 #define _GRDBSEL 0x02
1429 #define _SSSEL 0x20
1431 //==============================================================================
1434 //==============================================================================
1435 // ANSELA Bits
1437 extern __at(0x018C) __sfr ANSELA;
1439 typedef struct
1441 unsigned ANSA0 : 1;
1442 unsigned ANSA1 : 1;
1443 unsigned ANSA2 : 1;
1444 unsigned ANSA3 : 1;
1445 unsigned ANSA4 : 1;
1446 unsigned ANSA5 : 1;
1447 unsigned ANSA6 : 1;
1448 unsigned ANSA7 : 1;
1449 } __ANSELAbits_t;
1451 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1453 #define _ANSA0 0x01
1454 #define _ANSA1 0x02
1455 #define _ANSA2 0x04
1456 #define _ANSA3 0x08
1457 #define _ANSA4 0x10
1458 #define _ANSA5 0x20
1459 #define _ANSA6 0x40
1460 #define _ANSA7 0x80
1462 //==============================================================================
1465 //==============================================================================
1466 // ANSELB Bits
1468 extern __at(0x018D) __sfr ANSELB;
1470 typedef struct
1472 unsigned ANSB0 : 1;
1473 unsigned ANSB1 : 1;
1474 unsigned ANSB2 : 1;
1475 unsigned ANSB3 : 1;
1476 unsigned ANSB4 : 1;
1477 unsigned ANSB5 : 1;
1478 unsigned ANSB6 : 1;
1479 unsigned ANSB7 : 1;
1480 } __ANSELBbits_t;
1482 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1484 #define _ANSB0 0x01
1485 #define _ANSB1 0x02
1486 #define _ANSB2 0x04
1487 #define _ANSB3 0x08
1488 #define _ANSB4 0x10
1489 #define _ANSB5 0x20
1490 #define _ANSB6 0x40
1491 #define _ANSB7 0x80
1493 //==============================================================================
1496 //==============================================================================
1497 // ANSELC Bits
1499 extern __at(0x018E) __sfr ANSELC;
1501 typedef struct
1503 unsigned ANSC0 : 1;
1504 unsigned ANSC1 : 1;
1505 unsigned ANSC2 : 1;
1506 unsigned ANSC3 : 1;
1507 unsigned ANSC4 : 1;
1508 unsigned ANSC5 : 1;
1509 unsigned ANSC6 : 1;
1510 unsigned ANSC7 : 1;
1511 } __ANSELCbits_t;
1513 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1515 #define _ANSC0 0x01
1516 #define _ANSC1 0x02
1517 #define _ANSC2 0x04
1518 #define _ANSC3 0x08
1519 #define _ANSC4 0x10
1520 #define _ANSC5 0x20
1521 #define _ANSC6 0x40
1522 #define _ANSC7 0x80
1524 //==============================================================================
1526 extern __at(0x0191) __sfr PMADR;
1527 extern __at(0x0191) __sfr PMADRL;
1528 extern __at(0x0192) __sfr PMADRH;
1529 extern __at(0x0193) __sfr PMDAT;
1530 extern __at(0x0193) __sfr PMDATL;
1531 extern __at(0x0194) __sfr PMDATH;
1533 //==============================================================================
1534 // PMCON1 Bits
1536 extern __at(0x0195) __sfr PMCON1;
1538 typedef struct
1540 unsigned RD : 1;
1541 unsigned WR : 1;
1542 unsigned WREN : 1;
1543 unsigned WRERR : 1;
1544 unsigned FREE : 1;
1545 unsigned LWLO : 1;
1546 unsigned CFGS : 1;
1547 unsigned : 1;
1548 } __PMCON1bits_t;
1550 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1552 #define _RD 0x01
1553 #define _WR 0x02
1554 #define _WREN 0x04
1555 #define _WRERR 0x08
1556 #define _FREE 0x10
1557 #define _LWLO 0x20
1558 #define _CFGS 0x40
1560 //==============================================================================
1562 extern __at(0x0196) __sfr PMCON2;
1563 extern __at(0x0199) __sfr RCREG;
1564 extern __at(0x019A) __sfr TXREG;
1565 extern __at(0x019B) __sfr SPBRG;
1566 extern __at(0x019B) __sfr SPBRGL;
1567 extern __at(0x019C) __sfr SPBRGH;
1569 //==============================================================================
1570 // RCSTA Bits
1572 extern __at(0x019D) __sfr RCSTA;
1574 typedef struct
1576 unsigned RX9D : 1;
1577 unsigned OERR : 1;
1578 unsigned FERR : 1;
1579 unsigned ADDEN : 1;
1580 unsigned CREN : 1;
1581 unsigned SREN : 1;
1582 unsigned RX9 : 1;
1583 unsigned SPEN : 1;
1584 } __RCSTAbits_t;
1586 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1588 #define _RX9D 0x01
1589 #define _OERR 0x02
1590 #define _FERR 0x04
1591 #define _ADDEN 0x08
1592 #define _CREN 0x10
1593 #define _SREN 0x20
1594 #define _RX9 0x40
1595 #define _SPEN 0x80
1597 //==============================================================================
1600 //==============================================================================
1601 // TXSTA Bits
1603 extern __at(0x019E) __sfr TXSTA;
1605 typedef struct
1607 unsigned TX9D : 1;
1608 unsigned TRMT : 1;
1609 unsigned BRGH : 1;
1610 unsigned SENDB : 1;
1611 unsigned SYNC : 1;
1612 unsigned TXEN : 1;
1613 unsigned TX9 : 1;
1614 unsigned CSRC : 1;
1615 } __TXSTAbits_t;
1617 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
1619 #define _TX9D 0x01
1620 #define _TRMT 0x02
1621 #define _BRGH 0x04
1622 #define _SENDB 0x08
1623 #define _SYNC 0x10
1624 #define _TXEN 0x20
1625 #define _TX9 0x40
1626 #define _CSRC 0x80
1628 //==============================================================================
1631 //==============================================================================
1632 // BAUDCON Bits
1634 extern __at(0x019F) __sfr BAUDCON;
1636 typedef struct
1638 unsigned ABDEN : 1;
1639 unsigned WUE : 1;
1640 unsigned : 1;
1641 unsigned BRG16 : 1;
1642 unsigned SCKP : 1;
1643 unsigned : 1;
1644 unsigned RCIDL : 1;
1645 unsigned ABDOVF : 1;
1646 } __BAUDCONbits_t;
1648 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
1650 #define _ABDEN 0x01
1651 #define _WUE 0x02
1652 #define _BRG16 0x08
1653 #define _SCKP 0x10
1654 #define _RCIDL 0x40
1655 #define _ABDOVF 0x80
1657 //==============================================================================
1660 //==============================================================================
1661 // WPUB Bits
1663 extern __at(0x020D) __sfr WPUB;
1665 typedef struct
1667 unsigned WPUB0 : 1;
1668 unsigned WPUB1 : 1;
1669 unsigned WPUB2 : 1;
1670 unsigned WPUB3 : 1;
1671 unsigned WPUB4 : 1;
1672 unsigned WPUB5 : 1;
1673 unsigned WPUB6 : 1;
1674 unsigned WPUB7 : 1;
1675 } __WPUBbits_t;
1677 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
1679 #define _WPUB0 0x01
1680 #define _WPUB1 0x02
1681 #define _WPUB2 0x04
1682 #define _WPUB3 0x08
1683 #define _WPUB4 0x10
1684 #define _WPUB5 0x20
1685 #define _WPUB6 0x40
1686 #define _WPUB7 0x80
1688 //==============================================================================
1691 //==============================================================================
1692 // WPUE Bits
1694 extern __at(0x0210) __sfr WPUE;
1696 typedef struct
1698 unsigned : 1;
1699 unsigned : 1;
1700 unsigned : 1;
1701 unsigned WPUE3 : 1;
1702 unsigned : 1;
1703 unsigned : 1;
1704 unsigned : 1;
1705 unsigned : 1;
1706 } __WPUEbits_t;
1708 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
1710 #define _WPUE3 0x08
1712 //==============================================================================
1715 //==============================================================================
1716 // SSP1BUF Bits
1718 extern __at(0x0211) __sfr SSP1BUF;
1720 typedef union
1722 struct
1724 unsigned SSP1BUF0 : 1;
1725 unsigned SSP1BUF1 : 1;
1726 unsigned SSP1BUF2 : 1;
1727 unsigned SSP1BUF3 : 1;
1728 unsigned SSP1BUF4 : 1;
1729 unsigned SSP1BUF5 : 1;
1730 unsigned SSP1BUF6 : 1;
1731 unsigned SSP1BUF7 : 1;
1734 struct
1736 unsigned BUF0 : 1;
1737 unsigned BUF1 : 1;
1738 unsigned BUF2 : 1;
1739 unsigned BUF3 : 1;
1740 unsigned BUF4 : 1;
1741 unsigned BUF5 : 1;
1742 unsigned BUF6 : 1;
1743 unsigned BUF7 : 1;
1745 } __SSP1BUFbits_t;
1747 extern __at(0x0211) volatile __SSP1BUFbits_t SSP1BUFbits;
1749 #define _SSP1BUF0 0x01
1750 #define _BUF0 0x01
1751 #define _SSP1BUF1 0x02
1752 #define _BUF1 0x02
1753 #define _SSP1BUF2 0x04
1754 #define _BUF2 0x04
1755 #define _SSP1BUF3 0x08
1756 #define _BUF3 0x08
1757 #define _SSP1BUF4 0x10
1758 #define _BUF4 0x10
1759 #define _SSP1BUF5 0x20
1760 #define _BUF5 0x20
1761 #define _SSP1BUF6 0x40
1762 #define _BUF6 0x40
1763 #define _SSP1BUF7 0x80
1764 #define _BUF7 0x80
1766 //==============================================================================
1769 //==============================================================================
1770 // SSPBUF Bits
1772 extern __at(0x0211) __sfr SSPBUF;
1774 typedef union
1776 struct
1778 unsigned SSP1BUF0 : 1;
1779 unsigned SSP1BUF1 : 1;
1780 unsigned SSP1BUF2 : 1;
1781 unsigned SSP1BUF3 : 1;
1782 unsigned SSP1BUF4 : 1;
1783 unsigned SSP1BUF5 : 1;
1784 unsigned SSP1BUF6 : 1;
1785 unsigned SSP1BUF7 : 1;
1788 struct
1790 unsigned BUF0 : 1;
1791 unsigned BUF1 : 1;
1792 unsigned BUF2 : 1;
1793 unsigned BUF3 : 1;
1794 unsigned BUF4 : 1;
1795 unsigned BUF5 : 1;
1796 unsigned BUF6 : 1;
1797 unsigned BUF7 : 1;
1799 } __SSPBUFbits_t;
1801 extern __at(0x0211) volatile __SSPBUFbits_t SSPBUFbits;
1803 #define _SSPBUF_SSP1BUF0 0x01
1804 #define _SSPBUF_BUF0 0x01
1805 #define _SSPBUF_SSP1BUF1 0x02
1806 #define _SSPBUF_BUF1 0x02
1807 #define _SSPBUF_SSP1BUF2 0x04
1808 #define _SSPBUF_BUF2 0x04
1809 #define _SSPBUF_SSP1BUF3 0x08
1810 #define _SSPBUF_BUF3 0x08
1811 #define _SSPBUF_SSP1BUF4 0x10
1812 #define _SSPBUF_BUF4 0x10
1813 #define _SSPBUF_SSP1BUF5 0x20
1814 #define _SSPBUF_BUF5 0x20
1815 #define _SSPBUF_SSP1BUF6 0x40
1816 #define _SSPBUF_BUF6 0x40
1817 #define _SSPBUF_SSP1BUF7 0x80
1818 #define _SSPBUF_BUF7 0x80
1820 //==============================================================================
1823 //==============================================================================
1824 // SSP1ADD Bits
1826 extern __at(0x0212) __sfr SSP1ADD;
1828 typedef union
1830 struct
1832 unsigned SSP1ADD0 : 1;
1833 unsigned SSP1ADD1 : 1;
1834 unsigned SSP1ADD2 : 1;
1835 unsigned SSP1ADD3 : 1;
1836 unsigned SSP1ADD4 : 1;
1837 unsigned SSP1ADD5 : 1;
1838 unsigned SSP1ADD6 : 1;
1839 unsigned SSP1ADD7 : 1;
1842 struct
1844 unsigned ADD0 : 1;
1845 unsigned ADD1 : 1;
1846 unsigned ADD2 : 1;
1847 unsigned ADD3 : 1;
1848 unsigned ADD4 : 1;
1849 unsigned ADD5 : 1;
1850 unsigned ADD6 : 1;
1851 unsigned ADD7 : 1;
1853 } __SSP1ADDbits_t;
1855 extern __at(0x0212) volatile __SSP1ADDbits_t SSP1ADDbits;
1857 #define _SSP1ADD0 0x01
1858 #define _ADD0 0x01
1859 #define _SSP1ADD1 0x02
1860 #define _ADD1 0x02
1861 #define _SSP1ADD2 0x04
1862 #define _ADD2 0x04
1863 #define _SSP1ADD3 0x08
1864 #define _ADD3 0x08
1865 #define _SSP1ADD4 0x10
1866 #define _ADD4 0x10
1867 #define _SSP1ADD5 0x20
1868 #define _ADD5 0x20
1869 #define _SSP1ADD6 0x40
1870 #define _ADD6 0x40
1871 #define _SSP1ADD7 0x80
1872 #define _ADD7 0x80
1874 //==============================================================================
1877 //==============================================================================
1878 // SSPADD Bits
1880 extern __at(0x0212) __sfr SSPADD;
1882 typedef union
1884 struct
1886 unsigned SSP1ADD0 : 1;
1887 unsigned SSP1ADD1 : 1;
1888 unsigned SSP1ADD2 : 1;
1889 unsigned SSP1ADD3 : 1;
1890 unsigned SSP1ADD4 : 1;
1891 unsigned SSP1ADD5 : 1;
1892 unsigned SSP1ADD6 : 1;
1893 unsigned SSP1ADD7 : 1;
1896 struct
1898 unsigned ADD0 : 1;
1899 unsigned ADD1 : 1;
1900 unsigned ADD2 : 1;
1901 unsigned ADD3 : 1;
1902 unsigned ADD4 : 1;
1903 unsigned ADD5 : 1;
1904 unsigned ADD6 : 1;
1905 unsigned ADD7 : 1;
1907 } __SSPADDbits_t;
1909 extern __at(0x0212) volatile __SSPADDbits_t SSPADDbits;
1911 #define _SSPADD_SSP1ADD0 0x01
1912 #define _SSPADD_ADD0 0x01
1913 #define _SSPADD_SSP1ADD1 0x02
1914 #define _SSPADD_ADD1 0x02
1915 #define _SSPADD_SSP1ADD2 0x04
1916 #define _SSPADD_ADD2 0x04
1917 #define _SSPADD_SSP1ADD3 0x08
1918 #define _SSPADD_ADD3 0x08
1919 #define _SSPADD_SSP1ADD4 0x10
1920 #define _SSPADD_ADD4 0x10
1921 #define _SSPADD_SSP1ADD5 0x20
1922 #define _SSPADD_ADD5 0x20
1923 #define _SSPADD_SSP1ADD6 0x40
1924 #define _SSPADD_ADD6 0x40
1925 #define _SSPADD_SSP1ADD7 0x80
1926 #define _SSPADD_ADD7 0x80
1928 //==============================================================================
1931 //==============================================================================
1932 // SSP1MSK Bits
1934 extern __at(0x0213) __sfr SSP1MSK;
1936 typedef union
1938 struct
1940 unsigned SSP1MSK0 : 1;
1941 unsigned SSP1MSK1 : 1;
1942 unsigned SSP1MSK2 : 1;
1943 unsigned SSP1MSK3 : 1;
1944 unsigned SSP1MSK4 : 1;
1945 unsigned SSP1MSK5 : 1;
1946 unsigned SSP1MSK6 : 1;
1947 unsigned SSP1MSK7 : 1;
1950 struct
1952 unsigned MSK0 : 1;
1953 unsigned MSK1 : 1;
1954 unsigned MSK2 : 1;
1955 unsigned MSK3 : 1;
1956 unsigned MSK4 : 1;
1957 unsigned MSK5 : 1;
1958 unsigned MSK6 : 1;
1959 unsigned MSK7 : 1;
1961 } __SSP1MSKbits_t;
1963 extern __at(0x0213) volatile __SSP1MSKbits_t SSP1MSKbits;
1965 #define _SSP1MSK0 0x01
1966 #define _MSK0 0x01
1967 #define _SSP1MSK1 0x02
1968 #define _MSK1 0x02
1969 #define _SSP1MSK2 0x04
1970 #define _MSK2 0x04
1971 #define _SSP1MSK3 0x08
1972 #define _MSK3 0x08
1973 #define _SSP1MSK4 0x10
1974 #define _MSK4 0x10
1975 #define _SSP1MSK5 0x20
1976 #define _MSK5 0x20
1977 #define _SSP1MSK6 0x40
1978 #define _MSK6 0x40
1979 #define _SSP1MSK7 0x80
1980 #define _MSK7 0x80
1982 //==============================================================================
1985 //==============================================================================
1986 // SSPMSK Bits
1988 extern __at(0x0213) __sfr SSPMSK;
1990 typedef union
1992 struct
1994 unsigned SSP1MSK0 : 1;
1995 unsigned SSP1MSK1 : 1;
1996 unsigned SSP1MSK2 : 1;
1997 unsigned SSP1MSK3 : 1;
1998 unsigned SSP1MSK4 : 1;
1999 unsigned SSP1MSK5 : 1;
2000 unsigned SSP1MSK6 : 1;
2001 unsigned SSP1MSK7 : 1;
2004 struct
2006 unsigned MSK0 : 1;
2007 unsigned MSK1 : 1;
2008 unsigned MSK2 : 1;
2009 unsigned MSK3 : 1;
2010 unsigned MSK4 : 1;
2011 unsigned MSK5 : 1;
2012 unsigned MSK6 : 1;
2013 unsigned MSK7 : 1;
2015 } __SSPMSKbits_t;
2017 extern __at(0x0213) volatile __SSPMSKbits_t SSPMSKbits;
2019 #define _SSPMSK_SSP1MSK0 0x01
2020 #define _SSPMSK_MSK0 0x01
2021 #define _SSPMSK_SSP1MSK1 0x02
2022 #define _SSPMSK_MSK1 0x02
2023 #define _SSPMSK_SSP1MSK2 0x04
2024 #define _SSPMSK_MSK2 0x04
2025 #define _SSPMSK_SSP1MSK3 0x08
2026 #define _SSPMSK_MSK3 0x08
2027 #define _SSPMSK_SSP1MSK4 0x10
2028 #define _SSPMSK_MSK4 0x10
2029 #define _SSPMSK_SSP1MSK5 0x20
2030 #define _SSPMSK_MSK5 0x20
2031 #define _SSPMSK_SSP1MSK6 0x40
2032 #define _SSPMSK_MSK6 0x40
2033 #define _SSPMSK_SSP1MSK7 0x80
2034 #define _SSPMSK_MSK7 0x80
2036 //==============================================================================
2039 //==============================================================================
2040 // SSP1STAT Bits
2042 extern __at(0x0214) __sfr SSP1STAT;
2044 typedef struct
2046 unsigned BF : 1;
2047 unsigned UA : 1;
2048 unsigned R_NOT_W : 1;
2049 unsigned S : 1;
2050 unsigned P : 1;
2051 unsigned D_NOT_A : 1;
2052 unsigned CKE : 1;
2053 unsigned SMP : 1;
2054 } __SSP1STATbits_t;
2056 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2058 #define _BF 0x01
2059 #define _UA 0x02
2060 #define _R_NOT_W 0x04
2061 #define _S 0x08
2062 #define _P 0x10
2063 #define _D_NOT_A 0x20
2064 #define _CKE 0x40
2065 #define _SMP 0x80
2067 //==============================================================================
2070 //==============================================================================
2071 // SSPSTAT Bits
2073 extern __at(0x0214) __sfr SSPSTAT;
2075 typedef struct
2077 unsigned BF : 1;
2078 unsigned UA : 1;
2079 unsigned R_NOT_W : 1;
2080 unsigned S : 1;
2081 unsigned P : 1;
2082 unsigned D_NOT_A : 1;
2083 unsigned CKE : 1;
2084 unsigned SMP : 1;
2085 } __SSPSTATbits_t;
2087 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2089 #define _SSPSTAT_BF 0x01
2090 #define _SSPSTAT_UA 0x02
2091 #define _SSPSTAT_R_NOT_W 0x04
2092 #define _SSPSTAT_S 0x08
2093 #define _SSPSTAT_P 0x10
2094 #define _SSPSTAT_D_NOT_A 0x20
2095 #define _SSPSTAT_CKE 0x40
2096 #define _SSPSTAT_SMP 0x80
2098 //==============================================================================
2101 //==============================================================================
2102 // SSP1CON Bits
2104 extern __at(0x0215) __sfr SSP1CON;
2106 typedef union
2108 struct
2110 unsigned SSPM0 : 1;
2111 unsigned SSPM1 : 1;
2112 unsigned SSPM2 : 1;
2113 unsigned SSPM3 : 1;
2114 unsigned CKP : 1;
2115 unsigned SSPEN : 1;
2116 unsigned SSPOV : 1;
2117 unsigned WCOL : 1;
2120 struct
2122 unsigned SSPM : 4;
2123 unsigned : 4;
2125 } __SSP1CONbits_t;
2127 extern __at(0x0215) volatile __SSP1CONbits_t SSP1CONbits;
2129 #define _SSPM0 0x01
2130 #define _SSPM1 0x02
2131 #define _SSPM2 0x04
2132 #define _SSPM3 0x08
2133 #define _CKP 0x10
2134 #define _SSPEN 0x20
2135 #define _SSPOV 0x40
2136 #define _WCOL 0x80
2138 //==============================================================================
2141 //==============================================================================
2142 // SSP1CON1 Bits
2144 extern __at(0x0215) __sfr SSP1CON1;
2146 typedef union
2148 struct
2150 unsigned SSPM0 : 1;
2151 unsigned SSPM1 : 1;
2152 unsigned SSPM2 : 1;
2153 unsigned SSPM3 : 1;
2154 unsigned CKP : 1;
2155 unsigned SSPEN : 1;
2156 unsigned SSPOV : 1;
2157 unsigned WCOL : 1;
2160 struct
2162 unsigned SSPM : 4;
2163 unsigned : 4;
2165 } __SSP1CON1bits_t;
2167 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2169 #define _SSP1CON1_SSPM0 0x01
2170 #define _SSP1CON1_SSPM1 0x02
2171 #define _SSP1CON1_SSPM2 0x04
2172 #define _SSP1CON1_SSPM3 0x08
2173 #define _SSP1CON1_CKP 0x10
2174 #define _SSP1CON1_SSPEN 0x20
2175 #define _SSP1CON1_SSPOV 0x40
2176 #define _SSP1CON1_WCOL 0x80
2178 //==============================================================================
2181 //==============================================================================
2182 // SSPCON Bits
2184 extern __at(0x0215) __sfr SSPCON;
2186 typedef union
2188 struct
2190 unsigned SSPM0 : 1;
2191 unsigned SSPM1 : 1;
2192 unsigned SSPM2 : 1;
2193 unsigned SSPM3 : 1;
2194 unsigned CKP : 1;
2195 unsigned SSPEN : 1;
2196 unsigned SSPOV : 1;
2197 unsigned WCOL : 1;
2200 struct
2202 unsigned SSPM : 4;
2203 unsigned : 4;
2205 } __SSPCONbits_t;
2207 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2209 #define _SSPCON_SSPM0 0x01
2210 #define _SSPCON_SSPM1 0x02
2211 #define _SSPCON_SSPM2 0x04
2212 #define _SSPCON_SSPM3 0x08
2213 #define _SSPCON_CKP 0x10
2214 #define _SSPCON_SSPEN 0x20
2215 #define _SSPCON_SSPOV 0x40
2216 #define _SSPCON_WCOL 0x80
2218 //==============================================================================
2221 //==============================================================================
2222 // SSPCON1 Bits
2224 extern __at(0x0215) __sfr SSPCON1;
2226 typedef union
2228 struct
2230 unsigned SSPM0 : 1;
2231 unsigned SSPM1 : 1;
2232 unsigned SSPM2 : 1;
2233 unsigned SSPM3 : 1;
2234 unsigned CKP : 1;
2235 unsigned SSPEN : 1;
2236 unsigned SSPOV : 1;
2237 unsigned WCOL : 1;
2240 struct
2242 unsigned SSPM : 4;
2243 unsigned : 4;
2245 } __SSPCON1bits_t;
2247 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2249 #define _SSPCON1_SSPM0 0x01
2250 #define _SSPCON1_SSPM1 0x02
2251 #define _SSPCON1_SSPM2 0x04
2252 #define _SSPCON1_SSPM3 0x08
2253 #define _SSPCON1_CKP 0x10
2254 #define _SSPCON1_SSPEN 0x20
2255 #define _SSPCON1_SSPOV 0x40
2256 #define _SSPCON1_WCOL 0x80
2258 //==============================================================================
2261 //==============================================================================
2262 // SSP1CON2 Bits
2264 extern __at(0x0216) __sfr SSP1CON2;
2266 typedef struct
2268 unsigned SEN : 1;
2269 unsigned RSEN : 1;
2270 unsigned PEN : 1;
2271 unsigned RCEN : 1;
2272 unsigned ACKEN : 1;
2273 unsigned ACKDT : 1;
2274 unsigned ACKSTAT : 1;
2275 unsigned GCEN : 1;
2276 } __SSP1CON2bits_t;
2278 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2280 #define _SEN 0x01
2281 #define _RSEN 0x02
2282 #define _PEN 0x04
2283 #define _RCEN 0x08
2284 #define _ACKEN 0x10
2285 #define _ACKDT 0x20
2286 #define _ACKSTAT 0x40
2287 #define _GCEN 0x80
2289 //==============================================================================
2292 //==============================================================================
2293 // SSPCON2 Bits
2295 extern __at(0x0216) __sfr SSPCON2;
2297 typedef struct
2299 unsigned SEN : 1;
2300 unsigned RSEN : 1;
2301 unsigned PEN : 1;
2302 unsigned RCEN : 1;
2303 unsigned ACKEN : 1;
2304 unsigned ACKDT : 1;
2305 unsigned ACKSTAT : 1;
2306 unsigned GCEN : 1;
2307 } __SSPCON2bits_t;
2309 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2311 #define _SSPCON2_SEN 0x01
2312 #define _SSPCON2_RSEN 0x02
2313 #define _SSPCON2_PEN 0x04
2314 #define _SSPCON2_RCEN 0x08
2315 #define _SSPCON2_ACKEN 0x10
2316 #define _SSPCON2_ACKDT 0x20
2317 #define _SSPCON2_ACKSTAT 0x40
2318 #define _SSPCON2_GCEN 0x80
2320 //==============================================================================
2323 //==============================================================================
2324 // SSP1CON3 Bits
2326 extern __at(0x0217) __sfr SSP1CON3;
2328 typedef struct
2330 unsigned DHEN : 1;
2331 unsigned AHEN : 1;
2332 unsigned SBCDE : 1;
2333 unsigned SDAHT : 1;
2334 unsigned BOEN : 1;
2335 unsigned SCIE : 1;
2336 unsigned PCIE : 1;
2337 unsigned ACKTIM : 1;
2338 } __SSP1CON3bits_t;
2340 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2342 #define _DHEN 0x01
2343 #define _AHEN 0x02
2344 #define _SBCDE 0x04
2345 #define _SDAHT 0x08
2346 #define _BOEN 0x10
2347 #define _SCIE 0x20
2348 #define _PCIE 0x40
2349 #define _ACKTIM 0x80
2351 //==============================================================================
2354 //==============================================================================
2355 // SSPCON3 Bits
2357 extern __at(0x0217) __sfr SSPCON3;
2359 typedef struct
2361 unsigned DHEN : 1;
2362 unsigned AHEN : 1;
2363 unsigned SBCDE : 1;
2364 unsigned SDAHT : 1;
2365 unsigned BOEN : 1;
2366 unsigned SCIE : 1;
2367 unsigned PCIE : 1;
2368 unsigned ACKTIM : 1;
2369 } __SSPCON3bits_t;
2371 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2373 #define _SSPCON3_DHEN 0x01
2374 #define _SSPCON3_AHEN 0x02
2375 #define _SSPCON3_SBCDE 0x04
2376 #define _SSPCON3_SDAHT 0x08
2377 #define _SSPCON3_BOEN 0x10
2378 #define _SSPCON3_SCIE 0x20
2379 #define _SSPCON3_PCIE 0x40
2380 #define _SSPCON3_ACKTIM 0x80
2382 //==============================================================================
2385 //==============================================================================
2386 // SSPLVL Bits
2388 extern __at(0x0218) __sfr SSPLVL;
2390 typedef struct
2392 unsigned S1ILS : 1;
2393 unsigned : 1;
2394 unsigned : 1;
2395 unsigned : 1;
2396 unsigned S2ILS : 1;
2397 unsigned : 1;
2398 unsigned : 1;
2399 unsigned : 1;
2400 } __SSPLVLbits_t;
2402 extern __at(0x0218) volatile __SSPLVLbits_t SSPLVLbits;
2404 #define _S1ILS 0x01
2405 #define _S2ILS 0x10
2407 //==============================================================================
2410 //==============================================================================
2411 // SSP2BUF Bits
2413 extern __at(0x0219) __sfr SSP2BUF;
2415 typedef union
2417 struct
2419 unsigned SSP2BUF0 : 1;
2420 unsigned SSP2BUF1 : 1;
2421 unsigned SSP2BUF2 : 1;
2422 unsigned SSP2BUF3 : 1;
2423 unsigned SSP2BUF4 : 1;
2424 unsigned SSP2BUF5 : 1;
2425 unsigned SSP2BUF6 : 1;
2426 unsigned SSP2BUF7 : 1;
2429 struct
2431 unsigned BUF0 : 1;
2432 unsigned BUF1 : 1;
2433 unsigned BUF2 : 1;
2434 unsigned BUF3 : 1;
2435 unsigned BUF4 : 1;
2436 unsigned BUF5 : 1;
2437 unsigned BUF6 : 1;
2438 unsigned BUF7 : 1;
2440 } __SSP2BUFbits_t;
2442 extern __at(0x0219) volatile __SSP2BUFbits_t SSP2BUFbits;
2444 #define _SSP2BUF_SSP2BUF0 0x01
2445 #define _SSP2BUF_BUF0 0x01
2446 #define _SSP2BUF_SSP2BUF1 0x02
2447 #define _SSP2BUF_BUF1 0x02
2448 #define _SSP2BUF_SSP2BUF2 0x04
2449 #define _SSP2BUF_BUF2 0x04
2450 #define _SSP2BUF_SSP2BUF3 0x08
2451 #define _SSP2BUF_BUF3 0x08
2452 #define _SSP2BUF_SSP2BUF4 0x10
2453 #define _SSP2BUF_BUF4 0x10
2454 #define _SSP2BUF_SSP2BUF5 0x20
2455 #define _SSP2BUF_BUF5 0x20
2456 #define _SSP2BUF_SSP2BUF6 0x40
2457 #define _SSP2BUF_BUF6 0x40
2458 #define _SSP2BUF_SSP2BUF7 0x80
2459 #define _SSP2BUF_BUF7 0x80
2461 //==============================================================================
2464 //==============================================================================
2465 // SSP2ADD Bits
2467 extern __at(0x021A) __sfr SSP2ADD;
2469 typedef union
2471 struct
2473 unsigned SSP2ADD0 : 1;
2474 unsigned SSP2ADD1 : 1;
2475 unsigned SSP2ADD2 : 1;
2476 unsigned SSP2ADD3 : 1;
2477 unsigned SSP2ADD4 : 1;
2478 unsigned SSP2ADD5 : 1;
2479 unsigned SSP2ADD6 : 1;
2480 unsigned SSP2ADD7 : 1;
2483 struct
2485 unsigned ADD0 : 1;
2486 unsigned ADD1 : 1;
2487 unsigned ADD2 : 1;
2488 unsigned ADD3 : 1;
2489 unsigned ADD4 : 1;
2490 unsigned ADD5 : 1;
2491 unsigned ADD6 : 1;
2492 unsigned ADD7 : 1;
2494 } __SSP2ADDbits_t;
2496 extern __at(0x021A) volatile __SSP2ADDbits_t SSP2ADDbits;
2498 #define _SSP2ADD_SSP2ADD0 0x01
2499 #define _SSP2ADD_ADD0 0x01
2500 #define _SSP2ADD_SSP2ADD1 0x02
2501 #define _SSP2ADD_ADD1 0x02
2502 #define _SSP2ADD_SSP2ADD2 0x04
2503 #define _SSP2ADD_ADD2 0x04
2504 #define _SSP2ADD_SSP2ADD3 0x08
2505 #define _SSP2ADD_ADD3 0x08
2506 #define _SSP2ADD_SSP2ADD4 0x10
2507 #define _SSP2ADD_ADD4 0x10
2508 #define _SSP2ADD_SSP2ADD5 0x20
2509 #define _SSP2ADD_ADD5 0x20
2510 #define _SSP2ADD_SSP2ADD6 0x40
2511 #define _SSP2ADD_ADD6 0x40
2512 #define _SSP2ADD_SSP2ADD7 0x80
2513 #define _SSP2ADD_ADD7 0x80
2515 //==============================================================================
2518 //==============================================================================
2519 // SSP2MSK Bits
2521 extern __at(0x021B) __sfr SSP2MSK;
2523 typedef union
2525 struct
2527 unsigned SSP2MSK0 : 1;
2528 unsigned SSP2MSK1 : 1;
2529 unsigned SSP2MSK2 : 1;
2530 unsigned SSP2MSK3 : 1;
2531 unsigned SSP2MSK4 : 1;
2532 unsigned SSP2MSK5 : 1;
2533 unsigned SSP2MSK6 : 1;
2534 unsigned SSP2MSK7 : 1;
2537 struct
2539 unsigned MSK0 : 1;
2540 unsigned MSK1 : 1;
2541 unsigned MSK2 : 1;
2542 unsigned MSK3 : 1;
2543 unsigned MSK4 : 1;
2544 unsigned MSK5 : 1;
2545 unsigned MSK6 : 1;
2546 unsigned MSK7 : 1;
2548 } __SSP2MSKbits_t;
2550 extern __at(0x021B) volatile __SSP2MSKbits_t SSP2MSKbits;
2552 #define _SSP2MSK_SSP2MSK0 0x01
2553 #define _SSP2MSK_MSK0 0x01
2554 #define _SSP2MSK_SSP2MSK1 0x02
2555 #define _SSP2MSK_MSK1 0x02
2556 #define _SSP2MSK_SSP2MSK2 0x04
2557 #define _SSP2MSK_MSK2 0x04
2558 #define _SSP2MSK_SSP2MSK3 0x08
2559 #define _SSP2MSK_MSK3 0x08
2560 #define _SSP2MSK_SSP2MSK4 0x10
2561 #define _SSP2MSK_MSK4 0x10
2562 #define _SSP2MSK_SSP2MSK5 0x20
2563 #define _SSP2MSK_MSK5 0x20
2564 #define _SSP2MSK_SSP2MSK6 0x40
2565 #define _SSP2MSK_MSK6 0x40
2566 #define _SSP2MSK_SSP2MSK7 0x80
2567 #define _SSP2MSK_MSK7 0x80
2569 //==============================================================================
2572 //==============================================================================
2573 // SSP2STAT Bits
2575 extern __at(0x021C) __sfr SSP2STAT;
2577 typedef struct
2579 unsigned BF : 1;
2580 unsigned UA : 1;
2581 unsigned R_NOT_W : 1;
2582 unsigned S : 1;
2583 unsigned P : 1;
2584 unsigned D_NOT_A : 1;
2585 unsigned CKE : 1;
2586 unsigned SMP : 1;
2587 } __SSP2STATbits_t;
2589 extern __at(0x021C) volatile __SSP2STATbits_t SSP2STATbits;
2591 #define _SSP2STAT_BF 0x01
2592 #define _SSP2STAT_UA 0x02
2593 #define _SSP2STAT_R_NOT_W 0x04
2594 #define _SSP2STAT_S 0x08
2595 #define _SSP2STAT_P 0x10
2596 #define _SSP2STAT_D_NOT_A 0x20
2597 #define _SSP2STAT_CKE 0x40
2598 #define _SSP2STAT_SMP 0x80
2600 //==============================================================================
2603 //==============================================================================
2604 // SSP2CON Bits
2606 extern __at(0x021D) __sfr SSP2CON;
2608 typedef union
2610 struct
2612 unsigned SSPM0 : 1;
2613 unsigned SSPM1 : 1;
2614 unsigned SSPM2 : 1;
2615 unsigned SSPM3 : 1;
2616 unsigned CKP : 1;
2617 unsigned SSPEN : 1;
2618 unsigned SSPOV : 1;
2619 unsigned WCOL : 1;
2622 struct
2624 unsigned SSPM : 4;
2625 unsigned : 4;
2627 } __SSP2CONbits_t;
2629 extern __at(0x021D) volatile __SSP2CONbits_t SSP2CONbits;
2631 #define _SSP2CON_SSPM0 0x01
2632 #define _SSP2CON_SSPM1 0x02
2633 #define _SSP2CON_SSPM2 0x04
2634 #define _SSP2CON_SSPM3 0x08
2635 #define _SSP2CON_CKP 0x10
2636 #define _SSP2CON_SSPEN 0x20
2637 #define _SSP2CON_SSPOV 0x40
2638 #define _SSP2CON_WCOL 0x80
2640 //==============================================================================
2643 //==============================================================================
2644 // SSP2CON1 Bits
2646 extern __at(0x021D) __sfr SSP2CON1;
2648 typedef union
2650 struct
2652 unsigned SSPM0 : 1;
2653 unsigned SSPM1 : 1;
2654 unsigned SSPM2 : 1;
2655 unsigned SSPM3 : 1;
2656 unsigned CKP : 1;
2657 unsigned SSPEN : 1;
2658 unsigned SSPOV : 1;
2659 unsigned WCOL : 1;
2662 struct
2664 unsigned SSPM : 4;
2665 unsigned : 4;
2667 } __SSP2CON1bits_t;
2669 extern __at(0x021D) volatile __SSP2CON1bits_t SSP2CON1bits;
2671 #define _SSP2CON1_SSPM0 0x01
2672 #define _SSP2CON1_SSPM1 0x02
2673 #define _SSP2CON1_SSPM2 0x04
2674 #define _SSP2CON1_SSPM3 0x08
2675 #define _SSP2CON1_CKP 0x10
2676 #define _SSP2CON1_SSPEN 0x20
2677 #define _SSP2CON1_SSPOV 0x40
2678 #define _SSP2CON1_WCOL 0x80
2680 //==============================================================================
2683 //==============================================================================
2684 // SSP2CON2 Bits
2686 extern __at(0x021E) __sfr SSP2CON2;
2688 typedef struct
2690 unsigned SEN : 1;
2691 unsigned RSEN : 1;
2692 unsigned PEN : 1;
2693 unsigned RCEN : 1;
2694 unsigned ACKEN : 1;
2695 unsigned ACKDT : 1;
2696 unsigned ACKSTAT : 1;
2697 unsigned GCEN : 1;
2698 } __SSP2CON2bits_t;
2700 extern __at(0x021E) volatile __SSP2CON2bits_t SSP2CON2bits;
2702 #define _SSP2CON2_SEN 0x01
2703 #define _SSP2CON2_RSEN 0x02
2704 #define _SSP2CON2_PEN 0x04
2705 #define _SSP2CON2_RCEN 0x08
2706 #define _SSP2CON2_ACKEN 0x10
2707 #define _SSP2CON2_ACKDT 0x20
2708 #define _SSP2CON2_ACKSTAT 0x40
2709 #define _SSP2CON2_GCEN 0x80
2711 //==============================================================================
2714 //==============================================================================
2715 // SSP2CON3 Bits
2717 extern __at(0x021F) __sfr SSP2CON3;
2719 typedef struct
2721 unsigned DHEN : 1;
2722 unsigned AHEN : 1;
2723 unsigned SBCDE : 1;
2724 unsigned SDAHT : 1;
2725 unsigned BOEN : 1;
2726 unsigned SCIE : 1;
2727 unsigned PCIE : 1;
2728 unsigned ACKTIM : 1;
2729 } __SSP2CON3bits_t;
2731 extern __at(0x021F) volatile __SSP2CON3bits_t SSP2CON3bits;
2733 #define _SSP2CON3_DHEN 0x01
2734 #define _SSP2CON3_AHEN 0x02
2735 #define _SSP2CON3_SBCDE 0x04
2736 #define _SSP2CON3_SDAHT 0x08
2737 #define _SSP2CON3_BOEN 0x10
2738 #define _SSP2CON3_SCIE 0x20
2739 #define _SSP2CON3_PCIE 0x40
2740 #define _SSP2CON3_ACKTIM 0x80
2742 //==============================================================================
2745 //==============================================================================
2746 // IOCBP Bits
2748 extern __at(0x0394) __sfr IOCBP;
2750 typedef struct
2752 unsigned IOCBP0 : 1;
2753 unsigned IOCBP1 : 1;
2754 unsigned IOCBP2 : 1;
2755 unsigned IOCBP3 : 1;
2756 unsigned IOCBP4 : 1;
2757 unsigned IOCBP5 : 1;
2758 unsigned IOCBP6 : 1;
2759 unsigned IOCBP7 : 1;
2760 } __IOCBPbits_t;
2762 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
2764 #define _IOCBP0 0x01
2765 #define _IOCBP1 0x02
2766 #define _IOCBP2 0x04
2767 #define _IOCBP3 0x08
2768 #define _IOCBP4 0x10
2769 #define _IOCBP5 0x20
2770 #define _IOCBP6 0x40
2771 #define _IOCBP7 0x80
2773 //==============================================================================
2776 //==============================================================================
2777 // IOCBN Bits
2779 extern __at(0x0395) __sfr IOCBN;
2781 typedef struct
2783 unsigned IOCBN0 : 1;
2784 unsigned IOCBN1 : 1;
2785 unsigned IOCBN2 : 1;
2786 unsigned IOCBN3 : 1;
2787 unsigned IOCBN4 : 1;
2788 unsigned IOCBN5 : 1;
2789 unsigned IOCBN6 : 1;
2790 unsigned IOCBN7 : 1;
2791 } __IOCBNbits_t;
2793 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
2795 #define _IOCBN0 0x01
2796 #define _IOCBN1 0x02
2797 #define _IOCBN2 0x04
2798 #define _IOCBN3 0x08
2799 #define _IOCBN4 0x10
2800 #define _IOCBN5 0x20
2801 #define _IOCBN6 0x40
2802 #define _IOCBN7 0x80
2804 //==============================================================================
2807 //==============================================================================
2808 // IOCBF Bits
2810 extern __at(0x0396) __sfr IOCBF;
2812 typedef struct
2814 unsigned IOCBF0 : 1;
2815 unsigned IOCBF1 : 1;
2816 unsigned IOCBF2 : 1;
2817 unsigned IOCBF3 : 1;
2818 unsigned IOCBF4 : 1;
2819 unsigned IOCBF5 : 1;
2820 unsigned IOCBF6 : 1;
2821 unsigned IOCBF7 : 1;
2822 } __IOCBFbits_t;
2824 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
2826 #define _IOCBF0 0x01
2827 #define _IOCBF1 0x02
2828 #define _IOCBF2 0x04
2829 #define _IOCBF3 0x08
2830 #define _IOCBF4 0x10
2831 #define _IOCBF5 0x20
2832 #define _IOCBF6 0x40
2833 #define _IOCBF7 0x80
2835 //==============================================================================
2837 extern __at(0x0415) __sfr TMR4;
2838 extern __at(0x0416) __sfr PR4;
2840 //==============================================================================
2841 // T4CON Bits
2843 extern __at(0x0417) __sfr T4CON;
2845 typedef union
2847 struct
2849 unsigned T4CKPS0 : 1;
2850 unsigned T4CKPS1 : 1;
2851 unsigned TMR4ON : 1;
2852 unsigned T4OUTPS0 : 1;
2853 unsigned T4OUTPS1 : 1;
2854 unsigned T4OUTPS2 : 1;
2855 unsigned T4OUTPS3 : 1;
2856 unsigned : 1;
2859 struct
2861 unsigned T4CKPS : 2;
2862 unsigned : 6;
2865 struct
2867 unsigned : 3;
2868 unsigned T4OUTPS : 4;
2869 unsigned : 1;
2871 } __T4CONbits_t;
2873 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
2875 #define _T4CKPS0 0x01
2876 #define _T4CKPS1 0x02
2877 #define _TMR4ON 0x04
2878 #define _T4OUTPS0 0x08
2879 #define _T4OUTPS1 0x10
2880 #define _T4OUTPS2 0x20
2881 #define _T4OUTPS3 0x40
2883 //==============================================================================
2886 //==============================================================================
2887 // PWM1DCL Bits
2889 extern __at(0x0611) __sfr PWM1DCL;
2891 typedef union
2893 struct
2895 unsigned : 1;
2896 unsigned : 1;
2897 unsigned : 1;
2898 unsigned : 1;
2899 unsigned : 1;
2900 unsigned : 1;
2901 unsigned PWM1DCL0 : 1;
2902 unsigned PWM1DCL1 : 1;
2905 struct
2907 unsigned : 6;
2908 unsigned PWM1DCL : 2;
2910 } __PWM1DCLbits_t;
2912 extern __at(0x0611) volatile __PWM1DCLbits_t PWM1DCLbits;
2914 #define _PWM1DCL0 0x40
2915 #define _PWM1DCL1 0x80
2917 //==============================================================================
2920 //==============================================================================
2921 // PWM1DCH Bits
2923 extern __at(0x0612) __sfr PWM1DCH;
2925 typedef struct
2927 unsigned PWM1DCH0 : 1;
2928 unsigned PWM1DCH1 : 1;
2929 unsigned PWM1DCH2 : 1;
2930 unsigned PWM1DCH3 : 1;
2931 unsigned PWM1DCH4 : 1;
2932 unsigned PWM1DCH5 : 1;
2933 unsigned PWM1DCH6 : 1;
2934 unsigned PWM1DCH7 : 1;
2935 } __PWM1DCHbits_t;
2937 extern __at(0x0612) volatile __PWM1DCHbits_t PWM1DCHbits;
2939 #define _PWM1DCH0 0x01
2940 #define _PWM1DCH1 0x02
2941 #define _PWM1DCH2 0x04
2942 #define _PWM1DCH3 0x08
2943 #define _PWM1DCH4 0x10
2944 #define _PWM1DCH5 0x20
2945 #define _PWM1DCH6 0x40
2946 #define _PWM1DCH7 0x80
2948 //==============================================================================
2951 //==============================================================================
2952 // PWM1CON Bits
2954 extern __at(0x0613) __sfr PWM1CON;
2956 typedef struct
2958 unsigned : 1;
2959 unsigned : 1;
2960 unsigned : 1;
2961 unsigned : 1;
2962 unsigned PWM1POL : 1;
2963 unsigned PWM1OUT : 1;
2964 unsigned PWM1OE : 1;
2965 unsigned PWM1EN : 1;
2966 } __PWM1CONbits_t;
2968 extern __at(0x0613) volatile __PWM1CONbits_t PWM1CONbits;
2970 #define _PWM1POL 0x10
2971 #define _PWM1OUT 0x20
2972 #define _PWM1OE 0x40
2973 #define _PWM1EN 0x80
2975 //==============================================================================
2978 //==============================================================================
2979 // PWM1CON0 Bits
2981 extern __at(0x0613) __sfr PWM1CON0;
2983 typedef struct
2985 unsigned : 1;
2986 unsigned : 1;
2987 unsigned : 1;
2988 unsigned : 1;
2989 unsigned PWM1POL : 1;
2990 unsigned PWM1OUT : 1;
2991 unsigned PWM1OE : 1;
2992 unsigned PWM1EN : 1;
2993 } __PWM1CON0bits_t;
2995 extern __at(0x0613) volatile __PWM1CON0bits_t PWM1CON0bits;
2997 #define _PWM1CON0_PWM1POL 0x10
2998 #define _PWM1CON0_PWM1OUT 0x20
2999 #define _PWM1CON0_PWM1OE 0x40
3000 #define _PWM1CON0_PWM1EN 0x80
3002 //==============================================================================
3005 //==============================================================================
3006 // PWM2DCL Bits
3008 extern __at(0x0614) __sfr PWM2DCL;
3010 typedef union
3012 struct
3014 unsigned : 1;
3015 unsigned : 1;
3016 unsigned : 1;
3017 unsigned : 1;
3018 unsigned : 1;
3019 unsigned : 1;
3020 unsigned PWM2DCL0 : 1;
3021 unsigned PWM2DCL1 : 1;
3024 struct
3026 unsigned : 6;
3027 unsigned PWM2DCL : 2;
3029 } __PWM2DCLbits_t;
3031 extern __at(0x0614) volatile __PWM2DCLbits_t PWM2DCLbits;
3033 #define _PWM2DCL0 0x40
3034 #define _PWM2DCL1 0x80
3036 //==============================================================================
3039 //==============================================================================
3040 // PWM2DCH Bits
3042 extern __at(0x0615) __sfr PWM2DCH;
3044 typedef struct
3046 unsigned PWM2DCH0 : 1;
3047 unsigned PWM2DCH1 : 1;
3048 unsigned PWM2DCH2 : 1;
3049 unsigned PWM2DCH3 : 1;
3050 unsigned PWM2DCH4 : 1;
3051 unsigned PWM2DCH5 : 1;
3052 unsigned PWM2DCH6 : 1;
3053 unsigned PWM2DCH7 : 1;
3054 } __PWM2DCHbits_t;
3056 extern __at(0x0615) volatile __PWM2DCHbits_t PWM2DCHbits;
3058 #define _PWM2DCH0 0x01
3059 #define _PWM2DCH1 0x02
3060 #define _PWM2DCH2 0x04
3061 #define _PWM2DCH3 0x08
3062 #define _PWM2DCH4 0x10
3063 #define _PWM2DCH5 0x20
3064 #define _PWM2DCH6 0x40
3065 #define _PWM2DCH7 0x80
3067 //==============================================================================
3070 //==============================================================================
3071 // PWM2CON Bits
3073 extern __at(0x0616) __sfr PWM2CON;
3075 typedef struct
3077 unsigned : 1;
3078 unsigned : 1;
3079 unsigned : 1;
3080 unsigned : 1;
3081 unsigned PWM2POL : 1;
3082 unsigned PWM2OUT : 1;
3083 unsigned PWM2OE : 1;
3084 unsigned PWM2EN : 1;
3085 } __PWM2CONbits_t;
3087 extern __at(0x0616) volatile __PWM2CONbits_t PWM2CONbits;
3089 #define _PWM2POL 0x10
3090 #define _PWM2OUT 0x20
3091 #define _PWM2OE 0x40
3092 #define _PWM2EN 0x80
3094 //==============================================================================
3097 //==============================================================================
3098 // PWM2CON0 Bits
3100 extern __at(0x0616) __sfr PWM2CON0;
3102 typedef struct
3104 unsigned : 1;
3105 unsigned : 1;
3106 unsigned : 1;
3107 unsigned : 1;
3108 unsigned PWM2POL : 1;
3109 unsigned PWM2OUT : 1;
3110 unsigned PWM2OE : 1;
3111 unsigned PWM2EN : 1;
3112 } __PWM2CON0bits_t;
3114 extern __at(0x0616) volatile __PWM2CON0bits_t PWM2CON0bits;
3116 #define _PWM2CON0_PWM2POL 0x10
3117 #define _PWM2CON0_PWM2OUT 0x20
3118 #define _PWM2CON0_PWM2OE 0x40
3119 #define _PWM2CON0_PWM2EN 0x80
3121 //==============================================================================
3124 //==============================================================================
3125 // PWMTMRS Bits
3127 extern __at(0x061D) __sfr PWMTMRS;
3129 typedef struct
3131 unsigned P1TSEL : 1;
3132 unsigned : 1;
3133 unsigned P2TSEL : 1;
3134 unsigned : 1;
3135 unsigned : 1;
3136 unsigned : 1;
3137 unsigned : 1;
3138 unsigned : 1;
3139 } __PWMTMRSbits_t;
3141 extern __at(0x061D) volatile __PWMTMRSbits_t PWMTMRSbits;
3143 #define _P1TSEL 0x01
3144 #define _P2TSEL 0x04
3146 //==============================================================================
3149 //==============================================================================
3150 // PWM1AOE Bits
3152 extern __at(0x061E) __sfr PWM1AOE;
3154 typedef union
3156 struct
3158 unsigned PWM1OE0 : 1;
3159 unsigned PWM1OE1 : 1;
3160 unsigned PWM1OE2 : 1;
3161 unsigned PWM1OE3 : 1;
3162 unsigned : 1;
3163 unsigned : 1;
3164 unsigned : 1;
3165 unsigned : 1;
3168 struct
3170 unsigned PWM1OE : 4;
3171 unsigned : 4;
3173 } __PWM1AOEbits_t;
3175 extern __at(0x061E) volatile __PWM1AOEbits_t PWM1AOEbits;
3177 #define _PWM1OE0 0x01
3178 #define _PWM1OE1 0x02
3179 #define _PWM1OE2 0x04
3180 #define _PWM1OE3 0x08
3182 //==============================================================================
3185 //==============================================================================
3186 // PWM2AOE Bits
3188 extern __at(0x061F) __sfr PWM2AOE;
3190 typedef union
3192 struct
3194 unsigned PWM2OE0 : 1;
3195 unsigned PWM2OE1 : 1;
3196 unsigned PWM2OE2 : 1;
3197 unsigned PWM2OE3 : 1;
3198 unsigned : 1;
3199 unsigned : 1;
3200 unsigned : 1;
3201 unsigned : 1;
3204 struct
3206 unsigned PWM2OE : 4;
3207 unsigned : 4;
3209 } __PWM2AOEbits_t;
3211 extern __at(0x061F) volatile __PWM2AOEbits_t PWM2AOEbits;
3213 #define _PWM2OE0 0x01
3214 #define _PWM2OE1 0x02
3215 #define _PWM2OE2 0x04
3216 #define _PWM2OE3 0x08
3218 //==============================================================================
3221 //==============================================================================
3222 // ADCTX Bits
3224 extern __at(0x0691) __sfr ADCTX;
3226 typedef union
3228 struct
3230 unsigned A1TX0 : 1;
3231 unsigned A1TX1 : 1;
3232 unsigned A1TX2 : 1;
3233 unsigned : 1;
3234 unsigned A2TX0 : 1;
3235 unsigned A2TX1 : 1;
3236 unsigned A2TX2 : 1;
3237 unsigned : 1;
3240 struct
3242 unsigned A1TX : 3;
3243 unsigned : 5;
3246 struct
3248 unsigned : 4;
3249 unsigned A2TX : 3;
3250 unsigned : 1;
3252 } __ADCTXbits_t;
3254 extern __at(0x0691) volatile __ADCTXbits_t ADCTXbits;
3256 #define _A1TX0 0x01
3257 #define _A1TX1 0x02
3258 #define _A1TX2 0x04
3259 #define _A2TX0 0x10
3260 #define _A2TX1 0x20
3261 #define _A2TX2 0x40
3263 //==============================================================================
3265 extern __at(0x0692) __sfr AAD1TX;
3267 //==============================================================================
3268 // AAD1TX0 Bits
3270 extern __at(0x0692) __sfr AAD1TX0;
3272 typedef struct
3274 unsigned TX10 : 1;
3275 unsigned TX11 : 1;
3276 unsigned TX12 : 1;
3277 unsigned TX13 : 1;
3278 unsigned TX14 : 1;
3279 unsigned TX15 : 1;
3280 unsigned TX16 : 1;
3281 unsigned TX17 : 1;
3282 } __AAD1TX0bits_t;
3284 extern __at(0x0692) volatile __AAD1TX0bits_t AAD1TX0bits;
3286 #define _TX10 0x01
3287 #define _TX11 0x02
3288 #define _TX12 0x04
3289 #define _TX13 0x08
3290 #define _TX14 0x10
3291 #define _TX15 0x20
3292 #define _TX16 0x40
3293 #define _TX17 0x80
3295 //==============================================================================
3297 extern __at(0x0692) __sfr AD1TX;
3299 //==============================================================================
3300 // AD1TX0 Bits
3302 extern __at(0x0692) __sfr AD1TX0;
3304 typedef struct
3306 unsigned TX10 : 1;
3307 unsigned TX11 : 1;
3308 unsigned TX12 : 1;
3309 unsigned TX13 : 1;
3310 unsigned TX14 : 1;
3311 unsigned TX15 : 1;
3312 unsigned TX16 : 1;
3313 unsigned TX17 : 1;
3314 } __AD1TX0bits_t;
3316 extern __at(0x0692) volatile __AD1TX0bits_t AD1TX0bits;
3318 #define _AD1TX0_TX10 0x01
3319 #define _AD1TX0_TX11 0x02
3320 #define _AD1TX0_TX12 0x04
3321 #define _AD1TX0_TX13 0x08
3322 #define _AD1TX0_TX14 0x10
3323 #define _AD1TX0_TX15 0x20
3324 #define _AD1TX0_TX16 0x40
3325 #define _AD1TX0_TX17 0x80
3327 //==============================================================================
3330 //==============================================================================
3331 // AAD1TX1 Bits
3333 extern __at(0x0693) __sfr AAD1TX1;
3335 typedef struct
3337 unsigned TX18 : 1;
3338 unsigned TX19 : 1;
3339 unsigned : 1;
3340 unsigned : 1;
3341 unsigned : 1;
3342 unsigned : 1;
3343 unsigned : 1;
3344 unsigned : 1;
3345 } __AAD1TX1bits_t;
3347 extern __at(0x0693) volatile __AAD1TX1bits_t AAD1TX1bits;
3349 #define _TX18 0x01
3350 #define _TX19 0x02
3352 //==============================================================================
3355 //==============================================================================
3356 // AD1TX1 Bits
3358 extern __at(0x0693) __sfr AD1TX1;
3360 typedef struct
3362 unsigned TX18 : 1;
3363 unsigned TX19 : 1;
3364 unsigned : 1;
3365 unsigned : 1;
3366 unsigned : 1;
3367 unsigned : 1;
3368 unsigned : 1;
3369 unsigned : 1;
3370 } __AD1TX1bits_t;
3372 extern __at(0x0693) volatile __AD1TX1bits_t AD1TX1bits;
3374 #define _AD1TX1_TX18 0x01
3375 #define _AD1TX1_TX19 0x02
3377 //==============================================================================
3379 extern __at(0x0694) __sfr AAD2TX;
3381 //==============================================================================
3382 // AAD2TX0 Bits
3384 extern __at(0x0694) __sfr AAD2TX0;
3386 typedef struct
3388 unsigned TX20 : 1;
3389 unsigned TX21 : 1;
3390 unsigned TX22 : 1;
3391 unsigned TX23 : 1;
3392 unsigned TX24 : 1;
3393 unsigned TX25 : 1;
3394 unsigned TX26 : 1;
3395 unsigned TX27 : 1;
3396 } __AAD2TX0bits_t;
3398 extern __at(0x0694) volatile __AAD2TX0bits_t AAD2TX0bits;
3400 #define _TX20 0x01
3401 #define _TX21 0x02
3402 #define _TX22 0x04
3403 #define _TX23 0x08
3404 #define _TX24 0x10
3405 #define _TX25 0x20
3406 #define _TX26 0x40
3407 #define _TX27 0x80
3409 //==============================================================================
3411 extern __at(0x0694) __sfr AD2TX;
3413 //==============================================================================
3414 // AD2TX0 Bits
3416 extern __at(0x0694) __sfr AD2TX0;
3418 typedef struct
3420 unsigned TX20 : 1;
3421 unsigned TX21 : 1;
3422 unsigned TX22 : 1;
3423 unsigned TX23 : 1;
3424 unsigned TX24 : 1;
3425 unsigned TX25 : 1;
3426 unsigned TX26 : 1;
3427 unsigned TX27 : 1;
3428 } __AD2TX0bits_t;
3430 extern __at(0x0694) volatile __AD2TX0bits_t AD2TX0bits;
3432 #define _AD2TX0_TX20 0x01
3433 #define _AD2TX0_TX21 0x02
3434 #define _AD2TX0_TX22 0x04
3435 #define _AD2TX0_TX23 0x08
3436 #define _AD2TX0_TX24 0x10
3437 #define _AD2TX0_TX25 0x20
3438 #define _AD2TX0_TX26 0x40
3439 #define _AD2TX0_TX27 0x80
3441 //==============================================================================
3444 //==============================================================================
3445 // AAD2TX1 Bits
3447 extern __at(0x0695) __sfr AAD2TX1;
3449 typedef struct
3451 unsigned TX28 : 1;
3452 unsigned TX29 : 1;
3453 unsigned TX40 : 1;
3454 unsigned : 1;
3455 unsigned : 1;
3456 unsigned : 1;
3457 unsigned : 1;
3458 unsigned : 1;
3459 } __AAD2TX1bits_t;
3461 extern __at(0x0695) volatile __AAD2TX1bits_t AAD2TX1bits;
3463 #define _TX28 0x01
3464 #define _TX29 0x02
3465 #define _TX40 0x04
3467 //==============================================================================
3470 //==============================================================================
3471 // AD2TX1 Bits
3473 extern __at(0x0695) __sfr AD2TX1;
3475 typedef struct
3477 unsigned TX28 : 1;
3478 unsigned TX29 : 1;
3479 unsigned TX40 : 1;
3480 unsigned : 1;
3481 unsigned : 1;
3482 unsigned : 1;
3483 unsigned : 1;
3484 unsigned : 1;
3485 } __AD2TX1bits_t;
3487 extern __at(0x0695) volatile __AD2TX1bits_t AD2TX1bits;
3489 #define _AD2TX1_TX28 0x01
3490 #define _AD2TX1_TX29 0x02
3491 #define _AD2TX1_TX40 0x04
3493 //==============================================================================
3496 //==============================================================================
3497 // AAD1CON0 Bits
3499 extern __at(0x0711) __sfr AAD1CON0;
3501 typedef union
3503 struct
3505 unsigned ADON : 1;
3506 unsigned GO : 1;
3507 unsigned CHS0 : 1;
3508 unsigned CHS1 : 1;
3509 unsigned CHS2 : 1;
3510 unsigned CHS3 : 1;
3511 unsigned CHS4 : 1;
3512 unsigned CHS5 : 1;
3515 struct
3517 unsigned AD1ON : 1;
3518 unsigned GO_NOT_DONE : 1;
3519 unsigned : 1;
3520 unsigned : 1;
3521 unsigned : 1;
3522 unsigned : 1;
3523 unsigned : 1;
3524 unsigned : 1;
3527 struct
3529 unsigned : 1;
3530 unsigned GO_NOT_DONE1 : 1;
3531 unsigned : 1;
3532 unsigned : 1;
3533 unsigned : 1;
3534 unsigned : 1;
3535 unsigned : 1;
3536 unsigned : 1;
3539 struct
3541 unsigned : 2;
3542 unsigned CHS : 6;
3544 } __AAD1CON0bits_t;
3546 extern __at(0x0711) volatile __AAD1CON0bits_t AAD1CON0bits;
3548 #define _ADON 0x01
3549 #define _AD1ON 0x01
3550 #define _GO 0x02
3551 #define _GO_NOT_DONE 0x02
3552 #define _GO_NOT_DONE1 0x02
3553 #define _CHS0 0x04
3554 #define _CHS1 0x08
3555 #define _CHS2 0x10
3556 #define _CHS3 0x20
3557 #define _CHS4 0x40
3558 #define _CHS5 0x80
3560 //==============================================================================
3563 //==============================================================================
3564 // AADCON0 Bits
3566 extern __at(0x0711) __sfr AADCON0;
3568 typedef union
3570 struct
3572 unsigned ADON : 1;
3573 unsigned GO : 1;
3574 unsigned CHS0 : 1;
3575 unsigned CHS1 : 1;
3576 unsigned CHS2 : 1;
3577 unsigned CHS3 : 1;
3578 unsigned CHS4 : 1;
3579 unsigned CHS5 : 1;
3582 struct
3584 unsigned AD1ON : 1;
3585 unsigned GO_NOT_DONE : 1;
3586 unsigned : 1;
3587 unsigned : 1;
3588 unsigned : 1;
3589 unsigned : 1;
3590 unsigned : 1;
3591 unsigned : 1;
3594 struct
3596 unsigned : 1;
3597 unsigned GO_NOT_DONE1 : 1;
3598 unsigned : 1;
3599 unsigned : 1;
3600 unsigned : 1;
3601 unsigned : 1;
3602 unsigned : 1;
3603 unsigned : 1;
3606 struct
3608 unsigned : 2;
3609 unsigned CHS : 6;
3611 } __AADCON0bits_t;
3613 extern __at(0x0711) volatile __AADCON0bits_t AADCON0bits;
3615 #define _AADCON0_ADON 0x01
3616 #define _AADCON0_AD1ON 0x01
3617 #define _AADCON0_GO 0x02
3618 #define _AADCON0_GO_NOT_DONE 0x02
3619 #define _AADCON0_GO_NOT_DONE1 0x02
3620 #define _AADCON0_CHS0 0x04
3621 #define _AADCON0_CHS1 0x08
3622 #define _AADCON0_CHS2 0x10
3623 #define _AADCON0_CHS3 0x20
3624 #define _AADCON0_CHS4 0x40
3625 #define _AADCON0_CHS5 0x80
3627 //==============================================================================
3630 //==============================================================================
3631 // AD1CON0 Bits
3633 extern __at(0x0711) __sfr AD1CON0;
3635 typedef union
3637 struct
3639 unsigned ADON : 1;
3640 unsigned GO : 1;
3641 unsigned CHS0 : 1;
3642 unsigned CHS1 : 1;
3643 unsigned CHS2 : 1;
3644 unsigned CHS3 : 1;
3645 unsigned CHS4 : 1;
3646 unsigned CHS5 : 1;
3649 struct
3651 unsigned AD1ON : 1;
3652 unsigned GO_NOT_DONE : 1;
3653 unsigned : 1;
3654 unsigned : 1;
3655 unsigned : 1;
3656 unsigned : 1;
3657 unsigned : 1;
3658 unsigned : 1;
3661 struct
3663 unsigned : 1;
3664 unsigned GO_NOT_DONE1 : 1;
3665 unsigned : 1;
3666 unsigned : 1;
3667 unsigned : 1;
3668 unsigned : 1;
3669 unsigned : 1;
3670 unsigned : 1;
3673 struct
3675 unsigned : 2;
3676 unsigned CHS : 6;
3678 } __AD1CON0bits_t;
3680 extern __at(0x0711) volatile __AD1CON0bits_t AD1CON0bits;
3682 #define _AD1CON0_ADON 0x01
3683 #define _AD1CON0_AD1ON 0x01
3684 #define _AD1CON0_GO 0x02
3685 #define _AD1CON0_GO_NOT_DONE 0x02
3686 #define _AD1CON0_GO_NOT_DONE1 0x02
3687 #define _AD1CON0_CHS0 0x04
3688 #define _AD1CON0_CHS1 0x08
3689 #define _AD1CON0_CHS2 0x10
3690 #define _AD1CON0_CHS3 0x20
3691 #define _AD1CON0_CHS4 0x40
3692 #define _AD1CON0_CHS5 0x80
3694 //==============================================================================
3697 //==============================================================================
3698 // AADCON1 Bits
3700 extern __at(0x0712) __sfr AADCON1;
3702 typedef union
3704 struct
3706 unsigned ADPREF0 : 1;
3707 unsigned ADPREF1 : 1;
3708 unsigned GO_NOT_DONE_ALL : 1;
3709 unsigned ADNREF : 1;
3710 unsigned ADCS0 : 1;
3711 unsigned ADCS1 : 1;
3712 unsigned ADCS2 : 1;
3713 unsigned ADFM : 1;
3716 struct
3718 unsigned : 1;
3719 unsigned : 1;
3720 unsigned GO_ALL : 1;
3721 unsigned : 1;
3722 unsigned : 1;
3723 unsigned : 1;
3724 unsigned : 1;
3725 unsigned : 1;
3728 struct
3730 unsigned ADPREF : 2;
3731 unsigned : 6;
3734 struct
3736 unsigned : 4;
3737 unsigned ADCS : 3;
3738 unsigned : 1;
3740 } __AADCON1bits_t;
3742 extern __at(0x0712) volatile __AADCON1bits_t AADCON1bits;
3744 #define _ADPREF0 0x01
3745 #define _ADPREF1 0x02
3746 #define _GO_NOT_DONE_ALL 0x04
3747 #define _GO_ALL 0x04
3748 #define _ADNREF 0x08
3749 #define _ADCS0 0x10
3750 #define _ADCS1 0x20
3751 #define _ADCS2 0x40
3752 #define _ADFM 0x80
3754 //==============================================================================
3757 //==============================================================================
3758 // ADCOMCON Bits
3760 extern __at(0x0712) __sfr ADCOMCON;
3762 typedef union
3764 struct
3766 unsigned ADPREF0 : 1;
3767 unsigned ADPREF1 : 1;
3768 unsigned GO_NOT_DONE_ALL : 1;
3769 unsigned ADNREF : 1;
3770 unsigned ADCS0 : 1;
3771 unsigned ADCS1 : 1;
3772 unsigned ADCS2 : 1;
3773 unsigned ADFM : 1;
3776 struct
3778 unsigned : 1;
3779 unsigned : 1;
3780 unsigned GO_ALL : 1;
3781 unsigned : 1;
3782 unsigned : 1;
3783 unsigned : 1;
3784 unsigned : 1;
3785 unsigned : 1;
3788 struct
3790 unsigned ADPREF : 2;
3791 unsigned : 6;
3794 struct
3796 unsigned : 4;
3797 unsigned ADCS : 3;
3798 unsigned : 1;
3800 } __ADCOMCONbits_t;
3802 extern __at(0x0712) volatile __ADCOMCONbits_t ADCOMCONbits;
3804 #define _ADCOMCON_ADPREF0 0x01
3805 #define _ADCOMCON_ADPREF1 0x02
3806 #define _ADCOMCON_GO_NOT_DONE_ALL 0x04
3807 #define _ADCOMCON_GO_ALL 0x04
3808 #define _ADCOMCON_ADNREF 0x08
3809 #define _ADCOMCON_ADCS0 0x10
3810 #define _ADCOMCON_ADCS1 0x20
3811 #define _ADCOMCON_ADCS2 0x40
3812 #define _ADCOMCON_ADFM 0x80
3814 //==============================================================================
3817 //==============================================================================
3818 // AAD1CON2 Bits
3820 extern __at(0x0713) __sfr AAD1CON2;
3822 typedef union
3824 struct
3826 unsigned : 1;
3827 unsigned : 1;
3828 unsigned : 1;
3829 unsigned : 1;
3830 unsigned TRIGSEL0 : 1;
3831 unsigned TRIGSEL1 : 1;
3832 unsigned TRIGSEL2 : 1;
3833 unsigned : 1;
3836 struct
3838 unsigned : 4;
3839 unsigned TRIGSEL : 3;
3840 unsigned : 1;
3842 } __AAD1CON2bits_t;
3844 extern __at(0x0713) volatile __AAD1CON2bits_t AAD1CON2bits;
3846 #define _TRIGSEL0 0x10
3847 #define _TRIGSEL1 0x20
3848 #define _TRIGSEL2 0x40
3850 //==============================================================================
3853 //==============================================================================
3854 // AADCON2 Bits
3856 extern __at(0x0713) __sfr AADCON2;
3858 typedef union
3860 struct
3862 unsigned : 1;
3863 unsigned : 1;
3864 unsigned : 1;
3865 unsigned : 1;
3866 unsigned TRIGSEL0 : 1;
3867 unsigned TRIGSEL1 : 1;
3868 unsigned TRIGSEL2 : 1;
3869 unsigned : 1;
3872 struct
3874 unsigned : 4;
3875 unsigned TRIGSEL : 3;
3876 unsigned : 1;
3878 } __AADCON2bits_t;
3880 extern __at(0x0713) volatile __AADCON2bits_t AADCON2bits;
3882 #define _AADCON2_TRIGSEL0 0x10
3883 #define _AADCON2_TRIGSEL1 0x20
3884 #define _AADCON2_TRIGSEL2 0x40
3886 //==============================================================================
3889 //==============================================================================
3890 // AD1CON2 Bits
3892 extern __at(0x0713) __sfr AD1CON2;
3894 typedef union
3896 struct
3898 unsigned : 1;
3899 unsigned : 1;
3900 unsigned : 1;
3901 unsigned : 1;
3902 unsigned TRIGSEL0 : 1;
3903 unsigned TRIGSEL1 : 1;
3904 unsigned TRIGSEL2 : 1;
3905 unsigned : 1;
3908 struct
3910 unsigned : 4;
3911 unsigned TRIGSEL : 3;
3912 unsigned : 1;
3914 } __AD1CON2bits_t;
3916 extern __at(0x0713) volatile __AD1CON2bits_t AD1CON2bits;
3918 #define _AD1CON2_TRIGSEL0 0x10
3919 #define _AD1CON2_TRIGSEL1 0x20
3920 #define _AD1CON2_TRIGSEL2 0x40
3922 //==============================================================================
3925 //==============================================================================
3926 // AAD1CON3 Bits
3928 extern __at(0x0714) __sfr AAD1CON3;
3930 typedef union
3932 struct
3934 unsigned AD1DSEN : 1;
3935 unsigned AD1IPEN : 1;
3936 unsigned : 1;
3937 unsigned : 1;
3938 unsigned : 1;
3939 unsigned : 1;
3940 unsigned AD1IPPOL : 1;
3941 unsigned AD1EPPOL : 1;
3944 struct
3946 unsigned ADDSEN : 1;
3947 unsigned ADIPEN : 1;
3948 unsigned : 1;
3949 unsigned : 1;
3950 unsigned : 1;
3951 unsigned : 1;
3952 unsigned ADIPPOL : 1;
3953 unsigned ADEPPOL : 1;
3955 } __AAD1CON3bits_t;
3957 extern __at(0x0714) volatile __AAD1CON3bits_t AAD1CON3bits;
3959 #define _AD1DSEN 0x01
3960 #define _ADDSEN 0x01
3961 #define _AD1IPEN 0x02
3962 #define _ADIPEN 0x02
3963 #define _AD1IPPOL 0x40
3964 #define _ADIPPOL 0x40
3965 #define _AD1EPPOL 0x80
3966 #define _ADEPPOL 0x80
3968 //==============================================================================
3971 //==============================================================================
3972 // AADCON3 Bits
3974 extern __at(0x0714) __sfr AADCON3;
3976 typedef union
3978 struct
3980 unsigned AD1DSEN : 1;
3981 unsigned AD1IPEN : 1;
3982 unsigned : 1;
3983 unsigned : 1;
3984 unsigned : 1;
3985 unsigned : 1;
3986 unsigned AD1IPPOL : 1;
3987 unsigned AD1EPPOL : 1;
3990 struct
3992 unsigned ADDSEN : 1;
3993 unsigned ADIPEN : 1;
3994 unsigned : 1;
3995 unsigned : 1;
3996 unsigned : 1;
3997 unsigned : 1;
3998 unsigned ADIPPOL : 1;
3999 unsigned ADEPPOL : 1;
4001 } __AADCON3bits_t;
4003 extern __at(0x0714) volatile __AADCON3bits_t AADCON3bits;
4005 #define _AADCON3_AD1DSEN 0x01
4006 #define _AADCON3_ADDSEN 0x01
4007 #define _AADCON3_AD1IPEN 0x02
4008 #define _AADCON3_ADIPEN 0x02
4009 #define _AADCON3_AD1IPPOL 0x40
4010 #define _AADCON3_ADIPPOL 0x40
4011 #define _AADCON3_AD1EPPOL 0x80
4012 #define _AADCON3_ADEPPOL 0x80
4014 //==============================================================================
4017 //==============================================================================
4018 // AD1CON3 Bits
4020 extern __at(0x0714) __sfr AD1CON3;
4022 typedef union
4024 struct
4026 unsigned AD1DSEN : 1;
4027 unsigned AD1IPEN : 1;
4028 unsigned : 1;
4029 unsigned : 1;
4030 unsigned : 1;
4031 unsigned : 1;
4032 unsigned AD1IPPOL : 1;
4033 unsigned AD1EPPOL : 1;
4036 struct
4038 unsigned ADDSEN : 1;
4039 unsigned ADIPEN : 1;
4040 unsigned : 1;
4041 unsigned : 1;
4042 unsigned : 1;
4043 unsigned : 1;
4044 unsigned ADIPPOL : 1;
4045 unsigned ADEPPOL : 1;
4047 } __AD1CON3bits_t;
4049 extern __at(0x0714) volatile __AD1CON3bits_t AD1CON3bits;
4051 #define _AD1CON3_AD1DSEN 0x01
4052 #define _AD1CON3_ADDSEN 0x01
4053 #define _AD1CON3_AD1IPEN 0x02
4054 #define _AD1CON3_ADIPEN 0x02
4055 #define _AD1CON3_AD1IPPOL 0x40
4056 #define _AD1CON3_ADIPPOL 0x40
4057 #define _AD1CON3_AD1EPPOL 0x80
4058 #define _AD1CON3_ADEPPOL 0x80
4060 //==============================================================================
4063 //==============================================================================
4064 // AADSTAT Bits
4066 extern __at(0x0715) __sfr AADSTAT;
4068 typedef union
4070 struct
4072 unsigned AD1STG0 : 1;
4073 unsigned AD1STG1 : 1;
4074 unsigned AD1CONV : 1;
4075 unsigned : 1;
4076 unsigned AD2STG0 : 1;
4077 unsigned AD2STG1 : 1;
4078 unsigned AD2CONV : 1;
4079 unsigned : 1;
4082 struct
4084 unsigned : 1;
4085 unsigned : 1;
4086 unsigned ADCONV : 1;
4087 unsigned : 1;
4088 unsigned : 1;
4089 unsigned : 1;
4090 unsigned : 1;
4091 unsigned : 1;
4094 struct
4096 unsigned AD1STG : 2;
4097 unsigned : 6;
4100 struct
4102 unsigned : 4;
4103 unsigned AD2STG : 2;
4104 unsigned : 2;
4106 } __AADSTATbits_t;
4108 extern __at(0x0715) volatile __AADSTATbits_t AADSTATbits;
4110 #define _AD1STG0 0x01
4111 #define _AD1STG1 0x02
4112 #define _AD1CONV 0x04
4113 #define _ADCONV 0x04
4114 #define _AD2STG0 0x10
4115 #define _AD2STG1 0x20
4116 #define _AD2CONV 0x40
4118 //==============================================================================
4121 //==============================================================================
4122 // ADSTAT Bits
4124 extern __at(0x0715) __sfr ADSTAT;
4126 typedef union
4128 struct
4130 unsigned AD1STG0 : 1;
4131 unsigned AD1STG1 : 1;
4132 unsigned AD1CONV : 1;
4133 unsigned : 1;
4134 unsigned AD2STG0 : 1;
4135 unsigned AD2STG1 : 1;
4136 unsigned AD2CONV : 1;
4137 unsigned : 1;
4140 struct
4142 unsigned : 1;
4143 unsigned : 1;
4144 unsigned ADCONV : 1;
4145 unsigned : 1;
4146 unsigned : 1;
4147 unsigned : 1;
4148 unsigned : 1;
4149 unsigned : 1;
4152 struct
4154 unsigned AD1STG : 2;
4155 unsigned : 6;
4158 struct
4160 unsigned : 4;
4161 unsigned AD2STG : 2;
4162 unsigned : 2;
4164 } __ADSTATbits_t;
4166 extern __at(0x0715) volatile __ADSTATbits_t ADSTATbits;
4168 #define _ADSTAT_AD1STG0 0x01
4169 #define _ADSTAT_AD1STG1 0x02
4170 #define _ADSTAT_AD1CONV 0x04
4171 #define _ADSTAT_ADCONV 0x04
4172 #define _ADSTAT_AD2STG0 0x10
4173 #define _ADSTAT_AD2STG1 0x20
4174 #define _ADSTAT_AD2CONV 0x40
4176 //==============================================================================
4179 //==============================================================================
4180 // AAD1PRE Bits
4182 extern __at(0x0716) __sfr AAD1PRE;
4184 typedef union
4186 struct
4188 unsigned ADPRE0 : 1;
4189 unsigned ADPRE1 : 1;
4190 unsigned ADPRE2 : 1;
4191 unsigned ADPRE3 : 1;
4192 unsigned ADPRE4 : 1;
4193 unsigned ADPRE5 : 1;
4194 unsigned ADPRE6 : 1;
4195 unsigned : 1;
4198 struct
4200 unsigned ADPRE : 7;
4201 unsigned : 1;
4203 } __AAD1PREbits_t;
4205 extern __at(0x0716) volatile __AAD1PREbits_t AAD1PREbits;
4207 #define _ADPRE0 0x01
4208 #define _ADPRE1 0x02
4209 #define _ADPRE2 0x04
4210 #define _ADPRE3 0x08
4211 #define _ADPRE4 0x10
4212 #define _ADPRE5 0x20
4213 #define _ADPRE6 0x40
4215 //==============================================================================
4218 //==============================================================================
4219 // AADPRE Bits
4221 extern __at(0x0716) __sfr AADPRE;
4223 typedef union
4225 struct
4227 unsigned ADPRE0 : 1;
4228 unsigned ADPRE1 : 1;
4229 unsigned ADPRE2 : 1;
4230 unsigned ADPRE3 : 1;
4231 unsigned ADPRE4 : 1;
4232 unsigned ADPRE5 : 1;
4233 unsigned ADPRE6 : 1;
4234 unsigned : 1;
4237 struct
4239 unsigned ADPRE : 7;
4240 unsigned : 1;
4242 } __AADPREbits_t;
4244 extern __at(0x0716) volatile __AADPREbits_t AADPREbits;
4246 #define _AADPRE_ADPRE0 0x01
4247 #define _AADPRE_ADPRE1 0x02
4248 #define _AADPRE_ADPRE2 0x04
4249 #define _AADPRE_ADPRE3 0x08
4250 #define _AADPRE_ADPRE4 0x10
4251 #define _AADPRE_ADPRE5 0x20
4252 #define _AADPRE_ADPRE6 0x40
4254 //==============================================================================
4257 //==============================================================================
4258 // AD1PRE Bits
4260 extern __at(0x0716) __sfr AD1PRE;
4262 typedef union
4264 struct
4266 unsigned ADPRE0 : 1;
4267 unsigned ADPRE1 : 1;
4268 unsigned ADPRE2 : 1;
4269 unsigned ADPRE3 : 1;
4270 unsigned ADPRE4 : 1;
4271 unsigned ADPRE5 : 1;
4272 unsigned ADPRE6 : 1;
4273 unsigned : 1;
4276 struct
4278 unsigned ADPRE : 7;
4279 unsigned : 1;
4281 } __AD1PREbits_t;
4283 extern __at(0x0716) volatile __AD1PREbits_t AD1PREbits;
4285 #define _AD1PRE_ADPRE0 0x01
4286 #define _AD1PRE_ADPRE1 0x02
4287 #define _AD1PRE_ADPRE2 0x04
4288 #define _AD1PRE_ADPRE3 0x08
4289 #define _AD1PRE_ADPRE4 0x10
4290 #define _AD1PRE_ADPRE5 0x20
4291 #define _AD1PRE_ADPRE6 0x40
4293 //==============================================================================
4296 //==============================================================================
4297 // AD1PRECON Bits
4299 extern __at(0x0716) __sfr AD1PRECON;
4301 typedef union
4303 struct
4305 unsigned ADPRE0 : 1;
4306 unsigned ADPRE1 : 1;
4307 unsigned ADPRE2 : 1;
4308 unsigned ADPRE3 : 1;
4309 unsigned ADPRE4 : 1;
4310 unsigned ADPRE5 : 1;
4311 unsigned ADPRE6 : 1;
4312 unsigned : 1;
4315 struct
4317 unsigned ADPRE : 7;
4318 unsigned : 1;
4320 } __AD1PRECONbits_t;
4322 extern __at(0x0716) volatile __AD1PRECONbits_t AD1PRECONbits;
4324 #define _AD1PRECON_ADPRE0 0x01
4325 #define _AD1PRECON_ADPRE1 0x02
4326 #define _AD1PRECON_ADPRE2 0x04
4327 #define _AD1PRECON_ADPRE3 0x08
4328 #define _AD1PRECON_ADPRE4 0x10
4329 #define _AD1PRECON_ADPRE5 0x20
4330 #define _AD1PRECON_ADPRE6 0x40
4332 //==============================================================================
4335 //==============================================================================
4336 // AAD1ACQ Bits
4338 extern __at(0x0717) __sfr AAD1ACQ;
4340 typedef union
4342 struct
4344 unsigned ADACQ0 : 1;
4345 unsigned ADACQ1 : 1;
4346 unsigned ADACQ2 : 1;
4347 unsigned ADACQ3 : 1;
4348 unsigned ADACQ4 : 1;
4349 unsigned ADACQ5 : 1;
4350 unsigned ADACQ6 : 1;
4351 unsigned : 1;
4354 struct
4356 unsigned ADACQ : 7;
4357 unsigned : 1;
4359 } __AAD1ACQbits_t;
4361 extern __at(0x0717) volatile __AAD1ACQbits_t AAD1ACQbits;
4363 #define _ADACQ0 0x01
4364 #define _ADACQ1 0x02
4365 #define _ADACQ2 0x04
4366 #define _ADACQ3 0x08
4367 #define _ADACQ4 0x10
4368 #define _ADACQ5 0x20
4369 #define _ADACQ6 0x40
4371 //==============================================================================
4374 //==============================================================================
4375 // AADACQ Bits
4377 extern __at(0x0717) __sfr AADACQ;
4379 typedef union
4381 struct
4383 unsigned ADACQ0 : 1;
4384 unsigned ADACQ1 : 1;
4385 unsigned ADACQ2 : 1;
4386 unsigned ADACQ3 : 1;
4387 unsigned ADACQ4 : 1;
4388 unsigned ADACQ5 : 1;
4389 unsigned ADACQ6 : 1;
4390 unsigned : 1;
4393 struct
4395 unsigned ADACQ : 7;
4396 unsigned : 1;
4398 } __AADACQbits_t;
4400 extern __at(0x0717) volatile __AADACQbits_t AADACQbits;
4402 #define _AADACQ_ADACQ0 0x01
4403 #define _AADACQ_ADACQ1 0x02
4404 #define _AADACQ_ADACQ2 0x04
4405 #define _AADACQ_ADACQ3 0x08
4406 #define _AADACQ_ADACQ4 0x10
4407 #define _AADACQ_ADACQ5 0x20
4408 #define _AADACQ_ADACQ6 0x40
4410 //==============================================================================
4413 //==============================================================================
4414 // AD1ACQ Bits
4416 extern __at(0x0717) __sfr AD1ACQ;
4418 typedef union
4420 struct
4422 unsigned ADACQ0 : 1;
4423 unsigned ADACQ1 : 1;
4424 unsigned ADACQ2 : 1;
4425 unsigned ADACQ3 : 1;
4426 unsigned ADACQ4 : 1;
4427 unsigned ADACQ5 : 1;
4428 unsigned ADACQ6 : 1;
4429 unsigned : 1;
4432 struct
4434 unsigned ADACQ : 7;
4435 unsigned : 1;
4437 } __AD1ACQbits_t;
4439 extern __at(0x0717) volatile __AD1ACQbits_t AD1ACQbits;
4441 #define _AD1ACQ_ADACQ0 0x01
4442 #define _AD1ACQ_ADACQ1 0x02
4443 #define _AD1ACQ_ADACQ2 0x04
4444 #define _AD1ACQ_ADACQ3 0x08
4445 #define _AD1ACQ_ADACQ4 0x10
4446 #define _AD1ACQ_ADACQ5 0x20
4447 #define _AD1ACQ_ADACQ6 0x40
4449 //==============================================================================
4452 //==============================================================================
4453 // AD1ACQCON Bits
4455 extern __at(0x0717) __sfr AD1ACQCON;
4457 typedef union
4459 struct
4461 unsigned ADACQ0 : 1;
4462 unsigned ADACQ1 : 1;
4463 unsigned ADACQ2 : 1;
4464 unsigned ADACQ3 : 1;
4465 unsigned ADACQ4 : 1;
4466 unsigned ADACQ5 : 1;
4467 unsigned ADACQ6 : 1;
4468 unsigned : 1;
4471 struct
4473 unsigned ADACQ : 7;
4474 unsigned : 1;
4476 } __AD1ACQCONbits_t;
4478 extern __at(0x0717) volatile __AD1ACQCONbits_t AD1ACQCONbits;
4480 #define _AD1ACQCON_ADACQ0 0x01
4481 #define _AD1ACQCON_ADACQ1 0x02
4482 #define _AD1ACQCON_ADACQ2 0x04
4483 #define _AD1ACQCON_ADACQ3 0x08
4484 #define _AD1ACQCON_ADACQ4 0x10
4485 #define _AD1ACQCON_ADACQ5 0x20
4486 #define _AD1ACQCON_ADACQ6 0x40
4488 //==============================================================================
4491 //==============================================================================
4492 // AAD1GRD Bits
4494 extern __at(0x0718) __sfr AAD1GRD;
4496 typedef union
4498 struct
4500 unsigned TX1POL : 1;
4501 unsigned : 1;
4502 unsigned : 1;
4503 unsigned : 1;
4504 unsigned : 1;
4505 unsigned GRD1POL : 1;
4506 unsigned GRD1AOE : 1;
4507 unsigned GRD1BOE : 1;
4510 struct
4512 unsigned TXPOL : 1;
4513 unsigned : 1;
4514 unsigned : 1;
4515 unsigned : 1;
4516 unsigned : 1;
4517 unsigned GRDPOL : 1;
4518 unsigned GRDAOE : 1;
4519 unsigned GRDBOE : 1;
4521 } __AAD1GRDbits_t;
4523 extern __at(0x0718) volatile __AAD1GRDbits_t AAD1GRDbits;
4525 #define _TX1POL 0x01
4526 #define _TXPOL 0x01
4527 #define _GRD1POL 0x20
4528 #define _GRDPOL 0x20
4529 #define _GRD1AOE 0x40
4530 #define _GRDAOE 0x40
4531 #define _GRD1BOE 0x80
4532 #define _GRDBOE 0x80
4534 //==============================================================================
4537 //==============================================================================
4538 // AADGRD Bits
4540 extern __at(0x0718) __sfr AADGRD;
4542 typedef union
4544 struct
4546 unsigned TX1POL : 1;
4547 unsigned : 1;
4548 unsigned : 1;
4549 unsigned : 1;
4550 unsigned : 1;
4551 unsigned GRD1POL : 1;
4552 unsigned GRD1AOE : 1;
4553 unsigned GRD1BOE : 1;
4556 struct
4558 unsigned TXPOL : 1;
4559 unsigned : 1;
4560 unsigned : 1;
4561 unsigned : 1;
4562 unsigned : 1;
4563 unsigned GRDPOL : 1;
4564 unsigned GRDAOE : 1;
4565 unsigned GRDBOE : 1;
4567 } __AADGRDbits_t;
4569 extern __at(0x0718) volatile __AADGRDbits_t AADGRDbits;
4571 #define _AADGRD_TX1POL 0x01
4572 #define _AADGRD_TXPOL 0x01
4573 #define _AADGRD_GRD1POL 0x20
4574 #define _AADGRD_GRDPOL 0x20
4575 #define _AADGRD_GRD1AOE 0x40
4576 #define _AADGRD_GRDAOE 0x40
4577 #define _AADGRD_GRD1BOE 0x80
4578 #define _AADGRD_GRDBOE 0x80
4580 //==============================================================================
4583 //==============================================================================
4584 // AD1GRD Bits
4586 extern __at(0x0718) __sfr AD1GRD;
4588 typedef union
4590 struct
4592 unsigned TX1POL : 1;
4593 unsigned : 1;
4594 unsigned : 1;
4595 unsigned : 1;
4596 unsigned : 1;
4597 unsigned GRD1POL : 1;
4598 unsigned GRD1AOE : 1;
4599 unsigned GRD1BOE : 1;
4602 struct
4604 unsigned TXPOL : 1;
4605 unsigned : 1;
4606 unsigned : 1;
4607 unsigned : 1;
4608 unsigned : 1;
4609 unsigned GRDPOL : 1;
4610 unsigned GRDAOE : 1;
4611 unsigned GRDBOE : 1;
4613 } __AD1GRDbits_t;
4615 extern __at(0x0718) volatile __AD1GRDbits_t AD1GRDbits;
4617 #define _AD1GRD_TX1POL 0x01
4618 #define _AD1GRD_TXPOL 0x01
4619 #define _AD1GRD_GRD1POL 0x20
4620 #define _AD1GRD_GRDPOL 0x20
4621 #define _AD1GRD_GRD1AOE 0x40
4622 #define _AD1GRD_GRDAOE 0x40
4623 #define _AD1GRD_GRD1BOE 0x80
4624 #define _AD1GRD_GRDBOE 0x80
4626 //==============================================================================
4629 //==============================================================================
4630 // AAD1CAP Bits
4632 extern __at(0x0719) __sfr AAD1CAP;
4634 typedef union
4636 struct
4638 unsigned ADDCAP0 : 1;
4639 unsigned ADDCAP1 : 1;
4640 unsigned ADDCAP2 : 1;
4641 unsigned ADDCAP3 : 1;
4642 unsigned : 1;
4643 unsigned : 1;
4644 unsigned : 1;
4645 unsigned : 1;
4648 struct
4650 unsigned ADDCAP : 4;
4651 unsigned : 4;
4653 } __AAD1CAPbits_t;
4655 extern __at(0x0719) volatile __AAD1CAPbits_t AAD1CAPbits;
4657 #define _ADDCAP0 0x01
4658 #define _ADDCAP1 0x02
4659 #define _ADDCAP2 0x04
4660 #define _ADDCAP3 0x08
4662 //==============================================================================
4665 //==============================================================================
4666 // AAD1CAPCON Bits
4668 extern __at(0x0719) __sfr AAD1CAPCON;
4670 typedef union
4672 struct
4674 unsigned ADDCAP0 : 1;
4675 unsigned ADDCAP1 : 1;
4676 unsigned ADDCAP2 : 1;
4677 unsigned ADDCAP3 : 1;
4678 unsigned : 1;
4679 unsigned : 1;
4680 unsigned : 1;
4681 unsigned : 1;
4684 struct
4686 unsigned ADDCAP : 4;
4687 unsigned : 4;
4689 } __AAD1CAPCONbits_t;
4691 extern __at(0x0719) volatile __AAD1CAPCONbits_t AAD1CAPCONbits;
4693 #define _AAD1CAPCON_ADDCAP0 0x01
4694 #define _AAD1CAPCON_ADDCAP1 0x02
4695 #define _AAD1CAPCON_ADDCAP2 0x04
4696 #define _AAD1CAPCON_ADDCAP3 0x08
4698 //==============================================================================
4701 //==============================================================================
4702 // AADCAP Bits
4704 extern __at(0x0719) __sfr AADCAP;
4706 typedef union
4708 struct
4710 unsigned ADDCAP0 : 1;
4711 unsigned ADDCAP1 : 1;
4712 unsigned ADDCAP2 : 1;
4713 unsigned ADDCAP3 : 1;
4714 unsigned : 1;
4715 unsigned : 1;
4716 unsigned : 1;
4717 unsigned : 1;
4720 struct
4722 unsigned ADDCAP : 4;
4723 unsigned : 4;
4725 } __AADCAPbits_t;
4727 extern __at(0x0719) volatile __AADCAPbits_t AADCAPbits;
4729 #define _AADCAP_ADDCAP0 0x01
4730 #define _AADCAP_ADDCAP1 0x02
4731 #define _AADCAP_ADDCAP2 0x04
4732 #define _AADCAP_ADDCAP3 0x08
4734 //==============================================================================
4737 //==============================================================================
4738 // AD1CAPCON Bits
4740 extern __at(0x0719) __sfr AD1CAPCON;
4742 typedef union
4744 struct
4746 unsigned ADDCAP0 : 1;
4747 unsigned ADDCAP1 : 1;
4748 unsigned ADDCAP2 : 1;
4749 unsigned ADDCAP3 : 1;
4750 unsigned : 1;
4751 unsigned : 1;
4752 unsigned : 1;
4753 unsigned : 1;
4756 struct
4758 unsigned ADDCAP : 4;
4759 unsigned : 4;
4761 } __AD1CAPCONbits_t;
4763 extern __at(0x0719) volatile __AD1CAPCONbits_t AD1CAPCONbits;
4765 #define _AD1CAPCON_ADDCAP0 0x01
4766 #define _AD1CAPCON_ADDCAP1 0x02
4767 #define _AD1CAPCON_ADDCAP2 0x04
4768 #define _AD1CAPCON_ADDCAP3 0x08
4770 //==============================================================================
4772 extern __at(0x071A) __sfr AAD1RES0;
4773 extern __at(0x071A) __sfr AAD1RES0L;
4774 extern __at(0x071A) __sfr AD1RES0;
4775 extern __at(0x071A) __sfr AD1RES0L;
4776 extern __at(0x071A) __sfr ADRES0;
4777 extern __at(0x071B) __sfr AAD1RES0H;
4778 extern __at(0x071B) __sfr AD1RES0H;
4779 extern __at(0x071C) __sfr AAD1RES1;
4780 extern __at(0x071C) __sfr AAD1RES1L;
4781 extern __at(0x071C) __sfr AD1RES1;
4782 extern __at(0x071C) __sfr AD1RES1L;
4783 extern __at(0x071C) __sfr ADRES1;
4784 extern __at(0x071D) __sfr AAD1RES1H;
4785 extern __at(0x071D) __sfr AD1RES1H;
4786 extern __at(0x071E) __sfr AAD1CH;
4788 //==============================================================================
4789 // AAD1CH0 Bits
4791 extern __at(0x071E) __sfr AAD1CH0;
4793 typedef struct
4795 unsigned CH10 : 1;
4796 unsigned CH11 : 1;
4797 unsigned CH12 : 1;
4798 unsigned CH13 : 1;
4799 unsigned CH14 : 1;
4800 unsigned CH15 : 1;
4801 unsigned CH16 : 1;
4802 unsigned CHS17 : 1;
4803 } __AAD1CH0bits_t;
4805 extern __at(0x071E) volatile __AAD1CH0bits_t AAD1CH0bits;
4807 #define _CH10 0x01
4808 #define _CH11 0x02
4809 #define _CH12 0x04
4810 #define _CH13 0x08
4811 #define _CH14 0x10
4812 #define _CH15 0x20
4813 #define _CH16 0x40
4814 #define _CHS17 0x80
4816 //==============================================================================
4818 extern __at(0x071E) __sfr AD1CH;
4820 //==============================================================================
4821 // AD1CH0 Bits
4823 extern __at(0x071E) __sfr AD1CH0;
4825 typedef struct
4827 unsigned CH10 : 1;
4828 unsigned CH11 : 1;
4829 unsigned CH12 : 1;
4830 unsigned CH13 : 1;
4831 unsigned CH14 : 1;
4832 unsigned CH15 : 1;
4833 unsigned CH16 : 1;
4834 unsigned CHS17 : 1;
4835 } __AD1CH0bits_t;
4837 extern __at(0x071E) volatile __AD1CH0bits_t AD1CH0bits;
4839 #define _AD1CH0_CH10 0x01
4840 #define _AD1CH0_CH11 0x02
4841 #define _AD1CH0_CH12 0x04
4842 #define _AD1CH0_CH13 0x08
4843 #define _AD1CH0_CH14 0x10
4844 #define _AD1CH0_CH15 0x20
4845 #define _AD1CH0_CH16 0x40
4846 #define _AD1CH0_CHS17 0x80
4848 //==============================================================================
4851 //==============================================================================
4852 // AAD1CH1 Bits
4854 extern __at(0x071F) __sfr AAD1CH1;
4856 typedef struct
4858 unsigned CH18 : 1;
4859 unsigned CH19 : 1;
4860 unsigned : 1;
4861 unsigned : 1;
4862 unsigned : 1;
4863 unsigned : 1;
4864 unsigned : 1;
4865 unsigned : 1;
4866 } __AAD1CH1bits_t;
4868 extern __at(0x071F) volatile __AAD1CH1bits_t AAD1CH1bits;
4870 #define _CH18 0x01
4871 #define _CH19 0x02
4873 //==============================================================================
4876 //==============================================================================
4877 // AD1CH1 Bits
4879 extern __at(0x071F) __sfr AD1CH1;
4881 typedef struct
4883 unsigned CH18 : 1;
4884 unsigned CH19 : 1;
4885 unsigned : 1;
4886 unsigned : 1;
4887 unsigned : 1;
4888 unsigned : 1;
4889 unsigned : 1;
4890 unsigned : 1;
4891 } __AD1CH1bits_t;
4893 extern __at(0x071F) volatile __AD1CH1bits_t AD1CH1bits;
4895 #define _AD1CH1_CH18 0x01
4896 #define _AD1CH1_CH19 0x02
4898 //==============================================================================
4901 //==============================================================================
4902 // AAD2CON0 Bits
4904 extern __at(0x0791) __sfr AAD2CON0;
4906 typedef union
4908 struct
4910 unsigned ADON : 1;
4911 unsigned GO : 1;
4912 unsigned CHS0 : 1;
4913 unsigned CHS1 : 1;
4914 unsigned CHS2 : 1;
4915 unsigned CHS3 : 1;
4916 unsigned CHS4 : 1;
4917 unsigned CHS5 : 1;
4920 struct
4922 unsigned AD2ON : 1;
4923 unsigned GO_NOT_DONE : 1;
4924 unsigned : 1;
4925 unsigned : 1;
4926 unsigned : 1;
4927 unsigned : 1;
4928 unsigned : 1;
4929 unsigned : 1;
4932 struct
4934 unsigned : 1;
4935 unsigned GO_NOT_DONE2 : 1;
4936 unsigned : 1;
4937 unsigned : 1;
4938 unsigned : 1;
4939 unsigned : 1;
4940 unsigned : 1;
4941 unsigned : 1;
4944 struct
4946 unsigned : 2;
4947 unsigned CHS : 6;
4949 } __AAD2CON0bits_t;
4951 extern __at(0x0791) volatile __AAD2CON0bits_t AAD2CON0bits;
4953 #define _AAD2CON0_ADON 0x01
4954 #define _AAD2CON0_AD2ON 0x01
4955 #define _AAD2CON0_GO 0x02
4956 #define _AAD2CON0_GO_NOT_DONE 0x02
4957 #define _AAD2CON0_GO_NOT_DONE2 0x02
4958 #define _AAD2CON0_CHS0 0x04
4959 #define _AAD2CON0_CHS1 0x08
4960 #define _AAD2CON0_CHS2 0x10
4961 #define _AAD2CON0_CHS3 0x20
4962 #define _AAD2CON0_CHS4 0x40
4963 #define _AAD2CON0_CHS5 0x80
4965 //==============================================================================
4968 //==============================================================================
4969 // AD2CON0 Bits
4971 extern __at(0x0791) __sfr AD2CON0;
4973 typedef union
4975 struct
4977 unsigned ADON : 1;
4978 unsigned GO : 1;
4979 unsigned CHS0 : 1;
4980 unsigned CHS1 : 1;
4981 unsigned CHS2 : 1;
4982 unsigned CHS3 : 1;
4983 unsigned CHS4 : 1;
4984 unsigned CHS5 : 1;
4987 struct
4989 unsigned AD2ON : 1;
4990 unsigned GO_NOT_DONE : 1;
4991 unsigned : 1;
4992 unsigned : 1;
4993 unsigned : 1;
4994 unsigned : 1;
4995 unsigned : 1;
4996 unsigned : 1;
4999 struct
5001 unsigned : 1;
5002 unsigned GO_NOT_DONE2 : 1;
5003 unsigned : 1;
5004 unsigned : 1;
5005 unsigned : 1;
5006 unsigned : 1;
5007 unsigned : 1;
5008 unsigned : 1;
5011 struct
5013 unsigned : 2;
5014 unsigned CHS : 6;
5016 } __AD2CON0bits_t;
5018 extern __at(0x0791) volatile __AD2CON0bits_t AD2CON0bits;
5020 #define _AD2CON0_ADON 0x01
5021 #define _AD2CON0_AD2ON 0x01
5022 #define _AD2CON0_GO 0x02
5023 #define _AD2CON0_GO_NOT_DONE 0x02
5024 #define _AD2CON0_GO_NOT_DONE2 0x02
5025 #define _AD2CON0_CHS0 0x04
5026 #define _AD2CON0_CHS1 0x08
5027 #define _AD2CON0_CHS2 0x10
5028 #define _AD2CON0_CHS3 0x20
5029 #define _AD2CON0_CHS4 0x40
5030 #define _AD2CON0_CHS5 0x80
5032 //==============================================================================
5035 //==============================================================================
5036 // AAD2CON2 Bits
5038 extern __at(0x0793) __sfr AAD2CON2;
5040 typedef union
5042 struct
5044 unsigned : 1;
5045 unsigned : 1;
5046 unsigned : 1;
5047 unsigned : 1;
5048 unsigned TRIGSEL0 : 1;
5049 unsigned TRIGSEL1 : 1;
5050 unsigned TRIGSEL2 : 1;
5051 unsigned : 1;
5054 struct
5056 unsigned : 4;
5057 unsigned TRIGSEL : 3;
5058 unsigned : 1;
5060 } __AAD2CON2bits_t;
5062 extern __at(0x0793) volatile __AAD2CON2bits_t AAD2CON2bits;
5064 #define _AAD2CON2_TRIGSEL0 0x10
5065 #define _AAD2CON2_TRIGSEL1 0x20
5066 #define _AAD2CON2_TRIGSEL2 0x40
5068 //==============================================================================
5071 //==============================================================================
5072 // AD2CON2 Bits
5074 extern __at(0x0793) __sfr AD2CON2;
5076 typedef union
5078 struct
5080 unsigned : 1;
5081 unsigned : 1;
5082 unsigned : 1;
5083 unsigned : 1;
5084 unsigned TRIGSEL0 : 1;
5085 unsigned TRIGSEL1 : 1;
5086 unsigned TRIGSEL2 : 1;
5087 unsigned : 1;
5090 struct
5092 unsigned : 4;
5093 unsigned TRIGSEL : 3;
5094 unsigned : 1;
5096 } __AD2CON2bits_t;
5098 extern __at(0x0793) volatile __AD2CON2bits_t AD2CON2bits;
5100 #define _AD2CON2_TRIGSEL0 0x10
5101 #define _AD2CON2_TRIGSEL1 0x20
5102 #define _AD2CON2_TRIGSEL2 0x40
5104 //==============================================================================
5107 //==============================================================================
5108 // AAD2CON3 Bits
5110 extern __at(0x0794) __sfr AAD2CON3;
5112 typedef union
5114 struct
5116 unsigned AD2DSEN : 1;
5117 unsigned AD2IPEN : 1;
5118 unsigned : 1;
5119 unsigned : 1;
5120 unsigned : 1;
5121 unsigned : 1;
5122 unsigned AD2IPPOL : 1;
5123 unsigned AD2EPPOL : 1;
5126 struct
5128 unsigned ADDSEN : 1;
5129 unsigned ADIPEN : 1;
5130 unsigned : 1;
5131 unsigned : 1;
5132 unsigned : 1;
5133 unsigned : 1;
5134 unsigned ADIPPOL : 1;
5135 unsigned ADEPPOL : 1;
5137 } __AAD2CON3bits_t;
5139 extern __at(0x0794) volatile __AAD2CON3bits_t AAD2CON3bits;
5141 #define _AAD2CON3_AD2DSEN 0x01
5142 #define _AAD2CON3_ADDSEN 0x01
5143 #define _AAD2CON3_AD2IPEN 0x02
5144 #define _AAD2CON3_ADIPEN 0x02
5145 #define _AAD2CON3_AD2IPPOL 0x40
5146 #define _AAD2CON3_ADIPPOL 0x40
5147 #define _AAD2CON3_AD2EPPOL 0x80
5148 #define _AAD2CON3_ADEPPOL 0x80
5150 //==============================================================================
5153 //==============================================================================
5154 // AD2CON3 Bits
5156 extern __at(0x0794) __sfr AD2CON3;
5158 typedef union
5160 struct
5162 unsigned AD2DSEN : 1;
5163 unsigned AD2IPEN : 1;
5164 unsigned : 1;
5165 unsigned : 1;
5166 unsigned : 1;
5167 unsigned : 1;
5168 unsigned AD2IPPOL : 1;
5169 unsigned AD2EPPOL : 1;
5172 struct
5174 unsigned ADDSEN : 1;
5175 unsigned ADIPEN : 1;
5176 unsigned : 1;
5177 unsigned : 1;
5178 unsigned : 1;
5179 unsigned : 1;
5180 unsigned ADIPPOL : 1;
5181 unsigned ADEPPOL : 1;
5183 } __AD2CON3bits_t;
5185 extern __at(0x0794) volatile __AD2CON3bits_t AD2CON3bits;
5187 #define _AD2CON3_AD2DSEN 0x01
5188 #define _AD2CON3_ADDSEN 0x01
5189 #define _AD2CON3_AD2IPEN 0x02
5190 #define _AD2CON3_ADIPEN 0x02
5191 #define _AD2CON3_AD2IPPOL 0x40
5192 #define _AD2CON3_ADIPPOL 0x40
5193 #define _AD2CON3_AD2EPPOL 0x80
5194 #define _AD2CON3_ADEPPOL 0x80
5196 //==============================================================================
5199 //==============================================================================
5200 // AAD2PRE Bits
5202 extern __at(0x0796) __sfr AAD2PRE;
5204 typedef union
5206 struct
5208 unsigned ADPRE0 : 1;
5209 unsigned ADPRE1 : 1;
5210 unsigned ADPRE2 : 1;
5211 unsigned ADPRE3 : 1;
5212 unsigned ADPRE4 : 1;
5213 unsigned ADPRE5 : 1;
5214 unsigned ADPRE6 : 1;
5215 unsigned : 1;
5218 struct
5220 unsigned ADPRE : 7;
5221 unsigned : 1;
5223 } __AAD2PREbits_t;
5225 extern __at(0x0796) volatile __AAD2PREbits_t AAD2PREbits;
5227 #define _AAD2PRE_ADPRE0 0x01
5228 #define _AAD2PRE_ADPRE1 0x02
5229 #define _AAD2PRE_ADPRE2 0x04
5230 #define _AAD2PRE_ADPRE3 0x08
5231 #define _AAD2PRE_ADPRE4 0x10
5232 #define _AAD2PRE_ADPRE5 0x20
5233 #define _AAD2PRE_ADPRE6 0x40
5235 //==============================================================================
5238 //==============================================================================
5239 // AD2PRE Bits
5241 extern __at(0x0796) __sfr AD2PRE;
5243 typedef union
5245 struct
5247 unsigned ADPRE0 : 1;
5248 unsigned ADPRE1 : 1;
5249 unsigned ADPRE2 : 1;
5250 unsigned ADPRE3 : 1;
5251 unsigned ADPRE4 : 1;
5252 unsigned ADPRE5 : 1;
5253 unsigned ADPRE6 : 1;
5254 unsigned : 1;
5257 struct
5259 unsigned ADPRE : 7;
5260 unsigned : 1;
5262 } __AD2PREbits_t;
5264 extern __at(0x0796) volatile __AD2PREbits_t AD2PREbits;
5266 #define _AD2PRE_ADPRE0 0x01
5267 #define _AD2PRE_ADPRE1 0x02
5268 #define _AD2PRE_ADPRE2 0x04
5269 #define _AD2PRE_ADPRE3 0x08
5270 #define _AD2PRE_ADPRE4 0x10
5271 #define _AD2PRE_ADPRE5 0x20
5272 #define _AD2PRE_ADPRE6 0x40
5274 //==============================================================================
5277 //==============================================================================
5278 // AD2PRECON Bits
5280 extern __at(0x0796) __sfr AD2PRECON;
5282 typedef union
5284 struct
5286 unsigned ADPRE0 : 1;
5287 unsigned ADPRE1 : 1;
5288 unsigned ADPRE2 : 1;
5289 unsigned ADPRE3 : 1;
5290 unsigned ADPRE4 : 1;
5291 unsigned ADPRE5 : 1;
5292 unsigned ADPRE6 : 1;
5293 unsigned : 1;
5296 struct
5298 unsigned ADPRE : 7;
5299 unsigned : 1;
5301 } __AD2PRECONbits_t;
5303 extern __at(0x0796) volatile __AD2PRECONbits_t AD2PRECONbits;
5305 #define _AD2PRECON_ADPRE0 0x01
5306 #define _AD2PRECON_ADPRE1 0x02
5307 #define _AD2PRECON_ADPRE2 0x04
5308 #define _AD2PRECON_ADPRE3 0x08
5309 #define _AD2PRECON_ADPRE4 0x10
5310 #define _AD2PRECON_ADPRE5 0x20
5311 #define _AD2PRECON_ADPRE6 0x40
5313 //==============================================================================
5316 //==============================================================================
5317 // AAD2ACQ Bits
5319 extern __at(0x0797) __sfr AAD2ACQ;
5321 typedef union
5323 struct
5325 unsigned ADACQ0 : 1;
5326 unsigned ADACQ1 : 1;
5327 unsigned ADACQ2 : 1;
5328 unsigned ADACQ3 : 1;
5329 unsigned ADACQ4 : 1;
5330 unsigned ADACQ5 : 1;
5331 unsigned ADACQ6 : 1;
5332 unsigned : 1;
5335 struct
5337 unsigned ADACQ : 7;
5338 unsigned : 1;
5340 } __AAD2ACQbits_t;
5342 extern __at(0x0797) volatile __AAD2ACQbits_t AAD2ACQbits;
5344 #define _AAD2ACQ_ADACQ0 0x01
5345 #define _AAD2ACQ_ADACQ1 0x02
5346 #define _AAD2ACQ_ADACQ2 0x04
5347 #define _AAD2ACQ_ADACQ3 0x08
5348 #define _AAD2ACQ_ADACQ4 0x10
5349 #define _AAD2ACQ_ADACQ5 0x20
5350 #define _AAD2ACQ_ADACQ6 0x40
5352 //==============================================================================
5355 //==============================================================================
5356 // AD2ACQ Bits
5358 extern __at(0x0797) __sfr AD2ACQ;
5360 typedef union
5362 struct
5364 unsigned ADACQ0 : 1;
5365 unsigned ADACQ1 : 1;
5366 unsigned ADACQ2 : 1;
5367 unsigned ADACQ3 : 1;
5368 unsigned ADACQ4 : 1;
5369 unsigned ADACQ5 : 1;
5370 unsigned ADACQ6 : 1;
5371 unsigned : 1;
5374 struct
5376 unsigned ADACQ : 7;
5377 unsigned : 1;
5379 } __AD2ACQbits_t;
5381 extern __at(0x0797) volatile __AD2ACQbits_t AD2ACQbits;
5383 #define _AD2ACQ_ADACQ0 0x01
5384 #define _AD2ACQ_ADACQ1 0x02
5385 #define _AD2ACQ_ADACQ2 0x04
5386 #define _AD2ACQ_ADACQ3 0x08
5387 #define _AD2ACQ_ADACQ4 0x10
5388 #define _AD2ACQ_ADACQ5 0x20
5389 #define _AD2ACQ_ADACQ6 0x40
5391 //==============================================================================
5394 //==============================================================================
5395 // AD2ACQCON Bits
5397 extern __at(0x0797) __sfr AD2ACQCON;
5399 typedef union
5401 struct
5403 unsigned ADACQ0 : 1;
5404 unsigned ADACQ1 : 1;
5405 unsigned ADACQ2 : 1;
5406 unsigned ADACQ3 : 1;
5407 unsigned ADACQ4 : 1;
5408 unsigned ADACQ5 : 1;
5409 unsigned ADACQ6 : 1;
5410 unsigned : 1;
5413 struct
5415 unsigned ADACQ : 7;
5416 unsigned : 1;
5418 } __AD2ACQCONbits_t;
5420 extern __at(0x0797) volatile __AD2ACQCONbits_t AD2ACQCONbits;
5422 #define _AD2ACQCON_ADACQ0 0x01
5423 #define _AD2ACQCON_ADACQ1 0x02
5424 #define _AD2ACQCON_ADACQ2 0x04
5425 #define _AD2ACQCON_ADACQ3 0x08
5426 #define _AD2ACQCON_ADACQ4 0x10
5427 #define _AD2ACQCON_ADACQ5 0x20
5428 #define _AD2ACQCON_ADACQ6 0x40
5430 //==============================================================================
5433 //==============================================================================
5434 // AAD2GRD Bits
5436 extern __at(0x0798) __sfr AAD2GRD;
5438 typedef union
5440 struct
5442 unsigned TX2POL : 1;
5443 unsigned : 1;
5444 unsigned : 1;
5445 unsigned : 1;
5446 unsigned : 1;
5447 unsigned GRD2POL : 1;
5448 unsigned GRD2AOE : 1;
5449 unsigned GRD2BOE : 1;
5452 struct
5454 unsigned TXPOL : 1;
5455 unsigned : 1;
5456 unsigned : 1;
5457 unsigned : 1;
5458 unsigned : 1;
5459 unsigned GRDPOL : 1;
5460 unsigned GRDAOE : 1;
5461 unsigned GRDBOE : 1;
5463 } __AAD2GRDbits_t;
5465 extern __at(0x0798) volatile __AAD2GRDbits_t AAD2GRDbits;
5467 #define _AAD2GRD_TX2POL 0x01
5468 #define _AAD2GRD_TXPOL 0x01
5469 #define _AAD2GRD_GRD2POL 0x20
5470 #define _AAD2GRD_GRDPOL 0x20
5471 #define _AAD2GRD_GRD2AOE 0x40
5472 #define _AAD2GRD_GRDAOE 0x40
5473 #define _AAD2GRD_GRD2BOE 0x80
5474 #define _AAD2GRD_GRDBOE 0x80
5476 //==============================================================================
5479 //==============================================================================
5480 // AD2GRD Bits
5482 extern __at(0x0798) __sfr AD2GRD;
5484 typedef union
5486 struct
5488 unsigned TX2POL : 1;
5489 unsigned : 1;
5490 unsigned : 1;
5491 unsigned : 1;
5492 unsigned : 1;
5493 unsigned GRD2POL : 1;
5494 unsigned GRD2AOE : 1;
5495 unsigned GRD2BOE : 1;
5498 struct
5500 unsigned TXPOL : 1;
5501 unsigned : 1;
5502 unsigned : 1;
5503 unsigned : 1;
5504 unsigned : 1;
5505 unsigned GRDPOL : 1;
5506 unsigned GRDAOE : 1;
5507 unsigned GRDBOE : 1;
5509 } __AD2GRDbits_t;
5511 extern __at(0x0798) volatile __AD2GRDbits_t AD2GRDbits;
5513 #define _AD2GRD_TX2POL 0x01
5514 #define _AD2GRD_TXPOL 0x01
5515 #define _AD2GRD_GRD2POL 0x20
5516 #define _AD2GRD_GRDPOL 0x20
5517 #define _AD2GRD_GRD2AOE 0x40
5518 #define _AD2GRD_GRDAOE 0x40
5519 #define _AD2GRD_GRD2BOE 0x80
5520 #define _AD2GRD_GRDBOE 0x80
5522 //==============================================================================
5525 //==============================================================================
5526 // AAD2CAP Bits
5528 extern __at(0x0799) __sfr AAD2CAP;
5530 typedef union
5532 struct
5534 unsigned ADDCAP0 : 1;
5535 unsigned ADDCAP1 : 1;
5536 unsigned ADDCAP2 : 1;
5537 unsigned ADDCAP3 : 1;
5538 unsigned : 1;
5539 unsigned : 1;
5540 unsigned : 1;
5541 unsigned : 1;
5544 struct
5546 unsigned ADDCAP : 4;
5547 unsigned : 4;
5549 } __AAD2CAPbits_t;
5551 extern __at(0x0799) volatile __AAD2CAPbits_t AAD2CAPbits;
5553 #define _AAD2CAP_ADDCAP0 0x01
5554 #define _AAD2CAP_ADDCAP1 0x02
5555 #define _AAD2CAP_ADDCAP2 0x04
5556 #define _AAD2CAP_ADDCAP3 0x08
5558 //==============================================================================
5561 //==============================================================================
5562 // AAD2CAPCON Bits
5564 extern __at(0x0799) __sfr AAD2CAPCON;
5566 typedef union
5568 struct
5570 unsigned ADDCAP0 : 1;
5571 unsigned ADDCAP1 : 1;
5572 unsigned ADDCAP2 : 1;
5573 unsigned ADDCAP3 : 1;
5574 unsigned : 1;
5575 unsigned : 1;
5576 unsigned : 1;
5577 unsigned : 1;
5580 struct
5582 unsigned ADDCAP : 4;
5583 unsigned : 4;
5585 } __AAD2CAPCONbits_t;
5587 extern __at(0x0799) volatile __AAD2CAPCONbits_t AAD2CAPCONbits;
5589 #define _AAD2CAPCON_ADDCAP0 0x01
5590 #define _AAD2CAPCON_ADDCAP1 0x02
5591 #define _AAD2CAPCON_ADDCAP2 0x04
5592 #define _AAD2CAPCON_ADDCAP3 0x08
5594 //==============================================================================
5597 //==============================================================================
5598 // AD2CAPCON Bits
5600 extern __at(0x0799) __sfr AD2CAPCON;
5602 typedef union
5604 struct
5606 unsigned ADDCAP0 : 1;
5607 unsigned ADDCAP1 : 1;
5608 unsigned ADDCAP2 : 1;
5609 unsigned ADDCAP3 : 1;
5610 unsigned : 1;
5611 unsigned : 1;
5612 unsigned : 1;
5613 unsigned : 1;
5616 struct
5618 unsigned ADDCAP : 4;
5619 unsigned : 4;
5621 } __AD2CAPCONbits_t;
5623 extern __at(0x0799) volatile __AD2CAPCONbits_t AD2CAPCONbits;
5625 #define _AD2CAPCON_ADDCAP0 0x01
5626 #define _AD2CAPCON_ADDCAP1 0x02
5627 #define _AD2CAPCON_ADDCAP2 0x04
5628 #define _AD2CAPCON_ADDCAP3 0x08
5630 //==============================================================================
5632 extern __at(0x079A) __sfr AAD2RES0;
5633 extern __at(0x079A) __sfr AAD2RES0L;
5634 extern __at(0x079A) __sfr AD2RES0;
5635 extern __at(0x079B) __sfr AAD2RES0H;
5636 extern __at(0x079C) __sfr AAD2RES1;
5637 extern __at(0x079C) __sfr AAD2RES1L;
5638 extern __at(0x079C) __sfr AD2RES1;
5639 extern __at(0x079D) __sfr AAD2RES1H;
5640 extern __at(0x079E) __sfr AAD2CH;
5642 //==============================================================================
5643 // AAD2CH0 Bits
5645 extern __at(0x079E) __sfr AAD2CH0;
5647 typedef struct
5649 unsigned CH20 : 1;
5650 unsigned CH21 : 1;
5651 unsigned CH22 : 1;
5652 unsigned CH23 : 1;
5653 unsigned CH24 : 1;
5654 unsigned CH25 : 1;
5655 unsigned CH26 : 1;
5656 unsigned CH27 : 1;
5657 } __AAD2CH0bits_t;
5659 extern __at(0x079E) volatile __AAD2CH0bits_t AAD2CH0bits;
5661 #define _CH20 0x01
5662 #define _CH21 0x02
5663 #define _CH22 0x04
5664 #define _CH23 0x08
5665 #define _CH24 0x10
5666 #define _CH25 0x20
5667 #define _CH26 0x40
5668 #define _CH27 0x80
5670 //==============================================================================
5672 extern __at(0x079E) __sfr AD2CH;
5674 //==============================================================================
5675 // AD2CH0 Bits
5677 extern __at(0x079E) __sfr AD2CH0;
5679 typedef struct
5681 unsigned CH20 : 1;
5682 unsigned CH21 : 1;
5683 unsigned CH22 : 1;
5684 unsigned CH23 : 1;
5685 unsigned CH24 : 1;
5686 unsigned CH25 : 1;
5687 unsigned CH26 : 1;
5688 unsigned CH27 : 1;
5689 } __AD2CH0bits_t;
5691 extern __at(0x079E) volatile __AD2CH0bits_t AD2CH0bits;
5693 #define _AD2CH0_CH20 0x01
5694 #define _AD2CH0_CH21 0x02
5695 #define _AD2CH0_CH22 0x04
5696 #define _AD2CH0_CH23 0x08
5697 #define _AD2CH0_CH24 0x10
5698 #define _AD2CH0_CH25 0x20
5699 #define _AD2CH0_CH26 0x40
5700 #define _AD2CH0_CH27 0x80
5702 //==============================================================================
5705 //==============================================================================
5706 // AAD2CH1 Bits
5708 extern __at(0x079F) __sfr AAD2CH1;
5710 typedef struct
5712 unsigned CH28 : 1;
5713 unsigned CH29 : 1;
5714 unsigned CH40 : 1;
5715 unsigned : 1;
5716 unsigned : 1;
5717 unsigned : 1;
5718 unsigned : 1;
5719 unsigned : 1;
5720 } __AAD2CH1bits_t;
5722 extern __at(0x079F) volatile __AAD2CH1bits_t AAD2CH1bits;
5724 #define _CH28 0x01
5725 #define _CH29 0x02
5726 #define _CH40 0x04
5728 //==============================================================================
5731 //==============================================================================
5732 // AD2CH1 Bits
5734 extern __at(0x079F) __sfr AD2CH1;
5736 typedef struct
5738 unsigned CH28 : 1;
5739 unsigned CH29 : 1;
5740 unsigned CH40 : 1;
5741 unsigned : 1;
5742 unsigned : 1;
5743 unsigned : 1;
5744 unsigned : 1;
5745 unsigned : 1;
5746 } __AD2CH1bits_t;
5748 extern __at(0x079F) volatile __AD2CH1bits_t AD2CH1bits;
5750 #define _AD2CH1_CH28 0x01
5751 #define _AD2CH1_CH29 0x02
5752 #define _AD2CH1_CH40 0x04
5754 //==============================================================================
5757 //==============================================================================
5758 // ICDIO Bits
5760 extern __at(0x0F8C) __sfr ICDIO;
5762 typedef struct
5764 unsigned : 1;
5765 unsigned : 1;
5766 unsigned TRIS_ICDCLK : 1;
5767 unsigned TRIS_ICDDAT : 1;
5768 unsigned LAT_ICDCLK : 1;
5769 unsigned LAT_ICDDAT : 1;
5770 unsigned PORT_ICDCLK : 1;
5771 unsigned PORT_ICDDAT : 1;
5772 } __ICDIObits_t;
5774 extern __at(0x0F8C) volatile __ICDIObits_t ICDIObits;
5776 #define _TRIS_ICDCLK 0x04
5777 #define _TRIS_ICDDAT 0x08
5778 #define _LAT_ICDCLK 0x10
5779 #define _LAT_ICDDAT 0x20
5780 #define _PORT_ICDCLK 0x40
5781 #define _PORT_ICDDAT 0x80
5783 //==============================================================================
5786 //==============================================================================
5787 // ICDCON0 Bits
5789 extern __at(0x0F8D) __sfr ICDCON0;
5791 typedef struct
5793 unsigned RSTVEC : 1;
5794 unsigned : 1;
5795 unsigned : 1;
5796 unsigned DBGINEX : 1;
5797 unsigned : 1;
5798 unsigned SSTEP : 1;
5799 unsigned FREEZ : 1;
5800 unsigned INBUG : 1;
5801 } __ICDCON0bits_t;
5803 extern __at(0x0F8D) volatile __ICDCON0bits_t ICDCON0bits;
5805 #define _RSTVEC 0x01
5806 #define _DBGINEX 0x08
5807 #define _SSTEP 0x20
5808 #define _FREEZ 0x40
5809 #define _INBUG 0x80
5811 //==============================================================================
5814 //==============================================================================
5815 // ICDSTAT Bits
5817 extern __at(0x0F91) __sfr ICDSTAT;
5819 typedef struct
5821 unsigned : 1;
5822 unsigned USRHLTF : 1;
5823 unsigned : 1;
5824 unsigned : 1;
5825 unsigned : 1;
5826 unsigned : 1;
5827 unsigned TRP0HLTF : 1;
5828 unsigned TRP1HLTF : 1;
5829 } __ICDSTATbits_t;
5831 extern __at(0x0F91) volatile __ICDSTATbits_t ICDSTATbits;
5833 #define _USRHLTF 0x02
5834 #define _TRP0HLTF 0x40
5835 #define _TRP1HLTF 0x80
5837 //==============================================================================
5840 //==============================================================================
5841 // ICDINSTL Bits
5843 extern __at(0x0F96) __sfr ICDINSTL;
5845 typedef struct
5847 unsigned DBGIN0 : 1;
5848 unsigned DBGIN1 : 1;
5849 unsigned DBGIN2 : 1;
5850 unsigned DBGIN3 : 1;
5851 unsigned DBGIN4 : 1;
5852 unsigned DBGIN5 : 1;
5853 unsigned DBGIN6 : 1;
5854 unsigned DBGIN7 : 1;
5855 } __ICDINSTLbits_t;
5857 extern __at(0x0F96) volatile __ICDINSTLbits_t ICDINSTLbits;
5859 #define _DBGIN0 0x01
5860 #define _DBGIN1 0x02
5861 #define _DBGIN2 0x04
5862 #define _DBGIN3 0x08
5863 #define _DBGIN4 0x10
5864 #define _DBGIN5 0x20
5865 #define _DBGIN6 0x40
5866 #define _DBGIN7 0x80
5868 //==============================================================================
5871 //==============================================================================
5872 // ICDINSTH Bits
5874 extern __at(0x0F97) __sfr ICDINSTH;
5876 typedef struct
5878 unsigned DBGIN8 : 1;
5879 unsigned DBGIN9 : 1;
5880 unsigned DBGIN10 : 1;
5881 unsigned DBGIN11 : 1;
5882 unsigned DBGIN12 : 1;
5883 unsigned DBGIN13 : 1;
5884 unsigned : 1;
5885 unsigned : 1;
5886 } __ICDINSTHbits_t;
5888 extern __at(0x0F97) volatile __ICDINSTHbits_t ICDINSTHbits;
5890 #define _DBGIN8 0x01
5891 #define _DBGIN9 0x02
5892 #define _DBGIN10 0x04
5893 #define _DBGIN11 0x08
5894 #define _DBGIN12 0x10
5895 #define _DBGIN13 0x20
5897 //==============================================================================
5900 //==============================================================================
5901 // ICDBK0CON Bits
5903 extern __at(0x0F9C) __sfr ICDBK0CON;
5905 typedef struct
5907 unsigned BKHLT : 1;
5908 unsigned : 1;
5909 unsigned : 1;
5910 unsigned : 1;
5911 unsigned : 1;
5912 unsigned : 1;
5913 unsigned : 1;
5914 unsigned BKEN : 1;
5915 } __ICDBK0CONbits_t;
5917 extern __at(0x0F9C) volatile __ICDBK0CONbits_t ICDBK0CONbits;
5919 #define _BKHLT 0x01
5920 #define _BKEN 0x80
5922 //==============================================================================
5925 //==============================================================================
5926 // ICDBK0L Bits
5928 extern __at(0x0F9D) __sfr ICDBK0L;
5930 typedef struct
5932 unsigned BKA0 : 1;
5933 unsigned BKA1 : 1;
5934 unsigned BKA2 : 1;
5935 unsigned BKA3 : 1;
5936 unsigned BKA4 : 1;
5937 unsigned BKA5 : 1;
5938 unsigned BKA6 : 1;
5939 unsigned BKA7 : 1;
5940 } __ICDBK0Lbits_t;
5942 extern __at(0x0F9D) volatile __ICDBK0Lbits_t ICDBK0Lbits;
5944 #define _BKA0 0x01
5945 #define _BKA1 0x02
5946 #define _BKA2 0x04
5947 #define _BKA3 0x08
5948 #define _BKA4 0x10
5949 #define _BKA5 0x20
5950 #define _BKA6 0x40
5951 #define _BKA7 0x80
5953 //==============================================================================
5956 //==============================================================================
5957 // ICDBK0H Bits
5959 extern __at(0x0F9E) __sfr ICDBK0H;
5961 typedef struct
5963 unsigned BKA8 : 1;
5964 unsigned BKA9 : 1;
5965 unsigned BKA10 : 1;
5966 unsigned BKA11 : 1;
5967 unsigned BKA12 : 1;
5968 unsigned BKA13 : 1;
5969 unsigned BKA14 : 1;
5970 unsigned : 1;
5971 } __ICDBK0Hbits_t;
5973 extern __at(0x0F9E) volatile __ICDBK0Hbits_t ICDBK0Hbits;
5975 #define _BKA8 0x01
5976 #define _BKA9 0x02
5977 #define _BKA10 0x04
5978 #define _BKA11 0x08
5979 #define _BKA12 0x10
5980 #define _BKA13 0x20
5981 #define _BKA14 0x40
5983 //==============================================================================
5985 extern __at(0x0FE3) __sfr BSRICDSHAD;
5987 //==============================================================================
5988 // STATUS_SHAD Bits
5990 extern __at(0x0FE4) __sfr STATUS_SHAD;
5992 typedef struct
5994 unsigned C_SHAD : 1;
5995 unsigned DC_SHAD : 1;
5996 unsigned Z_SHAD : 1;
5997 unsigned : 1;
5998 unsigned : 1;
5999 unsigned : 1;
6000 unsigned : 1;
6001 unsigned : 1;
6002 } __STATUS_SHADbits_t;
6004 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
6006 #define _C_SHAD 0x01
6007 #define _DC_SHAD 0x02
6008 #define _Z_SHAD 0x04
6010 //==============================================================================
6012 extern __at(0x0FE5) __sfr WREG_SHAD;
6013 extern __at(0x0FE6) __sfr BSR_SHAD;
6014 extern __at(0x0FE7) __sfr PCLATH_SHAD;
6015 extern __at(0x0FE8) __sfr FSR0L_SHAD;
6016 extern __at(0x0FE9) __sfr FSR0H_SHAD;
6017 extern __at(0x0FEA) __sfr FSR1L_SHAD;
6018 extern __at(0x0FEB) __sfr FSR1H_SHAD;
6019 extern __at(0x0FED) __sfr STKPTR;
6020 extern __at(0x0FEE) __sfr TOSL;
6021 extern __at(0x0FEF) __sfr TOSH;
6023 //==============================================================================
6025 // Configuration Bits
6027 //==============================================================================
6029 #define _CONFIG1 0x8007
6030 #define _CONFIG2 0x8008
6032 //----------------------------- CONFIG1 Options -------------------------------
6034 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
6035 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pins.
6036 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pins.
6037 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pins.
6038 #define _WDTE_OFF 0x3FE7 // WDT disabled. SWDTEN bit is ignored.
6039 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
6040 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep. SWDTEN bit is ignored.
6041 #define _WDTE_ON 0x3FFF // WDT enabled. SWDTEN bit is ignored.
6042 #define _PWRTE_ON 0x3FDF // PWRT enabled.
6043 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
6044 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
6045 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
6046 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
6047 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
6048 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled. SBOREN bit is ignored.
6049 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
6050 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep. SBOREN bit is ignored.
6051 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
6052 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
6053 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
6055 //----------------------------- CONFIG2 Options -------------------------------
6057 #define _WRT_ALL 0x3FFC // 000h to FFFh write protected, no addresses may be modified by PMCON control.
6058 #define _WRT_HALF 0x3FFD // 000h to 7FFh write protected, 800h to FFFh may be modified by PMCON control.
6059 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to FFFh may be modified by PMCON control.
6060 #define _WRT_OFF 0x3FFF // Write protection off.
6061 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
6062 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
6063 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), 2.7V trip point selected.
6064 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), 1.9V trip point selected.
6065 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
6066 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
6067 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
6068 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
6070 //==============================================================================
6072 #define _DEVID1 0x8006
6074 #define _IDLOC0 0x8000
6075 #define _IDLOC1 0x8001
6076 #define _IDLOC2 0x8002
6077 #define _IDLOC3 0x8003
6079 //==============================================================================
6081 #ifndef NO_BIT_DEFINES
6083 #define ADACQ0 AAD1ACQbits.ADACQ0 // bit 0
6084 #define ADACQ1 AAD1ACQbits.ADACQ1 // bit 1
6085 #define ADACQ2 AAD1ACQbits.ADACQ2 // bit 2
6086 #define ADACQ3 AAD1ACQbits.ADACQ3 // bit 3
6087 #define ADACQ4 AAD1ACQbits.ADACQ4 // bit 4
6088 #define ADACQ5 AAD1ACQbits.ADACQ5 // bit 5
6089 #define ADACQ6 AAD1ACQbits.ADACQ6 // bit 6
6091 #define ADDCAP0 AAD1CAPbits.ADDCAP0 // bit 0
6092 #define ADDCAP1 AAD1CAPbits.ADDCAP1 // bit 1
6093 #define ADDCAP2 AAD1CAPbits.ADDCAP2 // bit 2
6094 #define ADDCAP3 AAD1CAPbits.ADDCAP3 // bit 3
6096 #define CH10 AAD1CH0bits.CH10 // bit 0
6097 #define CH11 AAD1CH0bits.CH11 // bit 1
6098 #define CH12 AAD1CH0bits.CH12 // bit 2
6099 #define CH13 AAD1CH0bits.CH13 // bit 3
6100 #define CH14 AAD1CH0bits.CH14 // bit 4
6101 #define CH15 AAD1CH0bits.CH15 // bit 5
6102 #define CH16 AAD1CH0bits.CH16 // bit 6
6103 #define CHS17 AAD1CH0bits.CHS17 // bit 7
6105 #define CH18 AAD1CH1bits.CH18 // bit 0
6106 #define CH19 AAD1CH1bits.CH19 // bit 1
6108 #define ADON AAD1CON0bits.ADON // bit 0, shadows bit in AAD1CON0bits
6109 #define AD1ON AAD1CON0bits.AD1ON // bit 0, shadows bit in AAD1CON0bits
6110 #define GO AAD1CON0bits.GO // bit 1, shadows bit in AAD1CON0bits
6111 #define GO_NOT_DONE AAD1CON0bits.GO_NOT_DONE // bit 1, shadows bit in AAD1CON0bits
6112 #define GO_NOT_DONE1 AAD1CON0bits.GO_NOT_DONE1 // bit 1, shadows bit in AAD1CON0bits
6113 #define CHS0 AAD1CON0bits.CHS0 // bit 2
6114 #define CHS1 AAD1CON0bits.CHS1 // bit 3
6115 #define CHS2 AAD1CON0bits.CHS2 // bit 4
6116 #define CHS3 AAD1CON0bits.CHS3 // bit 5
6117 #define CHS4 AAD1CON0bits.CHS4 // bit 6
6118 #define CHS5 AAD1CON0bits.CHS5 // bit 7
6120 #define TRIGSEL0 AAD1CON2bits.TRIGSEL0 // bit 4
6121 #define TRIGSEL1 AAD1CON2bits.TRIGSEL1 // bit 5
6122 #define TRIGSEL2 AAD1CON2bits.TRIGSEL2 // bit 6
6124 #define AD1DSEN AAD1CON3bits.AD1DSEN // bit 0, shadows bit in AAD1CON3bits
6125 #define ADDSEN AAD1CON3bits.ADDSEN // bit 0, shadows bit in AAD1CON3bits
6126 #define AD1IPEN AAD1CON3bits.AD1IPEN // bit 1, shadows bit in AAD1CON3bits
6127 #define ADIPEN AAD1CON3bits.ADIPEN // bit 1, shadows bit in AAD1CON3bits
6128 #define AD1IPPOL AAD1CON3bits.AD1IPPOL // bit 6, shadows bit in AAD1CON3bits
6129 #define ADIPPOL AAD1CON3bits.ADIPPOL // bit 6, shadows bit in AAD1CON3bits
6130 #define AD1EPPOL AAD1CON3bits.AD1EPPOL // bit 7, shadows bit in AAD1CON3bits
6131 #define ADEPPOL AAD1CON3bits.ADEPPOL // bit 7, shadows bit in AAD1CON3bits
6133 #define TX1POL AAD1GRDbits.TX1POL // bit 0, shadows bit in AAD1GRDbits
6134 #define TXPOL AAD1GRDbits.TXPOL // bit 0, shadows bit in AAD1GRDbits
6135 #define GRD1POL AAD1GRDbits.GRD1POL // bit 5, shadows bit in AAD1GRDbits
6136 #define GRDPOL AAD1GRDbits.GRDPOL // bit 5, shadows bit in AAD1GRDbits
6137 #define GRD1AOE AAD1GRDbits.GRD1AOE // bit 6, shadows bit in AAD1GRDbits
6138 #define GRDAOE AAD1GRDbits.GRDAOE // bit 6, shadows bit in AAD1GRDbits
6139 #define GRD1BOE AAD1GRDbits.GRD1BOE // bit 7, shadows bit in AAD1GRDbits
6140 #define GRDBOE AAD1GRDbits.GRDBOE // bit 7, shadows bit in AAD1GRDbits
6142 #define ADPRE0 AAD1PREbits.ADPRE0 // bit 0
6143 #define ADPRE1 AAD1PREbits.ADPRE1 // bit 1
6144 #define ADPRE2 AAD1PREbits.ADPRE2 // bit 2
6145 #define ADPRE3 AAD1PREbits.ADPRE3 // bit 3
6146 #define ADPRE4 AAD1PREbits.ADPRE4 // bit 4
6147 #define ADPRE5 AAD1PREbits.ADPRE5 // bit 5
6148 #define ADPRE6 AAD1PREbits.ADPRE6 // bit 6
6150 #define TX10 AAD1TX0bits.TX10 // bit 0
6151 #define TX11 AAD1TX0bits.TX11 // bit 1
6152 #define TX12 AAD1TX0bits.TX12 // bit 2
6153 #define TX13 AAD1TX0bits.TX13 // bit 3
6154 #define TX14 AAD1TX0bits.TX14 // bit 4
6155 #define TX15 AAD1TX0bits.TX15 // bit 5
6156 #define TX16 AAD1TX0bits.TX16 // bit 6
6157 #define TX17 AAD1TX0bits.TX17 // bit 7
6159 #define TX18 AAD1TX1bits.TX18 // bit 0
6160 #define TX19 AAD1TX1bits.TX19 // bit 1
6162 #define CH20 AAD2CH0bits.CH20 // bit 0
6163 #define CH21 AAD2CH0bits.CH21 // bit 1
6164 #define CH22 AAD2CH0bits.CH22 // bit 2
6165 #define CH23 AAD2CH0bits.CH23 // bit 3
6166 #define CH24 AAD2CH0bits.CH24 // bit 4
6167 #define CH25 AAD2CH0bits.CH25 // bit 5
6168 #define CH26 AAD2CH0bits.CH26 // bit 6
6169 #define CH27 AAD2CH0bits.CH27 // bit 7
6171 #define CH28 AAD2CH1bits.CH28 // bit 0
6172 #define CH29 AAD2CH1bits.CH29 // bit 1
6173 #define CH40 AAD2CH1bits.CH40 // bit 2
6175 #define TX20 AAD2TX0bits.TX20 // bit 0
6176 #define TX21 AAD2TX0bits.TX21 // bit 1
6177 #define TX22 AAD2TX0bits.TX22 // bit 2
6178 #define TX23 AAD2TX0bits.TX23 // bit 3
6179 #define TX24 AAD2TX0bits.TX24 // bit 4
6180 #define TX25 AAD2TX0bits.TX25 // bit 5
6181 #define TX26 AAD2TX0bits.TX26 // bit 6
6182 #define TX27 AAD2TX0bits.TX27 // bit 7
6184 #define TX28 AAD2TX1bits.TX28 // bit 0
6185 #define TX29 AAD2TX1bits.TX29 // bit 1
6186 #define TX40 AAD2TX1bits.TX40 // bit 2
6188 #define ADPREF0 AADCON1bits.ADPREF0 // bit 0
6189 #define ADPREF1 AADCON1bits.ADPREF1 // bit 1
6190 #define GO_NOT_DONE_ALL AADCON1bits.GO_NOT_DONE_ALL // bit 2, shadows bit in AADCON1bits
6191 #define GO_ALL AADCON1bits.GO_ALL // bit 2, shadows bit in AADCON1bits
6192 #define ADNREF AADCON1bits.ADNREF // bit 3
6193 #define ADCS0 AADCON1bits.ADCS0 // bit 4
6194 #define ADCS1 AADCON1bits.ADCS1 // bit 5
6195 #define ADCS2 AADCON1bits.ADCS2 // bit 6
6196 #define ADFM AADCON1bits.ADFM // bit 7
6198 #define AD1STG0 AADSTATbits.AD1STG0 // bit 0
6199 #define AD1STG1 AADSTATbits.AD1STG1 // bit 1
6200 #define AD1CONV AADSTATbits.AD1CONV // bit 2, shadows bit in AADSTATbits
6201 #define ADCONV AADSTATbits.ADCONV // bit 2, shadows bit in AADSTATbits
6202 #define AD2STG0 AADSTATbits.AD2STG0 // bit 4
6203 #define AD2STG1 AADSTATbits.AD2STG1 // bit 5
6204 #define AD2CONV AADSTATbits.AD2CONV // bit 6
6206 #define A1TX0 ADCTXbits.A1TX0 // bit 0
6207 #define A1TX1 ADCTXbits.A1TX1 // bit 1
6208 #define A1TX2 ADCTXbits.A1TX2 // bit 2
6209 #define A2TX0 ADCTXbits.A2TX0 // bit 4
6210 #define A2TX1 ADCTXbits.A2TX1 // bit 5
6211 #define A2TX2 ADCTXbits.A2TX2 // bit 6
6213 #define ANSA0 ANSELAbits.ANSA0 // bit 0
6214 #define ANSA1 ANSELAbits.ANSA1 // bit 1
6215 #define ANSA2 ANSELAbits.ANSA2 // bit 2
6216 #define ANSA3 ANSELAbits.ANSA3 // bit 3
6217 #define ANSA4 ANSELAbits.ANSA4 // bit 4
6218 #define ANSA5 ANSELAbits.ANSA5 // bit 5
6219 #define ANSA6 ANSELAbits.ANSA6 // bit 6
6220 #define ANSA7 ANSELAbits.ANSA7 // bit 7
6222 #define ANSB0 ANSELBbits.ANSB0 // bit 0
6223 #define ANSB1 ANSELBbits.ANSB1 // bit 1
6224 #define ANSB2 ANSELBbits.ANSB2 // bit 2
6225 #define ANSB3 ANSELBbits.ANSB3 // bit 3
6226 #define ANSB4 ANSELBbits.ANSB4 // bit 4
6227 #define ANSB5 ANSELBbits.ANSB5 // bit 5
6228 #define ANSB6 ANSELBbits.ANSB6 // bit 6
6229 #define ANSB7 ANSELBbits.ANSB7 // bit 7
6231 #define ANSC0 ANSELCbits.ANSC0 // bit 0
6232 #define ANSC1 ANSELCbits.ANSC1 // bit 1
6233 #define ANSC2 ANSELCbits.ANSC2 // bit 2
6234 #define ANSC3 ANSELCbits.ANSC3 // bit 3
6235 #define ANSC4 ANSELCbits.ANSC4 // bit 4
6236 #define ANSC5 ANSELCbits.ANSC5 // bit 5
6237 #define ANSC6 ANSELCbits.ANSC6 // bit 6
6238 #define ANSC7 ANSELCbits.ANSC7 // bit 7
6240 #define GRDASEL APFCONbits.GRDASEL // bit 0
6241 #define GRDBSEL APFCONbits.GRDBSEL // bit 1
6242 #define SSSEL APFCONbits.SSSEL // bit 5
6244 #define ABDEN BAUDCONbits.ABDEN // bit 0
6245 #define WUE BAUDCONbits.WUE // bit 1
6246 #define BRG16 BAUDCONbits.BRG16 // bit 3
6247 #define SCKP BAUDCONbits.SCKP // bit 4
6248 #define RCIDL BAUDCONbits.RCIDL // bit 6
6249 #define ABDOVF BAUDCONbits.ABDOVF // bit 7
6251 #define BORRDY BORCONbits.BORRDY // bit 0
6252 #define BORFS BORCONbits.BORFS // bit 6
6253 #define SBOREN BORCONbits.SBOREN // bit 7
6255 #define BSR0 BSRbits.BSR0 // bit 0
6256 #define BSR1 BSRbits.BSR1 // bit 1
6257 #define BSR2 BSRbits.BSR2 // bit 2
6258 #define BSR3 BSRbits.BSR3 // bit 3
6259 #define BSR4 BSRbits.BSR4 // bit 4
6261 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
6262 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
6263 #define TSRNG FVRCONbits.TSRNG // bit 4
6264 #define TSEN FVRCONbits.TSEN // bit 5
6265 #define FVRRDY FVRCONbits.FVRRDY // bit 6
6266 #define FVREN FVRCONbits.FVREN // bit 7
6268 #define BKHLT ICDBK0CONbits.BKHLT // bit 0
6269 #define BKEN ICDBK0CONbits.BKEN // bit 7
6271 #define BKA8 ICDBK0Hbits.BKA8 // bit 0
6272 #define BKA9 ICDBK0Hbits.BKA9 // bit 1
6273 #define BKA10 ICDBK0Hbits.BKA10 // bit 2
6274 #define BKA11 ICDBK0Hbits.BKA11 // bit 3
6275 #define BKA12 ICDBK0Hbits.BKA12 // bit 4
6276 #define BKA13 ICDBK0Hbits.BKA13 // bit 5
6277 #define BKA14 ICDBK0Hbits.BKA14 // bit 6
6279 #define BKA0 ICDBK0Lbits.BKA0 // bit 0
6280 #define BKA1 ICDBK0Lbits.BKA1 // bit 1
6281 #define BKA2 ICDBK0Lbits.BKA2 // bit 2
6282 #define BKA3 ICDBK0Lbits.BKA3 // bit 3
6283 #define BKA4 ICDBK0Lbits.BKA4 // bit 4
6284 #define BKA5 ICDBK0Lbits.BKA5 // bit 5
6285 #define BKA6 ICDBK0Lbits.BKA6 // bit 6
6286 #define BKA7 ICDBK0Lbits.BKA7 // bit 7
6288 #define RSTVEC ICDCON0bits.RSTVEC // bit 0
6289 #define DBGINEX ICDCON0bits.DBGINEX // bit 3
6290 #define SSTEP ICDCON0bits.SSTEP // bit 5
6291 #define FREEZ ICDCON0bits.FREEZ // bit 6
6292 #define INBUG ICDCON0bits.INBUG // bit 7
6294 #define DBGIN8 ICDINSTHbits.DBGIN8 // bit 0
6295 #define DBGIN9 ICDINSTHbits.DBGIN9 // bit 1
6296 #define DBGIN10 ICDINSTHbits.DBGIN10 // bit 2
6297 #define DBGIN11 ICDINSTHbits.DBGIN11 // bit 3
6298 #define DBGIN12 ICDINSTHbits.DBGIN12 // bit 4
6299 #define DBGIN13 ICDINSTHbits.DBGIN13 // bit 5
6301 #define DBGIN0 ICDINSTLbits.DBGIN0 // bit 0
6302 #define DBGIN1 ICDINSTLbits.DBGIN1 // bit 1
6303 #define DBGIN2 ICDINSTLbits.DBGIN2 // bit 2
6304 #define DBGIN3 ICDINSTLbits.DBGIN3 // bit 3
6305 #define DBGIN4 ICDINSTLbits.DBGIN4 // bit 4
6306 #define DBGIN5 ICDINSTLbits.DBGIN5 // bit 5
6307 #define DBGIN6 ICDINSTLbits.DBGIN6 // bit 6
6308 #define DBGIN7 ICDINSTLbits.DBGIN7 // bit 7
6310 #define TRIS_ICDCLK ICDIObits.TRIS_ICDCLK // bit 2
6311 #define TRIS_ICDDAT ICDIObits.TRIS_ICDDAT // bit 3
6312 #define LAT_ICDCLK ICDIObits.LAT_ICDCLK // bit 4
6313 #define LAT_ICDDAT ICDIObits.LAT_ICDDAT // bit 5
6314 #define PORT_ICDCLK ICDIObits.PORT_ICDCLK // bit 6
6315 #define PORT_ICDDAT ICDIObits.PORT_ICDDAT // bit 7
6317 #define USRHLTF ICDSTATbits.USRHLTF // bit 1
6318 #define TRP0HLTF ICDSTATbits.TRP0HLTF // bit 6
6319 #define TRP1HLTF ICDSTATbits.TRP1HLTF // bit 7
6321 #define IOCIF INTCONbits.IOCIF // bit 0
6322 #define INTF INTCONbits.INTF // bit 1
6323 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
6324 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
6325 #define IOCIE INTCONbits.IOCIE // bit 3
6326 #define INTE INTCONbits.INTE // bit 4
6327 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
6328 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
6329 #define PEIE INTCONbits.PEIE // bit 6
6330 #define GIE INTCONbits.GIE // bit 7
6332 #define IOCBF0 IOCBFbits.IOCBF0 // bit 0
6333 #define IOCBF1 IOCBFbits.IOCBF1 // bit 1
6334 #define IOCBF2 IOCBFbits.IOCBF2 // bit 2
6335 #define IOCBF3 IOCBFbits.IOCBF3 // bit 3
6336 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
6337 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
6338 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
6339 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
6341 #define IOCBN0 IOCBNbits.IOCBN0 // bit 0
6342 #define IOCBN1 IOCBNbits.IOCBN1 // bit 1
6343 #define IOCBN2 IOCBNbits.IOCBN2 // bit 2
6344 #define IOCBN3 IOCBNbits.IOCBN3 // bit 3
6345 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
6346 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
6347 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
6348 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
6350 #define IOCBP0 IOCBPbits.IOCBP0 // bit 0
6351 #define IOCBP1 IOCBPbits.IOCBP1 // bit 1
6352 #define IOCBP2 IOCBPbits.IOCBP2 // bit 2
6353 #define IOCBP3 IOCBPbits.IOCBP3 // bit 3
6354 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
6355 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
6356 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
6357 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
6359 #define LATA0 LATAbits.LATA0 // bit 0
6360 #define LATA1 LATAbits.LATA1 // bit 1
6361 #define LATA2 LATAbits.LATA2 // bit 2
6362 #define LATA3 LATAbits.LATA3 // bit 3
6363 #define LATA4 LATAbits.LATA4 // bit 4
6364 #define LATA5 LATAbits.LATA5 // bit 5
6365 #define LATA6 LATAbits.LATA6 // bit 6
6366 #define LATA7 LATAbits.LATA7 // bit 7
6368 #define LATB0 LATBbits.LATB0 // bit 0
6369 #define LATB1 LATBbits.LATB1 // bit 1
6370 #define LATB2 LATBbits.LATB2 // bit 2
6371 #define LATB3 LATBbits.LATB3 // bit 3
6372 #define LATB4 LATBbits.LATB4 // bit 4
6373 #define LATB5 LATBbits.LATB5 // bit 5
6374 #define LATB6 LATBbits.LATB6 // bit 6
6375 #define LATB7 LATBbits.LATB7 // bit 7
6377 #define LATC0 LATCbits.LATC0 // bit 0
6378 #define LATC1 LATCbits.LATC1 // bit 1
6379 #define LATC2 LATCbits.LATC2 // bit 2
6380 #define LATC3 LATCbits.LATC3 // bit 3
6381 #define LATC4 LATCbits.LATC4 // bit 4
6382 #define LATC5 LATCbits.LATC5 // bit 5
6383 #define LATC6 LATCbits.LATC6 // bit 6
6384 #define LATC7 LATCbits.LATC7 // bit 7
6386 #define PS0 OPTION_REGbits.PS0 // bit 0
6387 #define PS1 OPTION_REGbits.PS1 // bit 1
6388 #define PS2 OPTION_REGbits.PS2 // bit 2
6389 #define PSA OPTION_REGbits.PSA // bit 3
6390 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
6391 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
6392 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
6393 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
6394 #define INTEDG OPTION_REGbits.INTEDG // bit 6
6395 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
6397 #define SCS0 OSCCONbits.SCS0 // bit 0
6398 #define SCS1 OSCCONbits.SCS1 // bit 1
6399 #define IRCF0 OSCCONbits.IRCF0 // bit 3
6400 #define IRCF1 OSCCONbits.IRCF1 // bit 4
6401 #define IRCF2 OSCCONbits.IRCF2 // bit 5
6402 #define IRCF3 OSCCONbits.IRCF3 // bit 6
6403 #define SPLLEN OSCCONbits.SPLLEN // bit 7
6405 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
6406 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
6407 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
6408 #define PLLSR OSCSTATbits.PLLSR // bit 6
6410 #define NOT_BOR PCONbits.NOT_BOR // bit 0
6411 #define NOT_POR PCONbits.NOT_POR // bit 1
6412 #define NOT_RI PCONbits.NOT_RI // bit 2
6413 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
6414 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
6415 #define STKUNF PCONbits.STKUNF // bit 6
6416 #define STKOVF PCONbits.STKOVF // bit 7
6418 #define TMR1IE PIE1bits.TMR1IE // bit 0
6419 #define TMR2IE PIE1bits.TMR2IE // bit 1
6420 #define SSP2IE PIE1bits.SSP2IE // bit 2
6421 #define SSP1IE PIE1bits.SSP1IE // bit 3, shadows bit in PIE1bits
6422 #define SSPIE PIE1bits.SSPIE // bit 3, shadows bit in PIE1bits
6423 #define TXIE PIE1bits.TXIE // bit 4
6424 #define RCIE PIE1bits.RCIE // bit 5
6425 #define ADIE PIE1bits.ADIE // bit 6, shadows bit in PIE1bits
6426 #define AD1IE PIE1bits.AD1IE // bit 6, shadows bit in PIE1bits
6427 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
6429 #define TMR4IE PIE2bits.TMR4IE // bit 1
6430 #define BCL2IE PIE2bits.BCL2IE // bit 2
6431 #define BCL1IE PIE2bits.BCL1IE // bit 3
6432 #define AD2IE PIE2bits.AD2IE // bit 6
6434 #define TMR1IF PIR1bits.TMR1IF // bit 0
6435 #define TMR2IF PIR1bits.TMR2IF // bit 1
6436 #define SSP2IF PIR1bits.SSP2IF // bit 2
6437 #define SSP1IF PIR1bits.SSP1IF // bit 3
6438 #define TXIF PIR1bits.TXIF // bit 4
6439 #define RCIF PIR1bits.RCIF // bit 5
6440 #define ADIF PIR1bits.ADIF // bit 6, shadows bit in PIR1bits
6441 #define AD1IF PIR1bits.AD1IF // bit 6, shadows bit in PIR1bits
6442 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
6444 #define TMR4IF PIR2bits.TMR4IF // bit 1
6445 #define BCL2IF PIR2bits.BCL2IF // bit 2
6446 #define BCL1IF PIR2bits.BCL1IF // bit 3
6447 #define AD2IF PIR2bits.AD2IF // bit 6
6449 #define RD PMCON1bits.RD // bit 0
6450 #define WR PMCON1bits.WR // bit 1
6451 #define WREN PMCON1bits.WREN // bit 2
6452 #define WRERR PMCON1bits.WRERR // bit 3
6453 #define FREE PMCON1bits.FREE // bit 4
6454 #define LWLO PMCON1bits.LWLO // bit 5
6455 #define CFGS PMCON1bits.CFGS // bit 6
6457 #define RA0 PORTAbits.RA0 // bit 0
6458 #define RA1 PORTAbits.RA1 // bit 1
6459 #define RA2 PORTAbits.RA2 // bit 2
6460 #define RA3 PORTAbits.RA3 // bit 3
6461 #define RA4 PORTAbits.RA4 // bit 4
6462 #define RA5 PORTAbits.RA5 // bit 5
6463 #define RA6 PORTAbits.RA6 // bit 6
6464 #define RA7 PORTAbits.RA7 // bit 7
6466 #define RB0 PORTBbits.RB0 // bit 0
6467 #define RB1 PORTBbits.RB1 // bit 1
6468 #define RB2 PORTBbits.RB2 // bit 2
6469 #define RB3 PORTBbits.RB3 // bit 3
6470 #define RB4 PORTBbits.RB4 // bit 4
6471 #define RB5 PORTBbits.RB5 // bit 5
6472 #define RB6 PORTBbits.RB6 // bit 6
6473 #define RB7 PORTBbits.RB7 // bit 7
6475 #define RC0 PORTCbits.RC0 // bit 0
6476 #define RC1 PORTCbits.RC1 // bit 1
6477 #define RC2 PORTCbits.RC2 // bit 2
6478 #define RC3 PORTCbits.RC3 // bit 3
6479 #define RC4 PORTCbits.RC4 // bit 4
6480 #define RC5 PORTCbits.RC5 // bit 5
6481 #define RC6 PORTCbits.RC6 // bit 6
6482 #define RC7 PORTCbits.RC7 // bit 7
6484 #define RE3 PORTEbits.RE3 // bit 3
6486 #define PWM1OE0 PWM1AOEbits.PWM1OE0 // bit 0
6487 #define PWM1OE1 PWM1AOEbits.PWM1OE1 // bit 1
6488 #define PWM1OE2 PWM1AOEbits.PWM1OE2 // bit 2
6489 #define PWM1OE3 PWM1AOEbits.PWM1OE3 // bit 3
6491 #define PWM1POL PWM1CONbits.PWM1POL // bit 4
6492 #define PWM1OUT PWM1CONbits.PWM1OUT // bit 5
6493 #define PWM1OE PWM1CONbits.PWM1OE // bit 6
6494 #define PWM1EN PWM1CONbits.PWM1EN // bit 7
6496 #define PWM1DCH0 PWM1DCHbits.PWM1DCH0 // bit 0
6497 #define PWM1DCH1 PWM1DCHbits.PWM1DCH1 // bit 1
6498 #define PWM1DCH2 PWM1DCHbits.PWM1DCH2 // bit 2
6499 #define PWM1DCH3 PWM1DCHbits.PWM1DCH3 // bit 3
6500 #define PWM1DCH4 PWM1DCHbits.PWM1DCH4 // bit 4
6501 #define PWM1DCH5 PWM1DCHbits.PWM1DCH5 // bit 5
6502 #define PWM1DCH6 PWM1DCHbits.PWM1DCH6 // bit 6
6503 #define PWM1DCH7 PWM1DCHbits.PWM1DCH7 // bit 7
6505 #define PWM1DCL0 PWM1DCLbits.PWM1DCL0 // bit 6
6506 #define PWM1DCL1 PWM1DCLbits.PWM1DCL1 // bit 7
6508 #define PWM2OE0 PWM2AOEbits.PWM2OE0 // bit 0
6509 #define PWM2OE1 PWM2AOEbits.PWM2OE1 // bit 1
6510 #define PWM2OE2 PWM2AOEbits.PWM2OE2 // bit 2
6511 #define PWM2OE3 PWM2AOEbits.PWM2OE3 // bit 3
6513 #define PWM2POL PWM2CONbits.PWM2POL // bit 4
6514 #define PWM2OUT PWM2CONbits.PWM2OUT // bit 5
6515 #define PWM2OE PWM2CONbits.PWM2OE // bit 6
6516 #define PWM2EN PWM2CONbits.PWM2EN // bit 7
6518 #define PWM2DCH0 PWM2DCHbits.PWM2DCH0 // bit 0
6519 #define PWM2DCH1 PWM2DCHbits.PWM2DCH1 // bit 1
6520 #define PWM2DCH2 PWM2DCHbits.PWM2DCH2 // bit 2
6521 #define PWM2DCH3 PWM2DCHbits.PWM2DCH3 // bit 3
6522 #define PWM2DCH4 PWM2DCHbits.PWM2DCH4 // bit 4
6523 #define PWM2DCH5 PWM2DCHbits.PWM2DCH5 // bit 5
6524 #define PWM2DCH6 PWM2DCHbits.PWM2DCH6 // bit 6
6525 #define PWM2DCH7 PWM2DCHbits.PWM2DCH7 // bit 7
6527 #define PWM2DCL0 PWM2DCLbits.PWM2DCL0 // bit 6
6528 #define PWM2DCL1 PWM2DCLbits.PWM2DCL1 // bit 7
6530 #define P1TSEL PWMTMRSbits.P1TSEL // bit 0
6531 #define P2TSEL PWMTMRSbits.P2TSEL // bit 2
6533 #define RX9D RCSTAbits.RX9D // bit 0
6534 #define OERR RCSTAbits.OERR // bit 1
6535 #define FERR RCSTAbits.FERR // bit 2
6536 #define ADDEN RCSTAbits.ADDEN // bit 3
6537 #define CREN RCSTAbits.CREN // bit 4
6538 #define SREN RCSTAbits.SREN // bit 5
6539 #define RX9 RCSTAbits.RX9 // bit 6
6540 #define SPEN RCSTAbits.SPEN // bit 7
6542 #define SSP1ADD0 SSP1ADDbits.SSP1ADD0 // bit 0, shadows bit in SSP1ADDbits
6543 #define ADD0 SSP1ADDbits.ADD0 // bit 0, shadows bit in SSP1ADDbits
6544 #define SSP1ADD1 SSP1ADDbits.SSP1ADD1 // bit 1, shadows bit in SSP1ADDbits
6545 #define ADD1 SSP1ADDbits.ADD1 // bit 1, shadows bit in SSP1ADDbits
6546 #define SSP1ADD2 SSP1ADDbits.SSP1ADD2 // bit 2, shadows bit in SSP1ADDbits
6547 #define ADD2 SSP1ADDbits.ADD2 // bit 2, shadows bit in SSP1ADDbits
6548 #define SSP1ADD3 SSP1ADDbits.SSP1ADD3 // bit 3, shadows bit in SSP1ADDbits
6549 #define ADD3 SSP1ADDbits.ADD3 // bit 3, shadows bit in SSP1ADDbits
6550 #define SSP1ADD4 SSP1ADDbits.SSP1ADD4 // bit 4, shadows bit in SSP1ADDbits
6551 #define ADD4 SSP1ADDbits.ADD4 // bit 4, shadows bit in SSP1ADDbits
6552 #define SSP1ADD5 SSP1ADDbits.SSP1ADD5 // bit 5, shadows bit in SSP1ADDbits
6553 #define ADD5 SSP1ADDbits.ADD5 // bit 5, shadows bit in SSP1ADDbits
6554 #define SSP1ADD6 SSP1ADDbits.SSP1ADD6 // bit 6, shadows bit in SSP1ADDbits
6555 #define ADD6 SSP1ADDbits.ADD6 // bit 6, shadows bit in SSP1ADDbits
6556 #define SSP1ADD7 SSP1ADDbits.SSP1ADD7 // bit 7, shadows bit in SSP1ADDbits
6557 #define ADD7 SSP1ADDbits.ADD7 // bit 7, shadows bit in SSP1ADDbits
6559 #define SSP1BUF0 SSP1BUFbits.SSP1BUF0 // bit 0, shadows bit in SSP1BUFbits
6560 #define BUF0 SSP1BUFbits.BUF0 // bit 0, shadows bit in SSP1BUFbits
6561 #define SSP1BUF1 SSP1BUFbits.SSP1BUF1 // bit 1, shadows bit in SSP1BUFbits
6562 #define BUF1 SSP1BUFbits.BUF1 // bit 1, shadows bit in SSP1BUFbits
6563 #define SSP1BUF2 SSP1BUFbits.SSP1BUF2 // bit 2, shadows bit in SSP1BUFbits
6564 #define BUF2 SSP1BUFbits.BUF2 // bit 2, shadows bit in SSP1BUFbits
6565 #define SSP1BUF3 SSP1BUFbits.SSP1BUF3 // bit 3, shadows bit in SSP1BUFbits
6566 #define BUF3 SSP1BUFbits.BUF3 // bit 3, shadows bit in SSP1BUFbits
6567 #define SSP1BUF4 SSP1BUFbits.SSP1BUF4 // bit 4, shadows bit in SSP1BUFbits
6568 #define BUF4 SSP1BUFbits.BUF4 // bit 4, shadows bit in SSP1BUFbits
6569 #define SSP1BUF5 SSP1BUFbits.SSP1BUF5 // bit 5, shadows bit in SSP1BUFbits
6570 #define BUF5 SSP1BUFbits.BUF5 // bit 5, shadows bit in SSP1BUFbits
6571 #define SSP1BUF6 SSP1BUFbits.SSP1BUF6 // bit 6, shadows bit in SSP1BUFbits
6572 #define BUF6 SSP1BUFbits.BUF6 // bit 6, shadows bit in SSP1BUFbits
6573 #define SSP1BUF7 SSP1BUFbits.SSP1BUF7 // bit 7, shadows bit in SSP1BUFbits
6574 #define BUF7 SSP1BUFbits.BUF7 // bit 7, shadows bit in SSP1BUFbits
6576 #define SSPM0 SSP1CONbits.SSPM0 // bit 0
6577 #define SSPM1 SSP1CONbits.SSPM1 // bit 1
6578 #define SSPM2 SSP1CONbits.SSPM2 // bit 2
6579 #define SSPM3 SSP1CONbits.SSPM3 // bit 3
6580 #define CKP SSP1CONbits.CKP // bit 4
6581 #define SSPEN SSP1CONbits.SSPEN // bit 5
6582 #define SSPOV SSP1CONbits.SSPOV // bit 6
6583 #define WCOL SSP1CONbits.WCOL // bit 7
6585 #define SEN SSP1CON2bits.SEN // bit 0
6586 #define RSEN SSP1CON2bits.RSEN // bit 1
6587 #define PEN SSP1CON2bits.PEN // bit 2
6588 #define RCEN SSP1CON2bits.RCEN // bit 3
6589 #define ACKEN SSP1CON2bits.ACKEN // bit 4
6590 #define ACKDT SSP1CON2bits.ACKDT // bit 5
6591 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
6592 #define GCEN SSP1CON2bits.GCEN // bit 7
6594 #define DHEN SSP1CON3bits.DHEN // bit 0
6595 #define AHEN SSP1CON3bits.AHEN // bit 1
6596 #define SBCDE SSP1CON3bits.SBCDE // bit 2
6597 #define SDAHT SSP1CON3bits.SDAHT // bit 3
6598 #define BOEN SSP1CON3bits.BOEN // bit 4
6599 #define SCIE SSP1CON3bits.SCIE // bit 5
6600 #define PCIE SSP1CON3bits.PCIE // bit 6
6601 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
6603 #define SSP1MSK0 SSP1MSKbits.SSP1MSK0 // bit 0, shadows bit in SSP1MSKbits
6604 #define MSK0 SSP1MSKbits.MSK0 // bit 0, shadows bit in SSP1MSKbits
6605 #define SSP1MSK1 SSP1MSKbits.SSP1MSK1 // bit 1, shadows bit in SSP1MSKbits
6606 #define MSK1 SSP1MSKbits.MSK1 // bit 1, shadows bit in SSP1MSKbits
6607 #define SSP1MSK2 SSP1MSKbits.SSP1MSK2 // bit 2, shadows bit in SSP1MSKbits
6608 #define MSK2 SSP1MSKbits.MSK2 // bit 2, shadows bit in SSP1MSKbits
6609 #define SSP1MSK3 SSP1MSKbits.SSP1MSK3 // bit 3, shadows bit in SSP1MSKbits
6610 #define MSK3 SSP1MSKbits.MSK3 // bit 3, shadows bit in SSP1MSKbits
6611 #define SSP1MSK4 SSP1MSKbits.SSP1MSK4 // bit 4, shadows bit in SSP1MSKbits
6612 #define MSK4 SSP1MSKbits.MSK4 // bit 4, shadows bit in SSP1MSKbits
6613 #define SSP1MSK5 SSP1MSKbits.SSP1MSK5 // bit 5, shadows bit in SSP1MSKbits
6614 #define MSK5 SSP1MSKbits.MSK5 // bit 5, shadows bit in SSP1MSKbits
6615 #define SSP1MSK6 SSP1MSKbits.SSP1MSK6 // bit 6, shadows bit in SSP1MSKbits
6616 #define MSK6 SSP1MSKbits.MSK6 // bit 6, shadows bit in SSP1MSKbits
6617 #define SSP1MSK7 SSP1MSKbits.SSP1MSK7 // bit 7, shadows bit in SSP1MSKbits
6618 #define MSK7 SSP1MSKbits.MSK7 // bit 7, shadows bit in SSP1MSKbits
6620 #define BF SSP1STATbits.BF // bit 0
6621 #define UA SSP1STATbits.UA // bit 1
6622 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
6623 #define S SSP1STATbits.S // bit 3
6624 #define P SSP1STATbits.P // bit 4
6625 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
6626 #define CKE SSP1STATbits.CKE // bit 6
6627 #define SMP SSP1STATbits.SMP // bit 7
6629 #define S1ILS SSPLVLbits.S1ILS // bit 0
6630 #define S2ILS SSPLVLbits.S2ILS // bit 4
6632 #define C STATUSbits.C // bit 0
6633 #define DC STATUSbits.DC // bit 1
6634 #define Z STATUSbits.Z // bit 2
6635 #define NOT_PD STATUSbits.NOT_PD // bit 3
6636 #define NOT_TO STATUSbits.NOT_TO // bit 4
6638 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
6639 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
6640 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
6642 #define TMR1ON T1CONbits.TMR1ON // bit 0
6643 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
6644 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
6645 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
6646 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
6647 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
6649 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
6650 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
6651 #define TMR2ON T2CONbits.TMR2ON // bit 2
6652 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
6653 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
6654 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
6655 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
6657 #define T4CKPS0 T4CONbits.T4CKPS0 // bit 0
6658 #define T4CKPS1 T4CONbits.T4CKPS1 // bit 1
6659 #define TMR4ON T4CONbits.TMR4ON // bit 2
6660 #define T4OUTPS0 T4CONbits.T4OUTPS0 // bit 3
6661 #define T4OUTPS1 T4CONbits.T4OUTPS1 // bit 4
6662 #define T4OUTPS2 T4CONbits.T4OUTPS2 // bit 5
6663 #define T4OUTPS3 T4CONbits.T4OUTPS3 // bit 6
6665 #define TRISA0 TRISAbits.TRISA0 // bit 0
6666 #define TRISA1 TRISAbits.TRISA1 // bit 1
6667 #define TRISA2 TRISAbits.TRISA2 // bit 2
6668 #define TRISA3 TRISAbits.TRISA3 // bit 3
6669 #define TRISA4 TRISAbits.TRISA4 // bit 4
6670 #define TRISA5 TRISAbits.TRISA5 // bit 5
6671 #define TRISA6 TRISAbits.TRISA6 // bit 6
6672 #define TRISA7 TRISAbits.TRISA7 // bit 7
6674 #define TRISB0 TRISBbits.TRISB0 // bit 0
6675 #define TRISB1 TRISBbits.TRISB1 // bit 1
6676 #define TRISB2 TRISBbits.TRISB2 // bit 2
6677 #define TRISB3 TRISBbits.TRISB3 // bit 3
6678 #define TRISB4 TRISBbits.TRISB4 // bit 4
6679 #define TRISB5 TRISBbits.TRISB5 // bit 5
6680 #define TRISB6 TRISBbits.TRISB6 // bit 6
6681 #define TRISB7 TRISBbits.TRISB7 // bit 7
6683 #define TRISC0 TRISCbits.TRISC0 // bit 0
6684 #define TRISC1 TRISCbits.TRISC1 // bit 1
6685 #define TRISC2 TRISCbits.TRISC2 // bit 2
6686 #define TRISC3 TRISCbits.TRISC3 // bit 3
6687 #define TRISC4 TRISCbits.TRISC4 // bit 4
6688 #define TRISC5 TRISCbits.TRISC5 // bit 5
6689 #define TRISC6 TRISCbits.TRISC6 // bit 6
6690 #define TRISC7 TRISCbits.TRISC7 // bit 7
6692 #define TX9D TXSTAbits.TX9D // bit 0
6693 #define TRMT TXSTAbits.TRMT // bit 1
6694 #define BRGH TXSTAbits.BRGH // bit 2
6695 #define SENDB TXSTAbits.SENDB // bit 3
6696 #define SYNC TXSTAbits.SYNC // bit 4
6697 #define TXEN TXSTAbits.TXEN // bit 5
6698 #define TX9 TXSTAbits.TX9 // bit 6
6699 #define CSRC TXSTAbits.CSRC // bit 7
6701 #define SWDTEN WDTCONbits.SWDTEN // bit 0
6702 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
6703 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
6704 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
6705 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
6706 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
6708 #define WPUB0 WPUBbits.WPUB0 // bit 0
6709 #define WPUB1 WPUBbits.WPUB1 // bit 1
6710 #define WPUB2 WPUBbits.WPUB2 // bit 2
6711 #define WPUB3 WPUBbits.WPUB3 // bit 3
6712 #define WPUB4 WPUBbits.WPUB4 // bit 4
6713 #define WPUB5 WPUBbits.WPUB5 // bit 5
6714 #define WPUB6 WPUBbits.WPUB6 // bit 6
6715 #define WPUB7 WPUBbits.WPUB7 // bit 7
6717 #define WPUE3 WPUEbits.WPUE3 // bit 3
6719 #endif // #ifndef NO_BIT_DEFINES
6721 #endif // #ifndef __PIC16LF1566_H__