Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic16 / pic18f66j15.h
blob8035dbb9b6368991ac52f8cda79b58f89e245411
1 /*
2 * This declarations of the PIC18F66J15 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:33 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 __PIC18F66J15_H__
26 #define __PIC18F66J15_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 : 1;
59 unsigned ADMSK1 : 1;
60 unsigned ADMSK2 : 1;
61 unsigned ADMSK3 : 1;
62 unsigned ADMSK4 : 1;
63 unsigned ADMSK5 : 1;
64 unsigned : 1;
65 unsigned : 1;
67 } __SSP2CON2bits_t;
69 extern __at(0x0F62) volatile __SSP2CON2bits_t SSP2CON2bits;
71 #define _SSP2CON2_SEN 0x01
72 #define _SSP2CON2_RSEN 0x02
73 #define _SSP2CON2_ADMSK1 0x02
74 #define _SSP2CON2_PEN 0x04
75 #define _SSP2CON2_ADMSK2 0x04
76 #define _SSP2CON2_RCEN 0x08
77 #define _SSP2CON2_ADMSK3 0x08
78 #define _SSP2CON2_ACKEN 0x10
79 #define _SSP2CON2_ADMSK4 0x10
80 #define _SSP2CON2_ACKDT 0x20
81 #define _SSP2CON2_ADMSK5 0x20
82 #define _SSP2CON2_ACKSTAT 0x40
83 #define _SSP2CON2_GCEN 0x80
85 //==============================================================================
88 //==============================================================================
89 // SSP2CON1 Bits
91 extern __at(0x0F63) __sfr SSP2CON1;
93 typedef union
95 struct
97 unsigned SSPM0 : 1;
98 unsigned SSPM1 : 1;
99 unsigned SSPM2 : 1;
100 unsigned SSPM3 : 1;
101 unsigned CKP : 1;
102 unsigned SSPEN : 1;
103 unsigned SSPOV : 1;
104 unsigned WCOL : 1;
107 struct
109 unsigned SSPM : 4;
110 unsigned : 4;
112 } __SSP2CON1bits_t;
114 extern __at(0x0F63) volatile __SSP2CON1bits_t SSP2CON1bits;
116 #define _SSP2CON1_SSPM0 0x01
117 #define _SSP2CON1_SSPM1 0x02
118 #define _SSP2CON1_SSPM2 0x04
119 #define _SSP2CON1_SSPM3 0x08
120 #define _SSP2CON1_CKP 0x10
121 #define _SSP2CON1_SSPEN 0x20
122 #define _SSP2CON1_SSPOV 0x40
123 #define _SSP2CON1_WCOL 0x80
125 //==============================================================================
128 //==============================================================================
129 // SSP2STAT Bits
131 extern __at(0x0F64) __sfr SSP2STAT;
133 typedef union
135 struct
137 unsigned BF : 1;
138 unsigned UA : 1;
139 unsigned R_NOT_W : 1;
140 unsigned S : 1;
141 unsigned P : 1;
142 unsigned D_NOT_A : 1;
143 unsigned CKE : 1;
144 unsigned SMP : 1;
147 struct
149 unsigned : 1;
150 unsigned : 1;
151 unsigned R_W : 1;
152 unsigned I2C_START : 1;
153 unsigned I2C_STOP : 1;
154 unsigned D_A : 1;
155 unsigned : 1;
156 unsigned : 1;
159 struct
161 unsigned : 1;
162 unsigned : 1;
163 unsigned I2C_READ : 1;
164 unsigned : 1;
165 unsigned : 1;
166 unsigned I2C_DAT : 1;
167 unsigned : 1;
168 unsigned : 1;
171 struct
173 unsigned : 1;
174 unsigned : 1;
175 unsigned NOT_W : 1;
176 unsigned : 1;
177 unsigned : 1;
178 unsigned NOT_A : 1;
179 unsigned : 1;
180 unsigned : 1;
183 struct
185 unsigned : 1;
186 unsigned : 1;
187 unsigned NOT_WRITE : 1;
188 unsigned : 1;
189 unsigned : 1;
190 unsigned NOT_ADDRESS : 1;
191 unsigned : 1;
192 unsigned : 1;
195 struct
197 unsigned : 1;
198 unsigned : 1;
199 unsigned READ_WRITE : 1;
200 unsigned : 1;
201 unsigned : 1;
202 unsigned DATA_ADDRESS : 1;
203 unsigned : 1;
204 unsigned : 1;
207 struct
209 unsigned : 1;
210 unsigned : 1;
211 unsigned R : 1;
212 unsigned : 1;
213 unsigned : 1;
214 unsigned D : 1;
215 unsigned : 1;
216 unsigned : 1;
218 } __SSP2STATbits_t;
220 extern __at(0x0F64) volatile __SSP2STATbits_t SSP2STATbits;
222 #define _SSP2STAT_BF 0x01
223 #define _SSP2STAT_UA 0x02
224 #define _SSP2STAT_R_NOT_W 0x04
225 #define _SSP2STAT_R_W 0x04
226 #define _SSP2STAT_I2C_READ 0x04
227 #define _SSP2STAT_NOT_W 0x04
228 #define _SSP2STAT_NOT_WRITE 0x04
229 #define _SSP2STAT_READ_WRITE 0x04
230 #define _SSP2STAT_R 0x04
231 #define _SSP2STAT_S 0x08
232 #define _SSP2STAT_I2C_START 0x08
233 #define _SSP2STAT_P 0x10
234 #define _SSP2STAT_I2C_STOP 0x10
235 #define _SSP2STAT_D_NOT_A 0x20
236 #define _SSP2STAT_D_A 0x20
237 #define _SSP2STAT_I2C_DAT 0x20
238 #define _SSP2STAT_NOT_A 0x20
239 #define _SSP2STAT_NOT_ADDRESS 0x20
240 #define _SSP2STAT_DATA_ADDRESS 0x20
241 #define _SSP2STAT_D 0x20
242 #define _SSP2STAT_CKE 0x40
243 #define _SSP2STAT_SMP 0x80
245 //==============================================================================
247 extern __at(0x0F65) __sfr SSP2ADD;
248 extern __at(0x0F66) __sfr SSP2BUF;
250 //==============================================================================
251 // ECCP2DEL Bits
253 extern __at(0x0F67) __sfr ECCP2DEL;
255 typedef union
257 struct
259 unsigned PDC0 : 1;
260 unsigned PDC1 : 1;
261 unsigned PDC2 : 1;
262 unsigned PDC3 : 1;
263 unsigned PDC4 : 1;
264 unsigned PDC5 : 1;
265 unsigned PDC6 : 1;
266 unsigned PRSEN : 1;
269 struct
271 unsigned P2DC0 : 1;
272 unsigned P2DC1 : 1;
273 unsigned P2DC2 : 1;
274 unsigned P2DC3 : 1;
275 unsigned P2DC4 : 1;
276 unsigned P2DC5 : 1;
277 unsigned P2DC6 : 1;
278 unsigned P2RSEN : 1;
281 struct
283 unsigned P2DC : 7;
284 unsigned : 1;
287 struct
289 unsigned PDC : 7;
290 unsigned : 1;
292 } __ECCP2DELbits_t;
294 extern __at(0x0F67) volatile __ECCP2DELbits_t ECCP2DELbits;
296 #define _ECCP2DEL_PDC0 0x01
297 #define _ECCP2DEL_P2DC0 0x01
298 #define _ECCP2DEL_PDC1 0x02
299 #define _ECCP2DEL_P2DC1 0x02
300 #define _ECCP2DEL_PDC2 0x04
301 #define _ECCP2DEL_P2DC2 0x04
302 #define _ECCP2DEL_PDC3 0x08
303 #define _ECCP2DEL_P2DC3 0x08
304 #define _ECCP2DEL_PDC4 0x10
305 #define _ECCP2DEL_P2DC4 0x10
306 #define _ECCP2DEL_PDC5 0x20
307 #define _ECCP2DEL_P2DC5 0x20
308 #define _ECCP2DEL_PDC6 0x40
309 #define _ECCP2DEL_P2DC6 0x40
310 #define _ECCP2DEL_PRSEN 0x80
311 #define _ECCP2DEL_P2RSEN 0x80
313 //==============================================================================
316 //==============================================================================
317 // ECCP2AS Bits
319 extern __at(0x0F68) __sfr ECCP2AS;
321 typedef union
323 struct
325 unsigned PSSBD0 : 1;
326 unsigned PSSBD1 : 1;
327 unsigned PSSAC0 : 1;
328 unsigned PSSAC1 : 1;
329 unsigned ECCPAS0 : 1;
330 unsigned ECCPAS1 : 1;
331 unsigned ECCPAS2 : 1;
332 unsigned ECCPASE : 1;
335 struct
337 unsigned PSS2BD0 : 1;
338 unsigned PSS2BD1 : 1;
339 unsigned PSS2AC0 : 1;
340 unsigned PSS2AC1 : 1;
341 unsigned ECCP2AS0 : 1;
342 unsigned ECCP2AS1 : 1;
343 unsigned ECCP2AS2 : 1;
344 unsigned ECCP2ASE : 1;
347 struct
349 unsigned PSSBD : 2;
350 unsigned : 6;
353 struct
355 unsigned PSS2BD : 2;
356 unsigned : 6;
359 struct
361 unsigned : 2;
362 unsigned PSS2AC : 2;
363 unsigned : 4;
366 struct
368 unsigned : 2;
369 unsigned PSSAC : 2;
370 unsigned : 4;
373 struct
375 unsigned : 4;
376 unsigned ECCPAS : 3;
377 unsigned : 1;
380 struct
382 unsigned : 4;
383 unsigned ECCP2AS : 3;
384 unsigned : 1;
386 } __ECCP2ASbits_t;
388 extern __at(0x0F68) volatile __ECCP2ASbits_t ECCP2ASbits;
390 #define _ECCP2AS_PSSBD0 0x01
391 #define _ECCP2AS_PSS2BD0 0x01
392 #define _ECCP2AS_PSSBD1 0x02
393 #define _ECCP2AS_PSS2BD1 0x02
394 #define _ECCP2AS_PSSAC0 0x04
395 #define _ECCP2AS_PSS2AC0 0x04
396 #define _ECCP2AS_PSSAC1 0x08
397 #define _ECCP2AS_PSS2AC1 0x08
398 #define _ECCP2AS_ECCPAS0 0x10
399 #define _ECCP2AS_ECCP2AS0 0x10
400 #define _ECCP2AS_ECCPAS1 0x20
401 #define _ECCP2AS_ECCP2AS1 0x20
402 #define _ECCP2AS_ECCPAS2 0x40
403 #define _ECCP2AS_ECCP2AS2 0x40
404 #define _ECCP2AS_ECCPASE 0x80
405 #define _ECCP2AS_ECCP2ASE 0x80
407 //==============================================================================
410 //==============================================================================
411 // ECCP3DEL Bits
413 extern __at(0x0F69) __sfr ECCP3DEL;
415 typedef union
417 struct
419 unsigned PDC0 : 1;
420 unsigned PDC1 : 1;
421 unsigned PDC2 : 1;
422 unsigned PDC3 : 1;
423 unsigned PDC4 : 1;
424 unsigned PDC5 : 1;
425 unsigned PDC6 : 1;
426 unsigned PRSEN : 1;
429 struct
431 unsigned P3DC0 : 1;
432 unsigned P3DC1 : 1;
433 unsigned P3DC2 : 1;
434 unsigned P3DC3 : 1;
435 unsigned P3DC4 : 1;
436 unsigned P3DC5 : 1;
437 unsigned P3DC6 : 1;
438 unsigned P3RSEN : 1;
441 struct
443 unsigned PDC : 7;
444 unsigned : 1;
447 struct
449 unsigned P3DC : 7;
450 unsigned : 1;
452 } __ECCP3DELbits_t;
454 extern __at(0x0F69) volatile __ECCP3DELbits_t ECCP3DELbits;
456 #define _ECCP3DEL_PDC0 0x01
457 #define _ECCP3DEL_P3DC0 0x01
458 #define _ECCP3DEL_PDC1 0x02
459 #define _ECCP3DEL_P3DC1 0x02
460 #define _ECCP3DEL_PDC2 0x04
461 #define _ECCP3DEL_P3DC2 0x04
462 #define _ECCP3DEL_PDC3 0x08
463 #define _ECCP3DEL_P3DC3 0x08
464 #define _ECCP3DEL_PDC4 0x10
465 #define _ECCP3DEL_P3DC4 0x10
466 #define _ECCP3DEL_PDC5 0x20
467 #define _ECCP3DEL_P3DC5 0x20
468 #define _ECCP3DEL_PDC6 0x40
469 #define _ECCP3DEL_P3DC6 0x40
470 #define _ECCP3DEL_PRSEN 0x80
471 #define _ECCP3DEL_P3RSEN 0x80
473 //==============================================================================
476 //==============================================================================
477 // ECCP3AS Bits
479 extern __at(0x0F6A) __sfr ECCP3AS;
481 typedef union
483 struct
485 unsigned PSSBD0 : 1;
486 unsigned PSSBD1 : 1;
487 unsigned PSSAC0 : 1;
488 unsigned PSSAC1 : 1;
489 unsigned ECCPAS0 : 1;
490 unsigned ECCPAS1 : 1;
491 unsigned ECCPAS2 : 1;
492 unsigned ECCPASE : 1;
495 struct
497 unsigned PSS3BD0 : 1;
498 unsigned PSS3BD1 : 1;
499 unsigned PSS3AC0 : 1;
500 unsigned PSS3AC1 : 1;
501 unsigned ECCP3AS0 : 1;
502 unsigned ECCP3AS1 : 1;
503 unsigned ECCP3AS2 : 1;
504 unsigned ECCP3ASE : 1;
507 struct
509 unsigned PSS3BD : 2;
510 unsigned : 6;
513 struct
515 unsigned PSSBD : 2;
516 unsigned : 6;
519 struct
521 unsigned : 2;
522 unsigned PSS3AC : 2;
523 unsigned : 4;
526 struct
528 unsigned : 2;
529 unsigned PSSAC : 2;
530 unsigned : 4;
533 struct
535 unsigned : 4;
536 unsigned ECCP3AS : 3;
537 unsigned : 1;
540 struct
542 unsigned : 4;
543 unsigned ECCPAS : 3;
544 unsigned : 1;
546 } __ECCP3ASbits_t;
548 extern __at(0x0F6A) volatile __ECCP3ASbits_t ECCP3ASbits;
550 #define _ECCP3AS_PSSBD0 0x01
551 #define _ECCP3AS_PSS3BD0 0x01
552 #define _ECCP3AS_PSSBD1 0x02
553 #define _ECCP3AS_PSS3BD1 0x02
554 #define _ECCP3AS_PSSAC0 0x04
555 #define _ECCP3AS_PSS3AC0 0x04
556 #define _ECCP3AS_PSSAC1 0x08
557 #define _ECCP3AS_PSS3AC1 0x08
558 #define _ECCP3AS_ECCPAS0 0x10
559 #define _ECCP3AS_ECCP3AS0 0x10
560 #define _ECCP3AS_ECCPAS1 0x20
561 #define _ECCP3AS_ECCP3AS1 0x20
562 #define _ECCP3AS_ECCPAS2 0x40
563 #define _ECCP3AS_ECCP3AS2 0x40
564 #define _ECCP3AS_ECCPASE 0x80
565 #define _ECCP3AS_ECCP3ASE 0x80
567 //==============================================================================
570 //==============================================================================
571 // RCSTA2 Bits
573 extern __at(0x0F6B) __sfr RCSTA2;
575 typedef union
577 struct
579 unsigned RX9D : 1;
580 unsigned OERR : 1;
581 unsigned FERR : 1;
582 unsigned ADDEN : 1;
583 unsigned CREN : 1;
584 unsigned SREN : 1;
585 unsigned RX9 : 1;
586 unsigned SPEN : 1;
589 struct
591 unsigned RCD8 : 1;
592 unsigned OERR2 : 1;
593 unsigned FERR2 : 1;
594 unsigned ADDEN2 : 1;
595 unsigned CREN2 : 1;
596 unsigned SREN2 : 1;
597 unsigned RC9 : 1;
598 unsigned SPEN2 : 1;
601 struct
603 unsigned RX9D2 : 1;
604 unsigned : 1;
605 unsigned : 1;
606 unsigned : 1;
607 unsigned : 1;
608 unsigned : 1;
609 unsigned NOT_RC8 : 1;
610 unsigned : 1;
613 struct
615 unsigned : 1;
616 unsigned : 1;
617 unsigned : 1;
618 unsigned : 1;
619 unsigned : 1;
620 unsigned : 1;
621 unsigned RC8_9 : 1;
622 unsigned : 1;
625 struct
627 unsigned : 1;
628 unsigned : 1;
629 unsigned : 1;
630 unsigned : 1;
631 unsigned : 1;
632 unsigned : 1;
633 unsigned RX92 : 1;
634 unsigned : 1;
636 } __RCSTA2bits_t;
638 extern __at(0x0F6B) volatile __RCSTA2bits_t RCSTA2bits;
640 #define _RCSTA2_RX9D 0x01
641 #define _RCSTA2_RCD8 0x01
642 #define _RCSTA2_RX9D2 0x01
643 #define _RCSTA2_OERR 0x02
644 #define _RCSTA2_OERR2 0x02
645 #define _RCSTA2_FERR 0x04
646 #define _RCSTA2_FERR2 0x04
647 #define _RCSTA2_ADDEN 0x08
648 #define _RCSTA2_ADDEN2 0x08
649 #define _RCSTA2_CREN 0x10
650 #define _RCSTA2_CREN2 0x10
651 #define _RCSTA2_SREN 0x20
652 #define _RCSTA2_SREN2 0x20
653 #define _RCSTA2_RX9 0x40
654 #define _RCSTA2_RC9 0x40
655 #define _RCSTA2_NOT_RC8 0x40
656 #define _RCSTA2_RC8_9 0x40
657 #define _RCSTA2_RX92 0x40
658 #define _RCSTA2_SPEN 0x80
659 #define _RCSTA2_SPEN2 0x80
661 //==============================================================================
664 //==============================================================================
665 // TXSTA2 Bits
667 extern __at(0x0F6C) __sfr TXSTA2;
669 typedef union
671 struct
673 unsigned TX9D : 1;
674 unsigned TRMT : 1;
675 unsigned BRGH : 1;
676 unsigned SENDB : 1;
677 unsigned SYNC : 1;
678 unsigned TXEN : 1;
679 unsigned TX9 : 1;
680 unsigned CSRC : 1;
683 struct
685 unsigned TXD8 : 1;
686 unsigned TRMT2 : 1;
687 unsigned BRGH2 : 1;
688 unsigned SENDB2 : 1;
689 unsigned SYNC2 : 1;
690 unsigned TXEN2 : 1;
691 unsigned TX8_9 : 1;
692 unsigned CSRC2 : 1;
695 struct
697 unsigned TX9D2 : 1;
698 unsigned : 1;
699 unsigned : 1;
700 unsigned : 1;
701 unsigned : 1;
702 unsigned : 1;
703 unsigned NOT_TX8 : 1;
704 unsigned : 1;
707 struct
709 unsigned : 1;
710 unsigned : 1;
711 unsigned : 1;
712 unsigned : 1;
713 unsigned : 1;
714 unsigned : 1;
715 unsigned TX92 : 1;
716 unsigned : 1;
718 } __TXSTA2bits_t;
720 extern __at(0x0F6C) volatile __TXSTA2bits_t TXSTA2bits;
722 #define _TXSTA2_TX9D 0x01
723 #define _TXSTA2_TXD8 0x01
724 #define _TXSTA2_TX9D2 0x01
725 #define _TXSTA2_TRMT 0x02
726 #define _TXSTA2_TRMT2 0x02
727 #define _TXSTA2_BRGH 0x04
728 #define _TXSTA2_BRGH2 0x04
729 #define _TXSTA2_SENDB 0x08
730 #define _TXSTA2_SENDB2 0x08
731 #define _TXSTA2_SYNC 0x10
732 #define _TXSTA2_SYNC2 0x10
733 #define _TXSTA2_TXEN 0x20
734 #define _TXSTA2_TXEN2 0x20
735 #define _TXSTA2_TX9 0x40
736 #define _TXSTA2_TX8_9 0x40
737 #define _TXSTA2_NOT_TX8 0x40
738 #define _TXSTA2_TX92 0x40
739 #define _TXSTA2_CSRC 0x80
740 #define _TXSTA2_CSRC2 0x80
742 //==============================================================================
744 extern __at(0x0F6D) __sfr TXREG2;
745 extern __at(0x0F6E) __sfr RCREG2;
746 extern __at(0x0F6F) __sfr SPBRG2;
748 //==============================================================================
749 // CCP5CON Bits
751 extern __at(0x0F70) __sfr CCP5CON;
753 typedef union
755 struct
757 unsigned CCP5M0 : 1;
758 unsigned CCP5M1 : 1;
759 unsigned CCP5M2 : 1;
760 unsigned CCP5M3 : 1;
761 unsigned DCCP5Y : 1;
762 unsigned DCCP5X : 1;
763 unsigned : 1;
764 unsigned : 1;
767 struct
769 unsigned : 1;
770 unsigned : 1;
771 unsigned : 1;
772 unsigned : 1;
773 unsigned DC5B0 : 1;
774 unsigned DC5B1 : 1;
775 unsigned : 1;
776 unsigned : 1;
779 struct
781 unsigned CCP5M : 4;
782 unsigned : 4;
785 struct
787 unsigned : 4;
788 unsigned DC5B : 2;
789 unsigned : 2;
791 } __CCP5CONbits_t;
793 extern __at(0x0F70) volatile __CCP5CONbits_t CCP5CONbits;
795 #define _CCP5M0 0x01
796 #define _CCP5M1 0x02
797 #define _CCP5M2 0x04
798 #define _CCP5M3 0x08
799 #define _DCCP5Y 0x10
800 #define _DC5B0 0x10
801 #define _DCCP5X 0x20
802 #define _DC5B1 0x20
804 //==============================================================================
806 extern __at(0x0F71) __sfr CCPR5;
807 extern __at(0x0F71) __sfr CCPR5L;
808 extern __at(0x0F72) __sfr CCPR5H;
810 //==============================================================================
811 // CCP4CON Bits
813 extern __at(0x0F73) __sfr CCP4CON;
815 typedef union
817 struct
819 unsigned CCP4M0 : 1;
820 unsigned CCP4M1 : 1;
821 unsigned CCP4M2 : 1;
822 unsigned CCP4M3 : 1;
823 unsigned DCCP4Y : 1;
824 unsigned DCCP4X : 1;
825 unsigned : 1;
826 unsigned : 1;
829 struct
831 unsigned : 1;
832 unsigned : 1;
833 unsigned : 1;
834 unsigned : 1;
835 unsigned DC4B0 : 1;
836 unsigned DC4B1 : 1;
837 unsigned : 1;
838 unsigned : 1;
841 struct
843 unsigned CCP4M : 4;
844 unsigned : 4;
847 struct
849 unsigned : 4;
850 unsigned DC4B : 2;
851 unsigned : 2;
853 } __CCP4CONbits_t;
855 extern __at(0x0F73) volatile __CCP4CONbits_t CCP4CONbits;
857 #define _CCP4M0 0x01
858 #define _CCP4M1 0x02
859 #define _CCP4M2 0x04
860 #define _CCP4M3 0x08
861 #define _DCCP4Y 0x10
862 #define _DC4B0 0x10
863 #define _DCCP4X 0x20
864 #define _DC4B1 0x20
866 //==============================================================================
868 extern __at(0x0F74) __sfr CCPR4;
869 extern __at(0x0F74) __sfr CCPR4L;
870 extern __at(0x0F75) __sfr CCPR4H;
872 //==============================================================================
873 // T4CON Bits
875 extern __at(0x0F76) __sfr T4CON;
877 typedef union
879 struct
881 unsigned T4CKPS0 : 1;
882 unsigned T4CKPS1 : 1;
883 unsigned TMR4ON : 1;
884 unsigned T4OUTPS0 : 1;
885 unsigned T4OUTPS1 : 1;
886 unsigned T4OUTPS2 : 1;
887 unsigned T4OUTPS3 : 1;
888 unsigned : 1;
891 struct
893 unsigned T4CKPS : 2;
894 unsigned : 6;
897 struct
899 unsigned : 3;
900 unsigned T4OUTPS : 4;
901 unsigned : 1;
903 } __T4CONbits_t;
905 extern __at(0x0F76) volatile __T4CONbits_t T4CONbits;
907 #define _T4CKPS0 0x01
908 #define _T4CKPS1 0x02
909 #define _TMR4ON 0x04
910 #define _T4OUTPS0 0x08
911 #define _T4OUTPS1 0x10
912 #define _T4OUTPS2 0x20
913 #define _T4OUTPS3 0x40
915 //==============================================================================
917 extern __at(0x0F77) __sfr PR4;
918 extern __at(0x0F78) __sfr TMR4;
920 //==============================================================================
921 // ECCP1DEL Bits
923 extern __at(0x0F79) __sfr ECCP1DEL;
925 typedef union
927 struct
929 unsigned PDC0 : 1;
930 unsigned PDC1 : 1;
931 unsigned PDC2 : 1;
932 unsigned PDC3 : 1;
933 unsigned PDC4 : 1;
934 unsigned PDC5 : 1;
935 unsigned PDC6 : 1;
936 unsigned PRSEN : 1;
939 struct
941 unsigned P1DC0 : 1;
942 unsigned P1DC1 : 1;
943 unsigned P1DC2 : 1;
944 unsigned P1DC3 : 1;
945 unsigned P1DC4 : 1;
946 unsigned P1DC5 : 1;
947 unsigned P1DC6 : 1;
948 unsigned P1RSEN : 1;
951 struct
953 unsigned P1DC : 7;
954 unsigned : 1;
957 struct
959 unsigned PDC : 7;
960 unsigned : 1;
962 } __ECCP1DELbits_t;
964 extern __at(0x0F79) volatile __ECCP1DELbits_t ECCP1DELbits;
966 #define _PDC0 0x01
967 #define _P1DC0 0x01
968 #define _PDC1 0x02
969 #define _P1DC1 0x02
970 #define _PDC2 0x04
971 #define _P1DC2 0x04
972 #define _PDC3 0x08
973 #define _P1DC3 0x08
974 #define _PDC4 0x10
975 #define _P1DC4 0x10
976 #define _PDC5 0x20
977 #define _P1DC5 0x20
978 #define _PDC6 0x40
979 #define _P1DC6 0x40
980 #define _PRSEN 0x80
981 #define _P1RSEN 0x80
983 //==============================================================================
986 //==============================================================================
987 // BAUDCON2 Bits
989 extern __at(0x0F7C) __sfr BAUDCON2;
991 typedef union
993 struct
995 unsigned ABDEN : 1;
996 unsigned WUE : 1;
997 unsigned : 1;
998 unsigned BRG16 : 1;
999 unsigned SCKP : 1;
1000 unsigned : 1;
1001 unsigned RCMT : 1;
1002 unsigned ABDOVF : 1;
1005 struct
1007 unsigned : 1;
1008 unsigned : 1;
1009 unsigned : 1;
1010 unsigned : 1;
1011 unsigned : 1;
1012 unsigned : 1;
1013 unsigned RCIDL : 1;
1014 unsigned : 1;
1016 } __BAUDCON2bits_t;
1018 extern __at(0x0F7C) volatile __BAUDCON2bits_t BAUDCON2bits;
1020 #define _BAUDCON2_ABDEN 0x01
1021 #define _BAUDCON2_WUE 0x02
1022 #define _BAUDCON2_BRG16 0x08
1023 #define _BAUDCON2_SCKP 0x10
1024 #define _BAUDCON2_RCMT 0x40
1025 #define _BAUDCON2_RCIDL 0x40
1026 #define _BAUDCON2_ABDOVF 0x80
1028 //==============================================================================
1030 extern __at(0x0F7D) __sfr SPBRGH2;
1032 //==============================================================================
1033 // BAUDCON Bits
1035 extern __at(0x0F7E) __sfr BAUDCON;
1037 typedef union
1039 struct
1041 unsigned ABDEN : 1;
1042 unsigned WUE : 1;
1043 unsigned : 1;
1044 unsigned BRG16 : 1;
1045 unsigned SCKP : 1;
1046 unsigned : 1;
1047 unsigned RCMT : 1;
1048 unsigned ABDOVF : 1;
1051 struct
1053 unsigned : 1;
1054 unsigned : 1;
1055 unsigned : 1;
1056 unsigned : 1;
1057 unsigned : 1;
1058 unsigned : 1;
1059 unsigned RCIDL : 1;
1060 unsigned : 1;
1062 } __BAUDCONbits_t;
1064 extern __at(0x0F7E) volatile __BAUDCONbits_t BAUDCONbits;
1066 #define _ABDEN 0x01
1067 #define _WUE 0x02
1068 #define _BRG16 0x08
1069 #define _SCKP 0x10
1070 #define _RCMT 0x40
1071 #define _RCIDL 0x40
1072 #define _ABDOVF 0x80
1074 //==============================================================================
1077 //==============================================================================
1078 // BAUDCON1 Bits
1080 extern __at(0x0F7E) __sfr BAUDCON1;
1082 typedef union
1084 struct
1086 unsigned ABDEN : 1;
1087 unsigned WUE : 1;
1088 unsigned : 1;
1089 unsigned BRG16 : 1;
1090 unsigned SCKP : 1;
1091 unsigned : 1;
1092 unsigned RCMT : 1;
1093 unsigned ABDOVF : 1;
1096 struct
1098 unsigned : 1;
1099 unsigned : 1;
1100 unsigned : 1;
1101 unsigned : 1;
1102 unsigned : 1;
1103 unsigned : 1;
1104 unsigned RCIDL : 1;
1105 unsigned : 1;
1107 } __BAUDCON1bits_t;
1109 extern __at(0x0F7E) volatile __BAUDCON1bits_t BAUDCON1bits;
1111 #define _BAUDCON1_ABDEN 0x01
1112 #define _BAUDCON1_WUE 0x02
1113 #define _BAUDCON1_BRG16 0x08
1114 #define _BAUDCON1_SCKP 0x10
1115 #define _BAUDCON1_RCMT 0x40
1116 #define _BAUDCON1_RCIDL 0x40
1117 #define _BAUDCON1_ABDOVF 0x80
1119 //==============================================================================
1121 extern __at(0x0F7F) __sfr SPBRGH1;
1123 //==============================================================================
1124 // PORTA Bits
1126 extern __at(0x0F80) __sfr PORTA;
1128 typedef union
1130 struct
1132 unsigned RA0 : 1;
1133 unsigned RA1 : 1;
1134 unsigned RA2 : 1;
1135 unsigned RA3 : 1;
1136 unsigned RA4 : 1;
1137 unsigned RA5 : 1;
1138 unsigned OSC2 : 1;
1139 unsigned : 1;
1142 struct
1144 unsigned AN0 : 1;
1145 unsigned AN1 : 1;
1146 unsigned AN2 : 1;
1147 unsigned AN3 : 1;
1148 unsigned T0CKI : 1;
1149 unsigned AN4 : 1;
1150 unsigned CLKO : 1;
1151 unsigned : 1;
1154 struct
1156 unsigned : 1;
1157 unsigned : 1;
1158 unsigned VREFM : 1;
1159 unsigned VREFP : 1;
1160 unsigned : 1;
1161 unsigned : 1;
1162 unsigned : 1;
1163 unsigned : 1;
1166 struct
1168 unsigned RA : 6;
1169 unsigned : 2;
1171 } __PORTAbits_t;
1173 extern __at(0x0F80) volatile __PORTAbits_t PORTAbits;
1175 #define _PORTA_RA0 0x01
1176 #define _PORTA_AN0 0x01
1177 #define _PORTA_RA1 0x02
1178 #define _PORTA_AN1 0x02
1179 #define _PORTA_RA2 0x04
1180 #define _PORTA_AN2 0x04
1181 #define _PORTA_VREFM 0x04
1182 #define _PORTA_RA3 0x08
1183 #define _PORTA_AN3 0x08
1184 #define _PORTA_VREFP 0x08
1185 #define _PORTA_RA4 0x10
1186 #define _PORTA_T0CKI 0x10
1187 #define _PORTA_RA5 0x20
1188 #define _PORTA_AN4 0x20
1189 #define _PORTA_OSC2 0x40
1190 #define _PORTA_CLKO 0x40
1192 //==============================================================================
1195 //==============================================================================
1196 // PORTB Bits
1198 extern __at(0x0F81) __sfr PORTB;
1200 typedef union
1202 struct
1204 unsigned RB0 : 1;
1205 unsigned RB1 : 1;
1206 unsigned RB2 : 1;
1207 unsigned RB3 : 1;
1208 unsigned RB4 : 1;
1209 unsigned RB5 : 1;
1210 unsigned RB6 : 1;
1211 unsigned RB7 : 1;
1214 struct
1216 unsigned INT0 : 1;
1217 unsigned INT1 : 1;
1218 unsigned INT2 : 1;
1219 unsigned INT3 : 1;
1220 unsigned KBI0 : 1;
1221 unsigned KBI1 : 1;
1222 unsigned KBI2 : 1;
1223 unsigned KBI3 : 1;
1226 struct
1228 unsigned : 1;
1229 unsigned : 1;
1230 unsigned : 1;
1231 unsigned : 1;
1232 unsigned : 1;
1233 unsigned : 1;
1234 unsigned PGC : 1;
1235 unsigned PGD : 1;
1238 struct
1240 unsigned INT : 4;
1241 unsigned : 4;
1244 struct
1246 unsigned : 4;
1247 unsigned KBI : 4;
1249 } __PORTBbits_t;
1251 extern __at(0x0F81) volatile __PORTBbits_t PORTBbits;
1253 #define _PORTB_RB0 0x01
1254 #define _PORTB_INT0 0x01
1255 #define _PORTB_RB1 0x02
1256 #define _PORTB_INT1 0x02
1257 #define _PORTB_RB2 0x04
1258 #define _PORTB_INT2 0x04
1259 #define _PORTB_RB3 0x08
1260 #define _PORTB_INT3 0x08
1261 #define _PORTB_RB4 0x10
1262 #define _PORTB_KBI0 0x10
1263 #define _PORTB_RB5 0x20
1264 #define _PORTB_KBI1 0x20
1265 #define _PORTB_RB6 0x40
1266 #define _PORTB_KBI2 0x40
1267 #define _PORTB_PGC 0x40
1268 #define _PORTB_RB7 0x80
1269 #define _PORTB_KBI3 0x80
1270 #define _PORTB_PGD 0x80
1272 //==============================================================================
1275 //==============================================================================
1276 // PORTC Bits
1278 extern __at(0x0F82) __sfr PORTC;
1280 typedef union
1282 struct
1284 unsigned RC0 : 1;
1285 unsigned RC1 : 1;
1286 unsigned RC2 : 1;
1287 unsigned RC3 : 1;
1288 unsigned RC4 : 1;
1289 unsigned RC5 : 1;
1290 unsigned RC6 : 1;
1291 unsigned RC7 : 1;
1294 struct
1296 unsigned T1OSO : 1;
1297 unsigned T1OSI : 1;
1298 unsigned CCP1 : 1;
1299 unsigned SCK : 1;
1300 unsigned SDI : 1;
1301 unsigned SDO : 1;
1302 unsigned TX : 1;
1303 unsigned RX : 1;
1306 struct
1308 unsigned T13CKI : 1;
1309 unsigned CCP2 : 1;
1310 unsigned : 1;
1311 unsigned SCL : 1;
1312 unsigned SDA : 1;
1313 unsigned : 1;
1314 unsigned CK : 1;
1315 unsigned : 1;
1317 } __PORTCbits_t;
1319 extern __at(0x0F82) volatile __PORTCbits_t PORTCbits;
1321 #define _PORTC_RC0 0x01
1322 #define _PORTC_T1OSO 0x01
1323 #define _PORTC_T13CKI 0x01
1324 #define _PORTC_RC1 0x02
1325 #define _PORTC_T1OSI 0x02
1326 #define _PORTC_CCP2 0x02
1327 #define _PORTC_RC2 0x04
1328 #define _PORTC_CCP1 0x04
1329 #define _PORTC_RC3 0x08
1330 #define _PORTC_SCK 0x08
1331 #define _PORTC_SCL 0x08
1332 #define _PORTC_RC4 0x10
1333 #define _PORTC_SDI 0x10
1334 #define _PORTC_SDA 0x10
1335 #define _PORTC_RC5 0x20
1336 #define _PORTC_SDO 0x20
1337 #define _PORTC_RC6 0x40
1338 #define _PORTC_TX 0x40
1339 #define _PORTC_CK 0x40
1340 #define _PORTC_RC7 0x80
1341 #define _PORTC_RX 0x80
1343 //==============================================================================
1346 //==============================================================================
1347 // PORTD Bits
1349 extern __at(0x0F83) __sfr PORTD;
1351 typedef union
1353 struct
1355 unsigned RD0 : 1;
1356 unsigned RD1 : 1;
1357 unsigned RD2 : 1;
1358 unsigned RD3 : 1;
1359 unsigned RD4 : 1;
1360 unsigned RD5 : 1;
1361 unsigned RD6 : 1;
1362 unsigned RD7 : 1;
1365 struct
1367 unsigned PSP0 : 1;
1368 unsigned PSP1 : 1;
1369 unsigned PSP2 : 1;
1370 unsigned PSP3 : 1;
1371 unsigned PSP4 : 1;
1372 unsigned PSP5 : 1;
1373 unsigned PSP6 : 1;
1374 unsigned PSP7 : 1;
1377 struct
1379 unsigned : 1;
1380 unsigned : 1;
1381 unsigned : 1;
1382 unsigned : 1;
1383 unsigned SDO2 : 1;
1384 unsigned SDA2 : 1;
1385 unsigned SCL2 : 1;
1386 unsigned SS2 : 1;
1389 struct
1391 unsigned : 1;
1392 unsigned : 1;
1393 unsigned : 1;
1394 unsigned : 1;
1395 unsigned : 1;
1396 unsigned SDI2 : 1;
1397 unsigned SCK2 : 1;
1398 unsigned : 1;
1400 } __PORTDbits_t;
1402 extern __at(0x0F83) volatile __PORTDbits_t PORTDbits;
1404 #define _PORTD_RD0 0x01
1405 #define _PORTD_PSP0 0x01
1406 #define _PORTD_RD1 0x02
1407 #define _PORTD_PSP1 0x02
1408 #define _PORTD_RD2 0x04
1409 #define _PORTD_PSP2 0x04
1410 #define _PORTD_RD3 0x08
1411 #define _PORTD_PSP3 0x08
1412 #define _PORTD_RD4 0x10
1413 #define _PORTD_PSP4 0x10
1414 #define _PORTD_SDO2 0x10
1415 #define _PORTD_RD5 0x20
1416 #define _PORTD_PSP5 0x20
1417 #define _PORTD_SDA2 0x20
1418 #define _PORTD_SDI2 0x20
1419 #define _PORTD_RD6 0x40
1420 #define _PORTD_PSP6 0x40
1421 #define _PORTD_SCL2 0x40
1422 #define _PORTD_SCK2 0x40
1423 #define _PORTD_RD7 0x80
1424 #define _PORTD_PSP7 0x80
1425 #define _PORTD_SS2 0x80
1427 //==============================================================================
1430 //==============================================================================
1431 // PORTE Bits
1433 extern __at(0x0F84) __sfr PORTE;
1435 typedef union
1437 struct
1439 unsigned RE0 : 1;
1440 unsigned RE1 : 1;
1441 unsigned RE2 : 1;
1442 unsigned RE3 : 1;
1443 unsigned RE4 : 1;
1444 unsigned RE5 : 1;
1445 unsigned RE6 : 1;
1446 unsigned RE7 : 1;
1449 struct
1451 unsigned RD : 1;
1452 unsigned WR : 1;
1453 unsigned CS : 1;
1454 unsigned : 1;
1455 unsigned : 1;
1456 unsigned : 1;
1457 unsigned : 1;
1458 unsigned : 1;
1460 } __PORTEbits_t;
1462 extern __at(0x0F84) volatile __PORTEbits_t PORTEbits;
1464 #define _PORTE_RE0 0x01
1465 #define _PORTE_RD 0x01
1466 #define _PORTE_RE1 0x02
1467 #define _PORTE_WR 0x02
1468 #define _PORTE_RE2 0x04
1469 #define _PORTE_CS 0x04
1470 #define _PORTE_RE3 0x08
1471 #define _PORTE_RE4 0x10
1472 #define _PORTE_RE5 0x20
1473 #define _PORTE_RE6 0x40
1474 #define _PORTE_RE7 0x80
1476 //==============================================================================
1479 //==============================================================================
1480 // PORTF Bits
1482 extern __at(0x0F85) __sfr PORTF;
1484 typedef union
1486 struct
1488 unsigned : 1;
1489 unsigned RF1 : 1;
1490 unsigned RF2 : 1;
1491 unsigned RF3 : 1;
1492 unsigned RF4 : 1;
1493 unsigned RF5 : 1;
1494 unsigned RF6 : 1;
1495 unsigned RF7 : 1;
1498 struct
1500 unsigned : 1;
1501 unsigned AN6 : 1;
1502 unsigned AN7 : 1;
1503 unsigned AN8 : 1;
1504 unsigned AN9 : 1;
1505 unsigned AN10 : 1;
1506 unsigned AN11 : 1;
1507 unsigned SS : 1;
1510 struct
1512 unsigned : 1;
1513 unsigned : 1;
1514 unsigned : 1;
1515 unsigned CVREF : 1;
1516 unsigned : 1;
1517 unsigned : 1;
1518 unsigned : 1;
1519 unsigned : 1;
1521 } __PORTFbits_t;
1523 extern __at(0x0F85) volatile __PORTFbits_t PORTFbits;
1525 #define _PORTF_RF1 0x02
1526 #define _PORTF_AN6 0x02
1527 #define _PORTF_RF2 0x04
1528 #define _PORTF_AN7 0x04
1529 #define _PORTF_RF3 0x08
1530 #define _PORTF_AN8 0x08
1531 #define _PORTF_CVREF 0x08
1532 #define _PORTF_RF4 0x10
1533 #define _PORTF_AN9 0x10
1534 #define _PORTF_RF5 0x20
1535 #define _PORTF_AN10 0x20
1536 #define _PORTF_RF6 0x40
1537 #define _PORTF_AN11 0x40
1538 #define _PORTF_RF7 0x80
1539 #define _PORTF_SS 0x80
1541 //==============================================================================
1544 //==============================================================================
1545 // PORTG Bits
1547 extern __at(0x0F86) __sfr PORTG;
1549 typedef union
1551 struct
1553 unsigned RG0 : 1;
1554 unsigned RG1 : 1;
1555 unsigned RG2 : 1;
1556 unsigned RG3 : 1;
1557 unsigned RG4 : 1;
1558 unsigned : 1;
1559 unsigned REPU : 1;
1560 unsigned RDPU : 1;
1563 struct
1565 unsigned CCP3 : 1;
1566 unsigned TX2 : 1;
1567 unsigned RX2 : 1;
1568 unsigned CCP4 : 1;
1569 unsigned CCP5 : 1;
1570 unsigned : 1;
1571 unsigned : 1;
1572 unsigned : 1;
1575 struct
1577 unsigned : 1;
1578 unsigned CK2 : 1;
1579 unsigned DT2 : 1;
1580 unsigned : 1;
1581 unsigned : 1;
1582 unsigned : 1;
1583 unsigned : 1;
1584 unsigned : 1;
1587 struct
1589 unsigned RG : 5;
1590 unsigned : 3;
1592 } __PORTGbits_t;
1594 extern __at(0x0F86) volatile __PORTGbits_t PORTGbits;
1596 #define _PORTG_RG0 0x01
1597 #define _PORTG_CCP3 0x01
1598 #define _PORTG_RG1 0x02
1599 #define _PORTG_TX2 0x02
1600 #define _PORTG_CK2 0x02
1601 #define _PORTG_RG2 0x04
1602 #define _PORTG_RX2 0x04
1603 #define _PORTG_DT2 0x04
1604 #define _PORTG_RG3 0x08
1605 #define _PORTG_CCP4 0x08
1606 #define _PORTG_RG4 0x10
1607 #define _PORTG_CCP5 0x10
1608 #define _PORTG_REPU 0x40
1609 #define _PORTG_RDPU 0x80
1611 //==============================================================================
1614 //==============================================================================
1615 // LATA Bits
1617 extern __at(0x0F89) __sfr LATA;
1619 typedef union
1621 struct
1623 unsigned LATA0 : 1;
1624 unsigned LATA1 : 1;
1625 unsigned LATA2 : 1;
1626 unsigned LATA3 : 1;
1627 unsigned LATA4 : 1;
1628 unsigned LATA5 : 1;
1629 unsigned : 1;
1630 unsigned : 1;
1633 struct
1635 unsigned LATA : 6;
1636 unsigned : 2;
1638 } __LATAbits_t;
1640 extern __at(0x0F89) volatile __LATAbits_t LATAbits;
1642 #define _LATA0 0x01
1643 #define _LATA1 0x02
1644 #define _LATA2 0x04
1645 #define _LATA3 0x08
1646 #define _LATA4 0x10
1647 #define _LATA5 0x20
1649 //==============================================================================
1652 //==============================================================================
1653 // LATB Bits
1655 extern __at(0x0F8A) __sfr LATB;
1657 typedef struct
1659 unsigned LATB0 : 1;
1660 unsigned LATB1 : 1;
1661 unsigned LATB2 : 1;
1662 unsigned LATB3 : 1;
1663 unsigned LATB4 : 1;
1664 unsigned LATB5 : 1;
1665 unsigned LATB6 : 1;
1666 unsigned LATB7 : 1;
1667 } __LATBbits_t;
1669 extern __at(0x0F8A) volatile __LATBbits_t LATBbits;
1671 #define _LATB0 0x01
1672 #define _LATB1 0x02
1673 #define _LATB2 0x04
1674 #define _LATB3 0x08
1675 #define _LATB4 0x10
1676 #define _LATB5 0x20
1677 #define _LATB6 0x40
1678 #define _LATB7 0x80
1680 //==============================================================================
1683 //==============================================================================
1684 // LATC Bits
1686 extern __at(0x0F8B) __sfr LATC;
1688 typedef struct
1690 unsigned LATC0 : 1;
1691 unsigned LATC1 : 1;
1692 unsigned LATC2 : 1;
1693 unsigned LATC3 : 1;
1694 unsigned LATC4 : 1;
1695 unsigned LATC5 : 1;
1696 unsigned LATC6 : 1;
1697 unsigned LATC7 : 1;
1698 } __LATCbits_t;
1700 extern __at(0x0F8B) volatile __LATCbits_t LATCbits;
1702 #define _LATC0 0x01
1703 #define _LATC1 0x02
1704 #define _LATC2 0x04
1705 #define _LATC3 0x08
1706 #define _LATC4 0x10
1707 #define _LATC5 0x20
1708 #define _LATC6 0x40
1709 #define _LATC7 0x80
1711 //==============================================================================
1714 //==============================================================================
1715 // LATD Bits
1717 extern __at(0x0F8C) __sfr LATD;
1719 typedef struct
1721 unsigned LATD0 : 1;
1722 unsigned LATD1 : 1;
1723 unsigned LATD2 : 1;
1724 unsigned LATD3 : 1;
1725 unsigned LATD4 : 1;
1726 unsigned LATD5 : 1;
1727 unsigned LATD6 : 1;
1728 unsigned LATD7 : 1;
1729 } __LATDbits_t;
1731 extern __at(0x0F8C) volatile __LATDbits_t LATDbits;
1733 #define _LATD0 0x01
1734 #define _LATD1 0x02
1735 #define _LATD2 0x04
1736 #define _LATD3 0x08
1737 #define _LATD4 0x10
1738 #define _LATD5 0x20
1739 #define _LATD6 0x40
1740 #define _LATD7 0x80
1742 //==============================================================================
1745 //==============================================================================
1746 // LATE Bits
1748 extern __at(0x0F8D) __sfr LATE;
1750 typedef struct
1752 unsigned LATE0 : 1;
1753 unsigned LATE1 : 1;
1754 unsigned LATE2 : 1;
1755 unsigned LATE3 : 1;
1756 unsigned LATE4 : 1;
1757 unsigned LATE5 : 1;
1758 unsigned LATE6 : 1;
1759 unsigned LATE7 : 1;
1760 } __LATEbits_t;
1762 extern __at(0x0F8D) volatile __LATEbits_t LATEbits;
1764 #define _LATE0 0x01
1765 #define _LATE1 0x02
1766 #define _LATE2 0x04
1767 #define _LATE3 0x08
1768 #define _LATE4 0x10
1769 #define _LATE5 0x20
1770 #define _LATE6 0x40
1771 #define _LATE7 0x80
1773 //==============================================================================
1776 //==============================================================================
1777 // LATF Bits
1779 extern __at(0x0F8E) __sfr LATF;
1781 typedef struct
1783 unsigned : 1;
1784 unsigned LATF1 : 1;
1785 unsigned LATF2 : 1;
1786 unsigned LATF3 : 1;
1787 unsigned LATF4 : 1;
1788 unsigned LATF5 : 1;
1789 unsigned LATF6 : 1;
1790 unsigned LATF7 : 1;
1791 } __LATFbits_t;
1793 extern __at(0x0F8E) volatile __LATFbits_t LATFbits;
1795 #define _LATF1 0x02
1796 #define _LATF2 0x04
1797 #define _LATF3 0x08
1798 #define _LATF4 0x10
1799 #define _LATF5 0x20
1800 #define _LATF6 0x40
1801 #define _LATF7 0x80
1803 //==============================================================================
1806 //==============================================================================
1807 // LATG Bits
1809 extern __at(0x0F8F) __sfr LATG;
1811 typedef union
1813 struct
1815 unsigned LATG0 : 1;
1816 unsigned LATG1 : 1;
1817 unsigned LATG2 : 1;
1818 unsigned LATG3 : 1;
1819 unsigned LATG4 : 1;
1820 unsigned : 1;
1821 unsigned : 1;
1822 unsigned : 1;
1825 struct
1827 unsigned LATG : 5;
1828 unsigned : 3;
1830 } __LATGbits_t;
1832 extern __at(0x0F8F) volatile __LATGbits_t LATGbits;
1834 #define _LATG0 0x01
1835 #define _LATG1 0x02
1836 #define _LATG2 0x04
1837 #define _LATG3 0x08
1838 #define _LATG4 0x10
1840 //==============================================================================
1843 //==============================================================================
1844 // DDRA Bits
1846 extern __at(0x0F92) __sfr DDRA;
1848 typedef union
1850 struct
1852 unsigned TRISA0 : 1;
1853 unsigned TRISA1 : 1;
1854 unsigned TRISA2 : 1;
1855 unsigned TRISA3 : 1;
1856 unsigned TRISA4 : 1;
1857 unsigned TRISA5 : 1;
1858 unsigned : 1;
1859 unsigned : 1;
1862 struct
1864 unsigned RA0 : 1;
1865 unsigned RA1 : 1;
1866 unsigned RA2 : 1;
1867 unsigned RA3 : 1;
1868 unsigned RA4 : 1;
1869 unsigned RA5 : 1;
1870 unsigned : 1;
1871 unsigned : 1;
1874 struct
1876 unsigned RA : 6;
1877 unsigned : 2;
1880 struct
1882 unsigned TRISA : 6;
1883 unsigned : 2;
1885 } __DDRAbits_t;
1887 extern __at(0x0F92) volatile __DDRAbits_t DDRAbits;
1889 #define _TRISA0 0x01
1890 #define _RA0 0x01
1891 #define _TRISA1 0x02
1892 #define _RA1 0x02
1893 #define _TRISA2 0x04
1894 #define _RA2 0x04
1895 #define _TRISA3 0x08
1896 #define _RA3 0x08
1897 #define _TRISA4 0x10
1898 #define _RA4 0x10
1899 #define _TRISA5 0x20
1900 #define _RA5 0x20
1902 //==============================================================================
1905 //==============================================================================
1906 // TRISA Bits
1908 extern __at(0x0F92) __sfr TRISA;
1910 typedef union
1912 struct
1914 unsigned TRISA0 : 1;
1915 unsigned TRISA1 : 1;
1916 unsigned TRISA2 : 1;
1917 unsigned TRISA3 : 1;
1918 unsigned TRISA4 : 1;
1919 unsigned TRISA5 : 1;
1920 unsigned : 1;
1921 unsigned : 1;
1924 struct
1926 unsigned RA0 : 1;
1927 unsigned RA1 : 1;
1928 unsigned RA2 : 1;
1929 unsigned RA3 : 1;
1930 unsigned RA4 : 1;
1931 unsigned RA5 : 1;
1932 unsigned : 1;
1933 unsigned : 1;
1936 struct
1938 unsigned TRISA : 6;
1939 unsigned : 2;
1942 struct
1944 unsigned RA : 6;
1945 unsigned : 2;
1947 } __TRISAbits_t;
1949 extern __at(0x0F92) volatile __TRISAbits_t TRISAbits;
1951 #define _TRISA_TRISA0 0x01
1952 #define _TRISA_RA0 0x01
1953 #define _TRISA_TRISA1 0x02
1954 #define _TRISA_RA1 0x02
1955 #define _TRISA_TRISA2 0x04
1956 #define _TRISA_RA2 0x04
1957 #define _TRISA_TRISA3 0x08
1958 #define _TRISA_RA3 0x08
1959 #define _TRISA_TRISA4 0x10
1960 #define _TRISA_RA4 0x10
1961 #define _TRISA_TRISA5 0x20
1962 #define _TRISA_RA5 0x20
1964 //==============================================================================
1967 //==============================================================================
1968 // DDRB Bits
1970 extern __at(0x0F93) __sfr DDRB;
1972 typedef union
1974 struct
1976 unsigned TRISB0 : 1;
1977 unsigned TRISB1 : 1;
1978 unsigned TRISB2 : 1;
1979 unsigned TRISB3 : 1;
1980 unsigned TRISB4 : 1;
1981 unsigned TRISB5 : 1;
1982 unsigned TRISB6 : 1;
1983 unsigned TRISB7 : 1;
1986 struct
1988 unsigned RB0 : 1;
1989 unsigned RB1 : 1;
1990 unsigned RB2 : 1;
1991 unsigned RB3 : 1;
1992 unsigned RB4 : 1;
1993 unsigned RB5 : 1;
1994 unsigned RB6 : 1;
1995 unsigned RB7 : 1;
1997 } __DDRBbits_t;
1999 extern __at(0x0F93) volatile __DDRBbits_t DDRBbits;
2001 #define _TRISB0 0x01
2002 #define _RB0 0x01
2003 #define _TRISB1 0x02
2004 #define _RB1 0x02
2005 #define _TRISB2 0x04
2006 #define _RB2 0x04
2007 #define _TRISB3 0x08
2008 #define _RB3 0x08
2009 #define _TRISB4 0x10
2010 #define _RB4 0x10
2011 #define _TRISB5 0x20
2012 #define _RB5 0x20
2013 #define _TRISB6 0x40
2014 #define _RB6 0x40
2015 #define _TRISB7 0x80
2016 #define _RB7 0x80
2018 //==============================================================================
2021 //==============================================================================
2022 // TRISB Bits
2024 extern __at(0x0F93) __sfr TRISB;
2026 typedef union
2028 struct
2030 unsigned TRISB0 : 1;
2031 unsigned TRISB1 : 1;
2032 unsigned TRISB2 : 1;
2033 unsigned TRISB3 : 1;
2034 unsigned TRISB4 : 1;
2035 unsigned TRISB5 : 1;
2036 unsigned TRISB6 : 1;
2037 unsigned TRISB7 : 1;
2040 struct
2042 unsigned RB0 : 1;
2043 unsigned RB1 : 1;
2044 unsigned RB2 : 1;
2045 unsigned RB3 : 1;
2046 unsigned RB4 : 1;
2047 unsigned RB5 : 1;
2048 unsigned RB6 : 1;
2049 unsigned RB7 : 1;
2051 } __TRISBbits_t;
2053 extern __at(0x0F93) volatile __TRISBbits_t TRISBbits;
2055 #define _TRISB_TRISB0 0x01
2056 #define _TRISB_RB0 0x01
2057 #define _TRISB_TRISB1 0x02
2058 #define _TRISB_RB1 0x02
2059 #define _TRISB_TRISB2 0x04
2060 #define _TRISB_RB2 0x04
2061 #define _TRISB_TRISB3 0x08
2062 #define _TRISB_RB3 0x08
2063 #define _TRISB_TRISB4 0x10
2064 #define _TRISB_RB4 0x10
2065 #define _TRISB_TRISB5 0x20
2066 #define _TRISB_RB5 0x20
2067 #define _TRISB_TRISB6 0x40
2068 #define _TRISB_RB6 0x40
2069 #define _TRISB_TRISB7 0x80
2070 #define _TRISB_RB7 0x80
2072 //==============================================================================
2075 //==============================================================================
2076 // DDRC Bits
2078 extern __at(0x0F94) __sfr DDRC;
2080 typedef union
2082 struct
2084 unsigned TRISC0 : 1;
2085 unsigned TRISC1 : 1;
2086 unsigned TRISC2 : 1;
2087 unsigned TRISC3 : 1;
2088 unsigned TRISC4 : 1;
2089 unsigned TRISC5 : 1;
2090 unsigned TRISC6 : 1;
2091 unsigned TRISC7 : 1;
2094 struct
2096 unsigned RC0 : 1;
2097 unsigned RC1 : 1;
2098 unsigned RC2 : 1;
2099 unsigned RC3 : 1;
2100 unsigned RC4 : 1;
2101 unsigned RC5 : 1;
2102 unsigned RC6 : 1;
2103 unsigned RC7 : 1;
2105 } __DDRCbits_t;
2107 extern __at(0x0F94) volatile __DDRCbits_t DDRCbits;
2109 #define _TRISC0 0x01
2110 #define _RC0 0x01
2111 #define _TRISC1 0x02
2112 #define _RC1 0x02
2113 #define _TRISC2 0x04
2114 #define _RC2 0x04
2115 #define _TRISC3 0x08
2116 #define _RC3 0x08
2117 #define _TRISC4 0x10
2118 #define _RC4 0x10
2119 #define _TRISC5 0x20
2120 #define _RC5 0x20
2121 #define _TRISC6 0x40
2122 #define _RC6 0x40
2123 #define _TRISC7 0x80
2124 #define _RC7 0x80
2126 //==============================================================================
2129 //==============================================================================
2130 // TRISC Bits
2132 extern __at(0x0F94) __sfr TRISC;
2134 typedef union
2136 struct
2138 unsigned TRISC0 : 1;
2139 unsigned TRISC1 : 1;
2140 unsigned TRISC2 : 1;
2141 unsigned TRISC3 : 1;
2142 unsigned TRISC4 : 1;
2143 unsigned TRISC5 : 1;
2144 unsigned TRISC6 : 1;
2145 unsigned TRISC7 : 1;
2148 struct
2150 unsigned RC0 : 1;
2151 unsigned RC1 : 1;
2152 unsigned RC2 : 1;
2153 unsigned RC3 : 1;
2154 unsigned RC4 : 1;
2155 unsigned RC5 : 1;
2156 unsigned RC6 : 1;
2157 unsigned RC7 : 1;
2159 } __TRISCbits_t;
2161 extern __at(0x0F94) volatile __TRISCbits_t TRISCbits;
2163 #define _TRISC_TRISC0 0x01
2164 #define _TRISC_RC0 0x01
2165 #define _TRISC_TRISC1 0x02
2166 #define _TRISC_RC1 0x02
2167 #define _TRISC_TRISC2 0x04
2168 #define _TRISC_RC2 0x04
2169 #define _TRISC_TRISC3 0x08
2170 #define _TRISC_RC3 0x08
2171 #define _TRISC_TRISC4 0x10
2172 #define _TRISC_RC4 0x10
2173 #define _TRISC_TRISC5 0x20
2174 #define _TRISC_RC5 0x20
2175 #define _TRISC_TRISC6 0x40
2176 #define _TRISC_RC6 0x40
2177 #define _TRISC_TRISC7 0x80
2178 #define _TRISC_RC7 0x80
2180 //==============================================================================
2183 //==============================================================================
2184 // DDRD Bits
2186 extern __at(0x0F95) __sfr DDRD;
2188 typedef union
2190 struct
2192 unsigned TRISD0 : 1;
2193 unsigned TRISD1 : 1;
2194 unsigned TRISD2 : 1;
2195 unsigned TRISD3 : 1;
2196 unsigned TRISD4 : 1;
2197 unsigned TRISD5 : 1;
2198 unsigned TRISD6 : 1;
2199 unsigned TRISD7 : 1;
2202 struct
2204 unsigned RD0 : 1;
2205 unsigned RD1 : 1;
2206 unsigned RD2 : 1;
2207 unsigned RD3 : 1;
2208 unsigned RD4 : 1;
2209 unsigned RD5 : 1;
2210 unsigned RD6 : 1;
2211 unsigned RD7 : 1;
2213 } __DDRDbits_t;
2215 extern __at(0x0F95) volatile __DDRDbits_t DDRDbits;
2217 #define _TRISD0 0x01
2218 #define _RD0 0x01
2219 #define _TRISD1 0x02
2220 #define _RD1 0x02
2221 #define _TRISD2 0x04
2222 #define _RD2 0x04
2223 #define _TRISD3 0x08
2224 #define _RD3 0x08
2225 #define _TRISD4 0x10
2226 #define _RD4 0x10
2227 #define _TRISD5 0x20
2228 #define _RD5 0x20
2229 #define _TRISD6 0x40
2230 #define _RD6 0x40
2231 #define _TRISD7 0x80
2232 #define _RD7 0x80
2234 //==============================================================================
2237 //==============================================================================
2238 // TRISD Bits
2240 extern __at(0x0F95) __sfr TRISD;
2242 typedef union
2244 struct
2246 unsigned TRISD0 : 1;
2247 unsigned TRISD1 : 1;
2248 unsigned TRISD2 : 1;
2249 unsigned TRISD3 : 1;
2250 unsigned TRISD4 : 1;
2251 unsigned TRISD5 : 1;
2252 unsigned TRISD6 : 1;
2253 unsigned TRISD7 : 1;
2256 struct
2258 unsigned RD0 : 1;
2259 unsigned RD1 : 1;
2260 unsigned RD2 : 1;
2261 unsigned RD3 : 1;
2262 unsigned RD4 : 1;
2263 unsigned RD5 : 1;
2264 unsigned RD6 : 1;
2265 unsigned RD7 : 1;
2267 } __TRISDbits_t;
2269 extern __at(0x0F95) volatile __TRISDbits_t TRISDbits;
2271 #define _TRISD_TRISD0 0x01
2272 #define _TRISD_RD0 0x01
2273 #define _TRISD_TRISD1 0x02
2274 #define _TRISD_RD1 0x02
2275 #define _TRISD_TRISD2 0x04
2276 #define _TRISD_RD2 0x04
2277 #define _TRISD_TRISD3 0x08
2278 #define _TRISD_RD3 0x08
2279 #define _TRISD_TRISD4 0x10
2280 #define _TRISD_RD4 0x10
2281 #define _TRISD_TRISD5 0x20
2282 #define _TRISD_RD5 0x20
2283 #define _TRISD_TRISD6 0x40
2284 #define _TRISD_RD6 0x40
2285 #define _TRISD_TRISD7 0x80
2286 #define _TRISD_RD7 0x80
2288 //==============================================================================
2291 //==============================================================================
2292 // DDRE Bits
2294 extern __at(0x0F96) __sfr DDRE;
2296 typedef union
2298 struct
2300 unsigned TRISE0 : 1;
2301 unsigned TRISE1 : 1;
2302 unsigned TRISE2 : 1;
2303 unsigned TRISE3 : 1;
2304 unsigned TRISE4 : 1;
2305 unsigned TRISE5 : 1;
2306 unsigned TRISE6 : 1;
2307 unsigned TRISE7 : 1;
2310 struct
2312 unsigned RE0 : 1;
2313 unsigned RE1 : 1;
2314 unsigned RE2 : 1;
2315 unsigned RE3 : 1;
2316 unsigned RE4 : 1;
2317 unsigned RE5 : 1;
2318 unsigned RE6 : 1;
2319 unsigned RE7 : 1;
2321 } __DDREbits_t;
2323 extern __at(0x0F96) volatile __DDREbits_t DDREbits;
2325 #define _TRISE0 0x01
2326 #define _RE0 0x01
2327 #define _TRISE1 0x02
2328 #define _RE1 0x02
2329 #define _TRISE2 0x04
2330 #define _RE2 0x04
2331 #define _TRISE3 0x08
2332 #define _RE3 0x08
2333 #define _TRISE4 0x10
2334 #define _RE4 0x10
2335 #define _TRISE5 0x20
2336 #define _RE5 0x20
2337 #define _TRISE6 0x40
2338 #define _RE6 0x40
2339 #define _TRISE7 0x80
2340 #define _RE7 0x80
2342 //==============================================================================
2345 //==============================================================================
2346 // TRISE Bits
2348 extern __at(0x0F96) __sfr TRISE;
2350 typedef union
2352 struct
2354 unsigned TRISE0 : 1;
2355 unsigned TRISE1 : 1;
2356 unsigned TRISE2 : 1;
2357 unsigned TRISE3 : 1;
2358 unsigned TRISE4 : 1;
2359 unsigned TRISE5 : 1;
2360 unsigned TRISE6 : 1;
2361 unsigned TRISE7 : 1;
2364 struct
2366 unsigned RE0 : 1;
2367 unsigned RE1 : 1;
2368 unsigned RE2 : 1;
2369 unsigned RE3 : 1;
2370 unsigned RE4 : 1;
2371 unsigned RE5 : 1;
2372 unsigned RE6 : 1;
2373 unsigned RE7 : 1;
2375 } __TRISEbits_t;
2377 extern __at(0x0F96) volatile __TRISEbits_t TRISEbits;
2379 #define _TRISE_TRISE0 0x01
2380 #define _TRISE_RE0 0x01
2381 #define _TRISE_TRISE1 0x02
2382 #define _TRISE_RE1 0x02
2383 #define _TRISE_TRISE2 0x04
2384 #define _TRISE_RE2 0x04
2385 #define _TRISE_TRISE3 0x08
2386 #define _TRISE_RE3 0x08
2387 #define _TRISE_TRISE4 0x10
2388 #define _TRISE_RE4 0x10
2389 #define _TRISE_TRISE5 0x20
2390 #define _TRISE_RE5 0x20
2391 #define _TRISE_TRISE6 0x40
2392 #define _TRISE_RE6 0x40
2393 #define _TRISE_TRISE7 0x80
2394 #define _TRISE_RE7 0x80
2396 //==============================================================================
2399 //==============================================================================
2400 // DDRF Bits
2402 extern __at(0x0F97) __sfr DDRF;
2404 typedef union
2406 struct
2408 unsigned : 1;
2409 unsigned TRISF1 : 1;
2410 unsigned TRISF2 : 1;
2411 unsigned TRISF3 : 1;
2412 unsigned TRISF4 : 1;
2413 unsigned TRISF5 : 1;
2414 unsigned TRISF6 : 1;
2415 unsigned TRISF7 : 1;
2418 struct
2420 unsigned : 1;
2421 unsigned RF1 : 1;
2422 unsigned RF2 : 1;
2423 unsigned RF3 : 1;
2424 unsigned RF4 : 1;
2425 unsigned RF5 : 1;
2426 unsigned RF6 : 1;
2427 unsigned RF7 : 1;
2429 } __DDRFbits_t;
2431 extern __at(0x0F97) volatile __DDRFbits_t DDRFbits;
2433 #define _TRISF1 0x02
2434 #define _RF1 0x02
2435 #define _TRISF2 0x04
2436 #define _RF2 0x04
2437 #define _TRISF3 0x08
2438 #define _RF3 0x08
2439 #define _TRISF4 0x10
2440 #define _RF4 0x10
2441 #define _TRISF5 0x20
2442 #define _RF5 0x20
2443 #define _TRISF6 0x40
2444 #define _RF6 0x40
2445 #define _TRISF7 0x80
2446 #define _RF7 0x80
2448 //==============================================================================
2451 //==============================================================================
2452 // TRISF Bits
2454 extern __at(0x0F97) __sfr TRISF;
2456 typedef union
2458 struct
2460 unsigned : 1;
2461 unsigned TRISF1 : 1;
2462 unsigned TRISF2 : 1;
2463 unsigned TRISF3 : 1;
2464 unsigned TRISF4 : 1;
2465 unsigned TRISF5 : 1;
2466 unsigned TRISF6 : 1;
2467 unsigned TRISF7 : 1;
2470 struct
2472 unsigned : 1;
2473 unsigned RF1 : 1;
2474 unsigned RF2 : 1;
2475 unsigned RF3 : 1;
2476 unsigned RF4 : 1;
2477 unsigned RF5 : 1;
2478 unsigned RF6 : 1;
2479 unsigned RF7 : 1;
2481 } __TRISFbits_t;
2483 extern __at(0x0F97) volatile __TRISFbits_t TRISFbits;
2485 #define _TRISF_TRISF1 0x02
2486 #define _TRISF_RF1 0x02
2487 #define _TRISF_TRISF2 0x04
2488 #define _TRISF_RF2 0x04
2489 #define _TRISF_TRISF3 0x08
2490 #define _TRISF_RF3 0x08
2491 #define _TRISF_TRISF4 0x10
2492 #define _TRISF_RF4 0x10
2493 #define _TRISF_TRISF5 0x20
2494 #define _TRISF_RF5 0x20
2495 #define _TRISF_TRISF6 0x40
2496 #define _TRISF_RF6 0x40
2497 #define _TRISF_TRISF7 0x80
2498 #define _TRISF_RF7 0x80
2500 //==============================================================================
2503 //==============================================================================
2504 // DDRG Bits
2506 extern __at(0x0F98) __sfr DDRG;
2508 typedef union
2510 struct
2512 unsigned TRISG0 : 1;
2513 unsigned TRISG1 : 1;
2514 unsigned TRISG2 : 1;
2515 unsigned TRISG3 : 1;
2516 unsigned TRISG4 : 1;
2517 unsigned : 1;
2518 unsigned : 1;
2519 unsigned : 1;
2522 struct
2524 unsigned RG0 : 1;
2525 unsigned RG1 : 1;
2526 unsigned RG2 : 1;
2527 unsigned RG3 : 1;
2528 unsigned RG4 : 1;
2529 unsigned : 1;
2530 unsigned : 1;
2531 unsigned : 1;
2534 struct
2536 unsigned TRISG : 5;
2537 unsigned : 3;
2540 struct
2542 unsigned RG : 5;
2543 unsigned : 3;
2545 } __DDRGbits_t;
2547 extern __at(0x0F98) volatile __DDRGbits_t DDRGbits;
2549 #define _TRISG0 0x01
2550 #define _RG0 0x01
2551 #define _TRISG1 0x02
2552 #define _RG1 0x02
2553 #define _TRISG2 0x04
2554 #define _RG2 0x04
2555 #define _TRISG3 0x08
2556 #define _RG3 0x08
2557 #define _TRISG4 0x10
2558 #define _RG4 0x10
2560 //==============================================================================
2563 //==============================================================================
2564 // TRISG Bits
2566 extern __at(0x0F98) __sfr TRISG;
2568 typedef union
2570 struct
2572 unsigned TRISG0 : 1;
2573 unsigned TRISG1 : 1;
2574 unsigned TRISG2 : 1;
2575 unsigned TRISG3 : 1;
2576 unsigned TRISG4 : 1;
2577 unsigned : 1;
2578 unsigned : 1;
2579 unsigned : 1;
2582 struct
2584 unsigned RG0 : 1;
2585 unsigned RG1 : 1;
2586 unsigned RG2 : 1;
2587 unsigned RG3 : 1;
2588 unsigned RG4 : 1;
2589 unsigned : 1;
2590 unsigned : 1;
2591 unsigned : 1;
2594 struct
2596 unsigned RG : 5;
2597 unsigned : 3;
2600 struct
2602 unsigned TRISG : 5;
2603 unsigned : 3;
2605 } __TRISGbits_t;
2607 extern __at(0x0F98) volatile __TRISGbits_t TRISGbits;
2609 #define _TRISG_TRISG0 0x01
2610 #define _TRISG_RG0 0x01
2611 #define _TRISG_TRISG1 0x02
2612 #define _TRISG_RG1 0x02
2613 #define _TRISG_TRISG2 0x04
2614 #define _TRISG_RG2 0x04
2615 #define _TRISG_TRISG3 0x08
2616 #define _TRISG_RG3 0x08
2617 #define _TRISG_TRISG4 0x10
2618 #define _TRISG_RG4 0x10
2620 //==============================================================================
2623 //==============================================================================
2624 // OSCTUNE Bits
2626 extern __at(0x0F9B) __sfr OSCTUNE;
2628 typedef struct
2630 unsigned : 1;
2631 unsigned : 1;
2632 unsigned : 1;
2633 unsigned : 1;
2634 unsigned : 1;
2635 unsigned : 1;
2636 unsigned PLLEN : 1;
2637 unsigned : 1;
2638 } __OSCTUNEbits_t;
2640 extern __at(0x0F9B) volatile __OSCTUNEbits_t OSCTUNEbits;
2642 #define _PLLEN 0x40
2644 //==============================================================================
2647 //==============================================================================
2648 // PIE1 Bits
2650 extern __at(0x0F9D) __sfr PIE1;
2652 typedef union
2654 struct
2656 unsigned TMR1IE : 1;
2657 unsigned TMR2IE : 1;
2658 unsigned CCP1IE : 1;
2659 unsigned SSP1IE : 1;
2660 unsigned TX1IE : 1;
2661 unsigned RC1IE : 1;
2662 unsigned ADIE : 1;
2663 unsigned PSPIE : 1;
2666 struct
2668 unsigned : 1;
2669 unsigned : 1;
2670 unsigned CCPIE : 1;
2671 unsigned SSPIE : 1;
2672 unsigned TXIE : 1;
2673 unsigned RCIE : 1;
2674 unsigned : 1;
2675 unsigned : 1;
2677 } __PIE1bits_t;
2679 extern __at(0x0F9D) volatile __PIE1bits_t PIE1bits;
2681 #define _TMR1IE 0x01
2682 #define _TMR2IE 0x02
2683 #define _CCP1IE 0x04
2684 #define _CCPIE 0x04
2685 #define _SSP1IE 0x08
2686 #define _SSPIE 0x08
2687 #define _TX1IE 0x10
2688 #define _TXIE 0x10
2689 #define _RC1IE 0x20
2690 #define _RCIE 0x20
2691 #define _ADIE 0x40
2692 #define _PSPIE 0x80
2694 //==============================================================================
2697 //==============================================================================
2698 // PIR1 Bits
2700 extern __at(0x0F9E) __sfr PIR1;
2702 typedef union
2704 struct
2706 unsigned TMR1IF : 1;
2707 unsigned TMR2IF : 1;
2708 unsigned CCP1IF : 1;
2709 unsigned SSP1IF : 1;
2710 unsigned TX1IF : 1;
2711 unsigned RC1IF : 1;
2712 unsigned ADIF : 1;
2713 unsigned PSPIF : 1;
2716 struct
2718 unsigned : 1;
2719 unsigned : 1;
2720 unsigned CCPIF : 1;
2721 unsigned SSPIF : 1;
2722 unsigned TXIF : 1;
2723 unsigned RCIF : 1;
2724 unsigned : 1;
2725 unsigned : 1;
2727 } __PIR1bits_t;
2729 extern __at(0x0F9E) volatile __PIR1bits_t PIR1bits;
2731 #define _TMR1IF 0x01
2732 #define _TMR2IF 0x02
2733 #define _CCP1IF 0x04
2734 #define _CCPIF 0x04
2735 #define _SSP1IF 0x08
2736 #define _SSPIF 0x08
2737 #define _TX1IF 0x10
2738 #define _TXIF 0x10
2739 #define _RC1IF 0x20
2740 #define _RCIF 0x20
2741 #define _ADIF 0x40
2742 #define _PSPIF 0x80
2744 //==============================================================================
2747 //==============================================================================
2748 // IPR1 Bits
2750 extern __at(0x0F9F) __sfr IPR1;
2752 typedef union
2754 struct
2756 unsigned TMR1IP : 1;
2757 unsigned TMR2IP : 1;
2758 unsigned CCP1IP : 1;
2759 unsigned SSP1IP : 1;
2760 unsigned TX1IP : 1;
2761 unsigned RC1IP : 1;
2762 unsigned ADIP : 1;
2763 unsigned PSPIP : 1;
2766 struct
2768 unsigned : 1;
2769 unsigned : 1;
2770 unsigned CCPIP : 1;
2771 unsigned SSPIP : 1;
2772 unsigned TXIP : 1;
2773 unsigned RCIP : 1;
2774 unsigned : 1;
2775 unsigned : 1;
2777 } __IPR1bits_t;
2779 extern __at(0x0F9F) volatile __IPR1bits_t IPR1bits;
2781 #define _TMR1IP 0x01
2782 #define _TMR2IP 0x02
2783 #define _CCP1IP 0x04
2784 #define _CCPIP 0x04
2785 #define _SSP1IP 0x08
2786 #define _SSPIP 0x08
2787 #define _TX1IP 0x10
2788 #define _TXIP 0x10
2789 #define _RC1IP 0x20
2790 #define _RCIP 0x20
2791 #define _ADIP 0x40
2792 #define _PSPIP 0x80
2794 //==============================================================================
2797 //==============================================================================
2798 // PIE2 Bits
2800 extern __at(0x0FA0) __sfr PIE2;
2802 typedef union
2804 struct
2806 unsigned CCP2IE : 1;
2807 unsigned TMR3IE : 1;
2808 unsigned : 1;
2809 unsigned BCL1IE : 1;
2810 unsigned : 1;
2811 unsigned : 1;
2812 unsigned CMIE : 1;
2813 unsigned OSCFIE : 1;
2816 struct
2818 unsigned : 1;
2819 unsigned : 1;
2820 unsigned : 1;
2821 unsigned BCLIE : 1;
2822 unsigned : 1;
2823 unsigned : 1;
2824 unsigned : 1;
2825 unsigned : 1;
2827 } __PIE2bits_t;
2829 extern __at(0x0FA0) volatile __PIE2bits_t PIE2bits;
2831 #define _CCP2IE 0x01
2832 #define _TMR3IE 0x02
2833 #define _BCL1IE 0x08
2834 #define _BCLIE 0x08
2835 #define _CMIE 0x40
2836 #define _OSCFIE 0x80
2838 //==============================================================================
2841 //==============================================================================
2842 // PIR2 Bits
2844 extern __at(0x0FA1) __sfr PIR2;
2846 typedef union
2848 struct
2850 unsigned CCP2IF : 1;
2851 unsigned TMR3IF : 1;
2852 unsigned : 1;
2853 unsigned BCL1IF : 1;
2854 unsigned : 1;
2855 unsigned : 1;
2856 unsigned CMIF : 1;
2857 unsigned OSCFIF : 1;
2860 struct
2862 unsigned : 1;
2863 unsigned : 1;
2864 unsigned : 1;
2865 unsigned BCLIF : 1;
2866 unsigned : 1;
2867 unsigned : 1;
2868 unsigned : 1;
2869 unsigned : 1;
2871 } __PIR2bits_t;
2873 extern __at(0x0FA1) volatile __PIR2bits_t PIR2bits;
2875 #define _CCP2IF 0x01
2876 #define _TMR3IF 0x02
2877 #define _BCL1IF 0x08
2878 #define _BCLIF 0x08
2879 #define _CMIF 0x40
2880 #define _OSCFIF 0x80
2882 //==============================================================================
2885 //==============================================================================
2886 // IPR2 Bits
2888 extern __at(0x0FA2) __sfr IPR2;
2890 typedef union
2892 struct
2894 unsigned CCP2IP : 1;
2895 unsigned TMR3IP : 1;
2896 unsigned : 1;
2897 unsigned BCL1IP : 1;
2898 unsigned : 1;
2899 unsigned : 1;
2900 unsigned CMIP : 1;
2901 unsigned OSCFIP : 1;
2904 struct
2906 unsigned : 1;
2907 unsigned : 1;
2908 unsigned : 1;
2909 unsigned BCLIP : 1;
2910 unsigned : 1;
2911 unsigned : 1;
2912 unsigned : 1;
2913 unsigned : 1;
2915 } __IPR2bits_t;
2917 extern __at(0x0FA2) volatile __IPR2bits_t IPR2bits;
2919 #define _CCP2IP 0x01
2920 #define _TMR3IP 0x02
2921 #define _BCL1IP 0x08
2922 #define _BCLIP 0x08
2923 #define _CMIP 0x40
2924 #define _OSCFIP 0x80
2926 //==============================================================================
2929 //==============================================================================
2930 // PIE3 Bits
2932 extern __at(0x0FA3) __sfr PIE3;
2934 typedef struct
2936 unsigned CCP3IE : 1;
2937 unsigned CCP4IE : 1;
2938 unsigned CCP5IE : 1;
2939 unsigned TMR4IE : 1;
2940 unsigned TX2IE : 1;
2941 unsigned RC2IE : 1;
2942 unsigned BCL2IE : 1;
2943 unsigned SSP2IE : 1;
2944 } __PIE3bits_t;
2946 extern __at(0x0FA3) volatile __PIE3bits_t PIE3bits;
2948 #define _CCP3IE 0x01
2949 #define _CCP4IE 0x02
2950 #define _CCP5IE 0x04
2951 #define _TMR4IE 0x08
2952 #define _TX2IE 0x10
2953 #define _RC2IE 0x20
2954 #define _BCL2IE 0x40
2955 #define _SSP2IE 0x80
2957 //==============================================================================
2960 //==============================================================================
2961 // PIR3 Bits
2963 extern __at(0x0FA4) __sfr PIR3;
2965 typedef struct
2967 unsigned CCP3IF : 1;
2968 unsigned CCP4IF : 1;
2969 unsigned CCP5IF : 1;
2970 unsigned TMR4IF : 1;
2971 unsigned TX2IF : 1;
2972 unsigned RC2IF : 1;
2973 unsigned BCL2IF : 1;
2974 unsigned SSP2IF : 1;
2975 } __PIR3bits_t;
2977 extern __at(0x0FA4) volatile __PIR3bits_t PIR3bits;
2979 #define _CCP3IF 0x01
2980 #define _CCP4IF 0x02
2981 #define _CCP5IF 0x04
2982 #define _TMR4IF 0x08
2983 #define _TX2IF 0x10
2984 #define _RC2IF 0x20
2985 #define _BCL2IF 0x40
2986 #define _SSP2IF 0x80
2988 //==============================================================================
2991 //==============================================================================
2992 // IPR3 Bits
2994 extern __at(0x0FA5) __sfr IPR3;
2996 typedef struct
2998 unsigned CCP3IP : 1;
2999 unsigned CCP4IP : 1;
3000 unsigned CCP5IP : 1;
3001 unsigned TMR4IP : 1;
3002 unsigned TX2IP : 1;
3003 unsigned RC2IP : 1;
3004 unsigned BCL2IP : 1;
3005 unsigned SSP2IP : 1;
3006 } __IPR3bits_t;
3008 extern __at(0x0FA5) volatile __IPR3bits_t IPR3bits;
3010 #define _CCP3IP 0x01
3011 #define _CCP4IP 0x02
3012 #define _CCP5IP 0x04
3013 #define _TMR4IP 0x08
3014 #define _TX2IP 0x10
3015 #define _RC2IP 0x20
3016 #define _BCL2IP 0x40
3017 #define _SSP2IP 0x80
3019 //==============================================================================
3022 //==============================================================================
3023 // EECON1 Bits
3025 extern __at(0x0FA6) __sfr EECON1;
3027 typedef struct
3029 unsigned : 1;
3030 unsigned WR : 1;
3031 unsigned WREN : 1;
3032 unsigned WRERR : 1;
3033 unsigned FREE : 1;
3034 unsigned : 1;
3035 unsigned : 1;
3036 unsigned : 1;
3037 } __EECON1bits_t;
3039 extern __at(0x0FA6) volatile __EECON1bits_t EECON1bits;
3041 #define _WR 0x02
3042 #define _WREN 0x04
3043 #define _WRERR 0x08
3044 #define _FREE 0x10
3046 //==============================================================================
3048 extern __at(0x0FA7) __sfr EECON2;
3050 //==============================================================================
3051 // RCSTA Bits
3053 extern __at(0x0FAB) __sfr RCSTA;
3055 typedef union
3057 struct
3059 unsigned RX9D : 1;
3060 unsigned OERR : 1;
3061 unsigned FERR : 1;
3062 unsigned ADDEN : 1;
3063 unsigned CREN : 1;
3064 unsigned SREN : 1;
3065 unsigned RX9 : 1;
3066 unsigned SPEN : 1;
3069 struct
3071 unsigned RCD8 : 1;
3072 unsigned OERR1 : 1;
3073 unsigned FERR1 : 1;
3074 unsigned ADDEN1 : 1;
3075 unsigned CREN1 : 1;
3076 unsigned SREN1 : 1;
3077 unsigned RC9 : 1;
3078 unsigned SPEN1 : 1;
3081 struct
3083 unsigned RX9D1 : 1;
3084 unsigned : 1;
3085 unsigned : 1;
3086 unsigned : 1;
3087 unsigned : 1;
3088 unsigned : 1;
3089 unsigned NOT_RC8 : 1;
3090 unsigned : 1;
3093 struct
3095 unsigned : 1;
3096 unsigned : 1;
3097 unsigned : 1;
3098 unsigned : 1;
3099 unsigned : 1;
3100 unsigned : 1;
3101 unsigned RC8_9 : 1;
3102 unsigned : 1;
3105 struct
3107 unsigned : 1;
3108 unsigned : 1;
3109 unsigned : 1;
3110 unsigned : 1;
3111 unsigned : 1;
3112 unsigned : 1;
3113 unsigned RX91 : 1;
3114 unsigned : 1;
3116 } __RCSTAbits_t;
3118 extern __at(0x0FAB) volatile __RCSTAbits_t RCSTAbits;
3120 #define _RX9D 0x01
3121 #define _RCD8 0x01
3122 #define _RX9D1 0x01
3123 #define _OERR 0x02
3124 #define _OERR1 0x02
3125 #define _FERR 0x04
3126 #define _FERR1 0x04
3127 #define _ADDEN 0x08
3128 #define _ADDEN1 0x08
3129 #define _CREN 0x10
3130 #define _CREN1 0x10
3131 #define _SREN 0x20
3132 #define _SREN1 0x20
3133 #define _RX9 0x40
3134 #define _RC9 0x40
3135 #define _NOT_RC8 0x40
3136 #define _RC8_9 0x40
3137 #define _RX91 0x40
3138 #define _SPEN 0x80
3139 #define _SPEN1 0x80
3141 //==============================================================================
3144 //==============================================================================
3145 // RCSTA1 Bits
3147 extern __at(0x0FAB) __sfr RCSTA1;
3149 typedef union
3151 struct
3153 unsigned RX9D : 1;
3154 unsigned OERR : 1;
3155 unsigned FERR : 1;
3156 unsigned ADDEN : 1;
3157 unsigned CREN : 1;
3158 unsigned SREN : 1;
3159 unsigned RX9 : 1;
3160 unsigned SPEN : 1;
3163 struct
3165 unsigned RCD8 : 1;
3166 unsigned OERR1 : 1;
3167 unsigned FERR1 : 1;
3168 unsigned ADDEN1 : 1;
3169 unsigned CREN1 : 1;
3170 unsigned SREN1 : 1;
3171 unsigned RC9 : 1;
3172 unsigned SPEN1 : 1;
3175 struct
3177 unsigned RX9D1 : 1;
3178 unsigned : 1;
3179 unsigned : 1;
3180 unsigned : 1;
3181 unsigned : 1;
3182 unsigned : 1;
3183 unsigned NOT_RC8 : 1;
3184 unsigned : 1;
3187 struct
3189 unsigned : 1;
3190 unsigned : 1;
3191 unsigned : 1;
3192 unsigned : 1;
3193 unsigned : 1;
3194 unsigned : 1;
3195 unsigned RC8_9 : 1;
3196 unsigned : 1;
3199 struct
3201 unsigned : 1;
3202 unsigned : 1;
3203 unsigned : 1;
3204 unsigned : 1;
3205 unsigned : 1;
3206 unsigned : 1;
3207 unsigned RX91 : 1;
3208 unsigned : 1;
3210 } __RCSTA1bits_t;
3212 extern __at(0x0FAB) volatile __RCSTA1bits_t RCSTA1bits;
3214 #define _RCSTA1_RX9D 0x01
3215 #define _RCSTA1_RCD8 0x01
3216 #define _RCSTA1_RX9D1 0x01
3217 #define _RCSTA1_OERR 0x02
3218 #define _RCSTA1_OERR1 0x02
3219 #define _RCSTA1_FERR 0x04
3220 #define _RCSTA1_FERR1 0x04
3221 #define _RCSTA1_ADDEN 0x08
3222 #define _RCSTA1_ADDEN1 0x08
3223 #define _RCSTA1_CREN 0x10
3224 #define _RCSTA1_CREN1 0x10
3225 #define _RCSTA1_SREN 0x20
3226 #define _RCSTA1_SREN1 0x20
3227 #define _RCSTA1_RX9 0x40
3228 #define _RCSTA1_RC9 0x40
3229 #define _RCSTA1_NOT_RC8 0x40
3230 #define _RCSTA1_RC8_9 0x40
3231 #define _RCSTA1_RX91 0x40
3232 #define _RCSTA1_SPEN 0x80
3233 #define _RCSTA1_SPEN1 0x80
3235 //==============================================================================
3238 //==============================================================================
3239 // TXSTA Bits
3241 extern __at(0x0FAC) __sfr TXSTA;
3243 typedef union
3245 struct
3247 unsigned TX9D : 1;
3248 unsigned TRMT : 1;
3249 unsigned BRGH : 1;
3250 unsigned SENDB : 1;
3251 unsigned SYNC : 1;
3252 unsigned TXEN : 1;
3253 unsigned TX9 : 1;
3254 unsigned CSRC : 1;
3257 struct
3259 unsigned TXD8 : 1;
3260 unsigned TRMT1 : 1;
3261 unsigned BRGH1 : 1;
3262 unsigned SENDB1 : 1;
3263 unsigned SYNC1 : 1;
3264 unsigned TXEN1 : 1;
3265 unsigned TX8_9 : 1;
3266 unsigned CSRC1 : 1;
3269 struct
3271 unsigned TX9D1 : 1;
3272 unsigned : 1;
3273 unsigned : 1;
3274 unsigned : 1;
3275 unsigned : 1;
3276 unsigned : 1;
3277 unsigned NOT_TX8 : 1;
3278 unsigned : 1;
3281 struct
3283 unsigned : 1;
3284 unsigned : 1;
3285 unsigned : 1;
3286 unsigned : 1;
3287 unsigned : 1;
3288 unsigned : 1;
3289 unsigned TX91 : 1;
3290 unsigned : 1;
3292 } __TXSTAbits_t;
3294 extern __at(0x0FAC) volatile __TXSTAbits_t TXSTAbits;
3296 #define _TX9D 0x01
3297 #define _TXD8 0x01
3298 #define _TX9D1 0x01
3299 #define _TRMT 0x02
3300 #define _TRMT1 0x02
3301 #define _BRGH 0x04
3302 #define _BRGH1 0x04
3303 #define _SENDB 0x08
3304 #define _SENDB1 0x08
3305 #define _SYNC 0x10
3306 #define _SYNC1 0x10
3307 #define _TXEN 0x20
3308 #define _TXEN1 0x20
3309 #define _TX9 0x40
3310 #define _TX8_9 0x40
3311 #define _NOT_TX8 0x40
3312 #define _TX91 0x40
3313 #define _CSRC 0x80
3314 #define _CSRC1 0x80
3316 //==============================================================================
3319 //==============================================================================
3320 // TXSTA1 Bits
3322 extern __at(0x0FAC) __sfr TXSTA1;
3324 typedef union
3326 struct
3328 unsigned TX9D : 1;
3329 unsigned TRMT : 1;
3330 unsigned BRGH : 1;
3331 unsigned SENDB : 1;
3332 unsigned SYNC : 1;
3333 unsigned TXEN : 1;
3334 unsigned TX9 : 1;
3335 unsigned CSRC : 1;
3338 struct
3340 unsigned TXD8 : 1;
3341 unsigned TRMT1 : 1;
3342 unsigned BRGH1 : 1;
3343 unsigned SENDB1 : 1;
3344 unsigned SYNC1 : 1;
3345 unsigned TXEN1 : 1;
3346 unsigned TX8_9 : 1;
3347 unsigned CSRC1 : 1;
3350 struct
3352 unsigned TX9D1 : 1;
3353 unsigned : 1;
3354 unsigned : 1;
3355 unsigned : 1;
3356 unsigned : 1;
3357 unsigned : 1;
3358 unsigned NOT_TX8 : 1;
3359 unsigned : 1;
3362 struct
3364 unsigned : 1;
3365 unsigned : 1;
3366 unsigned : 1;
3367 unsigned : 1;
3368 unsigned : 1;
3369 unsigned : 1;
3370 unsigned TX91 : 1;
3371 unsigned : 1;
3373 } __TXSTA1bits_t;
3375 extern __at(0x0FAC) volatile __TXSTA1bits_t TXSTA1bits;
3377 #define _TXSTA1_TX9D 0x01
3378 #define _TXSTA1_TXD8 0x01
3379 #define _TXSTA1_TX9D1 0x01
3380 #define _TXSTA1_TRMT 0x02
3381 #define _TXSTA1_TRMT1 0x02
3382 #define _TXSTA1_BRGH 0x04
3383 #define _TXSTA1_BRGH1 0x04
3384 #define _TXSTA1_SENDB 0x08
3385 #define _TXSTA1_SENDB1 0x08
3386 #define _TXSTA1_SYNC 0x10
3387 #define _TXSTA1_SYNC1 0x10
3388 #define _TXSTA1_TXEN 0x20
3389 #define _TXSTA1_TXEN1 0x20
3390 #define _TXSTA1_TX9 0x40
3391 #define _TXSTA1_TX8_9 0x40
3392 #define _TXSTA1_NOT_TX8 0x40
3393 #define _TXSTA1_TX91 0x40
3394 #define _TXSTA1_CSRC 0x80
3395 #define _TXSTA1_CSRC1 0x80
3397 //==============================================================================
3399 extern __at(0x0FAD) __sfr TXREG;
3400 extern __at(0x0FAD) __sfr TXREG1;
3401 extern __at(0x0FAE) __sfr RCREG;
3402 extern __at(0x0FAE) __sfr RCREG1;
3403 extern __at(0x0FAF) __sfr SPBRG;
3404 extern __at(0x0FAF) __sfr SPBRG1;
3406 //==============================================================================
3407 // PSPCON Bits
3409 extern __at(0x0FB0) __sfr PSPCON;
3411 typedef struct
3413 unsigned : 1;
3414 unsigned : 1;
3415 unsigned : 1;
3416 unsigned : 1;
3417 unsigned PSPMODE : 1;
3418 unsigned IBOV : 1;
3419 unsigned OBF : 1;
3420 unsigned IBF : 1;
3421 } __PSPCONbits_t;
3423 extern __at(0x0FB0) volatile __PSPCONbits_t PSPCONbits;
3425 #define _PSPMODE 0x10
3426 #define _IBOV 0x20
3427 #define _OBF 0x40
3428 #define _IBF 0x80
3430 //==============================================================================
3433 //==============================================================================
3434 // T3CON Bits
3436 extern __at(0x0FB1) __sfr T3CON;
3438 typedef union
3440 struct
3442 unsigned TMR3ON : 1;
3443 unsigned TMR3CS : 1;
3444 unsigned NOT_T3SYNC : 1;
3445 unsigned T3CCP1 : 1;
3446 unsigned T3CKPS0 : 1;
3447 unsigned T3CKPS1 : 1;
3448 unsigned T3CCP2 : 1;
3449 unsigned RD16 : 1;
3452 struct
3454 unsigned : 1;
3455 unsigned : 1;
3456 unsigned T3SYNC : 1;
3457 unsigned : 1;
3458 unsigned : 1;
3459 unsigned : 1;
3460 unsigned : 1;
3461 unsigned : 1;
3464 struct
3466 unsigned : 1;
3467 unsigned : 1;
3468 unsigned T3INSYNC : 1;
3469 unsigned : 1;
3470 unsigned : 1;
3471 unsigned : 1;
3472 unsigned : 1;
3473 unsigned : 1;
3476 struct
3478 unsigned : 4;
3479 unsigned T3CKPS : 2;
3480 unsigned : 2;
3482 } __T3CONbits_t;
3484 extern __at(0x0FB1) volatile __T3CONbits_t T3CONbits;
3486 #define _T3CON_TMR3ON 0x01
3487 #define _T3CON_TMR3CS 0x02
3488 #define _T3CON_NOT_T3SYNC 0x04
3489 #define _T3CON_T3SYNC 0x04
3490 #define _T3CON_T3INSYNC 0x04
3491 #define _T3CON_T3CCP1 0x08
3492 #define _T3CON_T3CKPS0 0x10
3493 #define _T3CON_T3CKPS1 0x20
3494 #define _T3CON_T3CCP2 0x40
3495 #define _T3CON_RD16 0x80
3497 //==============================================================================
3499 extern __at(0x0FB2) __sfr TMR3;
3500 extern __at(0x0FB2) __sfr TMR3L;
3501 extern __at(0x0FB3) __sfr TMR3H;
3503 //==============================================================================
3504 // CMCON Bits
3506 extern __at(0x0FB4) __sfr CMCON;
3508 typedef union
3510 struct
3512 unsigned CM0 : 1;
3513 unsigned CM1 : 1;
3514 unsigned CM2 : 1;
3515 unsigned CIS : 1;
3516 unsigned C1INV : 1;
3517 unsigned C2INV : 1;
3518 unsigned C1OUT : 1;
3519 unsigned C2OUT : 1;
3522 struct
3524 unsigned CM : 3;
3525 unsigned : 5;
3527 } __CMCONbits_t;
3529 extern __at(0x0FB4) volatile __CMCONbits_t CMCONbits;
3531 #define _CM0 0x01
3532 #define _CM1 0x02
3533 #define _CM2 0x04
3534 #define _CIS 0x08
3535 #define _C1INV 0x10
3536 #define _C2INV 0x20
3537 #define _C1OUT 0x40
3538 #define _C2OUT 0x80
3540 //==============================================================================
3543 //==============================================================================
3544 // CVRCON Bits
3546 extern __at(0x0FB5) __sfr CVRCON;
3548 typedef union
3550 struct
3552 unsigned CVR0 : 1;
3553 unsigned CVR1 : 1;
3554 unsigned CVR2 : 1;
3555 unsigned CVR3 : 1;
3556 unsigned CVRSS : 1;
3557 unsigned CVRR : 1;
3558 unsigned CVROE : 1;
3559 unsigned CVREN : 1;
3562 struct
3564 unsigned CVR : 4;
3565 unsigned : 4;
3567 } __CVRCONbits_t;
3569 extern __at(0x0FB5) volatile __CVRCONbits_t CVRCONbits;
3571 #define _CVR0 0x01
3572 #define _CVR1 0x02
3573 #define _CVR2 0x04
3574 #define _CVR3 0x08
3575 #define _CVRSS 0x10
3576 #define _CVRR 0x20
3577 #define _CVROE 0x40
3578 #define _CVREN 0x80
3580 //==============================================================================
3583 //==============================================================================
3584 // ECCP1AS Bits
3586 extern __at(0x0FB6) __sfr ECCP1AS;
3588 typedef union
3590 struct
3592 unsigned : 1;
3593 unsigned : 1;
3594 unsigned PSSAC0 : 1;
3595 unsigned PSSAC1 : 1;
3596 unsigned ECCPAS0 : 1;
3597 unsigned ECCPAS1 : 1;
3598 unsigned ECCPAS2 : 1;
3599 unsigned ECCPASE : 1;
3602 struct
3604 unsigned : 1;
3605 unsigned : 1;
3606 unsigned PSS1AC0 : 1;
3607 unsigned PSS1AC1 : 1;
3608 unsigned ECCP1AS0 : 1;
3609 unsigned ECCP1AS1 : 1;
3610 unsigned ECCP1AS2 : 1;
3611 unsigned ECCP1ASE : 1;
3614 struct
3616 unsigned : 2;
3617 unsigned PSSAC : 2;
3618 unsigned : 4;
3621 struct
3623 unsigned : 2;
3624 unsigned PSS1AC : 2;
3625 unsigned : 4;
3628 struct
3630 unsigned : 4;
3631 unsigned ECCP1AS : 3;
3632 unsigned : 1;
3635 struct
3637 unsigned : 4;
3638 unsigned ECCPAS : 3;
3639 unsigned : 1;
3641 } __ECCP1ASbits_t;
3643 extern __at(0x0FB6) volatile __ECCP1ASbits_t ECCP1ASbits;
3645 #define _PSSAC0 0x04
3646 #define _PSS1AC0 0x04
3647 #define _PSSAC1 0x08
3648 #define _PSS1AC1 0x08
3649 #define _ECCPAS0 0x10
3650 #define _ECCP1AS0 0x10
3651 #define _ECCPAS1 0x20
3652 #define _ECCP1AS1 0x20
3653 #define _ECCPAS2 0x40
3654 #define _ECCP1AS2 0x40
3655 #define _ECCPASE 0x80
3656 #define _ECCP1ASE 0x80
3658 //==============================================================================
3661 //==============================================================================
3662 // CCP3CON Bits
3664 extern __at(0x0FB7) __sfr CCP3CON;
3666 typedef union
3668 struct
3670 unsigned CCP3M0 : 1;
3671 unsigned CCP3M1 : 1;
3672 unsigned CCP3M2 : 1;
3673 unsigned CCP3M3 : 1;
3674 unsigned DC3B0 : 1;
3675 unsigned DC3B1 : 1;
3676 unsigned P3M0 : 1;
3677 unsigned P3M1 : 1;
3680 struct
3682 unsigned : 1;
3683 unsigned : 1;
3684 unsigned : 1;
3685 unsigned : 1;
3686 unsigned CCP3Y : 1;
3687 unsigned CCP3X : 1;
3688 unsigned : 1;
3689 unsigned : 1;
3692 struct
3694 unsigned CCP3M : 4;
3695 unsigned : 4;
3698 struct
3700 unsigned : 4;
3701 unsigned DC3B : 2;
3702 unsigned : 2;
3705 struct
3707 unsigned : 6;
3708 unsigned P3M : 2;
3710 } __CCP3CONbits_t;
3712 extern __at(0x0FB7) volatile __CCP3CONbits_t CCP3CONbits;
3714 #define _CCP3M0 0x01
3715 #define _CCP3M1 0x02
3716 #define _CCP3M2 0x04
3717 #define _CCP3M3 0x08
3718 #define _DC3B0 0x10
3719 #define _CCP3Y 0x10
3720 #define _DC3B1 0x20
3721 #define _CCP3X 0x20
3722 #define _P3M0 0x40
3723 #define _P3M1 0x80
3725 //==============================================================================
3728 //==============================================================================
3729 // ECCP3CON Bits
3731 extern __at(0x0FB7) __sfr ECCP3CON;
3733 typedef union
3735 struct
3737 unsigned CCP3M0 : 1;
3738 unsigned CCP3M1 : 1;
3739 unsigned CCP3M2 : 1;
3740 unsigned CCP3M3 : 1;
3741 unsigned DC3B0 : 1;
3742 unsigned DC3B1 : 1;
3743 unsigned P3M0 : 1;
3744 unsigned P3M1 : 1;
3747 struct
3749 unsigned : 1;
3750 unsigned : 1;
3751 unsigned : 1;
3752 unsigned : 1;
3753 unsigned CCP3Y : 1;
3754 unsigned CCP3X : 1;
3755 unsigned : 1;
3756 unsigned : 1;
3759 struct
3761 unsigned CCP3M : 4;
3762 unsigned : 4;
3765 struct
3767 unsigned : 4;
3768 unsigned DC3B : 2;
3769 unsigned : 2;
3772 struct
3774 unsigned : 6;
3775 unsigned P3M : 2;
3777 } __ECCP3CONbits_t;
3779 extern __at(0x0FB7) volatile __ECCP3CONbits_t ECCP3CONbits;
3781 #define _ECCP3CON_CCP3M0 0x01
3782 #define _ECCP3CON_CCP3M1 0x02
3783 #define _ECCP3CON_CCP3M2 0x04
3784 #define _ECCP3CON_CCP3M3 0x08
3785 #define _ECCP3CON_DC3B0 0x10
3786 #define _ECCP3CON_CCP3Y 0x10
3787 #define _ECCP3CON_DC3B1 0x20
3788 #define _ECCP3CON_CCP3X 0x20
3789 #define _ECCP3CON_P3M0 0x40
3790 #define _ECCP3CON_P3M1 0x80
3792 //==============================================================================
3794 extern __at(0x0FB8) __sfr CCPR3;
3795 extern __at(0x0FB8) __sfr CCPR3L;
3796 extern __at(0x0FB9) __sfr CCPR3H;
3798 //==============================================================================
3799 // CCP2CON Bits
3801 extern __at(0x0FBA) __sfr CCP2CON;
3803 typedef union
3805 struct
3807 unsigned CCP2M0 : 1;
3808 unsigned CCP2M1 : 1;
3809 unsigned CCP2M2 : 1;
3810 unsigned CCP2M3 : 1;
3811 unsigned DC2B0 : 1;
3812 unsigned DC2B1 : 1;
3813 unsigned P2M0 : 1;
3814 unsigned P2M1 : 1;
3817 struct
3819 unsigned : 1;
3820 unsigned : 1;
3821 unsigned : 1;
3822 unsigned : 1;
3823 unsigned CCP2Y : 1;
3824 unsigned CCP2X : 1;
3825 unsigned : 1;
3826 unsigned : 1;
3829 struct
3831 unsigned CCP2M : 4;
3832 unsigned : 4;
3835 struct
3837 unsigned : 4;
3838 unsigned DC2B : 2;
3839 unsigned : 2;
3842 struct
3844 unsigned : 6;
3845 unsigned P2M : 2;
3847 } __CCP2CONbits_t;
3849 extern __at(0x0FBA) volatile __CCP2CONbits_t CCP2CONbits;
3851 #define _CCP2M0 0x01
3852 #define _CCP2M1 0x02
3853 #define _CCP2M2 0x04
3854 #define _CCP2M3 0x08
3855 #define _DC2B0 0x10
3856 #define _CCP2Y 0x10
3857 #define _DC2B1 0x20
3858 #define _CCP2X 0x20
3859 #define _P2M0 0x40
3860 #define _P2M1 0x80
3862 //==============================================================================
3865 //==============================================================================
3866 // ECCP2CON Bits
3868 extern __at(0x0FBA) __sfr ECCP2CON;
3870 typedef union
3872 struct
3874 unsigned CCP2M0 : 1;
3875 unsigned CCP2M1 : 1;
3876 unsigned CCP2M2 : 1;
3877 unsigned CCP2M3 : 1;
3878 unsigned DC2B0 : 1;
3879 unsigned DC2B1 : 1;
3880 unsigned P2M0 : 1;
3881 unsigned P2M1 : 1;
3884 struct
3886 unsigned : 1;
3887 unsigned : 1;
3888 unsigned : 1;
3889 unsigned : 1;
3890 unsigned CCP2Y : 1;
3891 unsigned CCP2X : 1;
3892 unsigned : 1;
3893 unsigned : 1;
3896 struct
3898 unsigned CCP2M : 4;
3899 unsigned : 4;
3902 struct
3904 unsigned : 4;
3905 unsigned DC2B : 2;
3906 unsigned : 2;
3909 struct
3911 unsigned : 6;
3912 unsigned P2M : 2;
3914 } __ECCP2CONbits_t;
3916 extern __at(0x0FBA) volatile __ECCP2CONbits_t ECCP2CONbits;
3918 #define _ECCP2CON_CCP2M0 0x01
3919 #define _ECCP2CON_CCP2M1 0x02
3920 #define _ECCP2CON_CCP2M2 0x04
3921 #define _ECCP2CON_CCP2M3 0x08
3922 #define _ECCP2CON_DC2B0 0x10
3923 #define _ECCP2CON_CCP2Y 0x10
3924 #define _ECCP2CON_DC2B1 0x20
3925 #define _ECCP2CON_CCP2X 0x20
3926 #define _ECCP2CON_P2M0 0x40
3927 #define _ECCP2CON_P2M1 0x80
3929 //==============================================================================
3931 extern __at(0x0FBB) __sfr CCPR2;
3932 extern __at(0x0FBB) __sfr CCPR2L;
3933 extern __at(0x0FBC) __sfr CCPR2H;
3935 //==============================================================================
3936 // CCP1CON Bits
3938 extern __at(0x0FBD) __sfr CCP1CON;
3940 typedef union
3942 struct
3944 unsigned CCP1M0 : 1;
3945 unsigned CCP1M1 : 1;
3946 unsigned CCP1M2 : 1;
3947 unsigned CCP1M3 : 1;
3948 unsigned DC1B0 : 1;
3949 unsigned DC1B1 : 1;
3950 unsigned P1M0 : 1;
3951 unsigned P1M1 : 1;
3954 struct
3956 unsigned : 1;
3957 unsigned : 1;
3958 unsigned : 1;
3959 unsigned : 1;
3960 unsigned CCP1Y : 1;
3961 unsigned CCP1X : 1;
3962 unsigned : 1;
3963 unsigned : 1;
3966 struct
3968 unsigned CCP1M : 4;
3969 unsigned : 4;
3972 struct
3974 unsigned : 4;
3975 unsigned DC1B : 2;
3976 unsigned : 2;
3979 struct
3981 unsigned : 6;
3982 unsigned P1M : 2;
3984 } __CCP1CONbits_t;
3986 extern __at(0x0FBD) volatile __CCP1CONbits_t CCP1CONbits;
3988 #define _CCP1M0 0x01
3989 #define _CCP1M1 0x02
3990 #define _CCP1M2 0x04
3991 #define _CCP1M3 0x08
3992 #define _DC1B0 0x10
3993 #define _CCP1Y 0x10
3994 #define _DC1B1 0x20
3995 #define _CCP1X 0x20
3996 #define _P1M0 0x40
3997 #define _P1M1 0x80
3999 //==============================================================================
4002 //==============================================================================
4003 // ECCP1CON Bits
4005 extern __at(0x0FBD) __sfr ECCP1CON;
4007 typedef union
4009 struct
4011 unsigned CCP1M0 : 1;
4012 unsigned CCP1M1 : 1;
4013 unsigned CCP1M2 : 1;
4014 unsigned CCP1M3 : 1;
4015 unsigned DC1B0 : 1;
4016 unsigned DC1B1 : 1;
4017 unsigned P1M0 : 1;
4018 unsigned P1M1 : 1;
4021 struct
4023 unsigned : 1;
4024 unsigned : 1;
4025 unsigned : 1;
4026 unsigned : 1;
4027 unsigned CCP1Y : 1;
4028 unsigned CCP1X : 1;
4029 unsigned : 1;
4030 unsigned : 1;
4033 struct
4035 unsigned CCP1M : 4;
4036 unsigned : 4;
4039 struct
4041 unsigned : 4;
4042 unsigned DC1B : 2;
4043 unsigned : 2;
4046 struct
4048 unsigned : 6;
4049 unsigned P1M : 2;
4051 } __ECCP1CONbits_t;
4053 extern __at(0x0FBD) volatile __ECCP1CONbits_t ECCP1CONbits;
4055 #define _ECCP1CON_CCP1M0 0x01
4056 #define _ECCP1CON_CCP1M1 0x02
4057 #define _ECCP1CON_CCP1M2 0x04
4058 #define _ECCP1CON_CCP1M3 0x08
4059 #define _ECCP1CON_DC1B0 0x10
4060 #define _ECCP1CON_CCP1Y 0x10
4061 #define _ECCP1CON_DC1B1 0x20
4062 #define _ECCP1CON_CCP1X 0x20
4063 #define _ECCP1CON_P1M0 0x40
4064 #define _ECCP1CON_P1M1 0x80
4066 //==============================================================================
4068 extern __at(0x0FBE) __sfr CCPR1;
4069 extern __at(0x0FBE) __sfr CCPR1L;
4070 extern __at(0x0FBF) __sfr CCPR1H;
4072 //==============================================================================
4073 // ADCON2 Bits
4075 extern __at(0x0FC0) __sfr ADCON2;
4077 typedef union
4079 struct
4081 unsigned ADCS0 : 1;
4082 unsigned ADCS1 : 1;
4083 unsigned ADCS2 : 1;
4084 unsigned ACQT0 : 1;
4085 unsigned ACQT1 : 1;
4086 unsigned ACQT2 : 1;
4087 unsigned : 1;
4088 unsigned ADFM : 1;
4091 struct
4093 unsigned ADCS : 3;
4094 unsigned : 5;
4097 struct
4099 unsigned : 3;
4100 unsigned ACQT : 3;
4101 unsigned : 2;
4103 } __ADCON2bits_t;
4105 extern __at(0x0FC0) volatile __ADCON2bits_t ADCON2bits;
4107 #define _ADCS0 0x01
4108 #define _ADCS1 0x02
4109 #define _ADCS2 0x04
4110 #define _ACQT0 0x08
4111 #define _ACQT1 0x10
4112 #define _ACQT2 0x20
4113 #define _ADFM 0x80
4115 //==============================================================================
4118 //==============================================================================
4119 // ADCON1 Bits
4121 extern __at(0x0FC1) __sfr ADCON1;
4123 typedef union
4125 struct
4127 unsigned PCFG0 : 1;
4128 unsigned PCFG1 : 1;
4129 unsigned PCFG2 : 1;
4130 unsigned PCFG3 : 1;
4131 unsigned VCFG0 : 1;
4132 unsigned VCFG1 : 1;
4133 unsigned : 1;
4134 unsigned : 1;
4137 struct
4139 unsigned PCFG : 4;
4140 unsigned : 4;
4143 struct
4145 unsigned : 4;
4146 unsigned VCFG : 2;
4147 unsigned : 2;
4149 } __ADCON1bits_t;
4151 extern __at(0x0FC1) volatile __ADCON1bits_t ADCON1bits;
4153 #define _PCFG0 0x01
4154 #define _PCFG1 0x02
4155 #define _PCFG2 0x04
4156 #define _PCFG3 0x08
4157 #define _VCFG0 0x10
4158 #define _VCFG1 0x20
4160 //==============================================================================
4163 //==============================================================================
4164 // ADCON0 Bits
4166 extern __at(0x0FC2) __sfr ADCON0;
4168 typedef union
4170 struct
4172 unsigned ADON : 1;
4173 unsigned GO_NOT_DONE : 1;
4174 unsigned CHS0 : 1;
4175 unsigned CHS1 : 1;
4176 unsigned CHS2 : 1;
4177 unsigned CHS3 : 1;
4178 unsigned : 1;
4179 unsigned ADCAL : 1;
4182 struct
4184 unsigned : 1;
4185 unsigned DONE : 1;
4186 unsigned : 1;
4187 unsigned : 1;
4188 unsigned : 1;
4189 unsigned : 1;
4190 unsigned : 1;
4191 unsigned : 1;
4194 struct
4196 unsigned : 1;
4197 unsigned GO_DONE : 1;
4198 unsigned : 1;
4199 unsigned : 1;
4200 unsigned : 1;
4201 unsigned : 1;
4202 unsigned : 1;
4203 unsigned : 1;
4206 struct
4208 unsigned : 1;
4209 unsigned GO : 1;
4210 unsigned : 1;
4211 unsigned : 1;
4212 unsigned : 1;
4213 unsigned : 1;
4214 unsigned : 1;
4215 unsigned : 1;
4218 struct
4220 unsigned : 1;
4221 unsigned NOT_DONE : 1;
4222 unsigned : 1;
4223 unsigned : 1;
4224 unsigned : 1;
4225 unsigned : 1;
4226 unsigned : 1;
4227 unsigned : 1;
4230 struct
4232 unsigned : 2;
4233 unsigned CHS : 4;
4234 unsigned : 2;
4236 } __ADCON0bits_t;
4238 extern __at(0x0FC2) volatile __ADCON0bits_t ADCON0bits;
4240 #define _ADON 0x01
4241 #define _GO_NOT_DONE 0x02
4242 #define _DONE 0x02
4243 #define _GO_DONE 0x02
4244 #define _GO 0x02
4245 #define _NOT_DONE 0x02
4246 #define _CHS0 0x04
4247 #define _CHS1 0x08
4248 #define _CHS2 0x10
4249 #define _CHS3 0x20
4250 #define _ADCAL 0x80
4252 //==============================================================================
4254 extern __at(0x0FC3) __sfr ADRES;
4255 extern __at(0x0FC3) __sfr ADRESL;
4256 extern __at(0x0FC4) __sfr ADRESH;
4258 //==============================================================================
4259 // SSP1CON2 Bits
4261 extern __at(0x0FC5) __sfr SSP1CON2;
4263 typedef union
4265 struct
4267 unsigned SEN : 1;
4268 unsigned RSEN : 1;
4269 unsigned PEN : 1;
4270 unsigned RCEN : 1;
4271 unsigned ACKEN : 1;
4272 unsigned ACKDT : 1;
4273 unsigned ACKSTAT : 1;
4274 unsigned GCEN : 1;
4277 struct
4279 unsigned : 1;
4280 unsigned ADMSK1 : 1;
4281 unsigned ADMSK2 : 1;
4282 unsigned ADMSK3 : 1;
4283 unsigned ADMSK4 : 1;
4284 unsigned ADMSK5 : 1;
4285 unsigned : 1;
4286 unsigned : 1;
4288 } __SSP1CON2bits_t;
4290 extern __at(0x0FC5) volatile __SSP1CON2bits_t SSP1CON2bits;
4292 #define _SEN 0x01
4293 #define _RSEN 0x02
4294 #define _ADMSK1 0x02
4295 #define _PEN 0x04
4296 #define _ADMSK2 0x04
4297 #define _RCEN 0x08
4298 #define _ADMSK3 0x08
4299 #define _ACKEN 0x10
4300 #define _ADMSK4 0x10
4301 #define _ACKDT 0x20
4302 #define _ADMSK5 0x20
4303 #define _ACKSTAT 0x40
4304 #define _GCEN 0x80
4306 //==============================================================================
4309 //==============================================================================
4310 // SSPCON2 Bits
4312 extern __at(0x0FC5) __sfr SSPCON2;
4314 typedef union
4316 struct
4318 unsigned SEN : 1;
4319 unsigned RSEN : 1;
4320 unsigned PEN : 1;
4321 unsigned RCEN : 1;
4322 unsigned ACKEN : 1;
4323 unsigned ACKDT : 1;
4324 unsigned ACKSTAT : 1;
4325 unsigned GCEN : 1;
4328 struct
4330 unsigned : 1;
4331 unsigned ADMSK1 : 1;
4332 unsigned ADMSK2 : 1;
4333 unsigned ADMSK3 : 1;
4334 unsigned ADMSK4 : 1;
4335 unsigned ADMSK5 : 1;
4336 unsigned : 1;
4337 unsigned : 1;
4339 } __SSPCON2bits_t;
4341 extern __at(0x0FC5) volatile __SSPCON2bits_t SSPCON2bits;
4343 #define _SSPCON2_SEN 0x01
4344 #define _SSPCON2_RSEN 0x02
4345 #define _SSPCON2_ADMSK1 0x02
4346 #define _SSPCON2_PEN 0x04
4347 #define _SSPCON2_ADMSK2 0x04
4348 #define _SSPCON2_RCEN 0x08
4349 #define _SSPCON2_ADMSK3 0x08
4350 #define _SSPCON2_ACKEN 0x10
4351 #define _SSPCON2_ADMSK4 0x10
4352 #define _SSPCON2_ACKDT 0x20
4353 #define _SSPCON2_ADMSK5 0x20
4354 #define _SSPCON2_ACKSTAT 0x40
4355 #define _SSPCON2_GCEN 0x80
4357 //==============================================================================
4360 //==============================================================================
4361 // SSP1CON1 Bits
4363 extern __at(0x0FC6) __sfr SSP1CON1;
4365 typedef union
4367 struct
4369 unsigned SSPM0 : 1;
4370 unsigned SSPM1 : 1;
4371 unsigned SSPM2 : 1;
4372 unsigned SSPM3 : 1;
4373 unsigned CKP : 1;
4374 unsigned SSPEN : 1;
4375 unsigned SSPOV : 1;
4376 unsigned WCOL : 1;
4379 struct
4381 unsigned SSPM : 4;
4382 unsigned : 4;
4384 } __SSP1CON1bits_t;
4386 extern __at(0x0FC6) volatile __SSP1CON1bits_t SSP1CON1bits;
4388 #define _SSPM0 0x01
4389 #define _SSPM1 0x02
4390 #define _SSPM2 0x04
4391 #define _SSPM3 0x08
4392 #define _CKP 0x10
4393 #define _SSPEN 0x20
4394 #define _SSPOV 0x40
4395 #define _WCOL 0x80
4397 //==============================================================================
4400 //==============================================================================
4401 // SSPCON1 Bits
4403 extern __at(0x0FC6) __sfr SSPCON1;
4405 typedef union
4407 struct
4409 unsigned SSPM0 : 1;
4410 unsigned SSPM1 : 1;
4411 unsigned SSPM2 : 1;
4412 unsigned SSPM3 : 1;
4413 unsigned CKP : 1;
4414 unsigned SSPEN : 1;
4415 unsigned SSPOV : 1;
4416 unsigned WCOL : 1;
4419 struct
4421 unsigned SSPM : 4;
4422 unsigned : 4;
4424 } __SSPCON1bits_t;
4426 extern __at(0x0FC6) volatile __SSPCON1bits_t SSPCON1bits;
4428 #define _SSPCON1_SSPM0 0x01
4429 #define _SSPCON1_SSPM1 0x02
4430 #define _SSPCON1_SSPM2 0x04
4431 #define _SSPCON1_SSPM3 0x08
4432 #define _SSPCON1_CKP 0x10
4433 #define _SSPCON1_SSPEN 0x20
4434 #define _SSPCON1_SSPOV 0x40
4435 #define _SSPCON1_WCOL 0x80
4437 //==============================================================================
4440 //==============================================================================
4441 // SSP1STAT Bits
4443 extern __at(0x0FC7) __sfr SSP1STAT;
4445 typedef union
4447 struct
4449 unsigned BF : 1;
4450 unsigned UA : 1;
4451 unsigned R_NOT_W : 1;
4452 unsigned S : 1;
4453 unsigned P : 1;
4454 unsigned D_NOT_A : 1;
4455 unsigned CKE : 1;
4456 unsigned SMP : 1;
4459 struct
4461 unsigned : 1;
4462 unsigned : 1;
4463 unsigned R_W : 1;
4464 unsigned I2C_START : 1;
4465 unsigned I2C_STOP : 1;
4466 unsigned D_A : 1;
4467 unsigned : 1;
4468 unsigned : 1;
4471 struct
4473 unsigned : 1;
4474 unsigned : 1;
4475 unsigned I2C_READ : 1;
4476 unsigned : 1;
4477 unsigned : 1;
4478 unsigned I2C_DAT : 1;
4479 unsigned : 1;
4480 unsigned : 1;
4483 struct
4485 unsigned : 1;
4486 unsigned : 1;
4487 unsigned NOT_W : 1;
4488 unsigned : 1;
4489 unsigned : 1;
4490 unsigned NOT_A : 1;
4491 unsigned : 1;
4492 unsigned : 1;
4495 struct
4497 unsigned : 1;
4498 unsigned : 1;
4499 unsigned NOT_WRITE : 1;
4500 unsigned : 1;
4501 unsigned : 1;
4502 unsigned NOT_ADDRESS : 1;
4503 unsigned : 1;
4504 unsigned : 1;
4507 struct
4509 unsigned : 1;
4510 unsigned : 1;
4511 unsigned READ_WRITE : 1;
4512 unsigned : 1;
4513 unsigned : 1;
4514 unsigned DATA_ADDRESS : 1;
4515 unsigned : 1;
4516 unsigned : 1;
4519 struct
4521 unsigned : 1;
4522 unsigned : 1;
4523 unsigned R : 1;
4524 unsigned : 1;
4525 unsigned : 1;
4526 unsigned D : 1;
4527 unsigned : 1;
4528 unsigned : 1;
4530 } __SSP1STATbits_t;
4532 extern __at(0x0FC7) volatile __SSP1STATbits_t SSP1STATbits;
4534 #define _BF 0x01
4535 #define _UA 0x02
4536 #define _R_NOT_W 0x04
4537 #define _R_W 0x04
4538 #define _I2C_READ 0x04
4539 #define _NOT_W 0x04
4540 #define _NOT_WRITE 0x04
4541 #define _READ_WRITE 0x04
4542 #define _R 0x04
4543 #define _S 0x08
4544 #define _I2C_START 0x08
4545 #define _P 0x10
4546 #define _I2C_STOP 0x10
4547 #define _D_NOT_A 0x20
4548 #define _D_A 0x20
4549 #define _I2C_DAT 0x20
4550 #define _NOT_A 0x20
4551 #define _NOT_ADDRESS 0x20
4552 #define _DATA_ADDRESS 0x20
4553 #define _D 0x20
4554 #define _CKE 0x40
4555 #define _SMP 0x80
4557 //==============================================================================
4560 //==============================================================================
4561 // SSPSTAT Bits
4563 extern __at(0x0FC7) __sfr SSPSTAT;
4565 typedef union
4567 struct
4569 unsigned BF : 1;
4570 unsigned UA : 1;
4571 unsigned R_NOT_W : 1;
4572 unsigned S : 1;
4573 unsigned P : 1;
4574 unsigned D_NOT_A : 1;
4575 unsigned CKE : 1;
4576 unsigned SMP : 1;
4579 struct
4581 unsigned : 1;
4582 unsigned : 1;
4583 unsigned R_W : 1;
4584 unsigned I2C_START : 1;
4585 unsigned I2C_STOP : 1;
4586 unsigned D_A : 1;
4587 unsigned : 1;
4588 unsigned : 1;
4591 struct
4593 unsigned : 1;
4594 unsigned : 1;
4595 unsigned I2C_READ : 1;
4596 unsigned : 1;
4597 unsigned : 1;
4598 unsigned I2C_DAT : 1;
4599 unsigned : 1;
4600 unsigned : 1;
4603 struct
4605 unsigned : 1;
4606 unsigned : 1;
4607 unsigned NOT_W : 1;
4608 unsigned : 1;
4609 unsigned : 1;
4610 unsigned NOT_A : 1;
4611 unsigned : 1;
4612 unsigned : 1;
4615 struct
4617 unsigned : 1;
4618 unsigned : 1;
4619 unsigned NOT_WRITE : 1;
4620 unsigned : 1;
4621 unsigned : 1;
4622 unsigned NOT_ADDRESS : 1;
4623 unsigned : 1;
4624 unsigned : 1;
4627 struct
4629 unsigned : 1;
4630 unsigned : 1;
4631 unsigned READ_WRITE : 1;
4632 unsigned : 1;
4633 unsigned : 1;
4634 unsigned DATA_ADDRESS : 1;
4635 unsigned : 1;
4636 unsigned : 1;
4639 struct
4641 unsigned : 1;
4642 unsigned : 1;
4643 unsigned R : 1;
4644 unsigned : 1;
4645 unsigned : 1;
4646 unsigned D : 1;
4647 unsigned : 1;
4648 unsigned : 1;
4650 } __SSPSTATbits_t;
4652 extern __at(0x0FC7) volatile __SSPSTATbits_t SSPSTATbits;
4654 #define _SSPSTAT_BF 0x01
4655 #define _SSPSTAT_UA 0x02
4656 #define _SSPSTAT_R_NOT_W 0x04
4657 #define _SSPSTAT_R_W 0x04
4658 #define _SSPSTAT_I2C_READ 0x04
4659 #define _SSPSTAT_NOT_W 0x04
4660 #define _SSPSTAT_NOT_WRITE 0x04
4661 #define _SSPSTAT_READ_WRITE 0x04
4662 #define _SSPSTAT_R 0x04
4663 #define _SSPSTAT_S 0x08
4664 #define _SSPSTAT_I2C_START 0x08
4665 #define _SSPSTAT_P 0x10
4666 #define _SSPSTAT_I2C_STOP 0x10
4667 #define _SSPSTAT_D_NOT_A 0x20
4668 #define _SSPSTAT_D_A 0x20
4669 #define _SSPSTAT_I2C_DAT 0x20
4670 #define _SSPSTAT_NOT_A 0x20
4671 #define _SSPSTAT_NOT_ADDRESS 0x20
4672 #define _SSPSTAT_DATA_ADDRESS 0x20
4673 #define _SSPSTAT_D 0x20
4674 #define _SSPSTAT_CKE 0x40
4675 #define _SSPSTAT_SMP 0x80
4677 //==============================================================================
4679 extern __at(0x0FC8) __sfr SSP1ADD;
4680 extern __at(0x0FC8) __sfr SSPADD;
4681 extern __at(0x0FC9) __sfr SSP1BUF;
4682 extern __at(0x0FC9) __sfr SSPBUF;
4684 //==============================================================================
4685 // T2CON Bits
4687 extern __at(0x0FCA) __sfr T2CON;
4689 typedef union
4691 struct
4693 unsigned T2CKPS0 : 1;
4694 unsigned T2CKPS1 : 1;
4695 unsigned TMR2ON : 1;
4696 unsigned T2OUTPS0 : 1;
4697 unsigned T2OUTPS1 : 1;
4698 unsigned T2OUTPS2 : 1;
4699 unsigned T2OUTPS3 : 1;
4700 unsigned : 1;
4703 struct
4705 unsigned T2CKPS : 2;
4706 unsigned : 6;
4709 struct
4711 unsigned : 3;
4712 unsigned T2OUTPS : 4;
4713 unsigned : 1;
4715 } __T2CONbits_t;
4717 extern __at(0x0FCA) volatile __T2CONbits_t T2CONbits;
4719 #define _T2CKPS0 0x01
4720 #define _T2CKPS1 0x02
4721 #define _TMR2ON 0x04
4722 #define _T2OUTPS0 0x08
4723 #define _T2OUTPS1 0x10
4724 #define _T2OUTPS2 0x20
4725 #define _T2OUTPS3 0x40
4727 //==============================================================================
4729 extern __at(0x0FCB) __sfr PR2;
4730 extern __at(0x0FCC) __sfr TMR2;
4732 //==============================================================================
4733 // T1CON Bits
4735 extern __at(0x0FCD) __sfr T1CON;
4737 typedef union
4739 struct
4741 unsigned TMR1ON : 1;
4742 unsigned TMR1CS : 1;
4743 unsigned NOT_T1SYNC : 1;
4744 unsigned T1OSCEN : 1;
4745 unsigned T1CKPS0 : 1;
4746 unsigned T1CKPS1 : 1;
4747 unsigned T1RUN : 1;
4748 unsigned RD16 : 1;
4751 struct
4753 unsigned : 1;
4754 unsigned : 1;
4755 unsigned T1SYNC : 1;
4756 unsigned : 1;
4757 unsigned : 1;
4758 unsigned : 1;
4759 unsigned : 1;
4760 unsigned : 1;
4763 struct
4765 unsigned : 1;
4766 unsigned : 1;
4767 unsigned T1INSYNC : 1;
4768 unsigned : 1;
4769 unsigned : 1;
4770 unsigned : 1;
4771 unsigned : 1;
4772 unsigned : 1;
4775 struct
4777 unsigned : 4;
4778 unsigned T1CKPS : 2;
4779 unsigned : 2;
4781 } __T1CONbits_t;
4783 extern __at(0x0FCD) volatile __T1CONbits_t T1CONbits;
4785 #define _TMR1ON 0x01
4786 #define _TMR1CS 0x02
4787 #define _NOT_T1SYNC 0x04
4788 #define _T1SYNC 0x04
4789 #define _T1INSYNC 0x04
4790 #define _T1OSCEN 0x08
4791 #define _T1CKPS0 0x10
4792 #define _T1CKPS1 0x20
4793 #define _T1RUN 0x40
4794 #define _RD16 0x80
4796 //==============================================================================
4798 extern __at(0x0FCE) __sfr TMR1;
4799 extern __at(0x0FCE) __sfr TMR1L;
4800 extern __at(0x0FCF) __sfr TMR1H;
4802 //==============================================================================
4803 // RCON Bits
4805 extern __at(0x0FD0) __sfr RCON;
4807 typedef union
4809 struct
4811 unsigned NOT_BOR : 1;
4812 unsigned NOT_POR : 1;
4813 unsigned NOT_PD : 1;
4814 unsigned NOT_TO : 1;
4815 unsigned NOT_RI : 1;
4816 unsigned : 1;
4817 unsigned : 1;
4818 unsigned IPEN : 1;
4821 struct
4823 unsigned BOR : 1;
4824 unsigned POR : 1;
4825 unsigned PD : 1;
4826 unsigned TO : 1;
4827 unsigned RI : 1;
4828 unsigned : 1;
4829 unsigned : 1;
4830 unsigned : 1;
4832 } __RCONbits_t;
4834 extern __at(0x0FD0) volatile __RCONbits_t RCONbits;
4836 #define _NOT_BOR 0x01
4837 #define _BOR 0x01
4838 #define _NOT_POR 0x02
4839 #define _POR 0x02
4840 #define _NOT_PD 0x04
4841 #define _PD 0x04
4842 #define _NOT_TO 0x08
4843 #define _TO 0x08
4844 #define _NOT_RI 0x10
4845 #define _RI 0x10
4846 #define _IPEN 0x80
4848 //==============================================================================
4851 //==============================================================================
4852 // WDTCON Bits
4854 extern __at(0x0FD1) __sfr WDTCON;
4856 typedef union
4858 struct
4860 unsigned SWDTEN : 1;
4861 unsigned : 1;
4862 unsigned : 1;
4863 unsigned : 1;
4864 unsigned : 1;
4865 unsigned : 1;
4866 unsigned : 1;
4867 unsigned : 1;
4870 struct
4872 unsigned SWDTE : 1;
4873 unsigned : 1;
4874 unsigned : 1;
4875 unsigned : 1;
4876 unsigned : 1;
4877 unsigned : 1;
4878 unsigned : 1;
4879 unsigned : 1;
4881 } __WDTCONbits_t;
4883 extern __at(0x0FD1) volatile __WDTCONbits_t WDTCONbits;
4885 #define _SWDTEN 0x01
4886 #define _SWDTE 0x01
4888 //==============================================================================
4891 //==============================================================================
4892 // OSCCON Bits
4894 extern __at(0x0FD3) __sfr OSCCON;
4896 typedef union
4898 struct
4900 unsigned SCS0 : 1;
4901 unsigned SCS1 : 1;
4902 unsigned : 1;
4903 unsigned OSTS : 1;
4904 unsigned : 1;
4905 unsigned : 1;
4906 unsigned : 1;
4907 unsigned IDLEN : 1;
4910 struct
4912 unsigned SCS : 2;
4913 unsigned : 6;
4915 } __OSCCONbits_t;
4917 extern __at(0x0FD3) volatile __OSCCONbits_t OSCCONbits;
4919 #define _SCS0 0x01
4920 #define _SCS1 0x02
4921 #define _OSTS 0x08
4922 #define _IDLEN 0x80
4924 //==============================================================================
4927 //==============================================================================
4928 // T0CON Bits
4930 extern __at(0x0FD5) __sfr T0CON;
4932 typedef union
4934 struct
4936 unsigned T0PS0 : 1;
4937 unsigned T0PS1 : 1;
4938 unsigned T0PS2 : 1;
4939 unsigned PSA : 1;
4940 unsigned T0SE : 1;
4941 unsigned T0CS : 1;
4942 unsigned T08BIT : 1;
4943 unsigned TMR0ON : 1;
4946 struct
4948 unsigned : 1;
4949 unsigned : 1;
4950 unsigned : 1;
4951 unsigned T0PS3 : 1;
4952 unsigned : 1;
4953 unsigned : 1;
4954 unsigned : 1;
4955 unsigned : 1;
4958 struct
4960 unsigned T0PS : 4;
4961 unsigned : 4;
4963 } __T0CONbits_t;
4965 extern __at(0x0FD5) volatile __T0CONbits_t T0CONbits;
4967 #define _T0PS0 0x01
4968 #define _T0PS1 0x02
4969 #define _T0PS2 0x04
4970 #define _PSA 0x08
4971 #define _T0PS3 0x08
4972 #define _T0SE 0x10
4973 #define _T0CS 0x20
4974 #define _T08BIT 0x40
4975 #define _TMR0ON 0x80
4977 //==============================================================================
4979 extern __at(0x0FD6) __sfr TMR0;
4980 extern __at(0x0FD6) __sfr TMR0L;
4981 extern __at(0x0FD7) __sfr TMR0H;
4983 //==============================================================================
4984 // STATUS Bits
4986 extern __at(0x0FD8) __sfr STATUS;
4988 typedef struct
4990 unsigned C : 1;
4991 unsigned DC : 1;
4992 unsigned Z : 1;
4993 unsigned OV : 1;
4994 unsigned N : 1;
4995 unsigned : 1;
4996 unsigned : 1;
4997 unsigned : 1;
4998 } __STATUSbits_t;
5000 extern __at(0x0FD8) volatile __STATUSbits_t STATUSbits;
5002 #define _C 0x01
5003 #define _DC 0x02
5004 #define _Z 0x04
5005 #define _OV 0x08
5006 #define _N 0x10
5008 //==============================================================================
5010 extern __at(0x0FD9) __sfr FSR2L;
5011 extern __at(0x0FDA) __sfr FSR2H;
5012 extern __at(0x0FDB) __sfr PLUSW2;
5013 extern __at(0x0FDC) __sfr PREINC2;
5014 extern __at(0x0FDD) __sfr POSTDEC2;
5015 extern __at(0x0FDE) __sfr POSTINC2;
5016 extern __at(0x0FDF) __sfr INDF2;
5017 extern __at(0x0FE0) __sfr BSR;
5018 extern __at(0x0FE1) __sfr FSR1L;
5019 extern __at(0x0FE2) __sfr FSR1H;
5020 extern __at(0x0FE3) __sfr PLUSW1;
5021 extern __at(0x0FE4) __sfr PREINC1;
5022 extern __at(0x0FE5) __sfr POSTDEC1;
5023 extern __at(0x0FE6) __sfr POSTINC1;
5024 extern __at(0x0FE7) __sfr INDF1;
5025 extern __at(0x0FE8) __sfr WREG;
5026 extern __at(0x0FE9) __sfr FSR0L;
5027 extern __at(0x0FEA) __sfr FSR0H;
5028 extern __at(0x0FEB) __sfr PLUSW0;
5029 extern __at(0x0FEC) __sfr PREINC0;
5030 extern __at(0x0FED) __sfr POSTDEC0;
5031 extern __at(0x0FEE) __sfr POSTINC0;
5032 extern __at(0x0FEF) __sfr INDF0;
5034 //==============================================================================
5035 // INTCON3 Bits
5037 extern __at(0x0FF0) __sfr INTCON3;
5039 typedef union
5041 struct
5043 unsigned INT1IF : 1;
5044 unsigned INT2IF : 1;
5045 unsigned INT3IF : 1;
5046 unsigned INT1IE : 1;
5047 unsigned INT2IE : 1;
5048 unsigned INT3IE : 1;
5049 unsigned INT1IP : 1;
5050 unsigned INT2IP : 1;
5053 struct
5055 unsigned INT1F : 1;
5056 unsigned INT2F : 1;
5057 unsigned INT3F : 1;
5058 unsigned INT1E : 1;
5059 unsigned INT2E : 1;
5060 unsigned INT3E : 1;
5061 unsigned INT1P : 1;
5062 unsigned INT2P : 1;
5064 } __INTCON3bits_t;
5066 extern __at(0x0FF0) volatile __INTCON3bits_t INTCON3bits;
5068 #define _INT1IF 0x01
5069 #define _INT1F 0x01
5070 #define _INT2IF 0x02
5071 #define _INT2F 0x02
5072 #define _INT3IF 0x04
5073 #define _INT3F 0x04
5074 #define _INT1IE 0x08
5075 #define _INT1E 0x08
5076 #define _INT2IE 0x10
5077 #define _INT2E 0x10
5078 #define _INT3IE 0x20
5079 #define _INT3E 0x20
5080 #define _INT1IP 0x40
5081 #define _INT1P 0x40
5082 #define _INT2IP 0x80
5083 #define _INT2P 0x80
5085 //==============================================================================
5088 //==============================================================================
5089 // INTCON2 Bits
5091 extern __at(0x0FF1) __sfr INTCON2;
5093 typedef union
5095 struct
5097 unsigned RBIP : 1;
5098 unsigned INT3IP : 1;
5099 unsigned TMR0IP : 1;
5100 unsigned INTEDG3 : 1;
5101 unsigned INTEDG2 : 1;
5102 unsigned INTEDG1 : 1;
5103 unsigned INTEDG0 : 1;
5104 unsigned NOT_RBPU : 1;
5107 struct
5109 unsigned : 1;
5110 unsigned INT3P : 1;
5111 unsigned T0IP : 1;
5112 unsigned : 1;
5113 unsigned : 1;
5114 unsigned : 1;
5115 unsigned : 1;
5116 unsigned RBPU : 1;
5118 } __INTCON2bits_t;
5120 extern __at(0x0FF1) volatile __INTCON2bits_t INTCON2bits;
5122 #define _RBIP 0x01
5123 #define _INT3IP 0x02
5124 #define _INT3P 0x02
5125 #define _TMR0IP 0x04
5126 #define _T0IP 0x04
5127 #define _INTEDG3 0x08
5128 #define _INTEDG2 0x10
5129 #define _INTEDG1 0x20
5130 #define _INTEDG0 0x40
5131 #define _NOT_RBPU 0x80
5132 #define _RBPU 0x80
5134 //==============================================================================
5137 //==============================================================================
5138 // INTCON Bits
5140 extern __at(0x0FF2) __sfr INTCON;
5142 typedef union
5144 struct
5146 unsigned RBIF : 1;
5147 unsigned INT0IF : 1;
5148 unsigned TMR0IF : 1;
5149 unsigned RBIE : 1;
5150 unsigned INT0IE : 1;
5151 unsigned TMR0IE : 1;
5152 unsigned PEIE_GIEL : 1;
5153 unsigned GIE_GIEH : 1;
5156 struct
5158 unsigned : 1;
5159 unsigned INT0F : 1;
5160 unsigned T0IF : 1;
5161 unsigned : 1;
5162 unsigned INT0E : 1;
5163 unsigned T0IE : 1;
5164 unsigned PEIE : 1;
5165 unsigned GIE : 1;
5168 struct
5170 unsigned : 1;
5171 unsigned : 1;
5172 unsigned : 1;
5173 unsigned : 1;
5174 unsigned : 1;
5175 unsigned : 1;
5176 unsigned GIEL : 1;
5177 unsigned GIEH : 1;
5179 } __INTCONbits_t;
5181 extern __at(0x0FF2) volatile __INTCONbits_t INTCONbits;
5183 #define _RBIF 0x01
5184 #define _INT0IF 0x02
5185 #define _INT0F 0x02
5186 #define _TMR0IF 0x04
5187 #define _T0IF 0x04
5188 #define _RBIE 0x08
5189 #define _INT0IE 0x10
5190 #define _INT0E 0x10
5191 #define _TMR0IE 0x20
5192 #define _T0IE 0x20
5193 #define _PEIE_GIEL 0x40
5194 #define _PEIE 0x40
5195 #define _GIEL 0x40
5196 #define _GIE_GIEH 0x80
5197 #define _GIE 0x80
5198 #define _GIEH 0x80
5200 //==============================================================================
5202 extern __at(0x0FF3) __sfr PROD;
5203 extern __at(0x0FF3) __sfr PRODL;
5204 extern __at(0x0FF4) __sfr PRODH;
5205 extern __at(0x0FF5) __sfr TABLAT;
5206 extern __at(0x0FF6) __sfr TBLPTR;
5207 extern __at(0x0FF6) __sfr TBLPTRL;
5208 extern __at(0x0FF7) __sfr TBLPTRH;
5209 extern __at(0x0FF8) __sfr TBLPTRU;
5210 extern __at(0x0FF9) __sfr PC;
5211 extern __at(0x0FF9) __sfr PCL;
5212 extern __at(0x0FFA) __sfr PCLATH;
5213 extern __at(0x0FFB) __sfr PCLATU;
5215 //==============================================================================
5216 // STKPTR Bits
5218 extern __at(0x0FFC) __sfr STKPTR;
5220 typedef union
5222 struct
5224 unsigned STKPTR0 : 1;
5225 unsigned STKPTR1 : 1;
5226 unsigned STKPTR2 : 1;
5227 unsigned STKPTR3 : 1;
5228 unsigned STKPTR4 : 1;
5229 unsigned : 1;
5230 unsigned STKUNF : 1;
5231 unsigned STKFUL : 1;
5234 struct
5236 unsigned SP0 : 1;
5237 unsigned SP1 : 1;
5238 unsigned SP2 : 1;
5239 unsigned SP3 : 1;
5240 unsigned SP4 : 1;
5241 unsigned : 1;
5242 unsigned : 1;
5243 unsigned STKOVF : 1;
5246 struct
5248 unsigned SP : 5;
5249 unsigned : 3;
5252 struct
5254 unsigned STKPTR : 5;
5255 unsigned : 3;
5257 } __STKPTRbits_t;
5259 extern __at(0x0FFC) volatile __STKPTRbits_t STKPTRbits;
5261 #define _STKPTR0 0x01
5262 #define _SP0 0x01
5263 #define _STKPTR1 0x02
5264 #define _SP1 0x02
5265 #define _STKPTR2 0x04
5266 #define _SP2 0x04
5267 #define _STKPTR3 0x08
5268 #define _SP3 0x08
5269 #define _STKPTR4 0x10
5270 #define _SP4 0x10
5271 #define _STKUNF 0x40
5272 #define _STKFUL 0x80
5273 #define _STKOVF 0x80
5275 //==============================================================================
5277 extern __at(0x0FFD) __sfr TOS;
5278 extern __at(0x0FFD) __sfr TOSL;
5279 extern __at(0x0FFE) __sfr TOSH;
5280 extern __at(0x0FFF) __sfr TOSU;
5282 //==============================================================================
5284 // Configuration Addresses
5286 //==============================================================================
5288 #define __CONFIG1L 0x017FF8
5289 #define __CONFIG1H 0x017FF9
5290 #define __CONFIG2L 0x017FFA
5291 #define __CONFIG2H 0x017FFB
5292 #define __CONFIG3L 0x017FFC
5293 #define __CONFIG3H 0x017FFD
5295 //==============================================================================
5297 #endif // #ifndef __PIC18F66J15_H__