struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f1934.h
blob92cb97725a6b1aafc83e0a76c31857c3e7b8fad9
1 /*
2 * This declarations of the PIC16F1934 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:22 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 __PIC16F1934_H__
26 #define __PIC16F1934_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 PORTD_ADDR 0x000F
54 #define PORTE_ADDR 0x0010
55 #define PIR1_ADDR 0x0011
56 #define PIR2_ADDR 0x0012
57 #define PIR3_ADDR 0x0013
58 #define TMR0_ADDR 0x0015
59 #define TMR1_ADDR 0x0016
60 #define TMR1L_ADDR 0x0016
61 #define TMR1H_ADDR 0x0017
62 #define T1CON_ADDR 0x0018
63 #define T1GCON_ADDR 0x0019
64 #define TMR2_ADDR 0x001A
65 #define PR2_ADDR 0x001B
66 #define T2CON_ADDR 0x001C
67 #define CPSCON0_ADDR 0x001E
68 #define CPSCON1_ADDR 0x001F
69 #define TRISA_ADDR 0x008C
70 #define TRISB_ADDR 0x008D
71 #define TRISC_ADDR 0x008E
72 #define TRISD_ADDR 0x008F
73 #define TRISE_ADDR 0x0090
74 #define PIE1_ADDR 0x0091
75 #define PIE2_ADDR 0x0092
76 #define PIE3_ADDR 0x0093
77 #define OPTION_REG_ADDR 0x0095
78 #define PCON_ADDR 0x0096
79 #define WDTCON_ADDR 0x0097
80 #define OSCTUNE_ADDR 0x0098
81 #define OSCCON_ADDR 0x0099
82 #define OSCSTAT_ADDR 0x009A
83 #define ADRES_ADDR 0x009B
84 #define ADRESL_ADDR 0x009B
85 #define ADRESH_ADDR 0x009C
86 #define ADCON0_ADDR 0x009D
87 #define ADCON1_ADDR 0x009E
88 #define LATA_ADDR 0x010C
89 #define LATB_ADDR 0x010D
90 #define LATC_ADDR 0x010E
91 #define LATD_ADDR 0x010F
92 #define LATE_ADDR 0x0110
93 #define CM1CON0_ADDR 0x0111
94 #define CM1CON1_ADDR 0x0112
95 #define CM2CON0_ADDR 0x0113
96 #define CM2CON1_ADDR 0x0114
97 #define CMOUT_ADDR 0x0115
98 #define BORCON_ADDR 0x0116
99 #define FVRCON_ADDR 0x0117
100 #define DACCON0_ADDR 0x0118
101 #define DACCON1_ADDR 0x0119
102 #define SRCON0_ADDR 0x011A
103 #define SRCON1_ADDR 0x011B
104 #define APFCON_ADDR 0x011D
105 #define ANSELA_ADDR 0x018C
106 #define ANSELB_ADDR 0x018D
107 #define ANSELD_ADDR 0x018F
108 #define ANSELE_ADDR 0x0190
109 #define EEADR_ADDR 0x0191
110 #define EEADRL_ADDR 0x0191
111 #define EEADRH_ADDR 0x0192
112 #define EEDAT_ADDR 0x0193
113 #define EEDATL_ADDR 0x0193
114 #define EEDATH_ADDR 0x0194
115 #define EECON1_ADDR 0x0195
116 #define EECON2_ADDR 0x0196
117 #define RCREG_ADDR 0x0199
118 #define TXREG_ADDR 0x019A
119 #define SP1BRG_ADDR 0x019B
120 #define SP1BRGL_ADDR 0x019B
121 #define SPBRG_ADDR 0x019B
122 #define SPBRGL_ADDR 0x019B
123 #define SP1BRGH_ADDR 0x019C
124 #define SPBRGH_ADDR 0x019C
125 #define RCSTA_ADDR 0x019D
126 #define TXSTA_ADDR 0x019E
127 #define BAUDCON_ADDR 0x019F
128 #define WPUB_ADDR 0x020D
129 #define WPUE_ADDR 0x0210
130 #define SSPBUF_ADDR 0x0211
131 #define SSPADD_ADDR 0x0212
132 #define SSPMSK_ADDR 0x0213
133 #define SSPSTAT_ADDR 0x0214
134 #define SSPCON_ADDR 0x0215
135 #define SSPCON1_ADDR 0x0215
136 #define SSPCON2_ADDR 0x0216
137 #define SSPCON3_ADDR 0x0217
138 #define CCPR1_ADDR 0x0291
139 #define CCPR1L_ADDR 0x0291
140 #define CCPR1H_ADDR 0x0292
141 #define CCP1CON_ADDR 0x0293
142 #define PWM1CON_ADDR 0x0294
143 #define CCP1AS_ADDR 0x0295
144 #define ECCP1AS_ADDR 0x0295
145 #define PSTR1CON_ADDR 0x0296
146 #define CCPR2_ADDR 0x0298
147 #define CCPR2L_ADDR 0x0298
148 #define CCPR2H_ADDR 0x0299
149 #define CCP2CON_ADDR 0x029A
150 #define PWM2CON_ADDR 0x029B
151 #define CCP2AS_ADDR 0x029C
152 #define ECCP2AS_ADDR 0x029C
153 #define PSTR2CON_ADDR 0x029D
154 #define CCPTMRS0_ADDR 0x029E
155 #define CCPTMRS1_ADDR 0x029F
156 #define CCPR3_ADDR 0x0311
157 #define CCPR3L_ADDR 0x0311
158 #define CCPR3H_ADDR 0x0312
159 #define CCP3CON_ADDR 0x0313
160 #define PWM3CON_ADDR 0x0314
161 #define CCP3AS_ADDR 0x0315
162 #define ECCP3AS_ADDR 0x0315
163 #define PSTR3CON_ADDR 0x0316
164 #define CCPR4_ADDR 0x0318
165 #define CCPR4L_ADDR 0x0318
166 #define CCPR4H_ADDR 0x0319
167 #define CCP4CON_ADDR 0x031A
168 #define CCPR5_ADDR 0x031C
169 #define CCPR5L_ADDR 0x031C
170 #define CCPR5H_ADDR 0x031D
171 #define CCP5CON_ADDR 0x031E
172 #define IOCBP_ADDR 0x0394
173 #define IOCBN_ADDR 0x0395
174 #define IOCBF_ADDR 0x0396
175 #define TMR4_ADDR 0x0415
176 #define PR4_ADDR 0x0416
177 #define T4CON_ADDR 0x0417
178 #define TMR6_ADDR 0x041C
179 #define PR6_ADDR 0x041D
180 #define T6CON_ADDR 0x041E
181 #define LCDCON_ADDR 0x0791
182 #define LCDPS_ADDR 0x0792
183 #define LCDREF_ADDR 0x0793
184 #define LCDCST_ADDR 0x0794
185 #define LCDRL_ADDR 0x0795
186 #define LCDSE0_ADDR 0x0798
187 #define LCDSE1_ADDR 0x0799
188 #define LCDSE2_ADDR 0x079A
189 #define LCDDATA0_ADDR 0x07A0
190 #define LCDDATA1_ADDR 0x07A1
191 #define LCDDATA2_ADDR 0x07A2
192 #define LCDDATA3_ADDR 0x07A3
193 #define LCDDATA4_ADDR 0x07A4
194 #define LCDDATA5_ADDR 0x07A5
195 #define LCDDATA6_ADDR 0x07A6
196 #define LCDDATA7_ADDR 0x07A7
197 #define LCDDATA8_ADDR 0x07A8
198 #define LCDDATA9_ADDR 0x07A9
199 #define LCDDATA10_ADDR 0x07AA
200 #define LCDDATA11_ADDR 0x07AB
201 #define STATUS_SHAD_ADDR 0x0FE4
202 #define WREG_SHAD_ADDR 0x0FE5
203 #define BSR_SHAD_ADDR 0x0FE6
204 #define PCLATH_SHAD_ADDR 0x0FE7
205 #define FSR0L_SHAD_ADDR 0x0FE8
206 #define FSR0H_SHAD_ADDR 0x0FE9
207 #define FSR1L_SHAD_ADDR 0x0FEA
208 #define FSR1H_SHAD_ADDR 0x0FEB
209 #define STKPTR_ADDR 0x0FED
210 #define TOSL_ADDR 0x0FEE
211 #define TOSH_ADDR 0x0FEF
213 #endif // #ifndef NO_ADDR_DEFINES
215 //==============================================================================
217 // Register Definitions
219 //==============================================================================
221 extern __at(0x0000) __sfr INDF0;
222 extern __at(0x0001) __sfr INDF1;
223 extern __at(0x0002) __sfr PCL;
225 //==============================================================================
226 // STATUS Bits
228 extern __at(0x0003) __sfr STATUS;
230 typedef struct
232 unsigned C : 1;
233 unsigned DC : 1;
234 unsigned Z : 1;
235 unsigned NOT_PD : 1;
236 unsigned NOT_TO : 1;
237 unsigned : 1;
238 unsigned : 1;
239 unsigned : 1;
240 } __STATUSbits_t;
242 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
244 #define _C 0x01
245 #define _DC 0x02
246 #define _Z 0x04
247 #define _NOT_PD 0x08
248 #define _NOT_TO 0x10
250 //==============================================================================
252 extern __at(0x0004) __sfr FSR0;
253 extern __at(0x0004) __sfr FSR0L;
254 extern __at(0x0005) __sfr FSR0H;
255 extern __at(0x0006) __sfr FSR1;
256 extern __at(0x0006) __sfr FSR1L;
257 extern __at(0x0007) __sfr FSR1H;
259 //==============================================================================
260 // BSR Bits
262 extern __at(0x0008) __sfr BSR;
264 typedef union
266 struct
268 unsigned BSR0 : 1;
269 unsigned BSR1 : 1;
270 unsigned BSR2 : 1;
271 unsigned BSR3 : 1;
272 unsigned BSR4 : 1;
273 unsigned : 1;
274 unsigned : 1;
275 unsigned : 1;
278 struct
280 unsigned BSR : 5;
281 unsigned : 3;
283 } __BSRbits_t;
285 extern __at(0x0008) volatile __BSRbits_t BSRbits;
287 #define _BSR0 0x01
288 #define _BSR1 0x02
289 #define _BSR2 0x04
290 #define _BSR3 0x08
291 #define _BSR4 0x10
293 //==============================================================================
295 extern __at(0x0009) __sfr WREG;
296 extern __at(0x000A) __sfr PCLATH;
298 //==============================================================================
299 // INTCON Bits
301 extern __at(0x000B) __sfr INTCON;
303 typedef union
305 struct
307 unsigned IOCIF : 1;
308 unsigned INTF : 1;
309 unsigned TMR0IF : 1;
310 unsigned IOCIE : 1;
311 unsigned INTE : 1;
312 unsigned TMR0IE : 1;
313 unsigned PEIE : 1;
314 unsigned GIE : 1;
317 struct
319 unsigned : 1;
320 unsigned : 1;
321 unsigned T0IF : 1;
322 unsigned : 1;
323 unsigned : 1;
324 unsigned T0IE : 1;
325 unsigned : 1;
326 unsigned : 1;
328 } __INTCONbits_t;
330 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
332 #define _IOCIF 0x01
333 #define _INTF 0x02
334 #define _TMR0IF 0x04
335 #define _T0IF 0x04
336 #define _IOCIE 0x08
337 #define _INTE 0x10
338 #define _TMR0IE 0x20
339 #define _T0IE 0x20
340 #define _PEIE 0x40
341 #define _GIE 0x80
343 //==============================================================================
346 //==============================================================================
347 // PORTA Bits
349 extern __at(0x000C) __sfr PORTA;
351 typedef struct
353 unsigned RA0 : 1;
354 unsigned RA1 : 1;
355 unsigned RA2 : 1;
356 unsigned RA3 : 1;
357 unsigned RA4 : 1;
358 unsigned RA5 : 1;
359 unsigned RA6 : 1;
360 unsigned RA7 : 1;
361 } __PORTAbits_t;
363 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
365 #define _RA0 0x01
366 #define _RA1 0x02
367 #define _RA2 0x04
368 #define _RA3 0x08
369 #define _RA4 0x10
370 #define _RA5 0x20
371 #define _RA6 0x40
372 #define _RA7 0x80
374 //==============================================================================
377 //==============================================================================
378 // PORTB Bits
380 extern __at(0x000D) __sfr PORTB;
382 typedef struct
384 unsigned RB0 : 1;
385 unsigned RB1 : 1;
386 unsigned RB2 : 1;
387 unsigned RB3 : 1;
388 unsigned RB4 : 1;
389 unsigned RB5 : 1;
390 unsigned RB6 : 1;
391 unsigned RB7 : 1;
392 } __PORTBbits_t;
394 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
396 #define _RB0 0x01
397 #define _RB1 0x02
398 #define _RB2 0x04
399 #define _RB3 0x08
400 #define _RB4 0x10
401 #define _RB5 0x20
402 #define _RB6 0x40
403 #define _RB7 0x80
405 //==============================================================================
408 //==============================================================================
409 // PORTC Bits
411 extern __at(0x000E) __sfr PORTC;
413 typedef struct
415 unsigned RC0 : 1;
416 unsigned RC1 : 1;
417 unsigned RC2 : 1;
418 unsigned RC3 : 1;
419 unsigned RC4 : 1;
420 unsigned RC5 : 1;
421 unsigned RC6 : 1;
422 unsigned RC7 : 1;
423 } __PORTCbits_t;
425 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
427 #define _RC0 0x01
428 #define _RC1 0x02
429 #define _RC2 0x04
430 #define _RC3 0x08
431 #define _RC4 0x10
432 #define _RC5 0x20
433 #define _RC6 0x40
434 #define _RC7 0x80
436 //==============================================================================
439 //==============================================================================
440 // PORTD Bits
442 extern __at(0x000F) __sfr PORTD;
444 typedef struct
446 unsigned RD0 : 1;
447 unsigned RD1 : 1;
448 unsigned RD2 : 1;
449 unsigned RD3 : 1;
450 unsigned RD4 : 1;
451 unsigned RD5 : 1;
452 unsigned RD6 : 1;
453 unsigned RD7 : 1;
454 } __PORTDbits_t;
456 extern __at(0x000F) volatile __PORTDbits_t PORTDbits;
458 #define _RD0 0x01
459 #define _RD1 0x02
460 #define _RD2 0x04
461 #define _RD3 0x08
462 #define _RD4 0x10
463 #define _RD5 0x20
464 #define _RD6 0x40
465 #define _RD7 0x80
467 //==============================================================================
470 //==============================================================================
471 // PORTE Bits
473 extern __at(0x0010) __sfr PORTE;
475 typedef union
477 struct
479 unsigned RE0 : 1;
480 unsigned RE1 : 1;
481 unsigned RE2 : 1;
482 unsigned RE3 : 1;
483 unsigned : 1;
484 unsigned : 1;
485 unsigned : 1;
486 unsigned : 1;
489 struct
491 unsigned RE : 4;
492 unsigned : 4;
494 } __PORTEbits_t;
496 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
498 #define _RE0 0x01
499 #define _RE1 0x02
500 #define _RE2 0x04
501 #define _RE3 0x08
503 //==============================================================================
506 //==============================================================================
507 // PIR1 Bits
509 extern __at(0x0011) __sfr PIR1;
511 typedef struct
513 unsigned TMR1IF : 1;
514 unsigned TMR2IF : 1;
515 unsigned CCP1IF : 1;
516 unsigned SSPIF : 1;
517 unsigned TXIF : 1;
518 unsigned RCIF : 1;
519 unsigned ADIF : 1;
520 unsigned TMR1GIF : 1;
521 } __PIR1bits_t;
523 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
525 #define _TMR1IF 0x01
526 #define _TMR2IF 0x02
527 #define _CCP1IF 0x04
528 #define _SSPIF 0x08
529 #define _TXIF 0x10
530 #define _RCIF 0x20
531 #define _ADIF 0x40
532 #define _TMR1GIF 0x80
534 //==============================================================================
537 //==============================================================================
538 // PIR2 Bits
540 extern __at(0x0012) __sfr PIR2;
542 typedef struct
544 unsigned CCP2IF : 1;
545 unsigned : 1;
546 unsigned LCDIF : 1;
547 unsigned BCLIF : 1;
548 unsigned EEIF : 1;
549 unsigned C1IF : 1;
550 unsigned C2IF : 1;
551 unsigned OSFIF : 1;
552 } __PIR2bits_t;
554 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
556 #define _CCP2IF 0x01
557 #define _LCDIF 0x04
558 #define _BCLIF 0x08
559 #define _EEIF 0x10
560 #define _C1IF 0x20
561 #define _C2IF 0x40
562 #define _OSFIF 0x80
564 //==============================================================================
567 //==============================================================================
568 // PIR3 Bits
570 extern __at(0x0013) __sfr PIR3;
572 typedef struct
574 unsigned : 1;
575 unsigned TMR4IF : 1;
576 unsigned : 1;
577 unsigned TMR6IF : 1;
578 unsigned CCP3IF : 1;
579 unsigned CCP4IF : 1;
580 unsigned CCP5IF : 1;
581 unsigned : 1;
582 } __PIR3bits_t;
584 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
586 #define _TMR4IF 0x02
587 #define _TMR6IF 0x08
588 #define _CCP3IF 0x10
589 #define _CCP4IF 0x20
590 #define _CCP5IF 0x40
592 //==============================================================================
594 extern __at(0x0015) __sfr TMR0;
595 extern __at(0x0016) __sfr TMR1;
596 extern __at(0x0016) __sfr TMR1L;
597 extern __at(0x0017) __sfr TMR1H;
599 //==============================================================================
600 // T1CON Bits
602 extern __at(0x0018) __sfr T1CON;
604 typedef union
606 struct
608 unsigned TMR1ON : 1;
609 unsigned : 1;
610 unsigned NOT_T1SYNC : 1;
611 unsigned T1OSCEN : 1;
612 unsigned T1CKPS0 : 1;
613 unsigned T1CKPS1 : 1;
614 unsigned TMR1CS0 : 1;
615 unsigned TMR1CS1 : 1;
618 struct
620 unsigned : 4;
621 unsigned T1CKPS : 2;
622 unsigned : 2;
625 struct
627 unsigned : 6;
628 unsigned TMR1CS : 2;
630 } __T1CONbits_t;
632 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
634 #define _TMR1ON 0x01
635 #define _NOT_T1SYNC 0x04
636 #define _T1OSCEN 0x08
637 #define _T1CKPS0 0x10
638 #define _T1CKPS1 0x20
639 #define _TMR1CS0 0x40
640 #define _TMR1CS1 0x80
642 //==============================================================================
645 //==============================================================================
646 // T1GCON Bits
648 extern __at(0x0019) __sfr T1GCON;
650 typedef union
652 struct
654 unsigned T1GSS0 : 1;
655 unsigned T1GSS1 : 1;
656 unsigned T1GVAL : 1;
657 unsigned T1GGO_NOT_DONE : 1;
658 unsigned T1GSPM : 1;
659 unsigned T1GTM : 1;
660 unsigned T1GPOL : 1;
661 unsigned TMR1GE : 1;
664 struct
666 unsigned : 1;
667 unsigned : 1;
668 unsigned : 1;
669 unsigned T1GGO : 1;
670 unsigned : 1;
671 unsigned : 1;
672 unsigned : 1;
673 unsigned : 1;
676 struct
678 unsigned T1GSS : 2;
679 unsigned : 6;
681 } __T1GCONbits_t;
683 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
685 #define _T1GSS0 0x01
686 #define _T1GSS1 0x02
687 #define _T1GVAL 0x04
688 #define _T1GGO_NOT_DONE 0x08
689 #define _T1GGO 0x08
690 #define _T1GSPM 0x10
691 #define _T1GTM 0x20
692 #define _T1GPOL 0x40
693 #define _TMR1GE 0x80
695 //==============================================================================
697 extern __at(0x001A) __sfr TMR2;
698 extern __at(0x001B) __sfr PR2;
700 //==============================================================================
701 // T2CON Bits
703 extern __at(0x001C) __sfr T2CON;
705 typedef union
707 struct
709 unsigned T2CKPS0 : 1;
710 unsigned T2CKPS1 : 1;
711 unsigned TMR2ON : 1;
712 unsigned T2OUTPS0 : 1;
713 unsigned T2OUTPS1 : 1;
714 unsigned T2OUTPS2 : 1;
715 unsigned T2OUTPS3 : 1;
716 unsigned : 1;
719 struct
721 unsigned T2CKPS : 2;
722 unsigned : 6;
725 struct
727 unsigned : 3;
728 unsigned T2OUTPS : 4;
729 unsigned : 1;
731 } __T2CONbits_t;
733 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
735 #define _T2CKPS0 0x01
736 #define _T2CKPS1 0x02
737 #define _TMR2ON 0x04
738 #define _T2OUTPS0 0x08
739 #define _T2OUTPS1 0x10
740 #define _T2OUTPS2 0x20
741 #define _T2OUTPS3 0x40
743 //==============================================================================
746 //==============================================================================
747 // CPSCON0 Bits
749 extern __at(0x001E) __sfr CPSCON0;
751 typedef union
753 struct
755 unsigned T0XCS : 1;
756 unsigned CPSOUT : 1;
757 unsigned CPSRNG0 : 1;
758 unsigned CPSRNG1 : 1;
759 unsigned : 1;
760 unsigned : 1;
761 unsigned : 1;
762 unsigned CPSON : 1;
765 struct
767 unsigned : 2;
768 unsigned CPSRNG : 2;
769 unsigned : 4;
771 } __CPSCON0bits_t;
773 extern __at(0x001E) volatile __CPSCON0bits_t CPSCON0bits;
775 #define _T0XCS 0x01
776 #define _CPSOUT 0x02
777 #define _CPSRNG0 0x04
778 #define _CPSRNG1 0x08
779 #define _CPSON 0x80
781 //==============================================================================
784 //==============================================================================
785 // CPSCON1 Bits
787 extern __at(0x001F) __sfr CPSCON1;
789 typedef union
791 struct
793 unsigned CPSCH0 : 1;
794 unsigned CPSCH1 : 1;
795 unsigned CPSCH2 : 1;
796 unsigned CPSCH3 : 1;
797 unsigned : 1;
798 unsigned : 1;
799 unsigned : 1;
800 unsigned : 1;
803 struct
805 unsigned CPSCH : 4;
806 unsigned : 4;
808 } __CPSCON1bits_t;
810 extern __at(0x001F) volatile __CPSCON1bits_t CPSCON1bits;
812 #define _CPSCH0 0x01
813 #define _CPSCH1 0x02
814 #define _CPSCH2 0x04
815 #define _CPSCH3 0x08
817 //==============================================================================
820 //==============================================================================
821 // TRISA Bits
823 extern __at(0x008C) __sfr TRISA;
825 typedef struct
827 unsigned TRISA0 : 1;
828 unsigned TRISA1 : 1;
829 unsigned TRISA2 : 1;
830 unsigned TRISA3 : 1;
831 unsigned TRISA4 : 1;
832 unsigned TRISA5 : 1;
833 unsigned TRISA6 : 1;
834 unsigned TRISA7 : 1;
835 } __TRISAbits_t;
837 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
839 #define _TRISA0 0x01
840 #define _TRISA1 0x02
841 #define _TRISA2 0x04
842 #define _TRISA3 0x08
843 #define _TRISA4 0x10
844 #define _TRISA5 0x20
845 #define _TRISA6 0x40
846 #define _TRISA7 0x80
848 //==============================================================================
851 //==============================================================================
852 // TRISB Bits
854 extern __at(0x008D) __sfr TRISB;
856 typedef struct
858 unsigned TRISB0 : 1;
859 unsigned TRISB1 : 1;
860 unsigned TRISB2 : 1;
861 unsigned TRISB3 : 1;
862 unsigned TRISB4 : 1;
863 unsigned TRISB5 : 1;
864 unsigned TRISB6 : 1;
865 unsigned TRISB7 : 1;
866 } __TRISBbits_t;
868 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
870 #define _TRISB0 0x01
871 #define _TRISB1 0x02
872 #define _TRISB2 0x04
873 #define _TRISB3 0x08
874 #define _TRISB4 0x10
875 #define _TRISB5 0x20
876 #define _TRISB6 0x40
877 #define _TRISB7 0x80
879 //==============================================================================
882 //==============================================================================
883 // TRISC Bits
885 extern __at(0x008E) __sfr TRISC;
887 typedef struct
889 unsigned TRISC0 : 1;
890 unsigned TRISC1 : 1;
891 unsigned TRISC2 : 1;
892 unsigned TRISC3 : 1;
893 unsigned TRISC4 : 1;
894 unsigned TRISC5 : 1;
895 unsigned TRISC6 : 1;
896 unsigned TRISC7 : 1;
897 } __TRISCbits_t;
899 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
901 #define _TRISC0 0x01
902 #define _TRISC1 0x02
903 #define _TRISC2 0x04
904 #define _TRISC3 0x08
905 #define _TRISC4 0x10
906 #define _TRISC5 0x20
907 #define _TRISC6 0x40
908 #define _TRISC7 0x80
910 //==============================================================================
913 //==============================================================================
914 // TRISD Bits
916 extern __at(0x008F) __sfr TRISD;
918 typedef struct
920 unsigned TRISD0 : 1;
921 unsigned TRISD1 : 1;
922 unsigned TRISD2 : 1;
923 unsigned TRISD3 : 1;
924 unsigned TRISD4 : 1;
925 unsigned TRISD5 : 1;
926 unsigned TRISD6 : 1;
927 unsigned TRISD7 : 1;
928 } __TRISDbits_t;
930 extern __at(0x008F) volatile __TRISDbits_t TRISDbits;
932 #define _TRISD0 0x01
933 #define _TRISD1 0x02
934 #define _TRISD2 0x04
935 #define _TRISD3 0x08
936 #define _TRISD4 0x10
937 #define _TRISD5 0x20
938 #define _TRISD6 0x40
939 #define _TRISD7 0x80
941 //==============================================================================
944 //==============================================================================
945 // TRISE Bits
947 extern __at(0x0090) __sfr TRISE;
949 typedef union
951 struct
953 unsigned TRISE0 : 1;
954 unsigned TRISE1 : 1;
955 unsigned TRISE2 : 1;
956 unsigned TRISE3 : 1;
957 unsigned : 1;
958 unsigned : 1;
959 unsigned : 1;
960 unsigned : 1;
963 struct
965 unsigned TRISE : 4;
966 unsigned : 4;
968 } __TRISEbits_t;
970 extern __at(0x0090) volatile __TRISEbits_t TRISEbits;
972 #define _TRISE0 0x01
973 #define _TRISE1 0x02
974 #define _TRISE2 0x04
975 #define _TRISE3 0x08
977 //==============================================================================
980 //==============================================================================
981 // PIE1 Bits
983 extern __at(0x0091) __sfr PIE1;
985 typedef struct
987 unsigned TMR1IE : 1;
988 unsigned TMR2IE : 1;
989 unsigned CCP1IE : 1;
990 unsigned SSPIE : 1;
991 unsigned TXIE : 1;
992 unsigned RCIE : 1;
993 unsigned ADIE : 1;
994 unsigned TMR1GIE : 1;
995 } __PIE1bits_t;
997 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
999 #define _TMR1IE 0x01
1000 #define _TMR2IE 0x02
1001 #define _CCP1IE 0x04
1002 #define _SSPIE 0x08
1003 #define _TXIE 0x10
1004 #define _RCIE 0x20
1005 #define _ADIE 0x40
1006 #define _TMR1GIE 0x80
1008 //==============================================================================
1011 //==============================================================================
1012 // PIE2 Bits
1014 extern __at(0x0092) __sfr PIE2;
1016 typedef struct
1018 unsigned CCP2IE : 1;
1019 unsigned : 1;
1020 unsigned LCDIE : 1;
1021 unsigned BCLIE : 1;
1022 unsigned EEIE : 1;
1023 unsigned C1IE : 1;
1024 unsigned C2IE : 1;
1025 unsigned OSFIE : 1;
1026 } __PIE2bits_t;
1028 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
1030 #define _CCP2IE 0x01
1031 #define _LCDIE 0x04
1032 #define _BCLIE 0x08
1033 #define _EEIE 0x10
1034 #define _C1IE 0x20
1035 #define _C2IE 0x40
1036 #define _OSFIE 0x80
1038 //==============================================================================
1041 //==============================================================================
1042 // PIE3 Bits
1044 extern __at(0x0093) __sfr PIE3;
1046 typedef struct
1048 unsigned : 1;
1049 unsigned TMR4IE : 1;
1050 unsigned : 1;
1051 unsigned TMR6IE : 1;
1052 unsigned CCP3IE : 1;
1053 unsigned CCP4IE : 1;
1054 unsigned CCP5IE : 1;
1055 unsigned : 1;
1056 } __PIE3bits_t;
1058 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
1060 #define _TMR4IE 0x02
1061 #define _TMR6IE 0x08
1062 #define _CCP3IE 0x10
1063 #define _CCP4IE 0x20
1064 #define _CCP5IE 0x40
1066 //==============================================================================
1069 //==============================================================================
1070 // OPTION_REG Bits
1072 extern __at(0x0095) __sfr OPTION_REG;
1074 typedef union
1076 struct
1078 unsigned PS0 : 1;
1079 unsigned PS1 : 1;
1080 unsigned PS2 : 1;
1081 unsigned PSA : 1;
1082 unsigned TMR0SE : 1;
1083 unsigned TMR0CS : 1;
1084 unsigned INTEDG : 1;
1085 unsigned NOT_WPUEN : 1;
1088 struct
1090 unsigned : 1;
1091 unsigned : 1;
1092 unsigned : 1;
1093 unsigned : 1;
1094 unsigned T0SE : 1;
1095 unsigned T0CS : 1;
1096 unsigned : 1;
1097 unsigned : 1;
1100 struct
1102 unsigned PS : 3;
1103 unsigned : 5;
1105 } __OPTION_REGbits_t;
1107 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
1109 #define _PS0 0x01
1110 #define _PS1 0x02
1111 #define _PS2 0x04
1112 #define _PSA 0x08
1113 #define _TMR0SE 0x10
1114 #define _T0SE 0x10
1115 #define _TMR0CS 0x20
1116 #define _T0CS 0x20
1117 #define _INTEDG 0x40
1118 #define _NOT_WPUEN 0x80
1120 //==============================================================================
1123 //==============================================================================
1124 // PCON Bits
1126 extern __at(0x0096) __sfr PCON;
1128 typedef struct
1130 unsigned NOT_BOR : 1;
1131 unsigned NOT_POR : 1;
1132 unsigned NOT_RI : 1;
1133 unsigned NOT_RMCLR : 1;
1134 unsigned : 1;
1135 unsigned : 1;
1136 unsigned STKUNF : 1;
1137 unsigned STKOVF : 1;
1138 } __PCONbits_t;
1140 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1142 #define _NOT_BOR 0x01
1143 #define _NOT_POR 0x02
1144 #define _NOT_RI 0x04
1145 #define _NOT_RMCLR 0x08
1146 #define _STKUNF 0x40
1147 #define _STKOVF 0x80
1149 //==============================================================================
1152 //==============================================================================
1153 // WDTCON Bits
1155 extern __at(0x0097) __sfr WDTCON;
1157 typedef union
1159 struct
1161 unsigned SWDTEN : 1;
1162 unsigned WDTPS0 : 1;
1163 unsigned WDTPS1 : 1;
1164 unsigned WDTPS2 : 1;
1165 unsigned WDTPS3 : 1;
1166 unsigned WDTPS4 : 1;
1167 unsigned : 1;
1168 unsigned : 1;
1171 struct
1173 unsigned : 1;
1174 unsigned WDTPS : 5;
1175 unsigned : 2;
1177 } __WDTCONbits_t;
1179 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1181 #define _SWDTEN 0x01
1182 #define _WDTPS0 0x02
1183 #define _WDTPS1 0x04
1184 #define _WDTPS2 0x08
1185 #define _WDTPS3 0x10
1186 #define _WDTPS4 0x20
1188 //==============================================================================
1191 //==============================================================================
1192 // OSCTUNE Bits
1194 extern __at(0x0098) __sfr OSCTUNE;
1196 typedef union
1198 struct
1200 unsigned TUN0 : 1;
1201 unsigned TUN1 : 1;
1202 unsigned TUN2 : 1;
1203 unsigned TUN3 : 1;
1204 unsigned TUN4 : 1;
1205 unsigned TUN5 : 1;
1206 unsigned : 1;
1207 unsigned : 1;
1210 struct
1212 unsigned TUN : 6;
1213 unsigned : 2;
1215 } __OSCTUNEbits_t;
1217 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1219 #define _TUN0 0x01
1220 #define _TUN1 0x02
1221 #define _TUN2 0x04
1222 #define _TUN3 0x08
1223 #define _TUN4 0x10
1224 #define _TUN5 0x20
1226 //==============================================================================
1229 //==============================================================================
1230 // OSCCON Bits
1232 extern __at(0x0099) __sfr OSCCON;
1234 typedef union
1236 struct
1238 unsigned SCS0 : 1;
1239 unsigned SCS1 : 1;
1240 unsigned : 1;
1241 unsigned IRCF0 : 1;
1242 unsigned IRCF1 : 1;
1243 unsigned IRCF2 : 1;
1244 unsigned IRCF3 : 1;
1245 unsigned SPLLEN : 1;
1248 struct
1250 unsigned SCS : 2;
1251 unsigned : 6;
1254 struct
1256 unsigned : 3;
1257 unsigned IRCF : 4;
1258 unsigned : 1;
1260 } __OSCCONbits_t;
1262 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1264 #define _SCS0 0x01
1265 #define _SCS1 0x02
1266 #define _IRCF0 0x08
1267 #define _IRCF1 0x10
1268 #define _IRCF2 0x20
1269 #define _IRCF3 0x40
1270 #define _SPLLEN 0x80
1272 //==============================================================================
1275 //==============================================================================
1276 // OSCSTAT Bits
1278 extern __at(0x009A) __sfr OSCSTAT;
1280 typedef struct
1282 unsigned HFIOFS : 1;
1283 unsigned LFIOFR : 1;
1284 unsigned MFIOFR : 1;
1285 unsigned HFIOFL : 1;
1286 unsigned HFIOFR : 1;
1287 unsigned OSTS : 1;
1288 unsigned PLLR : 1;
1289 unsigned T1OSCR : 1;
1290 } __OSCSTATbits_t;
1292 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1294 #define _HFIOFS 0x01
1295 #define _LFIOFR 0x02
1296 #define _MFIOFR 0x04
1297 #define _HFIOFL 0x08
1298 #define _HFIOFR 0x10
1299 #define _OSTS 0x20
1300 #define _PLLR 0x40
1301 #define _T1OSCR 0x80
1303 //==============================================================================
1305 extern __at(0x009B) __sfr ADRES;
1306 extern __at(0x009B) __sfr ADRESL;
1307 extern __at(0x009C) __sfr ADRESH;
1309 //==============================================================================
1310 // ADCON0 Bits
1312 extern __at(0x009D) __sfr ADCON0;
1314 typedef union
1316 struct
1318 unsigned ADON : 1;
1319 unsigned GO_NOT_DONE : 1;
1320 unsigned CHS0 : 1;
1321 unsigned CHS1 : 1;
1322 unsigned CHS2 : 1;
1323 unsigned CHS3 : 1;
1324 unsigned CHS4 : 1;
1325 unsigned : 1;
1328 struct
1330 unsigned : 1;
1331 unsigned ADGO : 1;
1332 unsigned : 1;
1333 unsigned : 1;
1334 unsigned : 1;
1335 unsigned : 1;
1336 unsigned : 1;
1337 unsigned : 1;
1340 struct
1342 unsigned : 1;
1343 unsigned GO : 1;
1344 unsigned : 1;
1345 unsigned : 1;
1346 unsigned : 1;
1347 unsigned : 1;
1348 unsigned : 1;
1349 unsigned : 1;
1352 struct
1354 unsigned : 1;
1355 unsigned NOT_DONE : 1;
1356 unsigned : 1;
1357 unsigned : 1;
1358 unsigned : 1;
1359 unsigned : 1;
1360 unsigned : 1;
1361 unsigned : 1;
1364 struct
1366 unsigned : 2;
1367 unsigned CHS : 5;
1368 unsigned : 1;
1370 } __ADCON0bits_t;
1372 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1374 #define _ADON 0x01
1375 #define _GO_NOT_DONE 0x02
1376 #define _ADGO 0x02
1377 #define _GO 0x02
1378 #define _NOT_DONE 0x02
1379 #define _CHS0 0x04
1380 #define _CHS1 0x08
1381 #define _CHS2 0x10
1382 #define _CHS3 0x20
1383 #define _CHS4 0x40
1385 //==============================================================================
1388 //==============================================================================
1389 // ADCON1 Bits
1391 extern __at(0x009E) __sfr ADCON1;
1393 typedef union
1395 struct
1397 unsigned ADPREF0 : 1;
1398 unsigned ADPREF1 : 1;
1399 unsigned ADNREF : 1;
1400 unsigned : 1;
1401 unsigned ADCS0 : 1;
1402 unsigned ADCS1 : 1;
1403 unsigned ADCS2 : 1;
1404 unsigned ADFM : 1;
1407 struct
1409 unsigned ADPREF : 2;
1410 unsigned : 6;
1413 struct
1415 unsigned : 4;
1416 unsigned ADCS : 3;
1417 unsigned : 1;
1419 } __ADCON1bits_t;
1421 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1423 #define _ADPREF0 0x01
1424 #define _ADPREF1 0x02
1425 #define _ADNREF 0x04
1426 #define _ADCS0 0x10
1427 #define _ADCS1 0x20
1428 #define _ADCS2 0x40
1429 #define _ADFM 0x80
1431 //==============================================================================
1434 //==============================================================================
1435 // LATA Bits
1437 extern __at(0x010C) __sfr LATA;
1439 typedef struct
1441 unsigned LATA0 : 1;
1442 unsigned LATA1 : 1;
1443 unsigned LATA2 : 1;
1444 unsigned LATA3 : 1;
1445 unsigned LATA4 : 1;
1446 unsigned LATA5 : 1;
1447 unsigned LATA6 : 1;
1448 unsigned LATA7 : 1;
1449 } __LATAbits_t;
1451 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1453 #define _LATA0 0x01
1454 #define _LATA1 0x02
1455 #define _LATA2 0x04
1456 #define _LATA3 0x08
1457 #define _LATA4 0x10
1458 #define _LATA5 0x20
1459 #define _LATA6 0x40
1460 #define _LATA7 0x80
1462 //==============================================================================
1465 //==============================================================================
1466 // LATB Bits
1468 extern __at(0x010D) __sfr LATB;
1470 typedef struct
1472 unsigned LATB0 : 1;
1473 unsigned LATB1 : 1;
1474 unsigned LATB2 : 1;
1475 unsigned LATB3 : 1;
1476 unsigned LATB4 : 1;
1477 unsigned LATB5 : 1;
1478 unsigned LATB6 : 1;
1479 unsigned LATB7 : 1;
1480 } __LATBbits_t;
1482 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1484 #define _LATB0 0x01
1485 #define _LATB1 0x02
1486 #define _LATB2 0x04
1487 #define _LATB3 0x08
1488 #define _LATB4 0x10
1489 #define _LATB5 0x20
1490 #define _LATB6 0x40
1491 #define _LATB7 0x80
1493 //==============================================================================
1496 //==============================================================================
1497 // LATC Bits
1499 extern __at(0x010E) __sfr LATC;
1501 typedef struct
1503 unsigned LATC0 : 1;
1504 unsigned LATC1 : 1;
1505 unsigned LATC2 : 1;
1506 unsigned LATC3 : 1;
1507 unsigned LATC4 : 1;
1508 unsigned LATC5 : 1;
1509 unsigned LATC6 : 1;
1510 unsigned LATC7 : 1;
1511 } __LATCbits_t;
1513 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1515 #define _LATC0 0x01
1516 #define _LATC1 0x02
1517 #define _LATC2 0x04
1518 #define _LATC3 0x08
1519 #define _LATC4 0x10
1520 #define _LATC5 0x20
1521 #define _LATC6 0x40
1522 #define _LATC7 0x80
1524 //==============================================================================
1527 //==============================================================================
1528 // LATD Bits
1530 extern __at(0x010F) __sfr LATD;
1532 typedef struct
1534 unsigned LATD0 : 1;
1535 unsigned LATD1 : 1;
1536 unsigned LATD2 : 1;
1537 unsigned LATD3 : 1;
1538 unsigned LATD4 : 1;
1539 unsigned LATD5 : 1;
1540 unsigned LATD6 : 1;
1541 unsigned LATD7 : 1;
1542 } __LATDbits_t;
1544 extern __at(0x010F) volatile __LATDbits_t LATDbits;
1546 #define _LATD0 0x01
1547 #define _LATD1 0x02
1548 #define _LATD2 0x04
1549 #define _LATD3 0x08
1550 #define _LATD4 0x10
1551 #define _LATD5 0x20
1552 #define _LATD6 0x40
1553 #define _LATD7 0x80
1555 //==============================================================================
1558 //==============================================================================
1559 // LATE Bits
1561 extern __at(0x0110) __sfr LATE;
1563 typedef union
1565 struct
1567 unsigned LATE0 : 1;
1568 unsigned LATE1 : 1;
1569 unsigned LATE2 : 1;
1570 unsigned LATE3 : 1;
1571 unsigned : 1;
1572 unsigned : 1;
1573 unsigned : 1;
1574 unsigned : 1;
1577 struct
1579 unsigned LATE : 4;
1580 unsigned : 4;
1582 } __LATEbits_t;
1584 extern __at(0x0110) volatile __LATEbits_t LATEbits;
1586 #define _LATE0 0x01
1587 #define _LATE1 0x02
1588 #define _LATE2 0x04
1589 #define _LATE3 0x08
1591 //==============================================================================
1594 //==============================================================================
1595 // CM1CON0 Bits
1597 extern __at(0x0111) __sfr CM1CON0;
1599 typedef struct
1601 unsigned C1SYNC : 1;
1602 unsigned C1HYS : 1;
1603 unsigned C1SP : 1;
1604 unsigned : 1;
1605 unsigned C1POL : 1;
1606 unsigned C1OE : 1;
1607 unsigned C1OUT : 1;
1608 unsigned C1ON : 1;
1609 } __CM1CON0bits_t;
1611 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1613 #define _C1SYNC 0x01
1614 #define _C1HYS 0x02
1615 #define _C1SP 0x04
1616 #define _C1POL 0x10
1617 #define _C1OE 0x20
1618 #define _C1OUT 0x40
1619 #define _C1ON 0x80
1621 //==============================================================================
1624 //==============================================================================
1625 // CM1CON1 Bits
1627 extern __at(0x0112) __sfr CM1CON1;
1629 typedef union
1631 struct
1633 unsigned C1NCH0 : 1;
1634 unsigned C1NCH1 : 1;
1635 unsigned : 1;
1636 unsigned : 1;
1637 unsigned C1PCH0 : 1;
1638 unsigned C1PCH1 : 1;
1639 unsigned C1INTN : 1;
1640 unsigned C1INTP : 1;
1643 struct
1645 unsigned C1NCH : 2;
1646 unsigned : 6;
1649 struct
1651 unsigned : 4;
1652 unsigned C1PCH : 2;
1653 unsigned : 2;
1655 } __CM1CON1bits_t;
1657 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1659 #define _C1NCH0 0x01
1660 #define _C1NCH1 0x02
1661 #define _C1PCH0 0x10
1662 #define _C1PCH1 0x20
1663 #define _C1INTN 0x40
1664 #define _C1INTP 0x80
1666 //==============================================================================
1669 //==============================================================================
1670 // CM2CON0 Bits
1672 extern __at(0x0113) __sfr CM2CON0;
1674 typedef struct
1676 unsigned C2SYNC : 1;
1677 unsigned C2HYS : 1;
1678 unsigned C2SP : 1;
1679 unsigned : 1;
1680 unsigned C2POL : 1;
1681 unsigned C2OE : 1;
1682 unsigned C2OUT : 1;
1683 unsigned C2ON : 1;
1684 } __CM2CON0bits_t;
1686 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
1688 #define _C2SYNC 0x01
1689 #define _C2HYS 0x02
1690 #define _C2SP 0x04
1691 #define _C2POL 0x10
1692 #define _C2OE 0x20
1693 #define _C2OUT 0x40
1694 #define _C2ON 0x80
1696 //==============================================================================
1699 //==============================================================================
1700 // CM2CON1 Bits
1702 extern __at(0x0114) __sfr CM2CON1;
1704 typedef union
1706 struct
1708 unsigned C2NCH0 : 1;
1709 unsigned C2NCH1 : 1;
1710 unsigned : 1;
1711 unsigned : 1;
1712 unsigned C2PCH0 : 1;
1713 unsigned C2PCH1 : 1;
1714 unsigned C2INTN : 1;
1715 unsigned C2INTP : 1;
1718 struct
1720 unsigned C2NCH : 2;
1721 unsigned : 6;
1724 struct
1726 unsigned : 4;
1727 unsigned C2PCH : 2;
1728 unsigned : 2;
1730 } __CM2CON1bits_t;
1732 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
1734 #define _C2NCH0 0x01
1735 #define _C2NCH1 0x02
1736 #define _C2PCH0 0x10
1737 #define _C2PCH1 0x20
1738 #define _C2INTN 0x40
1739 #define _C2INTP 0x80
1741 //==============================================================================
1744 //==============================================================================
1745 // CMOUT Bits
1747 extern __at(0x0115) __sfr CMOUT;
1749 typedef struct
1751 unsigned MC1OUT : 1;
1752 unsigned MC2OUT : 1;
1753 unsigned : 1;
1754 unsigned : 1;
1755 unsigned : 1;
1756 unsigned : 1;
1757 unsigned : 1;
1758 unsigned : 1;
1759 } __CMOUTbits_t;
1761 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1763 #define _MC1OUT 0x01
1764 #define _MC2OUT 0x02
1766 //==============================================================================
1769 //==============================================================================
1770 // BORCON Bits
1772 extern __at(0x0116) __sfr BORCON;
1774 typedef struct
1776 unsigned BORRDY : 1;
1777 unsigned : 1;
1778 unsigned : 1;
1779 unsigned : 1;
1780 unsigned : 1;
1781 unsigned : 1;
1782 unsigned : 1;
1783 unsigned SBOREN : 1;
1784 } __BORCONbits_t;
1786 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1788 #define _BORRDY 0x01
1789 #define _SBOREN 0x80
1791 //==============================================================================
1794 //==============================================================================
1795 // FVRCON Bits
1797 extern __at(0x0117) __sfr FVRCON;
1799 typedef union
1801 struct
1803 unsigned ADFVR0 : 1;
1804 unsigned ADFVR1 : 1;
1805 unsigned CDAFVR0 : 1;
1806 unsigned CDAFVR1 : 1;
1807 unsigned TSRNG : 1;
1808 unsigned TSEN : 1;
1809 unsigned FVRRDY : 1;
1810 unsigned FVREN : 1;
1813 struct
1815 unsigned ADFVR : 2;
1816 unsigned : 6;
1819 struct
1821 unsigned : 2;
1822 unsigned CDAFVR : 2;
1823 unsigned : 4;
1825 } __FVRCONbits_t;
1827 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1829 #define _ADFVR0 0x01
1830 #define _ADFVR1 0x02
1831 #define _CDAFVR0 0x04
1832 #define _CDAFVR1 0x08
1833 #define _TSRNG 0x10
1834 #define _TSEN 0x20
1835 #define _FVRRDY 0x40
1836 #define _FVREN 0x80
1838 //==============================================================================
1841 //==============================================================================
1842 // DACCON0 Bits
1844 extern __at(0x0118) __sfr DACCON0;
1846 typedef union
1848 struct
1850 unsigned DACNSS : 1;
1851 unsigned : 1;
1852 unsigned DACPSS0 : 1;
1853 unsigned DACPSS1 : 1;
1854 unsigned : 1;
1855 unsigned DACOE : 1;
1856 unsigned DACLPS : 1;
1857 unsigned DACEN : 1;
1860 struct
1862 unsigned : 2;
1863 unsigned DACPSS : 2;
1864 unsigned : 4;
1866 } __DACCON0bits_t;
1868 extern __at(0x0118) volatile __DACCON0bits_t DACCON0bits;
1870 #define _DACNSS 0x01
1871 #define _DACPSS0 0x04
1872 #define _DACPSS1 0x08
1873 #define _DACOE 0x20
1874 #define _DACLPS 0x40
1875 #define _DACEN 0x80
1877 //==============================================================================
1880 //==============================================================================
1881 // DACCON1 Bits
1883 extern __at(0x0119) __sfr DACCON1;
1885 typedef union
1887 struct
1889 unsigned DACR0 : 1;
1890 unsigned DACR1 : 1;
1891 unsigned DACR2 : 1;
1892 unsigned DACR3 : 1;
1893 unsigned DACR4 : 1;
1894 unsigned : 1;
1895 unsigned : 1;
1896 unsigned : 1;
1899 struct
1901 unsigned DACR : 5;
1902 unsigned : 3;
1904 } __DACCON1bits_t;
1906 extern __at(0x0119) volatile __DACCON1bits_t DACCON1bits;
1908 #define _DACR0 0x01
1909 #define _DACR1 0x02
1910 #define _DACR2 0x04
1911 #define _DACR3 0x08
1912 #define _DACR4 0x10
1914 //==============================================================================
1917 //==============================================================================
1918 // SRCON0 Bits
1920 extern __at(0x011A) __sfr SRCON0;
1922 typedef union
1924 struct
1926 unsigned SRPR : 1;
1927 unsigned SRPS : 1;
1928 unsigned SRNQEN : 1;
1929 unsigned SRQEN : 1;
1930 unsigned SRCLK0 : 1;
1931 unsigned SRCLK1 : 1;
1932 unsigned SRCLK2 : 1;
1933 unsigned SRLEN : 1;
1936 struct
1938 unsigned : 4;
1939 unsigned SRCLK : 3;
1940 unsigned : 1;
1942 } __SRCON0bits_t;
1944 extern __at(0x011A) volatile __SRCON0bits_t SRCON0bits;
1946 #define _SRPR 0x01
1947 #define _SRPS 0x02
1948 #define _SRNQEN 0x04
1949 #define _SRQEN 0x08
1950 #define _SRCLK0 0x10
1951 #define _SRCLK1 0x20
1952 #define _SRCLK2 0x40
1953 #define _SRLEN 0x80
1955 //==============================================================================
1958 //==============================================================================
1959 // SRCON1 Bits
1961 extern __at(0x011B) __sfr SRCON1;
1963 typedef struct
1965 unsigned SRRC1E : 1;
1966 unsigned SRRC2E : 1;
1967 unsigned SRRCKE : 1;
1968 unsigned SRRPE : 1;
1969 unsigned SRSC1E : 1;
1970 unsigned SRSC2E : 1;
1971 unsigned SRSCKE : 1;
1972 unsigned SRSPE : 1;
1973 } __SRCON1bits_t;
1975 extern __at(0x011B) volatile __SRCON1bits_t SRCON1bits;
1977 #define _SRRC1E 0x01
1978 #define _SRRC2E 0x02
1979 #define _SRRCKE 0x04
1980 #define _SRRPE 0x08
1981 #define _SRSC1E 0x10
1982 #define _SRSC2E 0x20
1983 #define _SRSCKE 0x40
1984 #define _SRSPE 0x80
1986 //==============================================================================
1989 //==============================================================================
1990 // APFCON Bits
1992 extern __at(0x011D) __sfr APFCON;
1994 typedef struct
1996 unsigned CCP2SEL : 1;
1997 unsigned SSSEL : 1;
1998 unsigned C2OUTSEL : 1;
1999 unsigned SRNQSEL : 1;
2000 unsigned P2BSEL : 1;
2001 unsigned T1GSEL : 1;
2002 unsigned CCP3SEL : 1;
2003 unsigned : 1;
2004 } __APFCONbits_t;
2006 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
2008 #define _CCP2SEL 0x01
2009 #define _SSSEL 0x02
2010 #define _C2OUTSEL 0x04
2011 #define _SRNQSEL 0x08
2012 #define _P2BSEL 0x10
2013 #define _T1GSEL 0x20
2014 #define _CCP3SEL 0x40
2016 //==============================================================================
2019 //==============================================================================
2020 // ANSELA Bits
2022 extern __at(0x018C) __sfr ANSELA;
2024 typedef union
2026 struct
2028 unsigned ANSA0 : 1;
2029 unsigned ANSA1 : 1;
2030 unsigned ANSA2 : 1;
2031 unsigned ANSA3 : 1;
2032 unsigned ANSA4 : 1;
2033 unsigned ANSA5 : 1;
2034 unsigned : 1;
2035 unsigned : 1;
2038 struct
2040 unsigned ANSA : 6;
2041 unsigned : 2;
2043 } __ANSELAbits_t;
2045 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
2047 #define _ANSA0 0x01
2048 #define _ANSA1 0x02
2049 #define _ANSA2 0x04
2050 #define _ANSA3 0x08
2051 #define _ANSA4 0x10
2052 #define _ANSA5 0x20
2054 //==============================================================================
2057 //==============================================================================
2058 // ANSELB Bits
2060 extern __at(0x018D) __sfr ANSELB;
2062 typedef union
2064 struct
2066 unsigned ANSB0 : 1;
2067 unsigned ANSB1 : 1;
2068 unsigned ANSB2 : 1;
2069 unsigned ANSB3 : 1;
2070 unsigned ANSB4 : 1;
2071 unsigned ANSB5 : 1;
2072 unsigned : 1;
2073 unsigned : 1;
2076 struct
2078 unsigned ANSB : 6;
2079 unsigned : 2;
2081 } __ANSELBbits_t;
2083 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
2085 #define _ANSB0 0x01
2086 #define _ANSB1 0x02
2087 #define _ANSB2 0x04
2088 #define _ANSB3 0x08
2089 #define _ANSB4 0x10
2090 #define _ANSB5 0x20
2092 //==============================================================================
2095 //==============================================================================
2096 // ANSELD Bits
2098 extern __at(0x018F) __sfr ANSELD;
2100 typedef struct
2102 unsigned ANSD0 : 1;
2103 unsigned ANSD1 : 1;
2104 unsigned ANSD2 : 1;
2105 unsigned ANSD3 : 1;
2106 unsigned ANSD4 : 1;
2107 unsigned ANSD5 : 1;
2108 unsigned ANSD6 : 1;
2109 unsigned ANSD7 : 1;
2110 } __ANSELDbits_t;
2112 extern __at(0x018F) volatile __ANSELDbits_t ANSELDbits;
2114 #define _ANSD0 0x01
2115 #define _ANSD1 0x02
2116 #define _ANSD2 0x04
2117 #define _ANSD3 0x08
2118 #define _ANSD4 0x10
2119 #define _ANSD5 0x20
2120 #define _ANSD6 0x40
2121 #define _ANSD7 0x80
2123 //==============================================================================
2126 //==============================================================================
2127 // ANSELE Bits
2129 extern __at(0x0190) __sfr ANSELE;
2131 typedef union
2133 struct
2135 unsigned ANSE0 : 1;
2136 unsigned ANSE1 : 1;
2137 unsigned ANSE2 : 1;
2138 unsigned : 1;
2139 unsigned : 1;
2140 unsigned : 1;
2141 unsigned : 1;
2142 unsigned : 1;
2145 struct
2147 unsigned ANSE : 3;
2148 unsigned : 5;
2150 } __ANSELEbits_t;
2152 extern __at(0x0190) volatile __ANSELEbits_t ANSELEbits;
2154 #define _ANSE0 0x01
2155 #define _ANSE1 0x02
2156 #define _ANSE2 0x04
2158 //==============================================================================
2160 extern __at(0x0191) __sfr EEADR;
2161 extern __at(0x0191) __sfr EEADRL;
2162 extern __at(0x0192) __sfr EEADRH;
2163 extern __at(0x0193) __sfr EEDAT;
2164 extern __at(0x0193) __sfr EEDATL;
2165 extern __at(0x0194) __sfr EEDATH;
2167 //==============================================================================
2168 // EECON1 Bits
2170 extern __at(0x0195) __sfr EECON1;
2172 typedef struct
2174 unsigned RD : 1;
2175 unsigned WR : 1;
2176 unsigned WREN : 1;
2177 unsigned WRERR : 1;
2178 unsigned FREE : 1;
2179 unsigned LWLO : 1;
2180 unsigned CFGS : 1;
2181 unsigned EEPGD : 1;
2182 } __EECON1bits_t;
2184 extern __at(0x0195) volatile __EECON1bits_t EECON1bits;
2186 #define _RD 0x01
2187 #define _WR 0x02
2188 #define _WREN 0x04
2189 #define _WRERR 0x08
2190 #define _FREE 0x10
2191 #define _LWLO 0x20
2192 #define _CFGS 0x40
2193 #define _EEPGD 0x80
2195 //==============================================================================
2197 extern __at(0x0196) __sfr EECON2;
2198 extern __at(0x0199) __sfr RCREG;
2199 extern __at(0x019A) __sfr TXREG;
2200 extern __at(0x019B) __sfr SP1BRG;
2201 extern __at(0x019B) __sfr SP1BRGL;
2202 extern __at(0x019B) __sfr SPBRG;
2203 extern __at(0x019B) __sfr SPBRGL;
2204 extern __at(0x019C) __sfr SP1BRGH;
2205 extern __at(0x019C) __sfr SPBRGH;
2207 //==============================================================================
2208 // RCSTA Bits
2210 extern __at(0x019D) __sfr RCSTA;
2212 typedef struct
2214 unsigned RX9D : 1;
2215 unsigned OERR : 1;
2216 unsigned FERR : 1;
2217 unsigned ADDEN : 1;
2218 unsigned CREN : 1;
2219 unsigned SREN : 1;
2220 unsigned RX9 : 1;
2221 unsigned SPEN : 1;
2222 } __RCSTAbits_t;
2224 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
2226 #define _RX9D 0x01
2227 #define _OERR 0x02
2228 #define _FERR 0x04
2229 #define _ADDEN 0x08
2230 #define _CREN 0x10
2231 #define _SREN 0x20
2232 #define _RX9 0x40
2233 #define _SPEN 0x80
2235 //==============================================================================
2238 //==============================================================================
2239 // TXSTA Bits
2241 extern __at(0x019E) __sfr TXSTA;
2243 typedef struct
2245 unsigned TX9D : 1;
2246 unsigned TRMT : 1;
2247 unsigned BRGH : 1;
2248 unsigned SENDB : 1;
2249 unsigned SYNC : 1;
2250 unsigned TXEN : 1;
2251 unsigned TX9 : 1;
2252 unsigned CSRC : 1;
2253 } __TXSTAbits_t;
2255 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2257 #define _TX9D 0x01
2258 #define _TRMT 0x02
2259 #define _BRGH 0x04
2260 #define _SENDB 0x08
2261 #define _SYNC 0x10
2262 #define _TXEN 0x20
2263 #define _TX9 0x40
2264 #define _CSRC 0x80
2266 //==============================================================================
2269 //==============================================================================
2270 // BAUDCON Bits
2272 extern __at(0x019F) __sfr BAUDCON;
2274 typedef struct
2276 unsigned ABDEN : 1;
2277 unsigned WUE : 1;
2278 unsigned : 1;
2279 unsigned BRG16 : 1;
2280 unsigned SCKP : 1;
2281 unsigned : 1;
2282 unsigned RCIDL : 1;
2283 unsigned ABDOVF : 1;
2284 } __BAUDCONbits_t;
2286 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2288 #define _ABDEN 0x01
2289 #define _WUE 0x02
2290 #define _BRG16 0x08
2291 #define _SCKP 0x10
2292 #define _RCIDL 0x40
2293 #define _ABDOVF 0x80
2295 //==============================================================================
2298 //==============================================================================
2299 // WPUB Bits
2301 extern __at(0x020D) __sfr WPUB;
2303 typedef struct
2305 unsigned WPUB0 : 1;
2306 unsigned WPUB1 : 1;
2307 unsigned WPUB2 : 1;
2308 unsigned WPUB3 : 1;
2309 unsigned WPUB4 : 1;
2310 unsigned WPUB5 : 1;
2311 unsigned WPUB6 : 1;
2312 unsigned WPUB7 : 1;
2313 } __WPUBbits_t;
2315 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2317 #define _WPUB0 0x01
2318 #define _WPUB1 0x02
2319 #define _WPUB2 0x04
2320 #define _WPUB3 0x08
2321 #define _WPUB4 0x10
2322 #define _WPUB5 0x20
2323 #define _WPUB6 0x40
2324 #define _WPUB7 0x80
2326 //==============================================================================
2329 //==============================================================================
2330 // WPUE Bits
2332 extern __at(0x0210) __sfr WPUE;
2334 typedef struct
2336 unsigned : 1;
2337 unsigned : 1;
2338 unsigned : 1;
2339 unsigned WPUE3 : 1;
2340 unsigned : 1;
2341 unsigned : 1;
2342 unsigned : 1;
2343 unsigned : 1;
2344 } __WPUEbits_t;
2346 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
2348 #define _WPUE3 0x08
2350 //==============================================================================
2352 extern __at(0x0211) __sfr SSPBUF;
2353 extern __at(0x0212) __sfr SSPADD;
2354 extern __at(0x0213) __sfr SSPMSK;
2356 //==============================================================================
2357 // SSPSTAT Bits
2359 extern __at(0x0214) __sfr SSPSTAT;
2361 typedef struct
2363 unsigned BF : 1;
2364 unsigned UA : 1;
2365 unsigned R_NOT_W : 1;
2366 unsigned S : 1;
2367 unsigned P : 1;
2368 unsigned D_NOT_A : 1;
2369 unsigned CKE : 1;
2370 unsigned SMP : 1;
2371 } __SSPSTATbits_t;
2373 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2375 #define _BF 0x01
2376 #define _UA 0x02
2377 #define _R_NOT_W 0x04
2378 #define _S 0x08
2379 #define _P 0x10
2380 #define _D_NOT_A 0x20
2381 #define _CKE 0x40
2382 #define _SMP 0x80
2384 //==============================================================================
2387 //==============================================================================
2388 // SSPCON Bits
2390 extern __at(0x0215) __sfr SSPCON;
2392 typedef union
2394 struct
2396 unsigned SSPM0 : 1;
2397 unsigned SSPM1 : 1;
2398 unsigned SSPM2 : 1;
2399 unsigned SSPM3 : 1;
2400 unsigned CKP : 1;
2401 unsigned SSPEN : 1;
2402 unsigned SSPOV : 1;
2403 unsigned WCOL : 1;
2406 struct
2408 unsigned SSPM : 4;
2409 unsigned : 4;
2411 } __SSPCONbits_t;
2413 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2415 #define _SSPM0 0x01
2416 #define _SSPM1 0x02
2417 #define _SSPM2 0x04
2418 #define _SSPM3 0x08
2419 #define _CKP 0x10
2420 #define _SSPEN 0x20
2421 #define _SSPOV 0x40
2422 #define _WCOL 0x80
2424 //==============================================================================
2427 //==============================================================================
2428 // SSPCON1 Bits
2430 extern __at(0x0215) __sfr SSPCON1;
2432 typedef union
2434 struct
2436 unsigned SSPM0 : 1;
2437 unsigned SSPM1 : 1;
2438 unsigned SSPM2 : 1;
2439 unsigned SSPM3 : 1;
2440 unsigned CKP : 1;
2441 unsigned SSPEN : 1;
2442 unsigned SSPOV : 1;
2443 unsigned WCOL : 1;
2446 struct
2448 unsigned SSPM : 4;
2449 unsigned : 4;
2451 } __SSPCON1bits_t;
2453 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2455 #define _SSPCON1_SSPM0 0x01
2456 #define _SSPCON1_SSPM1 0x02
2457 #define _SSPCON1_SSPM2 0x04
2458 #define _SSPCON1_SSPM3 0x08
2459 #define _SSPCON1_CKP 0x10
2460 #define _SSPCON1_SSPEN 0x20
2461 #define _SSPCON1_SSPOV 0x40
2462 #define _SSPCON1_WCOL 0x80
2464 //==============================================================================
2467 //==============================================================================
2468 // SSPCON2 Bits
2470 extern __at(0x0216) __sfr SSPCON2;
2472 typedef struct
2474 unsigned SEN : 1;
2475 unsigned RSEN : 1;
2476 unsigned PEN : 1;
2477 unsigned RCEN : 1;
2478 unsigned ACKEN : 1;
2479 unsigned ACKDT : 1;
2480 unsigned ACKSTAT : 1;
2481 unsigned GCEN : 1;
2482 } __SSPCON2bits_t;
2484 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2486 #define _SEN 0x01
2487 #define _RSEN 0x02
2488 #define _PEN 0x04
2489 #define _RCEN 0x08
2490 #define _ACKEN 0x10
2491 #define _ACKDT 0x20
2492 #define _ACKSTAT 0x40
2493 #define _GCEN 0x80
2495 //==============================================================================
2498 //==============================================================================
2499 // SSPCON3 Bits
2501 extern __at(0x0217) __sfr SSPCON3;
2503 typedef struct
2505 unsigned DHEN : 1;
2506 unsigned AHEN : 1;
2507 unsigned SBCDE : 1;
2508 unsigned SDAHT : 1;
2509 unsigned BOEN : 1;
2510 unsigned SCIE : 1;
2511 unsigned PCIE : 1;
2512 unsigned ACKTIM : 1;
2513 } __SSPCON3bits_t;
2515 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2517 #define _DHEN 0x01
2518 #define _AHEN 0x02
2519 #define _SBCDE 0x04
2520 #define _SDAHT 0x08
2521 #define _BOEN 0x10
2522 #define _SCIE 0x20
2523 #define _PCIE 0x40
2524 #define _ACKTIM 0x80
2526 //==============================================================================
2528 extern __at(0x0291) __sfr CCPR1;
2529 extern __at(0x0291) __sfr CCPR1L;
2530 extern __at(0x0292) __sfr CCPR1H;
2532 //==============================================================================
2533 // CCP1CON Bits
2535 extern __at(0x0293) __sfr CCP1CON;
2537 typedef union
2539 struct
2541 unsigned CCP1M0 : 1;
2542 unsigned CCP1M1 : 1;
2543 unsigned CCP1M2 : 1;
2544 unsigned CCP1M3 : 1;
2545 unsigned DC1B0 : 1;
2546 unsigned DC1B1 : 1;
2547 unsigned P1M0 : 1;
2548 unsigned P1M1 : 1;
2551 struct
2553 unsigned CCP1M : 4;
2554 unsigned : 4;
2557 struct
2559 unsigned : 4;
2560 unsigned DC1B : 2;
2561 unsigned : 2;
2564 struct
2566 unsigned : 6;
2567 unsigned P1M : 2;
2569 } __CCP1CONbits_t;
2571 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2573 #define _CCP1M0 0x01
2574 #define _CCP1M1 0x02
2575 #define _CCP1M2 0x04
2576 #define _CCP1M3 0x08
2577 #define _DC1B0 0x10
2578 #define _DC1B1 0x20
2579 #define _P1M0 0x40
2580 #define _P1M1 0x80
2582 //==============================================================================
2585 //==============================================================================
2586 // PWM1CON Bits
2588 extern __at(0x0294) __sfr PWM1CON;
2590 typedef union
2592 struct
2594 unsigned P1DC0 : 1;
2595 unsigned P1DC1 : 1;
2596 unsigned P1DC2 : 1;
2597 unsigned P1DC3 : 1;
2598 unsigned P1DC4 : 1;
2599 unsigned P1DC5 : 1;
2600 unsigned P1DC6 : 1;
2601 unsigned P1RSEN : 1;
2604 struct
2606 unsigned P1DC : 7;
2607 unsigned : 1;
2609 } __PWM1CONbits_t;
2611 extern __at(0x0294) volatile __PWM1CONbits_t PWM1CONbits;
2613 #define _P1DC0 0x01
2614 #define _P1DC1 0x02
2615 #define _P1DC2 0x04
2616 #define _P1DC3 0x08
2617 #define _P1DC4 0x10
2618 #define _P1DC5 0x20
2619 #define _P1DC6 0x40
2620 #define _P1RSEN 0x80
2622 //==============================================================================
2625 //==============================================================================
2626 // CCP1AS Bits
2628 extern __at(0x0295) __sfr CCP1AS;
2630 typedef union
2632 struct
2634 unsigned PSS1BD0 : 1;
2635 unsigned PSS1BD1 : 1;
2636 unsigned PSS1AC0 : 1;
2637 unsigned PSS1AC1 : 1;
2638 unsigned CCP1AS0 : 1;
2639 unsigned CCP1AS1 : 1;
2640 unsigned CCP1AS2 : 1;
2641 unsigned CCP1ASE : 1;
2644 struct
2646 unsigned PSS1BD : 2;
2647 unsigned : 6;
2650 struct
2652 unsigned : 2;
2653 unsigned PSS1AC : 2;
2654 unsigned : 4;
2657 struct
2659 unsigned : 4;
2660 unsigned CCP1AS : 3;
2661 unsigned : 1;
2663 } __CCP1ASbits_t;
2665 extern __at(0x0295) volatile __CCP1ASbits_t CCP1ASbits;
2667 #define _PSS1BD0 0x01
2668 #define _PSS1BD1 0x02
2669 #define _PSS1AC0 0x04
2670 #define _PSS1AC1 0x08
2671 #define _CCP1AS0 0x10
2672 #define _CCP1AS1 0x20
2673 #define _CCP1AS2 0x40
2674 #define _CCP1ASE 0x80
2676 //==============================================================================
2679 //==============================================================================
2680 // ECCP1AS Bits
2682 extern __at(0x0295) __sfr ECCP1AS;
2684 typedef union
2686 struct
2688 unsigned PSS1BD0 : 1;
2689 unsigned PSS1BD1 : 1;
2690 unsigned PSS1AC0 : 1;
2691 unsigned PSS1AC1 : 1;
2692 unsigned CCP1AS0 : 1;
2693 unsigned CCP1AS1 : 1;
2694 unsigned CCP1AS2 : 1;
2695 unsigned CCP1ASE : 1;
2698 struct
2700 unsigned PSS1BD : 2;
2701 unsigned : 6;
2704 struct
2706 unsigned : 2;
2707 unsigned PSS1AC : 2;
2708 unsigned : 4;
2711 struct
2713 unsigned : 4;
2714 unsigned CCP1AS : 3;
2715 unsigned : 1;
2717 } __ECCP1ASbits_t;
2719 extern __at(0x0295) volatile __ECCP1ASbits_t ECCP1ASbits;
2721 #define _ECCP1AS_PSS1BD0 0x01
2722 #define _ECCP1AS_PSS1BD1 0x02
2723 #define _ECCP1AS_PSS1AC0 0x04
2724 #define _ECCP1AS_PSS1AC1 0x08
2725 #define _ECCP1AS_CCP1AS0 0x10
2726 #define _ECCP1AS_CCP1AS1 0x20
2727 #define _ECCP1AS_CCP1AS2 0x40
2728 #define _ECCP1AS_CCP1ASE 0x80
2730 //==============================================================================
2733 //==============================================================================
2734 // PSTR1CON Bits
2736 extern __at(0x0296) __sfr PSTR1CON;
2738 typedef struct
2740 unsigned STR1A : 1;
2741 unsigned STR1B : 1;
2742 unsigned STR1C : 1;
2743 unsigned STR1D : 1;
2744 unsigned STR1SYNC : 1;
2745 unsigned : 1;
2746 unsigned : 1;
2747 unsigned : 1;
2748 } __PSTR1CONbits_t;
2750 extern __at(0x0296) volatile __PSTR1CONbits_t PSTR1CONbits;
2752 #define _STR1A 0x01
2753 #define _STR1B 0x02
2754 #define _STR1C 0x04
2755 #define _STR1D 0x08
2756 #define _STR1SYNC 0x10
2758 //==============================================================================
2760 extern __at(0x0298) __sfr CCPR2;
2761 extern __at(0x0298) __sfr CCPR2L;
2762 extern __at(0x0299) __sfr CCPR2H;
2764 //==============================================================================
2765 // CCP2CON Bits
2767 extern __at(0x029A) __sfr CCP2CON;
2769 typedef union
2771 struct
2773 unsigned CCP2M0 : 1;
2774 unsigned CCP2M1 : 1;
2775 unsigned CCP2M2 : 1;
2776 unsigned CCP2M3 : 1;
2777 unsigned DC2B0 : 1;
2778 unsigned DC2B1 : 1;
2779 unsigned P2M0 : 1;
2780 unsigned P2M1 : 1;
2783 struct
2785 unsigned CCP2M : 4;
2786 unsigned : 4;
2789 struct
2791 unsigned : 4;
2792 unsigned DC2B : 2;
2793 unsigned : 2;
2796 struct
2798 unsigned : 6;
2799 unsigned P2M : 2;
2801 } __CCP2CONbits_t;
2803 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2805 #define _CCP2M0 0x01
2806 #define _CCP2M1 0x02
2807 #define _CCP2M2 0x04
2808 #define _CCP2M3 0x08
2809 #define _DC2B0 0x10
2810 #define _DC2B1 0x20
2811 #define _P2M0 0x40
2812 #define _P2M1 0x80
2814 //==============================================================================
2817 //==============================================================================
2818 // PWM2CON Bits
2820 extern __at(0x029B) __sfr PWM2CON;
2822 typedef union
2824 struct
2826 unsigned P2DC0 : 1;
2827 unsigned P2DC1 : 1;
2828 unsigned P2DC2 : 1;
2829 unsigned P2DC3 : 1;
2830 unsigned P2DC4 : 1;
2831 unsigned P2DC5 : 1;
2832 unsigned P2DC6 : 1;
2833 unsigned P2RSEN : 1;
2836 struct
2838 unsigned P2DC : 7;
2839 unsigned : 1;
2841 } __PWM2CONbits_t;
2843 extern __at(0x029B) volatile __PWM2CONbits_t PWM2CONbits;
2845 #define _P2DC0 0x01
2846 #define _P2DC1 0x02
2847 #define _P2DC2 0x04
2848 #define _P2DC3 0x08
2849 #define _P2DC4 0x10
2850 #define _P2DC5 0x20
2851 #define _P2DC6 0x40
2852 #define _P2RSEN 0x80
2854 //==============================================================================
2857 //==============================================================================
2858 // CCP2AS Bits
2860 extern __at(0x029C) __sfr CCP2AS;
2862 typedef union
2864 struct
2866 unsigned PSS2BD0 : 1;
2867 unsigned PSS2BD1 : 1;
2868 unsigned PSS2AC0 : 1;
2869 unsigned PSS2AC1 : 1;
2870 unsigned CCP2AS0 : 1;
2871 unsigned CCP2AS1 : 1;
2872 unsigned CCP2AS2 : 1;
2873 unsigned CCP2ASE : 1;
2876 struct
2878 unsigned PSS2BD : 2;
2879 unsigned : 6;
2882 struct
2884 unsigned : 2;
2885 unsigned PSS2AC : 2;
2886 unsigned : 4;
2889 struct
2891 unsigned : 4;
2892 unsigned CCP2AS : 3;
2893 unsigned : 1;
2895 } __CCP2ASbits_t;
2897 extern __at(0x029C) volatile __CCP2ASbits_t CCP2ASbits;
2899 #define _PSS2BD0 0x01
2900 #define _PSS2BD1 0x02
2901 #define _PSS2AC0 0x04
2902 #define _PSS2AC1 0x08
2903 #define _CCP2AS0 0x10
2904 #define _CCP2AS1 0x20
2905 #define _CCP2AS2 0x40
2906 #define _CCP2ASE 0x80
2908 //==============================================================================
2911 //==============================================================================
2912 // ECCP2AS Bits
2914 extern __at(0x029C) __sfr ECCP2AS;
2916 typedef union
2918 struct
2920 unsigned PSS2BD0 : 1;
2921 unsigned PSS2BD1 : 1;
2922 unsigned PSS2AC0 : 1;
2923 unsigned PSS2AC1 : 1;
2924 unsigned CCP2AS0 : 1;
2925 unsigned CCP2AS1 : 1;
2926 unsigned CCP2AS2 : 1;
2927 unsigned CCP2ASE : 1;
2930 struct
2932 unsigned PSS2BD : 2;
2933 unsigned : 6;
2936 struct
2938 unsigned : 2;
2939 unsigned PSS2AC : 2;
2940 unsigned : 4;
2943 struct
2945 unsigned : 4;
2946 unsigned CCP2AS : 3;
2947 unsigned : 1;
2949 } __ECCP2ASbits_t;
2951 extern __at(0x029C) volatile __ECCP2ASbits_t ECCP2ASbits;
2953 #define _ECCP2AS_PSS2BD0 0x01
2954 #define _ECCP2AS_PSS2BD1 0x02
2955 #define _ECCP2AS_PSS2AC0 0x04
2956 #define _ECCP2AS_PSS2AC1 0x08
2957 #define _ECCP2AS_CCP2AS0 0x10
2958 #define _ECCP2AS_CCP2AS1 0x20
2959 #define _ECCP2AS_CCP2AS2 0x40
2960 #define _ECCP2AS_CCP2ASE 0x80
2962 //==============================================================================
2965 //==============================================================================
2966 // PSTR2CON Bits
2968 extern __at(0x029D) __sfr PSTR2CON;
2970 typedef struct
2972 unsigned STR2A : 1;
2973 unsigned STR2B : 1;
2974 unsigned STR2C : 1;
2975 unsigned STR2D : 1;
2976 unsigned STR2SYNC : 1;
2977 unsigned : 1;
2978 unsigned : 1;
2979 unsigned : 1;
2980 } __PSTR2CONbits_t;
2982 extern __at(0x029D) volatile __PSTR2CONbits_t PSTR2CONbits;
2984 #define _STR2A 0x01
2985 #define _STR2B 0x02
2986 #define _STR2C 0x04
2987 #define _STR2D 0x08
2988 #define _STR2SYNC 0x10
2990 //==============================================================================
2993 //==============================================================================
2994 // CCPTMRS0 Bits
2996 extern __at(0x029E) __sfr CCPTMRS0;
2998 typedef union
3000 struct
3002 unsigned C1TSEL0 : 1;
3003 unsigned C1TSEL1 : 1;
3004 unsigned C2TSEL0 : 1;
3005 unsigned C2TSEL1 : 1;
3006 unsigned C3TSEL0 : 1;
3007 unsigned C3TSEL1 : 1;
3008 unsigned C4TSEL0 : 1;
3009 unsigned C4TSEL1 : 1;
3012 struct
3014 unsigned C1TSEL : 2;
3015 unsigned : 6;
3018 struct
3020 unsigned : 2;
3021 unsigned C2TSEL : 2;
3022 unsigned : 4;
3025 struct
3027 unsigned : 4;
3028 unsigned C3TSEL : 2;
3029 unsigned : 2;
3032 struct
3034 unsigned : 6;
3035 unsigned C4TSEL : 2;
3037 } __CCPTMRS0bits_t;
3039 extern __at(0x029E) volatile __CCPTMRS0bits_t CCPTMRS0bits;
3041 #define _C1TSEL0 0x01
3042 #define _C1TSEL1 0x02
3043 #define _C2TSEL0 0x04
3044 #define _C2TSEL1 0x08
3045 #define _C3TSEL0 0x10
3046 #define _C3TSEL1 0x20
3047 #define _C4TSEL0 0x40
3048 #define _C4TSEL1 0x80
3050 //==============================================================================
3053 //==============================================================================
3054 // CCPTMRS1 Bits
3056 extern __at(0x029F) __sfr CCPTMRS1;
3058 typedef union
3060 struct
3062 unsigned C5TSEL0 : 1;
3063 unsigned C5TSEL1 : 1;
3064 unsigned : 1;
3065 unsigned : 1;
3066 unsigned : 1;
3067 unsigned : 1;
3068 unsigned : 1;
3069 unsigned : 1;
3072 struct
3074 unsigned C5TSEL : 2;
3075 unsigned : 6;
3077 } __CCPTMRS1bits_t;
3079 extern __at(0x029F) volatile __CCPTMRS1bits_t CCPTMRS1bits;
3081 #define _C5TSEL0 0x01
3082 #define _C5TSEL1 0x02
3084 //==============================================================================
3086 extern __at(0x0311) __sfr CCPR3;
3087 extern __at(0x0311) __sfr CCPR3L;
3088 extern __at(0x0312) __sfr CCPR3H;
3090 //==============================================================================
3091 // CCP3CON Bits
3093 extern __at(0x0313) __sfr CCP3CON;
3095 typedef union
3097 struct
3099 unsigned CCP3M0 : 1;
3100 unsigned CCP3M1 : 1;
3101 unsigned CCP3M2 : 1;
3102 unsigned CCP3M3 : 1;
3103 unsigned DC3B0 : 1;
3104 unsigned DC3B1 : 1;
3105 unsigned P3M0 : 1;
3106 unsigned P3M1 : 1;
3109 struct
3111 unsigned CCP3M : 4;
3112 unsigned : 4;
3115 struct
3117 unsigned : 4;
3118 unsigned DC3B : 2;
3119 unsigned : 2;
3122 struct
3124 unsigned : 6;
3125 unsigned P3M : 2;
3127 } __CCP3CONbits_t;
3129 extern __at(0x0313) volatile __CCP3CONbits_t CCP3CONbits;
3131 #define _CCP3M0 0x01
3132 #define _CCP3M1 0x02
3133 #define _CCP3M2 0x04
3134 #define _CCP3M3 0x08
3135 #define _DC3B0 0x10
3136 #define _DC3B1 0x20
3137 #define _P3M0 0x40
3138 #define _P3M1 0x80
3140 //==============================================================================
3143 //==============================================================================
3144 // PWM3CON Bits
3146 extern __at(0x0314) __sfr PWM3CON;
3148 typedef union
3150 struct
3152 unsigned P3DC0 : 1;
3153 unsigned P3DC1 : 1;
3154 unsigned P3DC2 : 1;
3155 unsigned P3DC3 : 1;
3156 unsigned P3DC4 : 1;
3157 unsigned P3DC5 : 1;
3158 unsigned P3DC6 : 1;
3159 unsigned P3RSEN : 1;
3162 struct
3164 unsigned P3DC : 7;
3165 unsigned : 1;
3167 } __PWM3CONbits_t;
3169 extern __at(0x0314) volatile __PWM3CONbits_t PWM3CONbits;
3171 #define _P3DC0 0x01
3172 #define _P3DC1 0x02
3173 #define _P3DC2 0x04
3174 #define _P3DC3 0x08
3175 #define _P3DC4 0x10
3176 #define _P3DC5 0x20
3177 #define _P3DC6 0x40
3178 #define _P3RSEN 0x80
3180 //==============================================================================
3183 //==============================================================================
3184 // CCP3AS Bits
3186 extern __at(0x0315) __sfr CCP3AS;
3188 typedef union
3190 struct
3192 unsigned PSS3BD0 : 1;
3193 unsigned PSS3BD1 : 1;
3194 unsigned PSS3AC0 : 1;
3195 unsigned PSS3AC1 : 1;
3196 unsigned CCP3AS0 : 1;
3197 unsigned CCP3AS1 : 1;
3198 unsigned CCP3AS2 : 1;
3199 unsigned CCP3ASE : 1;
3202 struct
3204 unsigned PSS3BD : 2;
3205 unsigned : 6;
3208 struct
3210 unsigned : 2;
3211 unsigned PSS3AC : 2;
3212 unsigned : 4;
3215 struct
3217 unsigned : 4;
3218 unsigned CCP3AS : 3;
3219 unsigned : 1;
3221 } __CCP3ASbits_t;
3223 extern __at(0x0315) volatile __CCP3ASbits_t CCP3ASbits;
3225 #define _PSS3BD0 0x01
3226 #define _PSS3BD1 0x02
3227 #define _PSS3AC0 0x04
3228 #define _PSS3AC1 0x08
3229 #define _CCP3AS0 0x10
3230 #define _CCP3AS1 0x20
3231 #define _CCP3AS2 0x40
3232 #define _CCP3ASE 0x80
3234 //==============================================================================
3237 //==============================================================================
3238 // ECCP3AS Bits
3240 extern __at(0x0315) __sfr ECCP3AS;
3242 typedef union
3244 struct
3246 unsigned PSS3BD0 : 1;
3247 unsigned PSS3BD1 : 1;
3248 unsigned PSS3AC0 : 1;
3249 unsigned PSS3AC1 : 1;
3250 unsigned CCP3AS0 : 1;
3251 unsigned CCP3AS1 : 1;
3252 unsigned CCP3AS2 : 1;
3253 unsigned CCP3ASE : 1;
3256 struct
3258 unsigned PSS3BD : 2;
3259 unsigned : 6;
3262 struct
3264 unsigned : 2;
3265 unsigned PSS3AC : 2;
3266 unsigned : 4;
3269 struct
3271 unsigned : 4;
3272 unsigned CCP3AS : 3;
3273 unsigned : 1;
3275 } __ECCP3ASbits_t;
3277 extern __at(0x0315) volatile __ECCP3ASbits_t ECCP3ASbits;
3279 #define _ECCP3AS_PSS3BD0 0x01
3280 #define _ECCP3AS_PSS3BD1 0x02
3281 #define _ECCP3AS_PSS3AC0 0x04
3282 #define _ECCP3AS_PSS3AC1 0x08
3283 #define _ECCP3AS_CCP3AS0 0x10
3284 #define _ECCP3AS_CCP3AS1 0x20
3285 #define _ECCP3AS_CCP3AS2 0x40
3286 #define _ECCP3AS_CCP3ASE 0x80
3288 //==============================================================================
3291 //==============================================================================
3292 // PSTR3CON Bits
3294 extern __at(0x0316) __sfr PSTR3CON;
3296 typedef struct
3298 unsigned STR3A : 1;
3299 unsigned STR3B : 1;
3300 unsigned STR3C : 1;
3301 unsigned STR3D : 1;
3302 unsigned STR3SYNC : 1;
3303 unsigned : 1;
3304 unsigned : 1;
3305 unsigned : 1;
3306 } __PSTR3CONbits_t;
3308 extern __at(0x0316) volatile __PSTR3CONbits_t PSTR3CONbits;
3310 #define _STR3A 0x01
3311 #define _STR3B 0x02
3312 #define _STR3C 0x04
3313 #define _STR3D 0x08
3314 #define _STR3SYNC 0x10
3316 //==============================================================================
3318 extern __at(0x0318) __sfr CCPR4;
3319 extern __at(0x0318) __sfr CCPR4L;
3320 extern __at(0x0319) __sfr CCPR4H;
3322 //==============================================================================
3323 // CCP4CON Bits
3325 extern __at(0x031A) __sfr CCP4CON;
3327 typedef union
3329 struct
3331 unsigned CCP4M0 : 1;
3332 unsigned CCP4M1 : 1;
3333 unsigned CCP4M2 : 1;
3334 unsigned CCP4M3 : 1;
3335 unsigned DC4B0 : 1;
3336 unsigned DC4B1 : 1;
3337 unsigned : 1;
3338 unsigned : 1;
3341 struct
3343 unsigned CCP4M : 4;
3344 unsigned : 4;
3347 struct
3349 unsigned : 4;
3350 unsigned DC4B : 2;
3351 unsigned : 2;
3353 } __CCP4CONbits_t;
3355 extern __at(0x031A) volatile __CCP4CONbits_t CCP4CONbits;
3357 #define _CCP4M0 0x01
3358 #define _CCP4M1 0x02
3359 #define _CCP4M2 0x04
3360 #define _CCP4M3 0x08
3361 #define _DC4B0 0x10
3362 #define _DC4B1 0x20
3364 //==============================================================================
3366 extern __at(0x031C) __sfr CCPR5;
3367 extern __at(0x031C) __sfr CCPR5L;
3368 extern __at(0x031D) __sfr CCPR5H;
3370 //==============================================================================
3371 // CCP5CON Bits
3373 extern __at(0x031E) __sfr CCP5CON;
3375 typedef union
3377 struct
3379 unsigned CCP5M0 : 1;
3380 unsigned CCP5M1 : 1;
3381 unsigned CCP5M2 : 1;
3382 unsigned CCP5M3 : 1;
3383 unsigned DC5B0 : 1;
3384 unsigned DC5B1 : 1;
3385 unsigned : 1;
3386 unsigned : 1;
3389 struct
3391 unsigned CCP5M : 4;
3392 unsigned : 4;
3395 struct
3397 unsigned : 4;
3398 unsigned DC5B : 2;
3399 unsigned : 2;
3401 } __CCP5CONbits_t;
3403 extern __at(0x031E) volatile __CCP5CONbits_t CCP5CONbits;
3405 #define _CCP5M0 0x01
3406 #define _CCP5M1 0x02
3407 #define _CCP5M2 0x04
3408 #define _CCP5M3 0x08
3409 #define _DC5B0 0x10
3410 #define _DC5B1 0x20
3412 //==============================================================================
3415 //==============================================================================
3416 // IOCBP Bits
3418 extern __at(0x0394) __sfr IOCBP;
3420 typedef struct
3422 unsigned IOCBP0 : 1;
3423 unsigned IOCBP1 : 1;
3424 unsigned IOCBP2 : 1;
3425 unsigned IOCBP3 : 1;
3426 unsigned IOCBP4 : 1;
3427 unsigned IOCBP5 : 1;
3428 unsigned IOCBP6 : 1;
3429 unsigned IOCBP7 : 1;
3430 } __IOCBPbits_t;
3432 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
3434 #define _IOCBP0 0x01
3435 #define _IOCBP1 0x02
3436 #define _IOCBP2 0x04
3437 #define _IOCBP3 0x08
3438 #define _IOCBP4 0x10
3439 #define _IOCBP5 0x20
3440 #define _IOCBP6 0x40
3441 #define _IOCBP7 0x80
3443 //==============================================================================
3446 //==============================================================================
3447 // IOCBN Bits
3449 extern __at(0x0395) __sfr IOCBN;
3451 typedef struct
3453 unsigned IOCBN0 : 1;
3454 unsigned IOCBN1 : 1;
3455 unsigned IOCBN2 : 1;
3456 unsigned IOCBN3 : 1;
3457 unsigned IOCBN4 : 1;
3458 unsigned IOCBN5 : 1;
3459 unsigned IOCBN6 : 1;
3460 unsigned IOCBN7 : 1;
3461 } __IOCBNbits_t;
3463 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
3465 #define _IOCBN0 0x01
3466 #define _IOCBN1 0x02
3467 #define _IOCBN2 0x04
3468 #define _IOCBN3 0x08
3469 #define _IOCBN4 0x10
3470 #define _IOCBN5 0x20
3471 #define _IOCBN6 0x40
3472 #define _IOCBN7 0x80
3474 //==============================================================================
3477 //==============================================================================
3478 // IOCBF Bits
3480 extern __at(0x0396) __sfr IOCBF;
3482 typedef struct
3484 unsigned IOCBF0 : 1;
3485 unsigned IOCBF1 : 1;
3486 unsigned IOCBF2 : 1;
3487 unsigned IOCBF3 : 1;
3488 unsigned IOCBF4 : 1;
3489 unsigned IOCBF5 : 1;
3490 unsigned IOCBF6 : 1;
3491 unsigned IOCBF7 : 1;
3492 } __IOCBFbits_t;
3494 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3496 #define _IOCBF0 0x01
3497 #define _IOCBF1 0x02
3498 #define _IOCBF2 0x04
3499 #define _IOCBF3 0x08
3500 #define _IOCBF4 0x10
3501 #define _IOCBF5 0x20
3502 #define _IOCBF6 0x40
3503 #define _IOCBF7 0x80
3505 //==============================================================================
3507 extern __at(0x0415) __sfr TMR4;
3508 extern __at(0x0416) __sfr PR4;
3510 //==============================================================================
3511 // T4CON Bits
3513 extern __at(0x0417) __sfr T4CON;
3515 typedef union
3517 struct
3519 unsigned T4CKPS0 : 1;
3520 unsigned T4CKPS1 : 1;
3521 unsigned TMR4ON : 1;
3522 unsigned T4OUTPS0 : 1;
3523 unsigned T4OUTPS1 : 1;
3524 unsigned T4OUTPS2 : 1;
3525 unsigned T4OUTPS3 : 1;
3526 unsigned : 1;
3529 struct
3531 unsigned T4CKPS : 2;
3532 unsigned : 6;
3535 struct
3537 unsigned : 3;
3538 unsigned T4OUTPS : 4;
3539 unsigned : 1;
3541 } __T4CONbits_t;
3543 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
3545 #define _T4CKPS0 0x01
3546 #define _T4CKPS1 0x02
3547 #define _TMR4ON 0x04
3548 #define _T4OUTPS0 0x08
3549 #define _T4OUTPS1 0x10
3550 #define _T4OUTPS2 0x20
3551 #define _T4OUTPS3 0x40
3553 //==============================================================================
3555 extern __at(0x041C) __sfr TMR6;
3556 extern __at(0x041D) __sfr PR6;
3558 //==============================================================================
3559 // T6CON Bits
3561 extern __at(0x041E) __sfr T6CON;
3563 typedef union
3565 struct
3567 unsigned T6CKPS0 : 1;
3568 unsigned T6CKPS1 : 1;
3569 unsigned TMR6ON : 1;
3570 unsigned T6OUTPS0 : 1;
3571 unsigned T6OUTPS1 : 1;
3572 unsigned T6OUTPS2 : 1;
3573 unsigned T6OUTPS3 : 1;
3574 unsigned : 1;
3577 struct
3579 unsigned T6CKPS : 2;
3580 unsigned : 6;
3583 struct
3585 unsigned : 3;
3586 unsigned T6OUTPS : 4;
3587 unsigned : 1;
3589 } __T6CONbits_t;
3591 extern __at(0x041E) volatile __T6CONbits_t T6CONbits;
3593 #define _T6CKPS0 0x01
3594 #define _T6CKPS1 0x02
3595 #define _TMR6ON 0x04
3596 #define _T6OUTPS0 0x08
3597 #define _T6OUTPS1 0x10
3598 #define _T6OUTPS2 0x20
3599 #define _T6OUTPS3 0x40
3601 //==============================================================================
3604 //==============================================================================
3605 // LCDCON Bits
3607 extern __at(0x0791) __sfr LCDCON;
3609 typedef union
3611 struct
3613 unsigned LMUX0 : 1;
3614 unsigned LMUX1 : 1;
3615 unsigned CS0 : 1;
3616 unsigned CS1 : 1;
3617 unsigned : 1;
3618 unsigned WERR : 1;
3619 unsigned SLPEN : 1;
3620 unsigned LCDEN : 1;
3623 struct
3625 unsigned LMUX : 2;
3626 unsigned : 6;
3629 struct
3631 unsigned : 2;
3632 unsigned CS : 2;
3633 unsigned : 4;
3635 } __LCDCONbits_t;
3637 extern __at(0x0791) volatile __LCDCONbits_t LCDCONbits;
3639 #define _LMUX0 0x01
3640 #define _LMUX1 0x02
3641 #define _CS0 0x04
3642 #define _CS1 0x08
3643 #define _WERR 0x20
3644 #define _SLPEN 0x40
3645 #define _LCDEN 0x80
3647 //==============================================================================
3650 //==============================================================================
3651 // LCDPS Bits
3653 extern __at(0x0792) __sfr LCDPS;
3655 typedef union
3657 struct
3659 unsigned LP0 : 1;
3660 unsigned LP1 : 1;
3661 unsigned LP2 : 1;
3662 unsigned LP3 : 1;
3663 unsigned WA : 1;
3664 unsigned LCDA : 1;
3665 unsigned BIASMD : 1;
3666 unsigned WFT : 1;
3669 struct
3671 unsigned LP : 4;
3672 unsigned : 4;
3674 } __LCDPSbits_t;
3676 extern __at(0x0792) volatile __LCDPSbits_t LCDPSbits;
3678 #define _LP0 0x01
3679 #define _LP1 0x02
3680 #define _LP2 0x04
3681 #define _LP3 0x08
3682 #define _WA 0x10
3683 #define _LCDA 0x20
3684 #define _BIASMD 0x40
3685 #define _WFT 0x80
3687 //==============================================================================
3690 //==============================================================================
3691 // LCDREF Bits
3693 extern __at(0x0793) __sfr LCDREF;
3695 typedef struct
3697 unsigned : 1;
3698 unsigned VLCD1PE : 1;
3699 unsigned VLCD2PE : 1;
3700 unsigned VLCD3PE : 1;
3701 unsigned : 1;
3702 unsigned LCDIRI : 1;
3703 unsigned LCDIRS : 1;
3704 unsigned LCDIRE : 1;
3705 } __LCDREFbits_t;
3707 extern __at(0x0793) volatile __LCDREFbits_t LCDREFbits;
3709 #define _VLCD1PE 0x02
3710 #define _VLCD2PE 0x04
3711 #define _VLCD3PE 0x08
3712 #define _LCDIRI 0x20
3713 #define _LCDIRS 0x40
3714 #define _LCDIRE 0x80
3716 //==============================================================================
3719 //==============================================================================
3720 // LCDCST Bits
3722 extern __at(0x0794) __sfr LCDCST;
3724 typedef union
3726 struct
3728 unsigned LCDCST0 : 1;
3729 unsigned LCDCST1 : 1;
3730 unsigned LCDCST2 : 1;
3731 unsigned : 1;
3732 unsigned : 1;
3733 unsigned : 1;
3734 unsigned : 1;
3735 unsigned : 1;
3738 struct
3740 unsigned LCDCST : 3;
3741 unsigned : 5;
3743 } __LCDCSTbits_t;
3745 extern __at(0x0794) volatile __LCDCSTbits_t LCDCSTbits;
3747 #define _LCDCST0 0x01
3748 #define _LCDCST1 0x02
3749 #define _LCDCST2 0x04
3751 //==============================================================================
3754 //==============================================================================
3755 // LCDRL Bits
3757 extern __at(0x0795) __sfr LCDRL;
3759 typedef union
3761 struct
3763 unsigned LRLAT0 : 1;
3764 unsigned LRLAT1 : 1;
3765 unsigned LRLAT2 : 1;
3766 unsigned : 1;
3767 unsigned LRLBP0 : 1;
3768 unsigned LRLBP1 : 1;
3769 unsigned LRLAP0 : 1;
3770 unsigned LRLAP1 : 1;
3773 struct
3775 unsigned LRLAT : 3;
3776 unsigned : 5;
3779 struct
3781 unsigned : 4;
3782 unsigned LRLBP : 2;
3783 unsigned : 2;
3786 struct
3788 unsigned : 6;
3789 unsigned LRLAP : 2;
3791 } __LCDRLbits_t;
3793 extern __at(0x0795) volatile __LCDRLbits_t LCDRLbits;
3795 #define _LRLAT0 0x01
3796 #define _LRLAT1 0x02
3797 #define _LRLAT2 0x04
3798 #define _LRLBP0 0x10
3799 #define _LRLBP1 0x20
3800 #define _LRLAP0 0x40
3801 #define _LRLAP1 0x80
3803 //==============================================================================
3806 //==============================================================================
3807 // LCDSE0 Bits
3809 extern __at(0x0798) __sfr LCDSE0;
3811 typedef struct
3813 unsigned SE0 : 1;
3814 unsigned SE1 : 1;
3815 unsigned SE2 : 1;
3816 unsigned SE3 : 1;
3817 unsigned SE4 : 1;
3818 unsigned SE5 : 1;
3819 unsigned SE6 : 1;
3820 unsigned SE7 : 1;
3821 } __LCDSE0bits_t;
3823 extern __at(0x0798) volatile __LCDSE0bits_t LCDSE0bits;
3825 #define _SE0 0x01
3826 #define _SE1 0x02
3827 #define _SE2 0x04
3828 #define _SE3 0x08
3829 #define _SE4 0x10
3830 #define _SE5 0x20
3831 #define _SE6 0x40
3832 #define _SE7 0x80
3834 //==============================================================================
3837 //==============================================================================
3838 // LCDSE1 Bits
3840 extern __at(0x0799) __sfr LCDSE1;
3842 typedef struct
3844 unsigned SE8 : 1;
3845 unsigned SE9 : 1;
3846 unsigned SE10 : 1;
3847 unsigned SE11 : 1;
3848 unsigned SE12 : 1;
3849 unsigned SE13 : 1;
3850 unsigned SE14 : 1;
3851 unsigned SE15 : 1;
3852 } __LCDSE1bits_t;
3854 extern __at(0x0799) volatile __LCDSE1bits_t LCDSE1bits;
3856 #define _SE8 0x01
3857 #define _SE9 0x02
3858 #define _SE10 0x04
3859 #define _SE11 0x08
3860 #define _SE12 0x10
3861 #define _SE13 0x20
3862 #define _SE14 0x40
3863 #define _SE15 0x80
3865 //==============================================================================
3868 //==============================================================================
3869 // LCDSE2 Bits
3871 extern __at(0x079A) __sfr LCDSE2;
3873 typedef struct
3875 unsigned SE16 : 1;
3876 unsigned SE17 : 1;
3877 unsigned SE18 : 1;
3878 unsigned SE19 : 1;
3879 unsigned SE20 : 1;
3880 unsigned SE21 : 1;
3881 unsigned SE22 : 1;
3882 unsigned SE23 : 1;
3883 } __LCDSE2bits_t;
3885 extern __at(0x079A) volatile __LCDSE2bits_t LCDSE2bits;
3887 #define _SE16 0x01
3888 #define _SE17 0x02
3889 #define _SE18 0x04
3890 #define _SE19 0x08
3891 #define _SE20 0x10
3892 #define _SE21 0x20
3893 #define _SE22 0x40
3894 #define _SE23 0x80
3896 //==============================================================================
3899 //==============================================================================
3900 // LCDDATA0 Bits
3902 extern __at(0x07A0) __sfr LCDDATA0;
3904 typedef struct
3906 unsigned SEG0COM0 : 1;
3907 unsigned SEG1COM0 : 1;
3908 unsigned SEG2COM0 : 1;
3909 unsigned SEG3COM0 : 1;
3910 unsigned SEG4COM0 : 1;
3911 unsigned SEG5COM0 : 1;
3912 unsigned SEG6COM0 : 1;
3913 unsigned SEG7COM0 : 1;
3914 } __LCDDATA0bits_t;
3916 extern __at(0x07A0) volatile __LCDDATA0bits_t LCDDATA0bits;
3918 #define _SEG0COM0 0x01
3919 #define _SEG1COM0 0x02
3920 #define _SEG2COM0 0x04
3921 #define _SEG3COM0 0x08
3922 #define _SEG4COM0 0x10
3923 #define _SEG5COM0 0x20
3924 #define _SEG6COM0 0x40
3925 #define _SEG7COM0 0x80
3927 //==============================================================================
3930 //==============================================================================
3931 // LCDDATA1 Bits
3933 extern __at(0x07A1) __sfr LCDDATA1;
3935 typedef struct
3937 unsigned SEG8COM0 : 1;
3938 unsigned SEG9COM0 : 1;
3939 unsigned SEG10COM0 : 1;
3940 unsigned SEG11COM0 : 1;
3941 unsigned SEG12COM0 : 1;
3942 unsigned SEG13COM0 : 1;
3943 unsigned SEG14COM0 : 1;
3944 unsigned SEG15COM0 : 1;
3945 } __LCDDATA1bits_t;
3947 extern __at(0x07A1) volatile __LCDDATA1bits_t LCDDATA1bits;
3949 #define _SEG8COM0 0x01
3950 #define _SEG9COM0 0x02
3951 #define _SEG10COM0 0x04
3952 #define _SEG11COM0 0x08
3953 #define _SEG12COM0 0x10
3954 #define _SEG13COM0 0x20
3955 #define _SEG14COM0 0x40
3956 #define _SEG15COM0 0x80
3958 //==============================================================================
3961 //==============================================================================
3962 // LCDDATA2 Bits
3964 extern __at(0x07A2) __sfr LCDDATA2;
3966 typedef struct
3968 unsigned SEG16COM0 : 1;
3969 unsigned SEG17COM0 : 1;
3970 unsigned SEG18COM0 : 1;
3971 unsigned SEG19COM0 : 1;
3972 unsigned SEG20COM0 : 1;
3973 unsigned SEG21COM0 : 1;
3974 unsigned SEG22COM0 : 1;
3975 unsigned SEG23COM0 : 1;
3976 } __LCDDATA2bits_t;
3978 extern __at(0x07A2) volatile __LCDDATA2bits_t LCDDATA2bits;
3980 #define _SEG16COM0 0x01
3981 #define _SEG17COM0 0x02
3982 #define _SEG18COM0 0x04
3983 #define _SEG19COM0 0x08
3984 #define _SEG20COM0 0x10
3985 #define _SEG21COM0 0x20
3986 #define _SEG22COM0 0x40
3987 #define _SEG23COM0 0x80
3989 //==============================================================================
3992 //==============================================================================
3993 // LCDDATA3 Bits
3995 extern __at(0x07A3) __sfr LCDDATA3;
3997 typedef struct
3999 unsigned SEG0COM1 : 1;
4000 unsigned SEG1COM1 : 1;
4001 unsigned SEG2COM1 : 1;
4002 unsigned SEG3COM1 : 1;
4003 unsigned SEG4COM1 : 1;
4004 unsigned SEG5COM1 : 1;
4005 unsigned SEG6COM1 : 1;
4006 unsigned SEG7COM1 : 1;
4007 } __LCDDATA3bits_t;
4009 extern __at(0x07A3) volatile __LCDDATA3bits_t LCDDATA3bits;
4011 #define _SEG0COM1 0x01
4012 #define _SEG1COM1 0x02
4013 #define _SEG2COM1 0x04
4014 #define _SEG3COM1 0x08
4015 #define _SEG4COM1 0x10
4016 #define _SEG5COM1 0x20
4017 #define _SEG6COM1 0x40
4018 #define _SEG7COM1 0x80
4020 //==============================================================================
4023 //==============================================================================
4024 // LCDDATA4 Bits
4026 extern __at(0x07A4) __sfr LCDDATA4;
4028 typedef struct
4030 unsigned SEG8COM1 : 1;
4031 unsigned SEG9COM1 : 1;
4032 unsigned SEG10COM1 : 1;
4033 unsigned SEG11COM1 : 1;
4034 unsigned SEG12COM1 : 1;
4035 unsigned SEG13COM1 : 1;
4036 unsigned SEG14COM1 : 1;
4037 unsigned SEG15COM1 : 1;
4038 } __LCDDATA4bits_t;
4040 extern __at(0x07A4) volatile __LCDDATA4bits_t LCDDATA4bits;
4042 #define _SEG8COM1 0x01
4043 #define _SEG9COM1 0x02
4044 #define _SEG10COM1 0x04
4045 #define _SEG11COM1 0x08
4046 #define _SEG12COM1 0x10
4047 #define _SEG13COM1 0x20
4048 #define _SEG14COM1 0x40
4049 #define _SEG15COM1 0x80
4051 //==============================================================================
4054 //==============================================================================
4055 // LCDDATA5 Bits
4057 extern __at(0x07A5) __sfr LCDDATA5;
4059 typedef struct
4061 unsigned SEG16COM1 : 1;
4062 unsigned SEG17COM1 : 1;
4063 unsigned SEG18COM1 : 1;
4064 unsigned SEG19COM1 : 1;
4065 unsigned SEG20COM1 : 1;
4066 unsigned SEG21COM1 : 1;
4067 unsigned SEG22COM1 : 1;
4068 unsigned SEG23COM1 : 1;
4069 } __LCDDATA5bits_t;
4071 extern __at(0x07A5) volatile __LCDDATA5bits_t LCDDATA5bits;
4073 #define _SEG16COM1 0x01
4074 #define _SEG17COM1 0x02
4075 #define _SEG18COM1 0x04
4076 #define _SEG19COM1 0x08
4077 #define _SEG20COM1 0x10
4078 #define _SEG21COM1 0x20
4079 #define _SEG22COM1 0x40
4080 #define _SEG23COM1 0x80
4082 //==============================================================================
4085 //==============================================================================
4086 // LCDDATA6 Bits
4088 extern __at(0x07A6) __sfr LCDDATA6;
4090 typedef struct
4092 unsigned SEG0COM2 : 1;
4093 unsigned SEG1COM2 : 1;
4094 unsigned SEG2COM2 : 1;
4095 unsigned SEG3COM2 : 1;
4096 unsigned SEG4COM2 : 1;
4097 unsigned SEG5COM2 : 1;
4098 unsigned SEG6COM2 : 1;
4099 unsigned SEG7COM2 : 1;
4100 } __LCDDATA6bits_t;
4102 extern __at(0x07A6) volatile __LCDDATA6bits_t LCDDATA6bits;
4104 #define _SEG0COM2 0x01
4105 #define _SEG1COM2 0x02
4106 #define _SEG2COM2 0x04
4107 #define _SEG3COM2 0x08
4108 #define _SEG4COM2 0x10
4109 #define _SEG5COM2 0x20
4110 #define _SEG6COM2 0x40
4111 #define _SEG7COM2 0x80
4113 //==============================================================================
4116 //==============================================================================
4117 // LCDDATA7 Bits
4119 extern __at(0x07A7) __sfr LCDDATA7;
4121 typedef struct
4123 unsigned SEG8COM2 : 1;
4124 unsigned SEG9COM2 : 1;
4125 unsigned SEG10COM2 : 1;
4126 unsigned SEG11COM2 : 1;
4127 unsigned SEG12COM2 : 1;
4128 unsigned SEG13COM2 : 1;
4129 unsigned SEG14COM2 : 1;
4130 unsigned SEG15COM2 : 1;
4131 } __LCDDATA7bits_t;
4133 extern __at(0x07A7) volatile __LCDDATA7bits_t LCDDATA7bits;
4135 #define _SEG8COM2 0x01
4136 #define _SEG9COM2 0x02
4137 #define _SEG10COM2 0x04
4138 #define _SEG11COM2 0x08
4139 #define _SEG12COM2 0x10
4140 #define _SEG13COM2 0x20
4141 #define _SEG14COM2 0x40
4142 #define _SEG15COM2 0x80
4144 //==============================================================================
4147 //==============================================================================
4148 // LCDDATA8 Bits
4150 extern __at(0x07A8) __sfr LCDDATA8;
4152 typedef struct
4154 unsigned SEG16COM2 : 1;
4155 unsigned SEG17COM2 : 1;
4156 unsigned SEG18COM2 : 1;
4157 unsigned SEG19COM2 : 1;
4158 unsigned SEG20COM2 : 1;
4159 unsigned SEG21COM2 : 1;
4160 unsigned SEG22COM2 : 1;
4161 unsigned SEG23COM2 : 1;
4162 } __LCDDATA8bits_t;
4164 extern __at(0x07A8) volatile __LCDDATA8bits_t LCDDATA8bits;
4166 #define _SEG16COM2 0x01
4167 #define _SEG17COM2 0x02
4168 #define _SEG18COM2 0x04
4169 #define _SEG19COM2 0x08
4170 #define _SEG20COM2 0x10
4171 #define _SEG21COM2 0x20
4172 #define _SEG22COM2 0x40
4173 #define _SEG23COM2 0x80
4175 //==============================================================================
4178 //==============================================================================
4179 // LCDDATA9 Bits
4181 extern __at(0x07A9) __sfr LCDDATA9;
4183 typedef struct
4185 unsigned SEG0COM3 : 1;
4186 unsigned SEG1COM3 : 1;
4187 unsigned SEG2COM3 : 1;
4188 unsigned SEG3COM3 : 1;
4189 unsigned SEG4COM3 : 1;
4190 unsigned SEG5COM3 : 1;
4191 unsigned SEG6COM3 : 1;
4192 unsigned SEG7COM3 : 1;
4193 } __LCDDATA9bits_t;
4195 extern __at(0x07A9) volatile __LCDDATA9bits_t LCDDATA9bits;
4197 #define _SEG0COM3 0x01
4198 #define _SEG1COM3 0x02
4199 #define _SEG2COM3 0x04
4200 #define _SEG3COM3 0x08
4201 #define _SEG4COM3 0x10
4202 #define _SEG5COM3 0x20
4203 #define _SEG6COM3 0x40
4204 #define _SEG7COM3 0x80
4206 //==============================================================================
4209 //==============================================================================
4210 // LCDDATA10 Bits
4212 extern __at(0x07AA) __sfr LCDDATA10;
4214 typedef struct
4216 unsigned SEG8COM3 : 1;
4217 unsigned SEG9COM3 : 1;
4218 unsigned SEG10COM3 : 1;
4219 unsigned SEG11COM3 : 1;
4220 unsigned SEG12COM3 : 1;
4221 unsigned SEG13COM3 : 1;
4222 unsigned SEG14COM3 : 1;
4223 unsigned SEG15COM3 : 1;
4224 } __LCDDATA10bits_t;
4226 extern __at(0x07AA) volatile __LCDDATA10bits_t LCDDATA10bits;
4228 #define _SEG8COM3 0x01
4229 #define _SEG9COM3 0x02
4230 #define _SEG10COM3 0x04
4231 #define _SEG11COM3 0x08
4232 #define _SEG12COM3 0x10
4233 #define _SEG13COM3 0x20
4234 #define _SEG14COM3 0x40
4235 #define _SEG15COM3 0x80
4237 //==============================================================================
4240 //==============================================================================
4241 // LCDDATA11 Bits
4243 extern __at(0x07AB) __sfr LCDDATA11;
4245 typedef struct
4247 unsigned SEG16COM3 : 1;
4248 unsigned SEG17COM3 : 1;
4249 unsigned SEG18COM3 : 1;
4250 unsigned SEG19COM3 : 1;
4251 unsigned SEG20COM3 : 1;
4252 unsigned SEG21COM3 : 1;
4253 unsigned SEG22COM3 : 1;
4254 unsigned SEG23COM3 : 1;
4255 } __LCDDATA11bits_t;
4257 extern __at(0x07AB) volatile __LCDDATA11bits_t LCDDATA11bits;
4259 #define _SEG16COM3 0x01
4260 #define _SEG17COM3 0x02
4261 #define _SEG18COM3 0x04
4262 #define _SEG19COM3 0x08
4263 #define _SEG20COM3 0x10
4264 #define _SEG21COM3 0x20
4265 #define _SEG22COM3 0x40
4266 #define _SEG23COM3 0x80
4268 //==============================================================================
4271 //==============================================================================
4272 // STATUS_SHAD Bits
4274 extern __at(0x0FE4) __sfr STATUS_SHAD;
4276 typedef struct
4278 unsigned C_SHAD : 1;
4279 unsigned DC_SHAD : 1;
4280 unsigned Z_SHAD : 1;
4281 unsigned : 1;
4282 unsigned : 1;
4283 unsigned : 1;
4284 unsigned : 1;
4285 unsigned : 1;
4286 } __STATUS_SHADbits_t;
4288 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
4290 #define _C_SHAD 0x01
4291 #define _DC_SHAD 0x02
4292 #define _Z_SHAD 0x04
4294 //==============================================================================
4296 extern __at(0x0FE5) __sfr WREG_SHAD;
4297 extern __at(0x0FE6) __sfr BSR_SHAD;
4298 extern __at(0x0FE7) __sfr PCLATH_SHAD;
4299 extern __at(0x0FE8) __sfr FSR0L_SHAD;
4300 extern __at(0x0FE9) __sfr FSR0H_SHAD;
4301 extern __at(0x0FEA) __sfr FSR1L_SHAD;
4302 extern __at(0x0FEB) __sfr FSR1H_SHAD;
4303 extern __at(0x0FED) __sfr STKPTR;
4304 extern __at(0x0FEE) __sfr TOSL;
4305 extern __at(0x0FEF) __sfr TOSH;
4307 //==============================================================================
4309 // Configuration Bits
4311 //==============================================================================
4313 #define _CONFIG1 0x8007
4314 #define _CONFIG2 0x8008
4316 //----------------------------- CONFIG1 Options -------------------------------
4318 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
4319 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
4320 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
4321 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
4322 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
4323 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
4324 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
4325 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin.
4326 #define _WDTE_OFF 0x3FE7 // WDT disabled.
4327 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
4328 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
4329 #define _WDTE_ON 0x3FFF // WDT enabled.
4330 #define _PWRTE_ON 0x3FDF // PWRT enabled.
4331 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
4332 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
4333 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
4334 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
4335 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
4336 #define _CPD_ON 0x3EFF // Data memory code protection is enabled.
4337 #define _CPD_OFF 0x3FFF // Data memory code protection is disabled.
4338 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
4339 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
4340 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
4341 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
4342 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
4343 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
4344 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
4345 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
4346 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
4347 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
4349 //----------------------------- CONFIG2 Options -------------------------------
4351 #define _WRT_ALL 0x3FFC // 000h to FFFh write protected, no addresses may be modified by EECON control.
4352 #define _WRT_HALF 0x3FFD // 000h to 7FFh write protected, 800h to FFFh may be modified by EECON control.
4353 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to FFFh may be modified by EECON control.
4354 #define _WRT_OFF 0x3FFF // Write protection off.
4355 #define _VCAPEN_RA0 0x3FCF // VCAP functionality is enabled on RA0.
4356 #define _VCAPEN_RA5 0x3FDF // VCAP functionality is enabled on RA5.
4357 #define _VCAPEN_RA6 0x3FEF // VCAP functionality is enabled on RA6.
4358 #define _VCAPEN_OFF 0x3FFF // All VCAP pin functionality is disabled.
4359 #define _PLLEN_OFF 0x3EFF // 4x PLL disabled.
4360 #define _PLLEN_ON 0x3FFF // 4x PLL enabled.
4361 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
4362 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
4363 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
4364 #define _BORV_25 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
4365 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
4366 #define _BORV_19 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
4367 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
4368 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
4369 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
4370 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
4372 //==============================================================================
4374 #define _DEVID1 0x8006
4376 #define _IDLOC0 0x8000
4377 #define _IDLOC1 0x8001
4378 #define _IDLOC2 0x8002
4379 #define _IDLOC3 0x8003
4381 //==============================================================================
4383 #ifndef NO_BIT_DEFINES
4385 #define ADON ADCON0bits.ADON // bit 0
4386 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
4387 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
4388 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
4389 #define NOT_DONE ADCON0bits.NOT_DONE // bit 1, shadows bit in ADCON0bits
4390 #define CHS0 ADCON0bits.CHS0 // bit 2
4391 #define CHS1 ADCON0bits.CHS1 // bit 3
4392 #define CHS2 ADCON0bits.CHS2 // bit 4
4393 #define CHS3 ADCON0bits.CHS3 // bit 5
4394 #define CHS4 ADCON0bits.CHS4 // bit 6
4396 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
4397 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
4398 #define ADNREF ADCON1bits.ADNREF // bit 2
4399 #define ADCS0 ADCON1bits.ADCS0 // bit 4
4400 #define ADCS1 ADCON1bits.ADCS1 // bit 5
4401 #define ADCS2 ADCON1bits.ADCS2 // bit 6
4402 #define ADFM ADCON1bits.ADFM // bit 7
4404 #define ANSA0 ANSELAbits.ANSA0 // bit 0
4405 #define ANSA1 ANSELAbits.ANSA1 // bit 1
4406 #define ANSA2 ANSELAbits.ANSA2 // bit 2
4407 #define ANSA3 ANSELAbits.ANSA3 // bit 3
4408 #define ANSA4 ANSELAbits.ANSA4 // bit 4
4409 #define ANSA5 ANSELAbits.ANSA5 // bit 5
4411 #define ANSB0 ANSELBbits.ANSB0 // bit 0
4412 #define ANSB1 ANSELBbits.ANSB1 // bit 1
4413 #define ANSB2 ANSELBbits.ANSB2 // bit 2
4414 #define ANSB3 ANSELBbits.ANSB3 // bit 3
4415 #define ANSB4 ANSELBbits.ANSB4 // bit 4
4416 #define ANSB5 ANSELBbits.ANSB5 // bit 5
4418 #define ANSD0 ANSELDbits.ANSD0 // bit 0
4419 #define ANSD1 ANSELDbits.ANSD1 // bit 1
4420 #define ANSD2 ANSELDbits.ANSD2 // bit 2
4421 #define ANSD3 ANSELDbits.ANSD3 // bit 3
4422 #define ANSD4 ANSELDbits.ANSD4 // bit 4
4423 #define ANSD5 ANSELDbits.ANSD5 // bit 5
4424 #define ANSD6 ANSELDbits.ANSD6 // bit 6
4425 #define ANSD7 ANSELDbits.ANSD7 // bit 7
4427 #define ANSE0 ANSELEbits.ANSE0 // bit 0
4428 #define ANSE1 ANSELEbits.ANSE1 // bit 1
4429 #define ANSE2 ANSELEbits.ANSE2 // bit 2
4431 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
4432 #define SSSEL APFCONbits.SSSEL // bit 1
4433 #define C2OUTSEL APFCONbits.C2OUTSEL // bit 2
4434 #define SRNQSEL APFCONbits.SRNQSEL // bit 3
4435 #define P2BSEL APFCONbits.P2BSEL // bit 4
4436 #define T1GSEL APFCONbits.T1GSEL // bit 5
4437 #define CCP3SEL APFCONbits.CCP3SEL // bit 6
4439 #define ABDEN BAUDCONbits.ABDEN // bit 0
4440 #define WUE BAUDCONbits.WUE // bit 1
4441 #define BRG16 BAUDCONbits.BRG16 // bit 3
4442 #define SCKP BAUDCONbits.SCKP // bit 4
4443 #define RCIDL BAUDCONbits.RCIDL // bit 6
4444 #define ABDOVF BAUDCONbits.ABDOVF // bit 7
4446 #define BORRDY BORCONbits.BORRDY // bit 0
4447 #define SBOREN BORCONbits.SBOREN // bit 7
4449 #define BSR0 BSRbits.BSR0 // bit 0
4450 #define BSR1 BSRbits.BSR1 // bit 1
4451 #define BSR2 BSRbits.BSR2 // bit 2
4452 #define BSR3 BSRbits.BSR3 // bit 3
4453 #define BSR4 BSRbits.BSR4 // bit 4
4455 #define PSS1BD0 CCP1ASbits.PSS1BD0 // bit 0
4456 #define PSS1BD1 CCP1ASbits.PSS1BD1 // bit 1
4457 #define PSS1AC0 CCP1ASbits.PSS1AC0 // bit 2
4458 #define PSS1AC1 CCP1ASbits.PSS1AC1 // bit 3
4459 #define CCP1AS0 CCP1ASbits.CCP1AS0 // bit 4
4460 #define CCP1AS1 CCP1ASbits.CCP1AS1 // bit 5
4461 #define CCP1AS2 CCP1ASbits.CCP1AS2 // bit 6
4462 #define CCP1ASE CCP1ASbits.CCP1ASE // bit 7
4464 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
4465 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
4466 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
4467 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
4468 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
4469 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
4470 #define P1M0 CCP1CONbits.P1M0 // bit 6
4471 #define P1M1 CCP1CONbits.P1M1 // bit 7
4473 #define PSS2BD0 CCP2ASbits.PSS2BD0 // bit 0
4474 #define PSS2BD1 CCP2ASbits.PSS2BD1 // bit 1
4475 #define PSS2AC0 CCP2ASbits.PSS2AC0 // bit 2
4476 #define PSS2AC1 CCP2ASbits.PSS2AC1 // bit 3
4477 #define CCP2AS0 CCP2ASbits.CCP2AS0 // bit 4
4478 #define CCP2AS1 CCP2ASbits.CCP2AS1 // bit 5
4479 #define CCP2AS2 CCP2ASbits.CCP2AS2 // bit 6
4480 #define CCP2ASE CCP2ASbits.CCP2ASE // bit 7
4482 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
4483 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
4484 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
4485 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
4486 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
4487 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
4488 #define P2M0 CCP2CONbits.P2M0 // bit 6
4489 #define P2M1 CCP2CONbits.P2M1 // bit 7
4491 #define PSS3BD0 CCP3ASbits.PSS3BD0 // bit 0
4492 #define PSS3BD1 CCP3ASbits.PSS3BD1 // bit 1
4493 #define PSS3AC0 CCP3ASbits.PSS3AC0 // bit 2
4494 #define PSS3AC1 CCP3ASbits.PSS3AC1 // bit 3
4495 #define CCP3AS0 CCP3ASbits.CCP3AS0 // bit 4
4496 #define CCP3AS1 CCP3ASbits.CCP3AS1 // bit 5
4497 #define CCP3AS2 CCP3ASbits.CCP3AS2 // bit 6
4498 #define CCP3ASE CCP3ASbits.CCP3ASE // bit 7
4500 #define CCP3M0 CCP3CONbits.CCP3M0 // bit 0
4501 #define CCP3M1 CCP3CONbits.CCP3M1 // bit 1
4502 #define CCP3M2 CCP3CONbits.CCP3M2 // bit 2
4503 #define CCP3M3 CCP3CONbits.CCP3M3 // bit 3
4504 #define DC3B0 CCP3CONbits.DC3B0 // bit 4
4505 #define DC3B1 CCP3CONbits.DC3B1 // bit 5
4506 #define P3M0 CCP3CONbits.P3M0 // bit 6
4507 #define P3M1 CCP3CONbits.P3M1 // bit 7
4509 #define CCP4M0 CCP4CONbits.CCP4M0 // bit 0
4510 #define CCP4M1 CCP4CONbits.CCP4M1 // bit 1
4511 #define CCP4M2 CCP4CONbits.CCP4M2 // bit 2
4512 #define CCP4M3 CCP4CONbits.CCP4M3 // bit 3
4513 #define DC4B0 CCP4CONbits.DC4B0 // bit 4
4514 #define DC4B1 CCP4CONbits.DC4B1 // bit 5
4516 #define CCP5M0 CCP5CONbits.CCP5M0 // bit 0
4517 #define CCP5M1 CCP5CONbits.CCP5M1 // bit 1
4518 #define CCP5M2 CCP5CONbits.CCP5M2 // bit 2
4519 #define CCP5M3 CCP5CONbits.CCP5M3 // bit 3
4520 #define DC5B0 CCP5CONbits.DC5B0 // bit 4
4521 #define DC5B1 CCP5CONbits.DC5B1 // bit 5
4523 #define C1TSEL0 CCPTMRS0bits.C1TSEL0 // bit 0
4524 #define C1TSEL1 CCPTMRS0bits.C1TSEL1 // bit 1
4525 #define C2TSEL0 CCPTMRS0bits.C2TSEL0 // bit 2
4526 #define C2TSEL1 CCPTMRS0bits.C2TSEL1 // bit 3
4527 #define C3TSEL0 CCPTMRS0bits.C3TSEL0 // bit 4
4528 #define C3TSEL1 CCPTMRS0bits.C3TSEL1 // bit 5
4529 #define C4TSEL0 CCPTMRS0bits.C4TSEL0 // bit 6
4530 #define C4TSEL1 CCPTMRS0bits.C4TSEL1 // bit 7
4532 #define C5TSEL0 CCPTMRS1bits.C5TSEL0 // bit 0
4533 #define C5TSEL1 CCPTMRS1bits.C5TSEL1 // bit 1
4535 #define C1SYNC CM1CON0bits.C1SYNC // bit 0
4536 #define C1HYS CM1CON0bits.C1HYS // bit 1
4537 #define C1SP CM1CON0bits.C1SP // bit 2
4538 #define C1POL CM1CON0bits.C1POL // bit 4
4539 #define C1OE CM1CON0bits.C1OE // bit 5
4540 #define C1OUT CM1CON0bits.C1OUT // bit 6
4541 #define C1ON CM1CON0bits.C1ON // bit 7
4543 #define C1NCH0 CM1CON1bits.C1NCH0 // bit 0
4544 #define C1NCH1 CM1CON1bits.C1NCH1 // bit 1
4545 #define C1PCH0 CM1CON1bits.C1PCH0 // bit 4
4546 #define C1PCH1 CM1CON1bits.C1PCH1 // bit 5
4547 #define C1INTN CM1CON1bits.C1INTN // bit 6
4548 #define C1INTP CM1CON1bits.C1INTP // bit 7
4550 #define C2SYNC CM2CON0bits.C2SYNC // bit 0
4551 #define C2HYS CM2CON0bits.C2HYS // bit 1
4552 #define C2SP CM2CON0bits.C2SP // bit 2
4553 #define C2POL CM2CON0bits.C2POL // bit 4
4554 #define C2OE CM2CON0bits.C2OE // bit 5
4555 #define C2OUT CM2CON0bits.C2OUT // bit 6
4556 #define C2ON CM2CON0bits.C2ON // bit 7
4558 #define C2NCH0 CM2CON1bits.C2NCH0 // bit 0
4559 #define C2NCH1 CM2CON1bits.C2NCH1 // bit 1
4560 #define C2PCH0 CM2CON1bits.C2PCH0 // bit 4
4561 #define C2PCH1 CM2CON1bits.C2PCH1 // bit 5
4562 #define C2INTN CM2CON1bits.C2INTN // bit 6
4563 #define C2INTP CM2CON1bits.C2INTP // bit 7
4565 #define MC1OUT CMOUTbits.MC1OUT // bit 0
4566 #define MC2OUT CMOUTbits.MC2OUT // bit 1
4568 #define T0XCS CPSCON0bits.T0XCS // bit 0
4569 #define CPSOUT CPSCON0bits.CPSOUT // bit 1
4570 #define CPSRNG0 CPSCON0bits.CPSRNG0 // bit 2
4571 #define CPSRNG1 CPSCON0bits.CPSRNG1 // bit 3
4572 #define CPSON CPSCON0bits.CPSON // bit 7
4574 #define CPSCH0 CPSCON1bits.CPSCH0 // bit 0
4575 #define CPSCH1 CPSCON1bits.CPSCH1 // bit 1
4576 #define CPSCH2 CPSCON1bits.CPSCH2 // bit 2
4577 #define CPSCH3 CPSCON1bits.CPSCH3 // bit 3
4579 #define DACNSS DACCON0bits.DACNSS // bit 0
4580 #define DACPSS0 DACCON0bits.DACPSS0 // bit 2
4581 #define DACPSS1 DACCON0bits.DACPSS1 // bit 3
4582 #define DACOE DACCON0bits.DACOE // bit 5
4583 #define DACLPS DACCON0bits.DACLPS // bit 6
4584 #define DACEN DACCON0bits.DACEN // bit 7
4586 #define DACR0 DACCON1bits.DACR0 // bit 0
4587 #define DACR1 DACCON1bits.DACR1 // bit 1
4588 #define DACR2 DACCON1bits.DACR2 // bit 2
4589 #define DACR3 DACCON1bits.DACR3 // bit 3
4590 #define DACR4 DACCON1bits.DACR4 // bit 4
4592 #define RD EECON1bits.RD // bit 0
4593 #define WR EECON1bits.WR // bit 1
4594 #define WREN EECON1bits.WREN // bit 2
4595 #define WRERR EECON1bits.WRERR // bit 3
4596 #define FREE EECON1bits.FREE // bit 4
4597 #define LWLO EECON1bits.LWLO // bit 5
4598 #define CFGS EECON1bits.CFGS // bit 6
4599 #define EEPGD EECON1bits.EEPGD // bit 7
4601 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
4602 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
4603 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
4604 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
4605 #define TSRNG FVRCONbits.TSRNG // bit 4
4606 #define TSEN FVRCONbits.TSEN // bit 5
4607 #define FVRRDY FVRCONbits.FVRRDY // bit 6
4608 #define FVREN FVRCONbits.FVREN // bit 7
4610 #define IOCIF INTCONbits.IOCIF // bit 0
4611 #define INTF INTCONbits.INTF // bit 1
4612 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
4613 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
4614 #define IOCIE INTCONbits.IOCIE // bit 3
4615 #define INTE INTCONbits.INTE // bit 4
4616 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
4617 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
4618 #define PEIE INTCONbits.PEIE // bit 6
4619 #define GIE INTCONbits.GIE // bit 7
4621 #define IOCBF0 IOCBFbits.IOCBF0 // bit 0
4622 #define IOCBF1 IOCBFbits.IOCBF1 // bit 1
4623 #define IOCBF2 IOCBFbits.IOCBF2 // bit 2
4624 #define IOCBF3 IOCBFbits.IOCBF3 // bit 3
4625 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
4626 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
4627 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
4628 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
4630 #define IOCBN0 IOCBNbits.IOCBN0 // bit 0
4631 #define IOCBN1 IOCBNbits.IOCBN1 // bit 1
4632 #define IOCBN2 IOCBNbits.IOCBN2 // bit 2
4633 #define IOCBN3 IOCBNbits.IOCBN3 // bit 3
4634 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
4635 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
4636 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
4637 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
4639 #define IOCBP0 IOCBPbits.IOCBP0 // bit 0
4640 #define IOCBP1 IOCBPbits.IOCBP1 // bit 1
4641 #define IOCBP2 IOCBPbits.IOCBP2 // bit 2
4642 #define IOCBP3 IOCBPbits.IOCBP3 // bit 3
4643 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
4644 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
4645 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
4646 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
4648 #define LATA0 LATAbits.LATA0 // bit 0
4649 #define LATA1 LATAbits.LATA1 // bit 1
4650 #define LATA2 LATAbits.LATA2 // bit 2
4651 #define LATA3 LATAbits.LATA3 // bit 3
4652 #define LATA4 LATAbits.LATA4 // bit 4
4653 #define LATA5 LATAbits.LATA5 // bit 5
4654 #define LATA6 LATAbits.LATA6 // bit 6
4655 #define LATA7 LATAbits.LATA7 // bit 7
4657 #define LATB0 LATBbits.LATB0 // bit 0
4658 #define LATB1 LATBbits.LATB1 // bit 1
4659 #define LATB2 LATBbits.LATB2 // bit 2
4660 #define LATB3 LATBbits.LATB3 // bit 3
4661 #define LATB4 LATBbits.LATB4 // bit 4
4662 #define LATB5 LATBbits.LATB5 // bit 5
4663 #define LATB6 LATBbits.LATB6 // bit 6
4664 #define LATB7 LATBbits.LATB7 // bit 7
4666 #define LATC0 LATCbits.LATC0 // bit 0
4667 #define LATC1 LATCbits.LATC1 // bit 1
4668 #define LATC2 LATCbits.LATC2 // bit 2
4669 #define LATC3 LATCbits.LATC3 // bit 3
4670 #define LATC4 LATCbits.LATC4 // bit 4
4671 #define LATC5 LATCbits.LATC5 // bit 5
4672 #define LATC6 LATCbits.LATC6 // bit 6
4673 #define LATC7 LATCbits.LATC7 // bit 7
4675 #define LATD0 LATDbits.LATD0 // bit 0
4676 #define LATD1 LATDbits.LATD1 // bit 1
4677 #define LATD2 LATDbits.LATD2 // bit 2
4678 #define LATD3 LATDbits.LATD3 // bit 3
4679 #define LATD4 LATDbits.LATD4 // bit 4
4680 #define LATD5 LATDbits.LATD5 // bit 5
4681 #define LATD6 LATDbits.LATD6 // bit 6
4682 #define LATD7 LATDbits.LATD7 // bit 7
4684 #define LATE0 LATEbits.LATE0 // bit 0
4685 #define LATE1 LATEbits.LATE1 // bit 1
4686 #define LATE2 LATEbits.LATE2 // bit 2
4687 #define LATE3 LATEbits.LATE3 // bit 3
4689 #define LMUX0 LCDCONbits.LMUX0 // bit 0
4690 #define LMUX1 LCDCONbits.LMUX1 // bit 1
4691 #define CS0 LCDCONbits.CS0 // bit 2
4692 #define CS1 LCDCONbits.CS1 // bit 3
4693 #define WERR LCDCONbits.WERR // bit 5
4694 #define SLPEN LCDCONbits.SLPEN // bit 6
4695 #define LCDEN LCDCONbits.LCDEN // bit 7
4697 #define LCDCST0 LCDCSTbits.LCDCST0 // bit 0
4698 #define LCDCST1 LCDCSTbits.LCDCST1 // bit 1
4699 #define LCDCST2 LCDCSTbits.LCDCST2 // bit 2
4701 #define SEG0COM0 LCDDATA0bits.SEG0COM0 // bit 0
4702 #define SEG1COM0 LCDDATA0bits.SEG1COM0 // bit 1
4703 #define SEG2COM0 LCDDATA0bits.SEG2COM0 // bit 2
4704 #define SEG3COM0 LCDDATA0bits.SEG3COM0 // bit 3
4705 #define SEG4COM0 LCDDATA0bits.SEG4COM0 // bit 4
4706 #define SEG5COM0 LCDDATA0bits.SEG5COM0 // bit 5
4707 #define SEG6COM0 LCDDATA0bits.SEG6COM0 // bit 6
4708 #define SEG7COM0 LCDDATA0bits.SEG7COM0 // bit 7
4710 #define SEG8COM0 LCDDATA1bits.SEG8COM0 // bit 0
4711 #define SEG9COM0 LCDDATA1bits.SEG9COM0 // bit 1
4712 #define SEG10COM0 LCDDATA1bits.SEG10COM0 // bit 2
4713 #define SEG11COM0 LCDDATA1bits.SEG11COM0 // bit 3
4714 #define SEG12COM0 LCDDATA1bits.SEG12COM0 // bit 4
4715 #define SEG13COM0 LCDDATA1bits.SEG13COM0 // bit 5
4716 #define SEG14COM0 LCDDATA1bits.SEG14COM0 // bit 6
4717 #define SEG15COM0 LCDDATA1bits.SEG15COM0 // bit 7
4719 #define SEG16COM0 LCDDATA2bits.SEG16COM0 // bit 0
4720 #define SEG17COM0 LCDDATA2bits.SEG17COM0 // bit 1
4721 #define SEG18COM0 LCDDATA2bits.SEG18COM0 // bit 2
4722 #define SEG19COM0 LCDDATA2bits.SEG19COM0 // bit 3
4723 #define SEG20COM0 LCDDATA2bits.SEG20COM0 // bit 4
4724 #define SEG21COM0 LCDDATA2bits.SEG21COM0 // bit 5
4725 #define SEG22COM0 LCDDATA2bits.SEG22COM0 // bit 6
4726 #define SEG23COM0 LCDDATA2bits.SEG23COM0 // bit 7
4728 #define SEG0COM1 LCDDATA3bits.SEG0COM1 // bit 0
4729 #define SEG1COM1 LCDDATA3bits.SEG1COM1 // bit 1
4730 #define SEG2COM1 LCDDATA3bits.SEG2COM1 // bit 2
4731 #define SEG3COM1 LCDDATA3bits.SEG3COM1 // bit 3
4732 #define SEG4COM1 LCDDATA3bits.SEG4COM1 // bit 4
4733 #define SEG5COM1 LCDDATA3bits.SEG5COM1 // bit 5
4734 #define SEG6COM1 LCDDATA3bits.SEG6COM1 // bit 6
4735 #define SEG7COM1 LCDDATA3bits.SEG7COM1 // bit 7
4737 #define SEG8COM1 LCDDATA4bits.SEG8COM1 // bit 0
4738 #define SEG9COM1 LCDDATA4bits.SEG9COM1 // bit 1
4739 #define SEG10COM1 LCDDATA4bits.SEG10COM1 // bit 2
4740 #define SEG11COM1 LCDDATA4bits.SEG11COM1 // bit 3
4741 #define SEG12COM1 LCDDATA4bits.SEG12COM1 // bit 4
4742 #define SEG13COM1 LCDDATA4bits.SEG13COM1 // bit 5
4743 #define SEG14COM1 LCDDATA4bits.SEG14COM1 // bit 6
4744 #define SEG15COM1 LCDDATA4bits.SEG15COM1 // bit 7
4746 #define SEG16COM1 LCDDATA5bits.SEG16COM1 // bit 0
4747 #define SEG17COM1 LCDDATA5bits.SEG17COM1 // bit 1
4748 #define SEG18COM1 LCDDATA5bits.SEG18COM1 // bit 2
4749 #define SEG19COM1 LCDDATA5bits.SEG19COM1 // bit 3
4750 #define SEG20COM1 LCDDATA5bits.SEG20COM1 // bit 4
4751 #define SEG21COM1 LCDDATA5bits.SEG21COM1 // bit 5
4752 #define SEG22COM1 LCDDATA5bits.SEG22COM1 // bit 6
4753 #define SEG23COM1 LCDDATA5bits.SEG23COM1 // bit 7
4755 #define SEG0COM2 LCDDATA6bits.SEG0COM2 // bit 0
4756 #define SEG1COM2 LCDDATA6bits.SEG1COM2 // bit 1
4757 #define SEG2COM2 LCDDATA6bits.SEG2COM2 // bit 2
4758 #define SEG3COM2 LCDDATA6bits.SEG3COM2 // bit 3
4759 #define SEG4COM2 LCDDATA6bits.SEG4COM2 // bit 4
4760 #define SEG5COM2 LCDDATA6bits.SEG5COM2 // bit 5
4761 #define SEG6COM2 LCDDATA6bits.SEG6COM2 // bit 6
4762 #define SEG7COM2 LCDDATA6bits.SEG7COM2 // bit 7
4764 #define SEG8COM2 LCDDATA7bits.SEG8COM2 // bit 0
4765 #define SEG9COM2 LCDDATA7bits.SEG9COM2 // bit 1
4766 #define SEG10COM2 LCDDATA7bits.SEG10COM2 // bit 2
4767 #define SEG11COM2 LCDDATA7bits.SEG11COM2 // bit 3
4768 #define SEG12COM2 LCDDATA7bits.SEG12COM2 // bit 4
4769 #define SEG13COM2 LCDDATA7bits.SEG13COM2 // bit 5
4770 #define SEG14COM2 LCDDATA7bits.SEG14COM2 // bit 6
4771 #define SEG15COM2 LCDDATA7bits.SEG15COM2 // bit 7
4773 #define SEG16COM2 LCDDATA8bits.SEG16COM2 // bit 0
4774 #define SEG17COM2 LCDDATA8bits.SEG17COM2 // bit 1
4775 #define SEG18COM2 LCDDATA8bits.SEG18COM2 // bit 2
4776 #define SEG19COM2 LCDDATA8bits.SEG19COM2 // bit 3
4777 #define SEG20COM2 LCDDATA8bits.SEG20COM2 // bit 4
4778 #define SEG21COM2 LCDDATA8bits.SEG21COM2 // bit 5
4779 #define SEG22COM2 LCDDATA8bits.SEG22COM2 // bit 6
4780 #define SEG23COM2 LCDDATA8bits.SEG23COM2 // bit 7
4782 #define SEG0COM3 LCDDATA9bits.SEG0COM3 // bit 0
4783 #define SEG1COM3 LCDDATA9bits.SEG1COM3 // bit 1
4784 #define SEG2COM3 LCDDATA9bits.SEG2COM3 // bit 2
4785 #define SEG3COM3 LCDDATA9bits.SEG3COM3 // bit 3
4786 #define SEG4COM3 LCDDATA9bits.SEG4COM3 // bit 4
4787 #define SEG5COM3 LCDDATA9bits.SEG5COM3 // bit 5
4788 #define SEG6COM3 LCDDATA9bits.SEG6COM3 // bit 6
4789 #define SEG7COM3 LCDDATA9bits.SEG7COM3 // bit 7
4791 #define SEG8COM3 LCDDATA10bits.SEG8COM3 // bit 0
4792 #define SEG9COM3 LCDDATA10bits.SEG9COM3 // bit 1
4793 #define SEG10COM3 LCDDATA10bits.SEG10COM3 // bit 2
4794 #define SEG11COM3 LCDDATA10bits.SEG11COM3 // bit 3
4795 #define SEG12COM3 LCDDATA10bits.SEG12COM3 // bit 4
4796 #define SEG13COM3 LCDDATA10bits.SEG13COM3 // bit 5
4797 #define SEG14COM3 LCDDATA10bits.SEG14COM3 // bit 6
4798 #define SEG15COM3 LCDDATA10bits.SEG15COM3 // bit 7
4800 #define SEG16COM3 LCDDATA11bits.SEG16COM3 // bit 0
4801 #define SEG17COM3 LCDDATA11bits.SEG17COM3 // bit 1
4802 #define SEG18COM3 LCDDATA11bits.SEG18COM3 // bit 2
4803 #define SEG19COM3 LCDDATA11bits.SEG19COM3 // bit 3
4804 #define SEG20COM3 LCDDATA11bits.SEG20COM3 // bit 4
4805 #define SEG21COM3 LCDDATA11bits.SEG21COM3 // bit 5
4806 #define SEG22COM3 LCDDATA11bits.SEG22COM3 // bit 6
4807 #define SEG23COM3 LCDDATA11bits.SEG23COM3 // bit 7
4809 #define LP0 LCDPSbits.LP0 // bit 0
4810 #define LP1 LCDPSbits.LP1 // bit 1
4811 #define LP2 LCDPSbits.LP2 // bit 2
4812 #define LP3 LCDPSbits.LP3 // bit 3
4813 #define WA LCDPSbits.WA // bit 4
4814 #define LCDA LCDPSbits.LCDA // bit 5
4815 #define BIASMD LCDPSbits.BIASMD // bit 6
4816 #define WFT LCDPSbits.WFT // bit 7
4818 #define VLCD1PE LCDREFbits.VLCD1PE // bit 1
4819 #define VLCD2PE LCDREFbits.VLCD2PE // bit 2
4820 #define VLCD3PE LCDREFbits.VLCD3PE // bit 3
4821 #define LCDIRI LCDREFbits.LCDIRI // bit 5
4822 #define LCDIRS LCDREFbits.LCDIRS // bit 6
4823 #define LCDIRE LCDREFbits.LCDIRE // bit 7
4825 #define LRLAT0 LCDRLbits.LRLAT0 // bit 0
4826 #define LRLAT1 LCDRLbits.LRLAT1 // bit 1
4827 #define LRLAT2 LCDRLbits.LRLAT2 // bit 2
4828 #define LRLBP0 LCDRLbits.LRLBP0 // bit 4
4829 #define LRLBP1 LCDRLbits.LRLBP1 // bit 5
4830 #define LRLAP0 LCDRLbits.LRLAP0 // bit 6
4831 #define LRLAP1 LCDRLbits.LRLAP1 // bit 7
4833 #define SE0 LCDSE0bits.SE0 // bit 0
4834 #define SE1 LCDSE0bits.SE1 // bit 1
4835 #define SE2 LCDSE0bits.SE2 // bit 2
4836 #define SE3 LCDSE0bits.SE3 // bit 3
4837 #define SE4 LCDSE0bits.SE4 // bit 4
4838 #define SE5 LCDSE0bits.SE5 // bit 5
4839 #define SE6 LCDSE0bits.SE6 // bit 6
4840 #define SE7 LCDSE0bits.SE7 // bit 7
4842 #define SE8 LCDSE1bits.SE8 // bit 0
4843 #define SE9 LCDSE1bits.SE9 // bit 1
4844 #define SE10 LCDSE1bits.SE10 // bit 2
4845 #define SE11 LCDSE1bits.SE11 // bit 3
4846 #define SE12 LCDSE1bits.SE12 // bit 4
4847 #define SE13 LCDSE1bits.SE13 // bit 5
4848 #define SE14 LCDSE1bits.SE14 // bit 6
4849 #define SE15 LCDSE1bits.SE15 // bit 7
4851 #define SE16 LCDSE2bits.SE16 // bit 0
4852 #define SE17 LCDSE2bits.SE17 // bit 1
4853 #define SE18 LCDSE2bits.SE18 // bit 2
4854 #define SE19 LCDSE2bits.SE19 // bit 3
4855 #define SE20 LCDSE2bits.SE20 // bit 4
4856 #define SE21 LCDSE2bits.SE21 // bit 5
4857 #define SE22 LCDSE2bits.SE22 // bit 6
4858 #define SE23 LCDSE2bits.SE23 // bit 7
4860 #define PS0 OPTION_REGbits.PS0 // bit 0
4861 #define PS1 OPTION_REGbits.PS1 // bit 1
4862 #define PS2 OPTION_REGbits.PS2 // bit 2
4863 #define PSA OPTION_REGbits.PSA // bit 3
4864 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
4865 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
4866 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
4867 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
4868 #define INTEDG OPTION_REGbits.INTEDG // bit 6
4869 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
4871 #define SCS0 OSCCONbits.SCS0 // bit 0
4872 #define SCS1 OSCCONbits.SCS1 // bit 1
4873 #define IRCF0 OSCCONbits.IRCF0 // bit 3
4874 #define IRCF1 OSCCONbits.IRCF1 // bit 4
4875 #define IRCF2 OSCCONbits.IRCF2 // bit 5
4876 #define IRCF3 OSCCONbits.IRCF3 // bit 6
4877 #define SPLLEN OSCCONbits.SPLLEN // bit 7
4879 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
4880 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
4881 #define MFIOFR OSCSTATbits.MFIOFR // bit 2
4882 #define HFIOFL OSCSTATbits.HFIOFL // bit 3
4883 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
4884 #define OSTS OSCSTATbits.OSTS // bit 5
4885 #define PLLR OSCSTATbits.PLLR // bit 6
4886 #define T1OSCR OSCSTATbits.T1OSCR // bit 7
4888 #define TUN0 OSCTUNEbits.TUN0 // bit 0
4889 #define TUN1 OSCTUNEbits.TUN1 // bit 1
4890 #define TUN2 OSCTUNEbits.TUN2 // bit 2
4891 #define TUN3 OSCTUNEbits.TUN3 // bit 3
4892 #define TUN4 OSCTUNEbits.TUN4 // bit 4
4893 #define TUN5 OSCTUNEbits.TUN5 // bit 5
4895 #define NOT_BOR PCONbits.NOT_BOR // bit 0
4896 #define NOT_POR PCONbits.NOT_POR // bit 1
4897 #define NOT_RI PCONbits.NOT_RI // bit 2
4898 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
4899 #define STKUNF PCONbits.STKUNF // bit 6
4900 #define STKOVF PCONbits.STKOVF // bit 7
4902 #define TMR1IE PIE1bits.TMR1IE // bit 0
4903 #define TMR2IE PIE1bits.TMR2IE // bit 1
4904 #define CCP1IE PIE1bits.CCP1IE // bit 2
4905 #define SSPIE PIE1bits.SSPIE // bit 3
4906 #define TXIE PIE1bits.TXIE // bit 4
4907 #define RCIE PIE1bits.RCIE // bit 5
4908 #define ADIE PIE1bits.ADIE // bit 6
4909 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
4911 #define CCP2IE PIE2bits.CCP2IE // bit 0
4912 #define LCDIE PIE2bits.LCDIE // bit 2
4913 #define BCLIE PIE2bits.BCLIE // bit 3
4914 #define EEIE PIE2bits.EEIE // bit 4
4915 #define C1IE PIE2bits.C1IE // bit 5
4916 #define C2IE PIE2bits.C2IE // bit 6
4917 #define OSFIE PIE2bits.OSFIE // bit 7
4919 #define TMR4IE PIE3bits.TMR4IE // bit 1
4920 #define TMR6IE PIE3bits.TMR6IE // bit 3
4921 #define CCP3IE PIE3bits.CCP3IE // bit 4
4922 #define CCP4IE PIE3bits.CCP4IE // bit 5
4923 #define CCP5IE PIE3bits.CCP5IE // bit 6
4925 #define TMR1IF PIR1bits.TMR1IF // bit 0
4926 #define TMR2IF PIR1bits.TMR2IF // bit 1
4927 #define CCP1IF PIR1bits.CCP1IF // bit 2
4928 #define SSPIF PIR1bits.SSPIF // bit 3
4929 #define TXIF PIR1bits.TXIF // bit 4
4930 #define RCIF PIR1bits.RCIF // bit 5
4931 #define ADIF PIR1bits.ADIF // bit 6
4932 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
4934 #define CCP2IF PIR2bits.CCP2IF // bit 0
4935 #define LCDIF PIR2bits.LCDIF // bit 2
4936 #define BCLIF PIR2bits.BCLIF // bit 3
4937 #define EEIF PIR2bits.EEIF // bit 4
4938 #define C1IF PIR2bits.C1IF // bit 5
4939 #define C2IF PIR2bits.C2IF // bit 6
4940 #define OSFIF PIR2bits.OSFIF // bit 7
4942 #define TMR4IF PIR3bits.TMR4IF // bit 1
4943 #define TMR6IF PIR3bits.TMR6IF // bit 3
4944 #define CCP3IF PIR3bits.CCP3IF // bit 4
4945 #define CCP4IF PIR3bits.CCP4IF // bit 5
4946 #define CCP5IF PIR3bits.CCP5IF // bit 6
4948 #define RA0 PORTAbits.RA0 // bit 0
4949 #define RA1 PORTAbits.RA1 // bit 1
4950 #define RA2 PORTAbits.RA2 // bit 2
4951 #define RA3 PORTAbits.RA3 // bit 3
4952 #define RA4 PORTAbits.RA4 // bit 4
4953 #define RA5 PORTAbits.RA5 // bit 5
4954 #define RA6 PORTAbits.RA6 // bit 6
4955 #define RA7 PORTAbits.RA7 // bit 7
4957 #define RB0 PORTBbits.RB0 // bit 0
4958 #define RB1 PORTBbits.RB1 // bit 1
4959 #define RB2 PORTBbits.RB2 // bit 2
4960 #define RB3 PORTBbits.RB3 // bit 3
4961 #define RB4 PORTBbits.RB4 // bit 4
4962 #define RB5 PORTBbits.RB5 // bit 5
4963 #define RB6 PORTBbits.RB6 // bit 6
4964 #define RB7 PORTBbits.RB7 // bit 7
4966 #define RC0 PORTCbits.RC0 // bit 0
4967 #define RC1 PORTCbits.RC1 // bit 1
4968 #define RC2 PORTCbits.RC2 // bit 2
4969 #define RC3 PORTCbits.RC3 // bit 3
4970 #define RC4 PORTCbits.RC4 // bit 4
4971 #define RC5 PORTCbits.RC5 // bit 5
4972 #define RC6 PORTCbits.RC6 // bit 6
4973 #define RC7 PORTCbits.RC7 // bit 7
4975 #define RD0 PORTDbits.RD0 // bit 0
4976 #define RD1 PORTDbits.RD1 // bit 1
4977 #define RD2 PORTDbits.RD2 // bit 2
4978 #define RD3 PORTDbits.RD3 // bit 3
4979 #define RD4 PORTDbits.RD4 // bit 4
4980 #define RD5 PORTDbits.RD5 // bit 5
4981 #define RD6 PORTDbits.RD6 // bit 6
4982 #define RD7 PORTDbits.RD7 // bit 7
4984 #define RE0 PORTEbits.RE0 // bit 0
4985 #define RE1 PORTEbits.RE1 // bit 1
4986 #define RE2 PORTEbits.RE2 // bit 2
4987 #define RE3 PORTEbits.RE3 // bit 3
4989 #define STR1A PSTR1CONbits.STR1A // bit 0
4990 #define STR1B PSTR1CONbits.STR1B // bit 1
4991 #define STR1C PSTR1CONbits.STR1C // bit 2
4992 #define STR1D PSTR1CONbits.STR1D // bit 3
4993 #define STR1SYNC PSTR1CONbits.STR1SYNC // bit 4
4995 #define STR2A PSTR2CONbits.STR2A // bit 0
4996 #define STR2B PSTR2CONbits.STR2B // bit 1
4997 #define STR2C PSTR2CONbits.STR2C // bit 2
4998 #define STR2D PSTR2CONbits.STR2D // bit 3
4999 #define STR2SYNC PSTR2CONbits.STR2SYNC // bit 4
5001 #define STR3A PSTR3CONbits.STR3A // bit 0
5002 #define STR3B PSTR3CONbits.STR3B // bit 1
5003 #define STR3C PSTR3CONbits.STR3C // bit 2
5004 #define STR3D PSTR3CONbits.STR3D // bit 3
5005 #define STR3SYNC PSTR3CONbits.STR3SYNC // bit 4
5007 #define P1DC0 PWM1CONbits.P1DC0 // bit 0
5008 #define P1DC1 PWM1CONbits.P1DC1 // bit 1
5009 #define P1DC2 PWM1CONbits.P1DC2 // bit 2
5010 #define P1DC3 PWM1CONbits.P1DC3 // bit 3
5011 #define P1DC4 PWM1CONbits.P1DC4 // bit 4
5012 #define P1DC5 PWM1CONbits.P1DC5 // bit 5
5013 #define P1DC6 PWM1CONbits.P1DC6 // bit 6
5014 #define P1RSEN PWM1CONbits.P1RSEN // bit 7
5016 #define P2DC0 PWM2CONbits.P2DC0 // bit 0
5017 #define P2DC1 PWM2CONbits.P2DC1 // bit 1
5018 #define P2DC2 PWM2CONbits.P2DC2 // bit 2
5019 #define P2DC3 PWM2CONbits.P2DC3 // bit 3
5020 #define P2DC4 PWM2CONbits.P2DC4 // bit 4
5021 #define P2DC5 PWM2CONbits.P2DC5 // bit 5
5022 #define P2DC6 PWM2CONbits.P2DC6 // bit 6
5023 #define P2RSEN PWM2CONbits.P2RSEN // bit 7
5025 #define P3DC0 PWM3CONbits.P3DC0 // bit 0
5026 #define P3DC1 PWM3CONbits.P3DC1 // bit 1
5027 #define P3DC2 PWM3CONbits.P3DC2 // bit 2
5028 #define P3DC3 PWM3CONbits.P3DC3 // bit 3
5029 #define P3DC4 PWM3CONbits.P3DC4 // bit 4
5030 #define P3DC5 PWM3CONbits.P3DC5 // bit 5
5031 #define P3DC6 PWM3CONbits.P3DC6 // bit 6
5032 #define P3RSEN PWM3CONbits.P3RSEN // bit 7
5034 #define RX9D RCSTAbits.RX9D // bit 0
5035 #define OERR RCSTAbits.OERR // bit 1
5036 #define FERR RCSTAbits.FERR // bit 2
5037 #define ADDEN RCSTAbits.ADDEN // bit 3
5038 #define CREN RCSTAbits.CREN // bit 4
5039 #define SREN RCSTAbits.SREN // bit 5
5040 #define RX9 RCSTAbits.RX9 // bit 6
5041 #define SPEN RCSTAbits.SPEN // bit 7
5043 #define SRPR SRCON0bits.SRPR // bit 0
5044 #define SRPS SRCON0bits.SRPS // bit 1
5045 #define SRNQEN SRCON0bits.SRNQEN // bit 2
5046 #define SRQEN SRCON0bits.SRQEN // bit 3
5047 #define SRCLK0 SRCON0bits.SRCLK0 // bit 4
5048 #define SRCLK1 SRCON0bits.SRCLK1 // bit 5
5049 #define SRCLK2 SRCON0bits.SRCLK2 // bit 6
5050 #define SRLEN SRCON0bits.SRLEN // bit 7
5052 #define SRRC1E SRCON1bits.SRRC1E // bit 0
5053 #define SRRC2E SRCON1bits.SRRC2E // bit 1
5054 #define SRRCKE SRCON1bits.SRRCKE // bit 2
5055 #define SRRPE SRCON1bits.SRRPE // bit 3
5056 #define SRSC1E SRCON1bits.SRSC1E // bit 4
5057 #define SRSC2E SRCON1bits.SRSC2E // bit 5
5058 #define SRSCKE SRCON1bits.SRSCKE // bit 6
5059 #define SRSPE SRCON1bits.SRSPE // bit 7
5061 #define SSPM0 SSPCONbits.SSPM0 // bit 0
5062 #define SSPM1 SSPCONbits.SSPM1 // bit 1
5063 #define SSPM2 SSPCONbits.SSPM2 // bit 2
5064 #define SSPM3 SSPCONbits.SSPM3 // bit 3
5065 #define CKP SSPCONbits.CKP // bit 4
5066 #define SSPEN SSPCONbits.SSPEN // bit 5
5067 #define SSPOV SSPCONbits.SSPOV // bit 6
5068 #define WCOL SSPCONbits.WCOL // bit 7
5070 #define SEN SSPCON2bits.SEN // bit 0
5071 #define RSEN SSPCON2bits.RSEN // bit 1
5072 #define PEN SSPCON2bits.PEN // bit 2
5073 #define RCEN SSPCON2bits.RCEN // bit 3
5074 #define ACKEN SSPCON2bits.ACKEN // bit 4
5075 #define ACKDT SSPCON2bits.ACKDT // bit 5
5076 #define ACKSTAT SSPCON2bits.ACKSTAT // bit 6
5077 #define GCEN SSPCON2bits.GCEN // bit 7
5079 #define DHEN SSPCON3bits.DHEN // bit 0
5080 #define AHEN SSPCON3bits.AHEN // bit 1
5081 #define SBCDE SSPCON3bits.SBCDE // bit 2
5082 #define SDAHT SSPCON3bits.SDAHT // bit 3
5083 #define BOEN SSPCON3bits.BOEN // bit 4
5084 #define SCIE SSPCON3bits.SCIE // bit 5
5085 #define PCIE SSPCON3bits.PCIE // bit 6
5086 #define ACKTIM SSPCON3bits.ACKTIM // bit 7
5088 #define BF SSPSTATbits.BF // bit 0
5089 #define UA SSPSTATbits.UA // bit 1
5090 #define R_NOT_W SSPSTATbits.R_NOT_W // bit 2
5091 #define S SSPSTATbits.S // bit 3
5092 #define P SSPSTATbits.P // bit 4
5093 #define D_NOT_A SSPSTATbits.D_NOT_A // bit 5
5094 #define CKE SSPSTATbits.CKE // bit 6
5095 #define SMP SSPSTATbits.SMP // bit 7
5097 #define C STATUSbits.C // bit 0
5098 #define DC STATUSbits.DC // bit 1
5099 #define Z STATUSbits.Z // bit 2
5100 #define NOT_PD STATUSbits.NOT_PD // bit 3
5101 #define NOT_TO STATUSbits.NOT_TO // bit 4
5103 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
5104 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
5105 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
5107 #define TMR1ON T1CONbits.TMR1ON // bit 0
5108 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
5109 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
5110 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
5111 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
5112 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
5113 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
5115 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
5116 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
5117 #define T1GVAL T1GCONbits.T1GVAL // bit 2
5118 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3, shadows bit in T1GCONbits
5119 #define T1GGO T1GCONbits.T1GGO // bit 3, shadows bit in T1GCONbits
5120 #define T1GSPM T1GCONbits.T1GSPM // bit 4
5121 #define T1GTM T1GCONbits.T1GTM // bit 5
5122 #define T1GPOL T1GCONbits.T1GPOL // bit 6
5123 #define TMR1GE T1GCONbits.TMR1GE // bit 7
5125 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
5126 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
5127 #define TMR2ON T2CONbits.TMR2ON // bit 2
5128 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
5129 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
5130 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
5131 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
5133 #define T4CKPS0 T4CONbits.T4CKPS0 // bit 0
5134 #define T4CKPS1 T4CONbits.T4CKPS1 // bit 1
5135 #define TMR4ON T4CONbits.TMR4ON // bit 2
5136 #define T4OUTPS0 T4CONbits.T4OUTPS0 // bit 3
5137 #define T4OUTPS1 T4CONbits.T4OUTPS1 // bit 4
5138 #define T4OUTPS2 T4CONbits.T4OUTPS2 // bit 5
5139 #define T4OUTPS3 T4CONbits.T4OUTPS3 // bit 6
5141 #define T6CKPS0 T6CONbits.T6CKPS0 // bit 0
5142 #define T6CKPS1 T6CONbits.T6CKPS1 // bit 1
5143 #define TMR6ON T6CONbits.TMR6ON // bit 2
5144 #define T6OUTPS0 T6CONbits.T6OUTPS0 // bit 3
5145 #define T6OUTPS1 T6CONbits.T6OUTPS1 // bit 4
5146 #define T6OUTPS2 T6CONbits.T6OUTPS2 // bit 5
5147 #define T6OUTPS3 T6CONbits.T6OUTPS3 // bit 6
5149 #define TRISA0 TRISAbits.TRISA0 // bit 0
5150 #define TRISA1 TRISAbits.TRISA1 // bit 1
5151 #define TRISA2 TRISAbits.TRISA2 // bit 2
5152 #define TRISA3 TRISAbits.TRISA3 // bit 3
5153 #define TRISA4 TRISAbits.TRISA4 // bit 4
5154 #define TRISA5 TRISAbits.TRISA5 // bit 5
5155 #define TRISA6 TRISAbits.TRISA6 // bit 6
5156 #define TRISA7 TRISAbits.TRISA7 // bit 7
5158 #define TRISB0 TRISBbits.TRISB0 // bit 0
5159 #define TRISB1 TRISBbits.TRISB1 // bit 1
5160 #define TRISB2 TRISBbits.TRISB2 // bit 2
5161 #define TRISB3 TRISBbits.TRISB3 // bit 3
5162 #define TRISB4 TRISBbits.TRISB4 // bit 4
5163 #define TRISB5 TRISBbits.TRISB5 // bit 5
5164 #define TRISB6 TRISBbits.TRISB6 // bit 6
5165 #define TRISB7 TRISBbits.TRISB7 // bit 7
5167 #define TRISC0 TRISCbits.TRISC0 // bit 0
5168 #define TRISC1 TRISCbits.TRISC1 // bit 1
5169 #define TRISC2 TRISCbits.TRISC2 // bit 2
5170 #define TRISC3 TRISCbits.TRISC3 // bit 3
5171 #define TRISC4 TRISCbits.TRISC4 // bit 4
5172 #define TRISC5 TRISCbits.TRISC5 // bit 5
5173 #define TRISC6 TRISCbits.TRISC6 // bit 6
5174 #define TRISC7 TRISCbits.TRISC7 // bit 7
5176 #define TRISD0 TRISDbits.TRISD0 // bit 0
5177 #define TRISD1 TRISDbits.TRISD1 // bit 1
5178 #define TRISD2 TRISDbits.TRISD2 // bit 2
5179 #define TRISD3 TRISDbits.TRISD3 // bit 3
5180 #define TRISD4 TRISDbits.TRISD4 // bit 4
5181 #define TRISD5 TRISDbits.TRISD5 // bit 5
5182 #define TRISD6 TRISDbits.TRISD6 // bit 6
5183 #define TRISD7 TRISDbits.TRISD7 // bit 7
5185 #define TRISE0 TRISEbits.TRISE0 // bit 0
5186 #define TRISE1 TRISEbits.TRISE1 // bit 1
5187 #define TRISE2 TRISEbits.TRISE2 // bit 2
5188 #define TRISE3 TRISEbits.TRISE3 // bit 3
5190 #define TX9D TXSTAbits.TX9D // bit 0
5191 #define TRMT TXSTAbits.TRMT // bit 1
5192 #define BRGH TXSTAbits.BRGH // bit 2
5193 #define SENDB TXSTAbits.SENDB // bit 3
5194 #define SYNC TXSTAbits.SYNC // bit 4
5195 #define TXEN TXSTAbits.TXEN // bit 5
5196 #define TX9 TXSTAbits.TX9 // bit 6
5197 #define CSRC TXSTAbits.CSRC // bit 7
5199 #define SWDTEN WDTCONbits.SWDTEN // bit 0
5200 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
5201 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
5202 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
5203 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
5204 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
5206 #define WPUB0 WPUBbits.WPUB0 // bit 0
5207 #define WPUB1 WPUBbits.WPUB1 // bit 1
5208 #define WPUB2 WPUBbits.WPUB2 // bit 2
5209 #define WPUB3 WPUBbits.WPUB3 // bit 3
5210 #define WPUB4 WPUBbits.WPUB4 // bit 4
5211 #define WPUB5 WPUBbits.WPUB5 // bit 5
5212 #define WPUB6 WPUBbits.WPUB6 // bit 6
5213 #define WPUB7 WPUBbits.WPUB7 // bit 7
5215 #define WPUE3 WPUEbits.WPUE3 // bit 3
5217 #endif // #ifndef NO_BIT_DEFINES
5219 #endif // #ifndef __PIC16F1934_H__