struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f1783.h
blob8c5a5548715c688949f7ad19089cdd101f7702f6
1 /*
2 * This declarations of the PIC16F1783 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:17 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 __PIC16F1783_H__
26 #define __PIC16F1783_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF0_ADDR 0x0000
37 #define INDF1_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR0_ADDR 0x0004
41 #define FSR0L_ADDR 0x0004
42 #define FSR0H_ADDR 0x0005
43 #define FSR1_ADDR 0x0006
44 #define FSR1L_ADDR 0x0006
45 #define FSR1H_ADDR 0x0007
46 #define BSR_ADDR 0x0008
47 #define WREG_ADDR 0x0009
48 #define PCLATH_ADDR 0x000A
49 #define INTCON_ADDR 0x000B
50 #define PORTA_ADDR 0x000C
51 #define PORTB_ADDR 0x000D
52 #define PORTC_ADDR 0x000E
53 #define PORTE_ADDR 0x0010
54 #define PIR1_ADDR 0x0011
55 #define PIR2_ADDR 0x0012
56 #define PIR4_ADDR 0x0014
57 #define TMR0_ADDR 0x0015
58 #define TMR1_ADDR 0x0016
59 #define TMR1L_ADDR 0x0016
60 #define TMR1H_ADDR 0x0017
61 #define T1CON_ADDR 0x0018
62 #define T1GCON_ADDR 0x0019
63 #define TMR2_ADDR 0x001A
64 #define PR2_ADDR 0x001B
65 #define T2CON_ADDR 0x001C
66 #define TRISA_ADDR 0x008C
67 #define TRISB_ADDR 0x008D
68 #define TRISC_ADDR 0x008E
69 #define TRISE_ADDR 0x0090
70 #define PIE1_ADDR 0x0091
71 #define PIE2_ADDR 0x0092
72 #define PIE4_ADDR 0x0094
73 #define OPTION_REG_ADDR 0x0095
74 #define PCON_ADDR 0x0096
75 #define WDTCON_ADDR 0x0097
76 #define OSCTUNE_ADDR 0x0098
77 #define OSCCON_ADDR 0x0099
78 #define OSCSTAT_ADDR 0x009A
79 #define ADRES_ADDR 0x009B
80 #define ADRESL_ADDR 0x009B
81 #define ADRESH_ADDR 0x009C
82 #define ADCON0_ADDR 0x009D
83 #define ADCON1_ADDR 0x009E
84 #define ADCON2_ADDR 0x009F
85 #define LATA_ADDR 0x010C
86 #define LATB_ADDR 0x010D
87 #define LATC_ADDR 0x010E
88 #define CM1CON0_ADDR 0x0111
89 #define CM1CON1_ADDR 0x0112
90 #define CM2CON0_ADDR 0x0113
91 #define CM2CON1_ADDR 0x0114
92 #define CMOUT_ADDR 0x0115
93 #define BORCON_ADDR 0x0116
94 #define FVRCON_ADDR 0x0117
95 #define DACCON0_ADDR 0x0118
96 #define DACCON1_ADDR 0x0119
97 #define APFCON_ADDR 0x011D
98 #define APFCON0_ADDR 0x011D
99 #define CM3CON0_ADDR 0x011E
100 #define CM3CON1_ADDR 0x011F
101 #define ANSELA_ADDR 0x018C
102 #define ANSELB_ADDR 0x018D
103 #define EEADR_ADDR 0x0191
104 #define EEADRL_ADDR 0x0191
105 #define EEADRH_ADDR 0x0192
106 #define EEDAT_ADDR 0x0193
107 #define EEDATL_ADDR 0x0193
108 #define EEDATH_ADDR 0x0194
109 #define EECON1_ADDR 0x0195
110 #define EECON2_ADDR 0x0196
111 #define VREGCON_ADDR 0x0197
112 #define RC1REG_ADDR 0x0199
113 #define RCREG_ADDR 0x0199
114 #define RCREG1_ADDR 0x0199
115 #define TX1REG_ADDR 0x019A
116 #define TXREG_ADDR 0x019A
117 #define TXREG1_ADDR 0x019A
118 #define SP1BRG_ADDR 0x019B
119 #define SP1BRGL_ADDR 0x019B
120 #define SPBRG_ADDR 0x019B
121 #define SPBRG1_ADDR 0x019B
122 #define SPBRGL_ADDR 0x019B
123 #define SP1BRGH_ADDR 0x019C
124 #define SPBRGH_ADDR 0x019C
125 #define SPBRGH1_ADDR 0x019C
126 #define RC1STA_ADDR 0x019D
127 #define RCSTA_ADDR 0x019D
128 #define RCSTA1_ADDR 0x019D
129 #define TX1STA_ADDR 0x019E
130 #define TXSTA_ADDR 0x019E
131 #define TXSTA1_ADDR 0x019E
132 #define BAUD1CON_ADDR 0x019F
133 #define BAUDCON_ADDR 0x019F
134 #define BAUDCON1_ADDR 0x019F
135 #define BAUDCTL_ADDR 0x019F
136 #define BAUDCTL1_ADDR 0x019F
137 #define WPUA_ADDR 0x020C
138 #define WPUB_ADDR 0x020D
139 #define WPUC_ADDR 0x020E
140 #define WPUE_ADDR 0x0210
141 #define SSP1BUF_ADDR 0x0211
142 #define SSPBUF_ADDR 0x0211
143 #define SSP1ADD_ADDR 0x0212
144 #define SSPADD_ADDR 0x0212
145 #define SSP1MSK_ADDR 0x0213
146 #define SSPMSK_ADDR 0x0213
147 #define SSP1STAT_ADDR 0x0214
148 #define SSPSTAT_ADDR 0x0214
149 #define SSP1CON_ADDR 0x0215
150 #define SSPCON_ADDR 0x0215
151 #define SSPCON1_ADDR 0x0215
152 #define SSP1CON2_ADDR 0x0216
153 #define SSPCON2_ADDR 0x0216
154 #define SSP1CON3_ADDR 0x0217
155 #define SSPCON3_ADDR 0x0217
156 #define ODCONA_ADDR 0x028C
157 #define ODCONB_ADDR 0x028D
158 #define ODCONC_ADDR 0x028E
159 #define CCPR1_ADDR 0x0291
160 #define CCPR1L_ADDR 0x0291
161 #define CCPR1H_ADDR 0x0292
162 #define CCP1CON_ADDR 0x0293
163 #define CCPR2_ADDR 0x0298
164 #define CCPR2L_ADDR 0x0298
165 #define CCPR2H_ADDR 0x0299
166 #define CCP2CON_ADDR 0x029A
167 #define SLRCONA_ADDR 0x030C
168 #define SLRCONB_ADDR 0x030D
169 #define SLRCONC_ADDR 0x030E
170 #define INLVLA_ADDR 0x038C
171 #define INLVLB_ADDR 0x038D
172 #define INLVLC_ADDR 0x038E
173 #define INLVLE_ADDR 0x0390
174 #define IOCAP_ADDR 0x0391
175 #define IOCAN_ADDR 0x0392
176 #define IOCAF_ADDR 0x0393
177 #define IOCBP_ADDR 0x0394
178 #define IOCBN_ADDR 0x0395
179 #define IOCBF_ADDR 0x0396
180 #define IOCCP_ADDR 0x0397
181 #define IOCCN_ADDR 0x0398
182 #define IOCCF_ADDR 0x0399
183 #define IOCEP_ADDR 0x039D
184 #define IOCEN_ADDR 0x039E
185 #define IOCEF_ADDR 0x039F
186 #define OPA1CON_ADDR 0x0511
187 #define OPA2CON_ADDR 0x0513
188 #define CLKRCON_ADDR 0x051A
189 #define PSMC1CON_ADDR 0x0811
190 #define PSMC1MDL_ADDR 0x0812
191 #define PSMC1SYNC_ADDR 0x0813
192 #define PSMC1CLK_ADDR 0x0814
193 #define PSMC1OEN_ADDR 0x0815
194 #define PSMC1POL_ADDR 0x0816
195 #define PSMC1BLNK_ADDR 0x0817
196 #define PSMC1REBS_ADDR 0x0818
197 #define PSMC1FEBS_ADDR 0x0819
198 #define PSMC1PHS_ADDR 0x081A
199 #define PSMC1DCS_ADDR 0x081B
200 #define PSMC1PRS_ADDR 0x081C
201 #define PSMC1ASDC_ADDR 0x081D
202 #define PSMC1ASDL_ADDR 0x081E
203 #define PSMC1ASDS_ADDR 0x081F
204 #define PSMC1INT_ADDR 0x0820
205 #define PSMC1PH_ADDR 0x0821
206 #define PSMC1PHL_ADDR 0x0821
207 #define PSMC1PHH_ADDR 0x0822
208 #define PSMC1DC_ADDR 0x0823
209 #define PSMC1DCL_ADDR 0x0823
210 #define PSMC1DCH_ADDR 0x0824
211 #define PSMC1PR_ADDR 0x0825
212 #define PSMC1PRL_ADDR 0x0825
213 #define PSMC1PRH_ADDR 0x0826
214 #define PSMC1TMR_ADDR 0x0827
215 #define PSMC1TMRL_ADDR 0x0827
216 #define PSMC1TMRH_ADDR 0x0828
217 #define PSMC1DBR_ADDR 0x0829
218 #define PSMC1DBF_ADDR 0x082A
219 #define PSMC1BLKR_ADDR 0x082B
220 #define PSMC1BLKF_ADDR 0x082C
221 #define PSMC1FFA_ADDR 0x082D
222 #define PSMC1STR0_ADDR 0x082E
223 #define PSMC1STR1_ADDR 0x082F
224 #define PSMC2CON_ADDR 0x0831
225 #define PSMC2MDL_ADDR 0x0832
226 #define PSMC2SYNC_ADDR 0x0833
227 #define PSMC2CLK_ADDR 0x0834
228 #define PSMC2OEN_ADDR 0x0835
229 #define PSMC2POL_ADDR 0x0836
230 #define PSMC2BLNK_ADDR 0x0837
231 #define PSMC2REBS_ADDR 0x0838
232 #define PSMC2FEBS_ADDR 0x0839
233 #define PSMC2PHS_ADDR 0x083A
234 #define PSMC2DCS_ADDR 0x083B
235 #define PSMC2PRS_ADDR 0x083C
236 #define PSMC2ASDC_ADDR 0x083D
237 #define PSMC2ASDL_ADDR 0x083E
238 #define PSMC2ASDS_ADDR 0x083F
239 #define PSMC2INT_ADDR 0x0840
240 #define PSMC2PH_ADDR 0x0841
241 #define PSMC2PHL_ADDR 0x0841
242 #define PSMC2PHH_ADDR 0x0842
243 #define PSMC2DC_ADDR 0x0843
244 #define PSMC2DCL_ADDR 0x0843
245 #define PSMC2DCH_ADDR 0x0844
246 #define PSMC2PR_ADDR 0x0845
247 #define PSMC2PRL_ADDR 0x0845
248 #define PSMC2PRH_ADDR 0x0846
249 #define PSMC2TMR_ADDR 0x0847
250 #define PSMC2TMRL_ADDR 0x0847
251 #define PSMC2TMRH_ADDR 0x0848
252 #define PSMC2DBR_ADDR 0x0849
253 #define PSMC2DBF_ADDR 0x084A
254 #define PSMC2BLKR_ADDR 0x084B
255 #define PSMC2BLKF_ADDR 0x084C
256 #define PSMC2FFA_ADDR 0x084D
257 #define PSMC2STR0_ADDR 0x084E
258 #define PSMC2STR1_ADDR 0x084F
259 #define STATUS_SHAD_ADDR 0x0FE4
260 #define WREG_SHAD_ADDR 0x0FE5
261 #define BSR_SHAD_ADDR 0x0FE6
262 #define PCLATH_SHAD_ADDR 0x0FE7
263 #define FSR0L_SHAD_ADDR 0x0FE8
264 #define FSR0H_SHAD_ADDR 0x0FE9
265 #define FSR1L_SHAD_ADDR 0x0FEA
266 #define FSR1H_SHAD_ADDR 0x0FEB
267 #define STKPTR_ADDR 0x0FED
268 #define TOSL_ADDR 0x0FEE
269 #define TOSH_ADDR 0x0FEF
271 #endif // #ifndef NO_ADDR_DEFINES
273 //==============================================================================
275 // Register Definitions
277 //==============================================================================
279 extern __at(0x0000) __sfr INDF0;
280 extern __at(0x0001) __sfr INDF1;
281 extern __at(0x0002) __sfr PCL;
283 //==============================================================================
284 // STATUS Bits
286 extern __at(0x0003) __sfr STATUS;
288 typedef struct
290 unsigned C : 1;
291 unsigned DC : 1;
292 unsigned Z : 1;
293 unsigned NOT_PD : 1;
294 unsigned NOT_TO : 1;
295 unsigned : 1;
296 unsigned : 1;
297 unsigned : 1;
298 } __STATUSbits_t;
300 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
302 #define _C 0x01
303 #define _DC 0x02
304 #define _Z 0x04
305 #define _NOT_PD 0x08
306 #define _NOT_TO 0x10
308 //==============================================================================
310 extern __at(0x0004) __sfr FSR0;
311 extern __at(0x0004) __sfr FSR0L;
312 extern __at(0x0005) __sfr FSR0H;
313 extern __at(0x0006) __sfr FSR1;
314 extern __at(0x0006) __sfr FSR1L;
315 extern __at(0x0007) __sfr FSR1H;
317 //==============================================================================
318 // BSR Bits
320 extern __at(0x0008) __sfr BSR;
322 typedef union
324 struct
326 unsigned BSR0 : 1;
327 unsigned BSR1 : 1;
328 unsigned BSR2 : 1;
329 unsigned BSR3 : 1;
330 unsigned BSR4 : 1;
331 unsigned : 1;
332 unsigned : 1;
333 unsigned : 1;
336 struct
338 unsigned BSR : 5;
339 unsigned : 3;
341 } __BSRbits_t;
343 extern __at(0x0008) volatile __BSRbits_t BSRbits;
345 #define _BSR0 0x01
346 #define _BSR1 0x02
347 #define _BSR2 0x04
348 #define _BSR3 0x08
349 #define _BSR4 0x10
351 //==============================================================================
353 extern __at(0x0009) __sfr WREG;
354 extern __at(0x000A) __sfr PCLATH;
356 //==============================================================================
357 // INTCON Bits
359 extern __at(0x000B) __sfr INTCON;
361 typedef union
363 struct
365 unsigned IOCIF : 1;
366 unsigned INTF : 1;
367 unsigned TMR0IF : 1;
368 unsigned IOCIE : 1;
369 unsigned INTE : 1;
370 unsigned TMR0IE : 1;
371 unsigned PEIE : 1;
372 unsigned GIE : 1;
375 struct
377 unsigned : 1;
378 unsigned : 1;
379 unsigned T0IF : 1;
380 unsigned : 1;
381 unsigned : 1;
382 unsigned T0IE : 1;
383 unsigned : 1;
384 unsigned : 1;
386 } __INTCONbits_t;
388 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
390 #define _IOCIF 0x01
391 #define _INTF 0x02
392 #define _TMR0IF 0x04
393 #define _T0IF 0x04
394 #define _IOCIE 0x08
395 #define _INTE 0x10
396 #define _TMR0IE 0x20
397 #define _T0IE 0x20
398 #define _PEIE 0x40
399 #define _GIE 0x80
401 //==============================================================================
404 //==============================================================================
405 // PORTA Bits
407 extern __at(0x000C) __sfr PORTA;
409 typedef struct
411 unsigned RA0 : 1;
412 unsigned RA1 : 1;
413 unsigned RA2 : 1;
414 unsigned RA3 : 1;
415 unsigned RA4 : 1;
416 unsigned RA5 : 1;
417 unsigned RA6 : 1;
418 unsigned RA7 : 1;
419 } __PORTAbits_t;
421 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
423 #define _RA0 0x01
424 #define _RA1 0x02
425 #define _RA2 0x04
426 #define _RA3 0x08
427 #define _RA4 0x10
428 #define _RA5 0x20
429 #define _RA6 0x40
430 #define _RA7 0x80
432 //==============================================================================
435 //==============================================================================
436 // PORTB Bits
438 extern __at(0x000D) __sfr PORTB;
440 typedef struct
442 unsigned RB0 : 1;
443 unsigned RB1 : 1;
444 unsigned RB2 : 1;
445 unsigned RB3 : 1;
446 unsigned RB4 : 1;
447 unsigned RB5 : 1;
448 unsigned RB6 : 1;
449 unsigned RB7 : 1;
450 } __PORTBbits_t;
452 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
454 #define _RB0 0x01
455 #define _RB1 0x02
456 #define _RB2 0x04
457 #define _RB3 0x08
458 #define _RB4 0x10
459 #define _RB5 0x20
460 #define _RB6 0x40
461 #define _RB7 0x80
463 //==============================================================================
466 //==============================================================================
467 // PORTC Bits
469 extern __at(0x000E) __sfr PORTC;
471 typedef struct
473 unsigned RC0 : 1;
474 unsigned RC1 : 1;
475 unsigned RC2 : 1;
476 unsigned RC3 : 1;
477 unsigned RC4 : 1;
478 unsigned RC5 : 1;
479 unsigned RC6 : 1;
480 unsigned RC7 : 1;
481 } __PORTCbits_t;
483 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
485 #define _RC0 0x01
486 #define _RC1 0x02
487 #define _RC2 0x04
488 #define _RC3 0x08
489 #define _RC4 0x10
490 #define _RC5 0x20
491 #define _RC6 0x40
492 #define _RC7 0x80
494 //==============================================================================
497 //==============================================================================
498 // PORTE Bits
500 extern __at(0x0010) __sfr PORTE;
502 typedef struct
504 unsigned : 1;
505 unsigned : 1;
506 unsigned : 1;
507 unsigned RE3 : 1;
508 unsigned : 1;
509 unsigned : 1;
510 unsigned : 1;
511 unsigned : 1;
512 } __PORTEbits_t;
514 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
516 #define _RE3 0x08
518 //==============================================================================
521 //==============================================================================
522 // PIR1 Bits
524 extern __at(0x0011) __sfr PIR1;
526 typedef struct
528 unsigned TMR1IF : 1;
529 unsigned TMR2IF : 1;
530 unsigned CCP1IF : 1;
531 unsigned SSP1IF : 1;
532 unsigned TXIF : 1;
533 unsigned RCIF : 1;
534 unsigned ADIF : 1;
535 unsigned TMR1GIF : 1;
536 } __PIR1bits_t;
538 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
540 #define _TMR1IF 0x01
541 #define _TMR2IF 0x02
542 #define _CCP1IF 0x04
543 #define _SSP1IF 0x08
544 #define _TXIF 0x10
545 #define _RCIF 0x20
546 #define _ADIF 0x40
547 #define _TMR1GIF 0x80
549 //==============================================================================
552 //==============================================================================
553 // PIR2 Bits
555 extern __at(0x0012) __sfr PIR2;
557 typedef struct
559 unsigned CCP2IF : 1;
560 unsigned C3IF : 1;
561 unsigned : 1;
562 unsigned BCL1IF : 1;
563 unsigned EEIF : 1;
564 unsigned C1IF : 1;
565 unsigned C2IF : 1;
566 unsigned OSFIF : 1;
567 } __PIR2bits_t;
569 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
571 #define _CCP2IF 0x01
572 #define _C3IF 0x02
573 #define _BCL1IF 0x08
574 #define _EEIF 0x10
575 #define _C1IF 0x20
576 #define _C2IF 0x40
577 #define _OSFIF 0x80
579 //==============================================================================
582 //==============================================================================
583 // PIR4 Bits
585 extern __at(0x0014) __sfr PIR4;
587 typedef struct
589 unsigned PSMC1SIF : 1;
590 unsigned PSMC2SIF : 1;
591 unsigned : 1;
592 unsigned : 1;
593 unsigned PSMC1TIF : 1;
594 unsigned PSMC2TIF : 1;
595 unsigned : 1;
596 unsigned : 1;
597 } __PIR4bits_t;
599 extern __at(0x0014) volatile __PIR4bits_t PIR4bits;
601 #define _PSMC1SIF 0x01
602 #define _PSMC2SIF 0x02
603 #define _PSMC1TIF 0x10
604 #define _PSMC2TIF 0x20
606 //==============================================================================
608 extern __at(0x0015) __sfr TMR0;
609 extern __at(0x0016) __sfr TMR1;
610 extern __at(0x0016) __sfr TMR1L;
611 extern __at(0x0017) __sfr TMR1H;
613 //==============================================================================
614 // T1CON Bits
616 extern __at(0x0018) __sfr T1CON;
618 typedef union
620 struct
622 unsigned TMR1ON : 1;
623 unsigned : 1;
624 unsigned NOT_T1SYNC : 1;
625 unsigned T1OSCEN : 1;
626 unsigned T1CKPS0 : 1;
627 unsigned T1CKPS1 : 1;
628 unsigned TMR1CS0 : 1;
629 unsigned TMR1CS1 : 1;
632 struct
634 unsigned : 4;
635 unsigned T1CKPS : 2;
636 unsigned : 2;
639 struct
641 unsigned : 6;
642 unsigned TMR1CS : 2;
644 } __T1CONbits_t;
646 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
648 #define _TMR1ON 0x01
649 #define _NOT_T1SYNC 0x04
650 #define _T1OSCEN 0x08
651 #define _T1CKPS0 0x10
652 #define _T1CKPS1 0x20
653 #define _TMR1CS0 0x40
654 #define _TMR1CS1 0x80
656 //==============================================================================
659 //==============================================================================
660 // T1GCON Bits
662 extern __at(0x0019) __sfr T1GCON;
664 typedef union
666 struct
668 unsigned T1GSS0 : 1;
669 unsigned T1GSS1 : 1;
670 unsigned T1GVAL : 1;
671 unsigned T1GGO : 1;
672 unsigned T1GSPM : 1;
673 unsigned T1GTM : 1;
674 unsigned T1GPOL : 1;
675 unsigned TMR1GE : 1;
678 struct
680 unsigned T1GSS : 2;
681 unsigned : 6;
683 } __T1GCONbits_t;
685 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
687 #define _T1GSS0 0x01
688 #define _T1GSS1 0x02
689 #define _T1GVAL 0x04
690 #define _T1GGO 0x08
691 #define _T1GSPM 0x10
692 #define _T1GTM 0x20
693 #define _T1GPOL 0x40
694 #define _TMR1GE 0x80
696 //==============================================================================
698 extern __at(0x001A) __sfr TMR2;
699 extern __at(0x001B) __sfr PR2;
701 //==============================================================================
702 // T2CON Bits
704 extern __at(0x001C) __sfr T2CON;
706 typedef union
708 struct
710 unsigned T2CKPS0 : 1;
711 unsigned T2CKPS1 : 1;
712 unsigned TMR2ON : 1;
713 unsigned T2OUTPS0 : 1;
714 unsigned T2OUTPS1 : 1;
715 unsigned T2OUTPS2 : 1;
716 unsigned T2OUTPS3 : 1;
717 unsigned : 1;
720 struct
722 unsigned T2CKPS : 2;
723 unsigned : 6;
726 struct
728 unsigned : 3;
729 unsigned T2OUTPS : 4;
730 unsigned : 1;
732 } __T2CONbits_t;
734 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
736 #define _T2CKPS0 0x01
737 #define _T2CKPS1 0x02
738 #define _TMR2ON 0x04
739 #define _T2OUTPS0 0x08
740 #define _T2OUTPS1 0x10
741 #define _T2OUTPS2 0x20
742 #define _T2OUTPS3 0x40
744 //==============================================================================
747 //==============================================================================
748 // TRISA Bits
750 extern __at(0x008C) __sfr TRISA;
752 typedef struct
754 unsigned TRISA0 : 1;
755 unsigned TRISA1 : 1;
756 unsigned TRISA2 : 1;
757 unsigned TRISA3 : 1;
758 unsigned TRISA4 : 1;
759 unsigned TRISA5 : 1;
760 unsigned TRISA6 : 1;
761 unsigned TRISA7 : 1;
762 } __TRISAbits_t;
764 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
766 #define _TRISA0 0x01
767 #define _TRISA1 0x02
768 #define _TRISA2 0x04
769 #define _TRISA3 0x08
770 #define _TRISA4 0x10
771 #define _TRISA5 0x20
772 #define _TRISA6 0x40
773 #define _TRISA7 0x80
775 //==============================================================================
778 //==============================================================================
779 // TRISB Bits
781 extern __at(0x008D) __sfr TRISB;
783 typedef struct
785 unsigned TRISB0 : 1;
786 unsigned TRISB1 : 1;
787 unsigned TRISB2 : 1;
788 unsigned TRISB3 : 1;
789 unsigned TRISB4 : 1;
790 unsigned TRISB5 : 1;
791 unsigned TRISB6 : 1;
792 unsigned TRISB7 : 1;
793 } __TRISBbits_t;
795 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
797 #define _TRISB0 0x01
798 #define _TRISB1 0x02
799 #define _TRISB2 0x04
800 #define _TRISB3 0x08
801 #define _TRISB4 0x10
802 #define _TRISB5 0x20
803 #define _TRISB6 0x40
804 #define _TRISB7 0x80
806 //==============================================================================
809 //==============================================================================
810 // TRISC Bits
812 extern __at(0x008E) __sfr TRISC;
814 typedef struct
816 unsigned TRISC0 : 1;
817 unsigned TRISC1 : 1;
818 unsigned TRISC2 : 1;
819 unsigned TRISC3 : 1;
820 unsigned TRISC4 : 1;
821 unsigned TRISC5 : 1;
822 unsigned TRISC6 : 1;
823 unsigned TRISC7 : 1;
824 } __TRISCbits_t;
826 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
828 #define _TRISC0 0x01
829 #define _TRISC1 0x02
830 #define _TRISC2 0x04
831 #define _TRISC3 0x08
832 #define _TRISC4 0x10
833 #define _TRISC5 0x20
834 #define _TRISC6 0x40
835 #define _TRISC7 0x80
837 //==============================================================================
840 //==============================================================================
841 // TRISE Bits
843 extern __at(0x0090) __sfr TRISE;
845 typedef struct
847 unsigned : 1;
848 unsigned : 1;
849 unsigned : 1;
850 unsigned TRISE3 : 1;
851 unsigned : 1;
852 unsigned : 1;
853 unsigned : 1;
854 unsigned : 1;
855 } __TRISEbits_t;
857 extern __at(0x0090) volatile __TRISEbits_t TRISEbits;
859 #define _TRISE3 0x08
861 //==============================================================================
864 //==============================================================================
865 // PIE1 Bits
867 extern __at(0x0091) __sfr PIE1;
869 typedef struct
871 unsigned TMR1IE : 1;
872 unsigned TMR2IE : 1;
873 unsigned CCP1IE : 1;
874 unsigned SSP1IE : 1;
875 unsigned TXIE : 1;
876 unsigned RCIE : 1;
877 unsigned ADIE : 1;
878 unsigned TMR1GIE : 1;
879 } __PIE1bits_t;
881 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
883 #define _TMR1IE 0x01
884 #define _TMR2IE 0x02
885 #define _CCP1IE 0x04
886 #define _SSP1IE 0x08
887 #define _TXIE 0x10
888 #define _RCIE 0x20
889 #define _ADIE 0x40
890 #define _TMR1GIE 0x80
892 //==============================================================================
895 //==============================================================================
896 // PIE2 Bits
898 extern __at(0x0092) __sfr PIE2;
900 typedef struct
902 unsigned CCP2IE : 1;
903 unsigned C3IE : 1;
904 unsigned : 1;
905 unsigned BCL1IE : 1;
906 unsigned EEIE : 1;
907 unsigned C1IE : 1;
908 unsigned C2IE : 1;
909 unsigned OSFIE : 1;
910 } __PIE2bits_t;
912 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
914 #define _CCP2IE 0x01
915 #define _C3IE 0x02
916 #define _BCL1IE 0x08
917 #define _EEIE 0x10
918 #define _C1IE 0x20
919 #define _C2IE 0x40
920 #define _OSFIE 0x80
922 //==============================================================================
925 //==============================================================================
926 // PIE4 Bits
928 extern __at(0x0094) __sfr PIE4;
930 typedef struct
932 unsigned PSMC1SIE : 1;
933 unsigned PSMC2SIE : 1;
934 unsigned : 1;
935 unsigned : 1;
936 unsigned PSMC1TIE : 1;
937 unsigned PSMC2TIE : 1;
938 unsigned : 1;
939 unsigned : 1;
940 } __PIE4bits_t;
942 extern __at(0x0094) volatile __PIE4bits_t PIE4bits;
944 #define _PSMC1SIE 0x01
945 #define _PSMC2SIE 0x02
946 #define _PSMC1TIE 0x10
947 #define _PSMC2TIE 0x20
949 //==============================================================================
952 //==============================================================================
953 // OPTION_REG Bits
955 extern __at(0x0095) __sfr OPTION_REG;
957 typedef union
959 struct
961 unsigned PS0 : 1;
962 unsigned PS1 : 1;
963 unsigned PS2 : 1;
964 unsigned PSA : 1;
965 unsigned TMR0SE : 1;
966 unsigned TMR0CS : 1;
967 unsigned INTEDG : 1;
968 unsigned NOT_WPUEN : 1;
971 struct
973 unsigned : 1;
974 unsigned : 1;
975 unsigned : 1;
976 unsigned : 1;
977 unsigned T0SE : 1;
978 unsigned T0CS : 1;
979 unsigned : 1;
980 unsigned : 1;
983 struct
985 unsigned PS : 3;
986 unsigned : 5;
988 } __OPTION_REGbits_t;
990 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
992 #define _PS0 0x01
993 #define _PS1 0x02
994 #define _PS2 0x04
995 #define _PSA 0x08
996 #define _TMR0SE 0x10
997 #define _T0SE 0x10
998 #define _TMR0CS 0x20
999 #define _T0CS 0x20
1000 #define _INTEDG 0x40
1001 #define _NOT_WPUEN 0x80
1003 //==============================================================================
1006 //==============================================================================
1007 // PCON Bits
1009 extern __at(0x0096) __sfr PCON;
1011 typedef struct
1013 unsigned NOT_BOR : 1;
1014 unsigned NOT_POR : 1;
1015 unsigned NOT_RI : 1;
1016 unsigned NOT_RMCLR : 1;
1017 unsigned NOT_RWDT : 1;
1018 unsigned : 1;
1019 unsigned STKUNF : 1;
1020 unsigned STKOVF : 1;
1021 } __PCONbits_t;
1023 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1025 #define _NOT_BOR 0x01
1026 #define _NOT_POR 0x02
1027 #define _NOT_RI 0x04
1028 #define _NOT_RMCLR 0x08
1029 #define _NOT_RWDT 0x10
1030 #define _STKUNF 0x40
1031 #define _STKOVF 0x80
1033 //==============================================================================
1036 //==============================================================================
1037 // WDTCON Bits
1039 extern __at(0x0097) __sfr WDTCON;
1041 typedef union
1043 struct
1045 unsigned SWDTEN : 1;
1046 unsigned WDTPS0 : 1;
1047 unsigned WDTPS1 : 1;
1048 unsigned WDTPS2 : 1;
1049 unsigned WDTPS3 : 1;
1050 unsigned WDTPS4 : 1;
1051 unsigned : 1;
1052 unsigned : 1;
1055 struct
1057 unsigned : 1;
1058 unsigned WDTPS : 5;
1059 unsigned : 2;
1061 } __WDTCONbits_t;
1063 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1065 #define _SWDTEN 0x01
1066 #define _WDTPS0 0x02
1067 #define _WDTPS1 0x04
1068 #define _WDTPS2 0x08
1069 #define _WDTPS3 0x10
1070 #define _WDTPS4 0x20
1072 //==============================================================================
1075 //==============================================================================
1076 // OSCTUNE Bits
1078 extern __at(0x0098) __sfr OSCTUNE;
1080 typedef union
1082 struct
1084 unsigned TUN0 : 1;
1085 unsigned TUN1 : 1;
1086 unsigned TUN2 : 1;
1087 unsigned TUN3 : 1;
1088 unsigned TUN4 : 1;
1089 unsigned TUN5 : 1;
1090 unsigned : 1;
1091 unsigned : 1;
1094 struct
1096 unsigned TUN : 6;
1097 unsigned : 2;
1099 } __OSCTUNEbits_t;
1101 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1103 #define _TUN0 0x01
1104 #define _TUN1 0x02
1105 #define _TUN2 0x04
1106 #define _TUN3 0x08
1107 #define _TUN4 0x10
1108 #define _TUN5 0x20
1110 //==============================================================================
1113 //==============================================================================
1114 // OSCCON Bits
1116 extern __at(0x0099) __sfr OSCCON;
1118 typedef union
1120 struct
1122 unsigned SCS0 : 1;
1123 unsigned SCS1 : 1;
1124 unsigned : 1;
1125 unsigned IRCF0 : 1;
1126 unsigned IRCF1 : 1;
1127 unsigned IRCF2 : 1;
1128 unsigned IRCF3 : 1;
1129 unsigned SPLLEN : 1;
1132 struct
1134 unsigned SCS : 2;
1135 unsigned : 6;
1138 struct
1140 unsigned : 3;
1141 unsigned IRCF : 4;
1142 unsigned : 1;
1144 } __OSCCONbits_t;
1146 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1148 #define _SCS0 0x01
1149 #define _SCS1 0x02
1150 #define _IRCF0 0x08
1151 #define _IRCF1 0x10
1152 #define _IRCF2 0x20
1153 #define _IRCF3 0x40
1154 #define _SPLLEN 0x80
1156 //==============================================================================
1159 //==============================================================================
1160 // OSCSTAT Bits
1162 extern __at(0x009A) __sfr OSCSTAT;
1164 typedef struct
1166 unsigned HFIOFS : 1;
1167 unsigned LFIOFR : 1;
1168 unsigned MFIOFR : 1;
1169 unsigned HFIOFL : 1;
1170 unsigned HFIOFR : 1;
1171 unsigned OSTS : 1;
1172 unsigned PLLR : 1;
1173 unsigned T1OSCR : 1;
1174 } __OSCSTATbits_t;
1176 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1178 #define _HFIOFS 0x01
1179 #define _LFIOFR 0x02
1180 #define _MFIOFR 0x04
1181 #define _HFIOFL 0x08
1182 #define _HFIOFR 0x10
1183 #define _OSTS 0x20
1184 #define _PLLR 0x40
1185 #define _T1OSCR 0x80
1187 //==============================================================================
1189 extern __at(0x009B) __sfr ADRES;
1190 extern __at(0x009B) __sfr ADRESL;
1191 extern __at(0x009C) __sfr ADRESH;
1193 //==============================================================================
1194 // ADCON0 Bits
1196 extern __at(0x009D) __sfr ADCON0;
1198 typedef union
1200 struct
1202 unsigned ADON : 1;
1203 unsigned GO_NOT_DONE : 1;
1204 unsigned CHS0 : 1;
1205 unsigned CHS1 : 1;
1206 unsigned CHS2 : 1;
1207 unsigned CHS3 : 1;
1208 unsigned CHS4 : 1;
1209 unsigned ADRMD : 1;
1212 struct
1214 unsigned : 1;
1215 unsigned ADGO : 1;
1216 unsigned : 1;
1217 unsigned : 1;
1218 unsigned : 1;
1219 unsigned : 1;
1220 unsigned : 1;
1221 unsigned : 1;
1224 struct
1226 unsigned : 1;
1227 unsigned GO : 1;
1228 unsigned : 1;
1229 unsigned : 1;
1230 unsigned : 1;
1231 unsigned : 1;
1232 unsigned : 1;
1233 unsigned : 1;
1236 struct
1238 unsigned : 1;
1239 unsigned DONE : 1;
1240 unsigned : 1;
1241 unsigned : 1;
1242 unsigned : 1;
1243 unsigned : 1;
1244 unsigned : 1;
1245 unsigned : 1;
1248 struct
1250 unsigned : 2;
1251 unsigned CHS : 5;
1252 unsigned : 1;
1254 } __ADCON0bits_t;
1256 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1258 #define _ADON 0x01
1259 #define _GO_NOT_DONE 0x02
1260 #define _ADGO 0x02
1261 #define _GO 0x02
1262 #define _DONE 0x02
1263 #define _CHS0 0x04
1264 #define _CHS1 0x08
1265 #define _CHS2 0x10
1266 #define _CHS3 0x20
1267 #define _CHS4 0x40
1268 #define _ADRMD 0x80
1270 //==============================================================================
1273 //==============================================================================
1274 // ADCON1 Bits
1276 extern __at(0x009E) __sfr ADCON1;
1278 typedef union
1280 struct
1282 unsigned ADPREF0 : 1;
1283 unsigned ADPREF1 : 1;
1284 unsigned ADNREF : 1;
1285 unsigned : 1;
1286 unsigned ADCS0 : 1;
1287 unsigned ADCS1 : 1;
1288 unsigned ADCS2 : 1;
1289 unsigned ADFM : 1;
1292 struct
1294 unsigned ADPREF : 2;
1295 unsigned : 6;
1298 struct
1300 unsigned : 4;
1301 unsigned ADCS : 3;
1302 unsigned : 1;
1304 } __ADCON1bits_t;
1306 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1308 #define _ADPREF0 0x01
1309 #define _ADPREF1 0x02
1310 #define _ADNREF 0x04
1311 #define _ADCS0 0x10
1312 #define _ADCS1 0x20
1313 #define _ADCS2 0x40
1314 #define _ADFM 0x80
1316 //==============================================================================
1319 //==============================================================================
1320 // ADCON2 Bits
1322 extern __at(0x009F) __sfr ADCON2;
1324 typedef union
1326 struct
1328 unsigned CHSN0 : 1;
1329 unsigned CHSN1 : 1;
1330 unsigned CHSN2 : 1;
1331 unsigned CHSN3 : 1;
1332 unsigned TRIGSEL0 : 1;
1333 unsigned TRIGSEL1 : 1;
1334 unsigned TRIGSEL2 : 1;
1335 unsigned TRIGSEL3 : 1;
1338 struct
1340 unsigned CHSN : 4;
1341 unsigned : 4;
1344 struct
1346 unsigned : 4;
1347 unsigned TRIGSEL : 4;
1349 } __ADCON2bits_t;
1351 extern __at(0x009F) volatile __ADCON2bits_t ADCON2bits;
1353 #define _CHSN0 0x01
1354 #define _CHSN1 0x02
1355 #define _CHSN2 0x04
1356 #define _CHSN3 0x08
1357 #define _TRIGSEL0 0x10
1358 #define _TRIGSEL1 0x20
1359 #define _TRIGSEL2 0x40
1360 #define _TRIGSEL3 0x80
1362 //==============================================================================
1365 //==============================================================================
1366 // LATA Bits
1368 extern __at(0x010C) __sfr LATA;
1370 typedef struct
1372 unsigned LATA0 : 1;
1373 unsigned LATA1 : 1;
1374 unsigned LATA2 : 1;
1375 unsigned LATA3 : 1;
1376 unsigned LATA4 : 1;
1377 unsigned LATA5 : 1;
1378 unsigned LATA6 : 1;
1379 unsigned LATA7 : 1;
1380 } __LATAbits_t;
1382 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1384 #define _LATA0 0x01
1385 #define _LATA1 0x02
1386 #define _LATA2 0x04
1387 #define _LATA3 0x08
1388 #define _LATA4 0x10
1389 #define _LATA5 0x20
1390 #define _LATA6 0x40
1391 #define _LATA7 0x80
1393 //==============================================================================
1396 //==============================================================================
1397 // LATB Bits
1399 extern __at(0x010D) __sfr LATB;
1401 typedef struct
1403 unsigned LATB0 : 1;
1404 unsigned LATB1 : 1;
1405 unsigned LATB2 : 1;
1406 unsigned LATB3 : 1;
1407 unsigned LATB4 : 1;
1408 unsigned LATB5 : 1;
1409 unsigned LATB6 : 1;
1410 unsigned LATB7 : 1;
1411 } __LATBbits_t;
1413 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1415 #define _LATB0 0x01
1416 #define _LATB1 0x02
1417 #define _LATB2 0x04
1418 #define _LATB3 0x08
1419 #define _LATB4 0x10
1420 #define _LATB5 0x20
1421 #define _LATB6 0x40
1422 #define _LATB7 0x80
1424 //==============================================================================
1427 //==============================================================================
1428 // LATC Bits
1430 extern __at(0x010E) __sfr LATC;
1432 typedef struct
1434 unsigned LATC0 : 1;
1435 unsigned LATC1 : 1;
1436 unsigned LATC2 : 1;
1437 unsigned LATC3 : 1;
1438 unsigned LATC4 : 1;
1439 unsigned LATC5 : 1;
1440 unsigned LATC6 : 1;
1441 unsigned LATC7 : 1;
1442 } __LATCbits_t;
1444 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1446 #define _LATC0 0x01
1447 #define _LATC1 0x02
1448 #define _LATC2 0x04
1449 #define _LATC3 0x08
1450 #define _LATC4 0x10
1451 #define _LATC5 0x20
1452 #define _LATC6 0x40
1453 #define _LATC7 0x80
1455 //==============================================================================
1458 //==============================================================================
1459 // CM1CON0 Bits
1461 extern __at(0x0111) __sfr CM1CON0;
1463 typedef struct
1465 unsigned C1SYNC : 1;
1466 unsigned C1HYS : 1;
1467 unsigned C1SP : 1;
1468 unsigned C1ZLF : 1;
1469 unsigned C1POL : 1;
1470 unsigned C1OE : 1;
1471 unsigned C1OUT : 1;
1472 unsigned C1ON : 1;
1473 } __CM1CON0bits_t;
1475 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1477 #define _C1SYNC 0x01
1478 #define _C1HYS 0x02
1479 #define _C1SP 0x04
1480 #define _C1ZLF 0x08
1481 #define _C1POL 0x10
1482 #define _C1OE 0x20
1483 #define _C1OUT 0x40
1484 #define _C1ON 0x80
1486 //==============================================================================
1489 //==============================================================================
1490 // CM1CON1 Bits
1492 extern __at(0x0112) __sfr CM1CON1;
1494 typedef union
1496 struct
1498 unsigned C1NCH0 : 1;
1499 unsigned C1NCH1 : 1;
1500 unsigned C1NCH2 : 1;
1501 unsigned C1PCH0 : 1;
1502 unsigned C1PCH1 : 1;
1503 unsigned C1PCH2 : 1;
1504 unsigned C1INTN : 1;
1505 unsigned C1INTP : 1;
1508 struct
1510 unsigned C1NCH : 3;
1511 unsigned : 5;
1514 struct
1516 unsigned : 3;
1517 unsigned C1PCH : 3;
1518 unsigned : 2;
1520 } __CM1CON1bits_t;
1522 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1524 #define _C1NCH0 0x01
1525 #define _C1NCH1 0x02
1526 #define _C1NCH2 0x04
1527 #define _C1PCH0 0x08
1528 #define _C1PCH1 0x10
1529 #define _C1PCH2 0x20
1530 #define _C1INTN 0x40
1531 #define _C1INTP 0x80
1533 //==============================================================================
1536 //==============================================================================
1537 // CM2CON0 Bits
1539 extern __at(0x0113) __sfr CM2CON0;
1541 typedef struct
1543 unsigned C2SYNC : 1;
1544 unsigned C2HYS : 1;
1545 unsigned C2SP : 1;
1546 unsigned C2ZLF : 1;
1547 unsigned C2POL : 1;
1548 unsigned C2OE : 1;
1549 unsigned C2OUT : 1;
1550 unsigned C2ON : 1;
1551 } __CM2CON0bits_t;
1553 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
1555 #define _C2SYNC 0x01
1556 #define _C2HYS 0x02
1557 #define _C2SP 0x04
1558 #define _C2ZLF 0x08
1559 #define _C2POL 0x10
1560 #define _C2OE 0x20
1561 #define _C2OUT 0x40
1562 #define _C2ON 0x80
1564 //==============================================================================
1567 //==============================================================================
1568 // CM2CON1 Bits
1570 extern __at(0x0114) __sfr CM2CON1;
1572 typedef union
1574 struct
1576 unsigned C2NCH0 : 1;
1577 unsigned C2NCH1 : 1;
1578 unsigned C2NCH2 : 1;
1579 unsigned C2PCH0 : 1;
1580 unsigned C2PCH1 : 1;
1581 unsigned C2PCH2 : 1;
1582 unsigned C2INTN : 1;
1583 unsigned C2INTP : 1;
1586 struct
1588 unsigned C2NCH : 3;
1589 unsigned : 5;
1592 struct
1594 unsigned : 3;
1595 unsigned C2PCH : 3;
1596 unsigned : 2;
1598 } __CM2CON1bits_t;
1600 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
1602 #define _C2NCH0 0x01
1603 #define _C2NCH1 0x02
1604 #define _C2NCH2 0x04
1605 #define _C2PCH0 0x08
1606 #define _C2PCH1 0x10
1607 #define _C2PCH2 0x20
1608 #define _C2INTN 0x40
1609 #define _C2INTP 0x80
1611 //==============================================================================
1614 //==============================================================================
1615 // CMOUT Bits
1617 extern __at(0x0115) __sfr CMOUT;
1619 typedef struct
1621 unsigned MC1OUT : 1;
1622 unsigned MC2OUT : 1;
1623 unsigned MC3OUT : 1;
1624 unsigned : 1;
1625 unsigned : 1;
1626 unsigned : 1;
1627 unsigned : 1;
1628 unsigned : 1;
1629 } __CMOUTbits_t;
1631 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1633 #define _MC1OUT 0x01
1634 #define _MC2OUT 0x02
1635 #define _MC3OUT 0x04
1637 //==============================================================================
1640 //==============================================================================
1641 // BORCON Bits
1643 extern __at(0x0116) __sfr BORCON;
1645 typedef struct
1647 unsigned BORRDY : 1;
1648 unsigned : 1;
1649 unsigned : 1;
1650 unsigned : 1;
1651 unsigned : 1;
1652 unsigned : 1;
1653 unsigned BORFS : 1;
1654 unsigned SBOREN : 1;
1655 } __BORCONbits_t;
1657 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1659 #define _BORRDY 0x01
1660 #define _BORFS 0x40
1661 #define _SBOREN 0x80
1663 //==============================================================================
1666 //==============================================================================
1667 // FVRCON Bits
1669 extern __at(0x0117) __sfr FVRCON;
1671 typedef union
1673 struct
1675 unsigned ADFVR0 : 1;
1676 unsigned ADFVR1 : 1;
1677 unsigned CDAFVR0 : 1;
1678 unsigned CDAFVR1 : 1;
1679 unsigned TSRNG : 1;
1680 unsigned TSEN : 1;
1681 unsigned FVRRDY : 1;
1682 unsigned FVREN : 1;
1685 struct
1687 unsigned ADFVR : 2;
1688 unsigned : 6;
1691 struct
1693 unsigned : 2;
1694 unsigned CDAFVR : 2;
1695 unsigned : 4;
1697 } __FVRCONbits_t;
1699 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1701 #define _ADFVR0 0x01
1702 #define _ADFVR1 0x02
1703 #define _CDAFVR0 0x04
1704 #define _CDAFVR1 0x08
1705 #define _TSRNG 0x10
1706 #define _TSEN 0x20
1707 #define _FVRRDY 0x40
1708 #define _FVREN 0x80
1710 //==============================================================================
1713 //==============================================================================
1714 // DACCON0 Bits
1716 extern __at(0x0118) __sfr DACCON0;
1718 typedef union
1720 struct
1722 unsigned DACNSS : 1;
1723 unsigned : 1;
1724 unsigned DACPSS0 : 1;
1725 unsigned DACPSS1 : 1;
1726 unsigned DACOE2 : 1;
1727 unsigned DACOE1 : 1;
1728 unsigned : 1;
1729 unsigned DACEN : 1;
1732 struct
1734 unsigned : 2;
1735 unsigned DACPSS : 2;
1736 unsigned : 4;
1738 } __DACCON0bits_t;
1740 extern __at(0x0118) volatile __DACCON0bits_t DACCON0bits;
1742 #define _DACNSS 0x01
1743 #define _DACPSS0 0x04
1744 #define _DACPSS1 0x08
1745 #define _DACOE2 0x10
1746 #define _DACOE1 0x20
1747 #define _DACEN 0x80
1749 //==============================================================================
1752 //==============================================================================
1753 // DACCON1 Bits
1755 extern __at(0x0119) __sfr DACCON1;
1757 typedef struct
1759 unsigned DACR0 : 1;
1760 unsigned DACR1 : 1;
1761 unsigned DACR2 : 1;
1762 unsigned DACR3 : 1;
1763 unsigned DACR4 : 1;
1764 unsigned DACR5 : 1;
1765 unsigned DACR6 : 1;
1766 unsigned DACR7 : 1;
1767 } __DACCON1bits_t;
1769 extern __at(0x0119) volatile __DACCON1bits_t DACCON1bits;
1771 #define _DACR0 0x01
1772 #define _DACR1 0x02
1773 #define _DACR2 0x04
1774 #define _DACR3 0x08
1775 #define _DACR4 0x10
1776 #define _DACR5 0x20
1777 #define _DACR6 0x40
1778 #define _DACR7 0x80
1780 //==============================================================================
1783 //==============================================================================
1784 // APFCON Bits
1786 extern __at(0x011D) __sfr APFCON;
1788 typedef struct
1790 unsigned CCP2SEL : 1;
1791 unsigned RXSEL : 1;
1792 unsigned TXSEL : 1;
1793 unsigned SDISEL : 1;
1794 unsigned SCKSEL : 1;
1795 unsigned SDOSEL : 1;
1796 unsigned CCP1SEL : 1;
1797 unsigned C2OUTSEL : 1;
1798 } __APFCONbits_t;
1800 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1802 #define _CCP2SEL 0x01
1803 #define _RXSEL 0x02
1804 #define _TXSEL 0x04
1805 #define _SDISEL 0x08
1806 #define _SCKSEL 0x10
1807 #define _SDOSEL 0x20
1808 #define _CCP1SEL 0x40
1809 #define _C2OUTSEL 0x80
1811 //==============================================================================
1814 //==============================================================================
1815 // APFCON0 Bits
1817 extern __at(0x011D) __sfr APFCON0;
1819 typedef struct
1821 unsigned CCP2SEL : 1;
1822 unsigned RXSEL : 1;
1823 unsigned TXSEL : 1;
1824 unsigned SDISEL : 1;
1825 unsigned SCKSEL : 1;
1826 unsigned SDOSEL : 1;
1827 unsigned CCP1SEL : 1;
1828 unsigned C2OUTSEL : 1;
1829 } __APFCON0bits_t;
1831 extern __at(0x011D) volatile __APFCON0bits_t APFCON0bits;
1833 #define _APFCON0_CCP2SEL 0x01
1834 #define _APFCON0_RXSEL 0x02
1835 #define _APFCON0_TXSEL 0x04
1836 #define _APFCON0_SDISEL 0x08
1837 #define _APFCON0_SCKSEL 0x10
1838 #define _APFCON0_SDOSEL 0x20
1839 #define _APFCON0_CCP1SEL 0x40
1840 #define _APFCON0_C2OUTSEL 0x80
1842 //==============================================================================
1845 //==============================================================================
1846 // CM3CON0 Bits
1848 extern __at(0x011E) __sfr CM3CON0;
1850 typedef struct
1852 unsigned C3SYNC : 1;
1853 unsigned C3HYS : 1;
1854 unsigned C3SP : 1;
1855 unsigned C3ZLF : 1;
1856 unsigned C3POL : 1;
1857 unsigned C3OE : 1;
1858 unsigned C3OUT : 1;
1859 unsigned C3ON : 1;
1860 } __CM3CON0bits_t;
1862 extern __at(0x011E) volatile __CM3CON0bits_t CM3CON0bits;
1864 #define _C3SYNC 0x01
1865 #define _C3HYS 0x02
1866 #define _C3SP 0x04
1867 #define _C3ZLF 0x08
1868 #define _C3POL 0x10
1869 #define _C3OE 0x20
1870 #define _C3OUT 0x40
1871 #define _C3ON 0x80
1873 //==============================================================================
1876 //==============================================================================
1877 // CM3CON1 Bits
1879 extern __at(0x011F) __sfr CM3CON1;
1881 typedef union
1883 struct
1885 unsigned C3NCH0 : 1;
1886 unsigned C3NCH1 : 1;
1887 unsigned C3NCH2 : 1;
1888 unsigned C3PCH0 : 1;
1889 unsigned C3PCH1 : 1;
1890 unsigned C3PCH2 : 1;
1891 unsigned C3INTN : 1;
1892 unsigned C3INTP : 1;
1895 struct
1897 unsigned C3NCH : 3;
1898 unsigned : 5;
1901 struct
1903 unsigned : 3;
1904 unsigned C3PCH : 3;
1905 unsigned : 2;
1907 } __CM3CON1bits_t;
1909 extern __at(0x011F) volatile __CM3CON1bits_t CM3CON1bits;
1911 #define _C3NCH0 0x01
1912 #define _C3NCH1 0x02
1913 #define _C3NCH2 0x04
1914 #define _C3PCH0 0x08
1915 #define _C3PCH1 0x10
1916 #define _C3PCH2 0x20
1917 #define _C3INTN 0x40
1918 #define _C3INTP 0x80
1920 //==============================================================================
1923 //==============================================================================
1924 // ANSELA Bits
1926 extern __at(0x018C) __sfr ANSELA;
1928 typedef struct
1930 unsigned ANSA0 : 1;
1931 unsigned ANSA1 : 1;
1932 unsigned ANSA2 : 1;
1933 unsigned ANSA3 : 1;
1934 unsigned ANSA4 : 1;
1935 unsigned ANSA5 : 1;
1936 unsigned : 1;
1937 unsigned ANSA7 : 1;
1938 } __ANSELAbits_t;
1940 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1942 #define _ANSA0 0x01
1943 #define _ANSA1 0x02
1944 #define _ANSA2 0x04
1945 #define _ANSA3 0x08
1946 #define _ANSA4 0x10
1947 #define _ANSA5 0x20
1948 #define _ANSA7 0x80
1950 //==============================================================================
1953 //==============================================================================
1954 // ANSELB Bits
1956 extern __at(0x018D) __sfr ANSELB;
1958 typedef union
1960 struct
1962 unsigned ANSB0 : 1;
1963 unsigned ANSB1 : 1;
1964 unsigned ANSB2 : 1;
1965 unsigned ANSB3 : 1;
1966 unsigned ANSB4 : 1;
1967 unsigned ANSB5 : 1;
1968 unsigned : 1;
1969 unsigned : 1;
1972 struct
1974 unsigned ANSB : 6;
1975 unsigned : 2;
1977 } __ANSELBbits_t;
1979 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1981 #define _ANSB0 0x01
1982 #define _ANSB1 0x02
1983 #define _ANSB2 0x04
1984 #define _ANSB3 0x08
1985 #define _ANSB4 0x10
1986 #define _ANSB5 0x20
1988 //==============================================================================
1990 extern __at(0x0191) __sfr EEADR;
1991 extern __at(0x0191) __sfr EEADRL;
1992 extern __at(0x0192) __sfr EEADRH;
1993 extern __at(0x0193) __sfr EEDAT;
1994 extern __at(0x0193) __sfr EEDATL;
1995 extern __at(0x0194) __sfr EEDATH;
1997 //==============================================================================
1998 // EECON1 Bits
2000 extern __at(0x0195) __sfr EECON1;
2002 typedef struct
2004 unsigned RD : 1;
2005 unsigned WR : 1;
2006 unsigned WREN : 1;
2007 unsigned WRERR : 1;
2008 unsigned FREE : 1;
2009 unsigned LWLO : 1;
2010 unsigned CFGS : 1;
2011 unsigned EEPGD : 1;
2012 } __EECON1bits_t;
2014 extern __at(0x0195) volatile __EECON1bits_t EECON1bits;
2016 #define _RD 0x01
2017 #define _WR 0x02
2018 #define _WREN 0x04
2019 #define _WRERR 0x08
2020 #define _FREE 0x10
2021 #define _LWLO 0x20
2022 #define _CFGS 0x40
2023 #define _EEPGD 0x80
2025 //==============================================================================
2027 extern __at(0x0196) __sfr EECON2;
2029 //==============================================================================
2030 // VREGCON Bits
2032 extern __at(0x0197) __sfr VREGCON;
2034 typedef struct
2036 unsigned : 1;
2037 unsigned VREGPM : 1;
2038 unsigned : 1;
2039 unsigned : 1;
2040 unsigned : 1;
2041 unsigned : 1;
2042 unsigned : 1;
2043 unsigned : 1;
2044 } __VREGCONbits_t;
2046 extern __at(0x0197) volatile __VREGCONbits_t VREGCONbits;
2048 #define _VREGPM 0x02
2050 //==============================================================================
2052 extern __at(0x0199) __sfr RC1REG;
2053 extern __at(0x0199) __sfr RCREG;
2054 extern __at(0x0199) __sfr RCREG1;
2055 extern __at(0x019A) __sfr TX1REG;
2056 extern __at(0x019A) __sfr TXREG;
2057 extern __at(0x019A) __sfr TXREG1;
2058 extern __at(0x019B) __sfr SP1BRG;
2059 extern __at(0x019B) __sfr SP1BRGL;
2060 extern __at(0x019B) __sfr SPBRG;
2061 extern __at(0x019B) __sfr SPBRG1;
2062 extern __at(0x019B) __sfr SPBRGL;
2063 extern __at(0x019C) __sfr SP1BRGH;
2064 extern __at(0x019C) __sfr SPBRGH;
2065 extern __at(0x019C) __sfr SPBRGH1;
2067 //==============================================================================
2068 // RC1STA Bits
2070 extern __at(0x019D) __sfr RC1STA;
2072 typedef struct
2074 unsigned RX9D : 1;
2075 unsigned OERR : 1;
2076 unsigned FERR : 1;
2077 unsigned ADDEN : 1;
2078 unsigned CREN : 1;
2079 unsigned SREN : 1;
2080 unsigned RX9 : 1;
2081 unsigned SPEN : 1;
2082 } __RC1STAbits_t;
2084 extern __at(0x019D) volatile __RC1STAbits_t RC1STAbits;
2086 #define _RX9D 0x01
2087 #define _OERR 0x02
2088 #define _FERR 0x04
2089 #define _ADDEN 0x08
2090 #define _CREN 0x10
2091 #define _SREN 0x20
2092 #define _RX9 0x40
2093 #define _SPEN 0x80
2095 //==============================================================================
2098 //==============================================================================
2099 // RCSTA Bits
2101 extern __at(0x019D) __sfr RCSTA;
2103 typedef struct
2105 unsigned RX9D : 1;
2106 unsigned OERR : 1;
2107 unsigned FERR : 1;
2108 unsigned ADDEN : 1;
2109 unsigned CREN : 1;
2110 unsigned SREN : 1;
2111 unsigned RX9 : 1;
2112 unsigned SPEN : 1;
2113 } __RCSTAbits_t;
2115 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
2117 #define _RCSTA_RX9D 0x01
2118 #define _RCSTA_OERR 0x02
2119 #define _RCSTA_FERR 0x04
2120 #define _RCSTA_ADDEN 0x08
2121 #define _RCSTA_CREN 0x10
2122 #define _RCSTA_SREN 0x20
2123 #define _RCSTA_RX9 0x40
2124 #define _RCSTA_SPEN 0x80
2126 //==============================================================================
2129 //==============================================================================
2130 // RCSTA1 Bits
2132 extern __at(0x019D) __sfr RCSTA1;
2134 typedef struct
2136 unsigned RX9D : 1;
2137 unsigned OERR : 1;
2138 unsigned FERR : 1;
2139 unsigned ADDEN : 1;
2140 unsigned CREN : 1;
2141 unsigned SREN : 1;
2142 unsigned RX9 : 1;
2143 unsigned SPEN : 1;
2144 } __RCSTA1bits_t;
2146 extern __at(0x019D) volatile __RCSTA1bits_t RCSTA1bits;
2148 #define _RCSTA1_RX9D 0x01
2149 #define _RCSTA1_OERR 0x02
2150 #define _RCSTA1_FERR 0x04
2151 #define _RCSTA1_ADDEN 0x08
2152 #define _RCSTA1_CREN 0x10
2153 #define _RCSTA1_SREN 0x20
2154 #define _RCSTA1_RX9 0x40
2155 #define _RCSTA1_SPEN 0x80
2157 //==============================================================================
2160 //==============================================================================
2161 // TX1STA Bits
2163 extern __at(0x019E) __sfr TX1STA;
2165 typedef struct
2167 unsigned TX9D : 1;
2168 unsigned TRMT : 1;
2169 unsigned BRGH : 1;
2170 unsigned SENDB : 1;
2171 unsigned SYNC : 1;
2172 unsigned TXEN : 1;
2173 unsigned TX9 : 1;
2174 unsigned CSRC : 1;
2175 } __TX1STAbits_t;
2177 extern __at(0x019E) volatile __TX1STAbits_t TX1STAbits;
2179 #define _TX9D 0x01
2180 #define _TRMT 0x02
2181 #define _BRGH 0x04
2182 #define _SENDB 0x08
2183 #define _SYNC 0x10
2184 #define _TXEN 0x20
2185 #define _TX9 0x40
2186 #define _CSRC 0x80
2188 //==============================================================================
2191 //==============================================================================
2192 // TXSTA Bits
2194 extern __at(0x019E) __sfr TXSTA;
2196 typedef struct
2198 unsigned TX9D : 1;
2199 unsigned TRMT : 1;
2200 unsigned BRGH : 1;
2201 unsigned SENDB : 1;
2202 unsigned SYNC : 1;
2203 unsigned TXEN : 1;
2204 unsigned TX9 : 1;
2205 unsigned CSRC : 1;
2206 } __TXSTAbits_t;
2208 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2210 #define _TXSTA_TX9D 0x01
2211 #define _TXSTA_TRMT 0x02
2212 #define _TXSTA_BRGH 0x04
2213 #define _TXSTA_SENDB 0x08
2214 #define _TXSTA_SYNC 0x10
2215 #define _TXSTA_TXEN 0x20
2216 #define _TXSTA_TX9 0x40
2217 #define _TXSTA_CSRC 0x80
2219 //==============================================================================
2222 //==============================================================================
2223 // TXSTA1 Bits
2225 extern __at(0x019E) __sfr TXSTA1;
2227 typedef struct
2229 unsigned TX9D : 1;
2230 unsigned TRMT : 1;
2231 unsigned BRGH : 1;
2232 unsigned SENDB : 1;
2233 unsigned SYNC : 1;
2234 unsigned TXEN : 1;
2235 unsigned TX9 : 1;
2236 unsigned CSRC : 1;
2237 } __TXSTA1bits_t;
2239 extern __at(0x019E) volatile __TXSTA1bits_t TXSTA1bits;
2241 #define _TXSTA1_TX9D 0x01
2242 #define _TXSTA1_TRMT 0x02
2243 #define _TXSTA1_BRGH 0x04
2244 #define _TXSTA1_SENDB 0x08
2245 #define _TXSTA1_SYNC 0x10
2246 #define _TXSTA1_TXEN 0x20
2247 #define _TXSTA1_TX9 0x40
2248 #define _TXSTA1_CSRC 0x80
2250 //==============================================================================
2253 //==============================================================================
2254 // BAUD1CON Bits
2256 extern __at(0x019F) __sfr BAUD1CON;
2258 typedef struct
2260 unsigned ABDEN : 1;
2261 unsigned WUE : 1;
2262 unsigned : 1;
2263 unsigned BRG16 : 1;
2264 unsigned SCKP : 1;
2265 unsigned : 1;
2266 unsigned RCIDL : 1;
2267 unsigned ABDOVF : 1;
2268 } __BAUD1CONbits_t;
2270 extern __at(0x019F) volatile __BAUD1CONbits_t BAUD1CONbits;
2272 #define _ABDEN 0x01
2273 #define _WUE 0x02
2274 #define _BRG16 0x08
2275 #define _SCKP 0x10
2276 #define _RCIDL 0x40
2277 #define _ABDOVF 0x80
2279 //==============================================================================
2282 //==============================================================================
2283 // BAUDCON Bits
2285 extern __at(0x019F) __sfr BAUDCON;
2287 typedef struct
2289 unsigned ABDEN : 1;
2290 unsigned WUE : 1;
2291 unsigned : 1;
2292 unsigned BRG16 : 1;
2293 unsigned SCKP : 1;
2294 unsigned : 1;
2295 unsigned RCIDL : 1;
2296 unsigned ABDOVF : 1;
2297 } __BAUDCONbits_t;
2299 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2301 #define _BAUDCON_ABDEN 0x01
2302 #define _BAUDCON_WUE 0x02
2303 #define _BAUDCON_BRG16 0x08
2304 #define _BAUDCON_SCKP 0x10
2305 #define _BAUDCON_RCIDL 0x40
2306 #define _BAUDCON_ABDOVF 0x80
2308 //==============================================================================
2311 //==============================================================================
2312 // BAUDCON1 Bits
2314 extern __at(0x019F) __sfr BAUDCON1;
2316 typedef struct
2318 unsigned ABDEN : 1;
2319 unsigned WUE : 1;
2320 unsigned : 1;
2321 unsigned BRG16 : 1;
2322 unsigned SCKP : 1;
2323 unsigned : 1;
2324 unsigned RCIDL : 1;
2325 unsigned ABDOVF : 1;
2326 } __BAUDCON1bits_t;
2328 extern __at(0x019F) volatile __BAUDCON1bits_t BAUDCON1bits;
2330 #define _BAUDCON1_ABDEN 0x01
2331 #define _BAUDCON1_WUE 0x02
2332 #define _BAUDCON1_BRG16 0x08
2333 #define _BAUDCON1_SCKP 0x10
2334 #define _BAUDCON1_RCIDL 0x40
2335 #define _BAUDCON1_ABDOVF 0x80
2337 //==============================================================================
2340 //==============================================================================
2341 // BAUDCTL Bits
2343 extern __at(0x019F) __sfr BAUDCTL;
2345 typedef struct
2347 unsigned ABDEN : 1;
2348 unsigned WUE : 1;
2349 unsigned : 1;
2350 unsigned BRG16 : 1;
2351 unsigned SCKP : 1;
2352 unsigned : 1;
2353 unsigned RCIDL : 1;
2354 unsigned ABDOVF : 1;
2355 } __BAUDCTLbits_t;
2357 extern __at(0x019F) volatile __BAUDCTLbits_t BAUDCTLbits;
2359 #define _BAUDCTL_ABDEN 0x01
2360 #define _BAUDCTL_WUE 0x02
2361 #define _BAUDCTL_BRG16 0x08
2362 #define _BAUDCTL_SCKP 0x10
2363 #define _BAUDCTL_RCIDL 0x40
2364 #define _BAUDCTL_ABDOVF 0x80
2366 //==============================================================================
2369 //==============================================================================
2370 // BAUDCTL1 Bits
2372 extern __at(0x019F) __sfr BAUDCTL1;
2374 typedef struct
2376 unsigned ABDEN : 1;
2377 unsigned WUE : 1;
2378 unsigned : 1;
2379 unsigned BRG16 : 1;
2380 unsigned SCKP : 1;
2381 unsigned : 1;
2382 unsigned RCIDL : 1;
2383 unsigned ABDOVF : 1;
2384 } __BAUDCTL1bits_t;
2386 extern __at(0x019F) volatile __BAUDCTL1bits_t BAUDCTL1bits;
2388 #define _BAUDCTL1_ABDEN 0x01
2389 #define _BAUDCTL1_WUE 0x02
2390 #define _BAUDCTL1_BRG16 0x08
2391 #define _BAUDCTL1_SCKP 0x10
2392 #define _BAUDCTL1_RCIDL 0x40
2393 #define _BAUDCTL1_ABDOVF 0x80
2395 //==============================================================================
2398 //==============================================================================
2399 // WPUA Bits
2401 extern __at(0x020C) __sfr WPUA;
2403 typedef struct
2405 unsigned WPUA0 : 1;
2406 unsigned WPUA1 : 1;
2407 unsigned WPUA2 : 1;
2408 unsigned WPUA3 : 1;
2409 unsigned WPUA4 : 1;
2410 unsigned WPUA5 : 1;
2411 unsigned WPUA6 : 1;
2412 unsigned WPUA7 : 1;
2413 } __WPUAbits_t;
2415 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
2417 #define _WPUA0 0x01
2418 #define _WPUA1 0x02
2419 #define _WPUA2 0x04
2420 #define _WPUA3 0x08
2421 #define _WPUA4 0x10
2422 #define _WPUA5 0x20
2423 #define _WPUA6 0x40
2424 #define _WPUA7 0x80
2426 //==============================================================================
2429 //==============================================================================
2430 // WPUB Bits
2432 extern __at(0x020D) __sfr WPUB;
2434 typedef struct
2436 unsigned WPUB0 : 1;
2437 unsigned WPUB1 : 1;
2438 unsigned WPUB2 : 1;
2439 unsigned WPUB3 : 1;
2440 unsigned WPUB4 : 1;
2441 unsigned WPUB5 : 1;
2442 unsigned WPUB6 : 1;
2443 unsigned WPUB7 : 1;
2444 } __WPUBbits_t;
2446 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2448 #define _WPUB0 0x01
2449 #define _WPUB1 0x02
2450 #define _WPUB2 0x04
2451 #define _WPUB3 0x08
2452 #define _WPUB4 0x10
2453 #define _WPUB5 0x20
2454 #define _WPUB6 0x40
2455 #define _WPUB7 0x80
2457 //==============================================================================
2460 //==============================================================================
2461 // WPUC Bits
2463 extern __at(0x020E) __sfr WPUC;
2465 typedef struct
2467 unsigned WPUC0 : 1;
2468 unsigned WPUC1 : 1;
2469 unsigned WPUC2 : 1;
2470 unsigned WPUC3 : 1;
2471 unsigned WPUC4 : 1;
2472 unsigned WPUC5 : 1;
2473 unsigned WPUC6 : 1;
2474 unsigned WPUC7 : 1;
2475 } __WPUCbits_t;
2477 extern __at(0x020E) volatile __WPUCbits_t WPUCbits;
2479 #define _WPUC0 0x01
2480 #define _WPUC1 0x02
2481 #define _WPUC2 0x04
2482 #define _WPUC3 0x08
2483 #define _WPUC4 0x10
2484 #define _WPUC5 0x20
2485 #define _WPUC6 0x40
2486 #define _WPUC7 0x80
2488 //==============================================================================
2491 //==============================================================================
2492 // WPUE Bits
2494 extern __at(0x0210) __sfr WPUE;
2496 typedef struct
2498 unsigned : 1;
2499 unsigned : 1;
2500 unsigned : 1;
2501 unsigned WPUE3 : 1;
2502 unsigned : 1;
2503 unsigned : 1;
2504 unsigned : 1;
2505 unsigned : 1;
2506 } __WPUEbits_t;
2508 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
2510 #define _WPUE3 0x08
2512 //==============================================================================
2514 extern __at(0x0211) __sfr SSP1BUF;
2515 extern __at(0x0211) __sfr SSPBUF;
2516 extern __at(0x0212) __sfr SSP1ADD;
2517 extern __at(0x0212) __sfr SSPADD;
2518 extern __at(0x0213) __sfr SSP1MSK;
2519 extern __at(0x0213) __sfr SSPMSK;
2521 //==============================================================================
2522 // SSP1STAT Bits
2524 extern __at(0x0214) __sfr SSP1STAT;
2526 typedef struct
2528 unsigned BF : 1;
2529 unsigned UA : 1;
2530 unsigned R_NOT_W : 1;
2531 unsigned S : 1;
2532 unsigned P : 1;
2533 unsigned D_NOT_A : 1;
2534 unsigned CKE : 1;
2535 unsigned SMP : 1;
2536 } __SSP1STATbits_t;
2538 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2540 #define _BF 0x01
2541 #define _UA 0x02
2542 #define _R_NOT_W 0x04
2543 #define _S 0x08
2544 #define _P 0x10
2545 #define _D_NOT_A 0x20
2546 #define _CKE 0x40
2547 #define _SMP 0x80
2549 //==============================================================================
2552 //==============================================================================
2553 // SSPSTAT Bits
2555 extern __at(0x0214) __sfr SSPSTAT;
2557 typedef struct
2559 unsigned BF : 1;
2560 unsigned UA : 1;
2561 unsigned R_NOT_W : 1;
2562 unsigned S : 1;
2563 unsigned P : 1;
2564 unsigned D_NOT_A : 1;
2565 unsigned CKE : 1;
2566 unsigned SMP : 1;
2567 } __SSPSTATbits_t;
2569 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2571 #define _SSPSTAT_BF 0x01
2572 #define _SSPSTAT_UA 0x02
2573 #define _SSPSTAT_R_NOT_W 0x04
2574 #define _SSPSTAT_S 0x08
2575 #define _SSPSTAT_P 0x10
2576 #define _SSPSTAT_D_NOT_A 0x20
2577 #define _SSPSTAT_CKE 0x40
2578 #define _SSPSTAT_SMP 0x80
2580 //==============================================================================
2583 //==============================================================================
2584 // SSP1CON Bits
2586 extern __at(0x0215) __sfr SSP1CON;
2588 typedef union
2590 struct
2592 unsigned SSPM0 : 1;
2593 unsigned SSPM1 : 1;
2594 unsigned SSPM2 : 1;
2595 unsigned SSPM3 : 1;
2596 unsigned CKP : 1;
2597 unsigned SSPEN : 1;
2598 unsigned SSPOV : 1;
2599 unsigned WCOL : 1;
2602 struct
2604 unsigned SSPM : 4;
2605 unsigned : 4;
2607 } __SSP1CONbits_t;
2609 extern __at(0x0215) volatile __SSP1CONbits_t SSP1CONbits;
2611 #define _SSPM0 0x01
2612 #define _SSPM1 0x02
2613 #define _SSPM2 0x04
2614 #define _SSPM3 0x08
2615 #define _CKP 0x10
2616 #define _SSPEN 0x20
2617 #define _SSPOV 0x40
2618 #define _WCOL 0x80
2620 //==============================================================================
2623 //==============================================================================
2624 // SSPCON Bits
2626 extern __at(0x0215) __sfr SSPCON;
2628 typedef union
2630 struct
2632 unsigned SSPM0 : 1;
2633 unsigned SSPM1 : 1;
2634 unsigned SSPM2 : 1;
2635 unsigned SSPM3 : 1;
2636 unsigned CKP : 1;
2637 unsigned SSPEN : 1;
2638 unsigned SSPOV : 1;
2639 unsigned WCOL : 1;
2642 struct
2644 unsigned SSPM : 4;
2645 unsigned : 4;
2647 } __SSPCONbits_t;
2649 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2651 #define _SSPCON_SSPM0 0x01
2652 #define _SSPCON_SSPM1 0x02
2653 #define _SSPCON_SSPM2 0x04
2654 #define _SSPCON_SSPM3 0x08
2655 #define _SSPCON_CKP 0x10
2656 #define _SSPCON_SSPEN 0x20
2657 #define _SSPCON_SSPOV 0x40
2658 #define _SSPCON_WCOL 0x80
2660 //==============================================================================
2663 //==============================================================================
2664 // SSPCON1 Bits
2666 extern __at(0x0215) __sfr SSPCON1;
2668 typedef union
2670 struct
2672 unsigned SSPM0 : 1;
2673 unsigned SSPM1 : 1;
2674 unsigned SSPM2 : 1;
2675 unsigned SSPM3 : 1;
2676 unsigned CKP : 1;
2677 unsigned SSPEN : 1;
2678 unsigned SSPOV : 1;
2679 unsigned WCOL : 1;
2682 struct
2684 unsigned SSPM : 4;
2685 unsigned : 4;
2687 } __SSPCON1bits_t;
2689 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2691 #define _SSPCON1_SSPM0 0x01
2692 #define _SSPCON1_SSPM1 0x02
2693 #define _SSPCON1_SSPM2 0x04
2694 #define _SSPCON1_SSPM3 0x08
2695 #define _SSPCON1_CKP 0x10
2696 #define _SSPCON1_SSPEN 0x20
2697 #define _SSPCON1_SSPOV 0x40
2698 #define _SSPCON1_WCOL 0x80
2700 //==============================================================================
2703 //==============================================================================
2704 // SSP1CON2 Bits
2706 extern __at(0x0216) __sfr SSP1CON2;
2708 typedef struct
2710 unsigned SEN : 1;
2711 unsigned RSEN : 1;
2712 unsigned PEN : 1;
2713 unsigned RCEN : 1;
2714 unsigned ACKEN : 1;
2715 unsigned ACKDT : 1;
2716 unsigned ACKSTAT : 1;
2717 unsigned GCEN : 1;
2718 } __SSP1CON2bits_t;
2720 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2722 #define _SEN 0x01
2723 #define _RSEN 0x02
2724 #define _PEN 0x04
2725 #define _RCEN 0x08
2726 #define _ACKEN 0x10
2727 #define _ACKDT 0x20
2728 #define _ACKSTAT 0x40
2729 #define _GCEN 0x80
2731 //==============================================================================
2734 //==============================================================================
2735 // SSPCON2 Bits
2737 extern __at(0x0216) __sfr SSPCON2;
2739 typedef struct
2741 unsigned SEN : 1;
2742 unsigned RSEN : 1;
2743 unsigned PEN : 1;
2744 unsigned RCEN : 1;
2745 unsigned ACKEN : 1;
2746 unsigned ACKDT : 1;
2747 unsigned ACKSTAT : 1;
2748 unsigned GCEN : 1;
2749 } __SSPCON2bits_t;
2751 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2753 #define _SSPCON2_SEN 0x01
2754 #define _SSPCON2_RSEN 0x02
2755 #define _SSPCON2_PEN 0x04
2756 #define _SSPCON2_RCEN 0x08
2757 #define _SSPCON2_ACKEN 0x10
2758 #define _SSPCON2_ACKDT 0x20
2759 #define _SSPCON2_ACKSTAT 0x40
2760 #define _SSPCON2_GCEN 0x80
2762 //==============================================================================
2765 //==============================================================================
2766 // SSP1CON3 Bits
2768 extern __at(0x0217) __sfr SSP1CON3;
2770 typedef struct
2772 unsigned DHEN : 1;
2773 unsigned AHEN : 1;
2774 unsigned SBCDE : 1;
2775 unsigned SDAHT : 1;
2776 unsigned BOEN : 1;
2777 unsigned SCIE : 1;
2778 unsigned PCIE : 1;
2779 unsigned ACKTIM : 1;
2780 } __SSP1CON3bits_t;
2782 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2784 #define _DHEN 0x01
2785 #define _AHEN 0x02
2786 #define _SBCDE 0x04
2787 #define _SDAHT 0x08
2788 #define _BOEN 0x10
2789 #define _SCIE 0x20
2790 #define _PCIE 0x40
2791 #define _ACKTIM 0x80
2793 //==============================================================================
2796 //==============================================================================
2797 // SSPCON3 Bits
2799 extern __at(0x0217) __sfr SSPCON3;
2801 typedef struct
2803 unsigned DHEN : 1;
2804 unsigned AHEN : 1;
2805 unsigned SBCDE : 1;
2806 unsigned SDAHT : 1;
2807 unsigned BOEN : 1;
2808 unsigned SCIE : 1;
2809 unsigned PCIE : 1;
2810 unsigned ACKTIM : 1;
2811 } __SSPCON3bits_t;
2813 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2815 #define _SSPCON3_DHEN 0x01
2816 #define _SSPCON3_AHEN 0x02
2817 #define _SSPCON3_SBCDE 0x04
2818 #define _SSPCON3_SDAHT 0x08
2819 #define _SSPCON3_BOEN 0x10
2820 #define _SSPCON3_SCIE 0x20
2821 #define _SSPCON3_PCIE 0x40
2822 #define _SSPCON3_ACKTIM 0x80
2824 //==============================================================================
2827 //==============================================================================
2828 // ODCONA Bits
2830 extern __at(0x028C) __sfr ODCONA;
2832 typedef struct
2834 unsigned ODCONA0 : 1;
2835 unsigned ODCONA1 : 1;
2836 unsigned ODCONA2 : 1;
2837 unsigned ODCONA3 : 1;
2838 unsigned ODCONA4 : 1;
2839 unsigned ODCONA5 : 1;
2840 unsigned ODCONA6 : 1;
2841 unsigned ODCONA7 : 1;
2842 } __ODCONAbits_t;
2844 extern __at(0x028C) volatile __ODCONAbits_t ODCONAbits;
2846 #define _ODCONA0 0x01
2847 #define _ODCONA1 0x02
2848 #define _ODCONA2 0x04
2849 #define _ODCONA3 0x08
2850 #define _ODCONA4 0x10
2851 #define _ODCONA5 0x20
2852 #define _ODCONA6 0x40
2853 #define _ODCONA7 0x80
2855 //==============================================================================
2858 //==============================================================================
2859 // ODCONB Bits
2861 extern __at(0x028D) __sfr ODCONB;
2863 typedef struct
2865 unsigned ODCONB0 : 1;
2866 unsigned ODCONB1 : 1;
2867 unsigned ODCONB2 : 1;
2868 unsigned ODCONB3 : 1;
2869 unsigned ODCONB4 : 1;
2870 unsigned ODCONB5 : 1;
2871 unsigned ODCONB6 : 1;
2872 unsigned ODCONB7 : 1;
2873 } __ODCONBbits_t;
2875 extern __at(0x028D) volatile __ODCONBbits_t ODCONBbits;
2877 #define _ODCONB0 0x01
2878 #define _ODCONB1 0x02
2879 #define _ODCONB2 0x04
2880 #define _ODCONB3 0x08
2881 #define _ODCONB4 0x10
2882 #define _ODCONB5 0x20
2883 #define _ODCONB6 0x40
2884 #define _ODCONB7 0x80
2886 //==============================================================================
2889 //==============================================================================
2890 // ODCONC Bits
2892 extern __at(0x028E) __sfr ODCONC;
2894 typedef struct
2896 unsigned ODCONC0 : 1;
2897 unsigned ODCONC1 : 1;
2898 unsigned ODCONC2 : 1;
2899 unsigned ODCONC3 : 1;
2900 unsigned ODCONC4 : 1;
2901 unsigned ODCONC5 : 1;
2902 unsigned ODCONC6 : 1;
2903 unsigned ODCONC7 : 1;
2904 } __ODCONCbits_t;
2906 extern __at(0x028E) volatile __ODCONCbits_t ODCONCbits;
2908 #define _ODCONC0 0x01
2909 #define _ODCONC1 0x02
2910 #define _ODCONC2 0x04
2911 #define _ODCONC3 0x08
2912 #define _ODCONC4 0x10
2913 #define _ODCONC5 0x20
2914 #define _ODCONC6 0x40
2915 #define _ODCONC7 0x80
2917 //==============================================================================
2919 extern __at(0x0291) __sfr CCPR1;
2920 extern __at(0x0291) __sfr CCPR1L;
2921 extern __at(0x0292) __sfr CCPR1H;
2923 //==============================================================================
2924 // CCP1CON Bits
2926 extern __at(0x0293) __sfr CCP1CON;
2928 typedef union
2930 struct
2932 unsigned CCP1M0 : 1;
2933 unsigned CCP1M1 : 1;
2934 unsigned CCP1M2 : 1;
2935 unsigned CCP1M3 : 1;
2936 unsigned DC1B0 : 1;
2937 unsigned DC1B1 : 1;
2938 unsigned P1M0 : 1;
2939 unsigned P1M1 : 1;
2942 struct
2944 unsigned CCP1M : 4;
2945 unsigned : 4;
2948 struct
2950 unsigned : 4;
2951 unsigned DC1B : 2;
2952 unsigned : 2;
2955 struct
2957 unsigned : 6;
2958 unsigned P1M : 2;
2960 } __CCP1CONbits_t;
2962 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2964 #define _CCP1M0 0x01
2965 #define _CCP1M1 0x02
2966 #define _CCP1M2 0x04
2967 #define _CCP1M3 0x08
2968 #define _DC1B0 0x10
2969 #define _DC1B1 0x20
2970 #define _P1M0 0x40
2971 #define _P1M1 0x80
2973 //==============================================================================
2975 extern __at(0x0298) __sfr CCPR2;
2976 extern __at(0x0298) __sfr CCPR2L;
2977 extern __at(0x0299) __sfr CCPR2H;
2979 //==============================================================================
2980 // CCP2CON Bits
2982 extern __at(0x029A) __sfr CCP2CON;
2984 typedef union
2986 struct
2988 unsigned CCP2M0 : 1;
2989 unsigned CCP2M1 : 1;
2990 unsigned CCP2M2 : 1;
2991 unsigned CCP2M3 : 1;
2992 unsigned DC2B0 : 1;
2993 unsigned DC2B1 : 1;
2994 unsigned P2M0 : 1;
2995 unsigned P2M1 : 1;
2998 struct
3000 unsigned CCP2M : 4;
3001 unsigned : 4;
3004 struct
3006 unsigned : 4;
3007 unsigned DC2B : 2;
3008 unsigned : 2;
3011 struct
3013 unsigned : 6;
3014 unsigned P2M : 2;
3016 } __CCP2CONbits_t;
3018 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
3020 #define _CCP2M0 0x01
3021 #define _CCP2M1 0x02
3022 #define _CCP2M2 0x04
3023 #define _CCP2M3 0x08
3024 #define _DC2B0 0x10
3025 #define _DC2B1 0x20
3026 #define _P2M0 0x40
3027 #define _P2M1 0x80
3029 //==============================================================================
3032 //==============================================================================
3033 // SLRCONA Bits
3035 extern __at(0x030C) __sfr SLRCONA;
3037 typedef struct
3039 unsigned SLRCONA0 : 1;
3040 unsigned SLRCONA1 : 1;
3041 unsigned SLRCONA2 : 1;
3042 unsigned SLRCONA3 : 1;
3043 unsigned SLRCONA4 : 1;
3044 unsigned SLRCONA5 : 1;
3045 unsigned SLRCONA6 : 1;
3046 unsigned SLRCONA7 : 1;
3047 } __SLRCONAbits_t;
3049 extern __at(0x030C) volatile __SLRCONAbits_t SLRCONAbits;
3051 #define _SLRCONA0 0x01
3052 #define _SLRCONA1 0x02
3053 #define _SLRCONA2 0x04
3054 #define _SLRCONA3 0x08
3055 #define _SLRCONA4 0x10
3056 #define _SLRCONA5 0x20
3057 #define _SLRCONA6 0x40
3058 #define _SLRCONA7 0x80
3060 //==============================================================================
3063 //==============================================================================
3064 // SLRCONB Bits
3066 extern __at(0x030D) __sfr SLRCONB;
3068 typedef struct
3070 unsigned SLRCONB0 : 1;
3071 unsigned SLRCONB1 : 1;
3072 unsigned SLRCONB2 : 1;
3073 unsigned SLRCONB3 : 1;
3074 unsigned SLRCONB4 : 1;
3075 unsigned SLRCONB5 : 1;
3076 unsigned SLRCONB6 : 1;
3077 unsigned SLRCONB7 : 1;
3078 } __SLRCONBbits_t;
3080 extern __at(0x030D) volatile __SLRCONBbits_t SLRCONBbits;
3082 #define _SLRCONB0 0x01
3083 #define _SLRCONB1 0x02
3084 #define _SLRCONB2 0x04
3085 #define _SLRCONB3 0x08
3086 #define _SLRCONB4 0x10
3087 #define _SLRCONB5 0x20
3088 #define _SLRCONB6 0x40
3089 #define _SLRCONB7 0x80
3091 //==============================================================================
3094 //==============================================================================
3095 // SLRCONC Bits
3097 extern __at(0x030E) __sfr SLRCONC;
3099 typedef struct
3101 unsigned SLRCONC0 : 1;
3102 unsigned SLRCONC1 : 1;
3103 unsigned SLRCONC2 : 1;
3104 unsigned SLRCONC3 : 1;
3105 unsigned SLRCONC4 : 1;
3106 unsigned SLRCONC5 : 1;
3107 unsigned SLRCONC6 : 1;
3108 unsigned SLRCONC7 : 1;
3109 } __SLRCONCbits_t;
3111 extern __at(0x030E) volatile __SLRCONCbits_t SLRCONCbits;
3113 #define _SLRCONC0 0x01
3114 #define _SLRCONC1 0x02
3115 #define _SLRCONC2 0x04
3116 #define _SLRCONC3 0x08
3117 #define _SLRCONC4 0x10
3118 #define _SLRCONC5 0x20
3119 #define _SLRCONC6 0x40
3120 #define _SLRCONC7 0x80
3122 //==============================================================================
3125 //==============================================================================
3126 // INLVLA Bits
3128 extern __at(0x038C) __sfr INLVLA;
3130 typedef struct
3132 unsigned INLVLA0 : 1;
3133 unsigned INLVLA1 : 1;
3134 unsigned INLVLA2 : 1;
3135 unsigned INLVLA3 : 1;
3136 unsigned INLVLA4 : 1;
3137 unsigned INLVLA5 : 1;
3138 unsigned INLVLA6 : 1;
3139 unsigned INLVLA7 : 1;
3140 } __INLVLAbits_t;
3142 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
3144 #define _INLVLA0 0x01
3145 #define _INLVLA1 0x02
3146 #define _INLVLA2 0x04
3147 #define _INLVLA3 0x08
3148 #define _INLVLA4 0x10
3149 #define _INLVLA5 0x20
3150 #define _INLVLA6 0x40
3151 #define _INLVLA7 0x80
3153 //==============================================================================
3156 //==============================================================================
3157 // INLVLB Bits
3159 extern __at(0x038D) __sfr INLVLB;
3161 typedef struct
3163 unsigned INLVLB0 : 1;
3164 unsigned INLVLB1 : 1;
3165 unsigned INLVLB2 : 1;
3166 unsigned INLVLB3 : 1;
3167 unsigned INLVLB4 : 1;
3168 unsigned INLVLB5 : 1;
3169 unsigned INLVLB6 : 1;
3170 unsigned INLVLB7 : 1;
3171 } __INLVLBbits_t;
3173 extern __at(0x038D) volatile __INLVLBbits_t INLVLBbits;
3175 #define _INLVLB0 0x01
3176 #define _INLVLB1 0x02
3177 #define _INLVLB2 0x04
3178 #define _INLVLB3 0x08
3179 #define _INLVLB4 0x10
3180 #define _INLVLB5 0x20
3181 #define _INLVLB6 0x40
3182 #define _INLVLB7 0x80
3184 //==============================================================================
3187 //==============================================================================
3188 // INLVLC Bits
3190 extern __at(0x038E) __sfr INLVLC;
3192 typedef struct
3194 unsigned INLVLC0 : 1;
3195 unsigned INLVLC1 : 1;
3196 unsigned INLVLC2 : 1;
3197 unsigned INLVLC3 : 1;
3198 unsigned INLVLC4 : 1;
3199 unsigned INLVLC5 : 1;
3200 unsigned INLVLC6 : 1;
3201 unsigned INLVLC7 : 1;
3202 } __INLVLCbits_t;
3204 extern __at(0x038E) volatile __INLVLCbits_t INLVLCbits;
3206 #define _INLVLC0 0x01
3207 #define _INLVLC1 0x02
3208 #define _INLVLC2 0x04
3209 #define _INLVLC3 0x08
3210 #define _INLVLC4 0x10
3211 #define _INLVLC5 0x20
3212 #define _INLVLC6 0x40
3213 #define _INLVLC7 0x80
3215 //==============================================================================
3218 //==============================================================================
3219 // INLVLE Bits
3221 extern __at(0x0390) __sfr INLVLE;
3223 typedef struct
3225 unsigned : 1;
3226 unsigned : 1;
3227 unsigned : 1;
3228 unsigned INLVLE3 : 1;
3229 unsigned : 1;
3230 unsigned : 1;
3231 unsigned : 1;
3232 unsigned : 1;
3233 } __INLVLEbits_t;
3235 extern __at(0x0390) volatile __INLVLEbits_t INLVLEbits;
3237 #define _INLVLE3 0x08
3239 //==============================================================================
3242 //==============================================================================
3243 // IOCAP Bits
3245 extern __at(0x0391) __sfr IOCAP;
3247 typedef struct
3249 unsigned IOCAP0 : 1;
3250 unsigned IOCAP1 : 1;
3251 unsigned IOCAP2 : 1;
3252 unsigned IOCAP3 : 1;
3253 unsigned IOCAP4 : 1;
3254 unsigned IOCAP5 : 1;
3255 unsigned IOCAP6 : 1;
3256 unsigned IOCAP7 : 1;
3257 } __IOCAPbits_t;
3259 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
3261 #define _IOCAP0 0x01
3262 #define _IOCAP1 0x02
3263 #define _IOCAP2 0x04
3264 #define _IOCAP3 0x08
3265 #define _IOCAP4 0x10
3266 #define _IOCAP5 0x20
3267 #define _IOCAP6 0x40
3268 #define _IOCAP7 0x80
3270 //==============================================================================
3273 //==============================================================================
3274 // IOCAN Bits
3276 extern __at(0x0392) __sfr IOCAN;
3278 typedef struct
3280 unsigned IOCAN0 : 1;
3281 unsigned IOCAN1 : 1;
3282 unsigned IOCAN2 : 1;
3283 unsigned IOCAN3 : 1;
3284 unsigned IOCAN4 : 1;
3285 unsigned IOCAN5 : 1;
3286 unsigned IOCAN6 : 1;
3287 unsigned IOCAN7 : 1;
3288 } __IOCANbits_t;
3290 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
3292 #define _IOCAN0 0x01
3293 #define _IOCAN1 0x02
3294 #define _IOCAN2 0x04
3295 #define _IOCAN3 0x08
3296 #define _IOCAN4 0x10
3297 #define _IOCAN5 0x20
3298 #define _IOCAN6 0x40
3299 #define _IOCAN7 0x80
3301 //==============================================================================
3304 //==============================================================================
3305 // IOCAF Bits
3307 extern __at(0x0393) __sfr IOCAF;
3309 typedef struct
3311 unsigned IOCAF0 : 1;
3312 unsigned IOCAF1 : 1;
3313 unsigned IOCAF2 : 1;
3314 unsigned IOCAF3 : 1;
3315 unsigned IOCAF4 : 1;
3316 unsigned IOCAF5 : 1;
3317 unsigned IOCAF6 : 1;
3318 unsigned IOCAF7 : 1;
3319 } __IOCAFbits_t;
3321 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
3323 #define _IOCAF0 0x01
3324 #define _IOCAF1 0x02
3325 #define _IOCAF2 0x04
3326 #define _IOCAF3 0x08
3327 #define _IOCAF4 0x10
3328 #define _IOCAF5 0x20
3329 #define _IOCAF6 0x40
3330 #define _IOCAF7 0x80
3332 //==============================================================================
3335 //==============================================================================
3336 // IOCBP Bits
3338 extern __at(0x0394) __sfr IOCBP;
3340 typedef struct
3342 unsigned IOCBP0 : 1;
3343 unsigned IOCBP1 : 1;
3344 unsigned IOCBP2 : 1;
3345 unsigned IOCBP3 : 1;
3346 unsigned IOCBP4 : 1;
3347 unsigned IOCBP5 : 1;
3348 unsigned IOCBP6 : 1;
3349 unsigned IOCBP7 : 1;
3350 } __IOCBPbits_t;
3352 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
3354 #define _IOCBP0 0x01
3355 #define _IOCBP1 0x02
3356 #define _IOCBP2 0x04
3357 #define _IOCBP3 0x08
3358 #define _IOCBP4 0x10
3359 #define _IOCBP5 0x20
3360 #define _IOCBP6 0x40
3361 #define _IOCBP7 0x80
3363 //==============================================================================
3366 //==============================================================================
3367 // IOCBN Bits
3369 extern __at(0x0395) __sfr IOCBN;
3371 typedef struct
3373 unsigned IOCBN0 : 1;
3374 unsigned IOCBN1 : 1;
3375 unsigned IOCBN2 : 1;
3376 unsigned IOCBN3 : 1;
3377 unsigned IOCBN4 : 1;
3378 unsigned IOCBN5 : 1;
3379 unsigned IOCBN6 : 1;
3380 unsigned IOCBN7 : 1;
3381 } __IOCBNbits_t;
3383 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
3385 #define _IOCBN0 0x01
3386 #define _IOCBN1 0x02
3387 #define _IOCBN2 0x04
3388 #define _IOCBN3 0x08
3389 #define _IOCBN4 0x10
3390 #define _IOCBN5 0x20
3391 #define _IOCBN6 0x40
3392 #define _IOCBN7 0x80
3394 //==============================================================================
3397 //==============================================================================
3398 // IOCBF Bits
3400 extern __at(0x0396) __sfr IOCBF;
3402 typedef struct
3404 unsigned IOCBF0 : 1;
3405 unsigned IOCBF1 : 1;
3406 unsigned IOCBF2 : 1;
3407 unsigned IOCBF3 : 1;
3408 unsigned IOCBF4 : 1;
3409 unsigned IOCBF5 : 1;
3410 unsigned IOCBF6 : 1;
3411 unsigned IOCBF7 : 1;
3412 } __IOCBFbits_t;
3414 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3416 #define _IOCBF0 0x01
3417 #define _IOCBF1 0x02
3418 #define _IOCBF2 0x04
3419 #define _IOCBF3 0x08
3420 #define _IOCBF4 0x10
3421 #define _IOCBF5 0x20
3422 #define _IOCBF6 0x40
3423 #define _IOCBF7 0x80
3425 //==============================================================================
3428 //==============================================================================
3429 // IOCCP Bits
3431 extern __at(0x0397) __sfr IOCCP;
3433 typedef struct
3435 unsigned IOCCP0 : 1;
3436 unsigned IOCCP1 : 1;
3437 unsigned IOCCP2 : 1;
3438 unsigned IOCCP3 : 1;
3439 unsigned IOCCP4 : 1;
3440 unsigned IOCCP5 : 1;
3441 unsigned IOCCP6 : 1;
3442 unsigned IOCCP7 : 1;
3443 } __IOCCPbits_t;
3445 extern __at(0x0397) volatile __IOCCPbits_t IOCCPbits;
3447 #define _IOCCP0 0x01
3448 #define _IOCCP1 0x02
3449 #define _IOCCP2 0x04
3450 #define _IOCCP3 0x08
3451 #define _IOCCP4 0x10
3452 #define _IOCCP5 0x20
3453 #define _IOCCP6 0x40
3454 #define _IOCCP7 0x80
3456 //==============================================================================
3459 //==============================================================================
3460 // IOCCN Bits
3462 extern __at(0x0398) __sfr IOCCN;
3464 typedef struct
3466 unsigned IOCCN0 : 1;
3467 unsigned IOCCN1 : 1;
3468 unsigned IOCCN2 : 1;
3469 unsigned IOCCN3 : 1;
3470 unsigned IOCCN4 : 1;
3471 unsigned IOCCN5 : 1;
3472 unsigned IOCCN6 : 1;
3473 unsigned IOCCN7 : 1;
3474 } __IOCCNbits_t;
3476 extern __at(0x0398) volatile __IOCCNbits_t IOCCNbits;
3478 #define _IOCCN0 0x01
3479 #define _IOCCN1 0x02
3480 #define _IOCCN2 0x04
3481 #define _IOCCN3 0x08
3482 #define _IOCCN4 0x10
3483 #define _IOCCN5 0x20
3484 #define _IOCCN6 0x40
3485 #define _IOCCN7 0x80
3487 //==============================================================================
3490 //==============================================================================
3491 // IOCCF Bits
3493 extern __at(0x0399) __sfr IOCCF;
3495 typedef struct
3497 unsigned IOCCF0 : 1;
3498 unsigned IOCCF1 : 1;
3499 unsigned IOCCF2 : 1;
3500 unsigned IOCCF3 : 1;
3501 unsigned IOCCF4 : 1;
3502 unsigned IOCCF5 : 1;
3503 unsigned IOCCF6 : 1;
3504 unsigned IOCCF7 : 1;
3505 } __IOCCFbits_t;
3507 extern __at(0x0399) volatile __IOCCFbits_t IOCCFbits;
3509 #define _IOCCF0 0x01
3510 #define _IOCCF1 0x02
3511 #define _IOCCF2 0x04
3512 #define _IOCCF3 0x08
3513 #define _IOCCF4 0x10
3514 #define _IOCCF5 0x20
3515 #define _IOCCF6 0x40
3516 #define _IOCCF7 0x80
3518 //==============================================================================
3521 //==============================================================================
3522 // IOCEP Bits
3524 extern __at(0x039D) __sfr IOCEP;
3526 typedef struct
3528 unsigned : 1;
3529 unsigned : 1;
3530 unsigned : 1;
3531 unsigned IOCEP3 : 1;
3532 unsigned : 1;
3533 unsigned : 1;
3534 unsigned : 1;
3535 unsigned : 1;
3536 } __IOCEPbits_t;
3538 extern __at(0x039D) volatile __IOCEPbits_t IOCEPbits;
3540 #define _IOCEP3 0x08
3542 //==============================================================================
3545 //==============================================================================
3546 // IOCEN Bits
3548 extern __at(0x039E) __sfr IOCEN;
3550 typedef struct
3552 unsigned : 1;
3553 unsigned : 1;
3554 unsigned : 1;
3555 unsigned IOCEN3 : 1;
3556 unsigned : 1;
3557 unsigned : 1;
3558 unsigned : 1;
3559 unsigned : 1;
3560 } __IOCENbits_t;
3562 extern __at(0x039E) volatile __IOCENbits_t IOCENbits;
3564 #define _IOCEN3 0x08
3566 //==============================================================================
3569 //==============================================================================
3570 // IOCEF Bits
3572 extern __at(0x039F) __sfr IOCEF;
3574 typedef struct
3576 unsigned : 1;
3577 unsigned : 1;
3578 unsigned : 1;
3579 unsigned IOCEF3 : 1;
3580 unsigned : 1;
3581 unsigned : 1;
3582 unsigned : 1;
3583 unsigned : 1;
3584 } __IOCEFbits_t;
3586 extern __at(0x039F) volatile __IOCEFbits_t IOCEFbits;
3588 #define _IOCEF3 0x08
3590 //==============================================================================
3593 //==============================================================================
3594 // OPA1CON Bits
3596 extern __at(0x0511) __sfr OPA1CON;
3598 typedef union
3600 struct
3602 unsigned OPA1CH0 : 1;
3603 unsigned OPA1CH1 : 1;
3604 unsigned : 1;
3605 unsigned : 1;
3606 unsigned : 1;
3607 unsigned : 1;
3608 unsigned OPA1SP : 1;
3609 unsigned OPA1EN : 1;
3612 struct
3614 unsigned OPA1CH : 2;
3615 unsigned : 6;
3617 } __OPA1CONbits_t;
3619 extern __at(0x0511) volatile __OPA1CONbits_t OPA1CONbits;
3621 #define _OPA1CH0 0x01
3622 #define _OPA1CH1 0x02
3623 #define _OPA1SP 0x40
3624 #define _OPA1EN 0x80
3626 //==============================================================================
3629 //==============================================================================
3630 // OPA2CON Bits
3632 extern __at(0x0513) __sfr OPA2CON;
3634 typedef union
3636 struct
3638 unsigned OPA2CH0 : 1;
3639 unsigned OPA2CH1 : 1;
3640 unsigned : 1;
3641 unsigned : 1;
3642 unsigned : 1;
3643 unsigned : 1;
3644 unsigned OPA2SP : 1;
3645 unsigned OPA2EN : 1;
3648 struct
3650 unsigned OPA2CH : 2;
3651 unsigned : 6;
3653 } __OPA2CONbits_t;
3655 extern __at(0x0513) volatile __OPA2CONbits_t OPA2CONbits;
3657 #define _OPA2CH0 0x01
3658 #define _OPA2CH1 0x02
3659 #define _OPA2SP 0x40
3660 #define _OPA2EN 0x80
3662 //==============================================================================
3665 //==============================================================================
3666 // CLKRCON Bits
3668 extern __at(0x051A) __sfr CLKRCON;
3670 typedef union
3672 struct
3674 unsigned CLKRDIV0 : 1;
3675 unsigned CLKRDIV1 : 1;
3676 unsigned CLKRDIV2 : 1;
3677 unsigned CLKRDC0 : 1;
3678 unsigned CLKRDC1 : 1;
3679 unsigned CLKRSLR : 1;
3680 unsigned CLKROE : 1;
3681 unsigned CLKREN : 1;
3684 struct
3686 unsigned CLKRDIV : 3;
3687 unsigned : 5;
3690 struct
3692 unsigned : 3;
3693 unsigned CLKRDC : 2;
3694 unsigned : 3;
3696 } __CLKRCONbits_t;
3698 extern __at(0x051A) volatile __CLKRCONbits_t CLKRCONbits;
3700 #define _CLKRDIV0 0x01
3701 #define _CLKRDIV1 0x02
3702 #define _CLKRDIV2 0x04
3703 #define _CLKRDC0 0x08
3704 #define _CLKRDC1 0x10
3705 #define _CLKRSLR 0x20
3706 #define _CLKROE 0x40
3707 #define _CLKREN 0x80
3709 //==============================================================================
3712 //==============================================================================
3713 // PSMC1CON Bits
3715 extern __at(0x0811) __sfr PSMC1CON;
3717 typedef union
3719 struct
3721 unsigned P1MODE0 : 1;
3722 unsigned P1MODE1 : 1;
3723 unsigned P1MODE2 : 1;
3724 unsigned P1MODE3 : 1;
3725 unsigned P1DBRE : 1;
3726 unsigned P1DBFE : 1;
3727 unsigned PSMC1LD : 1;
3728 unsigned PSMC1EN : 1;
3731 struct
3733 unsigned P1MODE : 4;
3734 unsigned : 4;
3736 } __PSMC1CONbits_t;
3738 extern __at(0x0811) volatile __PSMC1CONbits_t PSMC1CONbits;
3740 #define _P1MODE0 0x01
3741 #define _P1MODE1 0x02
3742 #define _P1MODE2 0x04
3743 #define _P1MODE3 0x08
3744 #define _P1DBRE 0x10
3745 #define _P1DBFE 0x20
3746 #define _PSMC1LD 0x40
3747 #define _PSMC1EN 0x80
3749 //==============================================================================
3752 //==============================================================================
3753 // PSMC1MDL Bits
3755 extern __at(0x0812) __sfr PSMC1MDL;
3757 typedef union
3759 struct
3761 unsigned P1MSRC0 : 1;
3762 unsigned P1MSRC1 : 1;
3763 unsigned P1MSRC2 : 1;
3764 unsigned P1MSRC3 : 1;
3765 unsigned : 1;
3766 unsigned P1MDLBIT : 1;
3767 unsigned P1MDLPOL : 1;
3768 unsigned P1MDLEN : 1;
3771 struct
3773 unsigned P1MSRC : 4;
3774 unsigned : 4;
3776 } __PSMC1MDLbits_t;
3778 extern __at(0x0812) volatile __PSMC1MDLbits_t PSMC1MDLbits;
3780 #define _P1MSRC0 0x01
3781 #define _P1MSRC1 0x02
3782 #define _P1MSRC2 0x04
3783 #define _P1MSRC3 0x08
3784 #define _P1MDLBIT 0x20
3785 #define _P1MDLPOL 0x40
3786 #define _P1MDLEN 0x80
3788 //==============================================================================
3791 //==============================================================================
3792 // PSMC1SYNC Bits
3794 extern __at(0x0813) __sfr PSMC1SYNC;
3796 typedef union
3798 struct
3800 unsigned P1SYNC0 : 1;
3801 unsigned P1SYNC1 : 1;
3802 unsigned : 1;
3803 unsigned : 1;
3804 unsigned : 1;
3805 unsigned : 1;
3806 unsigned : 1;
3807 unsigned : 1;
3810 struct
3812 unsigned P1SYNC : 2;
3813 unsigned : 6;
3815 } __PSMC1SYNCbits_t;
3817 extern __at(0x0813) volatile __PSMC1SYNCbits_t PSMC1SYNCbits;
3819 #define _P1SYNC0 0x01
3820 #define _P1SYNC1 0x02
3822 //==============================================================================
3825 //==============================================================================
3826 // PSMC1CLK Bits
3828 extern __at(0x0814) __sfr PSMC1CLK;
3830 typedef union
3832 struct
3834 unsigned P1CSRC0 : 1;
3835 unsigned P1CSRC1 : 1;
3836 unsigned : 1;
3837 unsigned : 1;
3838 unsigned P1CPRE0 : 1;
3839 unsigned P1CPRE1 : 1;
3840 unsigned : 1;
3841 unsigned : 1;
3844 struct
3846 unsigned P1CSRC : 2;
3847 unsigned : 6;
3850 struct
3852 unsigned : 4;
3853 unsigned P1CPRE : 2;
3854 unsigned : 2;
3856 } __PSMC1CLKbits_t;
3858 extern __at(0x0814) volatile __PSMC1CLKbits_t PSMC1CLKbits;
3860 #define _P1CSRC0 0x01
3861 #define _P1CSRC1 0x02
3862 #define _P1CPRE0 0x10
3863 #define _P1CPRE1 0x20
3865 //==============================================================================
3868 //==============================================================================
3869 // PSMC1OEN Bits
3871 extern __at(0x0815) __sfr PSMC1OEN;
3873 typedef struct
3875 unsigned P1OEA : 1;
3876 unsigned P1OEB : 1;
3877 unsigned P1OEC : 1;
3878 unsigned P1OED : 1;
3879 unsigned P1OEE : 1;
3880 unsigned P1OEF : 1;
3881 unsigned : 1;
3882 unsigned : 1;
3883 } __PSMC1OENbits_t;
3885 extern __at(0x0815) volatile __PSMC1OENbits_t PSMC1OENbits;
3887 #define _P1OEA 0x01
3888 #define _P1OEB 0x02
3889 #define _P1OEC 0x04
3890 #define _P1OED 0x08
3891 #define _P1OEE 0x10
3892 #define _P1OEF 0x20
3894 //==============================================================================
3897 //==============================================================================
3898 // PSMC1POL Bits
3900 extern __at(0x0816) __sfr PSMC1POL;
3902 typedef struct
3904 unsigned P1POLA : 1;
3905 unsigned P1POLB : 1;
3906 unsigned P1POLC : 1;
3907 unsigned P1POLD : 1;
3908 unsigned P1POLE : 1;
3909 unsigned P1POLF : 1;
3910 unsigned P1INPOL : 1;
3911 unsigned : 1;
3912 } __PSMC1POLbits_t;
3914 extern __at(0x0816) volatile __PSMC1POLbits_t PSMC1POLbits;
3916 #define _P1POLA 0x01
3917 #define _P1POLB 0x02
3918 #define _P1POLC 0x04
3919 #define _P1POLD 0x08
3920 #define _P1POLE 0x10
3921 #define _P1POLF 0x20
3922 #define _P1INPOL 0x40
3924 //==============================================================================
3927 //==============================================================================
3928 // PSMC1BLNK Bits
3930 extern __at(0x0817) __sfr PSMC1BLNK;
3932 typedef union
3934 struct
3936 unsigned P1REBM0 : 1;
3937 unsigned P1REBM1 : 1;
3938 unsigned : 1;
3939 unsigned : 1;
3940 unsigned P1FEBM0 : 1;
3941 unsigned P1FEBM1 : 1;
3942 unsigned : 1;
3943 unsigned : 1;
3946 struct
3948 unsigned P1REBM : 2;
3949 unsigned : 6;
3952 struct
3954 unsigned : 4;
3955 unsigned P1FEBM : 2;
3956 unsigned : 2;
3958 } __PSMC1BLNKbits_t;
3960 extern __at(0x0817) volatile __PSMC1BLNKbits_t PSMC1BLNKbits;
3962 #define _P1REBM0 0x01
3963 #define _P1REBM1 0x02
3964 #define _P1FEBM0 0x10
3965 #define _P1FEBM1 0x20
3967 //==============================================================================
3970 //==============================================================================
3971 // PSMC1REBS Bits
3973 extern __at(0x0818) __sfr PSMC1REBS;
3975 typedef struct
3977 unsigned : 1;
3978 unsigned P1REBSC1 : 1;
3979 unsigned P1REBSC2 : 1;
3980 unsigned P1REBSC3 : 1;
3981 unsigned : 1;
3982 unsigned : 1;
3983 unsigned : 1;
3984 unsigned P1REBSIN : 1;
3985 } __PSMC1REBSbits_t;
3987 extern __at(0x0818) volatile __PSMC1REBSbits_t PSMC1REBSbits;
3989 #define _P1REBSC1 0x02
3990 #define _P1REBSC2 0x04
3991 #define _P1REBSC3 0x08
3992 #define _P1REBSIN 0x80
3994 //==============================================================================
3997 //==============================================================================
3998 // PSMC1FEBS Bits
4000 extern __at(0x0819) __sfr PSMC1FEBS;
4002 typedef struct
4004 unsigned : 1;
4005 unsigned P1FEBSC1 : 1;
4006 unsigned P1FEBSC2 : 1;
4007 unsigned P1FEBSC3 : 1;
4008 unsigned : 1;
4009 unsigned : 1;
4010 unsigned : 1;
4011 unsigned P1FEBSIN : 1;
4012 } __PSMC1FEBSbits_t;
4014 extern __at(0x0819) volatile __PSMC1FEBSbits_t PSMC1FEBSbits;
4016 #define _P1FEBSC1 0x02
4017 #define _P1FEBSC2 0x04
4018 #define _P1FEBSC3 0x08
4019 #define _P1FEBSIN 0x80
4021 //==============================================================================
4024 //==============================================================================
4025 // PSMC1PHS Bits
4027 extern __at(0x081A) __sfr PSMC1PHS;
4029 typedef struct
4031 unsigned P1PHST : 1;
4032 unsigned P1PHSC1 : 1;
4033 unsigned P1PHSC2 : 1;
4034 unsigned P1PHSC3 : 1;
4035 unsigned : 1;
4036 unsigned : 1;
4037 unsigned : 1;
4038 unsigned P1PHSIN : 1;
4039 } __PSMC1PHSbits_t;
4041 extern __at(0x081A) volatile __PSMC1PHSbits_t PSMC1PHSbits;
4043 #define _P1PHST 0x01
4044 #define _P1PHSC1 0x02
4045 #define _P1PHSC2 0x04
4046 #define _P1PHSC3 0x08
4047 #define _P1PHSIN 0x80
4049 //==============================================================================
4052 //==============================================================================
4053 // PSMC1DCS Bits
4055 extern __at(0x081B) __sfr PSMC1DCS;
4057 typedef struct
4059 unsigned P1DCST : 1;
4060 unsigned P1DCSC1 : 1;
4061 unsigned P1DCSC2 : 1;
4062 unsigned P1DCSC3 : 1;
4063 unsigned : 1;
4064 unsigned : 1;
4065 unsigned : 1;
4066 unsigned P1DCSIN : 1;
4067 } __PSMC1DCSbits_t;
4069 extern __at(0x081B) volatile __PSMC1DCSbits_t PSMC1DCSbits;
4071 #define _P1DCST 0x01
4072 #define _P1DCSC1 0x02
4073 #define _P1DCSC2 0x04
4074 #define _P1DCSC3 0x08
4075 #define _P1DCSIN 0x80
4077 //==============================================================================
4080 //==============================================================================
4081 // PSMC1PRS Bits
4083 extern __at(0x081C) __sfr PSMC1PRS;
4085 typedef struct
4087 unsigned P1PRST : 1;
4088 unsigned P1PRSC1 : 1;
4089 unsigned P1PRSC2 : 1;
4090 unsigned P1PRSC3 : 1;
4091 unsigned : 1;
4092 unsigned : 1;
4093 unsigned : 1;
4094 unsigned P1PRSIN : 1;
4095 } __PSMC1PRSbits_t;
4097 extern __at(0x081C) volatile __PSMC1PRSbits_t PSMC1PRSbits;
4099 #define _P1PRST 0x01
4100 #define _P1PRSC1 0x02
4101 #define _P1PRSC2 0x04
4102 #define _P1PRSC3 0x08
4103 #define _P1PRSIN 0x80
4105 //==============================================================================
4108 //==============================================================================
4109 // PSMC1ASDC Bits
4111 extern __at(0x081D) __sfr PSMC1ASDC;
4113 typedef struct
4115 unsigned P1ASDOV : 1;
4116 unsigned : 1;
4117 unsigned : 1;
4118 unsigned : 1;
4119 unsigned : 1;
4120 unsigned P1ARSEN : 1;
4121 unsigned P1ASDEN : 1;
4122 unsigned P1ASE : 1;
4123 } __PSMC1ASDCbits_t;
4125 extern __at(0x081D) volatile __PSMC1ASDCbits_t PSMC1ASDCbits;
4127 #define _P1ASDOV 0x01
4128 #define _P1ARSEN 0x20
4129 #define _P1ASDEN 0x40
4130 #define _P1ASE 0x80
4132 //==============================================================================
4135 //==============================================================================
4136 // PSMC1ASDL Bits
4138 extern __at(0x081E) __sfr PSMC1ASDL;
4140 typedef struct
4142 unsigned P1ASDLA : 1;
4143 unsigned P1ASDLB : 1;
4144 unsigned P1ASDLC : 1;
4145 unsigned P1ASDLD : 1;
4146 unsigned P1ASDLE : 1;
4147 unsigned P1ASDLF : 1;
4148 unsigned : 1;
4149 unsigned : 1;
4150 } __PSMC1ASDLbits_t;
4152 extern __at(0x081E) volatile __PSMC1ASDLbits_t PSMC1ASDLbits;
4154 #define _P1ASDLA 0x01
4155 #define _P1ASDLB 0x02
4156 #define _P1ASDLC 0x04
4157 #define _P1ASDLD 0x08
4158 #define _P1ASDLE 0x10
4159 #define _P1ASDLF 0x20
4161 //==============================================================================
4164 //==============================================================================
4165 // PSMC1ASDS Bits
4167 extern __at(0x081F) __sfr PSMC1ASDS;
4169 typedef struct
4171 unsigned : 1;
4172 unsigned P1ASDSC1 : 1;
4173 unsigned P1ASDSC2 : 1;
4174 unsigned P1ASDSC3 : 1;
4175 unsigned : 1;
4176 unsigned : 1;
4177 unsigned : 1;
4178 unsigned P1ASDSIN : 1;
4179 } __PSMC1ASDSbits_t;
4181 extern __at(0x081F) volatile __PSMC1ASDSbits_t PSMC1ASDSbits;
4183 #define _P1ASDSC1 0x02
4184 #define _P1ASDSC2 0x04
4185 #define _P1ASDSC3 0x08
4186 #define _P1ASDSIN 0x80
4188 //==============================================================================
4191 //==============================================================================
4192 // PSMC1INT Bits
4194 extern __at(0x0820) __sfr PSMC1INT;
4196 typedef struct
4198 unsigned P1TPRIF : 1;
4199 unsigned P1TDCIF : 1;
4200 unsigned P1TPHIF : 1;
4201 unsigned P1TOVIF : 1;
4202 unsigned P1TPRIE : 1;
4203 unsigned P1TDCIE : 1;
4204 unsigned P1TPHIE : 1;
4205 unsigned P1TOVIE : 1;
4206 } __PSMC1INTbits_t;
4208 extern __at(0x0820) volatile __PSMC1INTbits_t PSMC1INTbits;
4210 #define _P1TPRIF 0x01
4211 #define _P1TDCIF 0x02
4212 #define _P1TPHIF 0x04
4213 #define _P1TOVIF 0x08
4214 #define _P1TPRIE 0x10
4215 #define _P1TDCIE 0x20
4216 #define _P1TPHIE 0x40
4217 #define _P1TOVIE 0x80
4219 //==============================================================================
4221 extern __at(0x0821) __sfr PSMC1PH;
4223 //==============================================================================
4224 // PSMC1PHL Bits
4226 extern __at(0x0821) __sfr PSMC1PHL;
4228 typedef struct
4230 unsigned PSMC1PH0 : 1;
4231 unsigned PSMC1PH1 : 1;
4232 unsigned PSMC1PH2 : 1;
4233 unsigned PSMC1PH3 : 1;
4234 unsigned PSMC1PH4 : 1;
4235 unsigned PSMC1PH5 : 1;
4236 unsigned PSMC1PH6 : 1;
4237 unsigned PSMC1PH7 : 1;
4238 } __PSMC1PHLbits_t;
4240 extern __at(0x0821) volatile __PSMC1PHLbits_t PSMC1PHLbits;
4242 #define _PSMC1PH0 0x01
4243 #define _PSMC1PH1 0x02
4244 #define _PSMC1PH2 0x04
4245 #define _PSMC1PH3 0x08
4246 #define _PSMC1PH4 0x10
4247 #define _PSMC1PH5 0x20
4248 #define _PSMC1PH6 0x40
4249 #define _PSMC1PH7 0x80
4251 //==============================================================================
4254 //==============================================================================
4255 // PSMC1PHH Bits
4257 extern __at(0x0822) __sfr PSMC1PHH;
4259 typedef struct
4261 unsigned PSMC1PH8 : 1;
4262 unsigned PSMC1PH9 : 1;
4263 unsigned PSMC1PH10 : 1;
4264 unsigned PSMC1PH11 : 1;
4265 unsigned PSMC1PH12 : 1;
4266 unsigned PSMC1PH13 : 1;
4267 unsigned PSMC1PH14 : 1;
4268 unsigned PSMC1PH15 : 1;
4269 } __PSMC1PHHbits_t;
4271 extern __at(0x0822) volatile __PSMC1PHHbits_t PSMC1PHHbits;
4273 #define _PSMC1PH8 0x01
4274 #define _PSMC1PH9 0x02
4275 #define _PSMC1PH10 0x04
4276 #define _PSMC1PH11 0x08
4277 #define _PSMC1PH12 0x10
4278 #define _PSMC1PH13 0x20
4279 #define _PSMC1PH14 0x40
4280 #define _PSMC1PH15 0x80
4282 //==============================================================================
4284 extern __at(0x0823) __sfr PSMC1DC;
4286 //==============================================================================
4287 // PSMC1DCL Bits
4289 extern __at(0x0823) __sfr PSMC1DCL;
4291 typedef struct
4293 unsigned PSMC1DC0 : 1;
4294 unsigned PSMC1DC1 : 1;
4295 unsigned PSMC1DC2 : 1;
4296 unsigned PSMC1DC3 : 1;
4297 unsigned PSMC1DC4 : 1;
4298 unsigned PSMC1DC5 : 1;
4299 unsigned PSMC1DC6 : 1;
4300 unsigned PSMC1DC7 : 1;
4301 } __PSMC1DCLbits_t;
4303 extern __at(0x0823) volatile __PSMC1DCLbits_t PSMC1DCLbits;
4305 #define _PSMC1DC0 0x01
4306 #define _PSMC1DC1 0x02
4307 #define _PSMC1DC2 0x04
4308 #define _PSMC1DC3 0x08
4309 #define _PSMC1DC4 0x10
4310 #define _PSMC1DC5 0x20
4311 #define _PSMC1DC6 0x40
4312 #define _PSMC1DC7 0x80
4314 //==============================================================================
4317 //==============================================================================
4318 // PSMC1DCH Bits
4320 extern __at(0x0824) __sfr PSMC1DCH;
4322 typedef struct
4324 unsigned PSMC1DC8 : 1;
4325 unsigned PSMC1DC9 : 1;
4326 unsigned PSMC1DC10 : 1;
4327 unsigned PSMC1DC11 : 1;
4328 unsigned PSMC1DC12 : 1;
4329 unsigned PSMC1DC13 : 1;
4330 unsigned PSMC1DC14 : 1;
4331 unsigned PSMC1DC15 : 1;
4332 } __PSMC1DCHbits_t;
4334 extern __at(0x0824) volatile __PSMC1DCHbits_t PSMC1DCHbits;
4336 #define _PSMC1DC8 0x01
4337 #define _PSMC1DC9 0x02
4338 #define _PSMC1DC10 0x04
4339 #define _PSMC1DC11 0x08
4340 #define _PSMC1DC12 0x10
4341 #define _PSMC1DC13 0x20
4342 #define _PSMC1DC14 0x40
4343 #define _PSMC1DC15 0x80
4345 //==============================================================================
4347 extern __at(0x0825) __sfr PSMC1PR;
4349 //==============================================================================
4350 // PSMC1PRL Bits
4352 extern __at(0x0825) __sfr PSMC1PRL;
4354 typedef struct
4356 unsigned PSMC1PR0 : 1;
4357 unsigned PSMC1PR1 : 1;
4358 unsigned PSMC1PR2 : 1;
4359 unsigned PSMC1PR3 : 1;
4360 unsigned PSMC1PR4 : 1;
4361 unsigned PSMC1PR5 : 1;
4362 unsigned PSMC1PR6 : 1;
4363 unsigned PSMC1PR7 : 1;
4364 } __PSMC1PRLbits_t;
4366 extern __at(0x0825) volatile __PSMC1PRLbits_t PSMC1PRLbits;
4368 #define _PSMC1PR0 0x01
4369 #define _PSMC1PR1 0x02
4370 #define _PSMC1PR2 0x04
4371 #define _PSMC1PR3 0x08
4372 #define _PSMC1PR4 0x10
4373 #define _PSMC1PR5 0x20
4374 #define _PSMC1PR6 0x40
4375 #define _PSMC1PR7 0x80
4377 //==============================================================================
4380 //==============================================================================
4381 // PSMC1PRH Bits
4383 extern __at(0x0826) __sfr PSMC1PRH;
4385 typedef struct
4387 unsigned PSMC1PR8 : 1;
4388 unsigned PSMC1PR9 : 1;
4389 unsigned PSMC1PR10 : 1;
4390 unsigned PSMC1PR11 : 1;
4391 unsigned PSMC1PR12 : 1;
4392 unsigned PSMC1PR13 : 1;
4393 unsigned PSMC1PR14 : 1;
4394 unsigned PSMC1PR15 : 1;
4395 } __PSMC1PRHbits_t;
4397 extern __at(0x0826) volatile __PSMC1PRHbits_t PSMC1PRHbits;
4399 #define _PSMC1PR8 0x01
4400 #define _PSMC1PR9 0x02
4401 #define _PSMC1PR10 0x04
4402 #define _PSMC1PR11 0x08
4403 #define _PSMC1PR12 0x10
4404 #define _PSMC1PR13 0x20
4405 #define _PSMC1PR14 0x40
4406 #define _PSMC1PR15 0x80
4408 //==============================================================================
4410 extern __at(0x0827) __sfr PSMC1TMR;
4412 //==============================================================================
4413 // PSMC1TMRL Bits
4415 extern __at(0x0827) __sfr PSMC1TMRL;
4417 typedef struct
4419 unsigned PSMC1TMR0 : 1;
4420 unsigned PSMC1TMR1 : 1;
4421 unsigned PSMC1TMR2 : 1;
4422 unsigned PSMC1TMR3 : 1;
4423 unsigned PSMC1TMR4 : 1;
4424 unsigned PSMC1TMR5 : 1;
4425 unsigned PSMC1TMR6 : 1;
4426 unsigned PSMC1TMR7 : 1;
4427 } __PSMC1TMRLbits_t;
4429 extern __at(0x0827) volatile __PSMC1TMRLbits_t PSMC1TMRLbits;
4431 #define _PSMC1TMR0 0x01
4432 #define _PSMC1TMR1 0x02
4433 #define _PSMC1TMR2 0x04
4434 #define _PSMC1TMR3 0x08
4435 #define _PSMC1TMR4 0x10
4436 #define _PSMC1TMR5 0x20
4437 #define _PSMC1TMR6 0x40
4438 #define _PSMC1TMR7 0x80
4440 //==============================================================================
4443 //==============================================================================
4444 // PSMC1TMRH Bits
4446 extern __at(0x0828) __sfr PSMC1TMRH;
4448 typedef struct
4450 unsigned PSMC1TMR8 : 1;
4451 unsigned PSMC1TMR9 : 1;
4452 unsigned PSMC1TMR10 : 1;
4453 unsigned PSMC1TMR11 : 1;
4454 unsigned PSMC1TMR12 : 1;
4455 unsigned PSMC1TMR13 : 1;
4456 unsigned PSMC1TMR14 : 1;
4457 unsigned PSMC1TMR15 : 1;
4458 } __PSMC1TMRHbits_t;
4460 extern __at(0x0828) volatile __PSMC1TMRHbits_t PSMC1TMRHbits;
4462 #define _PSMC1TMR8 0x01
4463 #define _PSMC1TMR9 0x02
4464 #define _PSMC1TMR10 0x04
4465 #define _PSMC1TMR11 0x08
4466 #define _PSMC1TMR12 0x10
4467 #define _PSMC1TMR13 0x20
4468 #define _PSMC1TMR14 0x40
4469 #define _PSMC1TMR15 0x80
4471 //==============================================================================
4474 //==============================================================================
4475 // PSMC1DBR Bits
4477 extern __at(0x0829) __sfr PSMC1DBR;
4479 typedef struct
4481 unsigned PSMC1DBR0 : 1;
4482 unsigned PSMC1DBR1 : 1;
4483 unsigned PSMC1DBR2 : 1;
4484 unsigned PSMC1DBR3 : 1;
4485 unsigned PSMC1DBR4 : 1;
4486 unsigned PSMC1DBR5 : 1;
4487 unsigned PSMC1DBR6 : 1;
4488 unsigned PSMC1DBR7 : 1;
4489 } __PSMC1DBRbits_t;
4491 extern __at(0x0829) volatile __PSMC1DBRbits_t PSMC1DBRbits;
4493 #define _PSMC1DBR0 0x01
4494 #define _PSMC1DBR1 0x02
4495 #define _PSMC1DBR2 0x04
4496 #define _PSMC1DBR3 0x08
4497 #define _PSMC1DBR4 0x10
4498 #define _PSMC1DBR5 0x20
4499 #define _PSMC1DBR6 0x40
4500 #define _PSMC1DBR7 0x80
4502 //==============================================================================
4505 //==============================================================================
4506 // PSMC1DBF Bits
4508 extern __at(0x082A) __sfr PSMC1DBF;
4510 typedef struct
4512 unsigned PSMC1DBF0 : 1;
4513 unsigned PSMC1DBF1 : 1;
4514 unsigned PSMC1DBF2 : 1;
4515 unsigned PSMC1DBF3 : 1;
4516 unsigned PSMC1DBF4 : 1;
4517 unsigned PSMC1DBF5 : 1;
4518 unsigned PSMC1DBF6 : 1;
4519 unsigned PSMC1DBF7 : 1;
4520 } __PSMC1DBFbits_t;
4522 extern __at(0x082A) volatile __PSMC1DBFbits_t PSMC1DBFbits;
4524 #define _PSMC1DBF0 0x01
4525 #define _PSMC1DBF1 0x02
4526 #define _PSMC1DBF2 0x04
4527 #define _PSMC1DBF3 0x08
4528 #define _PSMC1DBF4 0x10
4529 #define _PSMC1DBF5 0x20
4530 #define _PSMC1DBF6 0x40
4531 #define _PSMC1DBF7 0x80
4533 //==============================================================================
4536 //==============================================================================
4537 // PSMC1BLKR Bits
4539 extern __at(0x082B) __sfr PSMC1BLKR;
4541 typedef struct
4543 unsigned PSMC1BLKR0 : 1;
4544 unsigned PSMC1BLKR1 : 1;
4545 unsigned PSMC1BLKR2 : 1;
4546 unsigned PSMC1BLKR3 : 1;
4547 unsigned PSMC1BLKR4 : 1;
4548 unsigned PSMC1BLKR5 : 1;
4549 unsigned PSMC1BLKR6 : 1;
4550 unsigned PSMC1BLKR7 : 1;
4551 } __PSMC1BLKRbits_t;
4553 extern __at(0x082B) volatile __PSMC1BLKRbits_t PSMC1BLKRbits;
4555 #define _PSMC1BLKR0 0x01
4556 #define _PSMC1BLKR1 0x02
4557 #define _PSMC1BLKR2 0x04
4558 #define _PSMC1BLKR3 0x08
4559 #define _PSMC1BLKR4 0x10
4560 #define _PSMC1BLKR5 0x20
4561 #define _PSMC1BLKR6 0x40
4562 #define _PSMC1BLKR7 0x80
4564 //==============================================================================
4567 //==============================================================================
4568 // PSMC1BLKF Bits
4570 extern __at(0x082C) __sfr PSMC1BLKF;
4572 typedef struct
4574 unsigned PSMC1BLKF0 : 1;
4575 unsigned PSMC1BLKF1 : 1;
4576 unsigned PSMC1BLKF2 : 1;
4577 unsigned PSMC1BLKF3 : 1;
4578 unsigned PSMC1BLKF4 : 1;
4579 unsigned PSMC1BLKF5 : 1;
4580 unsigned PSMC1BLKF6 : 1;
4581 unsigned PSMC1BLKF7 : 1;
4582 } __PSMC1BLKFbits_t;
4584 extern __at(0x082C) volatile __PSMC1BLKFbits_t PSMC1BLKFbits;
4586 #define _PSMC1BLKF0 0x01
4587 #define _PSMC1BLKF1 0x02
4588 #define _PSMC1BLKF2 0x04
4589 #define _PSMC1BLKF3 0x08
4590 #define _PSMC1BLKF4 0x10
4591 #define _PSMC1BLKF5 0x20
4592 #define _PSMC1BLKF6 0x40
4593 #define _PSMC1BLKF7 0x80
4595 //==============================================================================
4598 //==============================================================================
4599 // PSMC1FFA Bits
4601 extern __at(0x082D) __sfr PSMC1FFA;
4603 typedef union
4605 struct
4607 unsigned PSMC1FFA0 : 1;
4608 unsigned PSMC1FFA1 : 1;
4609 unsigned PSMC1FFA2 : 1;
4610 unsigned PSMC1FFA3 : 1;
4611 unsigned : 1;
4612 unsigned : 1;
4613 unsigned : 1;
4614 unsigned : 1;
4617 struct
4619 unsigned PSMC1FFA : 4;
4620 unsigned : 4;
4622 } __PSMC1FFAbits_t;
4624 extern __at(0x082D) volatile __PSMC1FFAbits_t PSMC1FFAbits;
4626 #define _PSMC1FFA0 0x01
4627 #define _PSMC1FFA1 0x02
4628 #define _PSMC1FFA2 0x04
4629 #define _PSMC1FFA3 0x08
4631 //==============================================================================
4634 //==============================================================================
4635 // PSMC1STR0 Bits
4637 extern __at(0x082E) __sfr PSMC1STR0;
4639 typedef struct
4641 unsigned P1STRA : 1;
4642 unsigned P1STRB : 1;
4643 unsigned P1STRC : 1;
4644 unsigned P1STRD : 1;
4645 unsigned P1STRE : 1;
4646 unsigned P1STRF : 1;
4647 unsigned : 1;
4648 unsigned : 1;
4649 } __PSMC1STR0bits_t;
4651 extern __at(0x082E) volatile __PSMC1STR0bits_t PSMC1STR0bits;
4653 #define _P1STRA 0x01
4654 #define _P1STRB 0x02
4655 #define _P1STRC 0x04
4656 #define _P1STRD 0x08
4657 #define _P1STRE 0x10
4658 #define _P1STRF 0x20
4660 //==============================================================================
4663 //==============================================================================
4664 // PSMC1STR1 Bits
4666 extern __at(0x082F) __sfr PSMC1STR1;
4668 typedef struct
4670 unsigned P1HSMEN : 1;
4671 unsigned P1LSMEN : 1;
4672 unsigned : 1;
4673 unsigned : 1;
4674 unsigned : 1;
4675 unsigned : 1;
4676 unsigned : 1;
4677 unsigned P1SSYNC : 1;
4678 } __PSMC1STR1bits_t;
4680 extern __at(0x082F) volatile __PSMC1STR1bits_t PSMC1STR1bits;
4682 #define _P1HSMEN 0x01
4683 #define _P1LSMEN 0x02
4684 #define _P1SSYNC 0x80
4686 //==============================================================================
4689 //==============================================================================
4690 // PSMC2CON Bits
4692 extern __at(0x0831) __sfr PSMC2CON;
4694 typedef union
4696 struct
4698 unsigned P2MODE0 : 1;
4699 unsigned P2MODE1 : 1;
4700 unsigned P2MODE2 : 1;
4701 unsigned P2MODE3 : 1;
4702 unsigned P2DBRE : 1;
4703 unsigned P2DBFE : 1;
4704 unsigned PSMC2LD : 1;
4705 unsigned PSMC2EN : 1;
4708 struct
4710 unsigned P2MODE : 4;
4711 unsigned : 4;
4713 } __PSMC2CONbits_t;
4715 extern __at(0x0831) volatile __PSMC2CONbits_t PSMC2CONbits;
4717 #define _P2MODE0 0x01
4718 #define _P2MODE1 0x02
4719 #define _P2MODE2 0x04
4720 #define _P2MODE3 0x08
4721 #define _P2DBRE 0x10
4722 #define _P2DBFE 0x20
4723 #define _PSMC2LD 0x40
4724 #define _PSMC2EN 0x80
4726 //==============================================================================
4729 //==============================================================================
4730 // PSMC2MDL Bits
4732 extern __at(0x0832) __sfr PSMC2MDL;
4734 typedef union
4736 struct
4738 unsigned P2MSRC0 : 1;
4739 unsigned P2MSRC1 : 1;
4740 unsigned P2MSRC2 : 1;
4741 unsigned P2MSRC3 : 1;
4742 unsigned : 1;
4743 unsigned P2MDLBIT : 1;
4744 unsigned P2MDLPOL : 1;
4745 unsigned P2MDLEN : 1;
4748 struct
4750 unsigned P2MSRC : 4;
4751 unsigned : 4;
4753 } __PSMC2MDLbits_t;
4755 extern __at(0x0832) volatile __PSMC2MDLbits_t PSMC2MDLbits;
4757 #define _P2MSRC0 0x01
4758 #define _P2MSRC1 0x02
4759 #define _P2MSRC2 0x04
4760 #define _P2MSRC3 0x08
4761 #define _P2MDLBIT 0x20
4762 #define _P2MDLPOL 0x40
4763 #define _P2MDLEN 0x80
4765 //==============================================================================
4768 //==============================================================================
4769 // PSMC2SYNC Bits
4771 extern __at(0x0833) __sfr PSMC2SYNC;
4773 typedef union
4775 struct
4777 unsigned P2SYNC0 : 1;
4778 unsigned P2SYNC1 : 1;
4779 unsigned : 1;
4780 unsigned : 1;
4781 unsigned : 1;
4782 unsigned : 1;
4783 unsigned : 1;
4784 unsigned : 1;
4787 struct
4789 unsigned P2SYNC : 2;
4790 unsigned : 6;
4792 } __PSMC2SYNCbits_t;
4794 extern __at(0x0833) volatile __PSMC2SYNCbits_t PSMC2SYNCbits;
4796 #define _P2SYNC0 0x01
4797 #define _P2SYNC1 0x02
4799 //==============================================================================
4802 //==============================================================================
4803 // PSMC2CLK Bits
4805 extern __at(0x0834) __sfr PSMC2CLK;
4807 typedef union
4809 struct
4811 unsigned P2CSRC0 : 1;
4812 unsigned P2CSRC1 : 1;
4813 unsigned : 1;
4814 unsigned : 1;
4815 unsigned P2CPRE0 : 1;
4816 unsigned P2CPRE1 : 1;
4817 unsigned : 1;
4818 unsigned : 1;
4821 struct
4823 unsigned P2CSRC : 2;
4824 unsigned : 6;
4827 struct
4829 unsigned : 4;
4830 unsigned P2CPRE : 2;
4831 unsigned : 2;
4833 } __PSMC2CLKbits_t;
4835 extern __at(0x0834) volatile __PSMC2CLKbits_t PSMC2CLKbits;
4837 #define _P2CSRC0 0x01
4838 #define _P2CSRC1 0x02
4839 #define _P2CPRE0 0x10
4840 #define _P2CPRE1 0x20
4842 //==============================================================================
4845 //==============================================================================
4846 // PSMC2OEN Bits
4848 extern __at(0x0835) __sfr PSMC2OEN;
4850 typedef struct
4852 unsigned P2OEA : 1;
4853 unsigned P2OEB : 1;
4854 unsigned : 1;
4855 unsigned : 1;
4856 unsigned : 1;
4857 unsigned : 1;
4858 unsigned : 1;
4859 unsigned : 1;
4860 } __PSMC2OENbits_t;
4862 extern __at(0x0835) volatile __PSMC2OENbits_t PSMC2OENbits;
4864 #define _P2OEA 0x01
4865 #define _P2OEB 0x02
4867 //==============================================================================
4870 //==============================================================================
4871 // PSMC2POL Bits
4873 extern __at(0x0836) __sfr PSMC2POL;
4875 typedef struct
4877 unsigned P2POLA : 1;
4878 unsigned P2POLB : 1;
4879 unsigned : 1;
4880 unsigned : 1;
4881 unsigned : 1;
4882 unsigned : 1;
4883 unsigned P2INPOL : 1;
4884 unsigned : 1;
4885 } __PSMC2POLbits_t;
4887 extern __at(0x0836) volatile __PSMC2POLbits_t PSMC2POLbits;
4889 #define _P2POLA 0x01
4890 #define _P2POLB 0x02
4891 #define _P2INPOL 0x40
4893 //==============================================================================
4896 //==============================================================================
4897 // PSMC2BLNK Bits
4899 extern __at(0x0837) __sfr PSMC2BLNK;
4901 typedef union
4903 struct
4905 unsigned P2REBM0 : 1;
4906 unsigned P2REBM1 : 1;
4907 unsigned : 1;
4908 unsigned : 1;
4909 unsigned P2FEBM0 : 1;
4910 unsigned P2FEBM1 : 1;
4911 unsigned : 1;
4912 unsigned : 1;
4915 struct
4917 unsigned P2REBM : 2;
4918 unsigned : 6;
4921 struct
4923 unsigned : 4;
4924 unsigned P2FEBM : 2;
4925 unsigned : 2;
4927 } __PSMC2BLNKbits_t;
4929 extern __at(0x0837) volatile __PSMC2BLNKbits_t PSMC2BLNKbits;
4931 #define _P2REBM0 0x01
4932 #define _P2REBM1 0x02
4933 #define _P2FEBM0 0x10
4934 #define _P2FEBM1 0x20
4936 //==============================================================================
4939 //==============================================================================
4940 // PSMC2REBS Bits
4942 extern __at(0x0838) __sfr PSMC2REBS;
4944 typedef struct
4946 unsigned : 1;
4947 unsigned P2REBSC1 : 1;
4948 unsigned P2REBSC2 : 1;
4949 unsigned P2REBSC3 : 1;
4950 unsigned : 1;
4951 unsigned : 1;
4952 unsigned : 1;
4953 unsigned P2REBSIN : 1;
4954 } __PSMC2REBSbits_t;
4956 extern __at(0x0838) volatile __PSMC2REBSbits_t PSMC2REBSbits;
4958 #define _P2REBSC1 0x02
4959 #define _P2REBSC2 0x04
4960 #define _P2REBSC3 0x08
4961 #define _P2REBSIN 0x80
4963 //==============================================================================
4966 //==============================================================================
4967 // PSMC2FEBS Bits
4969 extern __at(0x0839) __sfr PSMC2FEBS;
4971 typedef struct
4973 unsigned : 1;
4974 unsigned P2FEBSC1 : 1;
4975 unsigned P2FEBSC2 : 1;
4976 unsigned P2FEBSC3 : 1;
4977 unsigned : 1;
4978 unsigned : 1;
4979 unsigned : 1;
4980 unsigned P2FEBSIN : 1;
4981 } __PSMC2FEBSbits_t;
4983 extern __at(0x0839) volatile __PSMC2FEBSbits_t PSMC2FEBSbits;
4985 #define _P2FEBSC1 0x02
4986 #define _P2FEBSC2 0x04
4987 #define _P2FEBSC3 0x08
4988 #define _P2FEBSIN 0x80
4990 //==============================================================================
4993 //==============================================================================
4994 // PSMC2PHS Bits
4996 extern __at(0x083A) __sfr PSMC2PHS;
4998 typedef struct
5000 unsigned P2PHST : 1;
5001 unsigned P2PHSC1 : 1;
5002 unsigned P2PHSC2 : 1;
5003 unsigned P2PHSC3 : 1;
5004 unsigned : 1;
5005 unsigned : 1;
5006 unsigned : 1;
5007 unsigned P2PHSIN : 1;
5008 } __PSMC2PHSbits_t;
5010 extern __at(0x083A) volatile __PSMC2PHSbits_t PSMC2PHSbits;
5012 #define _P2PHST 0x01
5013 #define _P2PHSC1 0x02
5014 #define _P2PHSC2 0x04
5015 #define _P2PHSC3 0x08
5016 #define _P2PHSIN 0x80
5018 //==============================================================================
5021 //==============================================================================
5022 // PSMC2DCS Bits
5024 extern __at(0x083B) __sfr PSMC2DCS;
5026 typedef struct
5028 unsigned P2DCST : 1;
5029 unsigned P2DCSC1 : 1;
5030 unsigned P2DCSC2 : 1;
5031 unsigned P2DCSC3 : 1;
5032 unsigned : 1;
5033 unsigned : 1;
5034 unsigned : 1;
5035 unsigned P2DCSIN : 1;
5036 } __PSMC2DCSbits_t;
5038 extern __at(0x083B) volatile __PSMC2DCSbits_t PSMC2DCSbits;
5040 #define _P2DCST 0x01
5041 #define _P2DCSC1 0x02
5042 #define _P2DCSC2 0x04
5043 #define _P2DCSC3 0x08
5044 #define _P2DCSIN 0x80
5046 //==============================================================================
5049 //==============================================================================
5050 // PSMC2PRS Bits
5052 extern __at(0x083C) __sfr PSMC2PRS;
5054 typedef struct
5056 unsigned P2PRST : 1;
5057 unsigned P2PRSC1 : 1;
5058 unsigned P2PRSC2 : 1;
5059 unsigned P2PRSC3 : 1;
5060 unsigned : 1;
5061 unsigned : 1;
5062 unsigned : 1;
5063 unsigned P2PRSIN : 1;
5064 } __PSMC2PRSbits_t;
5066 extern __at(0x083C) volatile __PSMC2PRSbits_t PSMC2PRSbits;
5068 #define _P2PRST 0x01
5069 #define _P2PRSC1 0x02
5070 #define _P2PRSC2 0x04
5071 #define _P2PRSC3 0x08
5072 #define _P2PRSIN 0x80
5074 //==============================================================================
5077 //==============================================================================
5078 // PSMC2ASDC Bits
5080 extern __at(0x083D) __sfr PSMC2ASDC;
5082 typedef struct
5084 unsigned P2ASDOV : 1;
5085 unsigned : 1;
5086 unsigned : 1;
5087 unsigned : 1;
5088 unsigned : 1;
5089 unsigned P2ARSEN : 1;
5090 unsigned P2ASDEN : 1;
5091 unsigned P2ASE : 1;
5092 } __PSMC2ASDCbits_t;
5094 extern __at(0x083D) volatile __PSMC2ASDCbits_t PSMC2ASDCbits;
5096 #define _P2ASDOV 0x01
5097 #define _P2ARSEN 0x20
5098 #define _P2ASDEN 0x40
5099 #define _P2ASE 0x80
5101 //==============================================================================
5104 //==============================================================================
5105 // PSMC2ASDL Bits
5107 extern __at(0x083E) __sfr PSMC2ASDL;
5109 typedef struct
5111 unsigned P2ASDLA : 1;
5112 unsigned P2ASDLB : 1;
5113 unsigned : 1;
5114 unsigned : 1;
5115 unsigned : 1;
5116 unsigned : 1;
5117 unsigned : 1;
5118 unsigned : 1;
5119 } __PSMC2ASDLbits_t;
5121 extern __at(0x083E) volatile __PSMC2ASDLbits_t PSMC2ASDLbits;
5123 #define _P2ASDLA 0x01
5124 #define _P2ASDLB 0x02
5126 //==============================================================================
5129 //==============================================================================
5130 // PSMC2ASDS Bits
5132 extern __at(0x083F) __sfr PSMC2ASDS;
5134 typedef struct
5136 unsigned : 1;
5137 unsigned P2ASDSC1 : 1;
5138 unsigned P2ASDSC2 : 1;
5139 unsigned P2ASDSC3 : 1;
5140 unsigned : 1;
5141 unsigned : 1;
5142 unsigned : 1;
5143 unsigned P2ASDSIN : 1;
5144 } __PSMC2ASDSbits_t;
5146 extern __at(0x083F) volatile __PSMC2ASDSbits_t PSMC2ASDSbits;
5148 #define _P2ASDSC1 0x02
5149 #define _P2ASDSC2 0x04
5150 #define _P2ASDSC3 0x08
5151 #define _P2ASDSIN 0x80
5153 //==============================================================================
5156 //==============================================================================
5157 // PSMC2INT Bits
5159 extern __at(0x0840) __sfr PSMC2INT;
5161 typedef struct
5163 unsigned P2TPRIF : 1;
5164 unsigned P2TDCIF : 1;
5165 unsigned P2TPHIF : 1;
5166 unsigned P2TOVIF : 1;
5167 unsigned P2TPRIE : 1;
5168 unsigned P2TDCIE : 1;
5169 unsigned P2TPHIE : 1;
5170 unsigned P2TOVIE : 1;
5171 } __PSMC2INTbits_t;
5173 extern __at(0x0840) volatile __PSMC2INTbits_t PSMC2INTbits;
5175 #define _P2TPRIF 0x01
5176 #define _P2TDCIF 0x02
5177 #define _P2TPHIF 0x04
5178 #define _P2TOVIF 0x08
5179 #define _P2TPRIE 0x10
5180 #define _P2TDCIE 0x20
5181 #define _P2TPHIE 0x40
5182 #define _P2TOVIE 0x80
5184 //==============================================================================
5186 extern __at(0x0841) __sfr PSMC2PH;
5188 //==============================================================================
5189 // PSMC2PHL Bits
5191 extern __at(0x0841) __sfr PSMC2PHL;
5193 typedef struct
5195 unsigned PSMC2PH0 : 1;
5196 unsigned PSMC2PH1 : 1;
5197 unsigned PSMC2PH2 : 1;
5198 unsigned PSMC2PH3 : 1;
5199 unsigned PSMC2PH4 : 1;
5200 unsigned PSMC2PH5 : 1;
5201 unsigned PSMC2PH6 : 1;
5202 unsigned PSMC2PH7 : 1;
5203 } __PSMC2PHLbits_t;
5205 extern __at(0x0841) volatile __PSMC2PHLbits_t PSMC2PHLbits;
5207 #define _PSMC2PH0 0x01
5208 #define _PSMC2PH1 0x02
5209 #define _PSMC2PH2 0x04
5210 #define _PSMC2PH3 0x08
5211 #define _PSMC2PH4 0x10
5212 #define _PSMC2PH5 0x20
5213 #define _PSMC2PH6 0x40
5214 #define _PSMC2PH7 0x80
5216 //==============================================================================
5219 //==============================================================================
5220 // PSMC2PHH Bits
5222 extern __at(0x0842) __sfr PSMC2PHH;
5224 typedef struct
5226 unsigned PSMC2PH8 : 1;
5227 unsigned PSMC2PH9 : 1;
5228 unsigned PSMC2PH10 : 1;
5229 unsigned PSMC2PH11 : 1;
5230 unsigned PSMC2PH12 : 1;
5231 unsigned PSMC2PH13 : 1;
5232 unsigned PSMC2PH14 : 1;
5233 unsigned PSMC2PH15 : 1;
5234 } __PSMC2PHHbits_t;
5236 extern __at(0x0842) volatile __PSMC2PHHbits_t PSMC2PHHbits;
5238 #define _PSMC2PH8 0x01
5239 #define _PSMC2PH9 0x02
5240 #define _PSMC2PH10 0x04
5241 #define _PSMC2PH11 0x08
5242 #define _PSMC2PH12 0x10
5243 #define _PSMC2PH13 0x20
5244 #define _PSMC2PH14 0x40
5245 #define _PSMC2PH15 0x80
5247 //==============================================================================
5249 extern __at(0x0843) __sfr PSMC2DC;
5251 //==============================================================================
5252 // PSMC2DCL Bits
5254 extern __at(0x0843) __sfr PSMC2DCL;
5256 typedef struct
5258 unsigned PSMC2DC0 : 1;
5259 unsigned PSMC2DC1 : 1;
5260 unsigned PSMC2DC2 : 1;
5261 unsigned PSMC2DC3 : 1;
5262 unsigned PSMC2DC4 : 1;
5263 unsigned PSMC2DC5 : 1;
5264 unsigned PSMC2DC6 : 1;
5265 unsigned PSMC2DC7 : 1;
5266 } __PSMC2DCLbits_t;
5268 extern __at(0x0843) volatile __PSMC2DCLbits_t PSMC2DCLbits;
5270 #define _PSMC2DC0 0x01
5271 #define _PSMC2DC1 0x02
5272 #define _PSMC2DC2 0x04
5273 #define _PSMC2DC3 0x08
5274 #define _PSMC2DC4 0x10
5275 #define _PSMC2DC5 0x20
5276 #define _PSMC2DC6 0x40
5277 #define _PSMC2DC7 0x80
5279 //==============================================================================
5282 //==============================================================================
5283 // PSMC2DCH Bits
5285 extern __at(0x0844) __sfr PSMC2DCH;
5287 typedef struct
5289 unsigned PSMC2DC8 : 1;
5290 unsigned PSMC2DC9 : 1;
5291 unsigned PSMC2DC10 : 1;
5292 unsigned PSMC2DC11 : 1;
5293 unsigned PSMC2DC12 : 1;
5294 unsigned PSMC2DC13 : 1;
5295 unsigned PSMC2DC14 : 1;
5296 unsigned PSMC2DC15 : 1;
5297 } __PSMC2DCHbits_t;
5299 extern __at(0x0844) volatile __PSMC2DCHbits_t PSMC2DCHbits;
5301 #define _PSMC2DC8 0x01
5302 #define _PSMC2DC9 0x02
5303 #define _PSMC2DC10 0x04
5304 #define _PSMC2DC11 0x08
5305 #define _PSMC2DC12 0x10
5306 #define _PSMC2DC13 0x20
5307 #define _PSMC2DC14 0x40
5308 #define _PSMC2DC15 0x80
5310 //==============================================================================
5312 extern __at(0x0845) __sfr PSMC2PR;
5314 //==============================================================================
5315 // PSMC2PRL Bits
5317 extern __at(0x0845) __sfr PSMC2PRL;
5319 typedef struct
5321 unsigned PSMC2PR0 : 1;
5322 unsigned PSMC2PR1 : 1;
5323 unsigned PSMC2PR2 : 1;
5324 unsigned PSMC2PR3 : 1;
5325 unsigned PSMC2PR4 : 1;
5326 unsigned PSMC2PR5 : 1;
5327 unsigned PSMC2PR6 : 1;
5328 unsigned PSMC2PR7 : 1;
5329 } __PSMC2PRLbits_t;
5331 extern __at(0x0845) volatile __PSMC2PRLbits_t PSMC2PRLbits;
5333 #define _PSMC2PR0 0x01
5334 #define _PSMC2PR1 0x02
5335 #define _PSMC2PR2 0x04
5336 #define _PSMC2PR3 0x08
5337 #define _PSMC2PR4 0x10
5338 #define _PSMC2PR5 0x20
5339 #define _PSMC2PR6 0x40
5340 #define _PSMC2PR7 0x80
5342 //==============================================================================
5345 //==============================================================================
5346 // PSMC2PRH Bits
5348 extern __at(0x0846) __sfr PSMC2PRH;
5350 typedef struct
5352 unsigned PSMC2PR8 : 1;
5353 unsigned PSMC2PR9 : 1;
5354 unsigned PSMC2PR10 : 1;
5355 unsigned PSMC2PR11 : 1;
5356 unsigned PSMC2PR12 : 1;
5357 unsigned PSMC2PR13 : 1;
5358 unsigned PSMC2PR14 : 1;
5359 unsigned PSMC2PR15 : 1;
5360 } __PSMC2PRHbits_t;
5362 extern __at(0x0846) volatile __PSMC2PRHbits_t PSMC2PRHbits;
5364 #define _PSMC2PR8 0x01
5365 #define _PSMC2PR9 0x02
5366 #define _PSMC2PR10 0x04
5367 #define _PSMC2PR11 0x08
5368 #define _PSMC2PR12 0x10
5369 #define _PSMC2PR13 0x20
5370 #define _PSMC2PR14 0x40
5371 #define _PSMC2PR15 0x80
5373 //==============================================================================
5375 extern __at(0x0847) __sfr PSMC2TMR;
5377 //==============================================================================
5378 // PSMC2TMRL Bits
5380 extern __at(0x0847) __sfr PSMC2TMRL;
5382 typedef struct
5384 unsigned PSMC2TMR0 : 1;
5385 unsigned PSMC2TMR1 : 1;
5386 unsigned PSMC2TMR2 : 1;
5387 unsigned PSMC2TMR3 : 1;
5388 unsigned PSMC2TMR4 : 1;
5389 unsigned PSMC2TMR5 : 1;
5390 unsigned PSMC2TMR6 : 1;
5391 unsigned PSMC2TMR7 : 1;
5392 } __PSMC2TMRLbits_t;
5394 extern __at(0x0847) volatile __PSMC2TMRLbits_t PSMC2TMRLbits;
5396 #define _PSMC2TMR0 0x01
5397 #define _PSMC2TMR1 0x02
5398 #define _PSMC2TMR2 0x04
5399 #define _PSMC2TMR3 0x08
5400 #define _PSMC2TMR4 0x10
5401 #define _PSMC2TMR5 0x20
5402 #define _PSMC2TMR6 0x40
5403 #define _PSMC2TMR7 0x80
5405 //==============================================================================
5408 //==============================================================================
5409 // PSMC2TMRH Bits
5411 extern __at(0x0848) __sfr PSMC2TMRH;
5413 typedef struct
5415 unsigned PSMC2TMR8 : 1;
5416 unsigned PSMC2TMR9 : 1;
5417 unsigned PSMC2TMR10 : 1;
5418 unsigned PSMC2TMR11 : 1;
5419 unsigned PSMC2TMR12 : 1;
5420 unsigned PSMC2TMR13 : 1;
5421 unsigned PSMC2TMR14 : 1;
5422 unsigned PSMC2TMR15 : 1;
5423 } __PSMC2TMRHbits_t;
5425 extern __at(0x0848) volatile __PSMC2TMRHbits_t PSMC2TMRHbits;
5427 #define _PSMC2TMR8 0x01
5428 #define _PSMC2TMR9 0x02
5429 #define _PSMC2TMR10 0x04
5430 #define _PSMC2TMR11 0x08
5431 #define _PSMC2TMR12 0x10
5432 #define _PSMC2TMR13 0x20
5433 #define _PSMC2TMR14 0x40
5434 #define _PSMC2TMR15 0x80
5436 //==============================================================================
5439 //==============================================================================
5440 // PSMC2DBR Bits
5442 extern __at(0x0849) __sfr PSMC2DBR;
5444 typedef struct
5446 unsigned PSMC2DBR0 : 1;
5447 unsigned PSMC2DBR1 : 1;
5448 unsigned PSMC2DBR2 : 1;
5449 unsigned PSMC2DBR3 : 1;
5450 unsigned PSMC2DBR4 : 1;
5451 unsigned PSMC2DBR5 : 1;
5452 unsigned PSMC2DBR6 : 1;
5453 unsigned PSMC2DBR7 : 1;
5454 } __PSMC2DBRbits_t;
5456 extern __at(0x0849) volatile __PSMC2DBRbits_t PSMC2DBRbits;
5458 #define _PSMC2DBR0 0x01
5459 #define _PSMC2DBR1 0x02
5460 #define _PSMC2DBR2 0x04
5461 #define _PSMC2DBR3 0x08
5462 #define _PSMC2DBR4 0x10
5463 #define _PSMC2DBR5 0x20
5464 #define _PSMC2DBR6 0x40
5465 #define _PSMC2DBR7 0x80
5467 //==============================================================================
5470 //==============================================================================
5471 // PSMC2DBF Bits
5473 extern __at(0x084A) __sfr PSMC2DBF;
5475 typedef struct
5477 unsigned PSMC2DBF0 : 1;
5478 unsigned PSMC2DBF1 : 1;
5479 unsigned PSMC2DBF2 : 1;
5480 unsigned PSMC2DBF3 : 1;
5481 unsigned PSMC2DBF4 : 1;
5482 unsigned PSMC2DBF5 : 1;
5483 unsigned PSMC2DBF6 : 1;
5484 unsigned PSMC2DBF7 : 1;
5485 } __PSMC2DBFbits_t;
5487 extern __at(0x084A) volatile __PSMC2DBFbits_t PSMC2DBFbits;
5489 #define _PSMC2DBF0 0x01
5490 #define _PSMC2DBF1 0x02
5491 #define _PSMC2DBF2 0x04
5492 #define _PSMC2DBF3 0x08
5493 #define _PSMC2DBF4 0x10
5494 #define _PSMC2DBF5 0x20
5495 #define _PSMC2DBF6 0x40
5496 #define _PSMC2DBF7 0x80
5498 //==============================================================================
5501 //==============================================================================
5502 // PSMC2BLKR Bits
5504 extern __at(0x084B) __sfr PSMC2BLKR;
5506 typedef struct
5508 unsigned PSMC2BLKR0 : 1;
5509 unsigned PSMC2BLKR1 : 1;
5510 unsigned PSMC2BLKR2 : 1;
5511 unsigned PSMC2BLKR3 : 1;
5512 unsigned PSMC2BLKR4 : 1;
5513 unsigned PSMC2BLKR5 : 1;
5514 unsigned PSMC2BLKR6 : 1;
5515 unsigned PSMC2BLKR7 : 1;
5516 } __PSMC2BLKRbits_t;
5518 extern __at(0x084B) volatile __PSMC2BLKRbits_t PSMC2BLKRbits;
5520 #define _PSMC2BLKR0 0x01
5521 #define _PSMC2BLKR1 0x02
5522 #define _PSMC2BLKR2 0x04
5523 #define _PSMC2BLKR3 0x08
5524 #define _PSMC2BLKR4 0x10
5525 #define _PSMC2BLKR5 0x20
5526 #define _PSMC2BLKR6 0x40
5527 #define _PSMC2BLKR7 0x80
5529 //==============================================================================
5532 //==============================================================================
5533 // PSMC2BLKF Bits
5535 extern __at(0x084C) __sfr PSMC2BLKF;
5537 typedef struct
5539 unsigned PSMC2BLKF0 : 1;
5540 unsigned PSMC2BLKF1 : 1;
5541 unsigned PSMC2BLKF2 : 1;
5542 unsigned PSMC2BLKF3 : 1;
5543 unsigned PSMC2BLKF4 : 1;
5544 unsigned PSMC2BLKF5 : 1;
5545 unsigned PSMC2BLKF6 : 1;
5546 unsigned PSMC2BLKF7 : 1;
5547 } __PSMC2BLKFbits_t;
5549 extern __at(0x084C) volatile __PSMC2BLKFbits_t PSMC2BLKFbits;
5551 #define _PSMC2BLKF0 0x01
5552 #define _PSMC2BLKF1 0x02
5553 #define _PSMC2BLKF2 0x04
5554 #define _PSMC2BLKF3 0x08
5555 #define _PSMC2BLKF4 0x10
5556 #define _PSMC2BLKF5 0x20
5557 #define _PSMC2BLKF6 0x40
5558 #define _PSMC2BLKF7 0x80
5560 //==============================================================================
5563 //==============================================================================
5564 // PSMC2FFA Bits
5566 extern __at(0x084D) __sfr PSMC2FFA;
5568 typedef union
5570 struct
5572 unsigned PSMC2FFA0 : 1;
5573 unsigned PSMC2FFA1 : 1;
5574 unsigned PSMC2FFA2 : 1;
5575 unsigned PSMC2FFA3 : 1;
5576 unsigned : 1;
5577 unsigned : 1;
5578 unsigned : 1;
5579 unsigned : 1;
5582 struct
5584 unsigned PSMC2FFA : 4;
5585 unsigned : 4;
5587 } __PSMC2FFAbits_t;
5589 extern __at(0x084D) volatile __PSMC2FFAbits_t PSMC2FFAbits;
5591 #define _PSMC2FFA0 0x01
5592 #define _PSMC2FFA1 0x02
5593 #define _PSMC2FFA2 0x04
5594 #define _PSMC2FFA3 0x08
5596 //==============================================================================
5599 //==============================================================================
5600 // PSMC2STR0 Bits
5602 extern __at(0x084E) __sfr PSMC2STR0;
5604 typedef struct
5606 unsigned P2STRA : 1;
5607 unsigned P2STRB : 1;
5608 unsigned : 1;
5609 unsigned : 1;
5610 unsigned : 1;
5611 unsigned : 1;
5612 unsigned : 1;
5613 unsigned : 1;
5614 } __PSMC2STR0bits_t;
5616 extern __at(0x084E) volatile __PSMC2STR0bits_t PSMC2STR0bits;
5618 #define _P2STRA 0x01
5619 #define _P2STRB 0x02
5621 //==============================================================================
5624 //==============================================================================
5625 // PSMC2STR1 Bits
5627 extern __at(0x084F) __sfr PSMC2STR1;
5629 typedef struct
5631 unsigned P2HSMEN : 1;
5632 unsigned P2LSMEN : 1;
5633 unsigned : 1;
5634 unsigned : 1;
5635 unsigned : 1;
5636 unsigned : 1;
5637 unsigned : 1;
5638 unsigned P2SSYNC : 1;
5639 } __PSMC2STR1bits_t;
5641 extern __at(0x084F) volatile __PSMC2STR1bits_t PSMC2STR1bits;
5643 #define _P2HSMEN 0x01
5644 #define _P2LSMEN 0x02
5645 #define _P2SSYNC 0x80
5647 //==============================================================================
5650 //==============================================================================
5651 // STATUS_SHAD Bits
5653 extern __at(0x0FE4) __sfr STATUS_SHAD;
5655 typedef struct
5657 unsigned C_SHAD : 1;
5658 unsigned DC_SHAD : 1;
5659 unsigned Z_SHAD : 1;
5660 unsigned : 1;
5661 unsigned : 1;
5662 unsigned : 1;
5663 unsigned : 1;
5664 unsigned : 1;
5665 } __STATUS_SHADbits_t;
5667 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
5669 #define _C_SHAD 0x01
5670 #define _DC_SHAD 0x02
5671 #define _Z_SHAD 0x04
5673 //==============================================================================
5675 extern __at(0x0FE5) __sfr WREG_SHAD;
5676 extern __at(0x0FE6) __sfr BSR_SHAD;
5677 extern __at(0x0FE7) __sfr PCLATH_SHAD;
5678 extern __at(0x0FE8) __sfr FSR0L_SHAD;
5679 extern __at(0x0FE9) __sfr FSR0H_SHAD;
5680 extern __at(0x0FEA) __sfr FSR1L_SHAD;
5681 extern __at(0x0FEB) __sfr FSR1H_SHAD;
5682 extern __at(0x0FED) __sfr STKPTR;
5683 extern __at(0x0FEE) __sfr TOSL;
5684 extern __at(0x0FEF) __sfr TOSH;
5686 //==============================================================================
5688 // Configuration Bits
5690 //==============================================================================
5692 #define _CONFIG1 0x8007
5693 #define _CONFIG2 0x8008
5695 //----------------------------- CONFIG1 Options -------------------------------
5697 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
5698 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
5699 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
5700 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
5701 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
5702 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
5703 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
5704 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin.
5705 #define _WDTE_OFF 0x3FE7 // WDT disabled.
5706 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
5707 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
5708 #define _WDTE_ON 0x3FFF // WDT enabled.
5709 #define _PWRTE_ON 0x3FDF // PWRT enabled.
5710 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
5711 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
5712 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
5713 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
5714 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
5715 #define _CPD_ON 0x3EFF // Data memory code protection is enabled.
5716 #define _CPD_OFF 0x3FFF // Data memory code protection is disabled.
5717 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
5718 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
5719 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
5720 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
5721 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
5722 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
5723 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
5724 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
5725 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
5726 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
5728 //----------------------------- CONFIG2 Options -------------------------------
5730 #define _WRT_ALL 0x3FFC // 000h to 7FFh write protected, no addresses may be modified by EECON control.
5731 #define _WRT_HALF 0x3FFD // 000h to 7FFh write protected, 800h to FFFh may be modified by EECON control.
5732 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to FFFh may be modified by EECON control.
5733 #define _WRT_OFF 0x3FFF // Write protection off.
5734 #define _VCAPEN_ON 0x3FDF // Vcap functionality is enabled on RA6 (Vddcore is connected to the pad).
5735 #define _VCAPEN_OFF 0x3FFF // Vcap functionality is disabled on RA6.
5736 #define _PLLEN_OFF 0x3EFF // 4x PLL disabled.
5737 #define _PLLEN_ON 0x3FFF // 4x PLL enabled.
5738 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
5739 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
5740 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
5741 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
5742 #define _LPBOR_ON 0x37FF // Low power brown-out is enabled.
5743 #define _LPBOR_OFF 0x3FFF // Low power brown-out is disabled.
5744 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
5745 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
5746 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
5747 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
5749 //==============================================================================
5751 #define _DEVID1 0x8006
5753 #define _IDLOC0 0x8000
5754 #define _IDLOC1 0x8001
5755 #define _IDLOC2 0x8002
5756 #define _IDLOC3 0x8003
5758 //==============================================================================
5760 #ifndef NO_BIT_DEFINES
5762 #define ADON ADCON0bits.ADON // bit 0
5763 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
5764 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
5765 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
5766 #define DONE ADCON0bits.DONE // bit 1, shadows bit in ADCON0bits
5767 #define CHS0 ADCON0bits.CHS0 // bit 2
5768 #define CHS1 ADCON0bits.CHS1 // bit 3
5769 #define CHS2 ADCON0bits.CHS2 // bit 4
5770 #define CHS3 ADCON0bits.CHS3 // bit 5
5771 #define CHS4 ADCON0bits.CHS4 // bit 6
5772 #define ADRMD ADCON0bits.ADRMD // bit 7
5774 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
5775 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
5776 #define ADNREF ADCON1bits.ADNREF // bit 2
5777 #define ADCS0 ADCON1bits.ADCS0 // bit 4
5778 #define ADCS1 ADCON1bits.ADCS1 // bit 5
5779 #define ADCS2 ADCON1bits.ADCS2 // bit 6
5780 #define ADFM ADCON1bits.ADFM // bit 7
5782 #define CHSN0 ADCON2bits.CHSN0 // bit 0
5783 #define CHSN1 ADCON2bits.CHSN1 // bit 1
5784 #define CHSN2 ADCON2bits.CHSN2 // bit 2
5785 #define CHSN3 ADCON2bits.CHSN3 // bit 3
5786 #define TRIGSEL0 ADCON2bits.TRIGSEL0 // bit 4
5787 #define TRIGSEL1 ADCON2bits.TRIGSEL1 // bit 5
5788 #define TRIGSEL2 ADCON2bits.TRIGSEL2 // bit 6
5789 #define TRIGSEL3 ADCON2bits.TRIGSEL3 // bit 7
5791 #define ANSA0 ANSELAbits.ANSA0 // bit 0
5792 #define ANSA1 ANSELAbits.ANSA1 // bit 1
5793 #define ANSA2 ANSELAbits.ANSA2 // bit 2
5794 #define ANSA3 ANSELAbits.ANSA3 // bit 3
5795 #define ANSA4 ANSELAbits.ANSA4 // bit 4
5796 #define ANSA5 ANSELAbits.ANSA5 // bit 5
5797 #define ANSA7 ANSELAbits.ANSA7 // bit 7
5799 #define ANSB0 ANSELBbits.ANSB0 // bit 0
5800 #define ANSB1 ANSELBbits.ANSB1 // bit 1
5801 #define ANSB2 ANSELBbits.ANSB2 // bit 2
5802 #define ANSB3 ANSELBbits.ANSB3 // bit 3
5803 #define ANSB4 ANSELBbits.ANSB4 // bit 4
5804 #define ANSB5 ANSELBbits.ANSB5 // bit 5
5806 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
5807 #define RXSEL APFCONbits.RXSEL // bit 1
5808 #define TXSEL APFCONbits.TXSEL // bit 2
5809 #define SDISEL APFCONbits.SDISEL // bit 3
5810 #define SCKSEL APFCONbits.SCKSEL // bit 4
5811 #define SDOSEL APFCONbits.SDOSEL // bit 5
5812 #define CCP1SEL APFCONbits.CCP1SEL // bit 6
5813 #define C2OUTSEL APFCONbits.C2OUTSEL // bit 7
5815 #define ABDEN BAUD1CONbits.ABDEN // bit 0
5816 #define WUE BAUD1CONbits.WUE // bit 1
5817 #define BRG16 BAUD1CONbits.BRG16 // bit 3
5818 #define SCKP BAUD1CONbits.SCKP // bit 4
5819 #define RCIDL BAUD1CONbits.RCIDL // bit 6
5820 #define ABDOVF BAUD1CONbits.ABDOVF // bit 7
5822 #define BORRDY BORCONbits.BORRDY // bit 0
5823 #define BORFS BORCONbits.BORFS // bit 6
5824 #define SBOREN BORCONbits.SBOREN // bit 7
5826 #define BSR0 BSRbits.BSR0 // bit 0
5827 #define BSR1 BSRbits.BSR1 // bit 1
5828 #define BSR2 BSRbits.BSR2 // bit 2
5829 #define BSR3 BSRbits.BSR3 // bit 3
5830 #define BSR4 BSRbits.BSR4 // bit 4
5832 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
5833 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
5834 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
5835 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
5836 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
5837 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
5838 #define P1M0 CCP1CONbits.P1M0 // bit 6
5839 #define P1M1 CCP1CONbits.P1M1 // bit 7
5841 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
5842 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
5843 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
5844 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
5845 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
5846 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
5847 #define P2M0 CCP2CONbits.P2M0 // bit 6
5848 #define P2M1 CCP2CONbits.P2M1 // bit 7
5850 #define CLKRDIV0 CLKRCONbits.CLKRDIV0 // bit 0
5851 #define CLKRDIV1 CLKRCONbits.CLKRDIV1 // bit 1
5852 #define CLKRDIV2 CLKRCONbits.CLKRDIV2 // bit 2
5853 #define CLKRDC0 CLKRCONbits.CLKRDC0 // bit 3
5854 #define CLKRDC1 CLKRCONbits.CLKRDC1 // bit 4
5855 #define CLKRSLR CLKRCONbits.CLKRSLR // bit 5
5856 #define CLKROE CLKRCONbits.CLKROE // bit 6
5857 #define CLKREN CLKRCONbits.CLKREN // bit 7
5859 #define C1SYNC CM1CON0bits.C1SYNC // bit 0
5860 #define C1HYS CM1CON0bits.C1HYS // bit 1
5861 #define C1SP CM1CON0bits.C1SP // bit 2
5862 #define C1ZLF CM1CON0bits.C1ZLF // bit 3
5863 #define C1POL CM1CON0bits.C1POL // bit 4
5864 #define C1OE CM1CON0bits.C1OE // bit 5
5865 #define C1OUT CM1CON0bits.C1OUT // bit 6
5866 #define C1ON CM1CON0bits.C1ON // bit 7
5868 #define C1NCH0 CM1CON1bits.C1NCH0 // bit 0
5869 #define C1NCH1 CM1CON1bits.C1NCH1 // bit 1
5870 #define C1NCH2 CM1CON1bits.C1NCH2 // bit 2
5871 #define C1PCH0 CM1CON1bits.C1PCH0 // bit 3
5872 #define C1PCH1 CM1CON1bits.C1PCH1 // bit 4
5873 #define C1PCH2 CM1CON1bits.C1PCH2 // bit 5
5874 #define C1INTN CM1CON1bits.C1INTN // bit 6
5875 #define C1INTP CM1CON1bits.C1INTP // bit 7
5877 #define C2SYNC CM2CON0bits.C2SYNC // bit 0
5878 #define C2HYS CM2CON0bits.C2HYS // bit 1
5879 #define C2SP CM2CON0bits.C2SP // bit 2
5880 #define C2ZLF CM2CON0bits.C2ZLF // bit 3
5881 #define C2POL CM2CON0bits.C2POL // bit 4
5882 #define C2OE CM2CON0bits.C2OE // bit 5
5883 #define C2OUT CM2CON0bits.C2OUT // bit 6
5884 #define C2ON CM2CON0bits.C2ON // bit 7
5886 #define C2NCH0 CM2CON1bits.C2NCH0 // bit 0
5887 #define C2NCH1 CM2CON1bits.C2NCH1 // bit 1
5888 #define C2NCH2 CM2CON1bits.C2NCH2 // bit 2
5889 #define C2PCH0 CM2CON1bits.C2PCH0 // bit 3
5890 #define C2PCH1 CM2CON1bits.C2PCH1 // bit 4
5891 #define C2PCH2 CM2CON1bits.C2PCH2 // bit 5
5892 #define C2INTN CM2CON1bits.C2INTN // bit 6
5893 #define C2INTP CM2CON1bits.C2INTP // bit 7
5895 #define C3SYNC CM3CON0bits.C3SYNC // bit 0
5896 #define C3HYS CM3CON0bits.C3HYS // bit 1
5897 #define C3SP CM3CON0bits.C3SP // bit 2
5898 #define C3ZLF CM3CON0bits.C3ZLF // bit 3
5899 #define C3POL CM3CON0bits.C3POL // bit 4
5900 #define C3OE CM3CON0bits.C3OE // bit 5
5901 #define C3OUT CM3CON0bits.C3OUT // bit 6
5902 #define C3ON CM3CON0bits.C3ON // bit 7
5904 #define C3NCH0 CM3CON1bits.C3NCH0 // bit 0
5905 #define C3NCH1 CM3CON1bits.C3NCH1 // bit 1
5906 #define C3NCH2 CM3CON1bits.C3NCH2 // bit 2
5907 #define C3PCH0 CM3CON1bits.C3PCH0 // bit 3
5908 #define C3PCH1 CM3CON1bits.C3PCH1 // bit 4
5909 #define C3PCH2 CM3CON1bits.C3PCH2 // bit 5
5910 #define C3INTN CM3CON1bits.C3INTN // bit 6
5911 #define C3INTP CM3CON1bits.C3INTP // bit 7
5913 #define MC1OUT CMOUTbits.MC1OUT // bit 0
5914 #define MC2OUT CMOUTbits.MC2OUT // bit 1
5915 #define MC3OUT CMOUTbits.MC3OUT // bit 2
5917 #define DACNSS DACCON0bits.DACNSS // bit 0
5918 #define DACPSS0 DACCON0bits.DACPSS0 // bit 2
5919 #define DACPSS1 DACCON0bits.DACPSS1 // bit 3
5920 #define DACOE2 DACCON0bits.DACOE2 // bit 4
5921 #define DACOE1 DACCON0bits.DACOE1 // bit 5
5922 #define DACEN DACCON0bits.DACEN // bit 7
5924 #define DACR0 DACCON1bits.DACR0 // bit 0
5925 #define DACR1 DACCON1bits.DACR1 // bit 1
5926 #define DACR2 DACCON1bits.DACR2 // bit 2
5927 #define DACR3 DACCON1bits.DACR3 // bit 3
5928 #define DACR4 DACCON1bits.DACR4 // bit 4
5929 #define DACR5 DACCON1bits.DACR5 // bit 5
5930 #define DACR6 DACCON1bits.DACR6 // bit 6
5931 #define DACR7 DACCON1bits.DACR7 // bit 7
5933 #define RD EECON1bits.RD // bit 0
5934 #define WR EECON1bits.WR // bit 1
5935 #define WREN EECON1bits.WREN // bit 2
5936 #define WRERR EECON1bits.WRERR // bit 3
5937 #define FREE EECON1bits.FREE // bit 4
5938 #define LWLO EECON1bits.LWLO // bit 5
5939 #define CFGS EECON1bits.CFGS // bit 6
5940 #define EEPGD EECON1bits.EEPGD // bit 7
5942 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
5943 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
5944 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
5945 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
5946 #define TSRNG FVRCONbits.TSRNG // bit 4
5947 #define TSEN FVRCONbits.TSEN // bit 5
5948 #define FVRRDY FVRCONbits.FVRRDY // bit 6
5949 #define FVREN FVRCONbits.FVREN // bit 7
5951 #define INLVLA0 INLVLAbits.INLVLA0 // bit 0
5952 #define INLVLA1 INLVLAbits.INLVLA1 // bit 1
5953 #define INLVLA2 INLVLAbits.INLVLA2 // bit 2
5954 #define INLVLA3 INLVLAbits.INLVLA3 // bit 3
5955 #define INLVLA4 INLVLAbits.INLVLA4 // bit 4
5956 #define INLVLA5 INLVLAbits.INLVLA5 // bit 5
5957 #define INLVLA6 INLVLAbits.INLVLA6 // bit 6
5958 #define INLVLA7 INLVLAbits.INLVLA7 // bit 7
5960 #define INLVLB0 INLVLBbits.INLVLB0 // bit 0
5961 #define INLVLB1 INLVLBbits.INLVLB1 // bit 1
5962 #define INLVLB2 INLVLBbits.INLVLB2 // bit 2
5963 #define INLVLB3 INLVLBbits.INLVLB3 // bit 3
5964 #define INLVLB4 INLVLBbits.INLVLB4 // bit 4
5965 #define INLVLB5 INLVLBbits.INLVLB5 // bit 5
5966 #define INLVLB6 INLVLBbits.INLVLB6 // bit 6
5967 #define INLVLB7 INLVLBbits.INLVLB7 // bit 7
5969 #define INLVLC0 INLVLCbits.INLVLC0 // bit 0
5970 #define INLVLC1 INLVLCbits.INLVLC1 // bit 1
5971 #define INLVLC2 INLVLCbits.INLVLC2 // bit 2
5972 #define INLVLC3 INLVLCbits.INLVLC3 // bit 3
5973 #define INLVLC4 INLVLCbits.INLVLC4 // bit 4
5974 #define INLVLC5 INLVLCbits.INLVLC5 // bit 5
5975 #define INLVLC6 INLVLCbits.INLVLC6 // bit 6
5976 #define INLVLC7 INLVLCbits.INLVLC7 // bit 7
5978 #define INLVLE3 INLVLEbits.INLVLE3 // bit 3
5980 #define IOCIF INTCONbits.IOCIF // bit 0
5981 #define INTF INTCONbits.INTF // bit 1
5982 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
5983 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
5984 #define IOCIE INTCONbits.IOCIE // bit 3
5985 #define INTE INTCONbits.INTE // bit 4
5986 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
5987 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
5988 #define PEIE INTCONbits.PEIE // bit 6
5989 #define GIE INTCONbits.GIE // bit 7
5991 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
5992 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
5993 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
5994 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
5995 #define IOCAF4 IOCAFbits.IOCAF4 // bit 4
5996 #define IOCAF5 IOCAFbits.IOCAF5 // bit 5
5997 #define IOCAF6 IOCAFbits.IOCAF6 // bit 6
5998 #define IOCAF7 IOCAFbits.IOCAF7 // bit 7
6000 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
6001 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
6002 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
6003 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
6004 #define IOCAN4 IOCANbits.IOCAN4 // bit 4
6005 #define IOCAN5 IOCANbits.IOCAN5 // bit 5
6006 #define IOCAN6 IOCANbits.IOCAN6 // bit 6
6007 #define IOCAN7 IOCANbits.IOCAN7 // bit 7
6009 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
6010 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
6011 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
6012 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
6013 #define IOCAP4 IOCAPbits.IOCAP4 // bit 4
6014 #define IOCAP5 IOCAPbits.IOCAP5 // bit 5
6015 #define IOCAP6 IOCAPbits.IOCAP6 // bit 6
6016 #define IOCAP7 IOCAPbits.IOCAP7 // bit 7
6018 #define IOCBF0 IOCBFbits.IOCBF0 // bit 0
6019 #define IOCBF1 IOCBFbits.IOCBF1 // bit 1
6020 #define IOCBF2 IOCBFbits.IOCBF2 // bit 2
6021 #define IOCBF3 IOCBFbits.IOCBF3 // bit 3
6022 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
6023 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
6024 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
6025 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
6027 #define IOCBN0 IOCBNbits.IOCBN0 // bit 0
6028 #define IOCBN1 IOCBNbits.IOCBN1 // bit 1
6029 #define IOCBN2 IOCBNbits.IOCBN2 // bit 2
6030 #define IOCBN3 IOCBNbits.IOCBN3 // bit 3
6031 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
6032 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
6033 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
6034 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
6036 #define IOCBP0 IOCBPbits.IOCBP0 // bit 0
6037 #define IOCBP1 IOCBPbits.IOCBP1 // bit 1
6038 #define IOCBP2 IOCBPbits.IOCBP2 // bit 2
6039 #define IOCBP3 IOCBPbits.IOCBP3 // bit 3
6040 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
6041 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
6042 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
6043 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
6045 #define IOCCF0 IOCCFbits.IOCCF0 // bit 0
6046 #define IOCCF1 IOCCFbits.IOCCF1 // bit 1
6047 #define IOCCF2 IOCCFbits.IOCCF2 // bit 2
6048 #define IOCCF3 IOCCFbits.IOCCF3 // bit 3
6049 #define IOCCF4 IOCCFbits.IOCCF4 // bit 4
6050 #define IOCCF5 IOCCFbits.IOCCF5 // bit 5
6051 #define IOCCF6 IOCCFbits.IOCCF6 // bit 6
6052 #define IOCCF7 IOCCFbits.IOCCF7 // bit 7
6054 #define IOCCN0 IOCCNbits.IOCCN0 // bit 0
6055 #define IOCCN1 IOCCNbits.IOCCN1 // bit 1
6056 #define IOCCN2 IOCCNbits.IOCCN2 // bit 2
6057 #define IOCCN3 IOCCNbits.IOCCN3 // bit 3
6058 #define IOCCN4 IOCCNbits.IOCCN4 // bit 4
6059 #define IOCCN5 IOCCNbits.IOCCN5 // bit 5
6060 #define IOCCN6 IOCCNbits.IOCCN6 // bit 6
6061 #define IOCCN7 IOCCNbits.IOCCN7 // bit 7
6063 #define IOCCP0 IOCCPbits.IOCCP0 // bit 0
6064 #define IOCCP1 IOCCPbits.IOCCP1 // bit 1
6065 #define IOCCP2 IOCCPbits.IOCCP2 // bit 2
6066 #define IOCCP3 IOCCPbits.IOCCP3 // bit 3
6067 #define IOCCP4 IOCCPbits.IOCCP4 // bit 4
6068 #define IOCCP5 IOCCPbits.IOCCP5 // bit 5
6069 #define IOCCP6 IOCCPbits.IOCCP6 // bit 6
6070 #define IOCCP7 IOCCPbits.IOCCP7 // bit 7
6072 #define IOCEF3 IOCEFbits.IOCEF3 // bit 3
6074 #define IOCEN3 IOCENbits.IOCEN3 // bit 3
6076 #define IOCEP3 IOCEPbits.IOCEP3 // bit 3
6078 #define LATA0 LATAbits.LATA0 // bit 0
6079 #define LATA1 LATAbits.LATA1 // bit 1
6080 #define LATA2 LATAbits.LATA2 // bit 2
6081 #define LATA3 LATAbits.LATA3 // bit 3
6082 #define LATA4 LATAbits.LATA4 // bit 4
6083 #define LATA5 LATAbits.LATA5 // bit 5
6084 #define LATA6 LATAbits.LATA6 // bit 6
6085 #define LATA7 LATAbits.LATA7 // bit 7
6087 #define LATB0 LATBbits.LATB0 // bit 0
6088 #define LATB1 LATBbits.LATB1 // bit 1
6089 #define LATB2 LATBbits.LATB2 // bit 2
6090 #define LATB3 LATBbits.LATB3 // bit 3
6091 #define LATB4 LATBbits.LATB4 // bit 4
6092 #define LATB5 LATBbits.LATB5 // bit 5
6093 #define LATB6 LATBbits.LATB6 // bit 6
6094 #define LATB7 LATBbits.LATB7 // bit 7
6096 #define LATC0 LATCbits.LATC0 // bit 0
6097 #define LATC1 LATCbits.LATC1 // bit 1
6098 #define LATC2 LATCbits.LATC2 // bit 2
6099 #define LATC3 LATCbits.LATC3 // bit 3
6100 #define LATC4 LATCbits.LATC4 // bit 4
6101 #define LATC5 LATCbits.LATC5 // bit 5
6102 #define LATC6 LATCbits.LATC6 // bit 6
6103 #define LATC7 LATCbits.LATC7 // bit 7
6105 #define ODCONA0 ODCONAbits.ODCONA0 // bit 0
6106 #define ODCONA1 ODCONAbits.ODCONA1 // bit 1
6107 #define ODCONA2 ODCONAbits.ODCONA2 // bit 2
6108 #define ODCONA3 ODCONAbits.ODCONA3 // bit 3
6109 #define ODCONA4 ODCONAbits.ODCONA4 // bit 4
6110 #define ODCONA5 ODCONAbits.ODCONA5 // bit 5
6111 #define ODCONA6 ODCONAbits.ODCONA6 // bit 6
6112 #define ODCONA7 ODCONAbits.ODCONA7 // bit 7
6114 #define ODCONB0 ODCONBbits.ODCONB0 // bit 0
6115 #define ODCONB1 ODCONBbits.ODCONB1 // bit 1
6116 #define ODCONB2 ODCONBbits.ODCONB2 // bit 2
6117 #define ODCONB3 ODCONBbits.ODCONB3 // bit 3
6118 #define ODCONB4 ODCONBbits.ODCONB4 // bit 4
6119 #define ODCONB5 ODCONBbits.ODCONB5 // bit 5
6120 #define ODCONB6 ODCONBbits.ODCONB6 // bit 6
6121 #define ODCONB7 ODCONBbits.ODCONB7 // bit 7
6123 #define ODCONC0 ODCONCbits.ODCONC0 // bit 0
6124 #define ODCONC1 ODCONCbits.ODCONC1 // bit 1
6125 #define ODCONC2 ODCONCbits.ODCONC2 // bit 2
6126 #define ODCONC3 ODCONCbits.ODCONC3 // bit 3
6127 #define ODCONC4 ODCONCbits.ODCONC4 // bit 4
6128 #define ODCONC5 ODCONCbits.ODCONC5 // bit 5
6129 #define ODCONC6 ODCONCbits.ODCONC6 // bit 6
6130 #define ODCONC7 ODCONCbits.ODCONC7 // bit 7
6132 #define OPA1CH0 OPA1CONbits.OPA1CH0 // bit 0
6133 #define OPA1CH1 OPA1CONbits.OPA1CH1 // bit 1
6134 #define OPA1SP OPA1CONbits.OPA1SP // bit 6
6135 #define OPA1EN OPA1CONbits.OPA1EN // bit 7
6137 #define OPA2CH0 OPA2CONbits.OPA2CH0 // bit 0
6138 #define OPA2CH1 OPA2CONbits.OPA2CH1 // bit 1
6139 #define OPA2SP OPA2CONbits.OPA2SP // bit 6
6140 #define OPA2EN OPA2CONbits.OPA2EN // bit 7
6142 #define PS0 OPTION_REGbits.PS0 // bit 0
6143 #define PS1 OPTION_REGbits.PS1 // bit 1
6144 #define PS2 OPTION_REGbits.PS2 // bit 2
6145 #define PSA OPTION_REGbits.PSA // bit 3
6146 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
6147 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
6148 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
6149 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
6150 #define INTEDG OPTION_REGbits.INTEDG // bit 6
6151 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
6153 #define SCS0 OSCCONbits.SCS0 // bit 0
6154 #define SCS1 OSCCONbits.SCS1 // bit 1
6155 #define IRCF0 OSCCONbits.IRCF0 // bit 3
6156 #define IRCF1 OSCCONbits.IRCF1 // bit 4
6157 #define IRCF2 OSCCONbits.IRCF2 // bit 5
6158 #define IRCF3 OSCCONbits.IRCF3 // bit 6
6159 #define SPLLEN OSCCONbits.SPLLEN // bit 7
6161 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
6162 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
6163 #define MFIOFR OSCSTATbits.MFIOFR // bit 2
6164 #define HFIOFL OSCSTATbits.HFIOFL // bit 3
6165 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
6166 #define OSTS OSCSTATbits.OSTS // bit 5
6167 #define PLLR OSCSTATbits.PLLR // bit 6
6168 #define T1OSCR OSCSTATbits.T1OSCR // bit 7
6170 #define TUN0 OSCTUNEbits.TUN0 // bit 0
6171 #define TUN1 OSCTUNEbits.TUN1 // bit 1
6172 #define TUN2 OSCTUNEbits.TUN2 // bit 2
6173 #define TUN3 OSCTUNEbits.TUN3 // bit 3
6174 #define TUN4 OSCTUNEbits.TUN4 // bit 4
6175 #define TUN5 OSCTUNEbits.TUN5 // bit 5
6177 #define NOT_BOR PCONbits.NOT_BOR // bit 0
6178 #define NOT_POR PCONbits.NOT_POR // bit 1
6179 #define NOT_RI PCONbits.NOT_RI // bit 2
6180 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
6181 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
6182 #define STKUNF PCONbits.STKUNF // bit 6
6183 #define STKOVF PCONbits.STKOVF // bit 7
6185 #define TMR1IE PIE1bits.TMR1IE // bit 0
6186 #define TMR2IE PIE1bits.TMR2IE // bit 1
6187 #define CCP1IE PIE1bits.CCP1IE // bit 2
6188 #define SSP1IE PIE1bits.SSP1IE // bit 3
6189 #define TXIE PIE1bits.TXIE // bit 4
6190 #define RCIE PIE1bits.RCIE // bit 5
6191 #define ADIE PIE1bits.ADIE // bit 6
6192 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
6194 #define CCP2IE PIE2bits.CCP2IE // bit 0
6195 #define C3IE PIE2bits.C3IE // bit 1
6196 #define BCL1IE PIE2bits.BCL1IE // bit 3
6197 #define EEIE PIE2bits.EEIE // bit 4
6198 #define C1IE PIE2bits.C1IE // bit 5
6199 #define C2IE PIE2bits.C2IE // bit 6
6200 #define OSFIE PIE2bits.OSFIE // bit 7
6202 #define PSMC1SIE PIE4bits.PSMC1SIE // bit 0
6203 #define PSMC2SIE PIE4bits.PSMC2SIE // bit 1
6204 #define PSMC1TIE PIE4bits.PSMC1TIE // bit 4
6205 #define PSMC2TIE PIE4bits.PSMC2TIE // bit 5
6207 #define TMR1IF PIR1bits.TMR1IF // bit 0
6208 #define TMR2IF PIR1bits.TMR2IF // bit 1
6209 #define CCP1IF PIR1bits.CCP1IF // bit 2
6210 #define SSP1IF PIR1bits.SSP1IF // bit 3
6211 #define TXIF PIR1bits.TXIF // bit 4
6212 #define RCIF PIR1bits.RCIF // bit 5
6213 #define ADIF PIR1bits.ADIF // bit 6
6214 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
6216 #define CCP2IF PIR2bits.CCP2IF // bit 0
6217 #define C3IF PIR2bits.C3IF // bit 1
6218 #define BCL1IF PIR2bits.BCL1IF // bit 3
6219 #define EEIF PIR2bits.EEIF // bit 4
6220 #define C1IF PIR2bits.C1IF // bit 5
6221 #define C2IF PIR2bits.C2IF // bit 6
6222 #define OSFIF PIR2bits.OSFIF // bit 7
6224 #define PSMC1SIF PIR4bits.PSMC1SIF // bit 0
6225 #define PSMC2SIF PIR4bits.PSMC2SIF // bit 1
6226 #define PSMC1TIF PIR4bits.PSMC1TIF // bit 4
6227 #define PSMC2TIF PIR4bits.PSMC2TIF // bit 5
6229 #define RA0 PORTAbits.RA0 // bit 0
6230 #define RA1 PORTAbits.RA1 // bit 1
6231 #define RA2 PORTAbits.RA2 // bit 2
6232 #define RA3 PORTAbits.RA3 // bit 3
6233 #define RA4 PORTAbits.RA4 // bit 4
6234 #define RA5 PORTAbits.RA5 // bit 5
6235 #define RA6 PORTAbits.RA6 // bit 6
6236 #define RA7 PORTAbits.RA7 // bit 7
6238 #define RB0 PORTBbits.RB0 // bit 0
6239 #define RB1 PORTBbits.RB1 // bit 1
6240 #define RB2 PORTBbits.RB2 // bit 2
6241 #define RB3 PORTBbits.RB3 // bit 3
6242 #define RB4 PORTBbits.RB4 // bit 4
6243 #define RB5 PORTBbits.RB5 // bit 5
6244 #define RB6 PORTBbits.RB6 // bit 6
6245 #define RB7 PORTBbits.RB7 // bit 7
6247 #define RC0 PORTCbits.RC0 // bit 0
6248 #define RC1 PORTCbits.RC1 // bit 1
6249 #define RC2 PORTCbits.RC2 // bit 2
6250 #define RC3 PORTCbits.RC3 // bit 3
6251 #define RC4 PORTCbits.RC4 // bit 4
6252 #define RC5 PORTCbits.RC5 // bit 5
6253 #define RC6 PORTCbits.RC6 // bit 6
6254 #define RC7 PORTCbits.RC7 // bit 7
6256 #define RE3 PORTEbits.RE3 // bit 3
6258 #define P1ASDOV PSMC1ASDCbits.P1ASDOV // bit 0
6259 #define P1ARSEN PSMC1ASDCbits.P1ARSEN // bit 5
6260 #define P1ASDEN PSMC1ASDCbits.P1ASDEN // bit 6
6261 #define P1ASE PSMC1ASDCbits.P1ASE // bit 7
6263 #define P1ASDLA PSMC1ASDLbits.P1ASDLA // bit 0
6264 #define P1ASDLB PSMC1ASDLbits.P1ASDLB // bit 1
6265 #define P1ASDLC PSMC1ASDLbits.P1ASDLC // bit 2
6266 #define P1ASDLD PSMC1ASDLbits.P1ASDLD // bit 3
6267 #define P1ASDLE PSMC1ASDLbits.P1ASDLE // bit 4
6268 #define P1ASDLF PSMC1ASDLbits.P1ASDLF // bit 5
6270 #define P1ASDSC1 PSMC1ASDSbits.P1ASDSC1 // bit 1
6271 #define P1ASDSC2 PSMC1ASDSbits.P1ASDSC2 // bit 2
6272 #define P1ASDSC3 PSMC1ASDSbits.P1ASDSC3 // bit 3
6273 #define P1ASDSIN PSMC1ASDSbits.P1ASDSIN // bit 7
6275 #define PSMC1BLKF0 PSMC1BLKFbits.PSMC1BLKF0 // bit 0
6276 #define PSMC1BLKF1 PSMC1BLKFbits.PSMC1BLKF1 // bit 1
6277 #define PSMC1BLKF2 PSMC1BLKFbits.PSMC1BLKF2 // bit 2
6278 #define PSMC1BLKF3 PSMC1BLKFbits.PSMC1BLKF3 // bit 3
6279 #define PSMC1BLKF4 PSMC1BLKFbits.PSMC1BLKF4 // bit 4
6280 #define PSMC1BLKF5 PSMC1BLKFbits.PSMC1BLKF5 // bit 5
6281 #define PSMC1BLKF6 PSMC1BLKFbits.PSMC1BLKF6 // bit 6
6282 #define PSMC1BLKF7 PSMC1BLKFbits.PSMC1BLKF7 // bit 7
6284 #define PSMC1BLKR0 PSMC1BLKRbits.PSMC1BLKR0 // bit 0
6285 #define PSMC1BLKR1 PSMC1BLKRbits.PSMC1BLKR1 // bit 1
6286 #define PSMC1BLKR2 PSMC1BLKRbits.PSMC1BLKR2 // bit 2
6287 #define PSMC1BLKR3 PSMC1BLKRbits.PSMC1BLKR3 // bit 3
6288 #define PSMC1BLKR4 PSMC1BLKRbits.PSMC1BLKR4 // bit 4
6289 #define PSMC1BLKR5 PSMC1BLKRbits.PSMC1BLKR5 // bit 5
6290 #define PSMC1BLKR6 PSMC1BLKRbits.PSMC1BLKR6 // bit 6
6291 #define PSMC1BLKR7 PSMC1BLKRbits.PSMC1BLKR7 // bit 7
6293 #define P1REBM0 PSMC1BLNKbits.P1REBM0 // bit 0
6294 #define P1REBM1 PSMC1BLNKbits.P1REBM1 // bit 1
6295 #define P1FEBM0 PSMC1BLNKbits.P1FEBM0 // bit 4
6296 #define P1FEBM1 PSMC1BLNKbits.P1FEBM1 // bit 5
6298 #define P1CSRC0 PSMC1CLKbits.P1CSRC0 // bit 0
6299 #define P1CSRC1 PSMC1CLKbits.P1CSRC1 // bit 1
6300 #define P1CPRE0 PSMC1CLKbits.P1CPRE0 // bit 4
6301 #define P1CPRE1 PSMC1CLKbits.P1CPRE1 // bit 5
6303 #define P1MODE0 PSMC1CONbits.P1MODE0 // bit 0
6304 #define P1MODE1 PSMC1CONbits.P1MODE1 // bit 1
6305 #define P1MODE2 PSMC1CONbits.P1MODE2 // bit 2
6306 #define P1MODE3 PSMC1CONbits.P1MODE3 // bit 3
6307 #define P1DBRE PSMC1CONbits.P1DBRE // bit 4
6308 #define P1DBFE PSMC1CONbits.P1DBFE // bit 5
6309 #define PSMC1LD PSMC1CONbits.PSMC1LD // bit 6
6310 #define PSMC1EN PSMC1CONbits.PSMC1EN // bit 7
6312 #define PSMC1DBF0 PSMC1DBFbits.PSMC1DBF0 // bit 0
6313 #define PSMC1DBF1 PSMC1DBFbits.PSMC1DBF1 // bit 1
6314 #define PSMC1DBF2 PSMC1DBFbits.PSMC1DBF2 // bit 2
6315 #define PSMC1DBF3 PSMC1DBFbits.PSMC1DBF3 // bit 3
6316 #define PSMC1DBF4 PSMC1DBFbits.PSMC1DBF4 // bit 4
6317 #define PSMC1DBF5 PSMC1DBFbits.PSMC1DBF5 // bit 5
6318 #define PSMC1DBF6 PSMC1DBFbits.PSMC1DBF6 // bit 6
6319 #define PSMC1DBF7 PSMC1DBFbits.PSMC1DBF7 // bit 7
6321 #define PSMC1DBR0 PSMC1DBRbits.PSMC1DBR0 // bit 0
6322 #define PSMC1DBR1 PSMC1DBRbits.PSMC1DBR1 // bit 1
6323 #define PSMC1DBR2 PSMC1DBRbits.PSMC1DBR2 // bit 2
6324 #define PSMC1DBR3 PSMC1DBRbits.PSMC1DBR3 // bit 3
6325 #define PSMC1DBR4 PSMC1DBRbits.PSMC1DBR4 // bit 4
6326 #define PSMC1DBR5 PSMC1DBRbits.PSMC1DBR5 // bit 5
6327 #define PSMC1DBR6 PSMC1DBRbits.PSMC1DBR6 // bit 6
6328 #define PSMC1DBR7 PSMC1DBRbits.PSMC1DBR7 // bit 7
6330 #define PSMC1DC8 PSMC1DCHbits.PSMC1DC8 // bit 0
6331 #define PSMC1DC9 PSMC1DCHbits.PSMC1DC9 // bit 1
6332 #define PSMC1DC10 PSMC1DCHbits.PSMC1DC10 // bit 2
6333 #define PSMC1DC11 PSMC1DCHbits.PSMC1DC11 // bit 3
6334 #define PSMC1DC12 PSMC1DCHbits.PSMC1DC12 // bit 4
6335 #define PSMC1DC13 PSMC1DCHbits.PSMC1DC13 // bit 5
6336 #define PSMC1DC14 PSMC1DCHbits.PSMC1DC14 // bit 6
6337 #define PSMC1DC15 PSMC1DCHbits.PSMC1DC15 // bit 7
6339 #define PSMC1DC0 PSMC1DCLbits.PSMC1DC0 // bit 0
6340 #define PSMC1DC1 PSMC1DCLbits.PSMC1DC1 // bit 1
6341 #define PSMC1DC2 PSMC1DCLbits.PSMC1DC2 // bit 2
6342 #define PSMC1DC3 PSMC1DCLbits.PSMC1DC3 // bit 3
6343 #define PSMC1DC4 PSMC1DCLbits.PSMC1DC4 // bit 4
6344 #define PSMC1DC5 PSMC1DCLbits.PSMC1DC5 // bit 5
6345 #define PSMC1DC6 PSMC1DCLbits.PSMC1DC6 // bit 6
6346 #define PSMC1DC7 PSMC1DCLbits.PSMC1DC7 // bit 7
6348 #define P1DCST PSMC1DCSbits.P1DCST // bit 0
6349 #define P1DCSC1 PSMC1DCSbits.P1DCSC1 // bit 1
6350 #define P1DCSC2 PSMC1DCSbits.P1DCSC2 // bit 2
6351 #define P1DCSC3 PSMC1DCSbits.P1DCSC3 // bit 3
6352 #define P1DCSIN PSMC1DCSbits.P1DCSIN // bit 7
6354 #define P1FEBSC1 PSMC1FEBSbits.P1FEBSC1 // bit 1
6355 #define P1FEBSC2 PSMC1FEBSbits.P1FEBSC2 // bit 2
6356 #define P1FEBSC3 PSMC1FEBSbits.P1FEBSC3 // bit 3
6357 #define P1FEBSIN PSMC1FEBSbits.P1FEBSIN // bit 7
6359 #define PSMC1FFA0 PSMC1FFAbits.PSMC1FFA0 // bit 0
6360 #define PSMC1FFA1 PSMC1FFAbits.PSMC1FFA1 // bit 1
6361 #define PSMC1FFA2 PSMC1FFAbits.PSMC1FFA2 // bit 2
6362 #define PSMC1FFA3 PSMC1FFAbits.PSMC1FFA3 // bit 3
6364 #define P1TPRIF PSMC1INTbits.P1TPRIF // bit 0
6365 #define P1TDCIF PSMC1INTbits.P1TDCIF // bit 1
6366 #define P1TPHIF PSMC1INTbits.P1TPHIF // bit 2
6367 #define P1TOVIF PSMC1INTbits.P1TOVIF // bit 3
6368 #define P1TPRIE PSMC1INTbits.P1TPRIE // bit 4
6369 #define P1TDCIE PSMC1INTbits.P1TDCIE // bit 5
6370 #define P1TPHIE PSMC1INTbits.P1TPHIE // bit 6
6371 #define P1TOVIE PSMC1INTbits.P1TOVIE // bit 7
6373 #define P1MSRC0 PSMC1MDLbits.P1MSRC0 // bit 0
6374 #define P1MSRC1 PSMC1MDLbits.P1MSRC1 // bit 1
6375 #define P1MSRC2 PSMC1MDLbits.P1MSRC2 // bit 2
6376 #define P1MSRC3 PSMC1MDLbits.P1MSRC3 // bit 3
6377 #define P1MDLBIT PSMC1MDLbits.P1MDLBIT // bit 5
6378 #define P1MDLPOL PSMC1MDLbits.P1MDLPOL // bit 6
6379 #define P1MDLEN PSMC1MDLbits.P1MDLEN // bit 7
6381 #define P1OEA PSMC1OENbits.P1OEA // bit 0
6382 #define P1OEB PSMC1OENbits.P1OEB // bit 1
6383 #define P1OEC PSMC1OENbits.P1OEC // bit 2
6384 #define P1OED PSMC1OENbits.P1OED // bit 3
6385 #define P1OEE PSMC1OENbits.P1OEE // bit 4
6386 #define P1OEF PSMC1OENbits.P1OEF // bit 5
6388 #define PSMC1PH8 PSMC1PHHbits.PSMC1PH8 // bit 0
6389 #define PSMC1PH9 PSMC1PHHbits.PSMC1PH9 // bit 1
6390 #define PSMC1PH10 PSMC1PHHbits.PSMC1PH10 // bit 2
6391 #define PSMC1PH11 PSMC1PHHbits.PSMC1PH11 // bit 3
6392 #define PSMC1PH12 PSMC1PHHbits.PSMC1PH12 // bit 4
6393 #define PSMC1PH13 PSMC1PHHbits.PSMC1PH13 // bit 5
6394 #define PSMC1PH14 PSMC1PHHbits.PSMC1PH14 // bit 6
6395 #define PSMC1PH15 PSMC1PHHbits.PSMC1PH15 // bit 7
6397 #define PSMC1PH0 PSMC1PHLbits.PSMC1PH0 // bit 0
6398 #define PSMC1PH1 PSMC1PHLbits.PSMC1PH1 // bit 1
6399 #define PSMC1PH2 PSMC1PHLbits.PSMC1PH2 // bit 2
6400 #define PSMC1PH3 PSMC1PHLbits.PSMC1PH3 // bit 3
6401 #define PSMC1PH4 PSMC1PHLbits.PSMC1PH4 // bit 4
6402 #define PSMC1PH5 PSMC1PHLbits.PSMC1PH5 // bit 5
6403 #define PSMC1PH6 PSMC1PHLbits.PSMC1PH6 // bit 6
6404 #define PSMC1PH7 PSMC1PHLbits.PSMC1PH7 // bit 7
6406 #define P1PHST PSMC1PHSbits.P1PHST // bit 0
6407 #define P1PHSC1 PSMC1PHSbits.P1PHSC1 // bit 1
6408 #define P1PHSC2 PSMC1PHSbits.P1PHSC2 // bit 2
6409 #define P1PHSC3 PSMC1PHSbits.P1PHSC3 // bit 3
6410 #define P1PHSIN PSMC1PHSbits.P1PHSIN // bit 7
6412 #define P1POLA PSMC1POLbits.P1POLA // bit 0
6413 #define P1POLB PSMC1POLbits.P1POLB // bit 1
6414 #define P1POLC PSMC1POLbits.P1POLC // bit 2
6415 #define P1POLD PSMC1POLbits.P1POLD // bit 3
6416 #define P1POLE PSMC1POLbits.P1POLE // bit 4
6417 #define P1POLF PSMC1POLbits.P1POLF // bit 5
6418 #define P1INPOL PSMC1POLbits.P1INPOL // bit 6
6420 #define PSMC1PR8 PSMC1PRHbits.PSMC1PR8 // bit 0
6421 #define PSMC1PR9 PSMC1PRHbits.PSMC1PR9 // bit 1
6422 #define PSMC1PR10 PSMC1PRHbits.PSMC1PR10 // bit 2
6423 #define PSMC1PR11 PSMC1PRHbits.PSMC1PR11 // bit 3
6424 #define PSMC1PR12 PSMC1PRHbits.PSMC1PR12 // bit 4
6425 #define PSMC1PR13 PSMC1PRHbits.PSMC1PR13 // bit 5
6426 #define PSMC1PR14 PSMC1PRHbits.PSMC1PR14 // bit 6
6427 #define PSMC1PR15 PSMC1PRHbits.PSMC1PR15 // bit 7
6429 #define PSMC1PR0 PSMC1PRLbits.PSMC1PR0 // bit 0
6430 #define PSMC1PR1 PSMC1PRLbits.PSMC1PR1 // bit 1
6431 #define PSMC1PR2 PSMC1PRLbits.PSMC1PR2 // bit 2
6432 #define PSMC1PR3 PSMC1PRLbits.PSMC1PR3 // bit 3
6433 #define PSMC1PR4 PSMC1PRLbits.PSMC1PR4 // bit 4
6434 #define PSMC1PR5 PSMC1PRLbits.PSMC1PR5 // bit 5
6435 #define PSMC1PR6 PSMC1PRLbits.PSMC1PR6 // bit 6
6436 #define PSMC1PR7 PSMC1PRLbits.PSMC1PR7 // bit 7
6438 #define P1PRST PSMC1PRSbits.P1PRST // bit 0
6439 #define P1PRSC1 PSMC1PRSbits.P1PRSC1 // bit 1
6440 #define P1PRSC2 PSMC1PRSbits.P1PRSC2 // bit 2
6441 #define P1PRSC3 PSMC1PRSbits.P1PRSC3 // bit 3
6442 #define P1PRSIN PSMC1PRSbits.P1PRSIN // bit 7
6444 #define P1REBSC1 PSMC1REBSbits.P1REBSC1 // bit 1
6445 #define P1REBSC2 PSMC1REBSbits.P1REBSC2 // bit 2
6446 #define P1REBSC3 PSMC1REBSbits.P1REBSC3 // bit 3
6447 #define P1REBSIN PSMC1REBSbits.P1REBSIN // bit 7
6449 #define P1STRA PSMC1STR0bits.P1STRA // bit 0
6450 #define P1STRB PSMC1STR0bits.P1STRB // bit 1
6451 #define P1STRC PSMC1STR0bits.P1STRC // bit 2
6452 #define P1STRD PSMC1STR0bits.P1STRD // bit 3
6453 #define P1STRE PSMC1STR0bits.P1STRE // bit 4
6454 #define P1STRF PSMC1STR0bits.P1STRF // bit 5
6456 #define P1HSMEN PSMC1STR1bits.P1HSMEN // bit 0
6457 #define P1LSMEN PSMC1STR1bits.P1LSMEN // bit 1
6458 #define P1SSYNC PSMC1STR1bits.P1SSYNC // bit 7
6460 #define P1SYNC0 PSMC1SYNCbits.P1SYNC0 // bit 0
6461 #define P1SYNC1 PSMC1SYNCbits.P1SYNC1 // bit 1
6463 #define PSMC1TMR8 PSMC1TMRHbits.PSMC1TMR8 // bit 0
6464 #define PSMC1TMR9 PSMC1TMRHbits.PSMC1TMR9 // bit 1
6465 #define PSMC1TMR10 PSMC1TMRHbits.PSMC1TMR10 // bit 2
6466 #define PSMC1TMR11 PSMC1TMRHbits.PSMC1TMR11 // bit 3
6467 #define PSMC1TMR12 PSMC1TMRHbits.PSMC1TMR12 // bit 4
6468 #define PSMC1TMR13 PSMC1TMRHbits.PSMC1TMR13 // bit 5
6469 #define PSMC1TMR14 PSMC1TMRHbits.PSMC1TMR14 // bit 6
6470 #define PSMC1TMR15 PSMC1TMRHbits.PSMC1TMR15 // bit 7
6472 #define PSMC1TMR0 PSMC1TMRLbits.PSMC1TMR0 // bit 0
6473 #define PSMC1TMR1 PSMC1TMRLbits.PSMC1TMR1 // bit 1
6474 #define PSMC1TMR2 PSMC1TMRLbits.PSMC1TMR2 // bit 2
6475 #define PSMC1TMR3 PSMC1TMRLbits.PSMC1TMR3 // bit 3
6476 #define PSMC1TMR4 PSMC1TMRLbits.PSMC1TMR4 // bit 4
6477 #define PSMC1TMR5 PSMC1TMRLbits.PSMC1TMR5 // bit 5
6478 #define PSMC1TMR6 PSMC1TMRLbits.PSMC1TMR6 // bit 6
6479 #define PSMC1TMR7 PSMC1TMRLbits.PSMC1TMR7 // bit 7
6481 #define P2ASDOV PSMC2ASDCbits.P2ASDOV // bit 0
6482 #define P2ARSEN PSMC2ASDCbits.P2ARSEN // bit 5
6483 #define P2ASDEN PSMC2ASDCbits.P2ASDEN // bit 6
6484 #define P2ASE PSMC2ASDCbits.P2ASE // bit 7
6486 #define P2ASDLA PSMC2ASDLbits.P2ASDLA // bit 0
6487 #define P2ASDLB PSMC2ASDLbits.P2ASDLB // bit 1
6489 #define P2ASDSC1 PSMC2ASDSbits.P2ASDSC1 // bit 1
6490 #define P2ASDSC2 PSMC2ASDSbits.P2ASDSC2 // bit 2
6491 #define P2ASDSC3 PSMC2ASDSbits.P2ASDSC3 // bit 3
6492 #define P2ASDSIN PSMC2ASDSbits.P2ASDSIN // bit 7
6494 #define PSMC2BLKF0 PSMC2BLKFbits.PSMC2BLKF0 // bit 0
6495 #define PSMC2BLKF1 PSMC2BLKFbits.PSMC2BLKF1 // bit 1
6496 #define PSMC2BLKF2 PSMC2BLKFbits.PSMC2BLKF2 // bit 2
6497 #define PSMC2BLKF3 PSMC2BLKFbits.PSMC2BLKF3 // bit 3
6498 #define PSMC2BLKF4 PSMC2BLKFbits.PSMC2BLKF4 // bit 4
6499 #define PSMC2BLKF5 PSMC2BLKFbits.PSMC2BLKF5 // bit 5
6500 #define PSMC2BLKF6 PSMC2BLKFbits.PSMC2BLKF6 // bit 6
6501 #define PSMC2BLKF7 PSMC2BLKFbits.PSMC2BLKF7 // bit 7
6503 #define PSMC2BLKR0 PSMC2BLKRbits.PSMC2BLKR0 // bit 0
6504 #define PSMC2BLKR1 PSMC2BLKRbits.PSMC2BLKR1 // bit 1
6505 #define PSMC2BLKR2 PSMC2BLKRbits.PSMC2BLKR2 // bit 2
6506 #define PSMC2BLKR3 PSMC2BLKRbits.PSMC2BLKR3 // bit 3
6507 #define PSMC2BLKR4 PSMC2BLKRbits.PSMC2BLKR4 // bit 4
6508 #define PSMC2BLKR5 PSMC2BLKRbits.PSMC2BLKR5 // bit 5
6509 #define PSMC2BLKR6 PSMC2BLKRbits.PSMC2BLKR6 // bit 6
6510 #define PSMC2BLKR7 PSMC2BLKRbits.PSMC2BLKR7 // bit 7
6512 #define P2REBM0 PSMC2BLNKbits.P2REBM0 // bit 0
6513 #define P2REBM1 PSMC2BLNKbits.P2REBM1 // bit 1
6514 #define P2FEBM0 PSMC2BLNKbits.P2FEBM0 // bit 4
6515 #define P2FEBM1 PSMC2BLNKbits.P2FEBM1 // bit 5
6517 #define P2CSRC0 PSMC2CLKbits.P2CSRC0 // bit 0
6518 #define P2CSRC1 PSMC2CLKbits.P2CSRC1 // bit 1
6519 #define P2CPRE0 PSMC2CLKbits.P2CPRE0 // bit 4
6520 #define P2CPRE1 PSMC2CLKbits.P2CPRE1 // bit 5
6522 #define P2MODE0 PSMC2CONbits.P2MODE0 // bit 0
6523 #define P2MODE1 PSMC2CONbits.P2MODE1 // bit 1
6524 #define P2MODE2 PSMC2CONbits.P2MODE2 // bit 2
6525 #define P2MODE3 PSMC2CONbits.P2MODE3 // bit 3
6526 #define P2DBRE PSMC2CONbits.P2DBRE // bit 4
6527 #define P2DBFE PSMC2CONbits.P2DBFE // bit 5
6528 #define PSMC2LD PSMC2CONbits.PSMC2LD // bit 6
6529 #define PSMC2EN PSMC2CONbits.PSMC2EN // bit 7
6531 #define PSMC2DBF0 PSMC2DBFbits.PSMC2DBF0 // bit 0
6532 #define PSMC2DBF1 PSMC2DBFbits.PSMC2DBF1 // bit 1
6533 #define PSMC2DBF2 PSMC2DBFbits.PSMC2DBF2 // bit 2
6534 #define PSMC2DBF3 PSMC2DBFbits.PSMC2DBF3 // bit 3
6535 #define PSMC2DBF4 PSMC2DBFbits.PSMC2DBF4 // bit 4
6536 #define PSMC2DBF5 PSMC2DBFbits.PSMC2DBF5 // bit 5
6537 #define PSMC2DBF6 PSMC2DBFbits.PSMC2DBF6 // bit 6
6538 #define PSMC2DBF7 PSMC2DBFbits.PSMC2DBF7 // bit 7
6540 #define PSMC2DBR0 PSMC2DBRbits.PSMC2DBR0 // bit 0
6541 #define PSMC2DBR1 PSMC2DBRbits.PSMC2DBR1 // bit 1
6542 #define PSMC2DBR2 PSMC2DBRbits.PSMC2DBR2 // bit 2
6543 #define PSMC2DBR3 PSMC2DBRbits.PSMC2DBR3 // bit 3
6544 #define PSMC2DBR4 PSMC2DBRbits.PSMC2DBR4 // bit 4
6545 #define PSMC2DBR5 PSMC2DBRbits.PSMC2DBR5 // bit 5
6546 #define PSMC2DBR6 PSMC2DBRbits.PSMC2DBR6 // bit 6
6547 #define PSMC2DBR7 PSMC2DBRbits.PSMC2DBR7 // bit 7
6549 #define PSMC2DC8 PSMC2DCHbits.PSMC2DC8 // bit 0
6550 #define PSMC2DC9 PSMC2DCHbits.PSMC2DC9 // bit 1
6551 #define PSMC2DC10 PSMC2DCHbits.PSMC2DC10 // bit 2
6552 #define PSMC2DC11 PSMC2DCHbits.PSMC2DC11 // bit 3
6553 #define PSMC2DC12 PSMC2DCHbits.PSMC2DC12 // bit 4
6554 #define PSMC2DC13 PSMC2DCHbits.PSMC2DC13 // bit 5
6555 #define PSMC2DC14 PSMC2DCHbits.PSMC2DC14 // bit 6
6556 #define PSMC2DC15 PSMC2DCHbits.PSMC2DC15 // bit 7
6558 #define PSMC2DC0 PSMC2DCLbits.PSMC2DC0 // bit 0
6559 #define PSMC2DC1 PSMC2DCLbits.PSMC2DC1 // bit 1
6560 #define PSMC2DC2 PSMC2DCLbits.PSMC2DC2 // bit 2
6561 #define PSMC2DC3 PSMC2DCLbits.PSMC2DC3 // bit 3
6562 #define PSMC2DC4 PSMC2DCLbits.PSMC2DC4 // bit 4
6563 #define PSMC2DC5 PSMC2DCLbits.PSMC2DC5 // bit 5
6564 #define PSMC2DC6 PSMC2DCLbits.PSMC2DC6 // bit 6
6565 #define PSMC2DC7 PSMC2DCLbits.PSMC2DC7 // bit 7
6567 #define P2DCST PSMC2DCSbits.P2DCST // bit 0
6568 #define P2DCSC1 PSMC2DCSbits.P2DCSC1 // bit 1
6569 #define P2DCSC2 PSMC2DCSbits.P2DCSC2 // bit 2
6570 #define P2DCSC3 PSMC2DCSbits.P2DCSC3 // bit 3
6571 #define P2DCSIN PSMC2DCSbits.P2DCSIN // bit 7
6573 #define P2FEBSC1 PSMC2FEBSbits.P2FEBSC1 // bit 1
6574 #define P2FEBSC2 PSMC2FEBSbits.P2FEBSC2 // bit 2
6575 #define P2FEBSC3 PSMC2FEBSbits.P2FEBSC3 // bit 3
6576 #define P2FEBSIN PSMC2FEBSbits.P2FEBSIN // bit 7
6578 #define PSMC2FFA0 PSMC2FFAbits.PSMC2FFA0 // bit 0
6579 #define PSMC2FFA1 PSMC2FFAbits.PSMC2FFA1 // bit 1
6580 #define PSMC2FFA2 PSMC2FFAbits.PSMC2FFA2 // bit 2
6581 #define PSMC2FFA3 PSMC2FFAbits.PSMC2FFA3 // bit 3
6583 #define P2TPRIF PSMC2INTbits.P2TPRIF // bit 0
6584 #define P2TDCIF PSMC2INTbits.P2TDCIF // bit 1
6585 #define P2TPHIF PSMC2INTbits.P2TPHIF // bit 2
6586 #define P2TOVIF PSMC2INTbits.P2TOVIF // bit 3
6587 #define P2TPRIE PSMC2INTbits.P2TPRIE // bit 4
6588 #define P2TDCIE PSMC2INTbits.P2TDCIE // bit 5
6589 #define P2TPHIE PSMC2INTbits.P2TPHIE // bit 6
6590 #define P2TOVIE PSMC2INTbits.P2TOVIE // bit 7
6592 #define P2MSRC0 PSMC2MDLbits.P2MSRC0 // bit 0
6593 #define P2MSRC1 PSMC2MDLbits.P2MSRC1 // bit 1
6594 #define P2MSRC2 PSMC2MDLbits.P2MSRC2 // bit 2
6595 #define P2MSRC3 PSMC2MDLbits.P2MSRC3 // bit 3
6596 #define P2MDLBIT PSMC2MDLbits.P2MDLBIT // bit 5
6597 #define P2MDLPOL PSMC2MDLbits.P2MDLPOL // bit 6
6598 #define P2MDLEN PSMC2MDLbits.P2MDLEN // bit 7
6600 #define P2OEA PSMC2OENbits.P2OEA // bit 0
6601 #define P2OEB PSMC2OENbits.P2OEB // bit 1
6603 #define PSMC2PH8 PSMC2PHHbits.PSMC2PH8 // bit 0
6604 #define PSMC2PH9 PSMC2PHHbits.PSMC2PH9 // bit 1
6605 #define PSMC2PH10 PSMC2PHHbits.PSMC2PH10 // bit 2
6606 #define PSMC2PH11 PSMC2PHHbits.PSMC2PH11 // bit 3
6607 #define PSMC2PH12 PSMC2PHHbits.PSMC2PH12 // bit 4
6608 #define PSMC2PH13 PSMC2PHHbits.PSMC2PH13 // bit 5
6609 #define PSMC2PH14 PSMC2PHHbits.PSMC2PH14 // bit 6
6610 #define PSMC2PH15 PSMC2PHHbits.PSMC2PH15 // bit 7
6612 #define PSMC2PH0 PSMC2PHLbits.PSMC2PH0 // bit 0
6613 #define PSMC2PH1 PSMC2PHLbits.PSMC2PH1 // bit 1
6614 #define PSMC2PH2 PSMC2PHLbits.PSMC2PH2 // bit 2
6615 #define PSMC2PH3 PSMC2PHLbits.PSMC2PH3 // bit 3
6616 #define PSMC2PH4 PSMC2PHLbits.PSMC2PH4 // bit 4
6617 #define PSMC2PH5 PSMC2PHLbits.PSMC2PH5 // bit 5
6618 #define PSMC2PH6 PSMC2PHLbits.PSMC2PH6 // bit 6
6619 #define PSMC2PH7 PSMC2PHLbits.PSMC2PH7 // bit 7
6621 #define P2PHST PSMC2PHSbits.P2PHST // bit 0
6622 #define P2PHSC1 PSMC2PHSbits.P2PHSC1 // bit 1
6623 #define P2PHSC2 PSMC2PHSbits.P2PHSC2 // bit 2
6624 #define P2PHSC3 PSMC2PHSbits.P2PHSC3 // bit 3
6625 #define P2PHSIN PSMC2PHSbits.P2PHSIN // bit 7
6627 #define P2POLA PSMC2POLbits.P2POLA // bit 0
6628 #define P2POLB PSMC2POLbits.P2POLB // bit 1
6629 #define P2INPOL PSMC2POLbits.P2INPOL // bit 6
6631 #define PSMC2PR8 PSMC2PRHbits.PSMC2PR8 // bit 0
6632 #define PSMC2PR9 PSMC2PRHbits.PSMC2PR9 // bit 1
6633 #define PSMC2PR10 PSMC2PRHbits.PSMC2PR10 // bit 2
6634 #define PSMC2PR11 PSMC2PRHbits.PSMC2PR11 // bit 3
6635 #define PSMC2PR12 PSMC2PRHbits.PSMC2PR12 // bit 4
6636 #define PSMC2PR13 PSMC2PRHbits.PSMC2PR13 // bit 5
6637 #define PSMC2PR14 PSMC2PRHbits.PSMC2PR14 // bit 6
6638 #define PSMC2PR15 PSMC2PRHbits.PSMC2PR15 // bit 7
6640 #define PSMC2PR0 PSMC2PRLbits.PSMC2PR0 // bit 0
6641 #define PSMC2PR1 PSMC2PRLbits.PSMC2PR1 // bit 1
6642 #define PSMC2PR2 PSMC2PRLbits.PSMC2PR2 // bit 2
6643 #define PSMC2PR3 PSMC2PRLbits.PSMC2PR3 // bit 3
6644 #define PSMC2PR4 PSMC2PRLbits.PSMC2PR4 // bit 4
6645 #define PSMC2PR5 PSMC2PRLbits.PSMC2PR5 // bit 5
6646 #define PSMC2PR6 PSMC2PRLbits.PSMC2PR6 // bit 6
6647 #define PSMC2PR7 PSMC2PRLbits.PSMC2PR7 // bit 7
6649 #define P2PRST PSMC2PRSbits.P2PRST // bit 0
6650 #define P2PRSC1 PSMC2PRSbits.P2PRSC1 // bit 1
6651 #define P2PRSC2 PSMC2PRSbits.P2PRSC2 // bit 2
6652 #define P2PRSC3 PSMC2PRSbits.P2PRSC3 // bit 3
6653 #define P2PRSIN PSMC2PRSbits.P2PRSIN // bit 7
6655 #define P2REBSC1 PSMC2REBSbits.P2REBSC1 // bit 1
6656 #define P2REBSC2 PSMC2REBSbits.P2REBSC2 // bit 2
6657 #define P2REBSC3 PSMC2REBSbits.P2REBSC3 // bit 3
6658 #define P2REBSIN PSMC2REBSbits.P2REBSIN // bit 7
6660 #define P2STRA PSMC2STR0bits.P2STRA // bit 0
6661 #define P2STRB PSMC2STR0bits.P2STRB // bit 1
6663 #define P2HSMEN PSMC2STR1bits.P2HSMEN // bit 0
6664 #define P2LSMEN PSMC2STR1bits.P2LSMEN // bit 1
6665 #define P2SSYNC PSMC2STR1bits.P2SSYNC // bit 7
6667 #define P2SYNC0 PSMC2SYNCbits.P2SYNC0 // bit 0
6668 #define P2SYNC1 PSMC2SYNCbits.P2SYNC1 // bit 1
6670 #define PSMC2TMR8 PSMC2TMRHbits.PSMC2TMR8 // bit 0
6671 #define PSMC2TMR9 PSMC2TMRHbits.PSMC2TMR9 // bit 1
6672 #define PSMC2TMR10 PSMC2TMRHbits.PSMC2TMR10 // bit 2
6673 #define PSMC2TMR11 PSMC2TMRHbits.PSMC2TMR11 // bit 3
6674 #define PSMC2TMR12 PSMC2TMRHbits.PSMC2TMR12 // bit 4
6675 #define PSMC2TMR13 PSMC2TMRHbits.PSMC2TMR13 // bit 5
6676 #define PSMC2TMR14 PSMC2TMRHbits.PSMC2TMR14 // bit 6
6677 #define PSMC2TMR15 PSMC2TMRHbits.PSMC2TMR15 // bit 7
6679 #define PSMC2TMR0 PSMC2TMRLbits.PSMC2TMR0 // bit 0
6680 #define PSMC2TMR1 PSMC2TMRLbits.PSMC2TMR1 // bit 1
6681 #define PSMC2TMR2 PSMC2TMRLbits.PSMC2TMR2 // bit 2
6682 #define PSMC2TMR3 PSMC2TMRLbits.PSMC2TMR3 // bit 3
6683 #define PSMC2TMR4 PSMC2TMRLbits.PSMC2TMR4 // bit 4
6684 #define PSMC2TMR5 PSMC2TMRLbits.PSMC2TMR5 // bit 5
6685 #define PSMC2TMR6 PSMC2TMRLbits.PSMC2TMR6 // bit 6
6686 #define PSMC2TMR7 PSMC2TMRLbits.PSMC2TMR7 // bit 7
6688 #define RX9D RC1STAbits.RX9D // bit 0
6689 #define OERR RC1STAbits.OERR // bit 1
6690 #define FERR RC1STAbits.FERR // bit 2
6691 #define ADDEN RC1STAbits.ADDEN // bit 3
6692 #define CREN RC1STAbits.CREN // bit 4
6693 #define SREN RC1STAbits.SREN // bit 5
6694 #define RX9 RC1STAbits.RX9 // bit 6
6695 #define SPEN RC1STAbits.SPEN // bit 7
6697 #define SLRCONA0 SLRCONAbits.SLRCONA0 // bit 0
6698 #define SLRCONA1 SLRCONAbits.SLRCONA1 // bit 1
6699 #define SLRCONA2 SLRCONAbits.SLRCONA2 // bit 2
6700 #define SLRCONA3 SLRCONAbits.SLRCONA3 // bit 3
6701 #define SLRCONA4 SLRCONAbits.SLRCONA4 // bit 4
6702 #define SLRCONA5 SLRCONAbits.SLRCONA5 // bit 5
6703 #define SLRCONA6 SLRCONAbits.SLRCONA6 // bit 6
6704 #define SLRCONA7 SLRCONAbits.SLRCONA7 // bit 7
6706 #define SLRCONB0 SLRCONBbits.SLRCONB0 // bit 0
6707 #define SLRCONB1 SLRCONBbits.SLRCONB1 // bit 1
6708 #define SLRCONB2 SLRCONBbits.SLRCONB2 // bit 2
6709 #define SLRCONB3 SLRCONBbits.SLRCONB3 // bit 3
6710 #define SLRCONB4 SLRCONBbits.SLRCONB4 // bit 4
6711 #define SLRCONB5 SLRCONBbits.SLRCONB5 // bit 5
6712 #define SLRCONB6 SLRCONBbits.SLRCONB6 // bit 6
6713 #define SLRCONB7 SLRCONBbits.SLRCONB7 // bit 7
6715 #define SLRCONC0 SLRCONCbits.SLRCONC0 // bit 0
6716 #define SLRCONC1 SLRCONCbits.SLRCONC1 // bit 1
6717 #define SLRCONC2 SLRCONCbits.SLRCONC2 // bit 2
6718 #define SLRCONC3 SLRCONCbits.SLRCONC3 // bit 3
6719 #define SLRCONC4 SLRCONCbits.SLRCONC4 // bit 4
6720 #define SLRCONC5 SLRCONCbits.SLRCONC5 // bit 5
6721 #define SLRCONC6 SLRCONCbits.SLRCONC6 // bit 6
6722 #define SLRCONC7 SLRCONCbits.SLRCONC7 // bit 7
6724 #define SSPM0 SSP1CONbits.SSPM0 // bit 0
6725 #define SSPM1 SSP1CONbits.SSPM1 // bit 1
6726 #define SSPM2 SSP1CONbits.SSPM2 // bit 2
6727 #define SSPM3 SSP1CONbits.SSPM3 // bit 3
6728 #define CKP SSP1CONbits.CKP // bit 4
6729 #define SSPEN SSP1CONbits.SSPEN // bit 5
6730 #define SSPOV SSP1CONbits.SSPOV // bit 6
6731 #define WCOL SSP1CONbits.WCOL // bit 7
6733 #define SEN SSP1CON2bits.SEN // bit 0
6734 #define RSEN SSP1CON2bits.RSEN // bit 1
6735 #define PEN SSP1CON2bits.PEN // bit 2
6736 #define RCEN SSP1CON2bits.RCEN // bit 3
6737 #define ACKEN SSP1CON2bits.ACKEN // bit 4
6738 #define ACKDT SSP1CON2bits.ACKDT // bit 5
6739 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
6740 #define GCEN SSP1CON2bits.GCEN // bit 7
6742 #define DHEN SSP1CON3bits.DHEN // bit 0
6743 #define AHEN SSP1CON3bits.AHEN // bit 1
6744 #define SBCDE SSP1CON3bits.SBCDE // bit 2
6745 #define SDAHT SSP1CON3bits.SDAHT // bit 3
6746 #define BOEN SSP1CON3bits.BOEN // bit 4
6747 #define SCIE SSP1CON3bits.SCIE // bit 5
6748 #define PCIE SSP1CON3bits.PCIE // bit 6
6749 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
6751 #define BF SSP1STATbits.BF // bit 0
6752 #define UA SSP1STATbits.UA // bit 1
6753 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
6754 #define S SSP1STATbits.S // bit 3
6755 #define P SSP1STATbits.P // bit 4
6756 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
6757 #define CKE SSP1STATbits.CKE // bit 6
6758 #define SMP SSP1STATbits.SMP // bit 7
6760 #define C STATUSbits.C // bit 0
6761 #define DC STATUSbits.DC // bit 1
6762 #define Z STATUSbits.Z // bit 2
6763 #define NOT_PD STATUSbits.NOT_PD // bit 3
6764 #define NOT_TO STATUSbits.NOT_TO // bit 4
6766 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
6767 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
6768 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
6770 #define TMR1ON T1CONbits.TMR1ON // bit 0
6771 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
6772 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
6773 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
6774 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
6775 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
6776 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
6778 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
6779 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
6780 #define T1GVAL T1GCONbits.T1GVAL // bit 2
6781 #define T1GGO T1GCONbits.T1GGO // bit 3
6782 #define T1GSPM T1GCONbits.T1GSPM // bit 4
6783 #define T1GTM T1GCONbits.T1GTM // bit 5
6784 #define T1GPOL T1GCONbits.T1GPOL // bit 6
6785 #define TMR1GE T1GCONbits.TMR1GE // bit 7
6787 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
6788 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
6789 #define TMR2ON T2CONbits.TMR2ON // bit 2
6790 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
6791 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
6792 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
6793 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
6795 #define TRISA0 TRISAbits.TRISA0 // bit 0
6796 #define TRISA1 TRISAbits.TRISA1 // bit 1
6797 #define TRISA2 TRISAbits.TRISA2 // bit 2
6798 #define TRISA3 TRISAbits.TRISA3 // bit 3
6799 #define TRISA4 TRISAbits.TRISA4 // bit 4
6800 #define TRISA5 TRISAbits.TRISA5 // bit 5
6801 #define TRISA6 TRISAbits.TRISA6 // bit 6
6802 #define TRISA7 TRISAbits.TRISA7 // bit 7
6804 #define TRISB0 TRISBbits.TRISB0 // bit 0
6805 #define TRISB1 TRISBbits.TRISB1 // bit 1
6806 #define TRISB2 TRISBbits.TRISB2 // bit 2
6807 #define TRISB3 TRISBbits.TRISB3 // bit 3
6808 #define TRISB4 TRISBbits.TRISB4 // bit 4
6809 #define TRISB5 TRISBbits.TRISB5 // bit 5
6810 #define TRISB6 TRISBbits.TRISB6 // bit 6
6811 #define TRISB7 TRISBbits.TRISB7 // bit 7
6813 #define TRISC0 TRISCbits.TRISC0 // bit 0
6814 #define TRISC1 TRISCbits.TRISC1 // bit 1
6815 #define TRISC2 TRISCbits.TRISC2 // bit 2
6816 #define TRISC3 TRISCbits.TRISC3 // bit 3
6817 #define TRISC4 TRISCbits.TRISC4 // bit 4
6818 #define TRISC5 TRISCbits.TRISC5 // bit 5
6819 #define TRISC6 TRISCbits.TRISC6 // bit 6
6820 #define TRISC7 TRISCbits.TRISC7 // bit 7
6822 #define TRISE3 TRISEbits.TRISE3 // bit 3
6824 #define TX9D TX1STAbits.TX9D // bit 0
6825 #define TRMT TX1STAbits.TRMT // bit 1
6826 #define BRGH TX1STAbits.BRGH // bit 2
6827 #define SENDB TX1STAbits.SENDB // bit 3
6828 #define SYNC TX1STAbits.SYNC // bit 4
6829 #define TXEN TX1STAbits.TXEN // bit 5
6830 #define TX9 TX1STAbits.TX9 // bit 6
6831 #define CSRC TX1STAbits.CSRC // bit 7
6833 #define VREGPM VREGCONbits.VREGPM // bit 1
6835 #define SWDTEN WDTCONbits.SWDTEN // bit 0
6836 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
6837 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
6838 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
6839 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
6840 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
6842 #define WPUA0 WPUAbits.WPUA0 // bit 0
6843 #define WPUA1 WPUAbits.WPUA1 // bit 1
6844 #define WPUA2 WPUAbits.WPUA2 // bit 2
6845 #define WPUA3 WPUAbits.WPUA3 // bit 3
6846 #define WPUA4 WPUAbits.WPUA4 // bit 4
6847 #define WPUA5 WPUAbits.WPUA5 // bit 5
6848 #define WPUA6 WPUAbits.WPUA6 // bit 6
6849 #define WPUA7 WPUAbits.WPUA7 // bit 7
6851 #define WPUB0 WPUBbits.WPUB0 // bit 0
6852 #define WPUB1 WPUBbits.WPUB1 // bit 1
6853 #define WPUB2 WPUBbits.WPUB2 // bit 2
6854 #define WPUB3 WPUBbits.WPUB3 // bit 3
6855 #define WPUB4 WPUBbits.WPUB4 // bit 4
6856 #define WPUB5 WPUBbits.WPUB5 // bit 5
6857 #define WPUB6 WPUBbits.WPUB6 // bit 6
6858 #define WPUB7 WPUBbits.WPUB7 // bit 7
6860 #define WPUC0 WPUCbits.WPUC0 // bit 0
6861 #define WPUC1 WPUCbits.WPUC1 // bit 1
6862 #define WPUC2 WPUCbits.WPUC2 // bit 2
6863 #define WPUC3 WPUCbits.WPUC3 // bit 3
6864 #define WPUC4 WPUCbits.WPUC4 // bit 4
6865 #define WPUC5 WPUCbits.WPUC5 // bit 5
6866 #define WPUC6 WPUCbits.WPUC6 // bit 6
6867 #define WPUC7 WPUCbits.WPUC7 // bit 7
6869 #define WPUE3 WPUEbits.WPUE3 // bit 3
6871 #endif // #ifndef NO_BIT_DEFINES
6873 #endif // #ifndef __PIC16F1783_H__