struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic16 / pic18lf6723.h
blob2d15e0197bd7490a22fd35131c9632304f91c8f6
1 /*
2 * This declarations of the PIC18LF6723 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:24:07 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 __PIC18LF6723_H__
26 #define __PIC18LF6723_H__
28 //==============================================================================
30 //==============================================================================
32 // Register Definitions
34 //==============================================================================
37 //==============================================================================
38 // SSP2CON2 Bits
40 extern __at(0x0F62) __sfr SSP2CON2;
42 typedef union
44 struct
46 unsigned SEN : 1;
47 unsigned RSEN : 1;
48 unsigned PEN : 1;
49 unsigned RCEN : 1;
50 unsigned ACKEN : 1;
51 unsigned ACKDT : 1;
52 unsigned ACKSTAT : 1;
53 unsigned GCEN : 1;
56 struct
58 unsigned SEN2 : 1;
59 unsigned RSEN2 : 1;
60 unsigned PEN2 : 1;
61 unsigned RCEN2 : 1;
62 unsigned ACKEN2 : 1;
63 unsigned ACKDT2 : 1;
64 unsigned ACKSTAT2 : 1;
65 unsigned GCEN2 : 1;
67 } __SSP2CON2bits_t;
69 extern __at(0x0F62) volatile __SSP2CON2bits_t SSP2CON2bits;
71 #define _SSP2CON2_SEN 0x01
72 #define _SSP2CON2_SEN2 0x01
73 #define _SSP2CON2_RSEN 0x02
74 #define _SSP2CON2_RSEN2 0x02
75 #define _SSP2CON2_PEN 0x04
76 #define _SSP2CON2_PEN2 0x04
77 #define _SSP2CON2_RCEN 0x08
78 #define _SSP2CON2_RCEN2 0x08
79 #define _SSP2CON2_ACKEN 0x10
80 #define _SSP2CON2_ACKEN2 0x10
81 #define _SSP2CON2_ACKDT 0x20
82 #define _SSP2CON2_ACKDT2 0x20
83 #define _SSP2CON2_ACKSTAT 0x40
84 #define _SSP2CON2_ACKSTAT2 0x40
85 #define _SSP2CON2_GCEN 0x80
86 #define _SSP2CON2_GCEN2 0x80
88 //==============================================================================
91 //==============================================================================
92 // SSP2CON1 Bits
94 extern __at(0x0F63) __sfr SSP2CON1;
96 typedef union
98 struct
100 unsigned SSPM0 : 1;
101 unsigned SSPM1 : 1;
102 unsigned SSPM2 : 1;
103 unsigned SSPM3 : 1;
104 unsigned CKP : 1;
105 unsigned SSPEN : 1;
106 unsigned SSPOV : 1;
107 unsigned WCOL : 1;
110 struct
112 unsigned SSPM02 : 1;
113 unsigned SSPM12 : 1;
114 unsigned SSPM22 : 1;
115 unsigned SSPM32 : 1;
116 unsigned CKP2 : 1;
117 unsigned SSPEN2 : 1;
118 unsigned SSPOV2 : 1;
119 unsigned WCOL2 : 1;
121 } __SSP2CON1bits_t;
123 extern __at(0x0F63) volatile __SSP2CON1bits_t SSP2CON1bits;
125 #define _SSP2CON1_SSPM0 0x01
126 #define _SSP2CON1_SSPM02 0x01
127 #define _SSP2CON1_SSPM1 0x02
128 #define _SSP2CON1_SSPM12 0x02
129 #define _SSP2CON1_SSPM2 0x04
130 #define _SSP2CON1_SSPM22 0x04
131 #define _SSP2CON1_SSPM3 0x08
132 #define _SSP2CON1_SSPM32 0x08
133 #define _SSP2CON1_CKP 0x10
134 #define _SSP2CON1_CKP2 0x10
135 #define _SSP2CON1_SSPEN 0x20
136 #define _SSP2CON1_SSPEN2 0x20
137 #define _SSP2CON1_SSPOV 0x40
138 #define _SSP2CON1_SSPOV2 0x40
139 #define _SSP2CON1_WCOL 0x80
140 #define _SSP2CON1_WCOL2 0x80
142 //==============================================================================
145 //==============================================================================
146 // SSP2STAT Bits
148 extern __at(0x0F64) __sfr SSP2STAT;
150 typedef union
152 struct
154 unsigned BF : 1;
155 unsigned UA : 1;
156 unsigned R_NOT_W : 1;
157 unsigned S : 1;
158 unsigned P : 1;
159 unsigned D_NOT_A : 1;
160 unsigned CKE : 1;
161 unsigned SMP : 1;
164 struct
166 unsigned BF2 : 1;
167 unsigned UA2 : 1;
168 unsigned R_W : 1;
169 unsigned I2C_START : 1;
170 unsigned I2C_STOP : 1;
171 unsigned D_A : 1;
172 unsigned CKE2 : 1;
173 unsigned SMP2 : 1;
176 struct
178 unsigned : 1;
179 unsigned : 1;
180 unsigned I2C_READ : 1;
181 unsigned START2 : 1;
182 unsigned STOP2 : 1;
183 unsigned I2C_DAT : 1;
184 unsigned : 1;
185 unsigned : 1;
188 struct
190 unsigned : 1;
191 unsigned : 1;
192 unsigned NOT_W : 1;
193 unsigned : 1;
194 unsigned : 1;
195 unsigned NOT_A : 1;
196 unsigned : 1;
197 unsigned : 1;
200 struct
202 unsigned : 1;
203 unsigned : 1;
204 unsigned NOT_WRITE : 1;
205 unsigned : 1;
206 unsigned : 1;
207 unsigned NOT_ADDRESS : 1;
208 unsigned : 1;
209 unsigned : 1;
212 struct
214 unsigned : 1;
215 unsigned : 1;
216 unsigned READ_WRITE : 1;
217 unsigned : 1;
218 unsigned : 1;
219 unsigned DATA_ADDRESS : 1;
220 unsigned : 1;
221 unsigned : 1;
224 struct
226 unsigned : 1;
227 unsigned : 1;
228 unsigned R : 1;
229 unsigned : 1;
230 unsigned : 1;
231 unsigned D : 1;
232 unsigned : 1;
233 unsigned : 1;
236 struct
238 unsigned : 1;
239 unsigned : 1;
240 unsigned RW2 : 1;
241 unsigned : 1;
242 unsigned : 1;
243 unsigned DA2 : 1;
244 unsigned : 1;
245 unsigned : 1;
247 } __SSP2STATbits_t;
249 extern __at(0x0F64) volatile __SSP2STATbits_t SSP2STATbits;
251 #define _SSP2STAT_BF 0x01
252 #define _SSP2STAT_BF2 0x01
253 #define _SSP2STAT_UA 0x02
254 #define _SSP2STAT_UA2 0x02
255 #define _SSP2STAT_R_NOT_W 0x04
256 #define _SSP2STAT_R_W 0x04
257 #define _SSP2STAT_I2C_READ 0x04
258 #define _SSP2STAT_NOT_W 0x04
259 #define _SSP2STAT_NOT_WRITE 0x04
260 #define _SSP2STAT_READ_WRITE 0x04
261 #define _SSP2STAT_R 0x04
262 #define _SSP2STAT_RW2 0x04
263 #define _SSP2STAT_S 0x08
264 #define _SSP2STAT_I2C_START 0x08
265 #define _SSP2STAT_START2 0x08
266 #define _SSP2STAT_P 0x10
267 #define _SSP2STAT_I2C_STOP 0x10
268 #define _SSP2STAT_STOP2 0x10
269 #define _SSP2STAT_D_NOT_A 0x20
270 #define _SSP2STAT_D_A 0x20
271 #define _SSP2STAT_I2C_DAT 0x20
272 #define _SSP2STAT_NOT_A 0x20
273 #define _SSP2STAT_NOT_ADDRESS 0x20
274 #define _SSP2STAT_DATA_ADDRESS 0x20
275 #define _SSP2STAT_D 0x20
276 #define _SSP2STAT_DA2 0x20
277 #define _SSP2STAT_CKE 0x40
278 #define _SSP2STAT_CKE2 0x40
279 #define _SSP2STAT_SMP 0x80
280 #define _SSP2STAT_SMP2 0x80
282 //==============================================================================
284 extern __at(0x0F65) __sfr SSP2ADD;
285 extern __at(0x0F66) __sfr SSP2BUF;
287 //==============================================================================
288 // ECCP2DEL Bits
290 extern __at(0x0F67) __sfr ECCP2DEL;
292 typedef union
294 struct
296 unsigned P2DC0 : 1;
297 unsigned P2DC1 : 1;
298 unsigned P2DC2 : 1;
299 unsigned P2DC3 : 1;
300 unsigned P2DC4 : 1;
301 unsigned P2DC5 : 1;
302 unsigned P2DC6 : 1;
303 unsigned P2RSEN : 1;
306 struct
308 unsigned PDC0 : 1;
309 unsigned PDC1 : 1;
310 unsigned PDC2 : 1;
311 unsigned PDC3 : 1;
312 unsigned PDC4 : 1;
313 unsigned PDC5 : 1;
314 unsigned PDC6 : 1;
315 unsigned PRSEN : 1;
318 struct
320 unsigned P2DC : 7;
321 unsigned : 1;
324 struct
326 unsigned PDC : 7;
327 unsigned : 1;
329 } __ECCP2DELbits_t;
331 extern __at(0x0F67) volatile __ECCP2DELbits_t ECCP2DELbits;
333 #define _ECCP2DEL_P2DC0 0x01
334 #define _ECCP2DEL_PDC0 0x01
335 #define _ECCP2DEL_P2DC1 0x02
336 #define _ECCP2DEL_PDC1 0x02
337 #define _ECCP2DEL_P2DC2 0x04
338 #define _ECCP2DEL_PDC2 0x04
339 #define _ECCP2DEL_P2DC3 0x08
340 #define _ECCP2DEL_PDC3 0x08
341 #define _ECCP2DEL_P2DC4 0x10
342 #define _ECCP2DEL_PDC4 0x10
343 #define _ECCP2DEL_P2DC5 0x20
344 #define _ECCP2DEL_PDC5 0x20
345 #define _ECCP2DEL_P2DC6 0x40
346 #define _ECCP2DEL_PDC6 0x40
347 #define _ECCP2DEL_P2RSEN 0x80
348 #define _ECCP2DEL_PRSEN 0x80
350 //==============================================================================
353 //==============================================================================
354 // ECCP2AS Bits
356 extern __at(0x0F68) __sfr ECCP2AS;
358 typedef union
360 struct
362 unsigned PSS2BD0 : 1;
363 unsigned PSS2BD1 : 1;
364 unsigned PSS2AC0 : 1;
365 unsigned PSS2AC1 : 1;
366 unsigned ECCP2AS0 : 1;
367 unsigned ECCP2AS1 : 1;
368 unsigned ECCP2AS2 : 1;
369 unsigned ECCP2ASE : 1;
372 struct
374 unsigned PSSBD0 : 1;
375 unsigned PSSBD1 : 1;
376 unsigned PSSAC0 : 1;
377 unsigned PSSAC1 : 1;
378 unsigned ECCPAS0 : 1;
379 unsigned ECCPAS1 : 1;
380 unsigned ECCPAS2 : 1;
381 unsigned ECCPASE : 1;
384 struct
386 unsigned PSS2BD : 2;
387 unsigned : 6;
390 struct
392 unsigned PSSBD : 2;
393 unsigned : 6;
396 struct
398 unsigned : 2;
399 unsigned PSSAC : 2;
400 unsigned : 4;
403 struct
405 unsigned : 2;
406 unsigned PSS2AC : 2;
407 unsigned : 4;
410 struct
412 unsigned : 4;
413 unsigned ECCP2AS : 3;
414 unsigned : 1;
417 struct
419 unsigned : 4;
420 unsigned ECCPAS : 3;
421 unsigned : 1;
423 } __ECCP2ASbits_t;
425 extern __at(0x0F68) volatile __ECCP2ASbits_t ECCP2ASbits;
427 #define _ECCP2AS_PSS2BD0 0x01
428 #define _ECCP2AS_PSSBD0 0x01
429 #define _ECCP2AS_PSS2BD1 0x02
430 #define _ECCP2AS_PSSBD1 0x02
431 #define _ECCP2AS_PSS2AC0 0x04
432 #define _ECCP2AS_PSSAC0 0x04
433 #define _ECCP2AS_PSS2AC1 0x08
434 #define _ECCP2AS_PSSAC1 0x08
435 #define _ECCP2AS_ECCP2AS0 0x10
436 #define _ECCP2AS_ECCPAS0 0x10
437 #define _ECCP2AS_ECCP2AS1 0x20
438 #define _ECCP2AS_ECCPAS1 0x20
439 #define _ECCP2AS_ECCP2AS2 0x40
440 #define _ECCP2AS_ECCPAS2 0x40
441 #define _ECCP2AS_ECCP2ASE 0x80
442 #define _ECCP2AS_ECCPASE 0x80
444 //==============================================================================
447 //==============================================================================
448 // ECCP3DEL Bits
450 extern __at(0x0F69) __sfr ECCP3DEL;
452 typedef union
454 struct
456 unsigned P3DC0 : 1;
457 unsigned P3DC1 : 1;
458 unsigned P3DC2 : 1;
459 unsigned P3DC3 : 1;
460 unsigned P3DC4 : 1;
461 unsigned P3DC5 : 1;
462 unsigned P3DC6 : 1;
463 unsigned P3RSEN : 1;
466 struct
468 unsigned PDC0 : 1;
469 unsigned PDC1 : 1;
470 unsigned PDC2 : 1;
471 unsigned PDC3 : 1;
472 unsigned PDC4 : 1;
473 unsigned PDC5 : 1;
474 unsigned PDC6 : 1;
475 unsigned PRSEN : 1;
478 struct
480 unsigned P3DC : 7;
481 unsigned : 1;
484 struct
486 unsigned PDC : 7;
487 unsigned : 1;
489 } __ECCP3DELbits_t;
491 extern __at(0x0F69) volatile __ECCP3DELbits_t ECCP3DELbits;
493 #define _ECCP3DEL_P3DC0 0x01
494 #define _ECCP3DEL_PDC0 0x01
495 #define _ECCP3DEL_P3DC1 0x02
496 #define _ECCP3DEL_PDC1 0x02
497 #define _ECCP3DEL_P3DC2 0x04
498 #define _ECCP3DEL_PDC2 0x04
499 #define _ECCP3DEL_P3DC3 0x08
500 #define _ECCP3DEL_PDC3 0x08
501 #define _ECCP3DEL_P3DC4 0x10
502 #define _ECCP3DEL_PDC4 0x10
503 #define _ECCP3DEL_P3DC5 0x20
504 #define _ECCP3DEL_PDC5 0x20
505 #define _ECCP3DEL_P3DC6 0x40
506 #define _ECCP3DEL_PDC6 0x40
507 #define _ECCP3DEL_P3RSEN 0x80
508 #define _ECCP3DEL_PRSEN 0x80
510 //==============================================================================
513 //==============================================================================
514 // ECCP3AS Bits
516 extern __at(0x0F6A) __sfr ECCP3AS;
518 typedef union
520 struct
522 unsigned PSS3BD0 : 1;
523 unsigned PSS3BD1 : 1;
524 unsigned PSS3AC0 : 1;
525 unsigned PSS3AC1 : 1;
526 unsigned ECCP3AS0 : 1;
527 unsigned ECCP3AS1 : 1;
528 unsigned ECCP3AS2 : 1;
529 unsigned ECCP3ASE : 1;
532 struct
534 unsigned PSSBD0 : 1;
535 unsigned PSSBD1 : 1;
536 unsigned PSSAC0 : 1;
537 unsigned PSSAC1 : 1;
538 unsigned ECCPAS0 : 1;
539 unsigned ECCPAS1 : 1;
540 unsigned ECCPAS2 : 1;
541 unsigned ECCPASE : 1;
544 struct
546 unsigned PSS3BD : 2;
547 unsigned : 6;
550 struct
552 unsigned PSSBD : 2;
553 unsigned : 6;
556 struct
558 unsigned : 2;
559 unsigned PSS3AC : 2;
560 unsigned : 4;
563 struct
565 unsigned : 2;
566 unsigned PSSAC : 2;
567 unsigned : 4;
570 struct
572 unsigned : 4;
573 unsigned ECCPAS : 3;
574 unsigned : 1;
577 struct
579 unsigned : 4;
580 unsigned ECCP3AS : 3;
581 unsigned : 1;
583 } __ECCP3ASbits_t;
585 extern __at(0x0F6A) volatile __ECCP3ASbits_t ECCP3ASbits;
587 #define _ECCP3AS_PSS3BD0 0x01
588 #define _ECCP3AS_PSSBD0 0x01
589 #define _ECCP3AS_PSS3BD1 0x02
590 #define _ECCP3AS_PSSBD1 0x02
591 #define _ECCP3AS_PSS3AC0 0x04
592 #define _ECCP3AS_PSSAC0 0x04
593 #define _ECCP3AS_PSS3AC1 0x08
594 #define _ECCP3AS_PSSAC1 0x08
595 #define _ECCP3AS_ECCP3AS0 0x10
596 #define _ECCP3AS_ECCPAS0 0x10
597 #define _ECCP3AS_ECCP3AS1 0x20
598 #define _ECCP3AS_ECCPAS1 0x20
599 #define _ECCP3AS_ECCP3AS2 0x40
600 #define _ECCP3AS_ECCPAS2 0x40
601 #define _ECCP3AS_ECCP3ASE 0x80
602 #define _ECCP3AS_ECCPASE 0x80
604 //==============================================================================
607 //==============================================================================
608 // RCSTA2 Bits
610 extern __at(0x0F6B) __sfr RCSTA2;
612 typedef union
614 struct
616 unsigned RX9D : 1;
617 unsigned OERR : 1;
618 unsigned FERR : 1;
619 unsigned ADDEN : 1;
620 unsigned CREN : 1;
621 unsigned SREN : 1;
622 unsigned RX9 : 1;
623 unsigned SPEN : 1;
626 struct
628 unsigned RCD8 : 1;
629 unsigned OERR2 : 1;
630 unsigned FERR2 : 1;
631 unsigned ADDEN2 : 1;
632 unsigned CREN2 : 1;
633 unsigned SREN2 : 1;
634 unsigned RC9 : 1;
635 unsigned SPEN2 : 1;
638 struct
640 unsigned RX9D2 : 1;
641 unsigned : 1;
642 unsigned : 1;
643 unsigned : 1;
644 unsigned : 1;
645 unsigned : 1;
646 unsigned NOT_RC8 : 1;
647 unsigned : 1;
650 struct
652 unsigned : 1;
653 unsigned : 1;
654 unsigned : 1;
655 unsigned : 1;
656 unsigned : 1;
657 unsigned : 1;
658 unsigned RC8_9 : 1;
659 unsigned : 1;
662 struct
664 unsigned : 1;
665 unsigned : 1;
666 unsigned : 1;
667 unsigned : 1;
668 unsigned : 1;
669 unsigned : 1;
670 unsigned RX92 : 1;
671 unsigned : 1;
673 } __RCSTA2bits_t;
675 extern __at(0x0F6B) volatile __RCSTA2bits_t RCSTA2bits;
677 #define _RCSTA2_RX9D 0x01
678 #define _RCSTA2_RCD8 0x01
679 #define _RCSTA2_RX9D2 0x01
680 #define _RCSTA2_OERR 0x02
681 #define _RCSTA2_OERR2 0x02
682 #define _RCSTA2_FERR 0x04
683 #define _RCSTA2_FERR2 0x04
684 #define _RCSTA2_ADDEN 0x08
685 #define _RCSTA2_ADDEN2 0x08
686 #define _RCSTA2_CREN 0x10
687 #define _RCSTA2_CREN2 0x10
688 #define _RCSTA2_SREN 0x20
689 #define _RCSTA2_SREN2 0x20
690 #define _RCSTA2_RX9 0x40
691 #define _RCSTA2_RC9 0x40
692 #define _RCSTA2_NOT_RC8 0x40
693 #define _RCSTA2_RC8_9 0x40
694 #define _RCSTA2_RX92 0x40
695 #define _RCSTA2_SPEN 0x80
696 #define _RCSTA2_SPEN2 0x80
698 //==============================================================================
701 //==============================================================================
702 // TXSTA2 Bits
704 extern __at(0x0F6C) __sfr TXSTA2;
706 typedef union
708 struct
710 unsigned TX9D : 1;
711 unsigned TRMT : 1;
712 unsigned BRGH : 1;
713 unsigned SENDB : 1;
714 unsigned SYNC : 1;
715 unsigned TXEN : 1;
716 unsigned TX9 : 1;
717 unsigned CSRC : 1;
720 struct
722 unsigned TXD8 : 1;
723 unsigned TRMT2 : 1;
724 unsigned BRGH2 : 1;
725 unsigned SENDB2 : 1;
726 unsigned SYNC2 : 1;
727 unsigned TXEN2 : 1;
728 unsigned TX8_9 : 1;
729 unsigned CSRC2 : 1;
732 struct
734 unsigned TX9D2 : 1;
735 unsigned : 1;
736 unsigned : 1;
737 unsigned : 1;
738 unsigned : 1;
739 unsigned : 1;
740 unsigned NOT_TX8 : 1;
741 unsigned : 1;
744 struct
746 unsigned : 1;
747 unsigned : 1;
748 unsigned : 1;
749 unsigned : 1;
750 unsigned : 1;
751 unsigned : 1;
752 unsigned TX92 : 1;
753 unsigned : 1;
755 } __TXSTA2bits_t;
757 extern __at(0x0F6C) volatile __TXSTA2bits_t TXSTA2bits;
759 #define _TXSTA2_TX9D 0x01
760 #define _TXSTA2_TXD8 0x01
761 #define _TXSTA2_TX9D2 0x01
762 #define _TXSTA2_TRMT 0x02
763 #define _TXSTA2_TRMT2 0x02
764 #define _TXSTA2_BRGH 0x04
765 #define _TXSTA2_BRGH2 0x04
766 #define _TXSTA2_SENDB 0x08
767 #define _TXSTA2_SENDB2 0x08
768 #define _TXSTA2_SYNC 0x10
769 #define _TXSTA2_SYNC2 0x10
770 #define _TXSTA2_TXEN 0x20
771 #define _TXSTA2_TXEN2 0x20
772 #define _TXSTA2_TX9 0x40
773 #define _TXSTA2_TX8_9 0x40
774 #define _TXSTA2_NOT_TX8 0x40
775 #define _TXSTA2_TX92 0x40
776 #define _TXSTA2_CSRC 0x80
777 #define _TXSTA2_CSRC2 0x80
779 //==============================================================================
781 extern __at(0x0F6D) __sfr TXREG2;
782 extern __at(0x0F6E) __sfr RCREG2;
783 extern __at(0x0F6F) __sfr SPBRG2;
785 //==============================================================================
786 // CCP5CON Bits
788 extern __at(0x0F70) __sfr CCP5CON;
790 typedef union
792 struct
794 unsigned CCP5M0 : 1;
795 unsigned CCP5M1 : 1;
796 unsigned CCP5M2 : 1;
797 unsigned CCP5M3 : 1;
798 unsigned DCCP5Y : 1;
799 unsigned DCCP5X : 1;
800 unsigned : 1;
801 unsigned : 1;
804 struct
806 unsigned : 1;
807 unsigned : 1;
808 unsigned : 1;
809 unsigned : 1;
810 unsigned DC5B0 : 1;
811 unsigned DC5B1 : 1;
812 unsigned : 1;
813 unsigned : 1;
816 struct
818 unsigned CCP5M : 4;
819 unsigned : 4;
822 struct
824 unsigned : 4;
825 unsigned DC5B : 2;
826 unsigned : 2;
828 } __CCP5CONbits_t;
830 extern __at(0x0F70) volatile __CCP5CONbits_t CCP5CONbits;
832 #define _CCP5M0 0x01
833 #define _CCP5M1 0x02
834 #define _CCP5M2 0x04
835 #define _CCP5M3 0x08
836 #define _DCCP5Y 0x10
837 #define _DC5B0 0x10
838 #define _DCCP5X 0x20
839 #define _DC5B1 0x20
841 //==============================================================================
843 extern __at(0x0F71) __sfr CCPR5;
844 extern __at(0x0F71) __sfr CCPR5L;
845 extern __at(0x0F72) __sfr CCPR5H;
847 //==============================================================================
848 // CCP4CON Bits
850 extern __at(0x0F73) __sfr CCP4CON;
852 typedef union
854 struct
856 unsigned CCP4M0 : 1;
857 unsigned CCP4M1 : 1;
858 unsigned CCP4M2 : 1;
859 unsigned CCP4M3 : 1;
860 unsigned DCCP4Y : 1;
861 unsigned DCCP4X : 1;
862 unsigned : 1;
863 unsigned : 1;
866 struct
868 unsigned : 1;
869 unsigned : 1;
870 unsigned : 1;
871 unsigned : 1;
872 unsigned DC4B0 : 1;
873 unsigned DC4B1 : 1;
874 unsigned : 1;
875 unsigned : 1;
878 struct
880 unsigned CCP4M : 4;
881 unsigned : 4;
884 struct
886 unsigned : 4;
887 unsigned DC4B : 2;
888 unsigned : 2;
890 } __CCP4CONbits_t;
892 extern __at(0x0F73) volatile __CCP4CONbits_t CCP4CONbits;
894 #define _CCP4M0 0x01
895 #define _CCP4M1 0x02
896 #define _CCP4M2 0x04
897 #define _CCP4M3 0x08
898 #define _DCCP4Y 0x10
899 #define _DC4B0 0x10
900 #define _DCCP4X 0x20
901 #define _DC4B1 0x20
903 //==============================================================================
905 extern __at(0x0F74) __sfr CCPR4;
906 extern __at(0x0F74) __sfr CCPR4L;
907 extern __at(0x0F75) __sfr CCPR4H;
909 //==============================================================================
910 // T4CON Bits
912 extern __at(0x0F76) __sfr T4CON;
914 typedef union
916 struct
918 unsigned T4CKPS0 : 1;
919 unsigned T4CKPS1 : 1;
920 unsigned TMR4ON : 1;
921 unsigned T4OUTPS0 : 1;
922 unsigned T4OUTPS1 : 1;
923 unsigned T4OUTPS2 : 1;
924 unsigned T4OUTPS3 : 1;
925 unsigned : 1;
928 struct
930 unsigned T4CKPS : 2;
931 unsigned : 6;
934 struct
936 unsigned : 3;
937 unsigned T4OUTPS : 4;
938 unsigned : 1;
940 } __T4CONbits_t;
942 extern __at(0x0F76) volatile __T4CONbits_t T4CONbits;
944 #define _T4CKPS0 0x01
945 #define _T4CKPS1 0x02
946 #define _TMR4ON 0x04
947 #define _T4OUTPS0 0x08
948 #define _T4OUTPS1 0x10
949 #define _T4OUTPS2 0x20
950 #define _T4OUTPS3 0x40
952 //==============================================================================
954 extern __at(0x0F77) __sfr PR4;
955 extern __at(0x0F78) __sfr TMR4;
957 //==============================================================================
958 // ECCP1DEL Bits
960 extern __at(0x0F79) __sfr ECCP1DEL;
962 typedef union
964 struct
966 unsigned P1DC0 : 1;
967 unsigned P1DC1 : 1;
968 unsigned P1DC2 : 1;
969 unsigned P1DC3 : 1;
970 unsigned P1DC4 : 1;
971 unsigned P1DC5 : 1;
972 unsigned P1DC6 : 1;
973 unsigned P1RSEN : 1;
976 struct
978 unsigned PDC0 : 1;
979 unsigned PDC1 : 1;
980 unsigned PDC2 : 1;
981 unsigned PDC3 : 1;
982 unsigned PDC4 : 1;
983 unsigned PDC5 : 1;
984 unsigned PDC6 : 1;
985 unsigned PRSEN : 1;
988 struct
990 unsigned P1DC : 7;
991 unsigned : 1;
994 struct
996 unsigned PDC : 7;
997 unsigned : 1;
999 } __ECCP1DELbits_t;
1001 extern __at(0x0F79) volatile __ECCP1DELbits_t ECCP1DELbits;
1003 #define _P1DC0 0x01
1004 #define _PDC0 0x01
1005 #define _P1DC1 0x02
1006 #define _PDC1 0x02
1007 #define _P1DC2 0x04
1008 #define _PDC2 0x04
1009 #define _P1DC3 0x08
1010 #define _PDC3 0x08
1011 #define _P1DC4 0x10
1012 #define _PDC4 0x10
1013 #define _P1DC5 0x20
1014 #define _PDC5 0x20
1015 #define _P1DC6 0x40
1016 #define _PDC6 0x40
1017 #define _P1RSEN 0x80
1018 #define _PRSEN 0x80
1020 //==============================================================================
1023 //==============================================================================
1024 // BAUDCON2 Bits
1026 extern __at(0x0F7C) __sfr BAUDCON2;
1028 typedef union
1030 struct
1032 unsigned ABDEN : 1;
1033 unsigned WUE : 1;
1034 unsigned : 1;
1035 unsigned BRG16 : 1;
1036 unsigned SCKP : 1;
1037 unsigned : 1;
1038 unsigned RCIDL : 1;
1039 unsigned ABDOVF : 1;
1042 struct
1044 unsigned ABDEN2 : 1;
1045 unsigned WUE2 : 1;
1046 unsigned : 1;
1047 unsigned BRG162 : 1;
1048 unsigned SCKP2 : 1;
1049 unsigned : 1;
1050 unsigned RCMT : 1;
1051 unsigned ABDOVF2 : 1;
1054 struct
1056 unsigned : 1;
1057 unsigned : 1;
1058 unsigned : 1;
1059 unsigned : 1;
1060 unsigned : 1;
1061 unsigned : 1;
1062 unsigned RCIDL2 : 1;
1063 unsigned : 1;
1065 } __BAUDCON2bits_t;
1067 extern __at(0x0F7C) volatile __BAUDCON2bits_t BAUDCON2bits;
1069 #define _BAUDCON2_ABDEN 0x01
1070 #define _BAUDCON2_ABDEN2 0x01
1071 #define _BAUDCON2_WUE 0x02
1072 #define _BAUDCON2_WUE2 0x02
1073 #define _BAUDCON2_BRG16 0x08
1074 #define _BAUDCON2_BRG162 0x08
1075 #define _BAUDCON2_SCKP 0x10
1076 #define _BAUDCON2_SCKP2 0x10
1077 #define _BAUDCON2_RCIDL 0x40
1078 #define _BAUDCON2_RCMT 0x40
1079 #define _BAUDCON2_RCIDL2 0x40
1080 #define _BAUDCON2_ABDOVF 0x80
1081 #define _BAUDCON2_ABDOVF2 0x80
1083 //==============================================================================
1085 extern __at(0x0F7D) __sfr SPBRGH2;
1087 //==============================================================================
1088 // BAUDCON Bits
1090 extern __at(0x0F7E) __sfr BAUDCON;
1092 typedef union
1094 struct
1096 unsigned ABDEN : 1;
1097 unsigned WUE : 1;
1098 unsigned : 1;
1099 unsigned BRG16 : 1;
1100 unsigned SCKP : 1;
1101 unsigned : 1;
1102 unsigned RCIDL : 1;
1103 unsigned ABDOVF : 1;
1106 struct
1108 unsigned ABDEN1 : 1;
1109 unsigned WUE1 : 1;
1110 unsigned : 1;
1111 unsigned BRG161 : 1;
1112 unsigned SCKP1 : 1;
1113 unsigned : 1;
1114 unsigned RCMT : 1;
1115 unsigned ABDOVF1 : 1;
1118 struct
1120 unsigned : 1;
1121 unsigned : 1;
1122 unsigned : 1;
1123 unsigned : 1;
1124 unsigned : 1;
1125 unsigned : 1;
1126 unsigned RCIDL1 : 1;
1127 unsigned : 1;
1129 } __BAUDCONbits_t;
1131 extern __at(0x0F7E) volatile __BAUDCONbits_t BAUDCONbits;
1133 #define _ABDEN 0x01
1134 #define _ABDEN1 0x01
1135 #define _WUE 0x02
1136 #define _WUE1 0x02
1137 #define _BRG16 0x08
1138 #define _BRG161 0x08
1139 #define _SCKP 0x10
1140 #define _SCKP1 0x10
1141 #define _RCIDL 0x40
1142 #define _RCMT 0x40
1143 #define _RCIDL1 0x40
1144 #define _ABDOVF 0x80
1145 #define _ABDOVF1 0x80
1147 //==============================================================================
1150 //==============================================================================
1151 // BAUDCON1 Bits
1153 extern __at(0x0F7E) __sfr BAUDCON1;
1155 typedef union
1157 struct
1159 unsigned ABDEN : 1;
1160 unsigned WUE : 1;
1161 unsigned : 1;
1162 unsigned BRG16 : 1;
1163 unsigned SCKP : 1;
1164 unsigned : 1;
1165 unsigned RCIDL : 1;
1166 unsigned ABDOVF : 1;
1169 struct
1171 unsigned ABDEN1 : 1;
1172 unsigned WUE1 : 1;
1173 unsigned : 1;
1174 unsigned BRG161 : 1;
1175 unsigned SCKP1 : 1;
1176 unsigned : 1;
1177 unsigned RCMT : 1;
1178 unsigned ABDOVF1 : 1;
1181 struct
1183 unsigned : 1;
1184 unsigned : 1;
1185 unsigned : 1;
1186 unsigned : 1;
1187 unsigned : 1;
1188 unsigned : 1;
1189 unsigned RCIDL1 : 1;
1190 unsigned : 1;
1192 } __BAUDCON1bits_t;
1194 extern __at(0x0F7E) volatile __BAUDCON1bits_t BAUDCON1bits;
1196 #define _BAUDCON1_ABDEN 0x01
1197 #define _BAUDCON1_ABDEN1 0x01
1198 #define _BAUDCON1_WUE 0x02
1199 #define _BAUDCON1_WUE1 0x02
1200 #define _BAUDCON1_BRG16 0x08
1201 #define _BAUDCON1_BRG161 0x08
1202 #define _BAUDCON1_SCKP 0x10
1203 #define _BAUDCON1_SCKP1 0x10
1204 #define _BAUDCON1_RCIDL 0x40
1205 #define _BAUDCON1_RCMT 0x40
1206 #define _BAUDCON1_RCIDL1 0x40
1207 #define _BAUDCON1_ABDOVF 0x80
1208 #define _BAUDCON1_ABDOVF1 0x80
1210 //==============================================================================
1212 extern __at(0x0F7F) __sfr SPBRGH;
1213 extern __at(0x0F7F) __sfr SPBRGH1;
1215 //==============================================================================
1216 // PORTA Bits
1218 extern __at(0x0F80) __sfr PORTA;
1220 typedef union
1222 struct
1224 unsigned RA0 : 1;
1225 unsigned RA1 : 1;
1226 unsigned RA2 : 1;
1227 unsigned RA3 : 1;
1228 unsigned RA4 : 1;
1229 unsigned RA5 : 1;
1230 unsigned RA6 : 1;
1231 unsigned RA7 : 1;
1234 struct
1236 unsigned AN0 : 1;
1237 unsigned AN1 : 1;
1238 unsigned VREFM : 1;
1239 unsigned VREFP : 1;
1240 unsigned T0CKI : 1;
1241 unsigned LVDIN : 1;
1242 unsigned : 1;
1243 unsigned : 1;
1246 struct
1248 unsigned : 1;
1249 unsigned : 1;
1250 unsigned AN2 : 1;
1251 unsigned AN3 : 1;
1252 unsigned : 1;
1253 unsigned AN4 : 1;
1254 unsigned : 1;
1255 unsigned : 1;
1258 struct
1260 unsigned : 1;
1261 unsigned : 1;
1262 unsigned : 1;
1263 unsigned : 1;
1264 unsigned : 1;
1265 unsigned HLVDIN : 1;
1266 unsigned : 1;
1267 unsigned : 1;
1269 } __PORTAbits_t;
1271 extern __at(0x0F80) volatile __PORTAbits_t PORTAbits;
1273 #define _PORTA_RA0 0x01
1274 #define _PORTA_AN0 0x01
1275 #define _PORTA_RA1 0x02
1276 #define _PORTA_AN1 0x02
1277 #define _PORTA_RA2 0x04
1278 #define _PORTA_VREFM 0x04
1279 #define _PORTA_AN2 0x04
1280 #define _PORTA_RA3 0x08
1281 #define _PORTA_VREFP 0x08
1282 #define _PORTA_AN3 0x08
1283 #define _PORTA_RA4 0x10
1284 #define _PORTA_T0CKI 0x10
1285 #define _PORTA_RA5 0x20
1286 #define _PORTA_LVDIN 0x20
1287 #define _PORTA_AN4 0x20
1288 #define _PORTA_HLVDIN 0x20
1289 #define _PORTA_RA6 0x40
1290 #define _PORTA_RA7 0x80
1292 //==============================================================================
1295 //==============================================================================
1296 // PORTB Bits
1298 extern __at(0x0F81) __sfr PORTB;
1300 typedef union
1302 struct
1304 unsigned RB0 : 1;
1305 unsigned RB1 : 1;
1306 unsigned RB2 : 1;
1307 unsigned RB3 : 1;
1308 unsigned RB4 : 1;
1309 unsigned RB5 : 1;
1310 unsigned RB6 : 1;
1311 unsigned RB7 : 1;
1314 struct
1316 unsigned INT0 : 1;
1317 unsigned INT1 : 1;
1318 unsigned INT2 : 1;
1319 unsigned INT3 : 1;
1320 unsigned KBI0 : 1;
1321 unsigned KBI1 : 1;
1322 unsigned KBI2 : 1;
1323 unsigned KBI3 : 1;
1326 struct
1328 unsigned FLT0 : 1;
1329 unsigned : 1;
1330 unsigned : 1;
1331 unsigned : 1;
1332 unsigned : 1;
1333 unsigned : 1;
1334 unsigned : 1;
1335 unsigned : 1;
1338 struct
1340 unsigned INT : 4;
1341 unsigned : 4;
1344 struct
1346 unsigned : 4;
1347 unsigned KBI : 4;
1349 } __PORTBbits_t;
1351 extern __at(0x0F81) volatile __PORTBbits_t PORTBbits;
1353 #define _PORTB_RB0 0x01
1354 #define _PORTB_INT0 0x01
1355 #define _PORTB_FLT0 0x01
1356 #define _PORTB_RB1 0x02
1357 #define _PORTB_INT1 0x02
1358 #define _PORTB_RB2 0x04
1359 #define _PORTB_INT2 0x04
1360 #define _PORTB_RB3 0x08
1361 #define _PORTB_INT3 0x08
1362 #define _PORTB_RB4 0x10
1363 #define _PORTB_KBI0 0x10
1364 #define _PORTB_RB5 0x20
1365 #define _PORTB_KBI1 0x20
1366 #define _PORTB_RB6 0x40
1367 #define _PORTB_KBI2 0x40
1368 #define _PORTB_RB7 0x80
1369 #define _PORTB_KBI3 0x80
1371 //==============================================================================
1374 //==============================================================================
1375 // PORTC Bits
1377 extern __at(0x0F82) __sfr PORTC;
1379 typedef union
1381 struct
1383 unsigned RC0 : 1;
1384 unsigned RC1 : 1;
1385 unsigned RC2 : 1;
1386 unsigned RC3 : 1;
1387 unsigned RC4 : 1;
1388 unsigned RC5 : 1;
1389 unsigned RC6 : 1;
1390 unsigned RC7 : 1;
1393 struct
1395 unsigned T1OSO : 1;
1396 unsigned T1OSI : 1;
1397 unsigned ECCP1 : 1;
1398 unsigned SCK : 1;
1399 unsigned SDI : 1;
1400 unsigned SDO : 1;
1401 unsigned TX : 1;
1402 unsigned RX : 1;
1405 struct
1407 unsigned T13CKI : 1;
1408 unsigned ECCP2 : 1;
1409 unsigned CCP1 : 1;
1410 unsigned SCL : 1;
1411 unsigned SDA : 1;
1412 unsigned SDO1 : 1;
1413 unsigned CK : 1;
1414 unsigned DT1 : 1;
1417 struct
1419 unsigned : 1;
1420 unsigned CCP2 : 1;
1421 unsigned P1A : 1;
1422 unsigned SCL1 : 1;
1423 unsigned SDA1 : 1;
1424 unsigned : 1;
1425 unsigned CK1 : 1;
1426 unsigned RX1 : 1;
1429 struct
1431 unsigned : 1;
1432 unsigned P2A : 1;
1433 unsigned : 1;
1434 unsigned SCK1 : 1;
1435 unsigned SDI1 : 1;
1436 unsigned : 1;
1437 unsigned TX1 : 1;
1438 unsigned : 1;
1440 } __PORTCbits_t;
1442 extern __at(0x0F82) volatile __PORTCbits_t PORTCbits;
1444 #define _PORTC_RC0 0x01
1445 #define _PORTC_T1OSO 0x01
1446 #define _PORTC_T13CKI 0x01
1447 #define _PORTC_RC1 0x02
1448 #define _PORTC_T1OSI 0x02
1449 #define _PORTC_ECCP2 0x02
1450 #define _PORTC_CCP2 0x02
1451 #define _PORTC_P2A 0x02
1452 #define _PORTC_RC2 0x04
1453 #define _PORTC_ECCP1 0x04
1454 #define _PORTC_CCP1 0x04
1455 #define _PORTC_P1A 0x04
1456 #define _PORTC_RC3 0x08
1457 #define _PORTC_SCK 0x08
1458 #define _PORTC_SCL 0x08
1459 #define _PORTC_SCL1 0x08
1460 #define _PORTC_SCK1 0x08
1461 #define _PORTC_RC4 0x10
1462 #define _PORTC_SDI 0x10
1463 #define _PORTC_SDA 0x10
1464 #define _PORTC_SDA1 0x10
1465 #define _PORTC_SDI1 0x10
1466 #define _PORTC_RC5 0x20
1467 #define _PORTC_SDO 0x20
1468 #define _PORTC_SDO1 0x20
1469 #define _PORTC_RC6 0x40
1470 #define _PORTC_TX 0x40
1471 #define _PORTC_CK 0x40
1472 #define _PORTC_CK1 0x40
1473 #define _PORTC_TX1 0x40
1474 #define _PORTC_RC7 0x80
1475 #define _PORTC_RX 0x80
1476 #define _PORTC_DT1 0x80
1477 #define _PORTC_RX1 0x80
1479 //==============================================================================
1482 //==============================================================================
1483 // PORTD Bits
1485 extern __at(0x0F83) __sfr PORTD;
1487 typedef union
1489 struct
1491 unsigned RD0 : 1;
1492 unsigned RD1 : 1;
1493 unsigned RD2 : 1;
1494 unsigned RD3 : 1;
1495 unsigned RD4 : 1;
1496 unsigned RD5 : 1;
1497 unsigned RD6 : 1;
1498 unsigned RD7 : 1;
1501 struct
1503 unsigned PSP0 : 1;
1504 unsigned PSP1 : 1;
1505 unsigned PSP2 : 1;
1506 unsigned PSP3 : 1;
1507 unsigned PSP4 : 1;
1508 unsigned PSP5 : 1;
1509 unsigned PSP6 : 1;
1510 unsigned PSP7 : 1;
1513 struct
1515 unsigned : 1;
1516 unsigned : 1;
1517 unsigned : 1;
1518 unsigned : 1;
1519 unsigned SDO2 : 1;
1520 unsigned SDA2 : 1;
1521 unsigned SCL2 : 1;
1522 unsigned SS2 : 1;
1525 struct
1527 unsigned : 1;
1528 unsigned : 1;
1529 unsigned : 1;
1530 unsigned : 1;
1531 unsigned : 1;
1532 unsigned SDI2 : 1;
1533 unsigned SCK2 : 1;
1534 unsigned NOT_SS2 : 1;
1536 } __PORTDbits_t;
1538 extern __at(0x0F83) volatile __PORTDbits_t PORTDbits;
1540 #define _PORTD_RD0 0x01
1541 #define _PORTD_PSP0 0x01
1542 #define _PORTD_RD1 0x02
1543 #define _PORTD_PSP1 0x02
1544 #define _PORTD_RD2 0x04
1545 #define _PORTD_PSP2 0x04
1546 #define _PORTD_RD3 0x08
1547 #define _PORTD_PSP3 0x08
1548 #define _PORTD_RD4 0x10
1549 #define _PORTD_PSP4 0x10
1550 #define _PORTD_SDO2 0x10
1551 #define _PORTD_RD5 0x20
1552 #define _PORTD_PSP5 0x20
1553 #define _PORTD_SDA2 0x20
1554 #define _PORTD_SDI2 0x20
1555 #define _PORTD_RD6 0x40
1556 #define _PORTD_PSP6 0x40
1557 #define _PORTD_SCL2 0x40
1558 #define _PORTD_SCK2 0x40
1559 #define _PORTD_RD7 0x80
1560 #define _PORTD_PSP7 0x80
1561 #define _PORTD_SS2 0x80
1562 #define _PORTD_NOT_SS2 0x80
1564 //==============================================================================
1567 //==============================================================================
1568 // PORTE Bits
1570 extern __at(0x0F84) __sfr PORTE;
1572 typedef union
1574 struct
1576 unsigned RE0 : 1;
1577 unsigned RE1 : 1;
1578 unsigned RE2 : 1;
1579 unsigned RE3 : 1;
1580 unsigned RE4 : 1;
1581 unsigned RE5 : 1;
1582 unsigned RE6 : 1;
1583 unsigned RE7 : 1;
1586 struct
1588 unsigned RD : 1;
1589 unsigned WR : 1;
1590 unsigned CS : 1;
1591 unsigned P3C : 1;
1592 unsigned P3B : 1;
1593 unsigned P1C : 1;
1594 unsigned P1B : 1;
1595 unsigned ECCP2 : 1;
1598 struct
1600 unsigned NOT_RD : 1;
1601 unsigned NOT_WR : 1;
1602 unsigned NOT_CS : 1;
1603 unsigned : 1;
1604 unsigned : 1;
1605 unsigned : 1;
1606 unsigned : 1;
1607 unsigned CCP2 : 1;
1610 struct
1612 unsigned P2D : 1;
1613 unsigned P2C : 1;
1614 unsigned P2B : 1;
1615 unsigned : 1;
1616 unsigned : 1;
1617 unsigned : 1;
1618 unsigned : 1;
1619 unsigned P2A : 1;
1621 } __PORTEbits_t;
1623 extern __at(0x0F84) volatile __PORTEbits_t PORTEbits;
1625 #define _PORTE_RE0 0x01
1626 #define _PORTE_RD 0x01
1627 #define _PORTE_NOT_RD 0x01
1628 #define _PORTE_P2D 0x01
1629 #define _PORTE_RE1 0x02
1630 #define _PORTE_WR 0x02
1631 #define _PORTE_NOT_WR 0x02
1632 #define _PORTE_P2C 0x02
1633 #define _PORTE_RE2 0x04
1634 #define _PORTE_CS 0x04
1635 #define _PORTE_NOT_CS 0x04
1636 #define _PORTE_P2B 0x04
1637 #define _PORTE_RE3 0x08
1638 #define _PORTE_P3C 0x08
1639 #define _PORTE_RE4 0x10
1640 #define _PORTE_P3B 0x10
1641 #define _PORTE_RE5 0x20
1642 #define _PORTE_P1C 0x20
1643 #define _PORTE_RE6 0x40
1644 #define _PORTE_P1B 0x40
1645 #define _PORTE_RE7 0x80
1646 #define _PORTE_ECCP2 0x80
1647 #define _PORTE_CCP2 0x80
1648 #define _PORTE_P2A 0x80
1650 //==============================================================================
1653 //==============================================================================
1654 // PORTF Bits
1656 extern __at(0x0F85) __sfr PORTF;
1658 typedef union
1660 struct
1662 unsigned RF0 : 1;
1663 unsigned RF1 : 1;
1664 unsigned RF2 : 1;
1665 unsigned RF3 : 1;
1666 unsigned RF4 : 1;
1667 unsigned RF5 : 1;
1668 unsigned RF6 : 1;
1669 unsigned RF7 : 1;
1672 struct
1674 unsigned AN5 : 1;
1675 unsigned AN6 : 1;
1676 unsigned AN7 : 1;
1677 unsigned AN8 : 1;
1678 unsigned AN9 : 1;
1679 unsigned AN10 : 1;
1680 unsigned AN11 : 1;
1681 unsigned SS1 : 1;
1684 struct
1686 unsigned : 1;
1687 unsigned C2OUT : 1;
1688 unsigned C1OUT : 1;
1689 unsigned : 1;
1690 unsigned : 1;
1691 unsigned CVREF : 1;
1692 unsigned : 1;
1693 unsigned NOT_SS1 : 1;
1695 } __PORTFbits_t;
1697 extern __at(0x0F85) volatile __PORTFbits_t PORTFbits;
1699 #define _PORTF_RF0 0x01
1700 #define _PORTF_AN5 0x01
1701 #define _PORTF_RF1 0x02
1702 #define _PORTF_AN6 0x02
1703 #define _PORTF_C2OUT 0x02
1704 #define _PORTF_RF2 0x04
1705 #define _PORTF_AN7 0x04
1706 #define _PORTF_C1OUT 0x04
1707 #define _PORTF_RF3 0x08
1708 #define _PORTF_AN8 0x08
1709 #define _PORTF_RF4 0x10
1710 #define _PORTF_AN9 0x10
1711 #define _PORTF_RF5 0x20
1712 #define _PORTF_AN10 0x20
1713 #define _PORTF_CVREF 0x20
1714 #define _PORTF_RF6 0x40
1715 #define _PORTF_AN11 0x40
1716 #define _PORTF_RF7 0x80
1717 #define _PORTF_SS1 0x80
1718 #define _PORTF_NOT_SS1 0x80
1720 //==============================================================================
1723 //==============================================================================
1724 // PORTG Bits
1726 extern __at(0x0F86) __sfr PORTG;
1728 typedef union
1730 struct
1732 unsigned RG0 : 1;
1733 unsigned RG1 : 1;
1734 unsigned RG2 : 1;
1735 unsigned RG3 : 1;
1736 unsigned RG4 : 1;
1737 unsigned RG5 : 1;
1738 unsigned : 1;
1739 unsigned : 1;
1742 struct
1744 unsigned ECCP3 : 1;
1745 unsigned TX2 : 1;
1746 unsigned RX2 : 1;
1747 unsigned CCP4 : 1;
1748 unsigned CCP5 : 1;
1749 unsigned MCLR : 1;
1750 unsigned : 1;
1751 unsigned : 1;
1754 struct
1756 unsigned P3A : 1;
1757 unsigned CK2 : 1;
1758 unsigned DT2 : 1;
1759 unsigned P3D : 1;
1760 unsigned P1D : 1;
1761 unsigned NOT_MCLR : 1;
1762 unsigned : 1;
1763 unsigned : 1;
1766 struct
1768 unsigned CCP3 : 1;
1769 unsigned : 1;
1770 unsigned : 1;
1771 unsigned : 1;
1772 unsigned : 1;
1773 unsigned : 1;
1774 unsigned : 1;
1775 unsigned : 1;
1778 struct
1780 unsigned RG : 6;
1781 unsigned : 2;
1783 } __PORTGbits_t;
1785 extern __at(0x0F86) volatile __PORTGbits_t PORTGbits;
1787 #define _PORTG_RG0 0x01
1788 #define _PORTG_ECCP3 0x01
1789 #define _PORTG_P3A 0x01
1790 #define _PORTG_CCP3 0x01
1791 #define _PORTG_RG1 0x02
1792 #define _PORTG_TX2 0x02
1793 #define _PORTG_CK2 0x02
1794 #define _PORTG_RG2 0x04
1795 #define _PORTG_RX2 0x04
1796 #define _PORTG_DT2 0x04
1797 #define _PORTG_RG3 0x08
1798 #define _PORTG_CCP4 0x08
1799 #define _PORTG_P3D 0x08
1800 #define _PORTG_RG4 0x10
1801 #define _PORTG_CCP5 0x10
1802 #define _PORTG_P1D 0x10
1803 #define _PORTG_RG5 0x20
1804 #define _PORTG_MCLR 0x20
1805 #define _PORTG_NOT_MCLR 0x20
1807 //==============================================================================
1810 //==============================================================================
1811 // LATA Bits
1813 extern __at(0x0F89) __sfr LATA;
1815 typedef struct
1817 unsigned LATA0 : 1;
1818 unsigned LATA1 : 1;
1819 unsigned LATA2 : 1;
1820 unsigned LATA3 : 1;
1821 unsigned LATA4 : 1;
1822 unsigned LATA5 : 1;
1823 unsigned LATA6 : 1;
1824 unsigned LATA7 : 1;
1825 } __LATAbits_t;
1827 extern __at(0x0F89) volatile __LATAbits_t LATAbits;
1829 #define _LATA0 0x01
1830 #define _LATA1 0x02
1831 #define _LATA2 0x04
1832 #define _LATA3 0x08
1833 #define _LATA4 0x10
1834 #define _LATA5 0x20
1835 #define _LATA6 0x40
1836 #define _LATA7 0x80
1838 //==============================================================================
1841 //==============================================================================
1842 // LATB Bits
1844 extern __at(0x0F8A) __sfr LATB;
1846 typedef struct
1848 unsigned LATB0 : 1;
1849 unsigned LATB1 : 1;
1850 unsigned LATB2 : 1;
1851 unsigned LATB3 : 1;
1852 unsigned LATB4 : 1;
1853 unsigned LATB5 : 1;
1854 unsigned LATB6 : 1;
1855 unsigned LATB7 : 1;
1856 } __LATBbits_t;
1858 extern __at(0x0F8A) volatile __LATBbits_t LATBbits;
1860 #define _LATB0 0x01
1861 #define _LATB1 0x02
1862 #define _LATB2 0x04
1863 #define _LATB3 0x08
1864 #define _LATB4 0x10
1865 #define _LATB5 0x20
1866 #define _LATB6 0x40
1867 #define _LATB7 0x80
1869 //==============================================================================
1872 //==============================================================================
1873 // LATC Bits
1875 extern __at(0x0F8B) __sfr LATC;
1877 typedef struct
1879 unsigned LATC0 : 1;
1880 unsigned LATC1 : 1;
1881 unsigned LATC2 : 1;
1882 unsigned LATC3 : 1;
1883 unsigned LATC4 : 1;
1884 unsigned LATC5 : 1;
1885 unsigned LATC6 : 1;
1886 unsigned LATC7 : 1;
1887 } __LATCbits_t;
1889 extern __at(0x0F8B) volatile __LATCbits_t LATCbits;
1891 #define _LATC0 0x01
1892 #define _LATC1 0x02
1893 #define _LATC2 0x04
1894 #define _LATC3 0x08
1895 #define _LATC4 0x10
1896 #define _LATC5 0x20
1897 #define _LATC6 0x40
1898 #define _LATC7 0x80
1900 //==============================================================================
1903 //==============================================================================
1904 // LATD Bits
1906 extern __at(0x0F8C) __sfr LATD;
1908 typedef struct
1910 unsigned LATD0 : 1;
1911 unsigned LATD1 : 1;
1912 unsigned LATD2 : 1;
1913 unsigned LATD3 : 1;
1914 unsigned LATD4 : 1;
1915 unsigned LATD5 : 1;
1916 unsigned LATD6 : 1;
1917 unsigned LATD7 : 1;
1918 } __LATDbits_t;
1920 extern __at(0x0F8C) volatile __LATDbits_t LATDbits;
1922 #define _LATD0 0x01
1923 #define _LATD1 0x02
1924 #define _LATD2 0x04
1925 #define _LATD3 0x08
1926 #define _LATD4 0x10
1927 #define _LATD5 0x20
1928 #define _LATD6 0x40
1929 #define _LATD7 0x80
1931 //==============================================================================
1934 //==============================================================================
1935 // LATE Bits
1937 extern __at(0x0F8D) __sfr LATE;
1939 typedef struct
1941 unsigned LATE0 : 1;
1942 unsigned LATE1 : 1;
1943 unsigned LATE2 : 1;
1944 unsigned LATE3 : 1;
1945 unsigned LATE4 : 1;
1946 unsigned LATE5 : 1;
1947 unsigned LATE6 : 1;
1948 unsigned LATE7 : 1;
1949 } __LATEbits_t;
1951 extern __at(0x0F8D) volatile __LATEbits_t LATEbits;
1953 #define _LATE0 0x01
1954 #define _LATE1 0x02
1955 #define _LATE2 0x04
1956 #define _LATE3 0x08
1957 #define _LATE4 0x10
1958 #define _LATE5 0x20
1959 #define _LATE6 0x40
1960 #define _LATE7 0x80
1962 //==============================================================================
1965 //==============================================================================
1966 // LATF Bits
1968 extern __at(0x0F8E) __sfr LATF;
1970 typedef struct
1972 unsigned LATF0 : 1;
1973 unsigned LATF1 : 1;
1974 unsigned LATF2 : 1;
1975 unsigned LATF3 : 1;
1976 unsigned LATF4 : 1;
1977 unsigned LATF5 : 1;
1978 unsigned LATF6 : 1;
1979 unsigned LATF7 : 1;
1980 } __LATFbits_t;
1982 extern __at(0x0F8E) volatile __LATFbits_t LATFbits;
1984 #define _LATF0 0x01
1985 #define _LATF1 0x02
1986 #define _LATF2 0x04
1987 #define _LATF3 0x08
1988 #define _LATF4 0x10
1989 #define _LATF5 0x20
1990 #define _LATF6 0x40
1991 #define _LATF7 0x80
1993 //==============================================================================
1996 //==============================================================================
1997 // LATG Bits
1999 extern __at(0x0F8F) __sfr LATG;
2001 typedef union
2003 struct
2005 unsigned LATG0 : 1;
2006 unsigned LATG1 : 1;
2007 unsigned LATG2 : 1;
2008 unsigned LATG3 : 1;
2009 unsigned LATG4 : 1;
2010 unsigned LATG5 : 1;
2011 unsigned : 1;
2012 unsigned : 1;
2015 struct
2017 unsigned LATG : 6;
2018 unsigned : 2;
2020 } __LATGbits_t;
2022 extern __at(0x0F8F) volatile __LATGbits_t LATGbits;
2024 #define _LATG0 0x01
2025 #define _LATG1 0x02
2026 #define _LATG2 0x04
2027 #define _LATG3 0x08
2028 #define _LATG4 0x10
2029 #define _LATG5 0x20
2031 //==============================================================================
2034 //==============================================================================
2035 // DDRA Bits
2037 extern __at(0x0F92) __sfr DDRA;
2039 typedef union
2041 struct
2043 unsigned TRISA0 : 1;
2044 unsigned TRISA1 : 1;
2045 unsigned TRISA2 : 1;
2046 unsigned TRISA3 : 1;
2047 unsigned TRISA4 : 1;
2048 unsigned TRISA5 : 1;
2049 unsigned TRISA6 : 1;
2050 unsigned TRISA7 : 1;
2053 struct
2055 unsigned RA0 : 1;
2056 unsigned RA1 : 1;
2057 unsigned RA2 : 1;
2058 unsigned RA3 : 1;
2059 unsigned RA4 : 1;
2060 unsigned RA5 : 1;
2061 unsigned RA6 : 1;
2062 unsigned RA7 : 1;
2064 } __DDRAbits_t;
2066 extern __at(0x0F92) volatile __DDRAbits_t DDRAbits;
2068 #define _TRISA0 0x01
2069 #define _RA0 0x01
2070 #define _TRISA1 0x02
2071 #define _RA1 0x02
2072 #define _TRISA2 0x04
2073 #define _RA2 0x04
2074 #define _TRISA3 0x08
2075 #define _RA3 0x08
2076 #define _TRISA4 0x10
2077 #define _RA4 0x10
2078 #define _TRISA5 0x20
2079 #define _RA5 0x20
2080 #define _TRISA6 0x40
2081 #define _RA6 0x40
2082 #define _TRISA7 0x80
2083 #define _RA7 0x80
2085 //==============================================================================
2088 //==============================================================================
2089 // TRISA Bits
2091 extern __at(0x0F92) __sfr TRISA;
2093 typedef union
2095 struct
2097 unsigned TRISA0 : 1;
2098 unsigned TRISA1 : 1;
2099 unsigned TRISA2 : 1;
2100 unsigned TRISA3 : 1;
2101 unsigned TRISA4 : 1;
2102 unsigned TRISA5 : 1;
2103 unsigned TRISA6 : 1;
2104 unsigned TRISA7 : 1;
2107 struct
2109 unsigned RA0 : 1;
2110 unsigned RA1 : 1;
2111 unsigned RA2 : 1;
2112 unsigned RA3 : 1;
2113 unsigned RA4 : 1;
2114 unsigned RA5 : 1;
2115 unsigned RA6 : 1;
2116 unsigned RA7 : 1;
2118 } __TRISAbits_t;
2120 extern __at(0x0F92) volatile __TRISAbits_t TRISAbits;
2122 #define _TRISA_TRISA0 0x01
2123 #define _TRISA_RA0 0x01
2124 #define _TRISA_TRISA1 0x02
2125 #define _TRISA_RA1 0x02
2126 #define _TRISA_TRISA2 0x04
2127 #define _TRISA_RA2 0x04
2128 #define _TRISA_TRISA3 0x08
2129 #define _TRISA_RA3 0x08
2130 #define _TRISA_TRISA4 0x10
2131 #define _TRISA_RA4 0x10
2132 #define _TRISA_TRISA5 0x20
2133 #define _TRISA_RA5 0x20
2134 #define _TRISA_TRISA6 0x40
2135 #define _TRISA_RA6 0x40
2136 #define _TRISA_TRISA7 0x80
2137 #define _TRISA_RA7 0x80
2139 //==============================================================================
2142 //==============================================================================
2143 // DDRB Bits
2145 extern __at(0x0F93) __sfr DDRB;
2147 typedef union
2149 struct
2151 unsigned TRISB0 : 1;
2152 unsigned TRISB1 : 1;
2153 unsigned TRISB2 : 1;
2154 unsigned TRISB3 : 1;
2155 unsigned TRISB4 : 1;
2156 unsigned TRISB5 : 1;
2157 unsigned TRISB6 : 1;
2158 unsigned TRISB7 : 1;
2161 struct
2163 unsigned RB0 : 1;
2164 unsigned RB1 : 1;
2165 unsigned RB2 : 1;
2166 unsigned RB3 : 1;
2167 unsigned RB4 : 1;
2168 unsigned RB5 : 1;
2169 unsigned RB6 : 1;
2170 unsigned RB7 : 1;
2172 } __DDRBbits_t;
2174 extern __at(0x0F93) volatile __DDRBbits_t DDRBbits;
2176 #define _TRISB0 0x01
2177 #define _RB0 0x01
2178 #define _TRISB1 0x02
2179 #define _RB1 0x02
2180 #define _TRISB2 0x04
2181 #define _RB2 0x04
2182 #define _TRISB3 0x08
2183 #define _RB3 0x08
2184 #define _TRISB4 0x10
2185 #define _RB4 0x10
2186 #define _TRISB5 0x20
2187 #define _RB5 0x20
2188 #define _TRISB6 0x40
2189 #define _RB6 0x40
2190 #define _TRISB7 0x80
2191 #define _RB7 0x80
2193 //==============================================================================
2196 //==============================================================================
2197 // TRISB Bits
2199 extern __at(0x0F93) __sfr TRISB;
2201 typedef union
2203 struct
2205 unsigned TRISB0 : 1;
2206 unsigned TRISB1 : 1;
2207 unsigned TRISB2 : 1;
2208 unsigned TRISB3 : 1;
2209 unsigned TRISB4 : 1;
2210 unsigned TRISB5 : 1;
2211 unsigned TRISB6 : 1;
2212 unsigned TRISB7 : 1;
2215 struct
2217 unsigned RB0 : 1;
2218 unsigned RB1 : 1;
2219 unsigned RB2 : 1;
2220 unsigned RB3 : 1;
2221 unsigned RB4 : 1;
2222 unsigned RB5 : 1;
2223 unsigned RB6 : 1;
2224 unsigned RB7 : 1;
2226 } __TRISBbits_t;
2228 extern __at(0x0F93) volatile __TRISBbits_t TRISBbits;
2230 #define _TRISB_TRISB0 0x01
2231 #define _TRISB_RB0 0x01
2232 #define _TRISB_TRISB1 0x02
2233 #define _TRISB_RB1 0x02
2234 #define _TRISB_TRISB2 0x04
2235 #define _TRISB_RB2 0x04
2236 #define _TRISB_TRISB3 0x08
2237 #define _TRISB_RB3 0x08
2238 #define _TRISB_TRISB4 0x10
2239 #define _TRISB_RB4 0x10
2240 #define _TRISB_TRISB5 0x20
2241 #define _TRISB_RB5 0x20
2242 #define _TRISB_TRISB6 0x40
2243 #define _TRISB_RB6 0x40
2244 #define _TRISB_TRISB7 0x80
2245 #define _TRISB_RB7 0x80
2247 //==============================================================================
2250 //==============================================================================
2251 // DDRC Bits
2253 extern __at(0x0F94) __sfr DDRC;
2255 typedef union
2257 struct
2259 unsigned TRISC0 : 1;
2260 unsigned TRISC1 : 1;
2261 unsigned TRISC2 : 1;
2262 unsigned TRISC3 : 1;
2263 unsigned TRISC4 : 1;
2264 unsigned TRISC5 : 1;
2265 unsigned TRISC6 : 1;
2266 unsigned TRISC7 : 1;
2269 struct
2271 unsigned RC0 : 1;
2272 unsigned RC1 : 1;
2273 unsigned RC2 : 1;
2274 unsigned RC3 : 1;
2275 unsigned RC4 : 1;
2276 unsigned RC5 : 1;
2277 unsigned RC6 : 1;
2278 unsigned RC7 : 1;
2280 } __DDRCbits_t;
2282 extern __at(0x0F94) volatile __DDRCbits_t DDRCbits;
2284 #define _TRISC0 0x01
2285 #define _RC0 0x01
2286 #define _TRISC1 0x02
2287 #define _RC1 0x02
2288 #define _TRISC2 0x04
2289 #define _RC2 0x04
2290 #define _TRISC3 0x08
2291 #define _RC3 0x08
2292 #define _TRISC4 0x10
2293 #define _RC4 0x10
2294 #define _TRISC5 0x20
2295 #define _RC5 0x20
2296 #define _TRISC6 0x40
2297 #define _RC6 0x40
2298 #define _TRISC7 0x80
2299 #define _RC7 0x80
2301 //==============================================================================
2304 //==============================================================================
2305 // TRISC Bits
2307 extern __at(0x0F94) __sfr TRISC;
2309 typedef union
2311 struct
2313 unsigned TRISC0 : 1;
2314 unsigned TRISC1 : 1;
2315 unsigned TRISC2 : 1;
2316 unsigned TRISC3 : 1;
2317 unsigned TRISC4 : 1;
2318 unsigned TRISC5 : 1;
2319 unsigned TRISC6 : 1;
2320 unsigned TRISC7 : 1;
2323 struct
2325 unsigned RC0 : 1;
2326 unsigned RC1 : 1;
2327 unsigned RC2 : 1;
2328 unsigned RC3 : 1;
2329 unsigned RC4 : 1;
2330 unsigned RC5 : 1;
2331 unsigned RC6 : 1;
2332 unsigned RC7 : 1;
2334 } __TRISCbits_t;
2336 extern __at(0x0F94) volatile __TRISCbits_t TRISCbits;
2338 #define _TRISC_TRISC0 0x01
2339 #define _TRISC_RC0 0x01
2340 #define _TRISC_TRISC1 0x02
2341 #define _TRISC_RC1 0x02
2342 #define _TRISC_TRISC2 0x04
2343 #define _TRISC_RC2 0x04
2344 #define _TRISC_TRISC3 0x08
2345 #define _TRISC_RC3 0x08
2346 #define _TRISC_TRISC4 0x10
2347 #define _TRISC_RC4 0x10
2348 #define _TRISC_TRISC5 0x20
2349 #define _TRISC_RC5 0x20
2350 #define _TRISC_TRISC6 0x40
2351 #define _TRISC_RC6 0x40
2352 #define _TRISC_TRISC7 0x80
2353 #define _TRISC_RC7 0x80
2355 //==============================================================================
2358 //==============================================================================
2359 // DDRD Bits
2361 extern __at(0x0F95) __sfr DDRD;
2363 typedef union
2365 struct
2367 unsigned TRISD0 : 1;
2368 unsigned TRISD1 : 1;
2369 unsigned TRISD2 : 1;
2370 unsigned TRISD3 : 1;
2371 unsigned TRISD4 : 1;
2372 unsigned TRISD5 : 1;
2373 unsigned TRISD6 : 1;
2374 unsigned TRISD7 : 1;
2377 struct
2379 unsigned RD0 : 1;
2380 unsigned RD1 : 1;
2381 unsigned RD2 : 1;
2382 unsigned RD3 : 1;
2383 unsigned RD4 : 1;
2384 unsigned RD5 : 1;
2385 unsigned RD6 : 1;
2386 unsigned RD7 : 1;
2388 } __DDRDbits_t;
2390 extern __at(0x0F95) volatile __DDRDbits_t DDRDbits;
2392 #define _TRISD0 0x01
2393 #define _RD0 0x01
2394 #define _TRISD1 0x02
2395 #define _RD1 0x02
2396 #define _TRISD2 0x04
2397 #define _RD2 0x04
2398 #define _TRISD3 0x08
2399 #define _RD3 0x08
2400 #define _TRISD4 0x10
2401 #define _RD4 0x10
2402 #define _TRISD5 0x20
2403 #define _RD5 0x20
2404 #define _TRISD6 0x40
2405 #define _RD6 0x40
2406 #define _TRISD7 0x80
2407 #define _RD7 0x80
2409 //==============================================================================
2412 //==============================================================================
2413 // TRISD Bits
2415 extern __at(0x0F95) __sfr TRISD;
2417 typedef union
2419 struct
2421 unsigned TRISD0 : 1;
2422 unsigned TRISD1 : 1;
2423 unsigned TRISD2 : 1;
2424 unsigned TRISD3 : 1;
2425 unsigned TRISD4 : 1;
2426 unsigned TRISD5 : 1;
2427 unsigned TRISD6 : 1;
2428 unsigned TRISD7 : 1;
2431 struct
2433 unsigned RD0 : 1;
2434 unsigned RD1 : 1;
2435 unsigned RD2 : 1;
2436 unsigned RD3 : 1;
2437 unsigned RD4 : 1;
2438 unsigned RD5 : 1;
2439 unsigned RD6 : 1;
2440 unsigned RD7 : 1;
2442 } __TRISDbits_t;
2444 extern __at(0x0F95) volatile __TRISDbits_t TRISDbits;
2446 #define _TRISD_TRISD0 0x01
2447 #define _TRISD_RD0 0x01
2448 #define _TRISD_TRISD1 0x02
2449 #define _TRISD_RD1 0x02
2450 #define _TRISD_TRISD2 0x04
2451 #define _TRISD_RD2 0x04
2452 #define _TRISD_TRISD3 0x08
2453 #define _TRISD_RD3 0x08
2454 #define _TRISD_TRISD4 0x10
2455 #define _TRISD_RD4 0x10
2456 #define _TRISD_TRISD5 0x20
2457 #define _TRISD_RD5 0x20
2458 #define _TRISD_TRISD6 0x40
2459 #define _TRISD_RD6 0x40
2460 #define _TRISD_TRISD7 0x80
2461 #define _TRISD_RD7 0x80
2463 //==============================================================================
2466 //==============================================================================
2467 // DDRE Bits
2469 extern __at(0x0F96) __sfr DDRE;
2471 typedef union
2473 struct
2475 unsigned TRISE0 : 1;
2476 unsigned TRISE1 : 1;
2477 unsigned TRISE2 : 1;
2478 unsigned TRISE3 : 1;
2479 unsigned TRISE4 : 1;
2480 unsigned TRISE5 : 1;
2481 unsigned TRISE6 : 1;
2482 unsigned TRISE7 : 1;
2485 struct
2487 unsigned RE0 : 1;
2488 unsigned RE1 : 1;
2489 unsigned RE2 : 1;
2490 unsigned RE3 : 1;
2491 unsigned RE4 : 1;
2492 unsigned RE5 : 1;
2493 unsigned RE6 : 1;
2494 unsigned RE7 : 1;
2496 } __DDREbits_t;
2498 extern __at(0x0F96) volatile __DDREbits_t DDREbits;
2500 #define _TRISE0 0x01
2501 #define _RE0 0x01
2502 #define _TRISE1 0x02
2503 #define _RE1 0x02
2504 #define _TRISE2 0x04
2505 #define _RE2 0x04
2506 #define _TRISE3 0x08
2507 #define _RE3 0x08
2508 #define _TRISE4 0x10
2509 #define _RE4 0x10
2510 #define _TRISE5 0x20
2511 #define _RE5 0x20
2512 #define _TRISE6 0x40
2513 #define _RE6 0x40
2514 #define _TRISE7 0x80
2515 #define _RE7 0x80
2517 //==============================================================================
2520 //==============================================================================
2521 // TRISE Bits
2523 extern __at(0x0F96) __sfr TRISE;
2525 typedef union
2527 struct
2529 unsigned TRISE0 : 1;
2530 unsigned TRISE1 : 1;
2531 unsigned TRISE2 : 1;
2532 unsigned TRISE3 : 1;
2533 unsigned TRISE4 : 1;
2534 unsigned TRISE5 : 1;
2535 unsigned TRISE6 : 1;
2536 unsigned TRISE7 : 1;
2539 struct
2541 unsigned RE0 : 1;
2542 unsigned RE1 : 1;
2543 unsigned RE2 : 1;
2544 unsigned RE3 : 1;
2545 unsigned RE4 : 1;
2546 unsigned RE5 : 1;
2547 unsigned RE6 : 1;
2548 unsigned RE7 : 1;
2550 } __TRISEbits_t;
2552 extern __at(0x0F96) volatile __TRISEbits_t TRISEbits;
2554 #define _TRISE_TRISE0 0x01
2555 #define _TRISE_RE0 0x01
2556 #define _TRISE_TRISE1 0x02
2557 #define _TRISE_RE1 0x02
2558 #define _TRISE_TRISE2 0x04
2559 #define _TRISE_RE2 0x04
2560 #define _TRISE_TRISE3 0x08
2561 #define _TRISE_RE3 0x08
2562 #define _TRISE_TRISE4 0x10
2563 #define _TRISE_RE4 0x10
2564 #define _TRISE_TRISE5 0x20
2565 #define _TRISE_RE5 0x20
2566 #define _TRISE_TRISE6 0x40
2567 #define _TRISE_RE6 0x40
2568 #define _TRISE_TRISE7 0x80
2569 #define _TRISE_RE7 0x80
2571 //==============================================================================
2574 //==============================================================================
2575 // DDRF Bits
2577 extern __at(0x0F97) __sfr DDRF;
2579 typedef union
2581 struct
2583 unsigned TRISF0 : 1;
2584 unsigned TRISF1 : 1;
2585 unsigned TRISF2 : 1;
2586 unsigned TRISF3 : 1;
2587 unsigned TRISF4 : 1;
2588 unsigned TRISF5 : 1;
2589 unsigned TRISF6 : 1;
2590 unsigned TRISF7 : 1;
2593 struct
2595 unsigned RF0 : 1;
2596 unsigned RF1 : 1;
2597 unsigned RF2 : 1;
2598 unsigned RF3 : 1;
2599 unsigned RF4 : 1;
2600 unsigned RF5 : 1;
2601 unsigned RF6 : 1;
2602 unsigned RF7 : 1;
2604 } __DDRFbits_t;
2606 extern __at(0x0F97) volatile __DDRFbits_t DDRFbits;
2608 #define _TRISF0 0x01
2609 #define _RF0 0x01
2610 #define _TRISF1 0x02
2611 #define _RF1 0x02
2612 #define _TRISF2 0x04
2613 #define _RF2 0x04
2614 #define _TRISF3 0x08
2615 #define _RF3 0x08
2616 #define _TRISF4 0x10
2617 #define _RF4 0x10
2618 #define _TRISF5 0x20
2619 #define _RF5 0x20
2620 #define _TRISF6 0x40
2621 #define _RF6 0x40
2622 #define _TRISF7 0x80
2623 #define _RF7 0x80
2625 //==============================================================================
2628 //==============================================================================
2629 // TRISF Bits
2631 extern __at(0x0F97) __sfr TRISF;
2633 typedef union
2635 struct
2637 unsigned TRISF0 : 1;
2638 unsigned TRISF1 : 1;
2639 unsigned TRISF2 : 1;
2640 unsigned TRISF3 : 1;
2641 unsigned TRISF4 : 1;
2642 unsigned TRISF5 : 1;
2643 unsigned TRISF6 : 1;
2644 unsigned TRISF7 : 1;
2647 struct
2649 unsigned RF0 : 1;
2650 unsigned RF1 : 1;
2651 unsigned RF2 : 1;
2652 unsigned RF3 : 1;
2653 unsigned RF4 : 1;
2654 unsigned RF5 : 1;
2655 unsigned RF6 : 1;
2656 unsigned RF7 : 1;
2658 } __TRISFbits_t;
2660 extern __at(0x0F97) volatile __TRISFbits_t TRISFbits;
2662 #define _TRISF_TRISF0 0x01
2663 #define _TRISF_RF0 0x01
2664 #define _TRISF_TRISF1 0x02
2665 #define _TRISF_RF1 0x02
2666 #define _TRISF_TRISF2 0x04
2667 #define _TRISF_RF2 0x04
2668 #define _TRISF_TRISF3 0x08
2669 #define _TRISF_RF3 0x08
2670 #define _TRISF_TRISF4 0x10
2671 #define _TRISF_RF4 0x10
2672 #define _TRISF_TRISF5 0x20
2673 #define _TRISF_RF5 0x20
2674 #define _TRISF_TRISF6 0x40
2675 #define _TRISF_RF6 0x40
2676 #define _TRISF_TRISF7 0x80
2677 #define _TRISF_RF7 0x80
2679 //==============================================================================
2682 //==============================================================================
2683 // DDRG Bits
2685 extern __at(0x0F98) __sfr DDRG;
2687 typedef union
2689 struct
2691 unsigned TRISG0 : 1;
2692 unsigned TRISG1 : 1;
2693 unsigned TRISG2 : 1;
2694 unsigned TRISG3 : 1;
2695 unsigned TRISG4 : 1;
2696 unsigned : 1;
2697 unsigned : 1;
2698 unsigned : 1;
2701 struct
2703 unsigned RG0 : 1;
2704 unsigned RG1 : 1;
2705 unsigned RG2 : 1;
2706 unsigned RG3 : 1;
2707 unsigned RG4 : 1;
2708 unsigned : 1;
2709 unsigned : 1;
2710 unsigned : 1;
2713 struct
2715 unsigned TRISG : 5;
2716 unsigned : 3;
2719 struct
2721 unsigned RG : 5;
2722 unsigned : 3;
2724 } __DDRGbits_t;
2726 extern __at(0x0F98) volatile __DDRGbits_t DDRGbits;
2728 #define _TRISG0 0x01
2729 #define _RG0 0x01
2730 #define _TRISG1 0x02
2731 #define _RG1 0x02
2732 #define _TRISG2 0x04
2733 #define _RG2 0x04
2734 #define _TRISG3 0x08
2735 #define _RG3 0x08
2736 #define _TRISG4 0x10
2737 #define _RG4 0x10
2739 //==============================================================================
2742 //==============================================================================
2743 // TRISG Bits
2745 extern __at(0x0F98) __sfr TRISG;
2747 typedef union
2749 struct
2751 unsigned TRISG0 : 1;
2752 unsigned TRISG1 : 1;
2753 unsigned TRISG2 : 1;
2754 unsigned TRISG3 : 1;
2755 unsigned TRISG4 : 1;
2756 unsigned : 1;
2757 unsigned : 1;
2758 unsigned : 1;
2761 struct
2763 unsigned RG0 : 1;
2764 unsigned RG1 : 1;
2765 unsigned RG2 : 1;
2766 unsigned RG3 : 1;
2767 unsigned RG4 : 1;
2768 unsigned : 1;
2769 unsigned : 1;
2770 unsigned : 1;
2773 struct
2775 unsigned TRISG : 5;
2776 unsigned : 3;
2779 struct
2781 unsigned RG : 5;
2782 unsigned : 3;
2784 } __TRISGbits_t;
2786 extern __at(0x0F98) volatile __TRISGbits_t TRISGbits;
2788 #define _TRISG_TRISG0 0x01
2789 #define _TRISG_RG0 0x01
2790 #define _TRISG_TRISG1 0x02
2791 #define _TRISG_RG1 0x02
2792 #define _TRISG_TRISG2 0x04
2793 #define _TRISG_RG2 0x04
2794 #define _TRISG_TRISG3 0x08
2795 #define _TRISG_RG3 0x08
2796 #define _TRISG_TRISG4 0x10
2797 #define _TRISG_RG4 0x10
2799 //==============================================================================
2802 //==============================================================================
2803 // OSCTUNE Bits
2805 extern __at(0x0F9B) __sfr OSCTUNE;
2807 typedef union
2809 struct
2811 unsigned TUN0 : 1;
2812 unsigned TUN1 : 1;
2813 unsigned TUN2 : 1;
2814 unsigned TUN3 : 1;
2815 unsigned TUN4 : 1;
2816 unsigned : 1;
2817 unsigned PLLEN : 1;
2818 unsigned INTSRC : 1;
2821 struct
2823 unsigned TUN : 5;
2824 unsigned : 3;
2826 } __OSCTUNEbits_t;
2828 extern __at(0x0F9B) volatile __OSCTUNEbits_t OSCTUNEbits;
2830 #define _TUN0 0x01
2831 #define _TUN1 0x02
2832 #define _TUN2 0x04
2833 #define _TUN3 0x08
2834 #define _TUN4 0x10
2835 #define _PLLEN 0x40
2836 #define _INTSRC 0x80
2838 //==============================================================================
2841 //==============================================================================
2842 // PIE1 Bits
2844 extern __at(0x0F9D) __sfr PIE1;
2846 typedef union
2848 struct
2850 unsigned TMR1IE : 1;
2851 unsigned TMR2IE : 1;
2852 unsigned CCP1IE : 1;
2853 unsigned SSP1IE : 1;
2854 unsigned TX1IE : 1;
2855 unsigned RC1IE : 1;
2856 unsigned ADIE : 1;
2857 unsigned PSPIE : 1;
2860 struct
2862 unsigned : 1;
2863 unsigned : 1;
2864 unsigned : 1;
2865 unsigned SSPIE : 1;
2866 unsigned TXIE : 1;
2867 unsigned RCIE : 1;
2868 unsigned : 1;
2869 unsigned : 1;
2871 } __PIE1bits_t;
2873 extern __at(0x0F9D) volatile __PIE1bits_t PIE1bits;
2875 #define _TMR1IE 0x01
2876 #define _TMR2IE 0x02
2877 #define _CCP1IE 0x04
2878 #define _SSP1IE 0x08
2879 #define _SSPIE 0x08
2880 #define _TX1IE 0x10
2881 #define _TXIE 0x10
2882 #define _RC1IE 0x20
2883 #define _RCIE 0x20
2884 #define _ADIE 0x40
2885 #define _PSPIE 0x80
2887 //==============================================================================
2890 //==============================================================================
2891 // PIR1 Bits
2893 extern __at(0x0F9E) __sfr PIR1;
2895 typedef union
2897 struct
2899 unsigned TMR1IF : 1;
2900 unsigned TMR2IF : 1;
2901 unsigned CCP1IF : 1;
2902 unsigned SSP1IF : 1;
2903 unsigned TX1IF : 1;
2904 unsigned RC1IF : 1;
2905 unsigned ADIF : 1;
2906 unsigned PSPIF : 1;
2909 struct
2911 unsigned : 1;
2912 unsigned : 1;
2913 unsigned : 1;
2914 unsigned SSPIF : 1;
2915 unsigned TXIF : 1;
2916 unsigned RCIF : 1;
2917 unsigned : 1;
2918 unsigned : 1;
2920 } __PIR1bits_t;
2922 extern __at(0x0F9E) volatile __PIR1bits_t PIR1bits;
2924 #define _TMR1IF 0x01
2925 #define _TMR2IF 0x02
2926 #define _CCP1IF 0x04
2927 #define _SSP1IF 0x08
2928 #define _SSPIF 0x08
2929 #define _TX1IF 0x10
2930 #define _TXIF 0x10
2931 #define _RC1IF 0x20
2932 #define _RCIF 0x20
2933 #define _ADIF 0x40
2934 #define _PSPIF 0x80
2936 //==============================================================================
2939 //==============================================================================
2940 // IPR1 Bits
2942 extern __at(0x0F9F) __sfr IPR1;
2944 typedef union
2946 struct
2948 unsigned TMR1IP : 1;
2949 unsigned TMR2IP : 1;
2950 unsigned CCP1IP : 1;
2951 unsigned SSP1IP : 1;
2952 unsigned TX1IP : 1;
2953 unsigned RC1IP : 1;
2954 unsigned ADIP : 1;
2955 unsigned PSPIP : 1;
2958 struct
2960 unsigned : 1;
2961 unsigned : 1;
2962 unsigned : 1;
2963 unsigned SSPIP : 1;
2964 unsigned TXIP : 1;
2965 unsigned RCIP : 1;
2966 unsigned : 1;
2967 unsigned : 1;
2969 } __IPR1bits_t;
2971 extern __at(0x0F9F) volatile __IPR1bits_t IPR1bits;
2973 #define _TMR1IP 0x01
2974 #define _TMR2IP 0x02
2975 #define _CCP1IP 0x04
2976 #define _SSP1IP 0x08
2977 #define _SSPIP 0x08
2978 #define _TX1IP 0x10
2979 #define _TXIP 0x10
2980 #define _RC1IP 0x20
2981 #define _RCIP 0x20
2982 #define _ADIP 0x40
2983 #define _PSPIP 0x80
2985 //==============================================================================
2988 //==============================================================================
2989 // PIE2 Bits
2991 extern __at(0x0FA0) __sfr PIE2;
2993 typedef union
2995 struct
2997 unsigned CCP2IE : 1;
2998 unsigned TMR3IE : 1;
2999 unsigned HLVDIE : 1;
3000 unsigned BCL1IE : 1;
3001 unsigned EEIE : 1;
3002 unsigned : 1;
3003 unsigned CMIE : 1;
3004 unsigned OSCFIE : 1;
3007 struct
3009 unsigned : 1;
3010 unsigned : 1;
3011 unsigned LVDIE : 1;
3012 unsigned BCLIE : 1;
3013 unsigned : 1;
3014 unsigned : 1;
3015 unsigned : 1;
3016 unsigned : 1;
3018 } __PIE2bits_t;
3020 extern __at(0x0FA0) volatile __PIE2bits_t PIE2bits;
3022 #define _CCP2IE 0x01
3023 #define _TMR3IE 0x02
3024 #define _HLVDIE 0x04
3025 #define _LVDIE 0x04
3026 #define _BCL1IE 0x08
3027 #define _BCLIE 0x08
3028 #define _EEIE 0x10
3029 #define _CMIE 0x40
3030 #define _OSCFIE 0x80
3032 //==============================================================================
3035 //==============================================================================
3036 // PIR2 Bits
3038 extern __at(0x0FA1) __sfr PIR2;
3040 typedef union
3042 struct
3044 unsigned CCP2IF : 1;
3045 unsigned TMR3IF : 1;
3046 unsigned HLVDIF : 1;
3047 unsigned BCL1IF : 1;
3048 unsigned EEIF : 1;
3049 unsigned : 1;
3050 unsigned CMIF : 1;
3051 unsigned OSCFIF : 1;
3054 struct
3056 unsigned : 1;
3057 unsigned : 1;
3058 unsigned LVDIF : 1;
3059 unsigned BCLIF : 1;
3060 unsigned : 1;
3061 unsigned : 1;
3062 unsigned : 1;
3063 unsigned : 1;
3065 } __PIR2bits_t;
3067 extern __at(0x0FA1) volatile __PIR2bits_t PIR2bits;
3069 #define _CCP2IF 0x01
3070 #define _TMR3IF 0x02
3071 #define _HLVDIF 0x04
3072 #define _LVDIF 0x04
3073 #define _BCL1IF 0x08
3074 #define _BCLIF 0x08
3075 #define _EEIF 0x10
3076 #define _CMIF 0x40
3077 #define _OSCFIF 0x80
3079 //==============================================================================
3082 //==============================================================================
3083 // IPR2 Bits
3085 extern __at(0x0FA2) __sfr IPR2;
3087 typedef union
3089 struct
3091 unsigned CCP2IP : 1;
3092 unsigned TMR3IP : 1;
3093 unsigned HLVDIP : 1;
3094 unsigned BCL1IP : 1;
3095 unsigned EEIP : 1;
3096 unsigned : 1;
3097 unsigned CMIP : 1;
3098 unsigned OSCFIP : 1;
3101 struct
3103 unsigned : 1;
3104 unsigned : 1;
3105 unsigned LVDIP : 1;
3106 unsigned BCLIP : 1;
3107 unsigned : 1;
3108 unsigned : 1;
3109 unsigned : 1;
3110 unsigned : 1;
3112 } __IPR2bits_t;
3114 extern __at(0x0FA2) volatile __IPR2bits_t IPR2bits;
3116 #define _CCP2IP 0x01
3117 #define _TMR3IP 0x02
3118 #define _HLVDIP 0x04
3119 #define _LVDIP 0x04
3120 #define _BCL1IP 0x08
3121 #define _BCLIP 0x08
3122 #define _EEIP 0x10
3123 #define _CMIP 0x40
3124 #define _OSCFIP 0x80
3126 //==============================================================================
3129 //==============================================================================
3130 // PIE3 Bits
3132 extern __at(0x0FA3) __sfr PIE3;
3134 typedef struct
3136 unsigned CCP3IE : 1;
3137 unsigned CCP4IE : 1;
3138 unsigned CCP5IE : 1;
3139 unsigned TMR4IE : 1;
3140 unsigned TX2IE : 1;
3141 unsigned RC2IE : 1;
3142 unsigned BCL2IE : 1;
3143 unsigned SSP2IE : 1;
3144 } __PIE3bits_t;
3146 extern __at(0x0FA3) volatile __PIE3bits_t PIE3bits;
3148 #define _CCP3IE 0x01
3149 #define _CCP4IE 0x02
3150 #define _CCP5IE 0x04
3151 #define _TMR4IE 0x08
3152 #define _TX2IE 0x10
3153 #define _RC2IE 0x20
3154 #define _BCL2IE 0x40
3155 #define _SSP2IE 0x80
3157 //==============================================================================
3160 //==============================================================================
3161 // PIR3 Bits
3163 extern __at(0x0FA4) __sfr PIR3;
3165 typedef struct
3167 unsigned CCP3IF : 1;
3168 unsigned CCP4IF : 1;
3169 unsigned CCP5IF : 1;
3170 unsigned TMR4IF : 1;
3171 unsigned TX2IF : 1;
3172 unsigned RC2IF : 1;
3173 unsigned BCL2IF : 1;
3174 unsigned SSP2IF : 1;
3175 } __PIR3bits_t;
3177 extern __at(0x0FA4) volatile __PIR3bits_t PIR3bits;
3179 #define _CCP3IF 0x01
3180 #define _CCP4IF 0x02
3181 #define _CCP5IF 0x04
3182 #define _TMR4IF 0x08
3183 #define _TX2IF 0x10
3184 #define _RC2IF 0x20
3185 #define _BCL2IF 0x40
3186 #define _SSP2IF 0x80
3188 //==============================================================================
3191 //==============================================================================
3192 // IPR3 Bits
3194 extern __at(0x0FA5) __sfr IPR3;
3196 typedef struct
3198 unsigned CCP3IP : 1;
3199 unsigned CCP4IP : 1;
3200 unsigned CCP5IP : 1;
3201 unsigned TMR4IP : 1;
3202 unsigned TX2IP : 1;
3203 unsigned RC2IP : 1;
3204 unsigned BCL2IP : 1;
3205 unsigned SSP2IP : 1;
3206 } __IPR3bits_t;
3208 extern __at(0x0FA5) volatile __IPR3bits_t IPR3bits;
3210 #define _CCP3IP 0x01
3211 #define _CCP4IP 0x02
3212 #define _CCP5IP 0x04
3213 #define _TMR4IP 0x08
3214 #define _TX2IP 0x10
3215 #define _RC2IP 0x20
3216 #define _BCL2IP 0x40
3217 #define _SSP2IP 0x80
3219 //==============================================================================
3222 //==============================================================================
3223 // EECON1 Bits
3225 extern __at(0x0FA6) __sfr EECON1;
3227 typedef struct
3229 unsigned RD : 1;
3230 unsigned WR : 1;
3231 unsigned WREN : 1;
3232 unsigned WRERR : 1;
3233 unsigned FREE : 1;
3234 unsigned : 1;
3235 unsigned CFGS : 1;
3236 unsigned EEPGD : 1;
3237 } __EECON1bits_t;
3239 extern __at(0x0FA6) volatile __EECON1bits_t EECON1bits;
3241 #define _RD 0x01
3242 #define _WR 0x02
3243 #define _WREN 0x04
3244 #define _WRERR 0x08
3245 #define _FREE 0x10
3246 #define _CFGS 0x40
3247 #define _EEPGD 0x80
3249 //==============================================================================
3251 extern __at(0x0FA7) __sfr EECON2;
3252 extern __at(0x0FA8) __sfr EEDATA;
3253 extern __at(0x0FA9) __sfr EEADR;
3254 extern __at(0x0FAA) __sfr EEADRH;
3256 //==============================================================================
3257 // RCSTA Bits
3259 extern __at(0x0FAB) __sfr RCSTA;
3261 typedef union
3263 struct
3265 unsigned RX9D : 1;
3266 unsigned OERR : 1;
3267 unsigned FERR : 1;
3268 unsigned ADDEN : 1;
3269 unsigned CREN : 1;
3270 unsigned SREN : 1;
3271 unsigned RX9 : 1;
3272 unsigned SPEN : 1;
3275 struct
3277 unsigned RCD8 : 1;
3278 unsigned OERR1 : 1;
3279 unsigned FERR1 : 1;
3280 unsigned ADDEN1 : 1;
3281 unsigned CREN1 : 1;
3282 unsigned SREN1 : 1;
3283 unsigned RC9 : 1;
3284 unsigned SPEN1 : 1;
3287 struct
3289 unsigned RX9D1 : 1;
3290 unsigned : 1;
3291 unsigned : 1;
3292 unsigned : 1;
3293 unsigned : 1;
3294 unsigned : 1;
3295 unsigned NOT_RC8 : 1;
3296 unsigned : 1;
3299 struct
3301 unsigned : 1;
3302 unsigned : 1;
3303 unsigned : 1;
3304 unsigned : 1;
3305 unsigned : 1;
3306 unsigned : 1;
3307 unsigned RC8_9 : 1;
3308 unsigned : 1;
3311 struct
3313 unsigned : 1;
3314 unsigned : 1;
3315 unsigned : 1;
3316 unsigned : 1;
3317 unsigned : 1;
3318 unsigned : 1;
3319 unsigned RX91 : 1;
3320 unsigned : 1;
3322 } __RCSTAbits_t;
3324 extern __at(0x0FAB) volatile __RCSTAbits_t RCSTAbits;
3326 #define _RX9D 0x01
3327 #define _RCD8 0x01
3328 #define _RX9D1 0x01
3329 #define _OERR 0x02
3330 #define _OERR1 0x02
3331 #define _FERR 0x04
3332 #define _FERR1 0x04
3333 #define _ADDEN 0x08
3334 #define _ADDEN1 0x08
3335 #define _CREN 0x10
3336 #define _CREN1 0x10
3337 #define _SREN 0x20
3338 #define _SREN1 0x20
3339 #define _RX9 0x40
3340 #define _RC9 0x40
3341 #define _NOT_RC8 0x40
3342 #define _RC8_9 0x40
3343 #define _RX91 0x40
3344 #define _SPEN 0x80
3345 #define _SPEN1 0x80
3347 //==============================================================================
3350 //==============================================================================
3351 // RCSTA1 Bits
3353 extern __at(0x0FAB) __sfr RCSTA1;
3355 typedef union
3357 struct
3359 unsigned RX9D : 1;
3360 unsigned OERR : 1;
3361 unsigned FERR : 1;
3362 unsigned ADDEN : 1;
3363 unsigned CREN : 1;
3364 unsigned SREN : 1;
3365 unsigned RX9 : 1;
3366 unsigned SPEN : 1;
3369 struct
3371 unsigned RCD8 : 1;
3372 unsigned OERR1 : 1;
3373 unsigned FERR1 : 1;
3374 unsigned ADDEN1 : 1;
3375 unsigned CREN1 : 1;
3376 unsigned SREN1 : 1;
3377 unsigned RC9 : 1;
3378 unsigned SPEN1 : 1;
3381 struct
3383 unsigned RX9D1 : 1;
3384 unsigned : 1;
3385 unsigned : 1;
3386 unsigned : 1;
3387 unsigned : 1;
3388 unsigned : 1;
3389 unsigned NOT_RC8 : 1;
3390 unsigned : 1;
3393 struct
3395 unsigned : 1;
3396 unsigned : 1;
3397 unsigned : 1;
3398 unsigned : 1;
3399 unsigned : 1;
3400 unsigned : 1;
3401 unsigned RC8_9 : 1;
3402 unsigned : 1;
3405 struct
3407 unsigned : 1;
3408 unsigned : 1;
3409 unsigned : 1;
3410 unsigned : 1;
3411 unsigned : 1;
3412 unsigned : 1;
3413 unsigned RX91 : 1;
3414 unsigned : 1;
3416 } __RCSTA1bits_t;
3418 extern __at(0x0FAB) volatile __RCSTA1bits_t RCSTA1bits;
3420 #define _RCSTA1_RX9D 0x01
3421 #define _RCSTA1_RCD8 0x01
3422 #define _RCSTA1_RX9D1 0x01
3423 #define _RCSTA1_OERR 0x02
3424 #define _RCSTA1_OERR1 0x02
3425 #define _RCSTA1_FERR 0x04
3426 #define _RCSTA1_FERR1 0x04
3427 #define _RCSTA1_ADDEN 0x08
3428 #define _RCSTA1_ADDEN1 0x08
3429 #define _RCSTA1_CREN 0x10
3430 #define _RCSTA1_CREN1 0x10
3431 #define _RCSTA1_SREN 0x20
3432 #define _RCSTA1_SREN1 0x20
3433 #define _RCSTA1_RX9 0x40
3434 #define _RCSTA1_RC9 0x40
3435 #define _RCSTA1_NOT_RC8 0x40
3436 #define _RCSTA1_RC8_9 0x40
3437 #define _RCSTA1_RX91 0x40
3438 #define _RCSTA1_SPEN 0x80
3439 #define _RCSTA1_SPEN1 0x80
3441 //==============================================================================
3444 //==============================================================================
3445 // TXSTA Bits
3447 extern __at(0x0FAC) __sfr TXSTA;
3449 typedef union
3451 struct
3453 unsigned TX9D : 1;
3454 unsigned TRMT : 1;
3455 unsigned BRGH : 1;
3456 unsigned SENDB : 1;
3457 unsigned SYNC : 1;
3458 unsigned TXEN : 1;
3459 unsigned TX9 : 1;
3460 unsigned CSRC : 1;
3463 struct
3465 unsigned TXD8 : 1;
3466 unsigned TRMT1 : 1;
3467 unsigned BRGH1 : 1;
3468 unsigned SENDB1 : 1;
3469 unsigned SYNC1 : 1;
3470 unsigned TXEN1 : 1;
3471 unsigned TX8_9 : 1;
3472 unsigned CSRC1 : 1;
3475 struct
3477 unsigned TX9D1 : 1;
3478 unsigned : 1;
3479 unsigned : 1;
3480 unsigned : 1;
3481 unsigned : 1;
3482 unsigned : 1;
3483 unsigned NOT_TX8 : 1;
3484 unsigned : 1;
3487 struct
3489 unsigned : 1;
3490 unsigned : 1;
3491 unsigned : 1;
3492 unsigned : 1;
3493 unsigned : 1;
3494 unsigned : 1;
3495 unsigned TX91 : 1;
3496 unsigned : 1;
3498 } __TXSTAbits_t;
3500 extern __at(0x0FAC) volatile __TXSTAbits_t TXSTAbits;
3502 #define _TX9D 0x01
3503 #define _TXD8 0x01
3504 #define _TX9D1 0x01
3505 #define _TRMT 0x02
3506 #define _TRMT1 0x02
3507 #define _BRGH 0x04
3508 #define _BRGH1 0x04
3509 #define _SENDB 0x08
3510 #define _SENDB1 0x08
3511 #define _SYNC 0x10
3512 #define _SYNC1 0x10
3513 #define _TXEN 0x20
3514 #define _TXEN1 0x20
3515 #define _TX9 0x40
3516 #define _TX8_9 0x40
3517 #define _NOT_TX8 0x40
3518 #define _TX91 0x40
3519 #define _CSRC 0x80
3520 #define _CSRC1 0x80
3522 //==============================================================================
3525 //==============================================================================
3526 // TXSTA1 Bits
3528 extern __at(0x0FAC) __sfr TXSTA1;
3530 typedef union
3532 struct
3534 unsigned TX9D : 1;
3535 unsigned TRMT : 1;
3536 unsigned BRGH : 1;
3537 unsigned SENDB : 1;
3538 unsigned SYNC : 1;
3539 unsigned TXEN : 1;
3540 unsigned TX9 : 1;
3541 unsigned CSRC : 1;
3544 struct
3546 unsigned TXD8 : 1;
3547 unsigned TRMT1 : 1;
3548 unsigned BRGH1 : 1;
3549 unsigned SENDB1 : 1;
3550 unsigned SYNC1 : 1;
3551 unsigned TXEN1 : 1;
3552 unsigned TX8_9 : 1;
3553 unsigned CSRC1 : 1;
3556 struct
3558 unsigned TX9D1 : 1;
3559 unsigned : 1;
3560 unsigned : 1;
3561 unsigned : 1;
3562 unsigned : 1;
3563 unsigned : 1;
3564 unsigned NOT_TX8 : 1;
3565 unsigned : 1;
3568 struct
3570 unsigned : 1;
3571 unsigned : 1;
3572 unsigned : 1;
3573 unsigned : 1;
3574 unsigned : 1;
3575 unsigned : 1;
3576 unsigned TX91 : 1;
3577 unsigned : 1;
3579 } __TXSTA1bits_t;
3581 extern __at(0x0FAC) volatile __TXSTA1bits_t TXSTA1bits;
3583 #define _TXSTA1_TX9D 0x01
3584 #define _TXSTA1_TXD8 0x01
3585 #define _TXSTA1_TX9D1 0x01
3586 #define _TXSTA1_TRMT 0x02
3587 #define _TXSTA1_TRMT1 0x02
3588 #define _TXSTA1_BRGH 0x04
3589 #define _TXSTA1_BRGH1 0x04
3590 #define _TXSTA1_SENDB 0x08
3591 #define _TXSTA1_SENDB1 0x08
3592 #define _TXSTA1_SYNC 0x10
3593 #define _TXSTA1_SYNC1 0x10
3594 #define _TXSTA1_TXEN 0x20
3595 #define _TXSTA1_TXEN1 0x20
3596 #define _TXSTA1_TX9 0x40
3597 #define _TXSTA1_TX8_9 0x40
3598 #define _TXSTA1_NOT_TX8 0x40
3599 #define _TXSTA1_TX91 0x40
3600 #define _TXSTA1_CSRC 0x80
3601 #define _TXSTA1_CSRC1 0x80
3603 //==============================================================================
3605 extern __at(0x0FAD) __sfr TXREG;
3606 extern __at(0x0FAD) __sfr TXREG1;
3607 extern __at(0x0FAE) __sfr RCREG;
3608 extern __at(0x0FAE) __sfr RCREG1;
3609 extern __at(0x0FAF) __sfr SPBRG;
3610 extern __at(0x0FAF) __sfr SPBRG1;
3612 //==============================================================================
3613 // PSPCON Bits
3615 extern __at(0x0FB0) __sfr PSPCON;
3617 typedef struct
3619 unsigned : 1;
3620 unsigned : 1;
3621 unsigned : 1;
3622 unsigned : 1;
3623 unsigned PSPMODE : 1;
3624 unsigned IBOV : 1;
3625 unsigned OBF : 1;
3626 unsigned IBF : 1;
3627 } __PSPCONbits_t;
3629 extern __at(0x0FB0) volatile __PSPCONbits_t PSPCONbits;
3631 #define _PSPMODE 0x10
3632 #define _IBOV 0x20
3633 #define _OBF 0x40
3634 #define _IBF 0x80
3636 //==============================================================================
3639 //==============================================================================
3640 // T3CON Bits
3642 extern __at(0x0FB1) __sfr T3CON;
3644 typedef union
3646 struct
3648 unsigned TMR3ON : 1;
3649 unsigned TMR3CS : 1;
3650 unsigned NOT_T3SYNC : 1;
3651 unsigned T3CCP1 : 1;
3652 unsigned T3CKPS0 : 1;
3653 unsigned T3CKPS1 : 1;
3654 unsigned T3CCP2 : 1;
3655 unsigned RD16 : 1;
3658 struct
3660 unsigned : 1;
3661 unsigned : 1;
3662 unsigned T3SYNC : 1;
3663 unsigned : 1;
3664 unsigned : 1;
3665 unsigned : 1;
3666 unsigned : 1;
3667 unsigned : 1;
3670 struct
3672 unsigned : 1;
3673 unsigned : 1;
3674 unsigned T3INSYNC : 1;
3675 unsigned : 1;
3676 unsigned : 1;
3677 unsigned : 1;
3678 unsigned : 1;
3679 unsigned : 1;
3682 struct
3684 unsigned : 4;
3685 unsigned T3CKPS : 2;
3686 unsigned : 2;
3688 } __T3CONbits_t;
3690 extern __at(0x0FB1) volatile __T3CONbits_t T3CONbits;
3692 #define _T3CON_TMR3ON 0x01
3693 #define _T3CON_TMR3CS 0x02
3694 #define _T3CON_NOT_T3SYNC 0x04
3695 #define _T3CON_T3SYNC 0x04
3696 #define _T3CON_T3INSYNC 0x04
3697 #define _T3CON_T3CCP1 0x08
3698 #define _T3CON_T3CKPS0 0x10
3699 #define _T3CON_T3CKPS1 0x20
3700 #define _T3CON_T3CCP2 0x40
3701 #define _T3CON_RD16 0x80
3703 //==============================================================================
3705 extern __at(0x0FB2) __sfr TMR3;
3706 extern __at(0x0FB2) __sfr TMR3L;
3707 extern __at(0x0FB3) __sfr TMR3H;
3709 //==============================================================================
3710 // CMCON Bits
3712 extern __at(0x0FB4) __sfr CMCON;
3714 typedef union
3716 struct
3718 unsigned CM0 : 1;
3719 unsigned CM1 : 1;
3720 unsigned CM2 : 1;
3721 unsigned CIS : 1;
3722 unsigned C1INV : 1;
3723 unsigned C2INV : 1;
3724 unsigned C1OUT : 1;
3725 unsigned C2OUT : 1;
3728 struct
3730 unsigned CM : 3;
3731 unsigned : 5;
3733 } __CMCONbits_t;
3735 extern __at(0x0FB4) volatile __CMCONbits_t CMCONbits;
3737 #define _CM0 0x01
3738 #define _CM1 0x02
3739 #define _CM2 0x04
3740 #define _CIS 0x08
3741 #define _C1INV 0x10
3742 #define _C2INV 0x20
3743 #define _C1OUT 0x40
3744 #define _C2OUT 0x80
3746 //==============================================================================
3749 //==============================================================================
3750 // CVRCON Bits
3752 extern __at(0x0FB5) __sfr CVRCON;
3754 typedef union
3756 struct
3758 unsigned CVR0 : 1;
3759 unsigned CVR1 : 1;
3760 unsigned CVR2 : 1;
3761 unsigned CVR3 : 1;
3762 unsigned CVRSS : 1;
3763 unsigned CVRR : 1;
3764 unsigned CVROE : 1;
3765 unsigned CVREN : 1;
3768 struct
3770 unsigned CVR : 4;
3771 unsigned : 4;
3773 } __CVRCONbits_t;
3775 extern __at(0x0FB5) volatile __CVRCONbits_t CVRCONbits;
3777 #define _CVR0 0x01
3778 #define _CVR1 0x02
3779 #define _CVR2 0x04
3780 #define _CVR3 0x08
3781 #define _CVRSS 0x10
3782 #define _CVRR 0x20
3783 #define _CVROE 0x40
3784 #define _CVREN 0x80
3786 //==============================================================================
3789 //==============================================================================
3790 // ECCP1AS Bits
3792 extern __at(0x0FB6) __sfr ECCP1AS;
3794 typedef union
3796 struct
3798 unsigned PSS1BD0 : 1;
3799 unsigned PSS1BD1 : 1;
3800 unsigned PSS1AC0 : 1;
3801 unsigned PSS1AC1 : 1;
3802 unsigned ECCP1AS0 : 1;
3803 unsigned ECCP1AS1 : 1;
3804 unsigned ECCP1AS2 : 1;
3805 unsigned ECCP1ASE : 1;
3808 struct
3810 unsigned PSSBD0 : 1;
3811 unsigned PSSBD1 : 1;
3812 unsigned PSSAC0 : 1;
3813 unsigned PSSAC1 : 1;
3814 unsigned ECCPAS0 : 1;
3815 unsigned ECCPAS1 : 1;
3816 unsigned ECCPAS2 : 1;
3817 unsigned ECCPASE : 1;
3820 struct
3822 unsigned PSS1BD : 2;
3823 unsigned : 6;
3826 struct
3828 unsigned PSSBD : 2;
3829 unsigned : 6;
3832 struct
3834 unsigned : 2;
3835 unsigned PSS1AC : 2;
3836 unsigned : 4;
3839 struct
3841 unsigned : 2;
3842 unsigned PSSAC : 2;
3843 unsigned : 4;
3846 struct
3848 unsigned : 4;
3849 unsigned ECCP1AS : 3;
3850 unsigned : 1;
3853 struct
3855 unsigned : 4;
3856 unsigned ECCPAS : 3;
3857 unsigned : 1;
3859 } __ECCP1ASbits_t;
3861 extern __at(0x0FB6) volatile __ECCP1ASbits_t ECCP1ASbits;
3863 #define _PSS1BD0 0x01
3864 #define _PSSBD0 0x01
3865 #define _PSS1BD1 0x02
3866 #define _PSSBD1 0x02
3867 #define _PSS1AC0 0x04
3868 #define _PSSAC0 0x04
3869 #define _PSS1AC1 0x08
3870 #define _PSSAC1 0x08
3871 #define _ECCP1AS0 0x10
3872 #define _ECCPAS0 0x10
3873 #define _ECCP1AS1 0x20
3874 #define _ECCPAS1 0x20
3875 #define _ECCP1AS2 0x40
3876 #define _ECCPAS2 0x40
3877 #define _ECCP1ASE 0x80
3878 #define _ECCPASE 0x80
3880 //==============================================================================
3883 //==============================================================================
3884 // CCP3CON Bits
3886 extern __at(0x0FB7) __sfr CCP3CON;
3888 typedef union
3890 struct
3892 unsigned CCP3M0 : 1;
3893 unsigned CCP3M1 : 1;
3894 unsigned CCP3M2 : 1;
3895 unsigned CCP3M3 : 1;
3896 unsigned DC3B0 : 1;
3897 unsigned DC3B1 : 1;
3898 unsigned P3M0 : 1;
3899 unsigned P3M1 : 1;
3902 struct
3904 unsigned : 1;
3905 unsigned : 1;
3906 unsigned : 1;
3907 unsigned : 1;
3908 unsigned CCP3Y : 1;
3909 unsigned CCP3X : 1;
3910 unsigned : 1;
3911 unsigned : 1;
3914 struct
3916 unsigned CCP3M : 4;
3917 unsigned : 4;
3920 struct
3922 unsigned : 4;
3923 unsigned DC3B : 2;
3924 unsigned : 2;
3927 struct
3929 unsigned : 6;
3930 unsigned P3M : 2;
3932 } __CCP3CONbits_t;
3934 extern __at(0x0FB7) volatile __CCP3CONbits_t CCP3CONbits;
3936 #define _CCP3M0 0x01
3937 #define _CCP3M1 0x02
3938 #define _CCP3M2 0x04
3939 #define _CCP3M3 0x08
3940 #define _DC3B0 0x10
3941 #define _CCP3Y 0x10
3942 #define _DC3B1 0x20
3943 #define _CCP3X 0x20
3944 #define _P3M0 0x40
3945 #define _P3M1 0x80
3947 //==============================================================================
3950 //==============================================================================
3951 // ECCP3CON Bits
3953 extern __at(0x0FB7) __sfr ECCP3CON;
3955 typedef union
3957 struct
3959 unsigned CCP3M0 : 1;
3960 unsigned CCP3M1 : 1;
3961 unsigned CCP3M2 : 1;
3962 unsigned CCP3M3 : 1;
3963 unsigned DC3B0 : 1;
3964 unsigned DC3B1 : 1;
3965 unsigned P3M0 : 1;
3966 unsigned P3M1 : 1;
3969 struct
3971 unsigned : 1;
3972 unsigned : 1;
3973 unsigned : 1;
3974 unsigned : 1;
3975 unsigned CCP3Y : 1;
3976 unsigned CCP3X : 1;
3977 unsigned : 1;
3978 unsigned : 1;
3981 struct
3983 unsigned CCP3M : 4;
3984 unsigned : 4;
3987 struct
3989 unsigned : 4;
3990 unsigned DC3B : 2;
3991 unsigned : 2;
3994 struct
3996 unsigned : 6;
3997 unsigned P3M : 2;
3999 } __ECCP3CONbits_t;
4001 extern __at(0x0FB7) volatile __ECCP3CONbits_t ECCP3CONbits;
4003 #define _ECCP3CON_CCP3M0 0x01
4004 #define _ECCP3CON_CCP3M1 0x02
4005 #define _ECCP3CON_CCP3M2 0x04
4006 #define _ECCP3CON_CCP3M3 0x08
4007 #define _ECCP3CON_DC3B0 0x10
4008 #define _ECCP3CON_CCP3Y 0x10
4009 #define _ECCP3CON_DC3B1 0x20
4010 #define _ECCP3CON_CCP3X 0x20
4011 #define _ECCP3CON_P3M0 0x40
4012 #define _ECCP3CON_P3M1 0x80
4014 //==============================================================================
4016 extern __at(0x0FB8) __sfr CCPR3;
4017 extern __at(0x0FB8) __sfr CCPR3L;
4018 extern __at(0x0FB9) __sfr CCPR3H;
4020 //==============================================================================
4021 // CCP2CON Bits
4023 extern __at(0x0FBA) __sfr CCP2CON;
4025 typedef union
4027 struct
4029 unsigned CCP2M0 : 1;
4030 unsigned CCP2M1 : 1;
4031 unsigned CCP2M2 : 1;
4032 unsigned CCP2M3 : 1;
4033 unsigned DC2B0 : 1;
4034 unsigned DC2B1 : 1;
4035 unsigned P2M0 : 1;
4036 unsigned P2M1 : 1;
4039 struct
4041 unsigned : 1;
4042 unsigned : 1;
4043 unsigned : 1;
4044 unsigned : 1;
4045 unsigned CCP2Y : 1;
4046 unsigned CCP2X : 1;
4047 unsigned : 1;
4048 unsigned : 1;
4051 struct
4053 unsigned CCP2M : 4;
4054 unsigned : 4;
4057 struct
4059 unsigned : 4;
4060 unsigned DC2B : 2;
4061 unsigned : 2;
4064 struct
4066 unsigned : 6;
4067 unsigned P2M : 2;
4069 } __CCP2CONbits_t;
4071 extern __at(0x0FBA) volatile __CCP2CONbits_t CCP2CONbits;
4073 #define _CCP2M0 0x01
4074 #define _CCP2M1 0x02
4075 #define _CCP2M2 0x04
4076 #define _CCP2M3 0x08
4077 #define _DC2B0 0x10
4078 #define _CCP2Y 0x10
4079 #define _DC2B1 0x20
4080 #define _CCP2X 0x20
4081 #define _P2M0 0x40
4082 #define _P2M1 0x80
4084 //==============================================================================
4087 //==============================================================================
4088 // ECCP2CON Bits
4090 extern __at(0x0FBA) __sfr ECCP2CON;
4092 typedef union
4094 struct
4096 unsigned CCP2M0 : 1;
4097 unsigned CCP2M1 : 1;
4098 unsigned CCP2M2 : 1;
4099 unsigned CCP2M3 : 1;
4100 unsigned DC2B0 : 1;
4101 unsigned DC2B1 : 1;
4102 unsigned P2M0 : 1;
4103 unsigned P2M1 : 1;
4106 struct
4108 unsigned : 1;
4109 unsigned : 1;
4110 unsigned : 1;
4111 unsigned : 1;
4112 unsigned CCP2Y : 1;
4113 unsigned CCP2X : 1;
4114 unsigned : 1;
4115 unsigned : 1;
4118 struct
4120 unsigned CCP2M : 4;
4121 unsigned : 4;
4124 struct
4126 unsigned : 4;
4127 unsigned DC2B : 2;
4128 unsigned : 2;
4131 struct
4133 unsigned : 6;
4134 unsigned P2M : 2;
4136 } __ECCP2CONbits_t;
4138 extern __at(0x0FBA) volatile __ECCP2CONbits_t ECCP2CONbits;
4140 #define _ECCP2CON_CCP2M0 0x01
4141 #define _ECCP2CON_CCP2M1 0x02
4142 #define _ECCP2CON_CCP2M2 0x04
4143 #define _ECCP2CON_CCP2M3 0x08
4144 #define _ECCP2CON_DC2B0 0x10
4145 #define _ECCP2CON_CCP2Y 0x10
4146 #define _ECCP2CON_DC2B1 0x20
4147 #define _ECCP2CON_CCP2X 0x20
4148 #define _ECCP2CON_P2M0 0x40
4149 #define _ECCP2CON_P2M1 0x80
4151 //==============================================================================
4153 extern __at(0x0FBB) __sfr CCPR2;
4154 extern __at(0x0FBB) __sfr CCPR2L;
4155 extern __at(0x0FBC) __sfr CCPR2H;
4157 //==============================================================================
4158 // CCP1CON Bits
4160 extern __at(0x0FBD) __sfr CCP1CON;
4162 typedef union
4164 struct
4166 unsigned CCP1M0 : 1;
4167 unsigned CCP1M1 : 1;
4168 unsigned CCP1M2 : 1;
4169 unsigned CCP1M3 : 1;
4170 unsigned DC1B0 : 1;
4171 unsigned DC1B1 : 1;
4172 unsigned P1M0 : 1;
4173 unsigned P1M1 : 1;
4176 struct
4178 unsigned : 1;
4179 unsigned : 1;
4180 unsigned : 1;
4181 unsigned : 1;
4182 unsigned CCP1Y : 1;
4183 unsigned CCP1X : 1;
4184 unsigned : 1;
4185 unsigned : 1;
4188 struct
4190 unsigned CCP1M : 4;
4191 unsigned : 4;
4194 struct
4196 unsigned : 4;
4197 unsigned DC1B : 2;
4198 unsigned : 2;
4201 struct
4203 unsigned : 6;
4204 unsigned P1M : 2;
4206 } __CCP1CONbits_t;
4208 extern __at(0x0FBD) volatile __CCP1CONbits_t CCP1CONbits;
4210 #define _CCP1M0 0x01
4211 #define _CCP1M1 0x02
4212 #define _CCP1M2 0x04
4213 #define _CCP1M3 0x08
4214 #define _DC1B0 0x10
4215 #define _CCP1Y 0x10
4216 #define _DC1B1 0x20
4217 #define _CCP1X 0x20
4218 #define _P1M0 0x40
4219 #define _P1M1 0x80
4221 //==============================================================================
4224 //==============================================================================
4225 // ECCP1CON Bits
4227 extern __at(0x0FBD) __sfr ECCP1CON;
4229 typedef union
4231 struct
4233 unsigned CCP1M0 : 1;
4234 unsigned CCP1M1 : 1;
4235 unsigned CCP1M2 : 1;
4236 unsigned CCP1M3 : 1;
4237 unsigned DC1B0 : 1;
4238 unsigned DC1B1 : 1;
4239 unsigned P1M0 : 1;
4240 unsigned P1M1 : 1;
4243 struct
4245 unsigned : 1;
4246 unsigned : 1;
4247 unsigned : 1;
4248 unsigned : 1;
4249 unsigned CCP1Y : 1;
4250 unsigned CCP1X : 1;
4251 unsigned : 1;
4252 unsigned : 1;
4255 struct
4257 unsigned CCP1M : 4;
4258 unsigned : 4;
4261 struct
4263 unsigned : 4;
4264 unsigned DC1B : 2;
4265 unsigned : 2;
4268 struct
4270 unsigned : 6;
4271 unsigned P1M : 2;
4273 } __ECCP1CONbits_t;
4275 extern __at(0x0FBD) volatile __ECCP1CONbits_t ECCP1CONbits;
4277 #define _ECCP1CON_CCP1M0 0x01
4278 #define _ECCP1CON_CCP1M1 0x02
4279 #define _ECCP1CON_CCP1M2 0x04
4280 #define _ECCP1CON_CCP1M3 0x08
4281 #define _ECCP1CON_DC1B0 0x10
4282 #define _ECCP1CON_CCP1Y 0x10
4283 #define _ECCP1CON_DC1B1 0x20
4284 #define _ECCP1CON_CCP1X 0x20
4285 #define _ECCP1CON_P1M0 0x40
4286 #define _ECCP1CON_P1M1 0x80
4288 //==============================================================================
4290 extern __at(0x0FBE) __sfr CCPR1;
4291 extern __at(0x0FBE) __sfr CCPR1L;
4292 extern __at(0x0FBF) __sfr CCPR1H;
4294 //==============================================================================
4295 // ADCON2 Bits
4297 extern __at(0x0FC0) __sfr ADCON2;
4299 typedef union
4301 struct
4303 unsigned ADCS0 : 1;
4304 unsigned ADCS1 : 1;
4305 unsigned ADCS2 : 1;
4306 unsigned ACQT0 : 1;
4307 unsigned ACQT1 : 1;
4308 unsigned ACQT2 : 1;
4309 unsigned : 1;
4310 unsigned ADFM : 1;
4313 struct
4315 unsigned ADCS : 3;
4316 unsigned : 5;
4319 struct
4321 unsigned : 3;
4322 unsigned ACQT : 3;
4323 unsigned : 2;
4325 } __ADCON2bits_t;
4327 extern __at(0x0FC0) volatile __ADCON2bits_t ADCON2bits;
4329 #define _ADCS0 0x01
4330 #define _ADCS1 0x02
4331 #define _ADCS2 0x04
4332 #define _ACQT0 0x08
4333 #define _ACQT1 0x10
4334 #define _ACQT2 0x20
4335 #define _ADFM 0x80
4337 //==============================================================================
4340 //==============================================================================
4341 // ADCON1 Bits
4343 extern __at(0x0FC1) __sfr ADCON1;
4345 typedef union
4347 struct
4349 unsigned PCFG0 : 1;
4350 unsigned PCFG1 : 1;
4351 unsigned PCFG2 : 1;
4352 unsigned PCFG3 : 1;
4353 unsigned VCFG0 : 1;
4354 unsigned VCFG1 : 1;
4355 unsigned : 1;
4356 unsigned : 1;
4359 struct
4361 unsigned PCFG : 4;
4362 unsigned : 4;
4365 struct
4367 unsigned : 4;
4368 unsigned VCFG : 2;
4369 unsigned : 2;
4371 } __ADCON1bits_t;
4373 extern __at(0x0FC1) volatile __ADCON1bits_t ADCON1bits;
4375 #define _PCFG0 0x01
4376 #define _PCFG1 0x02
4377 #define _PCFG2 0x04
4378 #define _PCFG3 0x08
4379 #define _VCFG0 0x10
4380 #define _VCFG1 0x20
4382 //==============================================================================
4385 //==============================================================================
4386 // ADCON0 Bits
4388 extern __at(0x0FC2) __sfr ADCON0;
4390 typedef union
4392 struct
4394 unsigned ADON : 1;
4395 unsigned GO_NOT_DONE : 1;
4396 unsigned CHS0 : 1;
4397 unsigned CHS1 : 1;
4398 unsigned CHS2 : 1;
4399 unsigned CHS3 : 1;
4400 unsigned : 1;
4401 unsigned : 1;
4404 struct
4406 unsigned : 1;
4407 unsigned DONE : 1;
4408 unsigned : 1;
4409 unsigned : 1;
4410 unsigned : 1;
4411 unsigned : 1;
4412 unsigned : 1;
4413 unsigned : 1;
4416 struct
4418 unsigned : 1;
4419 unsigned GO_DONE : 1;
4420 unsigned : 1;
4421 unsigned : 1;
4422 unsigned : 1;
4423 unsigned : 1;
4424 unsigned : 1;
4425 unsigned : 1;
4428 struct
4430 unsigned : 1;
4431 unsigned GO : 1;
4432 unsigned : 1;
4433 unsigned : 1;
4434 unsigned : 1;
4435 unsigned : 1;
4436 unsigned : 1;
4437 unsigned : 1;
4440 struct
4442 unsigned : 1;
4443 unsigned NOT_DONE : 1;
4444 unsigned : 1;
4445 unsigned : 1;
4446 unsigned : 1;
4447 unsigned : 1;
4448 unsigned : 1;
4449 unsigned : 1;
4452 struct
4454 unsigned : 2;
4455 unsigned CHS : 4;
4456 unsigned : 2;
4458 } __ADCON0bits_t;
4460 extern __at(0x0FC2) volatile __ADCON0bits_t ADCON0bits;
4462 #define _ADON 0x01
4463 #define _GO_NOT_DONE 0x02
4464 #define _DONE 0x02
4465 #define _GO_DONE 0x02
4466 #define _GO 0x02
4467 #define _NOT_DONE 0x02
4468 #define _CHS0 0x04
4469 #define _CHS1 0x08
4470 #define _CHS2 0x10
4471 #define _CHS3 0x20
4473 //==============================================================================
4475 extern __at(0x0FC3) __sfr ADRES;
4476 extern __at(0x0FC3) __sfr ADRESL;
4477 extern __at(0x0FC4) __sfr ADRESH;
4479 //==============================================================================
4480 // SSP1CON2 Bits
4482 extern __at(0x0FC5) __sfr SSP1CON2;
4484 typedef struct
4486 unsigned SEN : 1;
4487 unsigned RSEN : 1;
4488 unsigned PEN : 1;
4489 unsigned RCEN : 1;
4490 unsigned ACKEN : 1;
4491 unsigned ACKDT : 1;
4492 unsigned ACKSTAT : 1;
4493 unsigned GCEN : 1;
4494 } __SSP1CON2bits_t;
4496 extern __at(0x0FC5) volatile __SSP1CON2bits_t SSP1CON2bits;
4498 #define _SEN 0x01
4499 #define _RSEN 0x02
4500 #define _PEN 0x04
4501 #define _RCEN 0x08
4502 #define _ACKEN 0x10
4503 #define _ACKDT 0x20
4504 #define _ACKSTAT 0x40
4505 #define _GCEN 0x80
4507 //==============================================================================
4510 //==============================================================================
4511 // SSPCON2 Bits
4513 extern __at(0x0FC5) __sfr SSPCON2;
4515 typedef struct
4517 unsigned SEN : 1;
4518 unsigned RSEN : 1;
4519 unsigned PEN : 1;
4520 unsigned RCEN : 1;
4521 unsigned ACKEN : 1;
4522 unsigned ACKDT : 1;
4523 unsigned ACKSTAT : 1;
4524 unsigned GCEN : 1;
4525 } __SSPCON2bits_t;
4527 extern __at(0x0FC5) volatile __SSPCON2bits_t SSPCON2bits;
4529 #define _SSPCON2_SEN 0x01
4530 #define _SSPCON2_RSEN 0x02
4531 #define _SSPCON2_PEN 0x04
4532 #define _SSPCON2_RCEN 0x08
4533 #define _SSPCON2_ACKEN 0x10
4534 #define _SSPCON2_ACKDT 0x20
4535 #define _SSPCON2_ACKSTAT 0x40
4536 #define _SSPCON2_GCEN 0x80
4538 //==============================================================================
4541 //==============================================================================
4542 // SSP1CON1 Bits
4544 extern __at(0x0FC6) __sfr SSP1CON1;
4546 typedef union
4548 struct
4550 unsigned SSPM0 : 1;
4551 unsigned SSPM1 : 1;
4552 unsigned SSPM2 : 1;
4553 unsigned SSPM3 : 1;
4554 unsigned CKP : 1;
4555 unsigned SSPEN : 1;
4556 unsigned SSPOV : 1;
4557 unsigned WCOL : 1;
4560 struct
4562 unsigned SSPM : 4;
4563 unsigned : 4;
4565 } __SSP1CON1bits_t;
4567 extern __at(0x0FC6) volatile __SSP1CON1bits_t SSP1CON1bits;
4569 #define _SSPM0 0x01
4570 #define _SSPM1 0x02
4571 #define _SSPM2 0x04
4572 #define _SSPM3 0x08
4573 #define _CKP 0x10
4574 #define _SSPEN 0x20
4575 #define _SSPOV 0x40
4576 #define _WCOL 0x80
4578 //==============================================================================
4581 //==============================================================================
4582 // SSPCON1 Bits
4584 extern __at(0x0FC6) __sfr SSPCON1;
4586 typedef union
4588 struct
4590 unsigned SSPM0 : 1;
4591 unsigned SSPM1 : 1;
4592 unsigned SSPM2 : 1;
4593 unsigned SSPM3 : 1;
4594 unsigned CKP : 1;
4595 unsigned SSPEN : 1;
4596 unsigned SSPOV : 1;
4597 unsigned WCOL : 1;
4600 struct
4602 unsigned SSPM : 4;
4603 unsigned : 4;
4605 } __SSPCON1bits_t;
4607 extern __at(0x0FC6) volatile __SSPCON1bits_t SSPCON1bits;
4609 #define _SSPCON1_SSPM0 0x01
4610 #define _SSPCON1_SSPM1 0x02
4611 #define _SSPCON1_SSPM2 0x04
4612 #define _SSPCON1_SSPM3 0x08
4613 #define _SSPCON1_CKP 0x10
4614 #define _SSPCON1_SSPEN 0x20
4615 #define _SSPCON1_SSPOV 0x40
4616 #define _SSPCON1_WCOL 0x80
4618 //==============================================================================
4621 //==============================================================================
4622 // SSP1STAT Bits
4624 extern __at(0x0FC7) __sfr SSP1STAT;
4626 typedef union
4628 struct
4630 unsigned BF : 1;
4631 unsigned UA : 1;
4632 unsigned R_NOT_W : 1;
4633 unsigned S : 1;
4634 unsigned P : 1;
4635 unsigned D_NOT_A : 1;
4636 unsigned CKE : 1;
4637 unsigned SMP : 1;
4640 struct
4642 unsigned : 1;
4643 unsigned : 1;
4644 unsigned R_W : 1;
4645 unsigned I2C_START : 1;
4646 unsigned I2C_STOP : 1;
4647 unsigned D_A : 1;
4648 unsigned : 1;
4649 unsigned : 1;
4652 struct
4654 unsigned : 1;
4655 unsigned : 1;
4656 unsigned I2C_READ : 1;
4657 unsigned : 1;
4658 unsigned : 1;
4659 unsigned I2C_DAT : 1;
4660 unsigned : 1;
4661 unsigned : 1;
4664 struct
4666 unsigned : 1;
4667 unsigned : 1;
4668 unsigned NOT_W : 1;
4669 unsigned : 1;
4670 unsigned : 1;
4671 unsigned NOT_A : 1;
4672 unsigned : 1;
4673 unsigned : 1;
4676 struct
4678 unsigned : 1;
4679 unsigned : 1;
4680 unsigned NOT_WRITE : 1;
4681 unsigned : 1;
4682 unsigned : 1;
4683 unsigned NOT_ADDRESS : 1;
4684 unsigned : 1;
4685 unsigned : 1;
4688 struct
4690 unsigned : 1;
4691 unsigned : 1;
4692 unsigned READ_WRITE : 1;
4693 unsigned : 1;
4694 unsigned : 1;
4695 unsigned DATA_ADDRESS : 1;
4696 unsigned : 1;
4697 unsigned : 1;
4700 struct
4702 unsigned : 1;
4703 unsigned : 1;
4704 unsigned R : 1;
4705 unsigned : 1;
4706 unsigned : 1;
4707 unsigned D : 1;
4708 unsigned : 1;
4709 unsigned : 1;
4711 } __SSP1STATbits_t;
4713 extern __at(0x0FC7) volatile __SSP1STATbits_t SSP1STATbits;
4715 #define _BF 0x01
4716 #define _UA 0x02
4717 #define _R_NOT_W 0x04
4718 #define _R_W 0x04
4719 #define _I2C_READ 0x04
4720 #define _NOT_W 0x04
4721 #define _NOT_WRITE 0x04
4722 #define _READ_WRITE 0x04
4723 #define _R 0x04
4724 #define _S 0x08
4725 #define _I2C_START 0x08
4726 #define _P 0x10
4727 #define _I2C_STOP 0x10
4728 #define _D_NOT_A 0x20
4729 #define _D_A 0x20
4730 #define _I2C_DAT 0x20
4731 #define _NOT_A 0x20
4732 #define _NOT_ADDRESS 0x20
4733 #define _DATA_ADDRESS 0x20
4734 #define _D 0x20
4735 #define _CKE 0x40
4736 #define _SMP 0x80
4738 //==============================================================================
4741 //==============================================================================
4742 // SSPSTAT Bits
4744 extern __at(0x0FC7) __sfr SSPSTAT;
4746 typedef union
4748 struct
4750 unsigned BF : 1;
4751 unsigned UA : 1;
4752 unsigned R_NOT_W : 1;
4753 unsigned S : 1;
4754 unsigned P : 1;
4755 unsigned D_NOT_A : 1;
4756 unsigned CKE : 1;
4757 unsigned SMP : 1;
4760 struct
4762 unsigned : 1;
4763 unsigned : 1;
4764 unsigned R_W : 1;
4765 unsigned I2C_START : 1;
4766 unsigned I2C_STOP : 1;
4767 unsigned D_A : 1;
4768 unsigned : 1;
4769 unsigned : 1;
4772 struct
4774 unsigned : 1;
4775 unsigned : 1;
4776 unsigned I2C_READ : 1;
4777 unsigned : 1;
4778 unsigned : 1;
4779 unsigned I2C_DAT : 1;
4780 unsigned : 1;
4781 unsigned : 1;
4784 struct
4786 unsigned : 1;
4787 unsigned : 1;
4788 unsigned NOT_W : 1;
4789 unsigned : 1;
4790 unsigned : 1;
4791 unsigned NOT_A : 1;
4792 unsigned : 1;
4793 unsigned : 1;
4796 struct
4798 unsigned : 1;
4799 unsigned : 1;
4800 unsigned NOT_WRITE : 1;
4801 unsigned : 1;
4802 unsigned : 1;
4803 unsigned NOT_ADDRESS : 1;
4804 unsigned : 1;
4805 unsigned : 1;
4808 struct
4810 unsigned : 1;
4811 unsigned : 1;
4812 unsigned READ_WRITE : 1;
4813 unsigned : 1;
4814 unsigned : 1;
4815 unsigned DATA_ADDRESS : 1;
4816 unsigned : 1;
4817 unsigned : 1;
4820 struct
4822 unsigned : 1;
4823 unsigned : 1;
4824 unsigned R : 1;
4825 unsigned : 1;
4826 unsigned : 1;
4827 unsigned D : 1;
4828 unsigned : 1;
4829 unsigned : 1;
4831 } __SSPSTATbits_t;
4833 extern __at(0x0FC7) volatile __SSPSTATbits_t SSPSTATbits;
4835 #define _SSPSTAT_BF 0x01
4836 #define _SSPSTAT_UA 0x02
4837 #define _SSPSTAT_R_NOT_W 0x04
4838 #define _SSPSTAT_R_W 0x04
4839 #define _SSPSTAT_I2C_READ 0x04
4840 #define _SSPSTAT_NOT_W 0x04
4841 #define _SSPSTAT_NOT_WRITE 0x04
4842 #define _SSPSTAT_READ_WRITE 0x04
4843 #define _SSPSTAT_R 0x04
4844 #define _SSPSTAT_S 0x08
4845 #define _SSPSTAT_I2C_START 0x08
4846 #define _SSPSTAT_P 0x10
4847 #define _SSPSTAT_I2C_STOP 0x10
4848 #define _SSPSTAT_D_NOT_A 0x20
4849 #define _SSPSTAT_D_A 0x20
4850 #define _SSPSTAT_I2C_DAT 0x20
4851 #define _SSPSTAT_NOT_A 0x20
4852 #define _SSPSTAT_NOT_ADDRESS 0x20
4853 #define _SSPSTAT_DATA_ADDRESS 0x20
4854 #define _SSPSTAT_D 0x20
4855 #define _SSPSTAT_CKE 0x40
4856 #define _SSPSTAT_SMP 0x80
4858 //==============================================================================
4860 extern __at(0x0FC8) __sfr SSP1ADD;
4861 extern __at(0x0FC8) __sfr SSPADD;
4862 extern __at(0x0FC9) __sfr SSP1BUF;
4863 extern __at(0x0FC9) __sfr SSPBUF;
4865 //==============================================================================
4866 // T2CON Bits
4868 extern __at(0x0FCA) __sfr T2CON;
4870 typedef union
4872 struct
4874 unsigned T2CKPS0 : 1;
4875 unsigned T2CKPS1 : 1;
4876 unsigned TMR2ON : 1;
4877 unsigned T2OUTPS0 : 1;
4878 unsigned T2OUTPS1 : 1;
4879 unsigned T2OUTPS2 : 1;
4880 unsigned T2OUTPS3 : 1;
4881 unsigned : 1;
4884 struct
4886 unsigned T2CKPS : 2;
4887 unsigned : 6;
4890 struct
4892 unsigned : 3;
4893 unsigned T2OUTPS : 4;
4894 unsigned : 1;
4896 } __T2CONbits_t;
4898 extern __at(0x0FCA) volatile __T2CONbits_t T2CONbits;
4900 #define _T2CKPS0 0x01
4901 #define _T2CKPS1 0x02
4902 #define _TMR2ON 0x04
4903 #define _T2OUTPS0 0x08
4904 #define _T2OUTPS1 0x10
4905 #define _T2OUTPS2 0x20
4906 #define _T2OUTPS3 0x40
4908 //==============================================================================
4910 extern __at(0x0FCB) __sfr PR2;
4911 extern __at(0x0FCC) __sfr TMR2;
4913 //==============================================================================
4914 // T1CON Bits
4916 extern __at(0x0FCD) __sfr T1CON;
4918 typedef union
4920 struct
4922 unsigned TMR1ON : 1;
4923 unsigned TMR1CS : 1;
4924 unsigned NOT_T1SYNC : 1;
4925 unsigned T1OSCEN : 1;
4926 unsigned T1CKPS0 : 1;
4927 unsigned T1CKPS1 : 1;
4928 unsigned T1RUN : 1;
4929 unsigned RD16 : 1;
4932 struct
4934 unsigned : 1;
4935 unsigned : 1;
4936 unsigned T1SYNC : 1;
4937 unsigned : 1;
4938 unsigned : 1;
4939 unsigned : 1;
4940 unsigned : 1;
4941 unsigned : 1;
4944 struct
4946 unsigned : 1;
4947 unsigned : 1;
4948 unsigned T1INSYNC : 1;
4949 unsigned : 1;
4950 unsigned : 1;
4951 unsigned : 1;
4952 unsigned : 1;
4953 unsigned : 1;
4956 struct
4958 unsigned : 4;
4959 unsigned T1CKPS : 2;
4960 unsigned : 2;
4962 } __T1CONbits_t;
4964 extern __at(0x0FCD) volatile __T1CONbits_t T1CONbits;
4966 #define _TMR1ON 0x01
4967 #define _TMR1CS 0x02
4968 #define _NOT_T1SYNC 0x04
4969 #define _T1SYNC 0x04
4970 #define _T1INSYNC 0x04
4971 #define _T1OSCEN 0x08
4972 #define _T1CKPS0 0x10
4973 #define _T1CKPS1 0x20
4974 #define _T1RUN 0x40
4975 #define _RD16 0x80
4977 //==============================================================================
4979 extern __at(0x0FCE) __sfr TMR1;
4980 extern __at(0x0FCE) __sfr TMR1L;
4981 extern __at(0x0FCF) __sfr TMR1H;
4983 //==============================================================================
4984 // RCON Bits
4986 extern __at(0x0FD0) __sfr RCON;
4988 typedef union
4990 struct
4992 unsigned NOT_BOR : 1;
4993 unsigned NOT_POR : 1;
4994 unsigned NOT_PD : 1;
4995 unsigned NOT_TO : 1;
4996 unsigned NOT_RI : 1;
4997 unsigned : 1;
4998 unsigned SBOREN : 1;
4999 unsigned IPEN : 1;
5002 struct
5004 unsigned BOR : 1;
5005 unsigned POR : 1;
5006 unsigned PD : 1;
5007 unsigned TO : 1;
5008 unsigned RI : 1;
5009 unsigned : 1;
5010 unsigned : 1;
5011 unsigned : 1;
5013 } __RCONbits_t;
5015 extern __at(0x0FD0) volatile __RCONbits_t RCONbits;
5017 #define _NOT_BOR 0x01
5018 #define _BOR 0x01
5019 #define _NOT_POR 0x02
5020 #define _POR 0x02
5021 #define _NOT_PD 0x04
5022 #define _PD 0x04
5023 #define _NOT_TO 0x08
5024 #define _TO 0x08
5025 #define _NOT_RI 0x10
5026 #define _RI 0x10
5027 #define _SBOREN 0x40
5028 #define _IPEN 0x80
5030 //==============================================================================
5033 //==============================================================================
5034 // WDTCON Bits
5036 extern __at(0x0FD1) __sfr WDTCON;
5038 typedef union
5040 struct
5042 unsigned SWDTEN : 1;
5043 unsigned : 1;
5044 unsigned : 1;
5045 unsigned : 1;
5046 unsigned : 1;
5047 unsigned : 1;
5048 unsigned : 1;
5049 unsigned : 1;
5052 struct
5054 unsigned SWDTE : 1;
5055 unsigned : 1;
5056 unsigned : 1;
5057 unsigned : 1;
5058 unsigned : 1;
5059 unsigned : 1;
5060 unsigned : 1;
5061 unsigned : 1;
5063 } __WDTCONbits_t;
5065 extern __at(0x0FD1) volatile __WDTCONbits_t WDTCONbits;
5067 #define _SWDTEN 0x01
5068 #define _SWDTE 0x01
5070 //==============================================================================
5073 //==============================================================================
5074 // HLVDCON Bits
5076 extern __at(0x0FD2) __sfr HLVDCON;
5078 typedef union
5080 struct
5082 unsigned HLVDL0 : 1;
5083 unsigned HLVDL1 : 1;
5084 unsigned HLVDL2 : 1;
5085 unsigned HLVDL3 : 1;
5086 unsigned HLVDEN : 1;
5087 unsigned IRVST : 1;
5088 unsigned : 1;
5089 unsigned VDIRMAG : 1;
5092 struct
5094 unsigned LVV0 : 1;
5095 unsigned LVV1 : 1;
5096 unsigned LVV2 : 1;
5097 unsigned LVV3 : 1;
5098 unsigned LVDEN : 1;
5099 unsigned IVRST : 1;
5100 unsigned : 1;
5101 unsigned : 1;
5104 struct
5106 unsigned LVDL0 : 1;
5107 unsigned LVDL1 : 1;
5108 unsigned LVDL2 : 1;
5109 unsigned LVDL3 : 1;
5110 unsigned : 1;
5111 unsigned BGST : 1;
5112 unsigned : 1;
5113 unsigned : 1;
5116 struct
5118 unsigned HLVDL : 4;
5119 unsigned : 4;
5122 struct
5124 unsigned LVDL : 4;
5125 unsigned : 4;
5128 struct
5130 unsigned LVV : 4;
5131 unsigned : 4;
5133 } __HLVDCONbits_t;
5135 extern __at(0x0FD2) volatile __HLVDCONbits_t HLVDCONbits;
5137 #define _HLVDL0 0x01
5138 #define _LVV0 0x01
5139 #define _LVDL0 0x01
5140 #define _HLVDL1 0x02
5141 #define _LVV1 0x02
5142 #define _LVDL1 0x02
5143 #define _HLVDL2 0x04
5144 #define _LVV2 0x04
5145 #define _LVDL2 0x04
5146 #define _HLVDL3 0x08
5147 #define _LVV3 0x08
5148 #define _LVDL3 0x08
5149 #define _HLVDEN 0x10
5150 #define _LVDEN 0x10
5151 #define _IRVST 0x20
5152 #define _IVRST 0x20
5153 #define _BGST 0x20
5154 #define _VDIRMAG 0x80
5156 //==============================================================================
5159 //==============================================================================
5160 // LVDCON Bits
5162 extern __at(0x0FD2) __sfr LVDCON;
5164 typedef union
5166 struct
5168 unsigned HLVDL0 : 1;
5169 unsigned HLVDL1 : 1;
5170 unsigned HLVDL2 : 1;
5171 unsigned HLVDL3 : 1;
5172 unsigned HLVDEN : 1;
5173 unsigned IRVST : 1;
5174 unsigned : 1;
5175 unsigned VDIRMAG : 1;
5178 struct
5180 unsigned LVV0 : 1;
5181 unsigned LVV1 : 1;
5182 unsigned LVV2 : 1;
5183 unsigned LVV3 : 1;
5184 unsigned LVDEN : 1;
5185 unsigned IVRST : 1;
5186 unsigned : 1;
5187 unsigned : 1;
5190 struct
5192 unsigned LVDL0 : 1;
5193 unsigned LVDL1 : 1;
5194 unsigned LVDL2 : 1;
5195 unsigned LVDL3 : 1;
5196 unsigned : 1;
5197 unsigned BGST : 1;
5198 unsigned : 1;
5199 unsigned : 1;
5202 struct
5204 unsigned LVDL : 4;
5205 unsigned : 4;
5208 struct
5210 unsigned LVV : 4;
5211 unsigned : 4;
5214 struct
5216 unsigned HLVDL : 4;
5217 unsigned : 4;
5219 } __LVDCONbits_t;
5221 extern __at(0x0FD2) volatile __LVDCONbits_t LVDCONbits;
5223 #define _LVDCON_HLVDL0 0x01
5224 #define _LVDCON_LVV0 0x01
5225 #define _LVDCON_LVDL0 0x01
5226 #define _LVDCON_HLVDL1 0x02
5227 #define _LVDCON_LVV1 0x02
5228 #define _LVDCON_LVDL1 0x02
5229 #define _LVDCON_HLVDL2 0x04
5230 #define _LVDCON_LVV2 0x04
5231 #define _LVDCON_LVDL2 0x04
5232 #define _LVDCON_HLVDL3 0x08
5233 #define _LVDCON_LVV3 0x08
5234 #define _LVDCON_LVDL3 0x08
5235 #define _LVDCON_HLVDEN 0x10
5236 #define _LVDCON_LVDEN 0x10
5237 #define _LVDCON_IRVST 0x20
5238 #define _LVDCON_IVRST 0x20
5239 #define _LVDCON_BGST 0x20
5240 #define _LVDCON_VDIRMAG 0x80
5242 //==============================================================================
5245 //==============================================================================
5246 // OSCCON Bits
5248 extern __at(0x0FD3) __sfr OSCCON;
5250 typedef union
5252 struct
5254 unsigned SCS0 : 1;
5255 unsigned SCS1 : 1;
5256 unsigned IOFS : 1;
5257 unsigned OSTS : 1;
5258 unsigned IRCF0 : 1;
5259 unsigned IRCF1 : 1;
5260 unsigned IRCF2 : 1;
5261 unsigned IDLEN : 1;
5264 struct
5266 unsigned : 1;
5267 unsigned : 1;
5268 unsigned FLTS : 1;
5269 unsigned : 1;
5270 unsigned : 1;
5271 unsigned : 1;
5272 unsigned : 1;
5273 unsigned : 1;
5276 struct
5278 unsigned SCS : 2;
5279 unsigned : 6;
5282 struct
5284 unsigned : 4;
5285 unsigned IRCF : 3;
5286 unsigned : 1;
5288 } __OSCCONbits_t;
5290 extern __at(0x0FD3) volatile __OSCCONbits_t OSCCONbits;
5292 #define _SCS0 0x01
5293 #define _SCS1 0x02
5294 #define _IOFS 0x04
5295 #define _FLTS 0x04
5296 #define _OSTS 0x08
5297 #define _IRCF0 0x10
5298 #define _IRCF1 0x20
5299 #define _IRCF2 0x40
5300 #define _IDLEN 0x80
5302 //==============================================================================
5305 //==============================================================================
5306 // T0CON Bits
5308 extern __at(0x0FD5) __sfr T0CON;
5310 typedef union
5312 struct
5314 unsigned T0PS0 : 1;
5315 unsigned T0PS1 : 1;
5316 unsigned T0PS2 : 1;
5317 unsigned PSA : 1;
5318 unsigned T0SE : 1;
5319 unsigned T0CS : 1;
5320 unsigned T08BIT : 1;
5321 unsigned TMR0ON : 1;
5324 struct
5326 unsigned : 1;
5327 unsigned : 1;
5328 unsigned : 1;
5329 unsigned T0PS3 : 1;
5330 unsigned : 1;
5331 unsigned : 1;
5332 unsigned : 1;
5333 unsigned : 1;
5336 struct
5338 unsigned T0PS : 4;
5339 unsigned : 4;
5341 } __T0CONbits_t;
5343 extern __at(0x0FD5) volatile __T0CONbits_t T0CONbits;
5345 #define _T0PS0 0x01
5346 #define _T0PS1 0x02
5347 #define _T0PS2 0x04
5348 #define _PSA 0x08
5349 #define _T0PS3 0x08
5350 #define _T0SE 0x10
5351 #define _T0CS 0x20
5352 #define _T08BIT 0x40
5353 #define _TMR0ON 0x80
5355 //==============================================================================
5357 extern __at(0x0FD6) __sfr TMR0;
5358 extern __at(0x0FD6) __sfr TMR0L;
5359 extern __at(0x0FD7) __sfr TMR0H;
5361 //==============================================================================
5362 // STATUS Bits
5364 extern __at(0x0FD8) __sfr STATUS;
5366 typedef struct
5368 unsigned C : 1;
5369 unsigned DC : 1;
5370 unsigned Z : 1;
5371 unsigned OV : 1;
5372 unsigned N : 1;
5373 unsigned : 1;
5374 unsigned : 1;
5375 unsigned : 1;
5376 } __STATUSbits_t;
5378 extern __at(0x0FD8) volatile __STATUSbits_t STATUSbits;
5380 #define _C 0x01
5381 #define _DC 0x02
5382 #define _Z 0x04
5383 #define _OV 0x08
5384 #define _N 0x10
5386 //==============================================================================
5388 extern __at(0x0FD9) __sfr FSR2L;
5389 extern __at(0x0FDA) __sfr FSR2H;
5390 extern __at(0x0FDB) __sfr PLUSW2;
5391 extern __at(0x0FDC) __sfr PREINC2;
5392 extern __at(0x0FDD) __sfr POSTDEC2;
5393 extern __at(0x0FDE) __sfr POSTINC2;
5394 extern __at(0x0FDF) __sfr INDF2;
5395 extern __at(0x0FE0) __sfr BSR;
5396 extern __at(0x0FE1) __sfr FSR1L;
5397 extern __at(0x0FE2) __sfr FSR1H;
5398 extern __at(0x0FE3) __sfr PLUSW1;
5399 extern __at(0x0FE4) __sfr PREINC1;
5400 extern __at(0x0FE5) __sfr POSTDEC1;
5401 extern __at(0x0FE6) __sfr POSTINC1;
5402 extern __at(0x0FE7) __sfr INDF1;
5403 extern __at(0x0FE8) __sfr WREG;
5404 extern __at(0x0FE9) __sfr FSR0L;
5405 extern __at(0x0FEA) __sfr FSR0H;
5406 extern __at(0x0FEB) __sfr PLUSW0;
5407 extern __at(0x0FEC) __sfr PREINC0;
5408 extern __at(0x0FED) __sfr POSTDEC0;
5409 extern __at(0x0FEE) __sfr POSTINC0;
5410 extern __at(0x0FEF) __sfr INDF0;
5412 //==============================================================================
5413 // INTCON3 Bits
5415 extern __at(0x0FF0) __sfr INTCON3;
5417 typedef union
5419 struct
5421 unsigned INT1IF : 1;
5422 unsigned INT2IF : 1;
5423 unsigned INT3IF : 1;
5424 unsigned INT1IE : 1;
5425 unsigned INT2IE : 1;
5426 unsigned INT3IE : 1;
5427 unsigned INT1IP : 1;
5428 unsigned INT2IP : 1;
5431 struct
5433 unsigned INT1F : 1;
5434 unsigned INT2F : 1;
5435 unsigned INT3F : 1;
5436 unsigned INT1E : 1;
5437 unsigned INT2E : 1;
5438 unsigned INT3E : 1;
5439 unsigned INT1P : 1;
5440 unsigned INT2P : 1;
5442 } __INTCON3bits_t;
5444 extern __at(0x0FF0) volatile __INTCON3bits_t INTCON3bits;
5446 #define _INT1IF 0x01
5447 #define _INT1F 0x01
5448 #define _INT2IF 0x02
5449 #define _INT2F 0x02
5450 #define _INT3IF 0x04
5451 #define _INT3F 0x04
5452 #define _INT1IE 0x08
5453 #define _INT1E 0x08
5454 #define _INT2IE 0x10
5455 #define _INT2E 0x10
5456 #define _INT3IE 0x20
5457 #define _INT3E 0x20
5458 #define _INT1IP 0x40
5459 #define _INT1P 0x40
5460 #define _INT2IP 0x80
5461 #define _INT2P 0x80
5463 //==============================================================================
5466 //==============================================================================
5467 // INTCON2 Bits
5469 extern __at(0x0FF1) __sfr INTCON2;
5471 typedef union
5473 struct
5475 unsigned RBIP : 1;
5476 unsigned INT3IP : 1;
5477 unsigned TMR0IP : 1;
5478 unsigned INTEDG3 : 1;
5479 unsigned INTEDG2 : 1;
5480 unsigned INTEDG1 : 1;
5481 unsigned INTEDG0 : 1;
5482 unsigned NOT_RBPU : 1;
5485 struct
5487 unsigned : 1;
5488 unsigned INT3P : 1;
5489 unsigned T0IP : 1;
5490 unsigned : 1;
5491 unsigned : 1;
5492 unsigned : 1;
5493 unsigned : 1;
5494 unsigned RBPU : 1;
5496 } __INTCON2bits_t;
5498 extern __at(0x0FF1) volatile __INTCON2bits_t INTCON2bits;
5500 #define _RBIP 0x01
5501 #define _INT3IP 0x02
5502 #define _INT3P 0x02
5503 #define _TMR0IP 0x04
5504 #define _T0IP 0x04
5505 #define _INTEDG3 0x08
5506 #define _INTEDG2 0x10
5507 #define _INTEDG1 0x20
5508 #define _INTEDG0 0x40
5509 #define _NOT_RBPU 0x80
5510 #define _RBPU 0x80
5512 //==============================================================================
5515 //==============================================================================
5516 // INTCON Bits
5518 extern __at(0x0FF2) __sfr INTCON;
5520 typedef union
5522 struct
5524 unsigned RBIF : 1;
5525 unsigned INT0IF : 1;
5526 unsigned TMR0IF : 1;
5527 unsigned RBIE : 1;
5528 unsigned INT0IE : 1;
5529 unsigned TMR0IE : 1;
5530 unsigned PEIE_GIEL : 1;
5531 unsigned GIE_GIEH : 1;
5534 struct
5536 unsigned : 1;
5537 unsigned INT0F : 1;
5538 unsigned T0IF : 1;
5539 unsigned : 1;
5540 unsigned INT0E : 1;
5541 unsigned T0IE : 1;
5542 unsigned PEIE : 1;
5543 unsigned GIE : 1;
5546 struct
5548 unsigned : 1;
5549 unsigned : 1;
5550 unsigned : 1;
5551 unsigned : 1;
5552 unsigned : 1;
5553 unsigned : 1;
5554 unsigned GIEL : 1;
5555 unsigned GIEH : 1;
5557 } __INTCONbits_t;
5559 extern __at(0x0FF2) volatile __INTCONbits_t INTCONbits;
5561 #define _RBIF 0x01
5562 #define _INT0IF 0x02
5563 #define _INT0F 0x02
5564 #define _TMR0IF 0x04
5565 #define _T0IF 0x04
5566 #define _RBIE 0x08
5567 #define _INT0IE 0x10
5568 #define _INT0E 0x10
5569 #define _TMR0IE 0x20
5570 #define _T0IE 0x20
5571 #define _PEIE_GIEL 0x40
5572 #define _PEIE 0x40
5573 #define _GIEL 0x40
5574 #define _GIE_GIEH 0x80
5575 #define _GIE 0x80
5576 #define _GIEH 0x80
5578 //==============================================================================
5580 extern __at(0x0FF3) __sfr PROD;
5581 extern __at(0x0FF3) __sfr PRODL;
5582 extern __at(0x0FF4) __sfr PRODH;
5583 extern __at(0x0FF5) __sfr TABLAT;
5584 extern __at(0x0FF6) __sfr TBLPTR;
5585 extern __at(0x0FF6) __sfr TBLPTRL;
5586 extern __at(0x0FF7) __sfr TBLPTRH;
5587 extern __at(0x0FF8) __sfr TBLPTRU;
5588 extern __at(0x0FF9) __sfr PC;
5589 extern __at(0x0FF9) __sfr PCL;
5590 extern __at(0x0FFA) __sfr PCLATH;
5591 extern __at(0x0FFB) __sfr PCLATU;
5593 //==============================================================================
5594 // STKPTR Bits
5596 extern __at(0x0FFC) __sfr STKPTR;
5598 typedef union
5600 struct
5602 unsigned STKPTR0 : 1;
5603 unsigned STKPTR1 : 1;
5604 unsigned STKPTR2 : 1;
5605 unsigned STKPTR3 : 1;
5606 unsigned STKPTR4 : 1;
5607 unsigned : 1;
5608 unsigned STKUNF : 1;
5609 unsigned STKFUL : 1;
5612 struct
5614 unsigned SP0 : 1;
5615 unsigned SP1 : 1;
5616 unsigned SP2 : 1;
5617 unsigned SP3 : 1;
5618 unsigned SP4 : 1;
5619 unsigned : 1;
5620 unsigned : 1;
5621 unsigned STKOVF : 1;
5624 struct
5626 unsigned SP : 5;
5627 unsigned : 3;
5630 struct
5632 unsigned STKPTR : 5;
5633 unsigned : 3;
5635 } __STKPTRbits_t;
5637 extern __at(0x0FFC) volatile __STKPTRbits_t STKPTRbits;
5639 #define _STKPTR0 0x01
5640 #define _SP0 0x01
5641 #define _STKPTR1 0x02
5642 #define _SP1 0x02
5643 #define _STKPTR2 0x04
5644 #define _SP2 0x04
5645 #define _STKPTR3 0x08
5646 #define _SP3 0x08
5647 #define _STKPTR4 0x10
5648 #define _SP4 0x10
5649 #define _STKUNF 0x40
5650 #define _STKFUL 0x80
5651 #define _STKOVF 0x80
5653 //==============================================================================
5655 extern __at(0x0FFD) __sfr TOS;
5656 extern __at(0x0FFD) __sfr TOSL;
5657 extern __at(0x0FFE) __sfr TOSH;
5658 extern __at(0x0FFF) __sfr TOSU;
5660 //==============================================================================
5662 // Configuration Bits
5664 //==============================================================================
5666 #define __CONFIG1H 0x300001
5667 #define __CONFIG2L 0x300002
5668 #define __CONFIG2H 0x300003
5669 #define __CONFIG3H 0x300005
5670 #define __CONFIG4L 0x300006
5671 #define __CONFIG5L 0x300008
5672 #define __CONFIG5H 0x300009
5673 #define __CONFIG6L 0x30000A
5674 #define __CONFIG6H 0x30000B
5675 #define __CONFIG7L 0x30000C
5676 #define __CONFIG7H 0x30000D
5678 //----------------------------- CONFIG1H Options -------------------------------
5680 #define _OSC_LP_1H 0xF0 // LP oscillator.
5681 #define _OSC_XT_1H 0xF1 // XT oscillator.
5682 #define _OSC_HS_1H 0xF2 // HS oscillator.
5683 #define _OSC_RC_1H 0xF3 // External RC oscillator, CLKO function on RA6.
5684 #define _OSC_EC_1H 0xF4 // EC oscillator, CLKO function on RA6.
5685 #define _OSC_ECIO6_1H 0xF5 // EC oscillator, port function on RA6.
5686 #define _OSC_HSPLL_1H 0xF6 // HS oscillator, PLL enabled (Clock Frequency = 4 x FOSC1).
5687 #define _OSC_RCIO6_1H 0xF7 // External RC oscillator, port function on RA6.
5688 #define _OSC_INTIO67_1H 0xF8 // Internal oscillator block, port function on RA6 and RA7.
5689 #define _OSC_INTIO7_1H 0xF9 // Internal oscillator block, CLKO function on RA6, port function on RA7.
5690 #define _FCMEN_OFF_1H 0xBF // Fail-Safe Clock Monitor disabled.
5691 #define _FCMEN_ON_1H 0xFF // Fail-Safe Clock Monitor enabled.
5692 #define _IESO_OFF_1H 0x7F // Two-Speed Start-up disabled.
5693 #define _IESO_ON_1H 0xFF // Two-Speed Start-up enabled.
5695 //----------------------------- CONFIG2L Options -------------------------------
5697 #define _PWRT_ON_2L 0xFE // PWRT enabled.
5698 #define _PWRT_OFF_2L 0xFF // PWRT disabled.
5699 #define _BOREN_OFF_2L 0xF9 // Brown-out Reset disabled in hardware and software.
5700 #define _BOREN_ON_2L 0xFB // Brown-out Reset enabled and controlled by software (SBOREN is enabled).
5701 #define _BOREN_NOSLP_2L 0xFD // Brown-out Reset enabled in hardware only and disabled in Sleep mode (SBOREN is disabled).
5702 #define _BOREN_SBORDIS_2L 0xFF // Brown-out Reset enabled in hardware only (SBOREN is disabled).
5703 #define _BORV_0_2L 0xE7 // Maximum setting.
5704 #define _BORV_1_2L 0xEF
5705 #define _BORV_2_2L 0xF7
5706 #define _BORV_3_2L 0xFF // Minimum setting.
5708 //----------------------------- CONFIG2H Options -------------------------------
5710 #define _WDT_OFF_2H 0xFE // WDT disabled (control is placed on the SWDTEN bit).
5711 #define _WDT_ON_2H 0xFF // WDT enabled.
5712 #define _WDTPS_1_2H 0xE1 // 1:1.
5713 #define _WDTPS_2_2H 0xE3 // 1:2.
5714 #define _WDTPS_4_2H 0xE5 // 1:4.
5715 #define _WDTPS_8_2H 0xE7 // 1:8.
5716 #define _WDTPS_16_2H 0xE9 // 1:16.
5717 #define _WDTPS_32_2H 0xEB // 1:32.
5718 #define _WDTPS_64_2H 0xED // 1:64.
5719 #define _WDTPS_128_2H 0xEF // 1:128.
5720 #define _WDTPS_256_2H 0xF1 // 1:256.
5721 #define _WDTPS_512_2H 0xF3 // 1:512.
5722 #define _WDTPS_1024_2H 0xF5 // 1:1024.
5723 #define _WDTPS_2048_2H 0xF7 // 1:2048.
5724 #define _WDTPS_4096_2H 0xF9 // 1:4096.
5725 #define _WDTPS_8192_2H 0xFB // 1:8192.
5726 #define _WDTPS_16384_2H 0xFD // 1:16384.
5727 #define _WDTPS_32768_2H 0xFF // 1:32768.
5729 //----------------------------- CONFIG3H Options -------------------------------
5731 #define _CCP2MX_PORTE_3H 0xFE // ECCP2 input/output is multiplexed with RE7.
5732 #define _CCP2MX_PORTC_3H 0xFF // ECCP2 input/output is multiplexed with RC1.
5733 #define _LPT1OSC_OFF_3H 0xFB // Timer1 configured for higher power operation.
5734 #define _LPT1OSC_ON_3H 0xFF // Timer1 configured for low-power operation.
5735 #define _MCLRE_OFF_3H 0x7F // RG5 input pin enabled; MCLR disabled.
5736 #define _MCLRE_ON_3H 0xFF // MCLR pin enabled; RG5 input pin disabled.
5738 //----------------------------- CONFIG4L Options -------------------------------
5740 #define _STVREN_OFF_4L 0xFE // Stack full/underflow will not cause Reset.
5741 #define _STVREN_ON_4L 0xFF // Stack full/underflow will cause Reset.
5742 #define _LVP_OFF_4L 0xFB // Single-Supply ICSP disabled.
5743 #define _LVP_ON_4L 0xFF // Single-Supply ICSP enabled.
5744 #define _BBSIZ_BB2K_4L 0xCF // 1K word (2 Kbytes) Boot Block size.
5745 #define _BBSIZ_BB4K_4L 0xDF // 2K words (4 Kbytes) Boot Block size.
5746 #define _BBSIZ_BB8K_4L 0xEF // 4K words (8 Kbytes) Boot Block size.
5747 #define _XINST_OFF_4L 0xBF // Instruction set extension and Indexed Addressing mode disabled (Legacy mode).
5748 #define _XINST_ON_4L 0xFF // Instruction set extension and Indexed Addressing mode enabled.
5749 #define _DEBUG_ON_4L 0x7F // Background debugger enabled, RB6 and RB7 are dedicated to In-Circuit Debug.
5750 #define _DEBUG_OFF_4L 0xFF // Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins.
5752 //----------------------------- CONFIG5L Options -------------------------------
5754 #define _CP0_ON_5L 0xFE // Block 0 (000800, 001000 or 002000-003FFFh) code-protected.
5755 #define _CP0_OFF_5L 0xFF // Block 0 (000800, 001000 or 002000-003FFFh) not code-protected.
5756 #define _CP1_ON_5L 0xFD // Block 1 (004000-007FFFh) code-protected.
5757 #define _CP1_OFF_5L 0xFF // Block 1 (004000-007FFFh) not code-protected.
5758 #define _CP2_ON_5L 0xFB // Block 2 (008000-00BFFFh) code-protected.
5759 #define _CP2_OFF_5L 0xFF // Block 2 (008000-00BFFFh) not code-protected.
5760 #define _CP3_ON_5L 0xF7 // Block 3 (00C000-00FFFFh) code-protected.
5761 #define _CP3_OFF_5L 0xFF // Block 3 (00C000-00FFFFh) not code-protected.
5762 #define _CP4_ON_5L 0xEF // Block 4 (010000-013FFFh) code-protected.
5763 #define _CP4_OFF_5L 0xFF // Block 4 (010000-013FFFh) not code-protected.
5764 #define _CP5_ON_5L 0xDF // Block 5 (014000-017FFFh) code-protected.
5765 #define _CP5_OFF_5L 0xFF // Block 5 (014000-017FFFh) not code-protected.
5766 #define _CP6_ON_5L 0xBF // Block 6 (01BFFF-018000h) code-protected.
5767 #define _CP6_OFF_5L 0xFF // Block 6 (01BFFF-018000h) not code-protected.
5768 #define _CP7_ON_5L 0x7F // Block 7 (01C000-01FFFFh) code-protected.
5769 #define _CP7_OFF_5L 0xFF // Block 7 (01C000-01FFFFh) not code-protected.
5771 //----------------------------- CONFIG5H Options -------------------------------
5773 #define _CPB_ON_5H 0xBF // Boot Block (000000-0007FFh) code-protected.
5774 #define _CPB_OFF_5H 0xFF // Boot Block (000000-0007FFh) not code-protected.
5775 #define _CPD_ON_5H 0x7F // Data EEPROM code-protected.
5776 #define _CPD_OFF_5H 0xFF // Data EEPROM not code-protected.
5778 //----------------------------- CONFIG6L Options -------------------------------
5780 #define _WRT0_ON_6L 0xFE // Block 0 (000800, 001000 or 002000-003FFFh) write-protected.
5781 #define _WRT0_OFF_6L 0xFF // Block 0 (000800, 001000 or 002000-003FFFh) not write-protected.
5782 #define _WRT1_ON_6L 0xFD // Block 1 (004000-007FFFh) write-protected.
5783 #define _WRT1_OFF_6L 0xFF // Block 1 (004000-007FFFh) not write-protected.
5784 #define _WRT2_ON_6L 0xFB // Block 2 (008000-00BFFFh) write-protected.
5785 #define _WRT2_OFF_6L 0xFF // Block 2 (008000-00BFFFh) not write-protected.
5786 #define _WRT3_ON_6L 0xF7 // Block 3 (00C000-00FFFFh) write-protected.
5787 #define _WRT3_OFF_6L 0xFF // Block 3 (00C000-00FFFFh) not write-protected.
5788 #define _WRT4_ON_6L 0xEF // Block 4 (010000-013FFFh) write-protected.
5789 #define _WRT4_OFF_6L 0xFF // Block 4 (010000-013FFFh) not write-protected.
5790 #define _WRT5_ON_6L 0xDF // Block 5 (014000-017FFFh) write-protected.
5791 #define _WRT5_OFF_6L 0xFF // Block 5 (014000-017FFFh) not write-protected.
5792 #define _WRT6_ON_6L 0xBF // Block 6 (01BFFF-018000h) write-protected.
5793 #define _WRT6_OFF_6L 0xFF // Block 6 (01BFFF-018000h) not write-protected.
5794 #define _WRT7_ON_6L 0x7F // Block 7 (01C000-01FFFFh) write-protected.
5795 #define _WRT7_OFF_6L 0xFF // Block 7 (01C000-01FFFFh) not write-protected.
5797 //----------------------------- CONFIG6H Options -------------------------------
5799 #define _WRTC_ON_6H 0xDF // Configuration registers (300000-3000FFh) write-protected.
5800 #define _WRTC_OFF_6H 0xFF // Configuration registers (300000-3000FFh) not write-protected.
5801 #define _WRTB_ON_6H 0xBF // Boot Block (000000-007FFF, 000FFF or 001FFFh) write-protected.
5802 #define _WRTB_OFF_6H 0xFF // Boot Block (000000-007FFF, 000FFF or 001FFFh) not write-protected.
5803 #define _WRTD_ON_6H 0x7F // Data EEPROM write-protected.
5804 #define _WRTD_OFF_6H 0xFF // Data EEPROM not write-protected.
5806 //----------------------------- CONFIG7L Options -------------------------------
5808 #define _EBTR0_ON_7L 0xFE // Block 0 (000800, 001000 or 002000-003FFFh) protected from table reads executed in other blocks.
5809 #define _EBTR0_OFF_7L 0xFF // Block 0 (000800, 001000 or 002000-003FFFh) not protected from table reads executed in other blocks.
5810 #define _EBTR1_ON_7L 0xFD // Block 1 (004000-007FFFh) protected from table reads executed in other blocks.
5811 #define _EBTR1_OFF_7L 0xFF // Block 1 (004000-007FFFh) not protected from table reads executed in other blocks.
5812 #define _EBTR2_ON_7L 0xFB // Block 2 (008000-00BFFFh) protected from table reads executed in other blocks.
5813 #define _EBTR2_OFF_7L 0xFF // Block 2 (008000-00BFFFh) not protected from table reads executed in other blocks.
5814 #define _EBTR3_ON_7L 0xF7 // Block 3 (00C000-00FFFFh) protected from table reads executed in other blocks.
5815 #define _EBTR3_OFF_7L 0xFF // Block 3 (00C000-00FFFFh) not protected from table reads executed in other blocks.
5816 #define _EBTR4_ON_7L 0xEF // Block 4 (010000-013FFFh) protected from table reads executed in other blocks.
5817 #define _EBTR4_OFF_7L 0xFF // Block 4 (010000-013FFFh) not protected from table reads executed in other blocks.
5818 #define _EBTR5_ON_7L 0xDF // Block 5 (014000-017FFFh) protected from table reads executed in other blocks.
5819 #define _EBTR5_OFF_7L 0xFF // Block 5 (014000-017FFFh) not protected from table reads executed in other blocks.
5820 #define _EBTR6_ON_7L 0xBF // Block 6 (018000-01BFFFh) protected from table reads executed in other blocks.
5821 #define _EBTR6_OFF_7L 0xFF // Block 6 (018000-01BFFFh) not protected from table reads executed in other blocks.
5822 #define _EBTR7_ON_7L 0x7F // Block 7 (01C000-01FFFFh) protected from table reads executed in other blocks.
5823 #define _EBTR7_OFF_7L 0xFF // Block 7 (01C000-01FFFFh) not protected from table reads executed in other blocks.
5825 //----------------------------- CONFIG7H Options -------------------------------
5827 #define _EBTRB_ON_7H 0xBF // Boot Block (000000-007FFF, 000FFF or 001FFFh) protected from table reads executed in other blocks.
5828 #define _EBTRB_OFF_7H 0xFF // Boot Block (000000-007FFF, 000FFF or 001FFFh) not protected from table reads executed in other blocks.
5830 //==============================================================================
5832 #define __DEVID1 0x3FFFFE
5833 #define __DEVID2 0x3FFFFF
5835 #define __IDLOC0 0x200000
5836 #define __IDLOC1 0x200001
5837 #define __IDLOC2 0x200002
5838 #define __IDLOC3 0x200003
5839 #define __IDLOC4 0x200004
5840 #define __IDLOC5 0x200005
5841 #define __IDLOC6 0x200006
5842 #define __IDLOC7 0x200007
5844 #endif // #ifndef __PIC18LF6723_H__