Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f689.h
blob8b8fede12fd91ceea300ef1884c6011e72c52424
1 /*
2 * This declarations of the PIC16F689 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:22:57 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 __PIC16F689_H__
26 #define __PIC16F689_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF_ADDR 0x0000
37 #define TMR0_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR_ADDR 0x0004
41 #define PORTA_ADDR 0x0005
42 #define PORTB_ADDR 0x0006
43 #define PORTC_ADDR 0x0007
44 #define PCLATH_ADDR 0x000A
45 #define INTCON_ADDR 0x000B
46 #define PIR1_ADDR 0x000C
47 #define PIR2_ADDR 0x000D
48 #define TMR1_ADDR 0x000E
49 #define TMR1L_ADDR 0x000E
50 #define TMR1H_ADDR 0x000F
51 #define T1CON_ADDR 0x0010
52 #define SSPBUF_ADDR 0x0013
53 #define SSPCON_ADDR 0x0014
54 #define RCSTA_ADDR 0x0018
55 #define TXREG_ADDR 0x0019
56 #define RCREG_ADDR 0x001A
57 #define ADRESH_ADDR 0x001E
58 #define ADCON0_ADDR 0x001F
59 #define OPTION_REG_ADDR 0x0081
60 #define TRISA_ADDR 0x0085
61 #define TRISB_ADDR 0x0086
62 #define TRISC_ADDR 0x0087
63 #define PIE1_ADDR 0x008C
64 #define PIE2_ADDR 0x008D
65 #define PCON_ADDR 0x008E
66 #define OSCCON_ADDR 0x008F
67 #define OSCTUNE_ADDR 0x0090
68 #define MSK_ADDR 0x0093
69 #define SSPADD_ADDR 0x0093
70 #define SSPMSK_ADDR 0x0093
71 #define SSPSTAT_ADDR 0x0094
72 #define WPU_ADDR 0x0095
73 #define WPUA_ADDR 0x0095
74 #define IOC_ADDR 0x0096
75 #define IOCA_ADDR 0x0096
76 #define WDTCON_ADDR 0x0097
77 #define TXSTA_ADDR 0x0098
78 #define SPBRG_ADDR 0x0099
79 #define SPBRGH_ADDR 0x009A
80 #define BAUDCTL_ADDR 0x009B
81 #define ADRESL_ADDR 0x009E
82 #define ADCON1_ADDR 0x009F
83 #define EEDAT_ADDR 0x010C
84 #define EEDATA_ADDR 0x010C
85 #define EEADR_ADDR 0x010D
86 #define EEDATH_ADDR 0x010E
87 #define EEADRH_ADDR 0x010F
88 #define WPUB_ADDR 0x0115
89 #define IOCB_ADDR 0x0116
90 #define VRCON_ADDR 0x0118
91 #define CM1CON0_ADDR 0x0119
92 #define CM2CON0_ADDR 0x011A
93 #define CM2CON1_ADDR 0x011B
94 #define ANSEL_ADDR 0x011E
95 #define ANSELH_ADDR 0x011F
96 #define EECON1_ADDR 0x018C
97 #define EECON2_ADDR 0x018D
98 #define SRCON_ADDR 0x019E
100 #endif // #ifndef NO_ADDR_DEFINES
102 //==============================================================================
104 // Register Definitions
106 //==============================================================================
108 extern __at(0x0000) __sfr INDF;
109 extern __at(0x0001) __sfr TMR0;
110 extern __at(0x0002) __sfr PCL;
112 //==============================================================================
113 // STATUS Bits
115 extern __at(0x0003) __sfr STATUS;
117 typedef union
119 struct
121 unsigned C : 1;
122 unsigned DC : 1;
123 unsigned Z : 1;
124 unsigned NOT_PD : 1;
125 unsigned NOT_TO : 1;
126 unsigned RP0 : 1;
127 unsigned RP1 : 1;
128 unsigned IRP : 1;
131 struct
133 unsigned : 5;
134 unsigned RP : 2;
135 unsigned : 1;
137 } __STATUSbits_t;
139 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
141 #define _C 0x01
142 #define _DC 0x02
143 #define _Z 0x04
144 #define _NOT_PD 0x08
145 #define _NOT_TO 0x10
146 #define _RP0 0x20
147 #define _RP1 0x40
148 #define _IRP 0x80
150 //==============================================================================
152 extern __at(0x0004) __sfr FSR;
154 //==============================================================================
155 // PORTA Bits
157 extern __at(0x0005) __sfr PORTA;
159 typedef union
161 struct
163 unsigned RA0 : 1;
164 unsigned RA1 : 1;
165 unsigned RA2 : 1;
166 unsigned RA3 : 1;
167 unsigned RA4 : 1;
168 unsigned RA5 : 1;
169 unsigned : 1;
170 unsigned : 1;
173 struct
175 unsigned RA : 6;
176 unsigned : 2;
178 } __PORTAbits_t;
180 extern __at(0x0005) volatile __PORTAbits_t PORTAbits;
182 #define _RA0 0x01
183 #define _RA1 0x02
184 #define _RA2 0x04
185 #define _RA3 0x08
186 #define _RA4 0x10
187 #define _RA5 0x20
189 //==============================================================================
192 //==============================================================================
193 // PORTB Bits
195 extern __at(0x0006) __sfr PORTB;
197 typedef struct
199 unsigned : 1;
200 unsigned : 1;
201 unsigned : 1;
202 unsigned : 1;
203 unsigned RB4 : 1;
204 unsigned RB5 : 1;
205 unsigned RB6 : 1;
206 unsigned RB7 : 1;
207 } __PORTBbits_t;
209 extern __at(0x0006) volatile __PORTBbits_t PORTBbits;
211 #define _RB4 0x10
212 #define _RB5 0x20
213 #define _RB6 0x40
214 #define _RB7 0x80
216 //==============================================================================
219 //==============================================================================
220 // PORTC Bits
222 extern __at(0x0007) __sfr PORTC;
224 typedef struct
226 unsigned RC0 : 1;
227 unsigned RC1 : 1;
228 unsigned RC2 : 1;
229 unsigned RC3 : 1;
230 unsigned RC4 : 1;
231 unsigned RC5 : 1;
232 unsigned RC6 : 1;
233 unsigned RC7 : 1;
234 } __PORTCbits_t;
236 extern __at(0x0007) volatile __PORTCbits_t PORTCbits;
238 #define _RC0 0x01
239 #define _RC1 0x02
240 #define _RC2 0x04
241 #define _RC3 0x08
242 #define _RC4 0x10
243 #define _RC5 0x20
244 #define _RC6 0x40
245 #define _RC7 0x80
247 //==============================================================================
249 extern __at(0x000A) __sfr PCLATH;
251 //==============================================================================
252 // INTCON Bits
254 extern __at(0x000B) __sfr INTCON;
256 typedef struct
258 unsigned RABIF : 1;
259 unsigned INTF : 1;
260 unsigned T0IF : 1;
261 unsigned RABIE : 1;
262 unsigned INTE : 1;
263 unsigned T0IE : 1;
264 unsigned PEIE : 1;
265 unsigned GIE : 1;
266 } __INTCONbits_t;
268 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
270 #define _RABIF 0x01
271 #define _INTF 0x02
272 #define _T0IF 0x04
273 #define _RABIE 0x08
274 #define _INTE 0x10
275 #define _T0IE 0x20
276 #define _PEIE 0x40
277 #define _GIE 0x80
279 //==============================================================================
282 //==============================================================================
283 // PIR1 Bits
285 extern __at(0x000C) __sfr PIR1;
287 typedef union
289 struct
291 unsigned TMR1IF : 1;
292 unsigned : 1;
293 unsigned : 1;
294 unsigned SSPIF : 1;
295 unsigned TXIF : 1;
296 unsigned RCIF : 1;
297 unsigned ADIF : 1;
298 unsigned : 1;
301 struct
303 unsigned T1IF : 1;
304 unsigned : 1;
305 unsigned : 1;
306 unsigned : 1;
307 unsigned : 1;
308 unsigned : 1;
309 unsigned : 1;
310 unsigned : 1;
312 } __PIR1bits_t;
314 extern __at(0x000C) volatile __PIR1bits_t PIR1bits;
316 #define _TMR1IF 0x01
317 #define _T1IF 0x01
318 #define _SSPIF 0x08
319 #define _TXIF 0x10
320 #define _RCIF 0x20
321 #define _ADIF 0x40
323 //==============================================================================
326 //==============================================================================
327 // PIR2 Bits
329 extern __at(0x000D) __sfr PIR2;
331 typedef struct
333 unsigned : 1;
334 unsigned : 1;
335 unsigned : 1;
336 unsigned : 1;
337 unsigned EEIF : 1;
338 unsigned C1IF : 1;
339 unsigned C2IF : 1;
340 unsigned OSFIF : 1;
341 } __PIR2bits_t;
343 extern __at(0x000D) volatile __PIR2bits_t PIR2bits;
345 #define _EEIF 0x10
346 #define _C1IF 0x20
347 #define _C2IF 0x40
348 #define _OSFIF 0x80
350 //==============================================================================
352 extern __at(0x000E) __sfr TMR1;
353 extern __at(0x000E) __sfr TMR1L;
354 extern __at(0x000F) __sfr TMR1H;
356 //==============================================================================
357 // T1CON Bits
359 extern __at(0x0010) __sfr T1CON;
361 typedef union
363 struct
365 unsigned TMR1ON : 1;
366 unsigned TMR1CS : 1;
367 unsigned NOT_T1SYNC : 1;
368 unsigned T1OSCEN : 1;
369 unsigned T1CKPS0 : 1;
370 unsigned T1CKPS1 : 1;
371 unsigned TMR1GE : 1;
372 unsigned T1GINV : 1;
375 struct
377 unsigned : 4;
378 unsigned T1CKPS : 2;
379 unsigned : 2;
381 } __T1CONbits_t;
383 extern __at(0x0010) volatile __T1CONbits_t T1CONbits;
385 #define _TMR1ON 0x01
386 #define _TMR1CS 0x02
387 #define _NOT_T1SYNC 0x04
388 #define _T1OSCEN 0x08
389 #define _T1CKPS0 0x10
390 #define _T1CKPS1 0x20
391 #define _TMR1GE 0x40
392 #define _T1GINV 0x80
394 //==============================================================================
396 extern __at(0x0013) __sfr SSPBUF;
398 //==============================================================================
399 // SSPCON Bits
401 extern __at(0x0014) __sfr SSPCON;
403 typedef union
405 struct
407 unsigned SSPM0 : 1;
408 unsigned SSPM1 : 1;
409 unsigned SSPM2 : 1;
410 unsigned SSPM3 : 1;
411 unsigned CKP : 1;
412 unsigned SSPEN : 1;
413 unsigned SSPOV : 1;
414 unsigned WCOL : 1;
417 struct
419 unsigned SSPM : 4;
420 unsigned : 4;
422 } __SSPCONbits_t;
424 extern __at(0x0014) volatile __SSPCONbits_t SSPCONbits;
426 #define _SSPM0 0x01
427 #define _SSPM1 0x02
428 #define _SSPM2 0x04
429 #define _SSPM3 0x08
430 #define _CKP 0x10
431 #define _SSPEN 0x20
432 #define _SSPOV 0x40
433 #define _WCOL 0x80
435 //==============================================================================
438 //==============================================================================
439 // RCSTA Bits
441 extern __at(0x0018) __sfr RCSTA;
443 typedef struct
445 unsigned RX9D : 1;
446 unsigned OERR : 1;
447 unsigned FERR : 1;
448 unsigned ADDEN : 1;
449 unsigned CREN : 1;
450 unsigned SREN : 1;
451 unsigned RX9 : 1;
452 unsigned SPEN : 1;
453 } __RCSTAbits_t;
455 extern __at(0x0018) volatile __RCSTAbits_t RCSTAbits;
457 #define _RX9D 0x01
458 #define _OERR 0x02
459 #define _FERR 0x04
460 #define _ADDEN 0x08
461 #define _CREN 0x10
462 #define _SREN 0x20
463 #define _RX9 0x40
464 #define _SPEN 0x80
466 //==============================================================================
468 extern __at(0x0019) __sfr TXREG;
469 extern __at(0x001A) __sfr RCREG;
470 extern __at(0x001E) __sfr ADRESH;
472 //==============================================================================
473 // ADCON0 Bits
475 extern __at(0x001F) __sfr ADCON0;
477 typedef union
479 struct
481 unsigned ADON : 1;
482 unsigned GO_NOT_DONE : 1;
483 unsigned CHS0 : 1;
484 unsigned CHS1 : 1;
485 unsigned CHS2 : 1;
486 unsigned CHS3 : 1;
487 unsigned VCFG : 1;
488 unsigned ADFM : 1;
491 struct
493 unsigned : 1;
494 unsigned GO : 1;
495 unsigned : 1;
496 unsigned : 1;
497 unsigned : 1;
498 unsigned : 1;
499 unsigned : 1;
500 unsigned : 1;
503 struct
505 unsigned : 1;
506 unsigned NOT_DONE : 1;
507 unsigned : 1;
508 unsigned : 1;
509 unsigned : 1;
510 unsigned : 1;
511 unsigned : 1;
512 unsigned : 1;
515 struct
517 unsigned : 1;
518 unsigned GO_DONE : 1;
519 unsigned : 1;
520 unsigned : 1;
521 unsigned : 1;
522 unsigned : 1;
523 unsigned : 1;
524 unsigned : 1;
527 struct
529 unsigned : 2;
530 unsigned CHS : 4;
531 unsigned : 2;
533 } __ADCON0bits_t;
535 extern __at(0x001F) volatile __ADCON0bits_t ADCON0bits;
537 #define _ADON 0x01
538 #define _GO_NOT_DONE 0x02
539 #define _GO 0x02
540 #define _NOT_DONE 0x02
541 #define _GO_DONE 0x02
542 #define _CHS0 0x04
543 #define _CHS1 0x08
544 #define _CHS2 0x10
545 #define _CHS3 0x20
546 #define _VCFG 0x40
547 #define _ADFM 0x80
549 //==============================================================================
552 //==============================================================================
553 // OPTION_REG Bits
555 extern __at(0x0081) __sfr OPTION_REG;
557 typedef union
559 struct
561 unsigned PS0 : 1;
562 unsigned PS1 : 1;
563 unsigned PS2 : 1;
564 unsigned PSA : 1;
565 unsigned T0SE : 1;
566 unsigned T0CS : 1;
567 unsigned INTEDG : 1;
568 unsigned NOT_RABPU : 1;
571 struct
573 unsigned PS : 3;
574 unsigned : 5;
576 } __OPTION_REGbits_t;
578 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits;
580 #define _PS0 0x01
581 #define _PS1 0x02
582 #define _PS2 0x04
583 #define _PSA 0x08
584 #define _T0SE 0x10
585 #define _T0CS 0x20
586 #define _INTEDG 0x40
587 #define _NOT_RABPU 0x80
589 //==============================================================================
592 //==============================================================================
593 // TRISA Bits
595 extern __at(0x0085) __sfr TRISA;
597 typedef union
599 struct
601 unsigned TRISA0 : 1;
602 unsigned TRISA1 : 1;
603 unsigned TRISA2 : 1;
604 unsigned TRISA3 : 1;
605 unsigned TRISA4 : 1;
606 unsigned TRISA5 : 1;
607 unsigned : 1;
608 unsigned : 1;
611 struct
613 unsigned TRISA : 6;
614 unsigned : 2;
616 } __TRISAbits_t;
618 extern __at(0x0085) volatile __TRISAbits_t TRISAbits;
620 #define _TRISA0 0x01
621 #define _TRISA1 0x02
622 #define _TRISA2 0x04
623 #define _TRISA3 0x08
624 #define _TRISA4 0x10
625 #define _TRISA5 0x20
627 //==============================================================================
630 //==============================================================================
631 // TRISB Bits
633 extern __at(0x0086) __sfr TRISB;
635 typedef struct
637 unsigned : 1;
638 unsigned : 1;
639 unsigned : 1;
640 unsigned : 1;
641 unsigned TRISB4 : 1;
642 unsigned TRISB5 : 1;
643 unsigned TRISB6 : 1;
644 unsigned TRISB7 : 1;
645 } __TRISBbits_t;
647 extern __at(0x0086) volatile __TRISBbits_t TRISBbits;
649 #define _TRISB4 0x10
650 #define _TRISB5 0x20
651 #define _TRISB6 0x40
652 #define _TRISB7 0x80
654 //==============================================================================
657 //==============================================================================
658 // TRISC Bits
660 extern __at(0x0087) __sfr TRISC;
662 typedef struct
664 unsigned TRISC0 : 1;
665 unsigned TRISC1 : 1;
666 unsigned TRISC2 : 1;
667 unsigned TRISC3 : 1;
668 unsigned TRISC4 : 1;
669 unsigned TRISC5 : 1;
670 unsigned TRISC6 : 1;
671 unsigned TRISC7 : 1;
672 } __TRISCbits_t;
674 extern __at(0x0087) volatile __TRISCbits_t TRISCbits;
676 #define _TRISC0 0x01
677 #define _TRISC1 0x02
678 #define _TRISC2 0x04
679 #define _TRISC3 0x08
680 #define _TRISC4 0x10
681 #define _TRISC5 0x20
682 #define _TRISC6 0x40
683 #define _TRISC7 0x80
685 //==============================================================================
688 //==============================================================================
689 // PIE1 Bits
691 extern __at(0x008C) __sfr PIE1;
693 typedef union
695 struct
697 unsigned TMR1IE : 1;
698 unsigned : 1;
699 unsigned : 1;
700 unsigned SSPIE : 1;
701 unsigned TXIE : 1;
702 unsigned RCIE : 1;
703 unsigned ADIE : 1;
704 unsigned : 1;
707 struct
709 unsigned T1IE : 1;
710 unsigned : 1;
711 unsigned : 1;
712 unsigned : 1;
713 unsigned : 1;
714 unsigned : 1;
715 unsigned : 1;
716 unsigned : 1;
718 } __PIE1bits_t;
720 extern __at(0x008C) volatile __PIE1bits_t PIE1bits;
722 #define _TMR1IE 0x01
723 #define _T1IE 0x01
724 #define _SSPIE 0x08
725 #define _TXIE 0x10
726 #define _RCIE 0x20
727 #define _ADIE 0x40
729 //==============================================================================
732 //==============================================================================
733 // PIE2 Bits
735 extern __at(0x008D) __sfr PIE2;
737 typedef struct
739 unsigned : 1;
740 unsigned : 1;
741 unsigned : 1;
742 unsigned : 1;
743 unsigned EEIE : 1;
744 unsigned C1IE : 1;
745 unsigned C2IE : 1;
746 unsigned OSFIE : 1;
747 } __PIE2bits_t;
749 extern __at(0x008D) volatile __PIE2bits_t PIE2bits;
751 #define _EEIE 0x10
752 #define _C1IE 0x20
753 #define _C2IE 0x40
754 #define _OSFIE 0x80
756 //==============================================================================
759 //==============================================================================
760 // PCON Bits
762 extern __at(0x008E) __sfr PCON;
764 typedef struct
766 unsigned NOT_BOR : 1;
767 unsigned NOT_POR : 1;
768 unsigned : 1;
769 unsigned : 1;
770 unsigned SBOREN : 1;
771 unsigned ULPWUE : 1;
772 unsigned : 1;
773 unsigned : 1;
774 } __PCONbits_t;
776 extern __at(0x008E) volatile __PCONbits_t PCONbits;
778 #define _NOT_BOR 0x01
779 #define _NOT_POR 0x02
780 #define _SBOREN 0x10
781 #define _ULPWUE 0x20
783 //==============================================================================
786 //==============================================================================
787 // OSCCON Bits
789 extern __at(0x008F) __sfr OSCCON;
791 typedef union
793 struct
795 unsigned SCS : 1;
796 unsigned LTS : 1;
797 unsigned HTS : 1;
798 unsigned OSTS : 1;
799 unsigned IRCF0 : 1;
800 unsigned IRCF1 : 1;
801 unsigned IRCF2 : 1;
802 unsigned : 1;
805 struct
807 unsigned : 4;
808 unsigned IRCF : 3;
809 unsigned : 1;
811 } __OSCCONbits_t;
813 extern __at(0x008F) volatile __OSCCONbits_t OSCCONbits;
815 #define _SCS 0x01
816 #define _LTS 0x02
817 #define _HTS 0x04
818 #define _OSTS 0x08
819 #define _IRCF0 0x10
820 #define _IRCF1 0x20
821 #define _IRCF2 0x40
823 //==============================================================================
826 //==============================================================================
827 // OSCTUNE Bits
829 extern __at(0x0090) __sfr OSCTUNE;
831 typedef union
833 struct
835 unsigned TUN0 : 1;
836 unsigned TUN1 : 1;
837 unsigned TUN2 : 1;
838 unsigned TUN3 : 1;
839 unsigned TUN4 : 1;
840 unsigned : 1;
841 unsigned : 1;
842 unsigned : 1;
845 struct
847 unsigned TUN : 5;
848 unsigned : 3;
850 } __OSCTUNEbits_t;
852 extern __at(0x0090) volatile __OSCTUNEbits_t OSCTUNEbits;
854 #define _TUN0 0x01
855 #define _TUN1 0x02
856 #define _TUN2 0x04
857 #define _TUN3 0x08
858 #define _TUN4 0x10
860 //==============================================================================
863 //==============================================================================
864 // MSK Bits
866 extern __at(0x0093) __sfr MSK;
868 typedef struct
870 unsigned MSK0 : 1;
871 unsigned MSK1 : 1;
872 unsigned MSK2 : 1;
873 unsigned MSK3 : 1;
874 unsigned MSK4 : 1;
875 unsigned MSK5 : 1;
876 unsigned MSK6 : 1;
877 unsigned MSK7 : 1;
878 } __MSKbits_t;
880 extern __at(0x0093) volatile __MSKbits_t MSKbits;
882 #define _MSK0 0x01
883 #define _MSK1 0x02
884 #define _MSK2 0x04
885 #define _MSK3 0x08
886 #define _MSK4 0x10
887 #define _MSK5 0x20
888 #define _MSK6 0x40
889 #define _MSK7 0x80
891 //==============================================================================
893 extern __at(0x0093) __sfr SSPADD;
895 //==============================================================================
896 // SSPMSK Bits
898 extern __at(0x0093) __sfr SSPMSK;
900 typedef struct
902 unsigned MSK0 : 1;
903 unsigned MSK1 : 1;
904 unsigned MSK2 : 1;
905 unsigned MSK3 : 1;
906 unsigned MSK4 : 1;
907 unsigned MSK5 : 1;
908 unsigned MSK6 : 1;
909 unsigned MSK7 : 1;
910 } __SSPMSKbits_t;
912 extern __at(0x0093) volatile __SSPMSKbits_t SSPMSKbits;
914 #define _SSPMSK_MSK0 0x01
915 #define _SSPMSK_MSK1 0x02
916 #define _SSPMSK_MSK2 0x04
917 #define _SSPMSK_MSK3 0x08
918 #define _SSPMSK_MSK4 0x10
919 #define _SSPMSK_MSK5 0x20
920 #define _SSPMSK_MSK6 0x40
921 #define _SSPMSK_MSK7 0x80
923 //==============================================================================
926 //==============================================================================
927 // SSPSTAT Bits
929 extern __at(0x0094) __sfr SSPSTAT;
931 typedef union
933 struct
935 unsigned BF : 1;
936 unsigned UA : 1;
937 unsigned R_NOT_W : 1;
938 unsigned S : 1;
939 unsigned P : 1;
940 unsigned D_NOT_A : 1;
941 unsigned CKE : 1;
942 unsigned SMP : 1;
945 struct
947 unsigned : 1;
948 unsigned : 1;
949 unsigned R : 1;
950 unsigned I2C_START : 1;
951 unsigned I2C_STOP : 1;
952 unsigned D : 1;
953 unsigned : 1;
954 unsigned : 1;
957 struct
959 unsigned : 1;
960 unsigned : 1;
961 unsigned I2C_READ : 1;
962 unsigned : 1;
963 unsigned : 1;
964 unsigned I2C_DATA : 1;
965 unsigned : 1;
966 unsigned : 1;
969 struct
971 unsigned : 1;
972 unsigned : 1;
973 unsigned NOT_W : 1;
974 unsigned : 1;
975 unsigned : 1;
976 unsigned NOT_A : 1;
977 unsigned : 1;
978 unsigned : 1;
981 struct
983 unsigned : 1;
984 unsigned : 1;
985 unsigned NOT_WRITE : 1;
986 unsigned : 1;
987 unsigned : 1;
988 unsigned NOT_ADDRESS : 1;
989 unsigned : 1;
990 unsigned : 1;
993 struct
995 unsigned : 1;
996 unsigned : 1;
997 unsigned R_W : 1;
998 unsigned : 1;
999 unsigned : 1;
1000 unsigned D_A : 1;
1001 unsigned : 1;
1002 unsigned : 1;
1005 struct
1007 unsigned : 1;
1008 unsigned : 1;
1009 unsigned READ_WRITE : 1;
1010 unsigned : 1;
1011 unsigned : 1;
1012 unsigned DATA_ADDRESS : 1;
1013 unsigned : 1;
1014 unsigned : 1;
1016 } __SSPSTATbits_t;
1018 extern __at(0x0094) volatile __SSPSTATbits_t SSPSTATbits;
1020 #define _BF 0x01
1021 #define _UA 0x02
1022 #define _R_NOT_W 0x04
1023 #define _R 0x04
1024 #define _I2C_READ 0x04
1025 #define _NOT_W 0x04
1026 #define _NOT_WRITE 0x04
1027 #define _R_W 0x04
1028 #define _READ_WRITE 0x04
1029 #define _S 0x08
1030 #define _I2C_START 0x08
1031 #define _P 0x10
1032 #define _I2C_STOP 0x10
1033 #define _D_NOT_A 0x20
1034 #define _D 0x20
1035 #define _I2C_DATA 0x20
1036 #define _NOT_A 0x20
1037 #define _NOT_ADDRESS 0x20
1038 #define _D_A 0x20
1039 #define _DATA_ADDRESS 0x20
1040 #define _CKE 0x40
1041 #define _SMP 0x80
1043 //==============================================================================
1046 //==============================================================================
1047 // WPU Bits
1049 extern __at(0x0095) __sfr WPU;
1051 typedef union
1053 struct
1055 unsigned WPUA0 : 1;
1056 unsigned WPUA1 : 1;
1057 unsigned WPUA2 : 1;
1058 unsigned : 1;
1059 unsigned WPUA4 : 1;
1060 unsigned WPUA5 : 1;
1061 unsigned : 1;
1062 unsigned : 1;
1065 struct
1067 unsigned WPU0 : 1;
1068 unsigned WPU1 : 1;
1069 unsigned WPU2 : 1;
1070 unsigned : 1;
1071 unsigned WPU4 : 1;
1072 unsigned WPU5 : 1;
1073 unsigned : 1;
1074 unsigned : 1;
1076 } __WPUbits_t;
1078 extern __at(0x0095) volatile __WPUbits_t WPUbits;
1080 #define _WPUA0 0x01
1081 #define _WPU0 0x01
1082 #define _WPUA1 0x02
1083 #define _WPU1 0x02
1084 #define _WPUA2 0x04
1085 #define _WPU2 0x04
1086 #define _WPUA4 0x10
1087 #define _WPU4 0x10
1088 #define _WPUA5 0x20
1089 #define _WPU5 0x20
1091 //==============================================================================
1094 //==============================================================================
1095 // WPUA Bits
1097 extern __at(0x0095) __sfr WPUA;
1099 typedef union
1101 struct
1103 unsigned WPUA0 : 1;
1104 unsigned WPUA1 : 1;
1105 unsigned WPUA2 : 1;
1106 unsigned : 1;
1107 unsigned WPUA4 : 1;
1108 unsigned WPUA5 : 1;
1109 unsigned : 1;
1110 unsigned : 1;
1113 struct
1115 unsigned WPU0 : 1;
1116 unsigned WPU1 : 1;
1117 unsigned WPU2 : 1;
1118 unsigned : 1;
1119 unsigned WPU4 : 1;
1120 unsigned WPU5 : 1;
1121 unsigned : 1;
1122 unsigned : 1;
1124 } __WPUAbits_t;
1126 extern __at(0x0095) volatile __WPUAbits_t WPUAbits;
1128 #define _WPUA_WPUA0 0x01
1129 #define _WPUA_WPU0 0x01
1130 #define _WPUA_WPUA1 0x02
1131 #define _WPUA_WPU1 0x02
1132 #define _WPUA_WPUA2 0x04
1133 #define _WPUA_WPU2 0x04
1134 #define _WPUA_WPUA4 0x10
1135 #define _WPUA_WPU4 0x10
1136 #define _WPUA_WPUA5 0x20
1137 #define _WPUA_WPU5 0x20
1139 //==============================================================================
1142 //==============================================================================
1143 // IOC Bits
1145 extern __at(0x0096) __sfr IOC;
1147 typedef union
1149 struct
1151 unsigned IOCA0 : 1;
1152 unsigned IOCA1 : 1;
1153 unsigned IOCA2 : 1;
1154 unsigned IOCA3 : 1;
1155 unsigned IOCA4 : 1;
1156 unsigned IOCA5 : 1;
1157 unsigned : 1;
1158 unsigned : 1;
1161 struct
1163 unsigned IOC0 : 1;
1164 unsigned IOC1 : 1;
1165 unsigned IOC2 : 1;
1166 unsigned IOC3 : 1;
1167 unsigned IOC4 : 1;
1168 unsigned IOC5 : 1;
1169 unsigned : 1;
1170 unsigned : 1;
1173 struct
1175 unsigned IOC : 6;
1176 unsigned : 2;
1179 struct
1181 unsigned IOCA : 6;
1182 unsigned : 2;
1184 } __IOCbits_t;
1186 extern __at(0x0096) volatile __IOCbits_t IOCbits;
1188 #define _IOCA0 0x01
1189 #define _IOC0 0x01
1190 #define _IOCA1 0x02
1191 #define _IOC1 0x02
1192 #define _IOCA2 0x04
1193 #define _IOC2 0x04
1194 #define _IOCA3 0x08
1195 #define _IOC3 0x08
1196 #define _IOCA4 0x10
1197 #define _IOC4 0x10
1198 #define _IOCA5 0x20
1199 #define _IOC5 0x20
1201 //==============================================================================
1204 //==============================================================================
1205 // IOCA Bits
1207 extern __at(0x0096) __sfr IOCA;
1209 typedef union
1211 struct
1213 unsigned IOCA0 : 1;
1214 unsigned IOCA1 : 1;
1215 unsigned IOCA2 : 1;
1216 unsigned IOCA3 : 1;
1217 unsigned IOCA4 : 1;
1218 unsigned IOCA5 : 1;
1219 unsigned : 1;
1220 unsigned : 1;
1223 struct
1225 unsigned IOC0 : 1;
1226 unsigned IOC1 : 1;
1227 unsigned IOC2 : 1;
1228 unsigned IOC3 : 1;
1229 unsigned IOC4 : 1;
1230 unsigned IOC5 : 1;
1231 unsigned : 1;
1232 unsigned : 1;
1235 struct
1237 unsigned IOC : 6;
1238 unsigned : 2;
1241 struct
1243 unsigned IOCA : 6;
1244 unsigned : 2;
1246 } __IOCAbits_t;
1248 extern __at(0x0096) volatile __IOCAbits_t IOCAbits;
1250 #define _IOCA_IOCA0 0x01
1251 #define _IOCA_IOC0 0x01
1252 #define _IOCA_IOCA1 0x02
1253 #define _IOCA_IOC1 0x02
1254 #define _IOCA_IOCA2 0x04
1255 #define _IOCA_IOC2 0x04
1256 #define _IOCA_IOCA3 0x08
1257 #define _IOCA_IOC3 0x08
1258 #define _IOCA_IOCA4 0x10
1259 #define _IOCA_IOC4 0x10
1260 #define _IOCA_IOCA5 0x20
1261 #define _IOCA_IOC5 0x20
1263 //==============================================================================
1266 //==============================================================================
1267 // WDTCON Bits
1269 extern __at(0x0097) __sfr WDTCON;
1271 typedef union
1273 struct
1275 unsigned SWDTEN : 1;
1276 unsigned WDTPS0 : 1;
1277 unsigned WDTPS1 : 1;
1278 unsigned WDTPS2 : 1;
1279 unsigned WDTPS3 : 1;
1280 unsigned : 1;
1281 unsigned : 1;
1282 unsigned : 1;
1285 struct
1287 unsigned : 1;
1288 unsigned WDTPS : 4;
1289 unsigned : 3;
1291 } __WDTCONbits_t;
1293 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1295 #define _SWDTEN 0x01
1296 #define _WDTPS0 0x02
1297 #define _WDTPS1 0x04
1298 #define _WDTPS2 0x08
1299 #define _WDTPS3 0x10
1301 //==============================================================================
1304 //==============================================================================
1305 // TXSTA Bits
1307 extern __at(0x0098) __sfr TXSTA;
1309 typedef union
1311 struct
1313 unsigned TX9D : 1;
1314 unsigned TRMT : 1;
1315 unsigned BRGH : 1;
1316 unsigned SENDB : 1;
1317 unsigned SYNC : 1;
1318 unsigned TXEN : 1;
1319 unsigned TX9 : 1;
1320 unsigned CSRC : 1;
1323 struct
1325 unsigned : 1;
1326 unsigned : 1;
1327 unsigned : 1;
1328 unsigned SENB : 1;
1329 unsigned : 1;
1330 unsigned : 1;
1331 unsigned : 1;
1332 unsigned : 1;
1334 } __TXSTAbits_t;
1336 extern __at(0x0098) volatile __TXSTAbits_t TXSTAbits;
1338 #define _TX9D 0x01
1339 #define _TRMT 0x02
1340 #define _BRGH 0x04
1341 #define _SENDB 0x08
1342 #define _SENB 0x08
1343 #define _SYNC 0x10
1344 #define _TXEN 0x20
1345 #define _TX9 0x40
1346 #define _CSRC 0x80
1348 //==============================================================================
1351 //==============================================================================
1352 // SPBRG Bits
1354 extern __at(0x0099) __sfr SPBRG;
1356 typedef struct
1358 unsigned BRG0 : 1;
1359 unsigned BRG1 : 1;
1360 unsigned BRG2 : 1;
1361 unsigned BRG3 : 1;
1362 unsigned BRG4 : 1;
1363 unsigned BRG5 : 1;
1364 unsigned BRG6 : 1;
1365 unsigned BRG7 : 1;
1366 } __SPBRGbits_t;
1368 extern __at(0x0099) volatile __SPBRGbits_t SPBRGbits;
1370 #define _BRG0 0x01
1371 #define _BRG1 0x02
1372 #define _BRG2 0x04
1373 #define _BRG3 0x08
1374 #define _BRG4 0x10
1375 #define _BRG5 0x20
1376 #define _BRG6 0x40
1377 #define _BRG7 0x80
1379 //==============================================================================
1382 //==============================================================================
1383 // SPBRGH Bits
1385 extern __at(0x009A) __sfr SPBRGH;
1387 typedef struct
1389 unsigned BRG8 : 1;
1390 unsigned BRG9 : 1;
1391 unsigned BRG10 : 1;
1392 unsigned BRG11 : 1;
1393 unsigned BRG12 : 1;
1394 unsigned BRG13 : 1;
1395 unsigned BRG14 : 1;
1396 unsigned BRG15 : 1;
1397 } __SPBRGHbits_t;
1399 extern __at(0x009A) volatile __SPBRGHbits_t SPBRGHbits;
1401 #define _BRG8 0x01
1402 #define _BRG9 0x02
1403 #define _BRG10 0x04
1404 #define _BRG11 0x08
1405 #define _BRG12 0x10
1406 #define _BRG13 0x20
1407 #define _BRG14 0x40
1408 #define _BRG15 0x80
1410 //==============================================================================
1413 //==============================================================================
1414 // BAUDCTL Bits
1416 extern __at(0x009B) __sfr BAUDCTL;
1418 #define BAUDCON BAUDCTL
1420 typedef struct
1422 unsigned ABDEN : 1;
1423 unsigned WUE : 1;
1424 unsigned : 1;
1425 unsigned BRG16 : 1;
1426 unsigned SCKP : 1;
1427 unsigned : 1;
1428 unsigned RCIDL : 1;
1429 unsigned ABDOVF : 1;
1430 } __BAUDCTLbits_t;
1432 extern __at(0x009B) volatile __BAUDCTLbits_t BAUDCTLbits;
1434 #define BAUDCONbits BAUDCTLbits
1436 #define _ABDEN 0x01
1437 #define _WUE 0x02
1438 #define _BRG16 0x08
1439 #define _SCKP 0x10
1440 #define _RCIDL 0x40
1441 #define _ABDOVF 0x80
1443 //==============================================================================
1445 extern __at(0x009E) __sfr ADRESL;
1447 //==============================================================================
1448 // ADCON1 Bits
1450 extern __at(0x009F) __sfr ADCON1;
1452 typedef union
1454 struct
1456 unsigned : 1;
1457 unsigned : 1;
1458 unsigned : 1;
1459 unsigned : 1;
1460 unsigned ADCS0 : 1;
1461 unsigned ADCS1 : 1;
1462 unsigned ADCS2 : 1;
1463 unsigned : 1;
1466 struct
1468 unsigned : 4;
1469 unsigned ADCS : 3;
1470 unsigned : 1;
1472 } __ADCON1bits_t;
1474 extern __at(0x009F) volatile __ADCON1bits_t ADCON1bits;
1476 #define _ADCS0 0x10
1477 #define _ADCS1 0x20
1478 #define _ADCS2 0x40
1480 //==============================================================================
1482 extern __at(0x010C) __sfr EEDAT;
1483 extern __at(0x010C) __sfr EEDATA;
1484 extern __at(0x010D) __sfr EEADR;
1485 extern __at(0x010E) __sfr EEDATH;
1486 extern __at(0x010F) __sfr EEADRH;
1488 //==============================================================================
1489 // WPUB Bits
1491 extern __at(0x0115) __sfr WPUB;
1493 typedef struct
1495 unsigned : 1;
1496 unsigned : 1;
1497 unsigned : 1;
1498 unsigned : 1;
1499 unsigned WPUB4 : 1;
1500 unsigned WPUB5 : 1;
1501 unsigned WPUB6 : 1;
1502 unsigned WPUB7 : 1;
1503 } __WPUBbits_t;
1505 extern __at(0x0115) volatile __WPUBbits_t WPUBbits;
1507 #define _WPUB4 0x10
1508 #define _WPUB5 0x20
1509 #define _WPUB6 0x40
1510 #define _WPUB7 0x80
1512 //==============================================================================
1515 //==============================================================================
1516 // IOCB Bits
1518 extern __at(0x0116) __sfr IOCB;
1520 typedef struct
1522 unsigned : 1;
1523 unsigned : 1;
1524 unsigned : 1;
1525 unsigned : 1;
1526 unsigned IOCB4 : 1;
1527 unsigned IOCB5 : 1;
1528 unsigned IOCB6 : 1;
1529 unsigned IOCB7 : 1;
1530 } __IOCBbits_t;
1532 extern __at(0x0116) volatile __IOCBbits_t IOCBbits;
1534 #define _IOCB4 0x10
1535 #define _IOCB5 0x20
1536 #define _IOCB6 0x40
1537 #define _IOCB7 0x80
1539 //==============================================================================
1542 //==============================================================================
1543 // VRCON Bits
1545 extern __at(0x0118) __sfr VRCON;
1547 typedef union
1549 struct
1551 unsigned VR0 : 1;
1552 unsigned VR1 : 1;
1553 unsigned VR2 : 1;
1554 unsigned VR3 : 1;
1555 unsigned VP6EN : 1;
1556 unsigned VRR : 1;
1557 unsigned C2VREN : 1;
1558 unsigned C1VREN : 1;
1561 struct
1563 unsigned VR : 4;
1564 unsigned : 4;
1566 } __VRCONbits_t;
1568 extern __at(0x0118) volatile __VRCONbits_t VRCONbits;
1570 #define _VR0 0x01
1571 #define _VR1 0x02
1572 #define _VR2 0x04
1573 #define _VR3 0x08
1574 #define _VP6EN 0x10
1575 #define _VRR 0x20
1576 #define _C2VREN 0x40
1577 #define _C1VREN 0x80
1579 //==============================================================================
1582 //==============================================================================
1583 // CM1CON0 Bits
1585 extern __at(0x0119) __sfr CM1CON0;
1587 typedef union
1589 struct
1591 unsigned C1CH0 : 1;
1592 unsigned C1CH1 : 1;
1593 unsigned C1R : 1;
1594 unsigned : 1;
1595 unsigned C1POL : 1;
1596 unsigned C1OE : 1;
1597 unsigned C1OUT : 1;
1598 unsigned C1ON : 1;
1601 struct
1603 unsigned C1CH : 2;
1604 unsigned : 6;
1606 } __CM1CON0bits_t;
1608 extern __at(0x0119) volatile __CM1CON0bits_t CM1CON0bits;
1610 #define _C1CH0 0x01
1611 #define _C1CH1 0x02
1612 #define _C1R 0x04
1613 #define _C1POL 0x10
1614 #define _C1OE 0x20
1615 #define _C1OUT 0x40
1616 #define _C1ON 0x80
1618 //==============================================================================
1621 //==============================================================================
1622 // CM2CON0 Bits
1624 extern __at(0x011A) __sfr CM2CON0;
1626 typedef union
1628 struct
1630 unsigned C2CH0 : 1;
1631 unsigned C2CH1 : 1;
1632 unsigned C2R : 1;
1633 unsigned : 1;
1634 unsigned C2POL : 1;
1635 unsigned C2OE : 1;
1636 unsigned C2OUT : 1;
1637 unsigned C2ON : 1;
1640 struct
1642 unsigned C2CH : 2;
1643 unsigned : 6;
1645 } __CM2CON0bits_t;
1647 extern __at(0x011A) volatile __CM2CON0bits_t CM2CON0bits;
1649 #define _C2CH0 0x01
1650 #define _C2CH1 0x02
1651 #define _C2R 0x04
1652 #define _C2POL 0x10
1653 #define _C2OE 0x20
1654 #define _C2OUT 0x40
1655 #define _C2ON 0x80
1657 //==============================================================================
1660 //==============================================================================
1661 // CM2CON1 Bits
1663 extern __at(0x011B) __sfr CM2CON1;
1665 typedef struct
1667 unsigned C2SYNC : 1;
1668 unsigned T1GSS : 1;
1669 unsigned : 1;
1670 unsigned : 1;
1671 unsigned : 1;
1672 unsigned : 1;
1673 unsigned MC2OUT : 1;
1674 unsigned MC1OUT : 1;
1675 } __CM2CON1bits_t;
1677 extern __at(0x011B) volatile __CM2CON1bits_t CM2CON1bits;
1679 #define _C2SYNC 0x01
1680 #define _T1GSS 0x02
1681 #define _MC2OUT 0x40
1682 #define _MC1OUT 0x80
1684 //==============================================================================
1687 //==============================================================================
1688 // ANSEL Bits
1690 extern __at(0x011E) __sfr ANSEL;
1692 typedef struct
1694 unsigned ANS0 : 1;
1695 unsigned ANS1 : 1;
1696 unsigned ANS2 : 1;
1697 unsigned ANS3 : 1;
1698 unsigned ANS4 : 1;
1699 unsigned ANS5 : 1;
1700 unsigned ANS6 : 1;
1701 unsigned ANS7 : 1;
1702 } __ANSELbits_t;
1704 extern __at(0x011E) volatile __ANSELbits_t ANSELbits;
1706 #define _ANS0 0x01
1707 #define _ANS1 0x02
1708 #define _ANS2 0x04
1709 #define _ANS3 0x08
1710 #define _ANS4 0x10
1711 #define _ANS5 0x20
1712 #define _ANS6 0x40
1713 #define _ANS7 0x80
1715 //==============================================================================
1718 //==============================================================================
1719 // ANSELH Bits
1721 extern __at(0x011F) __sfr ANSELH;
1723 typedef struct
1725 unsigned ANS8 : 1;
1726 unsigned ANS9 : 1;
1727 unsigned ANS10 : 1;
1728 unsigned ANS11 : 1;
1729 unsigned : 1;
1730 unsigned : 1;
1731 unsigned : 1;
1732 unsigned : 1;
1733 } __ANSELHbits_t;
1735 extern __at(0x011F) volatile __ANSELHbits_t ANSELHbits;
1737 #define _ANS8 0x01
1738 #define _ANS9 0x02
1739 #define _ANS10 0x04
1740 #define _ANS11 0x08
1742 //==============================================================================
1745 //==============================================================================
1746 // EECON1 Bits
1748 extern __at(0x018C) __sfr EECON1;
1750 typedef struct
1752 unsigned RD : 1;
1753 unsigned WR : 1;
1754 unsigned WREN : 1;
1755 unsigned WRERR : 1;
1756 unsigned : 1;
1757 unsigned : 1;
1758 unsigned : 1;
1759 unsigned EEPGD : 1;
1760 } __EECON1bits_t;
1762 extern __at(0x018C) volatile __EECON1bits_t EECON1bits;
1764 #define _RD 0x01
1765 #define _WR 0x02
1766 #define _WREN 0x04
1767 #define _WRERR 0x08
1768 #define _EEPGD 0x80
1770 //==============================================================================
1772 extern __at(0x018D) __sfr EECON2;
1774 //==============================================================================
1775 // SRCON Bits
1777 extern __at(0x019E) __sfr SRCON;
1779 typedef union
1781 struct
1783 unsigned : 1;
1784 unsigned : 1;
1785 unsigned PULSR : 1;
1786 unsigned PULSS : 1;
1787 unsigned C2REN : 1;
1788 unsigned C1SEN : 1;
1789 unsigned SR0 : 1;
1790 unsigned SR1 : 1;
1793 struct
1795 unsigned : 6;
1796 unsigned SR : 2;
1798 } __SRCONbits_t;
1800 extern __at(0x019E) volatile __SRCONbits_t SRCONbits;
1802 #define _PULSR 0x04
1803 #define _PULSS 0x08
1804 #define _C2REN 0x10
1805 #define _C1SEN 0x20
1806 #define _SR0 0x40
1807 #define _SR1 0x80
1809 //==============================================================================
1812 //==============================================================================
1814 // Configuration Bits
1816 //==============================================================================
1818 #define _CONFIG 0x2007
1820 //----------------------------- CONFIG Options -------------------------------
1822 #define _FOSC_LP 0x3FF8 // LP oscillator: Low-power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1823 #define _LP_OSC 0x3FF8 // LP oscillator: Low-power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1824 #define _FOSC_XT 0x3FF9 // XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1825 #define _XT_OSC 0x3FF9 // XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1826 #define _FOSC_HS 0x3FFA // HS oscillator: High-speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1827 #define _HS_OSC 0x3FFA // HS oscillator: High-speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1828 #define _FOSC_EC 0x3FFB // EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN.
1829 #define _EC_OSC 0x3FFB // EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN.
1830 #define _FOSC_INTRCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1831 #define _INTRC_OSC_NOCLKOUT 0x3FFC // INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1832 #define _INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1833 #define _FOSC_INTRCCLK 0x3FFD // INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1834 #define _INTRC_OSC_CLKOUT 0x3FFD // INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1835 #define _INTOSC 0x3FFD // INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1836 #define _FOSC_EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
1837 #define _EXTRC_OSC_NOCLKOUT 0x3FFE // RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
1838 #define _EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
1839 #define _FOSC_EXTRCCLK 0x3FFF // RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
1840 #define _EXTRC_OSC_CLKOUT 0x3FFF // RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
1841 #define _EXTRC 0x3FFF // RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
1842 #define _WDTE_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
1843 #define _WDT_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
1844 #define _WDTE_ON 0x3FFF // WDT enabled.
1845 #define _WDT_ON 0x3FFF // WDT enabled.
1846 #define _PWRTE_ON 0x3FEF // PWRT enabled.
1847 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
1848 #define _MCLRE_OFF 0x3FDF // MCLR pin function is digital input, MCLR internally tied to VDD.
1849 #define _MCLRE_ON 0x3FFF // MCLR pin function is MCLR.
1850 #define _CP_ON 0x3FBF // Program memory code protection is enabled.
1851 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
1852 #define _CPD_ON 0x3F7F // Data memory code protection is enabled.
1853 #define _CPD_OFF 0x3FFF // Data memory code protection is disabled.
1854 #define _BOREN_OFF 0x3CFF // BOR disabled.
1855 #define _BOD_OFF 0x3CFF // BOR disabled.
1856 #define _BOR_OFF 0x3CFF // BOR disabled.
1857 #define _BOREN_SBODEN 0x3DFF // BOR controlled by SBOREN bit of the PCON register.
1858 #define _BOD_SBODEN 0x3DFF // BOR controlled by SBOREN bit of the PCON register.
1859 #define _BOR_SBODEN 0x3DFF // BOR controlled by SBOREN bit of the PCON register.
1860 #define _BOREN_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
1861 #define _BOD_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
1862 #define _BOR_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
1863 #define _BOREN_ON 0x3FFF // BOR enabled.
1864 #define _BOD_ON 0x3FFF // BOR enabled.
1865 #define _BOR_ON 0x3FFF // BOR enabled.
1866 #define _IESO_OFF 0x3BFF // Internal External Switchover mode is disabled.
1867 #define _IESO_ON 0x3FFF // Internal External Switchover mode is enabled.
1868 #define _FCMEN_OFF 0x37FF // Fail-Safe Clock Monitor is disabled.
1869 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
1871 //==============================================================================
1873 #define _DEVID1 0x2006
1875 #define _IDLOC0 0x2000
1876 #define _IDLOC1 0x2001
1877 #define _IDLOC2 0x2002
1878 #define _IDLOC3 0x2003
1880 //==============================================================================
1882 #ifndef NO_BIT_DEFINES
1884 #define ADON ADCON0bits.ADON // bit 0
1885 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
1886 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
1887 #define NOT_DONE ADCON0bits.NOT_DONE // bit 1, shadows bit in ADCON0bits
1888 #define GO_DONE ADCON0bits.GO_DONE // bit 1, shadows bit in ADCON0bits
1889 #define CHS0 ADCON0bits.CHS0 // bit 2
1890 #define CHS1 ADCON0bits.CHS1 // bit 3
1891 #define CHS2 ADCON0bits.CHS2 // bit 4
1892 #define CHS3 ADCON0bits.CHS3 // bit 5
1893 #define VCFG ADCON0bits.VCFG // bit 6
1894 #define ADFM ADCON0bits.ADFM // bit 7
1896 #define ADCS0 ADCON1bits.ADCS0 // bit 4
1897 #define ADCS1 ADCON1bits.ADCS1 // bit 5
1898 #define ADCS2 ADCON1bits.ADCS2 // bit 6
1900 #define ANS0 ANSELbits.ANS0 // bit 0
1901 #define ANS1 ANSELbits.ANS1 // bit 1
1902 #define ANS2 ANSELbits.ANS2 // bit 2
1903 #define ANS3 ANSELbits.ANS3 // bit 3
1904 #define ANS4 ANSELbits.ANS4 // bit 4
1905 #define ANS5 ANSELbits.ANS5 // bit 5
1906 #define ANS6 ANSELbits.ANS6 // bit 6
1907 #define ANS7 ANSELbits.ANS7 // bit 7
1909 #define ANS8 ANSELHbits.ANS8 // bit 0
1910 #define ANS9 ANSELHbits.ANS9 // bit 1
1911 #define ANS10 ANSELHbits.ANS10 // bit 2
1912 #define ANS11 ANSELHbits.ANS11 // bit 3
1914 #define ABDEN BAUDCTLbits.ABDEN // bit 0
1915 #define WUE BAUDCTLbits.WUE // bit 1
1916 #define BRG16 BAUDCTLbits.BRG16 // bit 3
1917 #define SCKP BAUDCTLbits.SCKP // bit 4
1918 #define RCIDL BAUDCTLbits.RCIDL // bit 6
1919 #define ABDOVF BAUDCTLbits.ABDOVF // bit 7
1921 #define C1CH0 CM1CON0bits.C1CH0 // bit 0
1922 #define C1CH1 CM1CON0bits.C1CH1 // bit 1
1923 #define C1R CM1CON0bits.C1R // bit 2
1924 #define C1POL CM1CON0bits.C1POL // bit 4
1925 #define C1OE CM1CON0bits.C1OE // bit 5
1926 #define C1OUT CM1CON0bits.C1OUT // bit 6
1927 #define C1ON CM1CON0bits.C1ON // bit 7
1929 #define C2CH0 CM2CON0bits.C2CH0 // bit 0
1930 #define C2CH1 CM2CON0bits.C2CH1 // bit 1
1931 #define C2R CM2CON0bits.C2R // bit 2
1932 #define C2POL CM2CON0bits.C2POL // bit 4
1933 #define C2OE CM2CON0bits.C2OE // bit 5
1934 #define C2OUT CM2CON0bits.C2OUT // bit 6
1935 #define C2ON CM2CON0bits.C2ON // bit 7
1937 #define C2SYNC CM2CON1bits.C2SYNC // bit 0
1938 #define T1GSS CM2CON1bits.T1GSS // bit 1
1939 #define MC2OUT CM2CON1bits.MC2OUT // bit 6
1940 #define MC1OUT CM2CON1bits.MC1OUT // bit 7
1942 #define RD EECON1bits.RD // bit 0
1943 #define WR EECON1bits.WR // bit 1
1944 #define WREN EECON1bits.WREN // bit 2
1945 #define WRERR EECON1bits.WRERR // bit 3
1946 #define EEPGD EECON1bits.EEPGD // bit 7
1948 #define RABIF INTCONbits.RABIF // bit 0
1949 #define INTF INTCONbits.INTF // bit 1
1950 #define T0IF INTCONbits.T0IF // bit 2
1951 #define RABIE INTCONbits.RABIE // bit 3
1952 #define INTE INTCONbits.INTE // bit 4
1953 #define T0IE INTCONbits.T0IE // bit 5
1954 #define PEIE INTCONbits.PEIE // bit 6
1955 #define GIE INTCONbits.GIE // bit 7
1957 #define IOCA0 IOCbits.IOCA0 // bit 0, shadows bit in IOCbits
1958 #define IOC0 IOCbits.IOC0 // bit 0, shadows bit in IOCbits
1959 #define IOCA1 IOCbits.IOCA1 // bit 1, shadows bit in IOCbits
1960 #define IOC1 IOCbits.IOC1 // bit 1, shadows bit in IOCbits
1961 #define IOCA2 IOCbits.IOCA2 // bit 2, shadows bit in IOCbits
1962 #define IOC2 IOCbits.IOC2 // bit 2, shadows bit in IOCbits
1963 #define IOCA3 IOCbits.IOCA3 // bit 3, shadows bit in IOCbits
1964 #define IOC3 IOCbits.IOC3 // bit 3, shadows bit in IOCbits
1965 #define IOCA4 IOCbits.IOCA4 // bit 4, shadows bit in IOCbits
1966 #define IOC4 IOCbits.IOC4 // bit 4, shadows bit in IOCbits
1967 #define IOCA5 IOCbits.IOCA5 // bit 5, shadows bit in IOCbits
1968 #define IOC5 IOCbits.IOC5 // bit 5, shadows bit in IOCbits
1970 #define IOCB4 IOCBbits.IOCB4 // bit 4
1971 #define IOCB5 IOCBbits.IOCB5 // bit 5
1972 #define IOCB6 IOCBbits.IOCB6 // bit 6
1973 #define IOCB7 IOCBbits.IOCB7 // bit 7
1975 #define MSK0 MSKbits.MSK0 // bit 0
1976 #define MSK1 MSKbits.MSK1 // bit 1
1977 #define MSK2 MSKbits.MSK2 // bit 2
1978 #define MSK3 MSKbits.MSK3 // bit 3
1979 #define MSK4 MSKbits.MSK4 // bit 4
1980 #define MSK5 MSKbits.MSK5 // bit 5
1981 #define MSK6 MSKbits.MSK6 // bit 6
1982 #define MSK7 MSKbits.MSK7 // bit 7
1984 #define PS0 OPTION_REGbits.PS0 // bit 0
1985 #define PS1 OPTION_REGbits.PS1 // bit 1
1986 #define PS2 OPTION_REGbits.PS2 // bit 2
1987 #define PSA OPTION_REGbits.PSA // bit 3
1988 #define T0SE OPTION_REGbits.T0SE // bit 4
1989 #define T0CS OPTION_REGbits.T0CS // bit 5
1990 #define INTEDG OPTION_REGbits.INTEDG // bit 6
1991 #define NOT_RABPU OPTION_REGbits.NOT_RABPU // bit 7
1993 #define SCS OSCCONbits.SCS // bit 0
1994 #define LTS OSCCONbits.LTS // bit 1
1995 #define HTS OSCCONbits.HTS // bit 2
1996 #define OSTS OSCCONbits.OSTS // bit 3
1997 #define IRCF0 OSCCONbits.IRCF0 // bit 4
1998 #define IRCF1 OSCCONbits.IRCF1 // bit 5
1999 #define IRCF2 OSCCONbits.IRCF2 // bit 6
2001 #define TUN0 OSCTUNEbits.TUN0 // bit 0
2002 #define TUN1 OSCTUNEbits.TUN1 // bit 1
2003 #define TUN2 OSCTUNEbits.TUN2 // bit 2
2004 #define TUN3 OSCTUNEbits.TUN3 // bit 3
2005 #define TUN4 OSCTUNEbits.TUN4 // bit 4
2007 #define NOT_BOR PCONbits.NOT_BOR // bit 0
2008 #define NOT_POR PCONbits.NOT_POR // bit 1
2009 #define SBOREN PCONbits.SBOREN // bit 4
2010 #define ULPWUE PCONbits.ULPWUE // bit 5
2012 #define TMR1IE PIE1bits.TMR1IE // bit 0, shadows bit in PIE1bits
2013 #define T1IE PIE1bits.T1IE // bit 0, shadows bit in PIE1bits
2014 #define SSPIE PIE1bits.SSPIE // bit 3
2015 #define TXIE PIE1bits.TXIE // bit 4
2016 #define RCIE PIE1bits.RCIE // bit 5
2017 #define ADIE PIE1bits.ADIE // bit 6
2019 #define EEIE PIE2bits.EEIE // bit 4
2020 #define C1IE PIE2bits.C1IE // bit 5
2021 #define C2IE PIE2bits.C2IE // bit 6
2022 #define OSFIE PIE2bits.OSFIE // bit 7
2024 #define TMR1IF PIR1bits.TMR1IF // bit 0, shadows bit in PIR1bits
2025 #define T1IF PIR1bits.T1IF // bit 0, shadows bit in PIR1bits
2026 #define SSPIF PIR1bits.SSPIF // bit 3
2027 #define TXIF PIR1bits.TXIF // bit 4
2028 #define RCIF PIR1bits.RCIF // bit 5
2029 #define ADIF PIR1bits.ADIF // bit 6
2031 #define EEIF PIR2bits.EEIF // bit 4
2032 #define C1IF PIR2bits.C1IF // bit 5
2033 #define C2IF PIR2bits.C2IF // bit 6
2034 #define OSFIF PIR2bits.OSFIF // bit 7
2036 #define RA0 PORTAbits.RA0 // bit 0
2037 #define RA1 PORTAbits.RA1 // bit 1
2038 #define RA2 PORTAbits.RA2 // bit 2
2039 #define RA3 PORTAbits.RA3 // bit 3
2040 #define RA4 PORTAbits.RA4 // bit 4
2041 #define RA5 PORTAbits.RA5 // bit 5
2043 #define RB4 PORTBbits.RB4 // bit 4
2044 #define RB5 PORTBbits.RB5 // bit 5
2045 #define RB6 PORTBbits.RB6 // bit 6
2046 #define RB7 PORTBbits.RB7 // bit 7
2048 #define RC0 PORTCbits.RC0 // bit 0
2049 #define RC1 PORTCbits.RC1 // bit 1
2050 #define RC2 PORTCbits.RC2 // bit 2
2051 #define RC3 PORTCbits.RC3 // bit 3
2052 #define RC4 PORTCbits.RC4 // bit 4
2053 #define RC5 PORTCbits.RC5 // bit 5
2054 #define RC6 PORTCbits.RC6 // bit 6
2055 #define RC7 PORTCbits.RC7 // bit 7
2057 #define RX9D RCSTAbits.RX9D // bit 0
2058 #define OERR RCSTAbits.OERR // bit 1
2059 #define FERR RCSTAbits.FERR // bit 2
2060 #define ADDEN RCSTAbits.ADDEN // bit 3
2061 #define CREN RCSTAbits.CREN // bit 4
2062 #define SREN RCSTAbits.SREN // bit 5
2063 #define RX9 RCSTAbits.RX9 // bit 6
2064 #define SPEN RCSTAbits.SPEN // bit 7
2066 #define BRG0 SPBRGbits.BRG0 // bit 0
2067 #define BRG1 SPBRGbits.BRG1 // bit 1
2068 #define BRG2 SPBRGbits.BRG2 // bit 2
2069 #define BRG3 SPBRGbits.BRG3 // bit 3
2070 #define BRG4 SPBRGbits.BRG4 // bit 4
2071 #define BRG5 SPBRGbits.BRG5 // bit 5
2072 #define BRG6 SPBRGbits.BRG6 // bit 6
2073 #define BRG7 SPBRGbits.BRG7 // bit 7
2075 #define BRG8 SPBRGHbits.BRG8 // bit 0
2076 #define BRG9 SPBRGHbits.BRG9 // bit 1
2077 #define BRG10 SPBRGHbits.BRG10 // bit 2
2078 #define BRG11 SPBRGHbits.BRG11 // bit 3
2079 #define BRG12 SPBRGHbits.BRG12 // bit 4
2080 #define BRG13 SPBRGHbits.BRG13 // bit 5
2081 #define BRG14 SPBRGHbits.BRG14 // bit 6
2082 #define BRG15 SPBRGHbits.BRG15 // bit 7
2084 #define PULSR SRCONbits.PULSR // bit 2
2085 #define PULSS SRCONbits.PULSS // bit 3
2086 #define C2REN SRCONbits.C2REN // bit 4
2087 #define C1SEN SRCONbits.C1SEN // bit 5
2088 #define SR0 SRCONbits.SR0 // bit 6
2089 #define SR1 SRCONbits.SR1 // bit 7
2091 #define SSPM0 SSPCONbits.SSPM0 // bit 0
2092 #define SSPM1 SSPCONbits.SSPM1 // bit 1
2093 #define SSPM2 SSPCONbits.SSPM2 // bit 2
2094 #define SSPM3 SSPCONbits.SSPM3 // bit 3
2095 #define CKP SSPCONbits.CKP // bit 4
2096 #define SSPEN SSPCONbits.SSPEN // bit 5
2097 #define SSPOV SSPCONbits.SSPOV // bit 6
2098 #define WCOL SSPCONbits.WCOL // bit 7
2100 #define BF SSPSTATbits.BF // bit 0
2101 #define UA SSPSTATbits.UA // bit 1
2102 #define R_NOT_W SSPSTATbits.R_NOT_W // bit 2, shadows bit in SSPSTATbits
2103 #define R SSPSTATbits.R // bit 2, shadows bit in SSPSTATbits
2104 #define I2C_READ SSPSTATbits.I2C_READ // bit 2, shadows bit in SSPSTATbits
2105 #define NOT_W SSPSTATbits.NOT_W // bit 2, shadows bit in SSPSTATbits
2106 #define NOT_WRITE SSPSTATbits.NOT_WRITE // bit 2, shadows bit in SSPSTATbits
2107 #define R_W SSPSTATbits.R_W // bit 2, shadows bit in SSPSTATbits
2108 #define READ_WRITE SSPSTATbits.READ_WRITE // bit 2, shadows bit in SSPSTATbits
2109 #define S SSPSTATbits.S // bit 3, shadows bit in SSPSTATbits
2110 #define I2C_START SSPSTATbits.I2C_START // bit 3, shadows bit in SSPSTATbits
2111 #define P SSPSTATbits.P // bit 4, shadows bit in SSPSTATbits
2112 #define I2C_STOP SSPSTATbits.I2C_STOP // bit 4, shadows bit in SSPSTATbits
2113 #define D_NOT_A SSPSTATbits.D_NOT_A // bit 5, shadows bit in SSPSTATbits
2114 #define D SSPSTATbits.D // bit 5, shadows bit in SSPSTATbits
2115 #define I2C_DATA SSPSTATbits.I2C_DATA // bit 5, shadows bit in SSPSTATbits
2116 #define NOT_A SSPSTATbits.NOT_A // bit 5, shadows bit in SSPSTATbits
2117 #define NOT_ADDRESS SSPSTATbits.NOT_ADDRESS // bit 5, shadows bit in SSPSTATbits
2118 #define D_A SSPSTATbits.D_A // bit 5, shadows bit in SSPSTATbits
2119 #define DATA_ADDRESS SSPSTATbits.DATA_ADDRESS // bit 5, shadows bit in SSPSTATbits
2120 #define CKE SSPSTATbits.CKE // bit 6
2121 #define SMP SSPSTATbits.SMP // bit 7
2123 #define C STATUSbits.C // bit 0
2124 #define DC STATUSbits.DC // bit 1
2125 #define Z STATUSbits.Z // bit 2
2126 #define NOT_PD STATUSbits.NOT_PD // bit 3
2127 #define NOT_TO STATUSbits.NOT_TO // bit 4
2128 #define RP0 STATUSbits.RP0 // bit 5
2129 #define RP1 STATUSbits.RP1 // bit 6
2130 #define IRP STATUSbits.IRP // bit 7
2132 #define TMR1ON T1CONbits.TMR1ON // bit 0
2133 #define TMR1CS T1CONbits.TMR1CS // bit 1
2134 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
2135 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
2136 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
2137 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
2138 #define TMR1GE T1CONbits.TMR1GE // bit 6
2139 #define T1GINV T1CONbits.T1GINV // bit 7
2141 #define TRISA0 TRISAbits.TRISA0 // bit 0
2142 #define TRISA1 TRISAbits.TRISA1 // bit 1
2143 #define TRISA2 TRISAbits.TRISA2 // bit 2
2144 #define TRISA3 TRISAbits.TRISA3 // bit 3
2145 #define TRISA4 TRISAbits.TRISA4 // bit 4
2146 #define TRISA5 TRISAbits.TRISA5 // bit 5
2148 #define TRISB4 TRISBbits.TRISB4 // bit 4
2149 #define TRISB5 TRISBbits.TRISB5 // bit 5
2150 #define TRISB6 TRISBbits.TRISB6 // bit 6
2151 #define TRISB7 TRISBbits.TRISB7 // bit 7
2153 #define TRISC0 TRISCbits.TRISC0 // bit 0
2154 #define TRISC1 TRISCbits.TRISC1 // bit 1
2155 #define TRISC2 TRISCbits.TRISC2 // bit 2
2156 #define TRISC3 TRISCbits.TRISC3 // bit 3
2157 #define TRISC4 TRISCbits.TRISC4 // bit 4
2158 #define TRISC5 TRISCbits.TRISC5 // bit 5
2159 #define TRISC6 TRISCbits.TRISC6 // bit 6
2160 #define TRISC7 TRISCbits.TRISC7 // bit 7
2162 #define TX9D TXSTAbits.TX9D // bit 0
2163 #define TRMT TXSTAbits.TRMT // bit 1
2164 #define BRGH TXSTAbits.BRGH // bit 2
2165 #define SENDB TXSTAbits.SENDB // bit 3, shadows bit in TXSTAbits
2166 #define SENB TXSTAbits.SENB // bit 3, shadows bit in TXSTAbits
2167 #define SYNC TXSTAbits.SYNC // bit 4
2168 #define TXEN TXSTAbits.TXEN // bit 5
2169 #define TX9 TXSTAbits.TX9 // bit 6
2170 #define CSRC TXSTAbits.CSRC // bit 7
2172 #define VR0 VRCONbits.VR0 // bit 0
2173 #define VR1 VRCONbits.VR1 // bit 1
2174 #define VR2 VRCONbits.VR2 // bit 2
2175 #define VR3 VRCONbits.VR3 // bit 3
2176 #define VP6EN VRCONbits.VP6EN // bit 4
2177 #define VRR VRCONbits.VRR // bit 5
2178 #define C2VREN VRCONbits.C2VREN // bit 6
2179 #define C1VREN VRCONbits.C1VREN // bit 7
2181 #define SWDTEN WDTCONbits.SWDTEN // bit 0
2182 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
2183 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
2184 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
2185 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
2187 #define WPUA0 WPUbits.WPUA0 // bit 0, shadows bit in WPUbits
2188 #define WPU0 WPUbits.WPU0 // bit 0, shadows bit in WPUbits
2189 #define WPUA1 WPUbits.WPUA1 // bit 1, shadows bit in WPUbits
2190 #define WPU1 WPUbits.WPU1 // bit 1, shadows bit in WPUbits
2191 #define WPUA2 WPUbits.WPUA2 // bit 2, shadows bit in WPUbits
2192 #define WPU2 WPUbits.WPU2 // bit 2, shadows bit in WPUbits
2193 #define WPUA4 WPUbits.WPUA4 // bit 4, shadows bit in WPUbits
2194 #define WPU4 WPUbits.WPU4 // bit 4, shadows bit in WPUbits
2195 #define WPUA5 WPUbits.WPUA5 // bit 5, shadows bit in WPUbits
2196 #define WPU5 WPUbits.WPU5 // bit 5, shadows bit in WPUbits
2198 #define WPUB4 WPUBbits.WPUB4 // bit 4
2199 #define WPUB5 WPUBbits.WPUB5 // bit 5
2200 #define WPUB6 WPUBbits.WPUB6 // bit 6
2201 #define WPUB7 WPUBbits.WPUB7 // bit 7
2203 #endif // #ifndef NO_BIT_DEFINES
2205 #endif // #ifndef __PIC16F689_H__