struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16lf1559.h
blob7ea07ce36ffb91c561cf2a81c012d31a4d8cfb46
1 /*
2 * This declarations of the PIC16LF1559 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 __PIC16LF1559_H__
26 #define __PIC16LF1559_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF0_ADDR 0x0000
37 #define INDF1_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR0_ADDR 0x0004
41 #define FSR0L_ADDR 0x0004
42 #define FSR0H_ADDR 0x0005
43 #define FSR1_ADDR 0x0006
44 #define FSR1L_ADDR 0x0006
45 #define FSR1H_ADDR 0x0007
46 #define BSR_ADDR 0x0008
47 #define WREG_ADDR 0x0009
48 #define PCLATH_ADDR 0x000A
49 #define INTCON_ADDR 0x000B
50 #define PORTA_ADDR 0x000C
51 #define PORTB_ADDR 0x000D
52 #define PORTC_ADDR 0x000E
53 #define PIR1_ADDR 0x0011
54 #define PIR2_ADDR 0x0012
55 #define TMR0_ADDR 0x0015
56 #define TMR1_ADDR 0x0016
57 #define TMR1L_ADDR 0x0016
58 #define TMR1H_ADDR 0x0017
59 #define T1CON_ADDR 0x0018
60 #define T1GCON_ADDR 0x0019
61 #define TMR2_ADDR 0x001A
62 #define PR2_ADDR 0x001B
63 #define T2CON_ADDR 0x001C
64 #define TRISA_ADDR 0x008C
65 #define TRISB_ADDR 0x008D
66 #define TRISC_ADDR 0x008E
67 #define PIE1_ADDR 0x0091
68 #define PIE2_ADDR 0x0092
69 #define OPTION_REG_ADDR 0x0095
70 #define PCON_ADDR 0x0096
71 #define WDTCON_ADDR 0x0097
72 #define OSCCON_ADDR 0x0099
73 #define OSCSTAT_ADDR 0x009A
74 #define ADRES_ADDR 0x009B
75 #define ADRESL_ADDR 0x009B
76 #define ADRESH_ADDR 0x009C
77 #define ADCON0_ADDR 0x009D
78 #define ADCON1_ADDR 0x009E
79 #define ADCON2_ADDR 0x009F
80 #define LATA_ADDR 0x010C
81 #define LATB_ADDR 0x010D
82 #define LATC_ADDR 0x010E
83 #define BORCON_ADDR 0x0116
84 #define FVRCON_ADDR 0x0117
85 #define APFCON_ADDR 0x011D
86 #define ANSELA_ADDR 0x018C
87 #define ANSELB_ADDR 0x018D
88 #define ANSELC_ADDR 0x018E
89 #define PMADR_ADDR 0x0191
90 #define PMADRL_ADDR 0x0191
91 #define PMADRH_ADDR 0x0192
92 #define PMDAT_ADDR 0x0193
93 #define PMDATL_ADDR 0x0193
94 #define PMDATH_ADDR 0x0194
95 #define PMCON1_ADDR 0x0195
96 #define PMCON2_ADDR 0x0196
97 #define RCREG_ADDR 0x0199
98 #define TXREG_ADDR 0x019A
99 #define SPBRG_ADDR 0x019B
100 #define SPBRGL_ADDR 0x019B
101 #define SPBRGH_ADDR 0x019C
102 #define RCSTA_ADDR 0x019D
103 #define TXSTA_ADDR 0x019E
104 #define BAUDCON_ADDR 0x019F
105 #define WPUA_ADDR 0x020C
106 #define WPUB_ADDR 0x020D
107 #define SSP1BUF_ADDR 0x0211
108 #define SSPBUF_ADDR 0x0211
109 #define SSP1ADD_ADDR 0x0212
110 #define SSPADD_ADDR 0x0212
111 #define SSP1MSK_ADDR 0x0213
112 #define SSPMSK_ADDR 0x0213
113 #define SSP1STAT_ADDR 0x0214
114 #define SSPSTAT_ADDR 0x0214
115 #define SSP1CON1_ADDR 0x0215
116 #define SSPCON_ADDR 0x0215
117 #define SSPCON1_ADDR 0x0215
118 #define SSP1CON2_ADDR 0x0216
119 #define SSPCON2_ADDR 0x0216
120 #define SSP1CON3_ADDR 0x0217
121 #define SSPCON3_ADDR 0x0217
122 #define IOCAP_ADDR 0x0391
123 #define IOCAN_ADDR 0x0392
124 #define IOCAF_ADDR 0x0393
125 #define IOCBP_ADDR 0x0394
126 #define IOCBN_ADDR 0x0395
127 #define IOCBF_ADDR 0x0396
128 #define PWM1DCL_ADDR 0x0611
129 #define PWM1DCH_ADDR 0x0612
130 #define PWM1CON_ADDR 0x0613
131 #define PWM1CON0_ADDR 0x0613
132 #define PWM2DCL_ADDR 0x0614
133 #define PWM2DCH_ADDR 0x0615
134 #define PWM2CON_ADDR 0x0616
135 #define PWM2CON0_ADDR 0x0616
136 #define AAD1CON0_ADDR 0x0711
137 #define AADCON0_ADDR 0x0711
138 #define AD1CON0_ADDR 0x0711
139 #define AADCON1_ADDR 0x0712
140 #define ADCOMCON_ADDR 0x0712
141 #define AAD1CON2_ADDR 0x0713
142 #define AADCON2_ADDR 0x0713
143 #define AD1CON2_ADDR 0x0713
144 #define AAD1CON3_ADDR 0x0714
145 #define AADCON3_ADDR 0x0714
146 #define AD1CON3_ADDR 0x0714
147 #define AADSTAT_ADDR 0x0715
148 #define ADSTAT_ADDR 0x0715
149 #define AAD1PRE_ADDR 0x0716
150 #define AADPRE_ADDR 0x0716
151 #define AD1PRE_ADDR 0x0716
152 #define AD1PRECON_ADDR 0x0716
153 #define AAD1ACQ_ADDR 0x0717
154 #define AADACQ_ADDR 0x0717
155 #define AD1ACQ_ADDR 0x0717
156 #define AD1ACQCON_ADDR 0x0717
157 #define AAD1GRD_ADDR 0x0718
158 #define AADGRD_ADDR 0x0718
159 #define AD1GRD_ADDR 0x0718
160 #define AAD1CAP_ADDR 0x0719
161 #define AAD1CAPCON_ADDR 0x0719
162 #define AADCAP_ADDR 0x0719
163 #define AD1CAPCON_ADDR 0x0719
164 #define AAD1RES0_ADDR 0x071A
165 #define AAD1RES0L_ADDR 0x071A
166 #define AD1RES0_ADDR 0x071A
167 #define AD1RES0L_ADDR 0x071A
168 #define ADRES0_ADDR 0x071A
169 #define AAD1RES0H_ADDR 0x071B
170 #define AD1RES0H_ADDR 0x071B
171 #define AAD1RES1_ADDR 0x071C
172 #define AAD1RES1L_ADDR 0x071C
173 #define AD1RES1_ADDR 0x071C
174 #define AD1RES1L_ADDR 0x071C
175 #define ADRES1_ADDR 0x071C
176 #define AAD1RES1H_ADDR 0x071D
177 #define AD1RES1H_ADDR 0x071D
178 #define AAD1CH_ADDR 0x071E
179 #define AD1CH_ADDR 0x071E
180 #define AAD2CON0_ADDR 0x0791
181 #define AD2CON0_ADDR 0x0791
182 #define AAD2CON2_ADDR 0x0793
183 #define AD2CON2_ADDR 0x0793
184 #define AAD2CON3_ADDR 0x0794
185 #define AD2CON3_ADDR 0x0794
186 #define AAD2PRE_ADDR 0x0796
187 #define AD2PRE_ADDR 0x0796
188 #define AD2PRECON_ADDR 0x0796
189 #define AAD2ACQ_ADDR 0x0797
190 #define AD2ACQ_ADDR 0x0797
191 #define AD2ACQCON_ADDR 0x0797
192 #define AAD2GRD_ADDR 0x0798
193 #define AD2GRD_ADDR 0x0798
194 #define AAD2CAP_ADDR 0x0799
195 #define AAD2CAPCON_ADDR 0x0799
196 #define AD2CAPCON_ADDR 0x0799
197 #define AAD2RES0_ADDR 0x079A
198 #define AAD2RES0L_ADDR 0x079A
199 #define AD2RES0_ADDR 0x079A
200 #define AAD2RES0H_ADDR 0x079B
201 #define AAD2RES1_ADDR 0x079C
202 #define AAD2RES1L_ADDR 0x079C
203 #define AD2RES1_ADDR 0x079C
204 #define AAD2RES1H_ADDR 0x079D
205 #define AAD2CH_ADDR 0x079E
206 #define AD2CH_ADDR 0x079E
207 #define ICDIO_ADDR 0x0F8C
208 #define ICDCON0_ADDR 0x0F8D
209 #define ICDSTAT_ADDR 0x0F91
210 #define ICDINSTL_ADDR 0x0F96
211 #define ICDINSTH_ADDR 0x0F97
212 #define ICDBK0CON_ADDR 0x0F9C
213 #define ICDBK0L_ADDR 0x0F9D
214 #define ICDBK0H_ADDR 0x0F9E
215 #define BSRICDSHAD_ADDR 0x0FE3
216 #define STATUS_SHAD_ADDR 0x0FE4
217 #define WREG_SHAD_ADDR 0x0FE5
218 #define BSR_SHAD_ADDR 0x0FE6
219 #define PCLATH_SHAD_ADDR 0x0FE7
220 #define FSR0L_SHAD_ADDR 0x0FE8
221 #define FSR0H_SHAD_ADDR 0x0FE9
222 #define FSR1L_SHAD_ADDR 0x0FEA
223 #define FSR1H_SHAD_ADDR 0x0FEB
224 #define STKPTR_ADDR 0x0FED
225 #define TOSL_ADDR 0x0FEE
226 #define TOSH_ADDR 0x0FEF
228 #endif // #ifndef NO_ADDR_DEFINES
230 //==============================================================================
232 // Register Definitions
234 //==============================================================================
236 extern __at(0x0000) __sfr INDF0;
237 extern __at(0x0001) __sfr INDF1;
238 extern __at(0x0002) __sfr PCL;
240 //==============================================================================
241 // STATUS Bits
243 extern __at(0x0003) __sfr STATUS;
245 typedef struct
247 unsigned C : 1;
248 unsigned DC : 1;
249 unsigned Z : 1;
250 unsigned NOT_PD : 1;
251 unsigned NOT_TO : 1;
252 unsigned : 1;
253 unsigned : 1;
254 unsigned : 1;
255 } __STATUSbits_t;
257 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
259 #define _C 0x01
260 #define _DC 0x02
261 #define _Z 0x04
262 #define _NOT_PD 0x08
263 #define _NOT_TO 0x10
265 //==============================================================================
267 extern __at(0x0004) __sfr FSR0;
268 extern __at(0x0004) __sfr FSR0L;
269 extern __at(0x0005) __sfr FSR0H;
270 extern __at(0x0006) __sfr FSR1;
271 extern __at(0x0006) __sfr FSR1L;
272 extern __at(0x0007) __sfr FSR1H;
274 //==============================================================================
275 // BSR Bits
277 extern __at(0x0008) __sfr BSR;
279 typedef union
281 struct
283 unsigned BSR0 : 1;
284 unsigned BSR1 : 1;
285 unsigned BSR2 : 1;
286 unsigned BSR3 : 1;
287 unsigned BSR4 : 1;
288 unsigned : 1;
289 unsigned : 1;
290 unsigned : 1;
293 struct
295 unsigned BSR : 5;
296 unsigned : 3;
298 } __BSRbits_t;
300 extern __at(0x0008) volatile __BSRbits_t BSRbits;
302 #define _BSR0 0x01
303 #define _BSR1 0x02
304 #define _BSR2 0x04
305 #define _BSR3 0x08
306 #define _BSR4 0x10
308 //==============================================================================
310 extern __at(0x0009) __sfr WREG;
311 extern __at(0x000A) __sfr PCLATH;
313 //==============================================================================
314 // INTCON Bits
316 extern __at(0x000B) __sfr INTCON;
318 typedef union
320 struct
322 unsigned IOCIF : 1;
323 unsigned INTF : 1;
324 unsigned TMR0IF : 1;
325 unsigned IOCIE : 1;
326 unsigned INTE : 1;
327 unsigned TMR0IE : 1;
328 unsigned PEIE : 1;
329 unsigned GIE : 1;
332 struct
334 unsigned : 1;
335 unsigned : 1;
336 unsigned T0IF : 1;
337 unsigned : 1;
338 unsigned : 1;
339 unsigned T0IE : 1;
340 unsigned : 1;
341 unsigned : 1;
343 } __INTCONbits_t;
345 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
347 #define _IOCIF 0x01
348 #define _INTF 0x02
349 #define _TMR0IF 0x04
350 #define _T0IF 0x04
351 #define _IOCIE 0x08
352 #define _INTE 0x10
353 #define _TMR0IE 0x20
354 #define _T0IE 0x20
355 #define _PEIE 0x40
356 #define _GIE 0x80
358 //==============================================================================
361 //==============================================================================
362 // PORTA Bits
364 extern __at(0x000C) __sfr PORTA;
366 typedef union
368 struct
370 unsigned RA0 : 1;
371 unsigned RA1 : 1;
372 unsigned RA2 : 1;
373 unsigned RA3 : 1;
374 unsigned RA4 : 1;
375 unsigned RA5 : 1;
376 unsigned : 1;
377 unsigned : 1;
380 struct
382 unsigned RA : 6;
383 unsigned : 2;
385 } __PORTAbits_t;
387 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
389 #define _RA0 0x01
390 #define _RA1 0x02
391 #define _RA2 0x04
392 #define _RA3 0x08
393 #define _RA4 0x10
394 #define _RA5 0x20
396 //==============================================================================
399 //==============================================================================
400 // PORTB Bits
402 extern __at(0x000D) __sfr PORTB;
404 typedef struct
406 unsigned : 1;
407 unsigned : 1;
408 unsigned : 1;
409 unsigned : 1;
410 unsigned RB4 : 1;
411 unsigned RB5 : 1;
412 unsigned RB6 : 1;
413 unsigned RB7 : 1;
414 } __PORTBbits_t;
416 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
418 #define _RB4 0x10
419 #define _RB5 0x20
420 #define _RB6 0x40
421 #define _RB7 0x80
423 //==============================================================================
426 //==============================================================================
427 // PORTC Bits
429 extern __at(0x000E) __sfr PORTC;
431 typedef struct
433 unsigned RC0 : 1;
434 unsigned RC1 : 1;
435 unsigned RC2 : 1;
436 unsigned RC3 : 1;
437 unsigned RC4 : 1;
438 unsigned RC5 : 1;
439 unsigned RC6 : 1;
440 unsigned RC7 : 1;
441 } __PORTCbits_t;
443 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
445 #define _RC0 0x01
446 #define _RC1 0x02
447 #define _RC2 0x04
448 #define _RC3 0x08
449 #define _RC4 0x10
450 #define _RC5 0x20
451 #define _RC6 0x40
452 #define _RC7 0x80
454 //==============================================================================
457 //==============================================================================
458 // PIR1 Bits
460 extern __at(0x0011) __sfr PIR1;
462 typedef union
464 struct
466 unsigned TMR1IF : 1;
467 unsigned TMR2IF : 1;
468 unsigned : 1;
469 unsigned SSP1IF : 1;
470 unsigned TXIF : 1;
471 unsigned RCIF : 1;
472 unsigned ADIF : 1;
473 unsigned TMR1GIF : 1;
476 struct
478 unsigned : 1;
479 unsigned : 1;
480 unsigned : 1;
481 unsigned : 1;
482 unsigned : 1;
483 unsigned : 1;
484 unsigned AD1IF : 1;
485 unsigned : 1;
487 } __PIR1bits_t;
489 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
491 #define _TMR1IF 0x01
492 #define _TMR2IF 0x02
493 #define _SSP1IF 0x08
494 #define _TXIF 0x10
495 #define _RCIF 0x20
496 #define _ADIF 0x40
497 #define _AD1IF 0x40
498 #define _TMR1GIF 0x80
500 //==============================================================================
503 //==============================================================================
504 // PIR2 Bits
506 extern __at(0x0012) __sfr PIR2;
508 typedef struct
510 unsigned : 1;
511 unsigned : 1;
512 unsigned : 1;
513 unsigned BCL1IF : 1;
514 unsigned : 1;
515 unsigned : 1;
516 unsigned AD2IF : 1;
517 unsigned : 1;
518 } __PIR2bits_t;
520 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
522 #define _BCL1IF 0x08
523 #define _AD2IF 0x40
525 //==============================================================================
527 extern __at(0x0015) __sfr TMR0;
528 extern __at(0x0016) __sfr TMR1;
529 extern __at(0x0016) __sfr TMR1L;
530 extern __at(0x0017) __sfr TMR1H;
532 //==============================================================================
533 // T1CON Bits
535 extern __at(0x0018) __sfr T1CON;
537 typedef union
539 struct
541 unsigned TMR1ON : 1;
542 unsigned : 1;
543 unsigned NOT_T1SYNC : 1;
544 unsigned : 1;
545 unsigned T1CKPS0 : 1;
546 unsigned T1CKPS1 : 1;
547 unsigned TMR1CS0 : 1;
548 unsigned TMR1CS1 : 1;
551 struct
553 unsigned : 4;
554 unsigned T1CKPS : 2;
555 unsigned : 2;
558 struct
560 unsigned : 6;
561 unsigned TMR1CS : 2;
563 } __T1CONbits_t;
565 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
567 #define _TMR1ON 0x01
568 #define _NOT_T1SYNC 0x04
569 #define _T1CKPS0 0x10
570 #define _T1CKPS1 0x20
571 #define _TMR1CS0 0x40
572 #define _TMR1CS1 0x80
574 //==============================================================================
577 //==============================================================================
578 // T1GCON Bits
580 extern __at(0x0019) __sfr T1GCON;
582 typedef union
584 struct
586 unsigned T1GSS0 : 1;
587 unsigned T1GSS1 : 1;
588 unsigned T1GVAL : 1;
589 unsigned T1GGO_NOT_DONE : 1;
590 unsigned T1GSPM : 1;
591 unsigned T1GTM : 1;
592 unsigned T1GPOL : 1;
593 unsigned TMR1GE : 1;
596 struct
598 unsigned : 1;
599 unsigned : 1;
600 unsigned : 1;
601 unsigned GO : 1;
602 unsigned : 1;
603 unsigned : 1;
604 unsigned : 1;
605 unsigned : 1;
608 struct
610 unsigned T1GSS : 2;
611 unsigned : 6;
613 } __T1GCONbits_t;
615 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
617 #define _T1GCON_T1GSS0 0x01
618 #define _T1GCON_T1GSS1 0x02
619 #define _T1GCON_T1GVAL 0x04
620 #define _T1GCON_T1GGO_NOT_DONE 0x08
621 #define _T1GCON_GO 0x08
622 #define _T1GCON_T1GSPM 0x10
623 #define _T1GCON_T1GTM 0x20
624 #define _T1GCON_T1GPOL 0x40
625 #define _T1GCON_TMR1GE 0x80
627 //==============================================================================
629 extern __at(0x001A) __sfr TMR2;
630 extern __at(0x001B) __sfr PR2;
632 //==============================================================================
633 // T2CON Bits
635 extern __at(0x001C) __sfr T2CON;
637 typedef union
639 struct
641 unsigned T2CKPS0 : 1;
642 unsigned T2CKPS1 : 1;
643 unsigned TMR2ON : 1;
644 unsigned T2OUTPS0 : 1;
645 unsigned T2OUTPS1 : 1;
646 unsigned T2OUTPS2 : 1;
647 unsigned T2OUTPS3 : 1;
648 unsigned : 1;
651 struct
653 unsigned T2CKPS : 2;
654 unsigned : 6;
657 struct
659 unsigned : 3;
660 unsigned T2OUTPS : 4;
661 unsigned : 1;
663 } __T2CONbits_t;
665 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
667 #define _T2CKPS0 0x01
668 #define _T2CKPS1 0x02
669 #define _TMR2ON 0x04
670 #define _T2OUTPS0 0x08
671 #define _T2OUTPS1 0x10
672 #define _T2OUTPS2 0x20
673 #define _T2OUTPS3 0x40
675 //==============================================================================
678 //==============================================================================
679 // TRISA Bits
681 extern __at(0x008C) __sfr TRISA;
683 typedef union
685 struct
687 unsigned TRISA0 : 1;
688 unsigned TRISA1 : 1;
689 unsigned TRISA2 : 1;
690 unsigned TRISA3 : 1;
691 unsigned TRISA4 : 1;
692 unsigned TRISA5 : 1;
693 unsigned : 1;
694 unsigned : 1;
697 struct
699 unsigned TRISA : 6;
700 unsigned : 2;
702 } __TRISAbits_t;
704 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
706 #define _TRISA0 0x01
707 #define _TRISA1 0x02
708 #define _TRISA2 0x04
709 #define _TRISA3 0x08
710 #define _TRISA4 0x10
711 #define _TRISA5 0x20
713 //==============================================================================
716 //==============================================================================
717 // TRISB Bits
719 extern __at(0x008D) __sfr TRISB;
721 typedef struct
723 unsigned : 1;
724 unsigned : 1;
725 unsigned : 1;
726 unsigned : 1;
727 unsigned TRISB4 : 1;
728 unsigned TRISB5 : 1;
729 unsigned TRISB6 : 1;
730 unsigned TRISB7 : 1;
731 } __TRISBbits_t;
733 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
735 #define _TRISB4 0x10
736 #define _TRISB5 0x20
737 #define _TRISB6 0x40
738 #define _TRISB7 0x80
740 //==============================================================================
743 //==============================================================================
744 // TRISC Bits
746 extern __at(0x008E) __sfr TRISC;
748 typedef struct
750 unsigned TRISC0 : 1;
751 unsigned TRISC1 : 1;
752 unsigned TRISC2 : 1;
753 unsigned TRISC3 : 1;
754 unsigned TRISC4 : 1;
755 unsigned TRISC5 : 1;
756 unsigned TRISC6 : 1;
757 unsigned TRISC7 : 1;
758 } __TRISCbits_t;
760 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
762 #define _TRISC0 0x01
763 #define _TRISC1 0x02
764 #define _TRISC2 0x04
765 #define _TRISC3 0x08
766 #define _TRISC4 0x10
767 #define _TRISC5 0x20
768 #define _TRISC6 0x40
769 #define _TRISC7 0x80
771 //==============================================================================
774 //==============================================================================
775 // PIE1 Bits
777 extern __at(0x0091) __sfr PIE1;
779 typedef union
781 struct
783 unsigned TMR1IE : 1;
784 unsigned TMR2IE : 1;
785 unsigned : 1;
786 unsigned SSP1IE : 1;
787 unsigned TXIE : 1;
788 unsigned RCIE : 1;
789 unsigned ADIE : 1;
790 unsigned TMR1GIE : 1;
793 struct
795 unsigned : 1;
796 unsigned : 1;
797 unsigned : 1;
798 unsigned : 1;
799 unsigned : 1;
800 unsigned : 1;
801 unsigned AD1IE : 1;
802 unsigned : 1;
804 } __PIE1bits_t;
806 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
808 #define _TMR1IE 0x01
809 #define _TMR2IE 0x02
810 #define _SSP1IE 0x08
811 #define _TXIE 0x10
812 #define _RCIE 0x20
813 #define _ADIE 0x40
814 #define _AD1IE 0x40
815 #define _TMR1GIE 0x80
817 //==============================================================================
820 //==============================================================================
821 // PIE2 Bits
823 extern __at(0x0092) __sfr PIE2;
825 typedef struct
827 unsigned : 1;
828 unsigned : 1;
829 unsigned : 1;
830 unsigned BCL1IE : 1;
831 unsigned : 1;
832 unsigned : 1;
833 unsigned AD2IE : 1;
834 unsigned : 1;
835 } __PIE2bits_t;
837 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
839 #define _BCL1IE 0x08
840 #define _AD2IE 0x40
842 //==============================================================================
845 //==============================================================================
846 // OPTION_REG Bits
848 extern __at(0x0095) __sfr OPTION_REG;
850 typedef union
852 struct
854 unsigned PS0 : 1;
855 unsigned PS1 : 1;
856 unsigned PS2 : 1;
857 unsigned PSA : 1;
858 unsigned TMR0SE : 1;
859 unsigned TMR0CS : 1;
860 unsigned INTEDG : 1;
861 unsigned NOT_WPUEN : 1;
864 struct
866 unsigned : 1;
867 unsigned : 1;
868 unsigned : 1;
869 unsigned : 1;
870 unsigned T0SE : 1;
871 unsigned T0CS : 1;
872 unsigned : 1;
873 unsigned : 1;
876 struct
878 unsigned PS : 3;
879 unsigned : 5;
881 } __OPTION_REGbits_t;
883 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
885 #define _PS0 0x01
886 #define _PS1 0x02
887 #define _PS2 0x04
888 #define _PSA 0x08
889 #define _TMR0SE 0x10
890 #define _T0SE 0x10
891 #define _TMR0CS 0x20
892 #define _T0CS 0x20
893 #define _INTEDG 0x40
894 #define _NOT_WPUEN 0x80
896 //==============================================================================
899 //==============================================================================
900 // PCON Bits
902 extern __at(0x0096) __sfr PCON;
904 typedef struct
906 unsigned NOT_BOR : 1;
907 unsigned NOT_POR : 1;
908 unsigned NOT_RI : 1;
909 unsigned NOT_RMCLR : 1;
910 unsigned NOT_RWDT : 1;
911 unsigned : 1;
912 unsigned STKUNF : 1;
913 unsigned STKOVF : 1;
914 } __PCONbits_t;
916 extern __at(0x0096) volatile __PCONbits_t PCONbits;
918 #define _NOT_BOR 0x01
919 #define _NOT_POR 0x02
920 #define _NOT_RI 0x04
921 #define _NOT_RMCLR 0x08
922 #define _NOT_RWDT 0x10
923 #define _STKUNF 0x40
924 #define _STKOVF 0x80
926 //==============================================================================
929 //==============================================================================
930 // WDTCON Bits
932 extern __at(0x0097) __sfr WDTCON;
934 typedef union
936 struct
938 unsigned SWDTEN : 1;
939 unsigned WDTPS0 : 1;
940 unsigned WDTPS1 : 1;
941 unsigned WDTPS2 : 1;
942 unsigned WDTPS3 : 1;
943 unsigned WDTPS4 : 1;
944 unsigned : 1;
945 unsigned : 1;
948 struct
950 unsigned : 1;
951 unsigned WDTPS : 5;
952 unsigned : 2;
954 } __WDTCONbits_t;
956 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
958 #define _SWDTEN 0x01
959 #define _WDTPS0 0x02
960 #define _WDTPS1 0x04
961 #define _WDTPS2 0x08
962 #define _WDTPS3 0x10
963 #define _WDTPS4 0x20
965 //==============================================================================
968 //==============================================================================
969 // OSCCON Bits
971 extern __at(0x0099) __sfr OSCCON;
973 typedef union
975 struct
977 unsigned SCS0 : 1;
978 unsigned SCS1 : 1;
979 unsigned : 1;
980 unsigned IRCF0 : 1;
981 unsigned IRCF1 : 1;
982 unsigned IRCF2 : 1;
983 unsigned IRCF3 : 1;
984 unsigned SPLLEN : 1;
987 struct
989 unsigned SCS : 2;
990 unsigned : 6;
993 struct
995 unsigned : 3;
996 unsigned IRCF : 4;
997 unsigned : 1;
999 } __OSCCONbits_t;
1001 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1003 #define _SCS0 0x01
1004 #define _SCS1 0x02
1005 #define _IRCF0 0x08
1006 #define _IRCF1 0x10
1007 #define _IRCF2 0x20
1008 #define _IRCF3 0x40
1009 #define _SPLLEN 0x80
1011 //==============================================================================
1014 //==============================================================================
1015 // OSCSTAT Bits
1017 extern __at(0x009A) __sfr OSCSTAT;
1019 typedef struct
1021 unsigned HFIOFS : 1;
1022 unsigned LFIOFR : 1;
1023 unsigned : 1;
1024 unsigned : 1;
1025 unsigned HFIOFR : 1;
1026 unsigned : 1;
1027 unsigned PLLSR : 1;
1028 unsigned : 1;
1029 } __OSCSTATbits_t;
1031 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1033 #define _HFIOFS 0x01
1034 #define _LFIOFR 0x02
1035 #define _HFIOFR 0x10
1036 #define _PLLSR 0x40
1038 //==============================================================================
1040 extern __at(0x009B) __sfr ADRES;
1041 extern __at(0x009B) __sfr ADRESL;
1042 extern __at(0x009C) __sfr ADRESH;
1044 //==============================================================================
1045 // ADCON0 Bits
1047 extern __at(0x009D) __sfr ADCON0;
1049 typedef union
1051 struct
1053 unsigned ADON : 1;
1054 unsigned GO_NOT_DONE : 1;
1055 unsigned CHS0 : 1;
1056 unsigned CHS1 : 1;
1057 unsigned CHS2 : 1;
1058 unsigned CHS3 : 1;
1059 unsigned CHS4 : 1;
1060 unsigned : 1;
1063 struct
1065 unsigned AD1ON : 1;
1066 unsigned ADGO : 1;
1067 unsigned : 1;
1068 unsigned : 1;
1069 unsigned : 1;
1070 unsigned : 1;
1071 unsigned : 1;
1072 unsigned : 1;
1075 struct
1077 unsigned : 1;
1078 unsigned GO : 1;
1079 unsigned : 1;
1080 unsigned : 1;
1081 unsigned : 1;
1082 unsigned : 1;
1083 unsigned : 1;
1084 unsigned : 1;
1087 struct
1089 unsigned : 2;
1090 unsigned CHS : 5;
1091 unsigned : 1;
1093 } __ADCON0bits_t;
1095 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1097 #define _ADCON0_ADON 0x01
1098 #define _ADCON0_AD1ON 0x01
1099 #define _ADCON0_GO_NOT_DONE 0x02
1100 #define _ADCON0_ADGO 0x02
1101 #define _ADCON0_GO 0x02
1102 #define _ADCON0_CHS0 0x04
1103 #define _ADCON0_CHS1 0x08
1104 #define _ADCON0_CHS2 0x10
1105 #define _ADCON0_CHS3 0x20
1106 #define _ADCON0_CHS4 0x40
1108 //==============================================================================
1111 //==============================================================================
1112 // ADCON1 Bits
1114 extern __at(0x009E) __sfr ADCON1;
1116 typedef union
1118 struct
1120 unsigned ADPREF0 : 1;
1121 unsigned ADPREF1 : 1;
1122 unsigned GO_NOT_DONE_ALL : 1;
1123 unsigned : 1;
1124 unsigned : 1;
1125 unsigned : 1;
1126 unsigned : 1;
1127 unsigned ADFM : 1;
1130 struct
1132 unsigned : 1;
1133 unsigned : 1;
1134 unsigned GO_ALL : 1;
1135 unsigned : 1;
1136 unsigned : 1;
1137 unsigned : 1;
1138 unsigned : 1;
1139 unsigned : 1;
1142 struct
1144 unsigned ADPREF : 2;
1145 unsigned : 6;
1147 } __ADCON1bits_t;
1149 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1151 #define _ADCON1_ADPREF0 0x01
1152 #define _ADCON1_ADPREF1 0x02
1153 #define _ADCON1_GO_NOT_DONE_ALL 0x04
1154 #define _ADCON1_GO_ALL 0x04
1155 #define _ADCON1_ADFM 0x80
1157 //==============================================================================
1160 //==============================================================================
1161 // ADCON2 Bits
1163 extern __at(0x009F) __sfr ADCON2;
1165 typedef union
1167 struct
1169 unsigned : 1;
1170 unsigned : 1;
1171 unsigned : 1;
1172 unsigned : 1;
1173 unsigned TRIGSEL0 : 1;
1174 unsigned TRIGSEL1 : 1;
1175 unsigned TRIGSEL2 : 1;
1176 unsigned : 1;
1179 struct
1181 unsigned : 4;
1182 unsigned TRIGSEL : 3;
1183 unsigned : 1;
1185 } __ADCON2bits_t;
1187 extern __at(0x009F) volatile __ADCON2bits_t ADCON2bits;
1189 #define _ADCON2_TRIGSEL0 0x10
1190 #define _ADCON2_TRIGSEL1 0x20
1191 #define _ADCON2_TRIGSEL2 0x40
1193 //==============================================================================
1196 //==============================================================================
1197 // LATA Bits
1199 extern __at(0x010C) __sfr LATA;
1201 typedef struct
1203 unsigned LATA0 : 1;
1204 unsigned LATA1 : 1;
1205 unsigned LATA2 : 1;
1206 unsigned : 1;
1207 unsigned LATA4 : 1;
1208 unsigned LATA5 : 1;
1209 unsigned : 1;
1210 unsigned : 1;
1211 } __LATAbits_t;
1213 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1215 #define _LATA0 0x01
1216 #define _LATA1 0x02
1217 #define _LATA2 0x04
1218 #define _LATA4 0x10
1219 #define _LATA5 0x20
1221 //==============================================================================
1224 //==============================================================================
1225 // LATB Bits
1227 extern __at(0x010D) __sfr LATB;
1229 typedef struct
1231 unsigned : 1;
1232 unsigned : 1;
1233 unsigned : 1;
1234 unsigned : 1;
1235 unsigned LATB4 : 1;
1236 unsigned LATB5 : 1;
1237 unsigned LATB6 : 1;
1238 unsigned LATB7 : 1;
1239 } __LATBbits_t;
1241 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1243 #define _LATB4 0x10
1244 #define _LATB5 0x20
1245 #define _LATB6 0x40
1246 #define _LATB7 0x80
1248 //==============================================================================
1251 //==============================================================================
1252 // LATC Bits
1254 extern __at(0x010E) __sfr LATC;
1256 typedef struct
1258 unsigned LATC0 : 1;
1259 unsigned LATC1 : 1;
1260 unsigned LATC2 : 1;
1261 unsigned LATC3 : 1;
1262 unsigned LATC4 : 1;
1263 unsigned LATC5 : 1;
1264 unsigned LATC6 : 1;
1265 unsigned LATC7 : 1;
1266 } __LATCbits_t;
1268 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1270 #define _LATC0 0x01
1271 #define _LATC1 0x02
1272 #define _LATC2 0x04
1273 #define _LATC3 0x08
1274 #define _LATC4 0x10
1275 #define _LATC5 0x20
1276 #define _LATC6 0x40
1277 #define _LATC7 0x80
1279 //==============================================================================
1282 //==============================================================================
1283 // BORCON Bits
1285 extern __at(0x0116) __sfr BORCON;
1287 typedef struct
1289 unsigned BORRDY : 1;
1290 unsigned : 1;
1291 unsigned : 1;
1292 unsigned : 1;
1293 unsigned : 1;
1294 unsigned : 1;
1295 unsigned BORFS : 1;
1296 unsigned SBOREN : 1;
1297 } __BORCONbits_t;
1299 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1301 #define _BORRDY 0x01
1302 #define _BORFS 0x40
1303 #define _SBOREN 0x80
1305 //==============================================================================
1308 //==============================================================================
1309 // FVRCON Bits
1311 extern __at(0x0117) __sfr FVRCON;
1313 typedef union
1315 struct
1317 unsigned ADFVR0 : 1;
1318 unsigned ADFVR1 : 1;
1319 unsigned CDAFVR0 : 1;
1320 unsigned CDAFVR1 : 1;
1321 unsigned TSRNG : 1;
1322 unsigned TSEN : 1;
1323 unsigned FVRRDY : 1;
1324 unsigned FVREN : 1;
1327 struct
1329 unsigned ADFVR : 2;
1330 unsigned : 6;
1333 struct
1335 unsigned : 2;
1336 unsigned CDAFVR : 2;
1337 unsigned : 4;
1339 } __FVRCONbits_t;
1341 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1343 #define _ADFVR0 0x01
1344 #define _ADFVR1 0x02
1345 #define _CDAFVR0 0x04
1346 #define _CDAFVR1 0x08
1347 #define _TSRNG 0x10
1348 #define _TSEN 0x20
1349 #define _FVRRDY 0x40
1350 #define _FVREN 0x80
1352 //==============================================================================
1355 //==============================================================================
1356 // APFCON Bits
1358 extern __at(0x011D) __sfr APFCON;
1360 typedef struct
1362 unsigned GRDASEL : 1;
1363 unsigned GRDBSEL : 1;
1364 unsigned : 1;
1365 unsigned : 1;
1366 unsigned SDSEL : 1;
1367 unsigned SSSEL : 1;
1368 unsigned SDOSEL : 1;
1369 unsigned RXDTSEL : 1;
1370 } __APFCONbits_t;
1372 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1374 #define _GRDASEL 0x01
1375 #define _GRDBSEL 0x02
1376 #define _SDSEL 0x10
1377 #define _SSSEL 0x20
1378 #define _SDOSEL 0x40
1379 #define _RXDTSEL 0x80
1381 //==============================================================================
1384 //==============================================================================
1385 // ANSELA Bits
1387 extern __at(0x018C) __sfr ANSELA;
1389 typedef struct
1391 unsigned ANSA0 : 1;
1392 unsigned ANSA1 : 1;
1393 unsigned ANSA2 : 1;
1394 unsigned : 1;
1395 unsigned ANSA4 : 1;
1396 unsigned ANSA5 : 1;
1397 unsigned : 1;
1398 unsigned : 1;
1399 } __ANSELAbits_t;
1401 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1403 #define _ANSA0 0x01
1404 #define _ANSA1 0x02
1405 #define _ANSA2 0x04
1406 #define _ANSA4 0x10
1407 #define _ANSA5 0x20
1409 //==============================================================================
1412 //==============================================================================
1413 // ANSELB Bits
1415 extern __at(0x018D) __sfr ANSELB;
1417 typedef struct
1419 unsigned : 1;
1420 unsigned : 1;
1421 unsigned : 1;
1422 unsigned : 1;
1423 unsigned ANSB4 : 1;
1424 unsigned ANSB5 : 1;
1425 unsigned ANSB6 : 1;
1426 unsigned ANSB7 : 1;
1427 } __ANSELBbits_t;
1429 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1431 #define _ANSB4 0x10
1432 #define _ANSB5 0x20
1433 #define _ANSB6 0x40
1434 #define _ANSB7 0x80
1436 //==============================================================================
1439 //==============================================================================
1440 // ANSELC Bits
1442 extern __at(0x018E) __sfr ANSELC;
1444 typedef struct
1446 unsigned ANSC0 : 1;
1447 unsigned ANSC1 : 1;
1448 unsigned ANSC2 : 1;
1449 unsigned ANSC3 : 1;
1450 unsigned ANSC4 : 1;
1451 unsigned ANSC5 : 1;
1452 unsigned ANSC6 : 1;
1453 unsigned ANSC7 : 1;
1454 } __ANSELCbits_t;
1456 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1458 #define _ANSC0 0x01
1459 #define _ANSC1 0x02
1460 #define _ANSC2 0x04
1461 #define _ANSC3 0x08
1462 #define _ANSC4 0x10
1463 #define _ANSC5 0x20
1464 #define _ANSC6 0x40
1465 #define _ANSC7 0x80
1467 //==============================================================================
1469 extern __at(0x0191) __sfr PMADR;
1470 extern __at(0x0191) __sfr PMADRL;
1471 extern __at(0x0192) __sfr PMADRH;
1472 extern __at(0x0193) __sfr PMDAT;
1473 extern __at(0x0193) __sfr PMDATL;
1474 extern __at(0x0194) __sfr PMDATH;
1476 //==============================================================================
1477 // PMCON1 Bits
1479 extern __at(0x0195) __sfr PMCON1;
1481 typedef struct
1483 unsigned RD : 1;
1484 unsigned WR : 1;
1485 unsigned WREN : 1;
1486 unsigned WRERR : 1;
1487 unsigned FREE : 1;
1488 unsigned LWLO : 1;
1489 unsigned CFGS : 1;
1490 unsigned : 1;
1491 } __PMCON1bits_t;
1493 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1495 #define _RD 0x01
1496 #define _WR 0x02
1497 #define _WREN 0x04
1498 #define _WRERR 0x08
1499 #define _FREE 0x10
1500 #define _LWLO 0x20
1501 #define _CFGS 0x40
1503 //==============================================================================
1505 extern __at(0x0196) __sfr PMCON2;
1506 extern __at(0x0199) __sfr RCREG;
1507 extern __at(0x019A) __sfr TXREG;
1508 extern __at(0x019B) __sfr SPBRG;
1509 extern __at(0x019B) __sfr SPBRGL;
1510 extern __at(0x019C) __sfr SPBRGH;
1512 //==============================================================================
1513 // RCSTA Bits
1515 extern __at(0x019D) __sfr RCSTA;
1517 typedef struct
1519 unsigned RX9D : 1;
1520 unsigned OERR : 1;
1521 unsigned FERR : 1;
1522 unsigned ADDEN : 1;
1523 unsigned CREN : 1;
1524 unsigned SREN : 1;
1525 unsigned RX9 : 1;
1526 unsigned SPEN : 1;
1527 } __RCSTAbits_t;
1529 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1531 #define _RX9D 0x01
1532 #define _OERR 0x02
1533 #define _FERR 0x04
1534 #define _ADDEN 0x08
1535 #define _CREN 0x10
1536 #define _SREN 0x20
1537 #define _RX9 0x40
1538 #define _SPEN 0x80
1540 //==============================================================================
1543 //==============================================================================
1544 // TXSTA Bits
1546 extern __at(0x019E) __sfr TXSTA;
1548 typedef struct
1550 unsigned TX9D : 1;
1551 unsigned TRMT : 1;
1552 unsigned BRGH : 1;
1553 unsigned SENDB : 1;
1554 unsigned SYNC : 1;
1555 unsigned TXEN : 1;
1556 unsigned TX9 : 1;
1557 unsigned CSRC : 1;
1558 } __TXSTAbits_t;
1560 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
1562 #define _TX9D 0x01
1563 #define _TRMT 0x02
1564 #define _BRGH 0x04
1565 #define _SENDB 0x08
1566 #define _SYNC 0x10
1567 #define _TXEN 0x20
1568 #define _TX9 0x40
1569 #define _CSRC 0x80
1571 //==============================================================================
1574 //==============================================================================
1575 // BAUDCON Bits
1577 extern __at(0x019F) __sfr BAUDCON;
1579 typedef struct
1581 unsigned ABDEN : 1;
1582 unsigned WUE : 1;
1583 unsigned : 1;
1584 unsigned BRG16 : 1;
1585 unsigned SCKP : 1;
1586 unsigned : 1;
1587 unsigned RCIDL : 1;
1588 unsigned ABDOVF : 1;
1589 } __BAUDCONbits_t;
1591 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
1593 #define _ABDEN 0x01
1594 #define _WUE 0x02
1595 #define _BRG16 0x08
1596 #define _SCKP 0x10
1597 #define _RCIDL 0x40
1598 #define _ABDOVF 0x80
1600 //==============================================================================
1603 //==============================================================================
1604 // WPUA Bits
1606 extern __at(0x020C) __sfr WPUA;
1608 typedef union
1610 struct
1612 unsigned WPUA0 : 1;
1613 unsigned WPUA1 : 1;
1614 unsigned WPUA2 : 1;
1615 unsigned WPUA3 : 1;
1616 unsigned WPUA4 : 1;
1617 unsigned WPUA5 : 1;
1618 unsigned : 1;
1619 unsigned : 1;
1622 struct
1624 unsigned WPUA : 6;
1625 unsigned : 2;
1627 } __WPUAbits_t;
1629 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
1631 #define _WPUA0 0x01
1632 #define _WPUA1 0x02
1633 #define _WPUA2 0x04
1634 #define _WPUA3 0x08
1635 #define _WPUA4 0x10
1636 #define _WPUA5 0x20
1638 //==============================================================================
1641 //==============================================================================
1642 // WPUB Bits
1644 extern __at(0x020D) __sfr WPUB;
1646 typedef struct
1648 unsigned : 1;
1649 unsigned : 1;
1650 unsigned : 1;
1651 unsigned : 1;
1652 unsigned WPUB4 : 1;
1653 unsigned WPUB5 : 1;
1654 unsigned WPUB6 : 1;
1655 unsigned WPUB7 : 1;
1656 } __WPUBbits_t;
1658 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
1660 #define _WPUB4 0x10
1661 #define _WPUB5 0x20
1662 #define _WPUB6 0x40
1663 #define _WPUB7 0x80
1665 //==============================================================================
1667 extern __at(0x0211) __sfr SSP1BUF;
1668 extern __at(0x0211) __sfr SSPBUF;
1669 extern __at(0x0212) __sfr SSP1ADD;
1670 extern __at(0x0212) __sfr SSPADD;
1671 extern __at(0x0213) __sfr SSP1MSK;
1672 extern __at(0x0213) __sfr SSPMSK;
1674 //==============================================================================
1675 // SSP1STAT Bits
1677 extern __at(0x0214) __sfr SSP1STAT;
1679 typedef struct
1681 unsigned BF : 1;
1682 unsigned UA : 1;
1683 unsigned R_NOT_W : 1;
1684 unsigned S : 1;
1685 unsigned P : 1;
1686 unsigned D_NOT_A : 1;
1687 unsigned CKE : 1;
1688 unsigned SMP : 1;
1689 } __SSP1STATbits_t;
1691 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
1693 #define _BF 0x01
1694 #define _UA 0x02
1695 #define _R_NOT_W 0x04
1696 #define _S 0x08
1697 #define _P 0x10
1698 #define _D_NOT_A 0x20
1699 #define _CKE 0x40
1700 #define _SMP 0x80
1702 //==============================================================================
1705 //==============================================================================
1706 // SSPSTAT Bits
1708 extern __at(0x0214) __sfr SSPSTAT;
1710 typedef struct
1712 unsigned BF : 1;
1713 unsigned UA : 1;
1714 unsigned R_NOT_W : 1;
1715 unsigned S : 1;
1716 unsigned P : 1;
1717 unsigned D_NOT_A : 1;
1718 unsigned CKE : 1;
1719 unsigned SMP : 1;
1720 } __SSPSTATbits_t;
1722 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
1724 #define _SSPSTAT_BF 0x01
1725 #define _SSPSTAT_UA 0x02
1726 #define _SSPSTAT_R_NOT_W 0x04
1727 #define _SSPSTAT_S 0x08
1728 #define _SSPSTAT_P 0x10
1729 #define _SSPSTAT_D_NOT_A 0x20
1730 #define _SSPSTAT_CKE 0x40
1731 #define _SSPSTAT_SMP 0x80
1733 //==============================================================================
1736 //==============================================================================
1737 // SSP1CON1 Bits
1739 extern __at(0x0215) __sfr SSP1CON1;
1741 typedef union
1743 struct
1745 unsigned SSPM0 : 1;
1746 unsigned SSPM1 : 1;
1747 unsigned SSPM2 : 1;
1748 unsigned SSPM3 : 1;
1749 unsigned CKP : 1;
1750 unsigned SSPEN : 1;
1751 unsigned SSPOV : 1;
1752 unsigned WCOL : 1;
1755 struct
1757 unsigned SSPM : 4;
1758 unsigned : 4;
1760 } __SSP1CON1bits_t;
1762 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
1764 #define _SSPM0 0x01
1765 #define _SSPM1 0x02
1766 #define _SSPM2 0x04
1767 #define _SSPM3 0x08
1768 #define _CKP 0x10
1769 #define _SSPEN 0x20
1770 #define _SSPOV 0x40
1771 #define _WCOL 0x80
1773 //==============================================================================
1776 //==============================================================================
1777 // SSPCON Bits
1779 extern __at(0x0215) __sfr SSPCON;
1781 typedef union
1783 struct
1785 unsigned SSPM0 : 1;
1786 unsigned SSPM1 : 1;
1787 unsigned SSPM2 : 1;
1788 unsigned SSPM3 : 1;
1789 unsigned CKP : 1;
1790 unsigned SSPEN : 1;
1791 unsigned SSPOV : 1;
1792 unsigned WCOL : 1;
1795 struct
1797 unsigned SSPM : 4;
1798 unsigned : 4;
1800 } __SSPCONbits_t;
1802 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
1804 #define _SSPCON_SSPM0 0x01
1805 #define _SSPCON_SSPM1 0x02
1806 #define _SSPCON_SSPM2 0x04
1807 #define _SSPCON_SSPM3 0x08
1808 #define _SSPCON_CKP 0x10
1809 #define _SSPCON_SSPEN 0x20
1810 #define _SSPCON_SSPOV 0x40
1811 #define _SSPCON_WCOL 0x80
1813 //==============================================================================
1816 //==============================================================================
1817 // SSPCON1 Bits
1819 extern __at(0x0215) __sfr SSPCON1;
1821 typedef union
1823 struct
1825 unsigned SSPM0 : 1;
1826 unsigned SSPM1 : 1;
1827 unsigned SSPM2 : 1;
1828 unsigned SSPM3 : 1;
1829 unsigned CKP : 1;
1830 unsigned SSPEN : 1;
1831 unsigned SSPOV : 1;
1832 unsigned WCOL : 1;
1835 struct
1837 unsigned SSPM : 4;
1838 unsigned : 4;
1840 } __SSPCON1bits_t;
1842 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
1844 #define _SSPCON1_SSPM0 0x01
1845 #define _SSPCON1_SSPM1 0x02
1846 #define _SSPCON1_SSPM2 0x04
1847 #define _SSPCON1_SSPM3 0x08
1848 #define _SSPCON1_CKP 0x10
1849 #define _SSPCON1_SSPEN 0x20
1850 #define _SSPCON1_SSPOV 0x40
1851 #define _SSPCON1_WCOL 0x80
1853 //==============================================================================
1856 //==============================================================================
1857 // SSP1CON2 Bits
1859 extern __at(0x0216) __sfr SSP1CON2;
1861 typedef struct
1863 unsigned SEN : 1;
1864 unsigned RSEN : 1;
1865 unsigned PEN : 1;
1866 unsigned RCEN : 1;
1867 unsigned ACKEN : 1;
1868 unsigned ACKDT : 1;
1869 unsigned ACKSTAT : 1;
1870 unsigned GCEN : 1;
1871 } __SSP1CON2bits_t;
1873 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
1875 #define _SEN 0x01
1876 #define _RSEN 0x02
1877 #define _PEN 0x04
1878 #define _RCEN 0x08
1879 #define _ACKEN 0x10
1880 #define _ACKDT 0x20
1881 #define _ACKSTAT 0x40
1882 #define _GCEN 0x80
1884 //==============================================================================
1887 //==============================================================================
1888 // SSPCON2 Bits
1890 extern __at(0x0216) __sfr SSPCON2;
1892 typedef struct
1894 unsigned SEN : 1;
1895 unsigned RSEN : 1;
1896 unsigned PEN : 1;
1897 unsigned RCEN : 1;
1898 unsigned ACKEN : 1;
1899 unsigned ACKDT : 1;
1900 unsigned ACKSTAT : 1;
1901 unsigned GCEN : 1;
1902 } __SSPCON2bits_t;
1904 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
1906 #define _SSPCON2_SEN 0x01
1907 #define _SSPCON2_RSEN 0x02
1908 #define _SSPCON2_PEN 0x04
1909 #define _SSPCON2_RCEN 0x08
1910 #define _SSPCON2_ACKEN 0x10
1911 #define _SSPCON2_ACKDT 0x20
1912 #define _SSPCON2_ACKSTAT 0x40
1913 #define _SSPCON2_GCEN 0x80
1915 //==============================================================================
1918 //==============================================================================
1919 // SSP1CON3 Bits
1921 extern __at(0x0217) __sfr SSP1CON3;
1923 typedef struct
1925 unsigned DHEN : 1;
1926 unsigned AHEN : 1;
1927 unsigned SBCDE : 1;
1928 unsigned SDAHT : 1;
1929 unsigned BOEN : 1;
1930 unsigned SCIE : 1;
1931 unsigned PCIE : 1;
1932 unsigned ACKTIM : 1;
1933 } __SSP1CON3bits_t;
1935 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
1937 #define _DHEN 0x01
1938 #define _AHEN 0x02
1939 #define _SBCDE 0x04
1940 #define _SDAHT 0x08
1941 #define _BOEN 0x10
1942 #define _SCIE 0x20
1943 #define _PCIE 0x40
1944 #define _ACKTIM 0x80
1946 //==============================================================================
1949 //==============================================================================
1950 // SSPCON3 Bits
1952 extern __at(0x0217) __sfr SSPCON3;
1954 typedef struct
1956 unsigned DHEN : 1;
1957 unsigned AHEN : 1;
1958 unsigned SBCDE : 1;
1959 unsigned SDAHT : 1;
1960 unsigned BOEN : 1;
1961 unsigned SCIE : 1;
1962 unsigned PCIE : 1;
1963 unsigned ACKTIM : 1;
1964 } __SSPCON3bits_t;
1966 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
1968 #define _SSPCON3_DHEN 0x01
1969 #define _SSPCON3_AHEN 0x02
1970 #define _SSPCON3_SBCDE 0x04
1971 #define _SSPCON3_SDAHT 0x08
1972 #define _SSPCON3_BOEN 0x10
1973 #define _SSPCON3_SCIE 0x20
1974 #define _SSPCON3_PCIE 0x40
1975 #define _SSPCON3_ACKTIM 0x80
1977 //==============================================================================
1980 //==============================================================================
1981 // IOCAP Bits
1983 extern __at(0x0391) __sfr IOCAP;
1985 typedef union
1987 struct
1989 unsigned IOCAP0 : 1;
1990 unsigned IOCAP1 : 1;
1991 unsigned IOCAP2 : 1;
1992 unsigned IOCAP3 : 1;
1993 unsigned IOCAP4 : 1;
1994 unsigned IOCAP5 : 1;
1995 unsigned : 1;
1996 unsigned : 1;
1999 struct
2001 unsigned IOCAP : 6;
2002 unsigned : 2;
2004 } __IOCAPbits_t;
2006 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
2008 #define _IOCAP0 0x01
2009 #define _IOCAP1 0x02
2010 #define _IOCAP2 0x04
2011 #define _IOCAP3 0x08
2012 #define _IOCAP4 0x10
2013 #define _IOCAP5 0x20
2015 //==============================================================================
2018 //==============================================================================
2019 // IOCAN Bits
2021 extern __at(0x0392) __sfr IOCAN;
2023 typedef union
2025 struct
2027 unsigned IOCAN0 : 1;
2028 unsigned IOCAN1 : 1;
2029 unsigned IOCAN2 : 1;
2030 unsigned IOCAN3 : 1;
2031 unsigned IOCAN4 : 1;
2032 unsigned IOCAN5 : 1;
2033 unsigned : 1;
2034 unsigned : 1;
2037 struct
2039 unsigned IOCAN : 6;
2040 unsigned : 2;
2042 } __IOCANbits_t;
2044 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
2046 #define _IOCAN0 0x01
2047 #define _IOCAN1 0x02
2048 #define _IOCAN2 0x04
2049 #define _IOCAN3 0x08
2050 #define _IOCAN4 0x10
2051 #define _IOCAN5 0x20
2053 //==============================================================================
2056 //==============================================================================
2057 // IOCAF Bits
2059 extern __at(0x0393) __sfr IOCAF;
2061 typedef union
2063 struct
2065 unsigned IOCAF0 : 1;
2066 unsigned IOCAF1 : 1;
2067 unsigned IOCAF2 : 1;
2068 unsigned IOCAF3 : 1;
2069 unsigned IOCAF4 : 1;
2070 unsigned IOCAF5 : 1;
2071 unsigned : 1;
2072 unsigned : 1;
2075 struct
2077 unsigned IOCAF : 6;
2078 unsigned : 2;
2080 } __IOCAFbits_t;
2082 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
2084 #define _IOCAF0 0x01
2085 #define _IOCAF1 0x02
2086 #define _IOCAF2 0x04
2087 #define _IOCAF3 0x08
2088 #define _IOCAF4 0x10
2089 #define _IOCAF5 0x20
2091 //==============================================================================
2094 //==============================================================================
2095 // IOCBP Bits
2097 extern __at(0x0394) __sfr IOCBP;
2099 typedef struct
2101 unsigned : 1;
2102 unsigned : 1;
2103 unsigned : 1;
2104 unsigned : 1;
2105 unsigned IOCBP4 : 1;
2106 unsigned IOCBP5 : 1;
2107 unsigned IOCBP6 : 1;
2108 unsigned IOCBP7 : 1;
2109 } __IOCBPbits_t;
2111 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
2113 #define _IOCBP4 0x10
2114 #define _IOCBP5 0x20
2115 #define _IOCBP6 0x40
2116 #define _IOCBP7 0x80
2118 //==============================================================================
2121 //==============================================================================
2122 // IOCBN Bits
2124 extern __at(0x0395) __sfr IOCBN;
2126 typedef struct
2128 unsigned : 1;
2129 unsigned : 1;
2130 unsigned : 1;
2131 unsigned : 1;
2132 unsigned IOCBN4 : 1;
2133 unsigned IOCBN5 : 1;
2134 unsigned IOCBN6 : 1;
2135 unsigned IOCBN7 : 1;
2136 } __IOCBNbits_t;
2138 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
2140 #define _IOCBN4 0x10
2141 #define _IOCBN5 0x20
2142 #define _IOCBN6 0x40
2143 #define _IOCBN7 0x80
2145 //==============================================================================
2148 //==============================================================================
2149 // IOCBF Bits
2151 extern __at(0x0396) __sfr IOCBF;
2153 typedef struct
2155 unsigned : 1;
2156 unsigned : 1;
2157 unsigned : 1;
2158 unsigned : 1;
2159 unsigned IOCBF4 : 1;
2160 unsigned IOCBF5 : 1;
2161 unsigned IOCBF6 : 1;
2162 unsigned IOCBF7 : 1;
2163 } __IOCBFbits_t;
2165 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
2167 #define _IOCBF4 0x10
2168 #define _IOCBF5 0x20
2169 #define _IOCBF6 0x40
2170 #define _IOCBF7 0x80
2172 //==============================================================================
2175 //==============================================================================
2176 // PWM1DCL Bits
2178 extern __at(0x0611) __sfr PWM1DCL;
2180 typedef union
2182 struct
2184 unsigned : 1;
2185 unsigned : 1;
2186 unsigned : 1;
2187 unsigned : 1;
2188 unsigned : 1;
2189 unsigned : 1;
2190 unsigned PWM1DCL0 : 1;
2191 unsigned PWM1DCL1 : 1;
2194 struct
2196 unsigned : 6;
2197 unsigned PWM1DCL : 2;
2199 } __PWM1DCLbits_t;
2201 extern __at(0x0611) volatile __PWM1DCLbits_t PWM1DCLbits;
2203 #define _PWM1DCL0 0x40
2204 #define _PWM1DCL1 0x80
2206 //==============================================================================
2209 //==============================================================================
2210 // PWM1DCH Bits
2212 extern __at(0x0612) __sfr PWM1DCH;
2214 typedef struct
2216 unsigned PWM1DCH0 : 1;
2217 unsigned PWM1DCH1 : 1;
2218 unsigned PWM1DCH2 : 1;
2219 unsigned PWM1DCH3 : 1;
2220 unsigned PWM1DCH4 : 1;
2221 unsigned PWM1DCH5 : 1;
2222 unsigned PWM1DCH6 : 1;
2223 unsigned PWM1DCH7 : 1;
2224 } __PWM1DCHbits_t;
2226 extern __at(0x0612) volatile __PWM1DCHbits_t PWM1DCHbits;
2228 #define _PWM1DCH0 0x01
2229 #define _PWM1DCH1 0x02
2230 #define _PWM1DCH2 0x04
2231 #define _PWM1DCH3 0x08
2232 #define _PWM1DCH4 0x10
2233 #define _PWM1DCH5 0x20
2234 #define _PWM1DCH6 0x40
2235 #define _PWM1DCH7 0x80
2237 //==============================================================================
2240 //==============================================================================
2241 // PWM1CON Bits
2243 extern __at(0x0613) __sfr PWM1CON;
2245 typedef struct
2247 unsigned : 1;
2248 unsigned : 1;
2249 unsigned : 1;
2250 unsigned : 1;
2251 unsigned PWM1POL : 1;
2252 unsigned PWM1OUT : 1;
2253 unsigned PWM1OE : 1;
2254 unsigned PWM1EN : 1;
2255 } __PWM1CONbits_t;
2257 extern __at(0x0613) volatile __PWM1CONbits_t PWM1CONbits;
2259 #define _PWM1POL 0x10
2260 #define _PWM1OUT 0x20
2261 #define _PWM1OE 0x40
2262 #define _PWM1EN 0x80
2264 //==============================================================================
2267 //==============================================================================
2268 // PWM1CON0 Bits
2270 extern __at(0x0613) __sfr PWM1CON0;
2272 typedef struct
2274 unsigned : 1;
2275 unsigned : 1;
2276 unsigned : 1;
2277 unsigned : 1;
2278 unsigned PWM1POL : 1;
2279 unsigned PWM1OUT : 1;
2280 unsigned PWM1OE : 1;
2281 unsigned PWM1EN : 1;
2282 } __PWM1CON0bits_t;
2284 extern __at(0x0613) volatile __PWM1CON0bits_t PWM1CON0bits;
2286 #define _PWM1CON0_PWM1POL 0x10
2287 #define _PWM1CON0_PWM1OUT 0x20
2288 #define _PWM1CON0_PWM1OE 0x40
2289 #define _PWM1CON0_PWM1EN 0x80
2291 //==============================================================================
2294 //==============================================================================
2295 // PWM2DCL Bits
2297 extern __at(0x0614) __sfr PWM2DCL;
2299 typedef union
2301 struct
2303 unsigned : 1;
2304 unsigned : 1;
2305 unsigned : 1;
2306 unsigned : 1;
2307 unsigned : 1;
2308 unsigned : 1;
2309 unsigned PWM2DCL0 : 1;
2310 unsigned PWM2DCL1 : 1;
2313 struct
2315 unsigned : 6;
2316 unsigned PWM2DCL : 2;
2318 } __PWM2DCLbits_t;
2320 extern __at(0x0614) volatile __PWM2DCLbits_t PWM2DCLbits;
2322 #define _PWM2DCL0 0x40
2323 #define _PWM2DCL1 0x80
2325 //==============================================================================
2328 //==============================================================================
2329 // PWM2DCH Bits
2331 extern __at(0x0615) __sfr PWM2DCH;
2333 typedef struct
2335 unsigned PWM2DCH0 : 1;
2336 unsigned PWM2DCH1 : 1;
2337 unsigned PWM2DCH2 : 1;
2338 unsigned PWM2DCH3 : 1;
2339 unsigned PWM2DCH4 : 1;
2340 unsigned PWM2DCH5 : 1;
2341 unsigned PWM2DCH6 : 1;
2342 unsigned PWM2DCH7 : 1;
2343 } __PWM2DCHbits_t;
2345 extern __at(0x0615) volatile __PWM2DCHbits_t PWM2DCHbits;
2347 #define _PWM2DCH0 0x01
2348 #define _PWM2DCH1 0x02
2349 #define _PWM2DCH2 0x04
2350 #define _PWM2DCH3 0x08
2351 #define _PWM2DCH4 0x10
2352 #define _PWM2DCH5 0x20
2353 #define _PWM2DCH6 0x40
2354 #define _PWM2DCH7 0x80
2356 //==============================================================================
2359 //==============================================================================
2360 // PWM2CON Bits
2362 extern __at(0x0616) __sfr PWM2CON;
2364 typedef struct
2366 unsigned : 1;
2367 unsigned : 1;
2368 unsigned : 1;
2369 unsigned : 1;
2370 unsigned PWM2POL : 1;
2371 unsigned PWM2OUT : 1;
2372 unsigned PWM2OE : 1;
2373 unsigned PWM2EN : 1;
2374 } __PWM2CONbits_t;
2376 extern __at(0x0616) volatile __PWM2CONbits_t PWM2CONbits;
2378 #define _PWM2POL 0x10
2379 #define _PWM2OUT 0x20
2380 #define _PWM2OE 0x40
2381 #define _PWM2EN 0x80
2383 //==============================================================================
2386 //==============================================================================
2387 // PWM2CON0 Bits
2389 extern __at(0x0616) __sfr PWM2CON0;
2391 typedef struct
2393 unsigned : 1;
2394 unsigned : 1;
2395 unsigned : 1;
2396 unsigned : 1;
2397 unsigned PWM2POL : 1;
2398 unsigned PWM2OUT : 1;
2399 unsigned PWM2OE : 1;
2400 unsigned PWM2EN : 1;
2401 } __PWM2CON0bits_t;
2403 extern __at(0x0616) volatile __PWM2CON0bits_t PWM2CON0bits;
2405 #define _PWM2CON0_PWM2POL 0x10
2406 #define _PWM2CON0_PWM2OUT 0x20
2407 #define _PWM2CON0_PWM2OE 0x40
2408 #define _PWM2CON0_PWM2EN 0x80
2410 //==============================================================================
2413 //==============================================================================
2414 // AAD1CON0 Bits
2416 extern __at(0x0711) __sfr AAD1CON0;
2418 typedef union
2420 struct
2422 unsigned ADON : 1;
2423 unsigned GO : 1;
2424 unsigned CHS0 : 1;
2425 unsigned CHS1 : 1;
2426 unsigned CHS2 : 1;
2427 unsigned CHS3 : 1;
2428 unsigned CHS4 : 1;
2429 unsigned : 1;
2432 struct
2434 unsigned : 1;
2435 unsigned GO_NOT_DONE : 1;
2436 unsigned : 1;
2437 unsigned : 1;
2438 unsigned : 1;
2439 unsigned : 1;
2440 unsigned : 1;
2441 unsigned : 1;
2444 struct
2446 unsigned : 1;
2447 unsigned GO_NOT_DONE1 : 1;
2448 unsigned : 1;
2449 unsigned : 1;
2450 unsigned : 1;
2451 unsigned : 1;
2452 unsigned : 1;
2453 unsigned : 1;
2456 struct
2458 unsigned : 2;
2459 unsigned CHS : 5;
2460 unsigned : 1;
2462 } __AAD1CON0bits_t;
2464 extern __at(0x0711) volatile __AAD1CON0bits_t AAD1CON0bits;
2466 #define _ADON 0x01
2467 #define _GO 0x02
2468 #define _GO_NOT_DONE 0x02
2469 #define _GO_NOT_DONE1 0x02
2470 #define _CHS0 0x04
2471 #define _CHS1 0x08
2472 #define _CHS2 0x10
2473 #define _CHS3 0x20
2474 #define _CHS4 0x40
2476 //==============================================================================
2479 //==============================================================================
2480 // AADCON0 Bits
2482 extern __at(0x0711) __sfr AADCON0;
2484 typedef union
2486 struct
2488 unsigned ADON : 1;
2489 unsigned GO : 1;
2490 unsigned CHS0 : 1;
2491 unsigned CHS1 : 1;
2492 unsigned CHS2 : 1;
2493 unsigned CHS3 : 1;
2494 unsigned CHS4 : 1;
2495 unsigned : 1;
2498 struct
2500 unsigned : 1;
2501 unsigned GO_NOT_DONE : 1;
2502 unsigned : 1;
2503 unsigned : 1;
2504 unsigned : 1;
2505 unsigned : 1;
2506 unsigned : 1;
2507 unsigned : 1;
2510 struct
2512 unsigned : 1;
2513 unsigned GO_NOT_DONE1 : 1;
2514 unsigned : 1;
2515 unsigned : 1;
2516 unsigned : 1;
2517 unsigned : 1;
2518 unsigned : 1;
2519 unsigned : 1;
2522 struct
2524 unsigned : 2;
2525 unsigned CHS : 5;
2526 unsigned : 1;
2528 } __AADCON0bits_t;
2530 extern __at(0x0711) volatile __AADCON0bits_t AADCON0bits;
2532 #define _AADCON0_ADON 0x01
2533 #define _AADCON0_GO 0x02
2534 #define _AADCON0_GO_NOT_DONE 0x02
2535 #define _AADCON0_GO_NOT_DONE1 0x02
2536 #define _AADCON0_CHS0 0x04
2537 #define _AADCON0_CHS1 0x08
2538 #define _AADCON0_CHS2 0x10
2539 #define _AADCON0_CHS3 0x20
2540 #define _AADCON0_CHS4 0x40
2542 //==============================================================================
2545 //==============================================================================
2546 // AD1CON0 Bits
2548 extern __at(0x0711) __sfr AD1CON0;
2550 typedef union
2552 struct
2554 unsigned ADON : 1;
2555 unsigned GO : 1;
2556 unsigned CHS0 : 1;
2557 unsigned CHS1 : 1;
2558 unsigned CHS2 : 1;
2559 unsigned CHS3 : 1;
2560 unsigned CHS4 : 1;
2561 unsigned : 1;
2564 struct
2566 unsigned : 1;
2567 unsigned GO_NOT_DONE : 1;
2568 unsigned : 1;
2569 unsigned : 1;
2570 unsigned : 1;
2571 unsigned : 1;
2572 unsigned : 1;
2573 unsigned : 1;
2576 struct
2578 unsigned : 1;
2579 unsigned GO_NOT_DONE1 : 1;
2580 unsigned : 1;
2581 unsigned : 1;
2582 unsigned : 1;
2583 unsigned : 1;
2584 unsigned : 1;
2585 unsigned : 1;
2588 struct
2590 unsigned : 2;
2591 unsigned CHS : 5;
2592 unsigned : 1;
2594 } __AD1CON0bits_t;
2596 extern __at(0x0711) volatile __AD1CON0bits_t AD1CON0bits;
2598 #define _AD1CON0_ADON 0x01
2599 #define _AD1CON0_GO 0x02
2600 #define _AD1CON0_GO_NOT_DONE 0x02
2601 #define _AD1CON0_GO_NOT_DONE1 0x02
2602 #define _AD1CON0_CHS0 0x04
2603 #define _AD1CON0_CHS1 0x08
2604 #define _AD1CON0_CHS2 0x10
2605 #define _AD1CON0_CHS3 0x20
2606 #define _AD1CON0_CHS4 0x40
2608 //==============================================================================
2611 //==============================================================================
2612 // AADCON1 Bits
2614 extern __at(0x0712) __sfr AADCON1;
2616 typedef union
2618 struct
2620 unsigned ADPREF0 : 1;
2621 unsigned ADPREF1 : 1;
2622 unsigned GO_NOT_DONE_ALL : 1;
2623 unsigned : 1;
2624 unsigned ADCS0 : 1;
2625 unsigned ADCS1 : 1;
2626 unsigned ADCS2 : 1;
2627 unsigned ADFM : 1;
2630 struct
2632 unsigned : 1;
2633 unsigned : 1;
2634 unsigned GO_ALL : 1;
2635 unsigned : 1;
2636 unsigned : 1;
2637 unsigned : 1;
2638 unsigned : 1;
2639 unsigned : 1;
2642 struct
2644 unsigned ADPREF : 2;
2645 unsigned : 6;
2648 struct
2650 unsigned : 4;
2651 unsigned ADCS : 3;
2652 unsigned : 1;
2654 } __AADCON1bits_t;
2656 extern __at(0x0712) volatile __AADCON1bits_t AADCON1bits;
2658 #define _ADPREF0 0x01
2659 #define _ADPREF1 0x02
2660 #define _GO_NOT_DONE_ALL 0x04
2661 #define _GO_ALL 0x04
2662 #define _ADCS0 0x10
2663 #define _ADCS1 0x20
2664 #define _ADCS2 0x40
2665 #define _ADFM 0x80
2667 //==============================================================================
2670 //==============================================================================
2671 // ADCOMCON Bits
2673 extern __at(0x0712) __sfr ADCOMCON;
2675 typedef union
2677 struct
2679 unsigned ADPREF0 : 1;
2680 unsigned ADPREF1 : 1;
2681 unsigned GO_NOT_DONE_ALL : 1;
2682 unsigned : 1;
2683 unsigned ADCS0 : 1;
2684 unsigned ADCS1 : 1;
2685 unsigned ADCS2 : 1;
2686 unsigned ADFM : 1;
2689 struct
2691 unsigned : 1;
2692 unsigned : 1;
2693 unsigned GO_ALL : 1;
2694 unsigned : 1;
2695 unsigned : 1;
2696 unsigned : 1;
2697 unsigned : 1;
2698 unsigned : 1;
2701 struct
2703 unsigned ADPREF : 2;
2704 unsigned : 6;
2707 struct
2709 unsigned : 4;
2710 unsigned ADCS : 3;
2711 unsigned : 1;
2713 } __ADCOMCONbits_t;
2715 extern __at(0x0712) volatile __ADCOMCONbits_t ADCOMCONbits;
2717 #define _ADCOMCON_ADPREF0 0x01
2718 #define _ADCOMCON_ADPREF1 0x02
2719 #define _ADCOMCON_GO_NOT_DONE_ALL 0x04
2720 #define _ADCOMCON_GO_ALL 0x04
2721 #define _ADCOMCON_ADCS0 0x10
2722 #define _ADCOMCON_ADCS1 0x20
2723 #define _ADCOMCON_ADCS2 0x40
2724 #define _ADCOMCON_ADFM 0x80
2726 //==============================================================================
2729 //==============================================================================
2730 // AAD1CON2 Bits
2732 extern __at(0x0713) __sfr AAD1CON2;
2734 typedef union
2736 struct
2738 unsigned : 1;
2739 unsigned : 1;
2740 unsigned : 1;
2741 unsigned : 1;
2742 unsigned TRIGSEL0 : 1;
2743 unsigned TRIGSEL1 : 1;
2744 unsigned TRIGSEL2 : 1;
2745 unsigned : 1;
2748 struct
2750 unsigned : 4;
2751 unsigned TRIGSEL : 3;
2752 unsigned : 1;
2754 } __AAD1CON2bits_t;
2756 extern __at(0x0713) volatile __AAD1CON2bits_t AAD1CON2bits;
2758 #define _TRIGSEL0 0x10
2759 #define _TRIGSEL1 0x20
2760 #define _TRIGSEL2 0x40
2762 //==============================================================================
2765 //==============================================================================
2766 // AADCON2 Bits
2768 extern __at(0x0713) __sfr AADCON2;
2770 typedef union
2772 struct
2774 unsigned : 1;
2775 unsigned : 1;
2776 unsigned : 1;
2777 unsigned : 1;
2778 unsigned TRIGSEL0 : 1;
2779 unsigned TRIGSEL1 : 1;
2780 unsigned TRIGSEL2 : 1;
2781 unsigned : 1;
2784 struct
2786 unsigned : 4;
2787 unsigned TRIGSEL : 3;
2788 unsigned : 1;
2790 } __AADCON2bits_t;
2792 extern __at(0x0713) volatile __AADCON2bits_t AADCON2bits;
2794 #define _AADCON2_TRIGSEL0 0x10
2795 #define _AADCON2_TRIGSEL1 0x20
2796 #define _AADCON2_TRIGSEL2 0x40
2798 //==============================================================================
2801 //==============================================================================
2802 // AD1CON2 Bits
2804 extern __at(0x0713) __sfr AD1CON2;
2806 typedef union
2808 struct
2810 unsigned : 1;
2811 unsigned : 1;
2812 unsigned : 1;
2813 unsigned : 1;
2814 unsigned TRIGSEL0 : 1;
2815 unsigned TRIGSEL1 : 1;
2816 unsigned TRIGSEL2 : 1;
2817 unsigned : 1;
2820 struct
2822 unsigned : 4;
2823 unsigned TRIGSEL : 3;
2824 unsigned : 1;
2826 } __AD1CON2bits_t;
2828 extern __at(0x0713) volatile __AD1CON2bits_t AD1CON2bits;
2830 #define _AD1CON2_TRIGSEL0 0x10
2831 #define _AD1CON2_TRIGSEL1 0x20
2832 #define _AD1CON2_TRIGSEL2 0x40
2834 //==============================================================================
2837 //==============================================================================
2838 // AAD1CON3 Bits
2840 extern __at(0x0714) __sfr AAD1CON3;
2842 typedef union
2844 struct
2846 unsigned AD1DSEN : 1;
2847 unsigned AD1IPEN : 1;
2848 unsigned : 1;
2849 unsigned : 1;
2850 unsigned : 1;
2851 unsigned : 1;
2852 unsigned AD1IPPOL : 1;
2853 unsigned AD1EPPOL : 1;
2856 struct
2858 unsigned ADDSEN : 1;
2859 unsigned ADIPEN : 1;
2860 unsigned : 1;
2861 unsigned : 1;
2862 unsigned : 1;
2863 unsigned : 1;
2864 unsigned ADIPPOL : 1;
2865 unsigned ADEPPOL : 1;
2867 } __AAD1CON3bits_t;
2869 extern __at(0x0714) volatile __AAD1CON3bits_t AAD1CON3bits;
2871 #define _AD1DSEN 0x01
2872 #define _ADDSEN 0x01
2873 #define _AD1IPEN 0x02
2874 #define _ADIPEN 0x02
2875 #define _AD1IPPOL 0x40
2876 #define _ADIPPOL 0x40
2877 #define _AD1EPPOL 0x80
2878 #define _ADEPPOL 0x80
2880 //==============================================================================
2883 //==============================================================================
2884 // AADCON3 Bits
2886 extern __at(0x0714) __sfr AADCON3;
2888 typedef union
2890 struct
2892 unsigned AD1DSEN : 1;
2893 unsigned AD1IPEN : 1;
2894 unsigned : 1;
2895 unsigned : 1;
2896 unsigned : 1;
2897 unsigned : 1;
2898 unsigned AD1IPPOL : 1;
2899 unsigned AD1EPPOL : 1;
2902 struct
2904 unsigned ADDSEN : 1;
2905 unsigned ADIPEN : 1;
2906 unsigned : 1;
2907 unsigned : 1;
2908 unsigned : 1;
2909 unsigned : 1;
2910 unsigned ADIPPOL : 1;
2911 unsigned ADEPPOL : 1;
2913 } __AADCON3bits_t;
2915 extern __at(0x0714) volatile __AADCON3bits_t AADCON3bits;
2917 #define _AADCON3_AD1DSEN 0x01
2918 #define _AADCON3_ADDSEN 0x01
2919 #define _AADCON3_AD1IPEN 0x02
2920 #define _AADCON3_ADIPEN 0x02
2921 #define _AADCON3_AD1IPPOL 0x40
2922 #define _AADCON3_ADIPPOL 0x40
2923 #define _AADCON3_AD1EPPOL 0x80
2924 #define _AADCON3_ADEPPOL 0x80
2926 //==============================================================================
2929 //==============================================================================
2930 // AD1CON3 Bits
2932 extern __at(0x0714) __sfr AD1CON3;
2934 typedef union
2936 struct
2938 unsigned AD1DSEN : 1;
2939 unsigned AD1IPEN : 1;
2940 unsigned : 1;
2941 unsigned : 1;
2942 unsigned : 1;
2943 unsigned : 1;
2944 unsigned AD1IPPOL : 1;
2945 unsigned AD1EPPOL : 1;
2948 struct
2950 unsigned ADDSEN : 1;
2951 unsigned ADIPEN : 1;
2952 unsigned : 1;
2953 unsigned : 1;
2954 unsigned : 1;
2955 unsigned : 1;
2956 unsigned ADIPPOL : 1;
2957 unsigned ADEPPOL : 1;
2959 } __AD1CON3bits_t;
2961 extern __at(0x0714) volatile __AD1CON3bits_t AD1CON3bits;
2963 #define _AD1CON3_AD1DSEN 0x01
2964 #define _AD1CON3_ADDSEN 0x01
2965 #define _AD1CON3_AD1IPEN 0x02
2966 #define _AD1CON3_ADIPEN 0x02
2967 #define _AD1CON3_AD1IPPOL 0x40
2968 #define _AD1CON3_ADIPPOL 0x40
2969 #define _AD1CON3_AD1EPPOL 0x80
2970 #define _AD1CON3_ADEPPOL 0x80
2972 //==============================================================================
2975 //==============================================================================
2976 // AADSTAT Bits
2978 extern __at(0x0715) __sfr AADSTAT;
2980 typedef union
2982 struct
2984 unsigned AD1STG0 : 1;
2985 unsigned AD1STG1 : 1;
2986 unsigned AD1CONV : 1;
2987 unsigned : 1;
2988 unsigned AD2STG0 : 1;
2989 unsigned AD2STG1 : 1;
2990 unsigned AD2CONV : 1;
2991 unsigned : 1;
2994 struct
2996 unsigned : 1;
2997 unsigned : 1;
2998 unsigned ADCONV : 1;
2999 unsigned : 1;
3000 unsigned : 1;
3001 unsigned : 1;
3002 unsigned : 1;
3003 unsigned : 1;
3006 struct
3008 unsigned AD1STG : 2;
3009 unsigned : 6;
3012 struct
3014 unsigned : 4;
3015 unsigned AD2STG : 2;
3016 unsigned : 2;
3018 } __AADSTATbits_t;
3020 extern __at(0x0715) volatile __AADSTATbits_t AADSTATbits;
3022 #define _AD1STG0 0x01
3023 #define _AD1STG1 0x02
3024 #define _AD1CONV 0x04
3025 #define _ADCONV 0x04
3026 #define _AD2STG0 0x10
3027 #define _AD2STG1 0x20
3028 #define _AD2CONV 0x40
3030 //==============================================================================
3033 //==============================================================================
3034 // ADSTAT Bits
3036 extern __at(0x0715) __sfr ADSTAT;
3038 typedef union
3040 struct
3042 unsigned AD1STG0 : 1;
3043 unsigned AD1STG1 : 1;
3044 unsigned AD1CONV : 1;
3045 unsigned : 1;
3046 unsigned AD2STG0 : 1;
3047 unsigned AD2STG1 : 1;
3048 unsigned AD2CONV : 1;
3049 unsigned : 1;
3052 struct
3054 unsigned : 1;
3055 unsigned : 1;
3056 unsigned ADCONV : 1;
3057 unsigned : 1;
3058 unsigned : 1;
3059 unsigned : 1;
3060 unsigned : 1;
3061 unsigned : 1;
3064 struct
3066 unsigned AD1STG : 2;
3067 unsigned : 6;
3070 struct
3072 unsigned : 4;
3073 unsigned AD2STG : 2;
3074 unsigned : 2;
3076 } __ADSTATbits_t;
3078 extern __at(0x0715) volatile __ADSTATbits_t ADSTATbits;
3080 #define _ADSTAT_AD1STG0 0x01
3081 #define _ADSTAT_AD1STG1 0x02
3082 #define _ADSTAT_AD1CONV 0x04
3083 #define _ADSTAT_ADCONV 0x04
3084 #define _ADSTAT_AD2STG0 0x10
3085 #define _ADSTAT_AD2STG1 0x20
3086 #define _ADSTAT_AD2CONV 0x40
3088 //==============================================================================
3091 //==============================================================================
3092 // AAD1PRE Bits
3094 extern __at(0x0716) __sfr AAD1PRE;
3096 typedef union
3098 struct
3100 unsigned ADPRE0 : 1;
3101 unsigned ADPRE1 : 1;
3102 unsigned ADPRE2 : 1;
3103 unsigned ADPRE3 : 1;
3104 unsigned ADPRE4 : 1;
3105 unsigned ADPRE5 : 1;
3106 unsigned ADPRE6 : 1;
3107 unsigned : 1;
3110 struct
3112 unsigned ADPRE : 7;
3113 unsigned : 1;
3115 } __AAD1PREbits_t;
3117 extern __at(0x0716) volatile __AAD1PREbits_t AAD1PREbits;
3119 #define _ADPRE0 0x01
3120 #define _ADPRE1 0x02
3121 #define _ADPRE2 0x04
3122 #define _ADPRE3 0x08
3123 #define _ADPRE4 0x10
3124 #define _ADPRE5 0x20
3125 #define _ADPRE6 0x40
3127 //==============================================================================
3130 //==============================================================================
3131 // AADPRE Bits
3133 extern __at(0x0716) __sfr AADPRE;
3135 typedef union
3137 struct
3139 unsigned ADPRE0 : 1;
3140 unsigned ADPRE1 : 1;
3141 unsigned ADPRE2 : 1;
3142 unsigned ADPRE3 : 1;
3143 unsigned ADPRE4 : 1;
3144 unsigned ADPRE5 : 1;
3145 unsigned ADPRE6 : 1;
3146 unsigned : 1;
3149 struct
3151 unsigned ADPRE : 7;
3152 unsigned : 1;
3154 } __AADPREbits_t;
3156 extern __at(0x0716) volatile __AADPREbits_t AADPREbits;
3158 #define _AADPRE_ADPRE0 0x01
3159 #define _AADPRE_ADPRE1 0x02
3160 #define _AADPRE_ADPRE2 0x04
3161 #define _AADPRE_ADPRE3 0x08
3162 #define _AADPRE_ADPRE4 0x10
3163 #define _AADPRE_ADPRE5 0x20
3164 #define _AADPRE_ADPRE6 0x40
3166 //==============================================================================
3169 //==============================================================================
3170 // AD1PRE Bits
3172 extern __at(0x0716) __sfr AD1PRE;
3174 typedef union
3176 struct
3178 unsigned ADPRE0 : 1;
3179 unsigned ADPRE1 : 1;
3180 unsigned ADPRE2 : 1;
3181 unsigned ADPRE3 : 1;
3182 unsigned ADPRE4 : 1;
3183 unsigned ADPRE5 : 1;
3184 unsigned ADPRE6 : 1;
3185 unsigned : 1;
3188 struct
3190 unsigned ADPRE : 7;
3191 unsigned : 1;
3193 } __AD1PREbits_t;
3195 extern __at(0x0716) volatile __AD1PREbits_t AD1PREbits;
3197 #define _AD1PRE_ADPRE0 0x01
3198 #define _AD1PRE_ADPRE1 0x02
3199 #define _AD1PRE_ADPRE2 0x04
3200 #define _AD1PRE_ADPRE3 0x08
3201 #define _AD1PRE_ADPRE4 0x10
3202 #define _AD1PRE_ADPRE5 0x20
3203 #define _AD1PRE_ADPRE6 0x40
3205 //==============================================================================
3208 //==============================================================================
3209 // AD1PRECON Bits
3211 extern __at(0x0716) __sfr AD1PRECON;
3213 typedef union
3215 struct
3217 unsigned ADPRE0 : 1;
3218 unsigned ADPRE1 : 1;
3219 unsigned ADPRE2 : 1;
3220 unsigned ADPRE3 : 1;
3221 unsigned ADPRE4 : 1;
3222 unsigned ADPRE5 : 1;
3223 unsigned ADPRE6 : 1;
3224 unsigned : 1;
3227 struct
3229 unsigned ADPRE : 7;
3230 unsigned : 1;
3232 } __AD1PRECONbits_t;
3234 extern __at(0x0716) volatile __AD1PRECONbits_t AD1PRECONbits;
3236 #define _AD1PRECON_ADPRE0 0x01
3237 #define _AD1PRECON_ADPRE1 0x02
3238 #define _AD1PRECON_ADPRE2 0x04
3239 #define _AD1PRECON_ADPRE3 0x08
3240 #define _AD1PRECON_ADPRE4 0x10
3241 #define _AD1PRECON_ADPRE5 0x20
3242 #define _AD1PRECON_ADPRE6 0x40
3244 //==============================================================================
3247 //==============================================================================
3248 // AAD1ACQ Bits
3250 extern __at(0x0717) __sfr AAD1ACQ;
3252 typedef union
3254 struct
3256 unsigned ADACQ0 : 1;
3257 unsigned ADACQ1 : 1;
3258 unsigned ADACQ2 : 1;
3259 unsigned ADACQ3 : 1;
3260 unsigned ADACQ4 : 1;
3261 unsigned ADACQ5 : 1;
3262 unsigned ADACQ6 : 1;
3263 unsigned : 1;
3266 struct
3268 unsigned ADACQ : 7;
3269 unsigned : 1;
3271 } __AAD1ACQbits_t;
3273 extern __at(0x0717) volatile __AAD1ACQbits_t AAD1ACQbits;
3275 #define _ADACQ0 0x01
3276 #define _ADACQ1 0x02
3277 #define _ADACQ2 0x04
3278 #define _ADACQ3 0x08
3279 #define _ADACQ4 0x10
3280 #define _ADACQ5 0x20
3281 #define _ADACQ6 0x40
3283 //==============================================================================
3286 //==============================================================================
3287 // AADACQ Bits
3289 extern __at(0x0717) __sfr AADACQ;
3291 typedef union
3293 struct
3295 unsigned ADACQ0 : 1;
3296 unsigned ADACQ1 : 1;
3297 unsigned ADACQ2 : 1;
3298 unsigned ADACQ3 : 1;
3299 unsigned ADACQ4 : 1;
3300 unsigned ADACQ5 : 1;
3301 unsigned ADACQ6 : 1;
3302 unsigned : 1;
3305 struct
3307 unsigned ADACQ : 7;
3308 unsigned : 1;
3310 } __AADACQbits_t;
3312 extern __at(0x0717) volatile __AADACQbits_t AADACQbits;
3314 #define _AADACQ_ADACQ0 0x01
3315 #define _AADACQ_ADACQ1 0x02
3316 #define _AADACQ_ADACQ2 0x04
3317 #define _AADACQ_ADACQ3 0x08
3318 #define _AADACQ_ADACQ4 0x10
3319 #define _AADACQ_ADACQ5 0x20
3320 #define _AADACQ_ADACQ6 0x40
3322 //==============================================================================
3325 //==============================================================================
3326 // AD1ACQ Bits
3328 extern __at(0x0717) __sfr AD1ACQ;
3330 typedef union
3332 struct
3334 unsigned ADACQ0 : 1;
3335 unsigned ADACQ1 : 1;
3336 unsigned ADACQ2 : 1;
3337 unsigned ADACQ3 : 1;
3338 unsigned ADACQ4 : 1;
3339 unsigned ADACQ5 : 1;
3340 unsigned ADACQ6 : 1;
3341 unsigned : 1;
3344 struct
3346 unsigned ADACQ : 7;
3347 unsigned : 1;
3349 } __AD1ACQbits_t;
3351 extern __at(0x0717) volatile __AD1ACQbits_t AD1ACQbits;
3353 #define _AD1ACQ_ADACQ0 0x01
3354 #define _AD1ACQ_ADACQ1 0x02
3355 #define _AD1ACQ_ADACQ2 0x04
3356 #define _AD1ACQ_ADACQ3 0x08
3357 #define _AD1ACQ_ADACQ4 0x10
3358 #define _AD1ACQ_ADACQ5 0x20
3359 #define _AD1ACQ_ADACQ6 0x40
3361 //==============================================================================
3364 //==============================================================================
3365 // AD1ACQCON Bits
3367 extern __at(0x0717) __sfr AD1ACQCON;
3369 typedef union
3371 struct
3373 unsigned ADACQ0 : 1;
3374 unsigned ADACQ1 : 1;
3375 unsigned ADACQ2 : 1;
3376 unsigned ADACQ3 : 1;
3377 unsigned ADACQ4 : 1;
3378 unsigned ADACQ5 : 1;
3379 unsigned ADACQ6 : 1;
3380 unsigned : 1;
3383 struct
3385 unsigned ADACQ : 7;
3386 unsigned : 1;
3388 } __AD1ACQCONbits_t;
3390 extern __at(0x0717) volatile __AD1ACQCONbits_t AD1ACQCONbits;
3392 #define _AD1ACQCON_ADACQ0 0x01
3393 #define _AD1ACQCON_ADACQ1 0x02
3394 #define _AD1ACQCON_ADACQ2 0x04
3395 #define _AD1ACQCON_ADACQ3 0x08
3396 #define _AD1ACQCON_ADACQ4 0x10
3397 #define _AD1ACQCON_ADACQ5 0x20
3398 #define _AD1ACQCON_ADACQ6 0x40
3400 //==============================================================================
3403 //==============================================================================
3404 // AAD1GRD Bits
3406 extern __at(0x0718) __sfr AAD1GRD;
3408 typedef union
3410 struct
3412 unsigned : 1;
3413 unsigned : 1;
3414 unsigned : 1;
3415 unsigned : 1;
3416 unsigned : 1;
3417 unsigned GRD1POL : 1;
3418 unsigned GRD1AOE : 1;
3419 unsigned GRD1BOE : 1;
3422 struct
3424 unsigned : 1;
3425 unsigned : 1;
3426 unsigned : 1;
3427 unsigned : 1;
3428 unsigned : 1;
3429 unsigned GRDPOL : 1;
3430 unsigned GRDAOE : 1;
3431 unsigned GRDBOE : 1;
3433 } __AAD1GRDbits_t;
3435 extern __at(0x0718) volatile __AAD1GRDbits_t AAD1GRDbits;
3437 #define _GRD1POL 0x20
3438 #define _GRDPOL 0x20
3439 #define _GRD1AOE 0x40
3440 #define _GRDAOE 0x40
3441 #define _GRD1BOE 0x80
3442 #define _GRDBOE 0x80
3444 //==============================================================================
3447 //==============================================================================
3448 // AADGRD Bits
3450 extern __at(0x0718) __sfr AADGRD;
3452 typedef union
3454 struct
3456 unsigned : 1;
3457 unsigned : 1;
3458 unsigned : 1;
3459 unsigned : 1;
3460 unsigned : 1;
3461 unsigned GRD1POL : 1;
3462 unsigned GRD1AOE : 1;
3463 unsigned GRD1BOE : 1;
3466 struct
3468 unsigned : 1;
3469 unsigned : 1;
3470 unsigned : 1;
3471 unsigned : 1;
3472 unsigned : 1;
3473 unsigned GRDPOL : 1;
3474 unsigned GRDAOE : 1;
3475 unsigned GRDBOE : 1;
3477 } __AADGRDbits_t;
3479 extern __at(0x0718) volatile __AADGRDbits_t AADGRDbits;
3481 #define _AADGRD_GRD1POL 0x20
3482 #define _AADGRD_GRDPOL 0x20
3483 #define _AADGRD_GRD1AOE 0x40
3484 #define _AADGRD_GRDAOE 0x40
3485 #define _AADGRD_GRD1BOE 0x80
3486 #define _AADGRD_GRDBOE 0x80
3488 //==============================================================================
3491 //==============================================================================
3492 // AD1GRD Bits
3494 extern __at(0x0718) __sfr AD1GRD;
3496 typedef union
3498 struct
3500 unsigned : 1;
3501 unsigned : 1;
3502 unsigned : 1;
3503 unsigned : 1;
3504 unsigned : 1;
3505 unsigned GRD1POL : 1;
3506 unsigned GRD1AOE : 1;
3507 unsigned GRD1BOE : 1;
3510 struct
3512 unsigned : 1;
3513 unsigned : 1;
3514 unsigned : 1;
3515 unsigned : 1;
3516 unsigned : 1;
3517 unsigned GRDPOL : 1;
3518 unsigned GRDAOE : 1;
3519 unsigned GRDBOE : 1;
3521 } __AD1GRDbits_t;
3523 extern __at(0x0718) volatile __AD1GRDbits_t AD1GRDbits;
3525 #define _AD1GRD_GRD1POL 0x20
3526 #define _AD1GRD_GRDPOL 0x20
3527 #define _AD1GRD_GRD1AOE 0x40
3528 #define _AD1GRD_GRDAOE 0x40
3529 #define _AD1GRD_GRD1BOE 0x80
3530 #define _AD1GRD_GRDBOE 0x80
3532 //==============================================================================
3535 //==============================================================================
3536 // AAD1CAP Bits
3538 extern __at(0x0719) __sfr AAD1CAP;
3540 typedef union
3542 struct
3544 unsigned ADDCAP0 : 1;
3545 unsigned ADDCAP1 : 1;
3546 unsigned ADDCAP2 : 1;
3547 unsigned ADDCAP3 : 1;
3548 unsigned : 1;
3549 unsigned : 1;
3550 unsigned : 1;
3551 unsigned : 1;
3554 struct
3556 unsigned ADDCAP : 4;
3557 unsigned : 4;
3559 } __AAD1CAPbits_t;
3561 extern __at(0x0719) volatile __AAD1CAPbits_t AAD1CAPbits;
3563 #define _ADDCAP0 0x01
3564 #define _ADDCAP1 0x02
3565 #define _ADDCAP2 0x04
3566 #define _ADDCAP3 0x08
3568 //==============================================================================
3571 //==============================================================================
3572 // AAD1CAPCON Bits
3574 extern __at(0x0719) __sfr AAD1CAPCON;
3576 typedef union
3578 struct
3580 unsigned ADDCAP0 : 1;
3581 unsigned ADDCAP1 : 1;
3582 unsigned ADDCAP2 : 1;
3583 unsigned ADDCAP3 : 1;
3584 unsigned : 1;
3585 unsigned : 1;
3586 unsigned : 1;
3587 unsigned : 1;
3590 struct
3592 unsigned ADDCAP : 4;
3593 unsigned : 4;
3595 } __AAD1CAPCONbits_t;
3597 extern __at(0x0719) volatile __AAD1CAPCONbits_t AAD1CAPCONbits;
3599 #define _AAD1CAPCON_ADDCAP0 0x01
3600 #define _AAD1CAPCON_ADDCAP1 0x02
3601 #define _AAD1CAPCON_ADDCAP2 0x04
3602 #define _AAD1CAPCON_ADDCAP3 0x08
3604 //==============================================================================
3607 //==============================================================================
3608 // AADCAP Bits
3610 extern __at(0x0719) __sfr AADCAP;
3612 typedef union
3614 struct
3616 unsigned ADDCAP0 : 1;
3617 unsigned ADDCAP1 : 1;
3618 unsigned ADDCAP2 : 1;
3619 unsigned ADDCAP3 : 1;
3620 unsigned : 1;
3621 unsigned : 1;
3622 unsigned : 1;
3623 unsigned : 1;
3626 struct
3628 unsigned ADDCAP : 4;
3629 unsigned : 4;
3631 } __AADCAPbits_t;
3633 extern __at(0x0719) volatile __AADCAPbits_t AADCAPbits;
3635 #define _AADCAP_ADDCAP0 0x01
3636 #define _AADCAP_ADDCAP1 0x02
3637 #define _AADCAP_ADDCAP2 0x04
3638 #define _AADCAP_ADDCAP3 0x08
3640 //==============================================================================
3643 //==============================================================================
3644 // AD1CAPCON Bits
3646 extern __at(0x0719) __sfr AD1CAPCON;
3648 typedef union
3650 struct
3652 unsigned ADDCAP0 : 1;
3653 unsigned ADDCAP1 : 1;
3654 unsigned ADDCAP2 : 1;
3655 unsigned ADDCAP3 : 1;
3656 unsigned : 1;
3657 unsigned : 1;
3658 unsigned : 1;
3659 unsigned : 1;
3662 struct
3664 unsigned ADDCAP : 4;
3665 unsigned : 4;
3667 } __AD1CAPCONbits_t;
3669 extern __at(0x0719) volatile __AD1CAPCONbits_t AD1CAPCONbits;
3671 #define _AD1CAPCON_ADDCAP0 0x01
3672 #define _AD1CAPCON_ADDCAP1 0x02
3673 #define _AD1CAPCON_ADDCAP2 0x04
3674 #define _AD1CAPCON_ADDCAP3 0x08
3676 //==============================================================================
3678 extern __at(0x071A) __sfr AAD1RES0;
3679 extern __at(0x071A) __sfr AAD1RES0L;
3680 extern __at(0x071A) __sfr AD1RES0;
3681 extern __at(0x071A) __sfr AD1RES0L;
3682 extern __at(0x071A) __sfr ADRES0;
3683 extern __at(0x071B) __sfr AAD1RES0H;
3684 extern __at(0x071B) __sfr AD1RES0H;
3685 extern __at(0x071C) __sfr AAD1RES1;
3686 extern __at(0x071C) __sfr AAD1RES1L;
3687 extern __at(0x071C) __sfr AD1RES1;
3688 extern __at(0x071C) __sfr AD1RES1L;
3689 extern __at(0x071C) __sfr ADRES1;
3690 extern __at(0x071D) __sfr AAD1RES1H;
3691 extern __at(0x071D) __sfr AD1RES1H;
3693 //==============================================================================
3694 // AAD1CH Bits
3696 extern __at(0x071E) __sfr AAD1CH;
3698 typedef struct
3700 unsigned CH10 : 1;
3701 unsigned CH11 : 1;
3702 unsigned CH12 : 1;
3703 unsigned CH13 : 1;
3704 unsigned CH14 : 1;
3705 unsigned CH15 : 1;
3706 unsigned CH16 : 1;
3707 unsigned : 1;
3708 } __AAD1CHbits_t;
3710 extern __at(0x071E) volatile __AAD1CHbits_t AAD1CHbits;
3712 #define _CH10 0x01
3713 #define _CH11 0x02
3714 #define _CH12 0x04
3715 #define _CH13 0x08
3716 #define _CH14 0x10
3717 #define _CH15 0x20
3718 #define _CH16 0x40
3720 //==============================================================================
3723 //==============================================================================
3724 // AD1CH Bits
3726 extern __at(0x071E) __sfr AD1CH;
3728 typedef struct
3730 unsigned CH10 : 1;
3731 unsigned CH11 : 1;
3732 unsigned CH12 : 1;
3733 unsigned CH13 : 1;
3734 unsigned CH14 : 1;
3735 unsigned CH15 : 1;
3736 unsigned CH16 : 1;
3737 unsigned : 1;
3738 } __AD1CHbits_t;
3740 extern __at(0x071E) volatile __AD1CHbits_t AD1CHbits;
3742 #define _AD1CH_CH10 0x01
3743 #define _AD1CH_CH11 0x02
3744 #define _AD1CH_CH12 0x04
3745 #define _AD1CH_CH13 0x08
3746 #define _AD1CH_CH14 0x10
3747 #define _AD1CH_CH15 0x20
3748 #define _AD1CH_CH16 0x40
3750 //==============================================================================
3753 //==============================================================================
3754 // AAD2CON0 Bits
3756 extern __at(0x0791) __sfr AAD2CON0;
3758 typedef union
3760 struct
3762 unsigned ADON : 1;
3763 unsigned GO : 1;
3764 unsigned CHS0 : 1;
3765 unsigned CHS1 : 1;
3766 unsigned CHS2 : 1;
3767 unsigned CHS3 : 1;
3768 unsigned CHS4 : 1;
3769 unsigned : 1;
3772 struct
3774 unsigned : 1;
3775 unsigned GO_NOT_DONE : 1;
3776 unsigned : 1;
3777 unsigned : 1;
3778 unsigned : 1;
3779 unsigned : 1;
3780 unsigned : 1;
3781 unsigned : 1;
3784 struct
3786 unsigned : 1;
3787 unsigned GO_NOT_DONE2 : 1;
3788 unsigned : 1;
3789 unsigned : 1;
3790 unsigned : 1;
3791 unsigned : 1;
3792 unsigned : 1;
3793 unsigned : 1;
3796 struct
3798 unsigned : 2;
3799 unsigned CHS : 5;
3800 unsigned : 1;
3802 } __AAD2CON0bits_t;
3804 extern __at(0x0791) volatile __AAD2CON0bits_t AAD2CON0bits;
3806 #define _AAD2CON0_ADON 0x01
3807 #define _AAD2CON0_GO 0x02
3808 #define _AAD2CON0_GO_NOT_DONE 0x02
3809 #define _AAD2CON0_GO_NOT_DONE2 0x02
3810 #define _AAD2CON0_CHS0 0x04
3811 #define _AAD2CON0_CHS1 0x08
3812 #define _AAD2CON0_CHS2 0x10
3813 #define _AAD2CON0_CHS3 0x20
3814 #define _AAD2CON0_CHS4 0x40
3816 //==============================================================================
3819 //==============================================================================
3820 // AD2CON0 Bits
3822 extern __at(0x0791) __sfr AD2CON0;
3824 typedef union
3826 struct
3828 unsigned ADON : 1;
3829 unsigned GO : 1;
3830 unsigned CHS0 : 1;
3831 unsigned CHS1 : 1;
3832 unsigned CHS2 : 1;
3833 unsigned CHS3 : 1;
3834 unsigned CHS4 : 1;
3835 unsigned : 1;
3838 struct
3840 unsigned : 1;
3841 unsigned GO_NOT_DONE : 1;
3842 unsigned : 1;
3843 unsigned : 1;
3844 unsigned : 1;
3845 unsigned : 1;
3846 unsigned : 1;
3847 unsigned : 1;
3850 struct
3852 unsigned : 1;
3853 unsigned GO_NOT_DONE2 : 1;
3854 unsigned : 1;
3855 unsigned : 1;
3856 unsigned : 1;
3857 unsigned : 1;
3858 unsigned : 1;
3859 unsigned : 1;
3862 struct
3864 unsigned : 2;
3865 unsigned CHS : 5;
3866 unsigned : 1;
3868 } __AD2CON0bits_t;
3870 extern __at(0x0791) volatile __AD2CON0bits_t AD2CON0bits;
3872 #define _AD2CON0_ADON 0x01
3873 #define _AD2CON0_GO 0x02
3874 #define _AD2CON0_GO_NOT_DONE 0x02
3875 #define _AD2CON0_GO_NOT_DONE2 0x02
3876 #define _AD2CON0_CHS0 0x04
3877 #define _AD2CON0_CHS1 0x08
3878 #define _AD2CON0_CHS2 0x10
3879 #define _AD2CON0_CHS3 0x20
3880 #define _AD2CON0_CHS4 0x40
3882 //==============================================================================
3885 //==============================================================================
3886 // AAD2CON2 Bits
3888 extern __at(0x0793) __sfr AAD2CON2;
3890 typedef union
3892 struct
3894 unsigned : 1;
3895 unsigned : 1;
3896 unsigned : 1;
3897 unsigned : 1;
3898 unsigned TRIGSEL0 : 1;
3899 unsigned TRIGSEL1 : 1;
3900 unsigned TRIGSEL2 : 1;
3901 unsigned : 1;
3904 struct
3906 unsigned : 4;
3907 unsigned TRIGSEL : 3;
3908 unsigned : 1;
3910 } __AAD2CON2bits_t;
3912 extern __at(0x0793) volatile __AAD2CON2bits_t AAD2CON2bits;
3914 #define _AAD2CON2_TRIGSEL0 0x10
3915 #define _AAD2CON2_TRIGSEL1 0x20
3916 #define _AAD2CON2_TRIGSEL2 0x40
3918 //==============================================================================
3921 //==============================================================================
3922 // AD2CON2 Bits
3924 extern __at(0x0793) __sfr AD2CON2;
3926 typedef union
3928 struct
3930 unsigned : 1;
3931 unsigned : 1;
3932 unsigned : 1;
3933 unsigned : 1;
3934 unsigned TRIGSEL0 : 1;
3935 unsigned TRIGSEL1 : 1;
3936 unsigned TRIGSEL2 : 1;
3937 unsigned : 1;
3940 struct
3942 unsigned : 4;
3943 unsigned TRIGSEL : 3;
3944 unsigned : 1;
3946 } __AD2CON2bits_t;
3948 extern __at(0x0793) volatile __AD2CON2bits_t AD2CON2bits;
3950 #define _AD2CON2_TRIGSEL0 0x10
3951 #define _AD2CON2_TRIGSEL1 0x20
3952 #define _AD2CON2_TRIGSEL2 0x40
3954 //==============================================================================
3957 //==============================================================================
3958 // AAD2CON3 Bits
3960 extern __at(0x0794) __sfr AAD2CON3;
3962 typedef union
3964 struct
3966 unsigned AD2DSEN : 1;
3967 unsigned AD2IPEN : 1;
3968 unsigned : 1;
3969 unsigned : 1;
3970 unsigned : 1;
3971 unsigned : 1;
3972 unsigned AD2IPPOL : 1;
3973 unsigned AD2EPPOL : 1;
3976 struct
3978 unsigned ADDSEN : 1;
3979 unsigned ADIPEN : 1;
3980 unsigned : 1;
3981 unsigned : 1;
3982 unsigned : 1;
3983 unsigned : 1;
3984 unsigned ADIPPOL : 1;
3985 unsigned ADEPPOL : 1;
3987 } __AAD2CON3bits_t;
3989 extern __at(0x0794) volatile __AAD2CON3bits_t AAD2CON3bits;
3991 #define _AAD2CON3_AD2DSEN 0x01
3992 #define _AAD2CON3_ADDSEN 0x01
3993 #define _AAD2CON3_AD2IPEN 0x02
3994 #define _AAD2CON3_ADIPEN 0x02
3995 #define _AAD2CON3_AD2IPPOL 0x40
3996 #define _AAD2CON3_ADIPPOL 0x40
3997 #define _AAD2CON3_AD2EPPOL 0x80
3998 #define _AAD2CON3_ADEPPOL 0x80
4000 //==============================================================================
4003 //==============================================================================
4004 // AD2CON3 Bits
4006 extern __at(0x0794) __sfr AD2CON3;
4008 typedef union
4010 struct
4012 unsigned AD2DSEN : 1;
4013 unsigned AD2IPEN : 1;
4014 unsigned : 1;
4015 unsigned : 1;
4016 unsigned : 1;
4017 unsigned : 1;
4018 unsigned AD2IPPOL : 1;
4019 unsigned AD2EPPOL : 1;
4022 struct
4024 unsigned ADDSEN : 1;
4025 unsigned ADIPEN : 1;
4026 unsigned : 1;
4027 unsigned : 1;
4028 unsigned : 1;
4029 unsigned : 1;
4030 unsigned ADIPPOL : 1;
4031 unsigned ADEPPOL : 1;
4033 } __AD2CON3bits_t;
4035 extern __at(0x0794) volatile __AD2CON3bits_t AD2CON3bits;
4037 #define _AD2CON3_AD2DSEN 0x01
4038 #define _AD2CON3_ADDSEN 0x01
4039 #define _AD2CON3_AD2IPEN 0x02
4040 #define _AD2CON3_ADIPEN 0x02
4041 #define _AD2CON3_AD2IPPOL 0x40
4042 #define _AD2CON3_ADIPPOL 0x40
4043 #define _AD2CON3_AD2EPPOL 0x80
4044 #define _AD2CON3_ADEPPOL 0x80
4046 //==============================================================================
4049 //==============================================================================
4050 // AAD2PRE Bits
4052 extern __at(0x0796) __sfr AAD2PRE;
4054 typedef union
4056 struct
4058 unsigned ADPRE0 : 1;
4059 unsigned ADPRE1 : 1;
4060 unsigned ADPRE2 : 1;
4061 unsigned ADPRE3 : 1;
4062 unsigned ADPRE4 : 1;
4063 unsigned ADPRE5 : 1;
4064 unsigned ADPRE6 : 1;
4065 unsigned : 1;
4068 struct
4070 unsigned ADPRE : 7;
4071 unsigned : 1;
4073 } __AAD2PREbits_t;
4075 extern __at(0x0796) volatile __AAD2PREbits_t AAD2PREbits;
4077 #define _AAD2PRE_ADPRE0 0x01
4078 #define _AAD2PRE_ADPRE1 0x02
4079 #define _AAD2PRE_ADPRE2 0x04
4080 #define _AAD2PRE_ADPRE3 0x08
4081 #define _AAD2PRE_ADPRE4 0x10
4082 #define _AAD2PRE_ADPRE5 0x20
4083 #define _AAD2PRE_ADPRE6 0x40
4085 //==============================================================================
4088 //==============================================================================
4089 // AD2PRE Bits
4091 extern __at(0x0796) __sfr AD2PRE;
4093 typedef union
4095 struct
4097 unsigned ADPRE0 : 1;
4098 unsigned ADPRE1 : 1;
4099 unsigned ADPRE2 : 1;
4100 unsigned ADPRE3 : 1;
4101 unsigned ADPRE4 : 1;
4102 unsigned ADPRE5 : 1;
4103 unsigned ADPRE6 : 1;
4104 unsigned : 1;
4107 struct
4109 unsigned ADPRE : 7;
4110 unsigned : 1;
4112 } __AD2PREbits_t;
4114 extern __at(0x0796) volatile __AD2PREbits_t AD2PREbits;
4116 #define _AD2PRE_ADPRE0 0x01
4117 #define _AD2PRE_ADPRE1 0x02
4118 #define _AD2PRE_ADPRE2 0x04
4119 #define _AD2PRE_ADPRE3 0x08
4120 #define _AD2PRE_ADPRE4 0x10
4121 #define _AD2PRE_ADPRE5 0x20
4122 #define _AD2PRE_ADPRE6 0x40
4124 //==============================================================================
4127 //==============================================================================
4128 // AD2PRECON Bits
4130 extern __at(0x0796) __sfr AD2PRECON;
4132 typedef union
4134 struct
4136 unsigned ADPRE0 : 1;
4137 unsigned ADPRE1 : 1;
4138 unsigned ADPRE2 : 1;
4139 unsigned ADPRE3 : 1;
4140 unsigned ADPRE4 : 1;
4141 unsigned ADPRE5 : 1;
4142 unsigned ADPRE6 : 1;
4143 unsigned : 1;
4146 struct
4148 unsigned ADPRE : 7;
4149 unsigned : 1;
4151 } __AD2PRECONbits_t;
4153 extern __at(0x0796) volatile __AD2PRECONbits_t AD2PRECONbits;
4155 #define _AD2PRECON_ADPRE0 0x01
4156 #define _AD2PRECON_ADPRE1 0x02
4157 #define _AD2PRECON_ADPRE2 0x04
4158 #define _AD2PRECON_ADPRE3 0x08
4159 #define _AD2PRECON_ADPRE4 0x10
4160 #define _AD2PRECON_ADPRE5 0x20
4161 #define _AD2PRECON_ADPRE6 0x40
4163 //==============================================================================
4166 //==============================================================================
4167 // AAD2ACQ Bits
4169 extern __at(0x0797) __sfr AAD2ACQ;
4171 typedef union
4173 struct
4175 unsigned ADACQ0 : 1;
4176 unsigned ADACQ1 : 1;
4177 unsigned ADACQ2 : 1;
4178 unsigned ADACQ3 : 1;
4179 unsigned ADACQ4 : 1;
4180 unsigned ADACQ5 : 1;
4181 unsigned ADACQ6 : 1;
4182 unsigned : 1;
4185 struct
4187 unsigned ADACQ : 7;
4188 unsigned : 1;
4190 } __AAD2ACQbits_t;
4192 extern __at(0x0797) volatile __AAD2ACQbits_t AAD2ACQbits;
4194 #define _AAD2ACQ_ADACQ0 0x01
4195 #define _AAD2ACQ_ADACQ1 0x02
4196 #define _AAD2ACQ_ADACQ2 0x04
4197 #define _AAD2ACQ_ADACQ3 0x08
4198 #define _AAD2ACQ_ADACQ4 0x10
4199 #define _AAD2ACQ_ADACQ5 0x20
4200 #define _AAD2ACQ_ADACQ6 0x40
4202 //==============================================================================
4205 //==============================================================================
4206 // AD2ACQ Bits
4208 extern __at(0x0797) __sfr AD2ACQ;
4210 typedef union
4212 struct
4214 unsigned ADACQ0 : 1;
4215 unsigned ADACQ1 : 1;
4216 unsigned ADACQ2 : 1;
4217 unsigned ADACQ3 : 1;
4218 unsigned ADACQ4 : 1;
4219 unsigned ADACQ5 : 1;
4220 unsigned ADACQ6 : 1;
4221 unsigned : 1;
4224 struct
4226 unsigned ADACQ : 7;
4227 unsigned : 1;
4229 } __AD2ACQbits_t;
4231 extern __at(0x0797) volatile __AD2ACQbits_t AD2ACQbits;
4233 #define _AD2ACQ_ADACQ0 0x01
4234 #define _AD2ACQ_ADACQ1 0x02
4235 #define _AD2ACQ_ADACQ2 0x04
4236 #define _AD2ACQ_ADACQ3 0x08
4237 #define _AD2ACQ_ADACQ4 0x10
4238 #define _AD2ACQ_ADACQ5 0x20
4239 #define _AD2ACQ_ADACQ6 0x40
4241 //==============================================================================
4244 //==============================================================================
4245 // AD2ACQCON Bits
4247 extern __at(0x0797) __sfr AD2ACQCON;
4249 typedef union
4251 struct
4253 unsigned ADACQ0 : 1;
4254 unsigned ADACQ1 : 1;
4255 unsigned ADACQ2 : 1;
4256 unsigned ADACQ3 : 1;
4257 unsigned ADACQ4 : 1;
4258 unsigned ADACQ5 : 1;
4259 unsigned ADACQ6 : 1;
4260 unsigned : 1;
4263 struct
4265 unsigned ADACQ : 7;
4266 unsigned : 1;
4268 } __AD2ACQCONbits_t;
4270 extern __at(0x0797) volatile __AD2ACQCONbits_t AD2ACQCONbits;
4272 #define _AD2ACQCON_ADACQ0 0x01
4273 #define _AD2ACQCON_ADACQ1 0x02
4274 #define _AD2ACQCON_ADACQ2 0x04
4275 #define _AD2ACQCON_ADACQ3 0x08
4276 #define _AD2ACQCON_ADACQ4 0x10
4277 #define _AD2ACQCON_ADACQ5 0x20
4278 #define _AD2ACQCON_ADACQ6 0x40
4280 //==============================================================================
4283 //==============================================================================
4284 // AAD2GRD Bits
4286 extern __at(0x0798) __sfr AAD2GRD;
4288 typedef union
4290 struct
4292 unsigned : 1;
4293 unsigned : 1;
4294 unsigned : 1;
4295 unsigned : 1;
4296 unsigned : 1;
4297 unsigned GRD2POL : 1;
4298 unsigned GRD2AOE : 1;
4299 unsigned GRD2BOE : 1;
4302 struct
4304 unsigned : 1;
4305 unsigned : 1;
4306 unsigned : 1;
4307 unsigned : 1;
4308 unsigned : 1;
4309 unsigned GRDPOL : 1;
4310 unsigned GRDAOE : 1;
4311 unsigned GRDBOE : 1;
4313 } __AAD2GRDbits_t;
4315 extern __at(0x0798) volatile __AAD2GRDbits_t AAD2GRDbits;
4317 #define _AAD2GRD_GRD2POL 0x20
4318 #define _AAD2GRD_GRDPOL 0x20
4319 #define _AAD2GRD_GRD2AOE 0x40
4320 #define _AAD2GRD_GRDAOE 0x40
4321 #define _AAD2GRD_GRD2BOE 0x80
4322 #define _AAD2GRD_GRDBOE 0x80
4324 //==============================================================================
4327 //==============================================================================
4328 // AD2GRD Bits
4330 extern __at(0x0798) __sfr AD2GRD;
4332 typedef union
4334 struct
4336 unsigned : 1;
4337 unsigned : 1;
4338 unsigned : 1;
4339 unsigned : 1;
4340 unsigned : 1;
4341 unsigned GRD2POL : 1;
4342 unsigned GRD2AOE : 1;
4343 unsigned GRD2BOE : 1;
4346 struct
4348 unsigned : 1;
4349 unsigned : 1;
4350 unsigned : 1;
4351 unsigned : 1;
4352 unsigned : 1;
4353 unsigned GRDPOL : 1;
4354 unsigned GRDAOE : 1;
4355 unsigned GRDBOE : 1;
4357 } __AD2GRDbits_t;
4359 extern __at(0x0798) volatile __AD2GRDbits_t AD2GRDbits;
4361 #define _AD2GRD_GRD2POL 0x20
4362 #define _AD2GRD_GRDPOL 0x20
4363 #define _AD2GRD_GRD2AOE 0x40
4364 #define _AD2GRD_GRDAOE 0x40
4365 #define _AD2GRD_GRD2BOE 0x80
4366 #define _AD2GRD_GRDBOE 0x80
4368 //==============================================================================
4371 //==============================================================================
4372 // AAD2CAP Bits
4374 extern __at(0x0799) __sfr AAD2CAP;
4376 typedef union
4378 struct
4380 unsigned ADDCAP0 : 1;
4381 unsigned ADDCAP1 : 1;
4382 unsigned ADDCAP2 : 1;
4383 unsigned ADDCAP3 : 1;
4384 unsigned : 1;
4385 unsigned : 1;
4386 unsigned : 1;
4387 unsigned : 1;
4390 struct
4392 unsigned ADDCAP : 4;
4393 unsigned : 4;
4395 } __AAD2CAPbits_t;
4397 extern __at(0x0799) volatile __AAD2CAPbits_t AAD2CAPbits;
4399 #define _AAD2CAP_ADDCAP0 0x01
4400 #define _AAD2CAP_ADDCAP1 0x02
4401 #define _AAD2CAP_ADDCAP2 0x04
4402 #define _AAD2CAP_ADDCAP3 0x08
4404 //==============================================================================
4407 //==============================================================================
4408 // AAD2CAPCON Bits
4410 extern __at(0x0799) __sfr AAD2CAPCON;
4412 typedef union
4414 struct
4416 unsigned ADDCAP0 : 1;
4417 unsigned ADDCAP1 : 1;
4418 unsigned ADDCAP2 : 1;
4419 unsigned ADDCAP3 : 1;
4420 unsigned : 1;
4421 unsigned : 1;
4422 unsigned : 1;
4423 unsigned : 1;
4426 struct
4428 unsigned ADDCAP : 4;
4429 unsigned : 4;
4431 } __AAD2CAPCONbits_t;
4433 extern __at(0x0799) volatile __AAD2CAPCONbits_t AAD2CAPCONbits;
4435 #define _AAD2CAPCON_ADDCAP0 0x01
4436 #define _AAD2CAPCON_ADDCAP1 0x02
4437 #define _AAD2CAPCON_ADDCAP2 0x04
4438 #define _AAD2CAPCON_ADDCAP3 0x08
4440 //==============================================================================
4443 //==============================================================================
4444 // AD2CAPCON Bits
4446 extern __at(0x0799) __sfr AD2CAPCON;
4448 typedef union
4450 struct
4452 unsigned ADDCAP0 : 1;
4453 unsigned ADDCAP1 : 1;
4454 unsigned ADDCAP2 : 1;
4455 unsigned ADDCAP3 : 1;
4456 unsigned : 1;
4457 unsigned : 1;
4458 unsigned : 1;
4459 unsigned : 1;
4462 struct
4464 unsigned ADDCAP : 4;
4465 unsigned : 4;
4467 } __AD2CAPCONbits_t;
4469 extern __at(0x0799) volatile __AD2CAPCONbits_t AD2CAPCONbits;
4471 #define _AD2CAPCON_ADDCAP0 0x01
4472 #define _AD2CAPCON_ADDCAP1 0x02
4473 #define _AD2CAPCON_ADDCAP2 0x04
4474 #define _AD2CAPCON_ADDCAP3 0x08
4476 //==============================================================================
4478 extern __at(0x079A) __sfr AAD2RES0;
4479 extern __at(0x079A) __sfr AAD2RES0L;
4480 extern __at(0x079A) __sfr AD2RES0;
4481 extern __at(0x079B) __sfr AAD2RES0H;
4482 extern __at(0x079C) __sfr AAD2RES1;
4483 extern __at(0x079C) __sfr AAD2RES1L;
4484 extern __at(0x079C) __sfr AD2RES1;
4485 extern __at(0x079D) __sfr AAD2RES1H;
4487 //==============================================================================
4488 // AAD2CH Bits
4490 extern __at(0x079E) __sfr AAD2CH;
4492 typedef struct
4494 unsigned CH20 : 1;
4495 unsigned CH21 : 1;
4496 unsigned CH22 : 1;
4497 unsigned CH23 : 1;
4498 unsigned CH24 : 1;
4499 unsigned CH25 : 1;
4500 unsigned CH26 : 1;
4501 unsigned : 1;
4502 } __AAD2CHbits_t;
4504 extern __at(0x079E) volatile __AAD2CHbits_t AAD2CHbits;
4506 #define _CH20 0x01
4507 #define _CH21 0x02
4508 #define _CH22 0x04
4509 #define _CH23 0x08
4510 #define _CH24 0x10
4511 #define _CH25 0x20
4512 #define _CH26 0x40
4514 //==============================================================================
4517 //==============================================================================
4518 // AD2CH Bits
4520 extern __at(0x079E) __sfr AD2CH;
4522 typedef struct
4524 unsigned CH20 : 1;
4525 unsigned CH21 : 1;
4526 unsigned CH22 : 1;
4527 unsigned CH23 : 1;
4528 unsigned CH24 : 1;
4529 unsigned CH25 : 1;
4530 unsigned CH26 : 1;
4531 unsigned : 1;
4532 } __AD2CHbits_t;
4534 extern __at(0x079E) volatile __AD2CHbits_t AD2CHbits;
4536 #define _AD2CH_CH20 0x01
4537 #define _AD2CH_CH21 0x02
4538 #define _AD2CH_CH22 0x04
4539 #define _AD2CH_CH23 0x08
4540 #define _AD2CH_CH24 0x10
4541 #define _AD2CH_CH25 0x20
4542 #define _AD2CH_CH26 0x40
4544 //==============================================================================
4547 //==============================================================================
4548 // ICDIO Bits
4550 extern __at(0x0F8C) __sfr ICDIO;
4552 typedef struct
4554 unsigned : 1;
4555 unsigned : 1;
4556 unsigned TRIS_ICDCLK : 1;
4557 unsigned TRIS_ICDDAT : 1;
4558 unsigned LAT_ICDCLK : 1;
4559 unsigned LAT_ICDDAT : 1;
4560 unsigned PORT_ICDCLK : 1;
4561 unsigned PORT_ICDDAT : 1;
4562 } __ICDIObits_t;
4564 extern __at(0x0F8C) volatile __ICDIObits_t ICDIObits;
4566 #define _TRIS_ICDCLK 0x04
4567 #define _TRIS_ICDDAT 0x08
4568 #define _LAT_ICDCLK 0x10
4569 #define _LAT_ICDDAT 0x20
4570 #define _PORT_ICDCLK 0x40
4571 #define _PORT_ICDDAT 0x80
4573 //==============================================================================
4576 //==============================================================================
4577 // ICDCON0 Bits
4579 extern __at(0x0F8D) __sfr ICDCON0;
4581 typedef struct
4583 unsigned RSTVEC : 1;
4584 unsigned : 1;
4585 unsigned : 1;
4586 unsigned DBGINEX : 1;
4587 unsigned : 1;
4588 unsigned SSTEP : 1;
4589 unsigned FREEZ : 1;
4590 unsigned INBUG : 1;
4591 } __ICDCON0bits_t;
4593 extern __at(0x0F8D) volatile __ICDCON0bits_t ICDCON0bits;
4595 #define _RSTVEC 0x01
4596 #define _DBGINEX 0x08
4597 #define _SSTEP 0x20
4598 #define _FREEZ 0x40
4599 #define _INBUG 0x80
4601 //==============================================================================
4604 //==============================================================================
4605 // ICDSTAT Bits
4607 extern __at(0x0F91) __sfr ICDSTAT;
4609 typedef struct
4611 unsigned : 1;
4612 unsigned USRHLTF : 1;
4613 unsigned : 1;
4614 unsigned : 1;
4615 unsigned : 1;
4616 unsigned : 1;
4617 unsigned TRP0HLTF : 1;
4618 unsigned TRP1HLTF : 1;
4619 } __ICDSTATbits_t;
4621 extern __at(0x0F91) volatile __ICDSTATbits_t ICDSTATbits;
4623 #define _USRHLTF 0x02
4624 #define _TRP0HLTF 0x40
4625 #define _TRP1HLTF 0x80
4627 //==============================================================================
4630 //==============================================================================
4631 // ICDINSTL Bits
4633 extern __at(0x0F96) __sfr ICDINSTL;
4635 typedef struct
4637 unsigned DBGIN0 : 1;
4638 unsigned DBGIN1 : 1;
4639 unsigned DBGIN2 : 1;
4640 unsigned DBGIN3 : 1;
4641 unsigned DBGIN4 : 1;
4642 unsigned DBGIN5 : 1;
4643 unsigned DBGIN6 : 1;
4644 unsigned DBGIN7 : 1;
4645 } __ICDINSTLbits_t;
4647 extern __at(0x0F96) volatile __ICDINSTLbits_t ICDINSTLbits;
4649 #define _DBGIN0 0x01
4650 #define _DBGIN1 0x02
4651 #define _DBGIN2 0x04
4652 #define _DBGIN3 0x08
4653 #define _DBGIN4 0x10
4654 #define _DBGIN5 0x20
4655 #define _DBGIN6 0x40
4656 #define _DBGIN7 0x80
4658 //==============================================================================
4661 //==============================================================================
4662 // ICDINSTH Bits
4664 extern __at(0x0F97) __sfr ICDINSTH;
4666 typedef struct
4668 unsigned DBGIN8 : 1;
4669 unsigned DBGIN9 : 1;
4670 unsigned DBGIN10 : 1;
4671 unsigned DBGIN11 : 1;
4672 unsigned DBGIN12 : 1;
4673 unsigned DBGIN13 : 1;
4674 unsigned : 1;
4675 unsigned : 1;
4676 } __ICDINSTHbits_t;
4678 extern __at(0x0F97) volatile __ICDINSTHbits_t ICDINSTHbits;
4680 #define _DBGIN8 0x01
4681 #define _DBGIN9 0x02
4682 #define _DBGIN10 0x04
4683 #define _DBGIN11 0x08
4684 #define _DBGIN12 0x10
4685 #define _DBGIN13 0x20
4687 //==============================================================================
4690 //==============================================================================
4691 // ICDBK0CON Bits
4693 extern __at(0x0F9C) __sfr ICDBK0CON;
4695 typedef struct
4697 unsigned BKHLT : 1;
4698 unsigned : 1;
4699 unsigned : 1;
4700 unsigned : 1;
4701 unsigned : 1;
4702 unsigned : 1;
4703 unsigned : 1;
4704 unsigned BKEN : 1;
4705 } __ICDBK0CONbits_t;
4707 extern __at(0x0F9C) volatile __ICDBK0CONbits_t ICDBK0CONbits;
4709 #define _BKHLT 0x01
4710 #define _BKEN 0x80
4712 //==============================================================================
4715 //==============================================================================
4716 // ICDBK0L Bits
4718 extern __at(0x0F9D) __sfr ICDBK0L;
4720 typedef struct
4722 unsigned BKA0 : 1;
4723 unsigned BKA1 : 1;
4724 unsigned BKA2 : 1;
4725 unsigned BKA3 : 1;
4726 unsigned BKA4 : 1;
4727 unsigned BKA5 : 1;
4728 unsigned BKA6 : 1;
4729 unsigned BKA7 : 1;
4730 } __ICDBK0Lbits_t;
4732 extern __at(0x0F9D) volatile __ICDBK0Lbits_t ICDBK0Lbits;
4734 #define _BKA0 0x01
4735 #define _BKA1 0x02
4736 #define _BKA2 0x04
4737 #define _BKA3 0x08
4738 #define _BKA4 0x10
4739 #define _BKA5 0x20
4740 #define _BKA6 0x40
4741 #define _BKA7 0x80
4743 //==============================================================================
4746 //==============================================================================
4747 // ICDBK0H Bits
4749 extern __at(0x0F9E) __sfr ICDBK0H;
4751 typedef struct
4753 unsigned BKA8 : 1;
4754 unsigned BKA9 : 1;
4755 unsigned BKA10 : 1;
4756 unsigned BKA11 : 1;
4757 unsigned BKA12 : 1;
4758 unsigned BKA13 : 1;
4759 unsigned BKA14 : 1;
4760 unsigned : 1;
4761 } __ICDBK0Hbits_t;
4763 extern __at(0x0F9E) volatile __ICDBK0Hbits_t ICDBK0Hbits;
4765 #define _BKA8 0x01
4766 #define _BKA9 0x02
4767 #define _BKA10 0x04
4768 #define _BKA11 0x08
4769 #define _BKA12 0x10
4770 #define _BKA13 0x20
4771 #define _BKA14 0x40
4773 //==============================================================================
4775 extern __at(0x0FE3) __sfr BSRICDSHAD;
4777 //==============================================================================
4778 // STATUS_SHAD Bits
4780 extern __at(0x0FE4) __sfr STATUS_SHAD;
4782 typedef struct
4784 unsigned C_SHAD : 1;
4785 unsigned DC_SHAD : 1;
4786 unsigned Z_SHAD : 1;
4787 unsigned : 1;
4788 unsigned : 1;
4789 unsigned : 1;
4790 unsigned : 1;
4791 unsigned : 1;
4792 } __STATUS_SHADbits_t;
4794 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
4796 #define _C_SHAD 0x01
4797 #define _DC_SHAD 0x02
4798 #define _Z_SHAD 0x04
4800 //==============================================================================
4802 extern __at(0x0FE5) __sfr WREG_SHAD;
4803 extern __at(0x0FE6) __sfr BSR_SHAD;
4804 extern __at(0x0FE7) __sfr PCLATH_SHAD;
4805 extern __at(0x0FE8) __sfr FSR0L_SHAD;
4806 extern __at(0x0FE9) __sfr FSR0H_SHAD;
4807 extern __at(0x0FEA) __sfr FSR1L_SHAD;
4808 extern __at(0x0FEB) __sfr FSR1H_SHAD;
4809 extern __at(0x0FED) __sfr STKPTR;
4810 extern __at(0x0FEE) __sfr TOSL;
4811 extern __at(0x0FEF) __sfr TOSH;
4813 //==============================================================================
4815 // Configuration Bits
4817 //==============================================================================
4819 #define _CONFIG1 0x8007
4820 #define _CONFIG2 0x8008
4822 //----------------------------- CONFIG1 Options -------------------------------
4824 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
4825 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pins.
4826 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pins.
4827 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pins.
4828 #define _WDTE_OFF 0x3FE7 // WDT disabled. SWDTEN bit is ignored.
4829 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
4830 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep. SWDTEN bit is ignored.
4831 #define _WDTE_ON 0x3FFF // WDT enabled. SWDTEN bit is ignored.
4832 #define _PWRTE_ON 0x3FDF // PWRT enabled.
4833 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
4834 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
4835 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
4836 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
4837 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
4838 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled. SBOREN bit is ignored.
4839 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
4840 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep. SBOREN bit is ignored.
4841 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
4842 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
4843 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
4845 //----------------------------- CONFIG2 Options -------------------------------
4847 #define _WRT_ALL 0x3FFC // 000h to FFFh write protected, no addresses may be modified by PMCON control.
4848 #define _WRT_HALF 0x3FFD // 000h to 7FFh write protected, 800h to FFFh may be modified by PMCON control.
4849 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to FFFh may be modified by PMCON control.
4850 #define _WRT_OFF 0x3FFF // Write protection off.
4851 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
4852 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
4853 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), 2.7V trip point selected.
4854 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), 1.9V trip point selected.
4855 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
4856 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
4857 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
4858 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
4859 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
4860 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
4862 //==============================================================================
4864 #define _DEVID1 0x8006
4866 #define _IDLOC0 0x8000
4867 #define _IDLOC1 0x8001
4868 #define _IDLOC2 0x8002
4869 #define _IDLOC3 0x8003
4871 //==============================================================================
4873 #ifndef NO_BIT_DEFINES
4875 #define ADACQ0 AAD1ACQbits.ADACQ0 // bit 0
4876 #define ADACQ1 AAD1ACQbits.ADACQ1 // bit 1
4877 #define ADACQ2 AAD1ACQbits.ADACQ2 // bit 2
4878 #define ADACQ3 AAD1ACQbits.ADACQ3 // bit 3
4879 #define ADACQ4 AAD1ACQbits.ADACQ4 // bit 4
4880 #define ADACQ5 AAD1ACQbits.ADACQ5 // bit 5
4881 #define ADACQ6 AAD1ACQbits.ADACQ6 // bit 6
4883 #define ADDCAP0 AAD1CAPbits.ADDCAP0 // bit 0
4884 #define ADDCAP1 AAD1CAPbits.ADDCAP1 // bit 1
4885 #define ADDCAP2 AAD1CAPbits.ADDCAP2 // bit 2
4886 #define ADDCAP3 AAD1CAPbits.ADDCAP3 // bit 3
4888 #define CH10 AAD1CHbits.CH10 // bit 0
4889 #define CH11 AAD1CHbits.CH11 // bit 1
4890 #define CH12 AAD1CHbits.CH12 // bit 2
4891 #define CH13 AAD1CHbits.CH13 // bit 3
4892 #define CH14 AAD1CHbits.CH14 // bit 4
4893 #define CH15 AAD1CHbits.CH15 // bit 5
4894 #define CH16 AAD1CHbits.CH16 // bit 6
4896 #define ADON AAD1CON0bits.ADON // bit 0
4897 #define GO AAD1CON0bits.GO // bit 1, shadows bit in AAD1CON0bits
4898 #define GO_NOT_DONE AAD1CON0bits.GO_NOT_DONE // bit 1, shadows bit in AAD1CON0bits
4899 #define GO_NOT_DONE1 AAD1CON0bits.GO_NOT_DONE1 // bit 1, shadows bit in AAD1CON0bits
4900 #define CHS0 AAD1CON0bits.CHS0 // bit 2
4901 #define CHS1 AAD1CON0bits.CHS1 // bit 3
4902 #define CHS2 AAD1CON0bits.CHS2 // bit 4
4903 #define CHS3 AAD1CON0bits.CHS3 // bit 5
4904 #define CHS4 AAD1CON0bits.CHS4 // bit 6
4906 #define TRIGSEL0 AAD1CON2bits.TRIGSEL0 // bit 4
4907 #define TRIGSEL1 AAD1CON2bits.TRIGSEL1 // bit 5
4908 #define TRIGSEL2 AAD1CON2bits.TRIGSEL2 // bit 6
4910 #define AD1DSEN AAD1CON3bits.AD1DSEN // bit 0, shadows bit in AAD1CON3bits
4911 #define ADDSEN AAD1CON3bits.ADDSEN // bit 0, shadows bit in AAD1CON3bits
4912 #define AD1IPEN AAD1CON3bits.AD1IPEN // bit 1, shadows bit in AAD1CON3bits
4913 #define ADIPEN AAD1CON3bits.ADIPEN // bit 1, shadows bit in AAD1CON3bits
4914 #define AD1IPPOL AAD1CON3bits.AD1IPPOL // bit 6, shadows bit in AAD1CON3bits
4915 #define ADIPPOL AAD1CON3bits.ADIPPOL // bit 6, shadows bit in AAD1CON3bits
4916 #define AD1EPPOL AAD1CON3bits.AD1EPPOL // bit 7, shadows bit in AAD1CON3bits
4917 #define ADEPPOL AAD1CON3bits.ADEPPOL // bit 7, shadows bit in AAD1CON3bits
4919 #define GRD1POL AAD1GRDbits.GRD1POL // bit 5, shadows bit in AAD1GRDbits
4920 #define GRDPOL AAD1GRDbits.GRDPOL // bit 5, shadows bit in AAD1GRDbits
4921 #define GRD1AOE AAD1GRDbits.GRD1AOE // bit 6, shadows bit in AAD1GRDbits
4922 #define GRDAOE AAD1GRDbits.GRDAOE // bit 6, shadows bit in AAD1GRDbits
4923 #define GRD1BOE AAD1GRDbits.GRD1BOE // bit 7, shadows bit in AAD1GRDbits
4924 #define GRDBOE AAD1GRDbits.GRDBOE // bit 7, shadows bit in AAD1GRDbits
4926 #define ADPRE0 AAD1PREbits.ADPRE0 // bit 0
4927 #define ADPRE1 AAD1PREbits.ADPRE1 // bit 1
4928 #define ADPRE2 AAD1PREbits.ADPRE2 // bit 2
4929 #define ADPRE3 AAD1PREbits.ADPRE3 // bit 3
4930 #define ADPRE4 AAD1PREbits.ADPRE4 // bit 4
4931 #define ADPRE5 AAD1PREbits.ADPRE5 // bit 5
4932 #define ADPRE6 AAD1PREbits.ADPRE6 // bit 6
4934 #define CH20 AAD2CHbits.CH20 // bit 0
4935 #define CH21 AAD2CHbits.CH21 // bit 1
4936 #define CH22 AAD2CHbits.CH22 // bit 2
4937 #define CH23 AAD2CHbits.CH23 // bit 3
4938 #define CH24 AAD2CHbits.CH24 // bit 4
4939 #define CH25 AAD2CHbits.CH25 // bit 5
4940 #define CH26 AAD2CHbits.CH26 // bit 6
4942 #define ADPREF0 AADCON1bits.ADPREF0 // bit 0
4943 #define ADPREF1 AADCON1bits.ADPREF1 // bit 1
4944 #define GO_NOT_DONE_ALL AADCON1bits.GO_NOT_DONE_ALL // bit 2, shadows bit in AADCON1bits
4945 #define GO_ALL AADCON1bits.GO_ALL // bit 2, shadows bit in AADCON1bits
4946 #define ADCS0 AADCON1bits.ADCS0 // bit 4
4947 #define ADCS1 AADCON1bits.ADCS1 // bit 5
4948 #define ADCS2 AADCON1bits.ADCS2 // bit 6
4949 #define ADFM AADCON1bits.ADFM // bit 7
4951 #define AD1STG0 AADSTATbits.AD1STG0 // bit 0
4952 #define AD1STG1 AADSTATbits.AD1STG1 // bit 1
4953 #define AD1CONV AADSTATbits.AD1CONV // bit 2, shadows bit in AADSTATbits
4954 #define ADCONV AADSTATbits.ADCONV // bit 2, shadows bit in AADSTATbits
4955 #define AD2STG0 AADSTATbits.AD2STG0 // bit 4
4956 #define AD2STG1 AADSTATbits.AD2STG1 // bit 5
4957 #define AD2CONV AADSTATbits.AD2CONV // bit 6
4959 #define ANSA0 ANSELAbits.ANSA0 // bit 0
4960 #define ANSA1 ANSELAbits.ANSA1 // bit 1
4961 #define ANSA2 ANSELAbits.ANSA2 // bit 2
4962 #define ANSA4 ANSELAbits.ANSA4 // bit 4
4963 #define ANSA5 ANSELAbits.ANSA5 // bit 5
4965 #define ANSB4 ANSELBbits.ANSB4 // bit 4
4966 #define ANSB5 ANSELBbits.ANSB5 // bit 5
4967 #define ANSB6 ANSELBbits.ANSB6 // bit 6
4968 #define ANSB7 ANSELBbits.ANSB7 // bit 7
4970 #define ANSC0 ANSELCbits.ANSC0 // bit 0
4971 #define ANSC1 ANSELCbits.ANSC1 // bit 1
4972 #define ANSC2 ANSELCbits.ANSC2 // bit 2
4973 #define ANSC3 ANSELCbits.ANSC3 // bit 3
4974 #define ANSC4 ANSELCbits.ANSC4 // bit 4
4975 #define ANSC5 ANSELCbits.ANSC5 // bit 5
4976 #define ANSC6 ANSELCbits.ANSC6 // bit 6
4977 #define ANSC7 ANSELCbits.ANSC7 // bit 7
4979 #define GRDASEL APFCONbits.GRDASEL // bit 0
4980 #define GRDBSEL APFCONbits.GRDBSEL // bit 1
4981 #define SDSEL APFCONbits.SDSEL // bit 4
4982 #define SSSEL APFCONbits.SSSEL // bit 5
4983 #define SDOSEL APFCONbits.SDOSEL // bit 6
4984 #define RXDTSEL APFCONbits.RXDTSEL // bit 7
4986 #define ABDEN BAUDCONbits.ABDEN // bit 0
4987 #define WUE BAUDCONbits.WUE // bit 1
4988 #define BRG16 BAUDCONbits.BRG16 // bit 3
4989 #define SCKP BAUDCONbits.SCKP // bit 4
4990 #define RCIDL BAUDCONbits.RCIDL // bit 6
4991 #define ABDOVF BAUDCONbits.ABDOVF // bit 7
4993 #define BORRDY BORCONbits.BORRDY // bit 0
4994 #define BORFS BORCONbits.BORFS // bit 6
4995 #define SBOREN BORCONbits.SBOREN // bit 7
4997 #define BSR0 BSRbits.BSR0 // bit 0
4998 #define BSR1 BSRbits.BSR1 // bit 1
4999 #define BSR2 BSRbits.BSR2 // bit 2
5000 #define BSR3 BSRbits.BSR3 // bit 3
5001 #define BSR4 BSRbits.BSR4 // bit 4
5003 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
5004 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
5005 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
5006 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
5007 #define TSRNG FVRCONbits.TSRNG // bit 4
5008 #define TSEN FVRCONbits.TSEN // bit 5
5009 #define FVRRDY FVRCONbits.FVRRDY // bit 6
5010 #define FVREN FVRCONbits.FVREN // bit 7
5012 #define BKHLT ICDBK0CONbits.BKHLT // bit 0
5013 #define BKEN ICDBK0CONbits.BKEN // bit 7
5015 #define BKA8 ICDBK0Hbits.BKA8 // bit 0
5016 #define BKA9 ICDBK0Hbits.BKA9 // bit 1
5017 #define BKA10 ICDBK0Hbits.BKA10 // bit 2
5018 #define BKA11 ICDBK0Hbits.BKA11 // bit 3
5019 #define BKA12 ICDBK0Hbits.BKA12 // bit 4
5020 #define BKA13 ICDBK0Hbits.BKA13 // bit 5
5021 #define BKA14 ICDBK0Hbits.BKA14 // bit 6
5023 #define BKA0 ICDBK0Lbits.BKA0 // bit 0
5024 #define BKA1 ICDBK0Lbits.BKA1 // bit 1
5025 #define BKA2 ICDBK0Lbits.BKA2 // bit 2
5026 #define BKA3 ICDBK0Lbits.BKA3 // bit 3
5027 #define BKA4 ICDBK0Lbits.BKA4 // bit 4
5028 #define BKA5 ICDBK0Lbits.BKA5 // bit 5
5029 #define BKA6 ICDBK0Lbits.BKA6 // bit 6
5030 #define BKA7 ICDBK0Lbits.BKA7 // bit 7
5032 #define RSTVEC ICDCON0bits.RSTVEC // bit 0
5033 #define DBGINEX ICDCON0bits.DBGINEX // bit 3
5034 #define SSTEP ICDCON0bits.SSTEP // bit 5
5035 #define FREEZ ICDCON0bits.FREEZ // bit 6
5036 #define INBUG ICDCON0bits.INBUG // bit 7
5038 #define DBGIN8 ICDINSTHbits.DBGIN8 // bit 0
5039 #define DBGIN9 ICDINSTHbits.DBGIN9 // bit 1
5040 #define DBGIN10 ICDINSTHbits.DBGIN10 // bit 2
5041 #define DBGIN11 ICDINSTHbits.DBGIN11 // bit 3
5042 #define DBGIN12 ICDINSTHbits.DBGIN12 // bit 4
5043 #define DBGIN13 ICDINSTHbits.DBGIN13 // bit 5
5045 #define DBGIN0 ICDINSTLbits.DBGIN0 // bit 0
5046 #define DBGIN1 ICDINSTLbits.DBGIN1 // bit 1
5047 #define DBGIN2 ICDINSTLbits.DBGIN2 // bit 2
5048 #define DBGIN3 ICDINSTLbits.DBGIN3 // bit 3
5049 #define DBGIN4 ICDINSTLbits.DBGIN4 // bit 4
5050 #define DBGIN5 ICDINSTLbits.DBGIN5 // bit 5
5051 #define DBGIN6 ICDINSTLbits.DBGIN6 // bit 6
5052 #define DBGIN7 ICDINSTLbits.DBGIN7 // bit 7
5054 #define TRIS_ICDCLK ICDIObits.TRIS_ICDCLK // bit 2
5055 #define TRIS_ICDDAT ICDIObits.TRIS_ICDDAT // bit 3
5056 #define LAT_ICDCLK ICDIObits.LAT_ICDCLK // bit 4
5057 #define LAT_ICDDAT ICDIObits.LAT_ICDDAT // bit 5
5058 #define PORT_ICDCLK ICDIObits.PORT_ICDCLK // bit 6
5059 #define PORT_ICDDAT ICDIObits.PORT_ICDDAT // bit 7
5061 #define USRHLTF ICDSTATbits.USRHLTF // bit 1
5062 #define TRP0HLTF ICDSTATbits.TRP0HLTF // bit 6
5063 #define TRP1HLTF ICDSTATbits.TRP1HLTF // bit 7
5065 #define IOCIF INTCONbits.IOCIF // bit 0
5066 #define INTF INTCONbits.INTF // bit 1
5067 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
5068 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
5069 #define IOCIE INTCONbits.IOCIE // bit 3
5070 #define INTE INTCONbits.INTE // bit 4
5071 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
5072 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
5073 #define PEIE INTCONbits.PEIE // bit 6
5074 #define GIE INTCONbits.GIE // bit 7
5076 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
5077 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
5078 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
5079 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
5080 #define IOCAF4 IOCAFbits.IOCAF4 // bit 4
5081 #define IOCAF5 IOCAFbits.IOCAF5 // bit 5
5083 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
5084 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
5085 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
5086 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
5087 #define IOCAN4 IOCANbits.IOCAN4 // bit 4
5088 #define IOCAN5 IOCANbits.IOCAN5 // bit 5
5090 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
5091 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
5092 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
5093 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
5094 #define IOCAP4 IOCAPbits.IOCAP4 // bit 4
5095 #define IOCAP5 IOCAPbits.IOCAP5 // bit 5
5097 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
5098 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
5099 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
5100 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
5102 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
5103 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
5104 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
5105 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
5107 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
5108 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
5109 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
5110 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
5112 #define LATA0 LATAbits.LATA0 // bit 0
5113 #define LATA1 LATAbits.LATA1 // bit 1
5114 #define LATA2 LATAbits.LATA2 // bit 2
5115 #define LATA4 LATAbits.LATA4 // bit 4
5116 #define LATA5 LATAbits.LATA5 // bit 5
5118 #define LATB4 LATBbits.LATB4 // bit 4
5119 #define LATB5 LATBbits.LATB5 // bit 5
5120 #define LATB6 LATBbits.LATB6 // bit 6
5121 #define LATB7 LATBbits.LATB7 // bit 7
5123 #define LATC0 LATCbits.LATC0 // bit 0
5124 #define LATC1 LATCbits.LATC1 // bit 1
5125 #define LATC2 LATCbits.LATC2 // bit 2
5126 #define LATC3 LATCbits.LATC3 // bit 3
5127 #define LATC4 LATCbits.LATC4 // bit 4
5128 #define LATC5 LATCbits.LATC5 // bit 5
5129 #define LATC6 LATCbits.LATC6 // bit 6
5130 #define LATC7 LATCbits.LATC7 // bit 7
5132 #define PS0 OPTION_REGbits.PS0 // bit 0
5133 #define PS1 OPTION_REGbits.PS1 // bit 1
5134 #define PS2 OPTION_REGbits.PS2 // bit 2
5135 #define PSA OPTION_REGbits.PSA // bit 3
5136 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
5137 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
5138 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
5139 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
5140 #define INTEDG OPTION_REGbits.INTEDG // bit 6
5141 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
5143 #define SCS0 OSCCONbits.SCS0 // bit 0
5144 #define SCS1 OSCCONbits.SCS1 // bit 1
5145 #define IRCF0 OSCCONbits.IRCF0 // bit 3
5146 #define IRCF1 OSCCONbits.IRCF1 // bit 4
5147 #define IRCF2 OSCCONbits.IRCF2 // bit 5
5148 #define IRCF3 OSCCONbits.IRCF3 // bit 6
5149 #define SPLLEN OSCCONbits.SPLLEN // bit 7
5151 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
5152 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
5153 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
5154 #define PLLSR OSCSTATbits.PLLSR // bit 6
5156 #define NOT_BOR PCONbits.NOT_BOR // bit 0
5157 #define NOT_POR PCONbits.NOT_POR // bit 1
5158 #define NOT_RI PCONbits.NOT_RI // bit 2
5159 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
5160 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
5161 #define STKUNF PCONbits.STKUNF // bit 6
5162 #define STKOVF PCONbits.STKOVF // bit 7
5164 #define TMR1IE PIE1bits.TMR1IE // bit 0
5165 #define TMR2IE PIE1bits.TMR2IE // bit 1
5166 #define SSP1IE PIE1bits.SSP1IE // bit 3
5167 #define TXIE PIE1bits.TXIE // bit 4
5168 #define RCIE PIE1bits.RCIE // bit 5
5169 #define ADIE PIE1bits.ADIE // bit 6, shadows bit in PIE1bits
5170 #define AD1IE PIE1bits.AD1IE // bit 6, shadows bit in PIE1bits
5171 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
5173 #define BCL1IE PIE2bits.BCL1IE // bit 3
5174 #define AD2IE PIE2bits.AD2IE // bit 6
5176 #define TMR1IF PIR1bits.TMR1IF // bit 0
5177 #define TMR2IF PIR1bits.TMR2IF // bit 1
5178 #define SSP1IF PIR1bits.SSP1IF // bit 3
5179 #define TXIF PIR1bits.TXIF // bit 4
5180 #define RCIF PIR1bits.RCIF // bit 5
5181 #define ADIF PIR1bits.ADIF // bit 6, shadows bit in PIR1bits
5182 #define AD1IF PIR1bits.AD1IF // bit 6, shadows bit in PIR1bits
5183 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
5185 #define BCL1IF PIR2bits.BCL1IF // bit 3
5186 #define AD2IF PIR2bits.AD2IF // bit 6
5188 #define RD PMCON1bits.RD // bit 0
5189 #define WR PMCON1bits.WR // bit 1
5190 #define WREN PMCON1bits.WREN // bit 2
5191 #define WRERR PMCON1bits.WRERR // bit 3
5192 #define FREE PMCON1bits.FREE // bit 4
5193 #define LWLO PMCON1bits.LWLO // bit 5
5194 #define CFGS PMCON1bits.CFGS // bit 6
5196 #define RA0 PORTAbits.RA0 // bit 0
5197 #define RA1 PORTAbits.RA1 // bit 1
5198 #define RA2 PORTAbits.RA2 // bit 2
5199 #define RA3 PORTAbits.RA3 // bit 3
5200 #define RA4 PORTAbits.RA4 // bit 4
5201 #define RA5 PORTAbits.RA5 // bit 5
5203 #define RB4 PORTBbits.RB4 // bit 4
5204 #define RB5 PORTBbits.RB5 // bit 5
5205 #define RB6 PORTBbits.RB6 // bit 6
5206 #define RB7 PORTBbits.RB7 // bit 7
5208 #define RC0 PORTCbits.RC0 // bit 0
5209 #define RC1 PORTCbits.RC1 // bit 1
5210 #define RC2 PORTCbits.RC2 // bit 2
5211 #define RC3 PORTCbits.RC3 // bit 3
5212 #define RC4 PORTCbits.RC4 // bit 4
5213 #define RC5 PORTCbits.RC5 // bit 5
5214 #define RC6 PORTCbits.RC6 // bit 6
5215 #define RC7 PORTCbits.RC7 // bit 7
5217 #define PWM1POL PWM1CONbits.PWM1POL // bit 4
5218 #define PWM1OUT PWM1CONbits.PWM1OUT // bit 5
5219 #define PWM1OE PWM1CONbits.PWM1OE // bit 6
5220 #define PWM1EN PWM1CONbits.PWM1EN // bit 7
5222 #define PWM1DCH0 PWM1DCHbits.PWM1DCH0 // bit 0
5223 #define PWM1DCH1 PWM1DCHbits.PWM1DCH1 // bit 1
5224 #define PWM1DCH2 PWM1DCHbits.PWM1DCH2 // bit 2
5225 #define PWM1DCH3 PWM1DCHbits.PWM1DCH3 // bit 3
5226 #define PWM1DCH4 PWM1DCHbits.PWM1DCH4 // bit 4
5227 #define PWM1DCH5 PWM1DCHbits.PWM1DCH5 // bit 5
5228 #define PWM1DCH6 PWM1DCHbits.PWM1DCH6 // bit 6
5229 #define PWM1DCH7 PWM1DCHbits.PWM1DCH7 // bit 7
5231 #define PWM1DCL0 PWM1DCLbits.PWM1DCL0 // bit 6
5232 #define PWM1DCL1 PWM1DCLbits.PWM1DCL1 // bit 7
5234 #define PWM2POL PWM2CONbits.PWM2POL // bit 4
5235 #define PWM2OUT PWM2CONbits.PWM2OUT // bit 5
5236 #define PWM2OE PWM2CONbits.PWM2OE // bit 6
5237 #define PWM2EN PWM2CONbits.PWM2EN // bit 7
5239 #define PWM2DCH0 PWM2DCHbits.PWM2DCH0 // bit 0
5240 #define PWM2DCH1 PWM2DCHbits.PWM2DCH1 // bit 1
5241 #define PWM2DCH2 PWM2DCHbits.PWM2DCH2 // bit 2
5242 #define PWM2DCH3 PWM2DCHbits.PWM2DCH3 // bit 3
5243 #define PWM2DCH4 PWM2DCHbits.PWM2DCH4 // bit 4
5244 #define PWM2DCH5 PWM2DCHbits.PWM2DCH5 // bit 5
5245 #define PWM2DCH6 PWM2DCHbits.PWM2DCH6 // bit 6
5246 #define PWM2DCH7 PWM2DCHbits.PWM2DCH7 // bit 7
5248 #define PWM2DCL0 PWM2DCLbits.PWM2DCL0 // bit 6
5249 #define PWM2DCL1 PWM2DCLbits.PWM2DCL1 // bit 7
5251 #define RX9D RCSTAbits.RX9D // bit 0
5252 #define OERR RCSTAbits.OERR // bit 1
5253 #define FERR RCSTAbits.FERR // bit 2
5254 #define ADDEN RCSTAbits.ADDEN // bit 3
5255 #define CREN RCSTAbits.CREN // bit 4
5256 #define SREN RCSTAbits.SREN // bit 5
5257 #define RX9 RCSTAbits.RX9 // bit 6
5258 #define SPEN RCSTAbits.SPEN // bit 7
5260 #define SSPM0 SSP1CON1bits.SSPM0 // bit 0
5261 #define SSPM1 SSP1CON1bits.SSPM1 // bit 1
5262 #define SSPM2 SSP1CON1bits.SSPM2 // bit 2
5263 #define SSPM3 SSP1CON1bits.SSPM3 // bit 3
5264 #define CKP SSP1CON1bits.CKP // bit 4
5265 #define SSPEN SSP1CON1bits.SSPEN // bit 5
5266 #define SSPOV SSP1CON1bits.SSPOV // bit 6
5267 #define WCOL SSP1CON1bits.WCOL // bit 7
5269 #define SEN SSP1CON2bits.SEN // bit 0
5270 #define RSEN SSP1CON2bits.RSEN // bit 1
5271 #define PEN SSP1CON2bits.PEN // bit 2
5272 #define RCEN SSP1CON2bits.RCEN // bit 3
5273 #define ACKEN SSP1CON2bits.ACKEN // bit 4
5274 #define ACKDT SSP1CON2bits.ACKDT // bit 5
5275 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
5276 #define GCEN SSP1CON2bits.GCEN // bit 7
5278 #define DHEN SSP1CON3bits.DHEN // bit 0
5279 #define AHEN SSP1CON3bits.AHEN // bit 1
5280 #define SBCDE SSP1CON3bits.SBCDE // bit 2
5281 #define SDAHT SSP1CON3bits.SDAHT // bit 3
5282 #define BOEN SSP1CON3bits.BOEN // bit 4
5283 #define SCIE SSP1CON3bits.SCIE // bit 5
5284 #define PCIE SSP1CON3bits.PCIE // bit 6
5285 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
5287 #define BF SSP1STATbits.BF // bit 0
5288 #define UA SSP1STATbits.UA // bit 1
5289 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
5290 #define S SSP1STATbits.S // bit 3
5291 #define P SSP1STATbits.P // bit 4
5292 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
5293 #define CKE SSP1STATbits.CKE // bit 6
5294 #define SMP SSP1STATbits.SMP // bit 7
5296 #define C STATUSbits.C // bit 0
5297 #define DC STATUSbits.DC // bit 1
5298 #define Z STATUSbits.Z // bit 2
5299 #define NOT_PD STATUSbits.NOT_PD // bit 3
5300 #define NOT_TO STATUSbits.NOT_TO // bit 4
5302 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
5303 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
5304 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
5306 #define TMR1ON T1CONbits.TMR1ON // bit 0
5307 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
5308 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
5309 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
5310 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
5311 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
5313 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
5314 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
5315 #define TMR2ON T2CONbits.TMR2ON // bit 2
5316 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
5317 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
5318 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
5319 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
5321 #define TRISA0 TRISAbits.TRISA0 // bit 0
5322 #define TRISA1 TRISAbits.TRISA1 // bit 1
5323 #define TRISA2 TRISAbits.TRISA2 // bit 2
5324 #define TRISA3 TRISAbits.TRISA3 // bit 3
5325 #define TRISA4 TRISAbits.TRISA4 // bit 4
5326 #define TRISA5 TRISAbits.TRISA5 // bit 5
5328 #define TRISB4 TRISBbits.TRISB4 // bit 4
5329 #define TRISB5 TRISBbits.TRISB5 // bit 5
5330 #define TRISB6 TRISBbits.TRISB6 // bit 6
5331 #define TRISB7 TRISBbits.TRISB7 // bit 7
5333 #define TRISC0 TRISCbits.TRISC0 // bit 0
5334 #define TRISC1 TRISCbits.TRISC1 // bit 1
5335 #define TRISC2 TRISCbits.TRISC2 // bit 2
5336 #define TRISC3 TRISCbits.TRISC3 // bit 3
5337 #define TRISC4 TRISCbits.TRISC4 // bit 4
5338 #define TRISC5 TRISCbits.TRISC5 // bit 5
5339 #define TRISC6 TRISCbits.TRISC6 // bit 6
5340 #define TRISC7 TRISCbits.TRISC7 // bit 7
5342 #define TX9D TXSTAbits.TX9D // bit 0
5343 #define TRMT TXSTAbits.TRMT // bit 1
5344 #define BRGH TXSTAbits.BRGH // bit 2
5345 #define SENDB TXSTAbits.SENDB // bit 3
5346 #define SYNC TXSTAbits.SYNC // bit 4
5347 #define TXEN TXSTAbits.TXEN // bit 5
5348 #define TX9 TXSTAbits.TX9 // bit 6
5349 #define CSRC TXSTAbits.CSRC // bit 7
5351 #define SWDTEN WDTCONbits.SWDTEN // bit 0
5352 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
5353 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
5354 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
5355 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
5356 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
5358 #define WPUA0 WPUAbits.WPUA0 // bit 0
5359 #define WPUA1 WPUAbits.WPUA1 // bit 1
5360 #define WPUA2 WPUAbits.WPUA2 // bit 2
5361 #define WPUA3 WPUAbits.WPUA3 // bit 3
5362 #define WPUA4 WPUAbits.WPUA4 // bit 4
5363 #define WPUA5 WPUAbits.WPUA5 // bit 5
5365 #define WPUB4 WPUBbits.WPUB4 // bit 4
5366 #define WPUB5 WPUBbits.WPUB5 // bit 5
5367 #define WPUB6 WPUBbits.WPUB6 // bit 6
5368 #define WPUB7 WPUBbits.WPUB7 // bit 7
5370 #endif // #ifndef NO_BIT_DEFINES
5372 #endif // #ifndef __PIC16LF1559_H__