Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16lf1907.h
blobaf30730292e7af68f8f91ecd337e6c02b390f3de
1 /*
2 * This declarations of the PIC16LF1907 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:21 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 __PIC16LF1907_H__
26 #define __PIC16LF1907_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF0_ADDR 0x0000
37 #define INDF1_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR0_ADDR 0x0004
41 #define FSR0L_ADDR 0x0004
42 #define FSR0H_ADDR 0x0005
43 #define FSR1_ADDR 0x0006
44 #define FSR1L_ADDR 0x0006
45 #define FSR1H_ADDR 0x0007
46 #define BSR_ADDR 0x0008
47 #define WREG_ADDR 0x0009
48 #define PCLATH_ADDR 0x000A
49 #define INTCON_ADDR 0x000B
50 #define PORTA_ADDR 0x000C
51 #define PORTB_ADDR 0x000D
52 #define PORTC_ADDR 0x000E
53 #define PORTD_ADDR 0x000F
54 #define PORTE_ADDR 0x0010
55 #define PIR1_ADDR 0x0011
56 #define PIR2_ADDR 0x0012
57 #define TMR0_ADDR 0x0015
58 #define TMR1_ADDR 0x0016
59 #define TMR1L_ADDR 0x0016
60 #define TMR1H_ADDR 0x0017
61 #define T1CON_ADDR 0x0018
62 #define T1GCON_ADDR 0x0019
63 #define TRISA_ADDR 0x008C
64 #define TRISB_ADDR 0x008D
65 #define TRISC_ADDR 0x008E
66 #define TRISD_ADDR 0x008F
67 #define TRISE_ADDR 0x0090
68 #define PIE1_ADDR 0x0091
69 #define PIE2_ADDR 0x0092
70 #define OPTION_REG_ADDR 0x0095
71 #define PCON_ADDR 0x0096
72 #define WDTCON_ADDR 0x0097
73 #define OSCCON_ADDR 0x0099
74 #define OSCSTAT_ADDR 0x009A
75 #define ADRES_ADDR 0x009B
76 #define ADRESL_ADDR 0x009B
77 #define ADRESH_ADDR 0x009C
78 #define ADCON0_ADDR 0x009D
79 #define ADCON1_ADDR 0x009E
80 #define LATA_ADDR 0x010C
81 #define LATB_ADDR 0x010D
82 #define LATC_ADDR 0x010E
83 #define LATD_ADDR 0x010F
84 #define LATE_ADDR 0x0110
85 #define BORCON_ADDR 0x0116
86 #define FVRCON_ADDR 0x0117
87 #define ANSELA_ADDR 0x018C
88 #define ANSELB_ADDR 0x018D
89 #define ANSELE_ADDR 0x0190
90 #define PMADR_ADDR 0x0191
91 #define PMADRL_ADDR 0x0191
92 #define PMADRH_ADDR 0x0192
93 #define PMDAT_ADDR 0x0193
94 #define PMDATL_ADDR 0x0193
95 #define PMDATH_ADDR 0x0194
96 #define PMCON1_ADDR 0x0195
97 #define PMCON2_ADDR 0x0196
98 #define RC1REG_ADDR 0x0199
99 #define RCREG_ADDR 0x0199
100 #define RCREG1_ADDR 0x0199
101 #define TX1REG_ADDR 0x019A
102 #define TXREG_ADDR 0x019A
103 #define TXREG1_ADDR 0x019A
104 #define SP1BRG_ADDR 0x019B
105 #define SP1BRGL_ADDR 0x019B
106 #define SPBRG_ADDR 0x019B
107 #define SPBRGL_ADDR 0x019B
108 #define SPBRGL1_ADDR 0x019B
109 #define SP1BRGH_ADDR 0x019C
110 #define SPBRGH_ADDR 0x019C
111 #define SPBRGH1_ADDR 0x019C
112 #define RC1STA_ADDR 0x019D
113 #define RCSTA_ADDR 0x019D
114 #define RCSTA1_ADDR 0x019D
115 #define TX1STA_ADDR 0x019E
116 #define TXSTA_ADDR 0x019E
117 #define TXSTA1_ADDR 0x019E
118 #define BAUD1CON_ADDR 0x019F
119 #define BAUDCON_ADDR 0x019F
120 #define BAUDCON1_ADDR 0x019F
121 #define WPUB_ADDR 0x020D
122 #define WPUE_ADDR 0x0210
123 #define IOCBP_ADDR 0x0394
124 #define IOCBN_ADDR 0x0395
125 #define IOCBF_ADDR 0x0396
126 #define LCDCON_ADDR 0x0791
127 #define LCDPS_ADDR 0x0792
128 #define LCDREF_ADDR 0x0793
129 #define LCDCST_ADDR 0x0794
130 #define LCDRL_ADDR 0x0795
131 #define LCDSE0_ADDR 0x0798
132 #define LCDSE1_ADDR 0x0799
133 #define LCDSE2_ADDR 0x079A
134 #define LCDSE3_ADDR 0x079B
135 #define LCDDATA0_ADDR 0x07A0
136 #define LCDDATA1_ADDR 0x07A1
137 #define LCDDATA2_ADDR 0x07A2
138 #define LCDDATA3_ADDR 0x07A3
139 #define LCDDATA4_ADDR 0x07A4
140 #define LCDDATA5_ADDR 0x07A5
141 #define LCDDATA6_ADDR 0x07A6
142 #define LCDDATA7_ADDR 0x07A7
143 #define LCDDATA8_ADDR 0x07A8
144 #define LCDDATA9_ADDR 0x07A9
145 #define LCDDATA10_ADDR 0x07AA
146 #define LCDDATA11_ADDR 0x07AB
147 #define LCDDATA12_ADDR 0x07AC
148 #define LCDDATA15_ADDR 0x07AF
149 #define LCDDATA18_ADDR 0x07B2
150 #define LCDDATA21_ADDR 0x07B5
151 #define STATUS_SHAD_ADDR 0x0FE4
152 #define WREG_SHAD_ADDR 0x0FE5
153 #define BSR_SHAD_ADDR 0x0FE6
154 #define PCLATH_SHAD_ADDR 0x0FE7
155 #define FSR0L_SHAD_ADDR 0x0FE8
156 #define FSR0H_SHAD_ADDR 0x0FE9
157 #define FSR1L_SHAD_ADDR 0x0FEA
158 #define FSR1H_SHAD_ADDR 0x0FEB
159 #define STKPTR_ADDR 0x0FED
160 #define TOSL_ADDR 0x0FEE
161 #define TOSH_ADDR 0x0FEF
163 #endif // #ifndef NO_ADDR_DEFINES
165 //==============================================================================
167 // Register Definitions
169 //==============================================================================
171 extern __at(0x0000) __sfr INDF0;
172 extern __at(0x0001) __sfr INDF1;
173 extern __at(0x0002) __sfr PCL;
175 //==============================================================================
176 // STATUS Bits
178 extern __at(0x0003) __sfr STATUS;
180 typedef struct
182 unsigned C : 1;
183 unsigned DC : 1;
184 unsigned Z : 1;
185 unsigned NOT_PD : 1;
186 unsigned NOT_TO : 1;
187 unsigned : 1;
188 unsigned : 1;
189 unsigned : 1;
190 } __STATUSbits_t;
192 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
194 #define _C 0x01
195 #define _DC 0x02
196 #define _Z 0x04
197 #define _NOT_PD 0x08
198 #define _NOT_TO 0x10
200 //==============================================================================
202 extern __at(0x0004) __sfr FSR0;
203 extern __at(0x0004) __sfr FSR0L;
204 extern __at(0x0005) __sfr FSR0H;
205 extern __at(0x0006) __sfr FSR1;
206 extern __at(0x0006) __sfr FSR1L;
207 extern __at(0x0007) __sfr FSR1H;
209 //==============================================================================
210 // BSR Bits
212 extern __at(0x0008) __sfr BSR;
214 typedef union
216 struct
218 unsigned BSR0 : 1;
219 unsigned BSR1 : 1;
220 unsigned BSR2 : 1;
221 unsigned BSR3 : 1;
222 unsigned BSR4 : 1;
223 unsigned : 1;
224 unsigned : 1;
225 unsigned : 1;
228 struct
230 unsigned BSR : 5;
231 unsigned : 3;
233 } __BSRbits_t;
235 extern __at(0x0008) volatile __BSRbits_t BSRbits;
237 #define _BSR0 0x01
238 #define _BSR1 0x02
239 #define _BSR2 0x04
240 #define _BSR3 0x08
241 #define _BSR4 0x10
243 //==============================================================================
245 extern __at(0x0009) __sfr WREG;
246 extern __at(0x000A) __sfr PCLATH;
248 //==============================================================================
249 // INTCON Bits
251 extern __at(0x000B) __sfr INTCON;
253 typedef union
255 struct
257 unsigned IOCIF : 1;
258 unsigned INTF : 1;
259 unsigned TMR0IF : 1;
260 unsigned IOCIE : 1;
261 unsigned INTE : 1;
262 unsigned TMR0IE : 1;
263 unsigned PEIE : 1;
264 unsigned GIE : 1;
267 struct
269 unsigned : 1;
270 unsigned : 1;
271 unsigned T0IF : 1;
272 unsigned : 1;
273 unsigned : 1;
274 unsigned T0IE : 1;
275 unsigned : 1;
276 unsigned : 1;
278 } __INTCONbits_t;
280 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
282 #define _IOCIF 0x01
283 #define _INTF 0x02
284 #define _TMR0IF 0x04
285 #define _T0IF 0x04
286 #define _IOCIE 0x08
287 #define _INTE 0x10
288 #define _TMR0IE 0x20
289 #define _T0IE 0x20
290 #define _PEIE 0x40
291 #define _GIE 0x80
293 //==============================================================================
296 //==============================================================================
297 // PORTA Bits
299 extern __at(0x000C) __sfr PORTA;
301 typedef struct
303 unsigned RA0 : 1;
304 unsigned RA1 : 1;
305 unsigned RA2 : 1;
306 unsigned RA3 : 1;
307 unsigned RA4 : 1;
308 unsigned RA5 : 1;
309 unsigned RA6 : 1;
310 unsigned RA7 : 1;
311 } __PORTAbits_t;
313 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
315 #define _RA0 0x01
316 #define _RA1 0x02
317 #define _RA2 0x04
318 #define _RA3 0x08
319 #define _RA4 0x10
320 #define _RA5 0x20
321 #define _RA6 0x40
322 #define _RA7 0x80
324 //==============================================================================
327 //==============================================================================
328 // PORTB Bits
330 extern __at(0x000D) __sfr PORTB;
332 typedef struct
334 unsigned RB0 : 1;
335 unsigned RB1 : 1;
336 unsigned RB2 : 1;
337 unsigned RB3 : 1;
338 unsigned RB4 : 1;
339 unsigned RB5 : 1;
340 unsigned RB6 : 1;
341 unsigned RB7 : 1;
342 } __PORTBbits_t;
344 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
346 #define _RB0 0x01
347 #define _RB1 0x02
348 #define _RB2 0x04
349 #define _RB3 0x08
350 #define _RB4 0x10
351 #define _RB5 0x20
352 #define _RB6 0x40
353 #define _RB7 0x80
355 //==============================================================================
358 //==============================================================================
359 // PORTC Bits
361 extern __at(0x000E) __sfr PORTC;
363 typedef struct
365 unsigned RC0 : 1;
366 unsigned RC1 : 1;
367 unsigned RC2 : 1;
368 unsigned RC3 : 1;
369 unsigned RC4 : 1;
370 unsigned RC5 : 1;
371 unsigned RC6 : 1;
372 unsigned RC7 : 1;
373 } __PORTCbits_t;
375 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
377 #define _RC0 0x01
378 #define _RC1 0x02
379 #define _RC2 0x04
380 #define _RC3 0x08
381 #define _RC4 0x10
382 #define _RC5 0x20
383 #define _RC6 0x40
384 #define _RC7 0x80
386 //==============================================================================
389 //==============================================================================
390 // PORTD Bits
392 extern __at(0x000F) __sfr PORTD;
394 typedef struct
396 unsigned RD0 : 1;
397 unsigned RD1 : 1;
398 unsigned RD2 : 1;
399 unsigned RD3 : 1;
400 unsigned RD4 : 1;
401 unsigned RD5 : 1;
402 unsigned RD6 : 1;
403 unsigned RD7 : 1;
404 } __PORTDbits_t;
406 extern __at(0x000F) volatile __PORTDbits_t PORTDbits;
408 #define _RD0 0x01
409 #define _RD1 0x02
410 #define _RD2 0x04
411 #define _RD3 0x08
412 #define _RD4 0x10
413 #define _RD5 0x20
414 #define _RD6 0x40
415 #define _RD7 0x80
417 //==============================================================================
420 //==============================================================================
421 // PORTE Bits
423 extern __at(0x0010) __sfr PORTE;
425 typedef union
427 struct
429 unsigned RE0 : 1;
430 unsigned RE1 : 1;
431 unsigned RE2 : 1;
432 unsigned RE3 : 1;
433 unsigned : 1;
434 unsigned : 1;
435 unsigned : 1;
436 unsigned : 1;
439 struct
441 unsigned RE : 4;
442 unsigned : 4;
444 } __PORTEbits_t;
446 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
448 #define _RE0 0x01
449 #define _RE1 0x02
450 #define _RE2 0x04
451 #define _RE3 0x08
453 //==============================================================================
456 //==============================================================================
457 // PIR1 Bits
459 extern __at(0x0011) __sfr PIR1;
461 typedef struct
463 unsigned TMR1IF : 1;
464 unsigned : 1;
465 unsigned : 1;
466 unsigned : 1;
467 unsigned TXIF : 1;
468 unsigned RCIF : 1;
469 unsigned ADIF : 1;
470 unsigned TMR1GIF : 1;
471 } __PIR1bits_t;
473 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
475 #define _TMR1IF 0x01
476 #define _TXIF 0x10
477 #define _RCIF 0x20
478 #define _ADIF 0x40
479 #define _TMR1GIF 0x80
481 //==============================================================================
484 //==============================================================================
485 // PIR2 Bits
487 extern __at(0x0012) __sfr PIR2;
489 typedef struct
491 unsigned : 1;
492 unsigned : 1;
493 unsigned LCDIF : 1;
494 unsigned : 1;
495 unsigned : 1;
496 unsigned : 1;
497 unsigned : 1;
498 unsigned : 1;
499 } __PIR2bits_t;
501 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
503 #define _LCDIF 0x04
505 //==============================================================================
507 extern __at(0x0015) __sfr TMR0;
508 extern __at(0x0016) __sfr TMR1;
509 extern __at(0x0016) __sfr TMR1L;
510 extern __at(0x0017) __sfr TMR1H;
512 //==============================================================================
513 // T1CON Bits
515 extern __at(0x0018) __sfr T1CON;
517 typedef union
519 struct
521 unsigned TMR1ON : 1;
522 unsigned : 1;
523 unsigned NOT_T1SYNC : 1;
524 unsigned T1OSCEN : 1;
525 unsigned T1CKPS0 : 1;
526 unsigned T1CKPS1 : 1;
527 unsigned TMR1CS0 : 1;
528 unsigned TMR1CS1 : 1;
531 struct
533 unsigned : 4;
534 unsigned T1CKPS : 2;
535 unsigned : 2;
538 struct
540 unsigned : 6;
541 unsigned TMR1CS : 2;
543 } __T1CONbits_t;
545 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
547 #define _TMR1ON 0x01
548 #define _NOT_T1SYNC 0x04
549 #define _T1OSCEN 0x08
550 #define _T1CKPS0 0x10
551 #define _T1CKPS1 0x20
552 #define _TMR1CS0 0x40
553 #define _TMR1CS1 0x80
555 //==============================================================================
558 //==============================================================================
559 // T1GCON Bits
561 extern __at(0x0019) __sfr T1GCON;
563 typedef union
565 struct
567 unsigned T1GSS0 : 1;
568 unsigned T1GSS1 : 1;
569 unsigned T1GVAL : 1;
570 unsigned T1GGO_NOT_DONE : 1;
571 unsigned T1GSPM : 1;
572 unsigned T1GTM : 1;
573 unsigned T1GPOL : 1;
574 unsigned TMR1GE : 1;
577 struct
579 unsigned : 1;
580 unsigned : 1;
581 unsigned : 1;
582 unsigned T1GGO : 1;
583 unsigned : 1;
584 unsigned : 1;
585 unsigned : 1;
586 unsigned : 1;
589 struct
591 unsigned T1GSS : 2;
592 unsigned : 6;
594 } __T1GCONbits_t;
596 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
598 #define _T1GSS0 0x01
599 #define _T1GSS1 0x02
600 #define _T1GVAL 0x04
601 #define _T1GGO_NOT_DONE 0x08
602 #define _T1GGO 0x08
603 #define _T1GSPM 0x10
604 #define _T1GTM 0x20
605 #define _T1GPOL 0x40
606 #define _TMR1GE 0x80
608 //==============================================================================
611 //==============================================================================
612 // TRISA Bits
614 extern __at(0x008C) __sfr TRISA;
616 typedef struct
618 unsigned TRISA0 : 1;
619 unsigned TRISA1 : 1;
620 unsigned TRISA2 : 1;
621 unsigned TRISA3 : 1;
622 unsigned TRISA4 : 1;
623 unsigned TRISA5 : 1;
624 unsigned TRISA6 : 1;
625 unsigned TRISA7 : 1;
626 } __TRISAbits_t;
628 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
630 #define _TRISA0 0x01
631 #define _TRISA1 0x02
632 #define _TRISA2 0x04
633 #define _TRISA3 0x08
634 #define _TRISA4 0x10
635 #define _TRISA5 0x20
636 #define _TRISA6 0x40
637 #define _TRISA7 0x80
639 //==============================================================================
642 //==============================================================================
643 // TRISB Bits
645 extern __at(0x008D) __sfr TRISB;
647 typedef struct
649 unsigned TRISB0 : 1;
650 unsigned TRISB1 : 1;
651 unsigned TRISB2 : 1;
652 unsigned TRISB3 : 1;
653 unsigned TRISB4 : 1;
654 unsigned TRISB5 : 1;
655 unsigned TRISB6 : 1;
656 unsigned TRISB7 : 1;
657 } __TRISBbits_t;
659 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
661 #define _TRISB0 0x01
662 #define _TRISB1 0x02
663 #define _TRISB2 0x04
664 #define _TRISB3 0x08
665 #define _TRISB4 0x10
666 #define _TRISB5 0x20
667 #define _TRISB6 0x40
668 #define _TRISB7 0x80
670 //==============================================================================
673 //==============================================================================
674 // TRISC Bits
676 extern __at(0x008E) __sfr TRISC;
678 typedef struct
680 unsigned TRISC0 : 1;
681 unsigned TRISC1 : 1;
682 unsigned TRISC2 : 1;
683 unsigned TRISC3 : 1;
684 unsigned TRISC4 : 1;
685 unsigned TRISC5 : 1;
686 unsigned TRISC6 : 1;
687 unsigned TRISC7 : 1;
688 } __TRISCbits_t;
690 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
692 #define _TRISC0 0x01
693 #define _TRISC1 0x02
694 #define _TRISC2 0x04
695 #define _TRISC3 0x08
696 #define _TRISC4 0x10
697 #define _TRISC5 0x20
698 #define _TRISC6 0x40
699 #define _TRISC7 0x80
701 //==============================================================================
704 //==============================================================================
705 // TRISD Bits
707 extern __at(0x008F) __sfr TRISD;
709 typedef struct
711 unsigned TRISD0 : 1;
712 unsigned TRISD1 : 1;
713 unsigned TRISD2 : 1;
714 unsigned TRISD3 : 1;
715 unsigned TRISD4 : 1;
716 unsigned TRISD5 : 1;
717 unsigned TRISD6 : 1;
718 unsigned TRISD7 : 1;
719 } __TRISDbits_t;
721 extern __at(0x008F) volatile __TRISDbits_t TRISDbits;
723 #define _TRISD0 0x01
724 #define _TRISD1 0x02
725 #define _TRISD2 0x04
726 #define _TRISD3 0x08
727 #define _TRISD4 0x10
728 #define _TRISD5 0x20
729 #define _TRISD6 0x40
730 #define _TRISD7 0x80
732 //==============================================================================
735 //==============================================================================
736 // TRISE Bits
738 extern __at(0x0090) __sfr TRISE;
740 typedef union
742 struct
744 unsigned TRISE0 : 1;
745 unsigned TRISE1 : 1;
746 unsigned TRISE2 : 1;
747 unsigned : 1;
748 unsigned : 1;
749 unsigned : 1;
750 unsigned : 1;
751 unsigned : 1;
754 struct
756 unsigned TRISE : 3;
757 unsigned : 5;
759 } __TRISEbits_t;
761 extern __at(0x0090) volatile __TRISEbits_t TRISEbits;
763 #define _TRISE0 0x01
764 #define _TRISE1 0x02
765 #define _TRISE2 0x04
767 //==============================================================================
770 //==============================================================================
771 // PIE1 Bits
773 extern __at(0x0091) __sfr PIE1;
775 typedef struct
777 unsigned TMR1IE : 1;
778 unsigned : 1;
779 unsigned : 1;
780 unsigned : 1;
781 unsigned TXIE : 1;
782 unsigned RCIE : 1;
783 unsigned ADIE : 1;
784 unsigned TMR1GIE : 1;
785 } __PIE1bits_t;
787 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
789 #define _TMR1IE 0x01
790 #define _TXIE 0x10
791 #define _RCIE 0x20
792 #define _ADIE 0x40
793 #define _TMR1GIE 0x80
795 //==============================================================================
798 //==============================================================================
799 // PIE2 Bits
801 extern __at(0x0092) __sfr PIE2;
803 typedef struct
805 unsigned : 1;
806 unsigned : 1;
807 unsigned LCDIE : 1;
808 unsigned : 1;
809 unsigned : 1;
810 unsigned : 1;
811 unsigned : 1;
812 unsigned : 1;
813 } __PIE2bits_t;
815 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
817 #define _LCDIE 0x04
819 //==============================================================================
822 //==============================================================================
823 // OPTION_REG Bits
825 extern __at(0x0095) __sfr OPTION_REG;
827 typedef union
829 struct
831 unsigned PS0 : 1;
832 unsigned PS1 : 1;
833 unsigned PS2 : 1;
834 unsigned PSA : 1;
835 unsigned TMR0SE : 1;
836 unsigned TMR0CS : 1;
837 unsigned INTEDG : 1;
838 unsigned NOT_WPUEN : 1;
841 struct
843 unsigned : 1;
844 unsigned : 1;
845 unsigned : 1;
846 unsigned : 1;
847 unsigned T0SE : 1;
848 unsigned T0CS : 1;
849 unsigned : 1;
850 unsigned : 1;
853 struct
855 unsigned PS : 3;
856 unsigned : 5;
858 } __OPTION_REGbits_t;
860 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
862 #define _PS0 0x01
863 #define _PS1 0x02
864 #define _PS2 0x04
865 #define _PSA 0x08
866 #define _TMR0SE 0x10
867 #define _T0SE 0x10
868 #define _TMR0CS 0x20
869 #define _T0CS 0x20
870 #define _INTEDG 0x40
871 #define _NOT_WPUEN 0x80
873 //==============================================================================
876 //==============================================================================
877 // PCON Bits
879 extern __at(0x0096) __sfr PCON;
881 typedef struct
883 unsigned NOT_BOR : 1;
884 unsigned NOT_POR : 1;
885 unsigned NOT_RI : 1;
886 unsigned NOT_RMCLR : 1;
887 unsigned NOT_RWDT : 1;
888 unsigned : 1;
889 unsigned STKUNF : 1;
890 unsigned STKOVF : 1;
891 } __PCONbits_t;
893 extern __at(0x0096) volatile __PCONbits_t PCONbits;
895 #define _NOT_BOR 0x01
896 #define _NOT_POR 0x02
897 #define _NOT_RI 0x04
898 #define _NOT_RMCLR 0x08
899 #define _NOT_RWDT 0x10
900 #define _STKUNF 0x40
901 #define _STKOVF 0x80
903 //==============================================================================
906 //==============================================================================
907 // WDTCON Bits
909 extern __at(0x0097) __sfr WDTCON;
911 typedef union
913 struct
915 unsigned SWDTEN : 1;
916 unsigned WDTPS0 : 1;
917 unsigned WDTPS1 : 1;
918 unsigned WDTPS2 : 1;
919 unsigned WDTPS3 : 1;
920 unsigned WDTPS4 : 1;
921 unsigned : 1;
922 unsigned : 1;
925 struct
927 unsigned : 1;
928 unsigned WDTPS : 5;
929 unsigned : 2;
931 } __WDTCONbits_t;
933 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
935 #define _SWDTEN 0x01
936 #define _WDTPS0 0x02
937 #define _WDTPS1 0x04
938 #define _WDTPS2 0x08
939 #define _WDTPS3 0x10
940 #define _WDTPS4 0x20
942 //==============================================================================
945 //==============================================================================
946 // OSCCON Bits
948 extern __at(0x0099) __sfr OSCCON;
950 typedef union
952 struct
954 unsigned SCS0 : 1;
955 unsigned SCS1 : 1;
956 unsigned : 1;
957 unsigned IRCF0 : 1;
958 unsigned IRCF1 : 1;
959 unsigned IRCF2 : 1;
960 unsigned IRCF3 : 1;
961 unsigned : 1;
964 struct
966 unsigned SCS : 2;
967 unsigned : 6;
970 struct
972 unsigned : 3;
973 unsigned IRCF : 4;
974 unsigned : 1;
976 } __OSCCONbits_t;
978 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
980 #define _SCS0 0x01
981 #define _SCS1 0x02
982 #define _IRCF0 0x08
983 #define _IRCF1 0x10
984 #define _IRCF2 0x20
985 #define _IRCF3 0x40
987 //==============================================================================
990 //==============================================================================
991 // OSCSTAT Bits
993 extern __at(0x009A) __sfr OSCSTAT;
995 typedef struct
997 unsigned HFIOFS : 1;
998 unsigned LFIOFR : 1;
999 unsigned : 1;
1000 unsigned : 1;
1001 unsigned HFIOFR : 1;
1002 unsigned OSTS : 1;
1003 unsigned : 1;
1004 unsigned T1OSCR : 1;
1005 } __OSCSTATbits_t;
1007 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1009 #define _HFIOFS 0x01
1010 #define _LFIOFR 0x02
1011 #define _HFIOFR 0x10
1012 #define _OSTS 0x20
1013 #define _T1OSCR 0x80
1015 //==============================================================================
1017 extern __at(0x009B) __sfr ADRES;
1018 extern __at(0x009B) __sfr ADRESL;
1019 extern __at(0x009C) __sfr ADRESH;
1021 //==============================================================================
1022 // ADCON0 Bits
1024 extern __at(0x009D) __sfr ADCON0;
1026 typedef union
1028 struct
1030 unsigned ADON : 1;
1031 unsigned GO_NOT_DONE : 1;
1032 unsigned CHS0 : 1;
1033 unsigned CHS1 : 1;
1034 unsigned CHS2 : 1;
1035 unsigned CHS3 : 1;
1036 unsigned CHS4 : 1;
1037 unsigned : 1;
1040 struct
1042 unsigned : 1;
1043 unsigned ADGO : 1;
1044 unsigned : 1;
1045 unsigned : 1;
1046 unsigned : 1;
1047 unsigned : 1;
1048 unsigned : 1;
1049 unsigned : 1;
1052 struct
1054 unsigned : 1;
1055 unsigned GO : 1;
1056 unsigned : 1;
1057 unsigned : 1;
1058 unsigned : 1;
1059 unsigned : 1;
1060 unsigned : 1;
1061 unsigned : 1;
1064 struct
1066 unsigned : 1;
1067 unsigned NOT_DONE : 1;
1068 unsigned : 1;
1069 unsigned : 1;
1070 unsigned : 1;
1071 unsigned : 1;
1072 unsigned : 1;
1073 unsigned : 1;
1076 struct
1078 unsigned : 2;
1079 unsigned CHS : 5;
1080 unsigned : 1;
1082 } __ADCON0bits_t;
1084 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1086 #define _ADON 0x01
1087 #define _GO_NOT_DONE 0x02
1088 #define _ADGO 0x02
1089 #define _GO 0x02
1090 #define _NOT_DONE 0x02
1091 #define _CHS0 0x04
1092 #define _CHS1 0x08
1093 #define _CHS2 0x10
1094 #define _CHS3 0x20
1095 #define _CHS4 0x40
1097 //==============================================================================
1100 //==============================================================================
1101 // ADCON1 Bits
1103 extern __at(0x009E) __sfr ADCON1;
1105 typedef union
1107 struct
1109 unsigned ADPREF0 : 1;
1110 unsigned ADPREF1 : 1;
1111 unsigned : 1;
1112 unsigned : 1;
1113 unsigned ADCS0 : 1;
1114 unsigned ADCS1 : 1;
1115 unsigned ADCS2 : 1;
1116 unsigned ADFM : 1;
1119 struct
1121 unsigned ADPREF : 2;
1122 unsigned : 6;
1125 struct
1127 unsigned : 4;
1128 unsigned ADCS : 3;
1129 unsigned : 1;
1131 } __ADCON1bits_t;
1133 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1135 #define _ADPREF0 0x01
1136 #define _ADPREF1 0x02
1137 #define _ADCS0 0x10
1138 #define _ADCS1 0x20
1139 #define _ADCS2 0x40
1140 #define _ADFM 0x80
1142 //==============================================================================
1145 //==============================================================================
1146 // LATA Bits
1148 extern __at(0x010C) __sfr LATA;
1150 typedef struct
1152 unsigned LATA0 : 1;
1153 unsigned LATA1 : 1;
1154 unsigned LATA2 : 1;
1155 unsigned LATA3 : 1;
1156 unsigned LATA4 : 1;
1157 unsigned LATA5 : 1;
1158 unsigned LATA6 : 1;
1159 unsigned LATA7 : 1;
1160 } __LATAbits_t;
1162 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1164 #define _LATA0 0x01
1165 #define _LATA1 0x02
1166 #define _LATA2 0x04
1167 #define _LATA3 0x08
1168 #define _LATA4 0x10
1169 #define _LATA5 0x20
1170 #define _LATA6 0x40
1171 #define _LATA7 0x80
1173 //==============================================================================
1176 //==============================================================================
1177 // LATB Bits
1179 extern __at(0x010D) __sfr LATB;
1181 typedef struct
1183 unsigned LATB0 : 1;
1184 unsigned LATB1 : 1;
1185 unsigned LATB2 : 1;
1186 unsigned LATB3 : 1;
1187 unsigned LATB4 : 1;
1188 unsigned LATB5 : 1;
1189 unsigned LATB6 : 1;
1190 unsigned LATB7 : 1;
1191 } __LATBbits_t;
1193 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1195 #define _LATB0 0x01
1196 #define _LATB1 0x02
1197 #define _LATB2 0x04
1198 #define _LATB3 0x08
1199 #define _LATB4 0x10
1200 #define _LATB5 0x20
1201 #define _LATB6 0x40
1202 #define _LATB7 0x80
1204 //==============================================================================
1207 //==============================================================================
1208 // LATC Bits
1210 extern __at(0x010E) __sfr LATC;
1212 typedef struct
1214 unsigned LATC0 : 1;
1215 unsigned LATC1 : 1;
1216 unsigned LATC2 : 1;
1217 unsigned LATC3 : 1;
1218 unsigned LATC4 : 1;
1219 unsigned LATC5 : 1;
1220 unsigned LATC6 : 1;
1221 unsigned LATC7 : 1;
1222 } __LATCbits_t;
1224 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1226 #define _LATC0 0x01
1227 #define _LATC1 0x02
1228 #define _LATC2 0x04
1229 #define _LATC3 0x08
1230 #define _LATC4 0x10
1231 #define _LATC5 0x20
1232 #define _LATC6 0x40
1233 #define _LATC7 0x80
1235 //==============================================================================
1238 //==============================================================================
1239 // LATD Bits
1241 extern __at(0x010F) __sfr LATD;
1243 typedef struct
1245 unsigned LATD0 : 1;
1246 unsigned LATD1 : 1;
1247 unsigned LATD2 : 1;
1248 unsigned LATD3 : 1;
1249 unsigned LATD4 : 1;
1250 unsigned LATD5 : 1;
1251 unsigned LATD6 : 1;
1252 unsigned LATD7 : 1;
1253 } __LATDbits_t;
1255 extern __at(0x010F) volatile __LATDbits_t LATDbits;
1257 #define _LATD0 0x01
1258 #define _LATD1 0x02
1259 #define _LATD2 0x04
1260 #define _LATD3 0x08
1261 #define _LATD4 0x10
1262 #define _LATD5 0x20
1263 #define _LATD6 0x40
1264 #define _LATD7 0x80
1266 //==============================================================================
1269 //==============================================================================
1270 // LATE Bits
1272 extern __at(0x0110) __sfr LATE;
1274 typedef union
1276 struct
1278 unsigned LATE0 : 1;
1279 unsigned LATE1 : 1;
1280 unsigned LATE2 : 1;
1281 unsigned : 1;
1282 unsigned : 1;
1283 unsigned : 1;
1284 unsigned : 1;
1285 unsigned : 1;
1288 struct
1290 unsigned LATE : 3;
1291 unsigned : 5;
1293 } __LATEbits_t;
1295 extern __at(0x0110) volatile __LATEbits_t LATEbits;
1297 #define _LATE0 0x01
1298 #define _LATE1 0x02
1299 #define _LATE2 0x04
1301 //==============================================================================
1304 //==============================================================================
1305 // BORCON Bits
1307 extern __at(0x0116) __sfr BORCON;
1309 typedef struct
1311 unsigned BORRDY : 1;
1312 unsigned : 1;
1313 unsigned : 1;
1314 unsigned : 1;
1315 unsigned : 1;
1316 unsigned : 1;
1317 unsigned BORFS : 1;
1318 unsigned SBOREN : 1;
1319 } __BORCONbits_t;
1321 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1323 #define _BORRDY 0x01
1324 #define _BORFS 0x40
1325 #define _SBOREN 0x80
1327 //==============================================================================
1330 //==============================================================================
1331 // FVRCON Bits
1333 extern __at(0x0117) __sfr FVRCON;
1335 typedef union
1337 struct
1339 unsigned ADFVR0 : 1;
1340 unsigned ADFVR1 : 1;
1341 unsigned : 1;
1342 unsigned : 1;
1343 unsigned TSRNG : 1;
1344 unsigned TSEN : 1;
1345 unsigned FVRRDY : 1;
1346 unsigned FVREN : 1;
1349 struct
1351 unsigned ADFVR : 2;
1352 unsigned : 6;
1354 } __FVRCONbits_t;
1356 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1358 #define _ADFVR0 0x01
1359 #define _ADFVR1 0x02
1360 #define _TSRNG 0x10
1361 #define _TSEN 0x20
1362 #define _FVRRDY 0x40
1363 #define _FVREN 0x80
1365 //==============================================================================
1368 //==============================================================================
1369 // ANSELA Bits
1371 extern __at(0x018C) __sfr ANSELA;
1373 typedef struct
1375 unsigned ANSA0 : 1;
1376 unsigned ANSA1 : 1;
1377 unsigned ANSA2 : 1;
1378 unsigned ANSA3 : 1;
1379 unsigned : 1;
1380 unsigned ANSA5 : 1;
1381 unsigned : 1;
1382 unsigned : 1;
1383 } __ANSELAbits_t;
1385 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1387 #define _ANSA0 0x01
1388 #define _ANSA1 0x02
1389 #define _ANSA2 0x04
1390 #define _ANSA3 0x08
1391 #define _ANSA5 0x20
1393 //==============================================================================
1396 //==============================================================================
1397 // ANSELB Bits
1399 extern __at(0x018D) __sfr ANSELB;
1401 typedef union
1403 struct
1405 unsigned ANSB0 : 1;
1406 unsigned ANSB1 : 1;
1407 unsigned ANSB2 : 1;
1408 unsigned ANSB3 : 1;
1409 unsigned ANSB4 : 1;
1410 unsigned ANSB5 : 1;
1411 unsigned : 1;
1412 unsigned : 1;
1415 struct
1417 unsigned ANSB : 6;
1418 unsigned : 2;
1420 } __ANSELBbits_t;
1422 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1424 #define _ANSB0 0x01
1425 #define _ANSB1 0x02
1426 #define _ANSB2 0x04
1427 #define _ANSB3 0x08
1428 #define _ANSB4 0x10
1429 #define _ANSB5 0x20
1431 //==============================================================================
1434 //==============================================================================
1435 // ANSELE Bits
1437 extern __at(0x0190) __sfr ANSELE;
1439 typedef union
1441 struct
1443 unsigned ANSE0 : 1;
1444 unsigned ANSE1 : 1;
1445 unsigned ANSE2 : 1;
1446 unsigned : 1;
1447 unsigned : 1;
1448 unsigned : 1;
1449 unsigned : 1;
1450 unsigned : 1;
1453 struct
1455 unsigned ANSE : 3;
1456 unsigned : 5;
1458 } __ANSELEbits_t;
1460 extern __at(0x0190) volatile __ANSELEbits_t ANSELEbits;
1462 #define _ANSE0 0x01
1463 #define _ANSE1 0x02
1464 #define _ANSE2 0x04
1466 //==============================================================================
1468 extern __at(0x0191) __sfr PMADR;
1469 extern __at(0x0191) __sfr PMADRL;
1470 extern __at(0x0192) __sfr PMADRH;
1471 extern __at(0x0193) __sfr PMDAT;
1472 extern __at(0x0193) __sfr PMDATL;
1473 extern __at(0x0194) __sfr PMDATH;
1475 //==============================================================================
1476 // PMCON1 Bits
1478 extern __at(0x0195) __sfr PMCON1;
1480 typedef struct
1482 unsigned RD : 1;
1483 unsigned WR : 1;
1484 unsigned WREN : 1;
1485 unsigned WRERR : 1;
1486 unsigned FREE : 1;
1487 unsigned LWLO : 1;
1488 unsigned CFGS : 1;
1489 unsigned : 1;
1490 } __PMCON1bits_t;
1492 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1494 #define _RD 0x01
1495 #define _WR 0x02
1496 #define _WREN 0x04
1497 #define _WRERR 0x08
1498 #define _FREE 0x10
1499 #define _LWLO 0x20
1500 #define _CFGS 0x40
1502 //==============================================================================
1504 extern __at(0x0196) __sfr PMCON2;
1505 extern __at(0x0199) __sfr RC1REG;
1506 extern __at(0x0199) __sfr RCREG;
1507 extern __at(0x0199) __sfr RCREG1;
1508 extern __at(0x019A) __sfr TX1REG;
1509 extern __at(0x019A) __sfr TXREG;
1510 extern __at(0x019A) __sfr TXREG1;
1511 extern __at(0x019B) __sfr SP1BRG;
1513 //==============================================================================
1514 // SP1BRGL Bits
1516 extern __at(0x019B) __sfr SP1BRGL;
1518 typedef struct
1520 unsigned BRG0 : 1;
1521 unsigned BRG1 : 1;
1522 unsigned BRG2 : 1;
1523 unsigned BRG3 : 1;
1524 unsigned BRG4 : 1;
1525 unsigned BRG5 : 1;
1526 unsigned BRG6 : 1;
1527 unsigned BRG7 : 1;
1528 } __SP1BRGLbits_t;
1530 extern __at(0x019B) volatile __SP1BRGLbits_t SP1BRGLbits;
1532 #define _BRG0 0x01
1533 #define _BRG1 0x02
1534 #define _BRG2 0x04
1535 #define _BRG3 0x08
1536 #define _BRG4 0x10
1537 #define _BRG5 0x20
1538 #define _BRG6 0x40
1539 #define _BRG7 0x80
1541 //==============================================================================
1544 //==============================================================================
1545 // SPBRG Bits
1547 extern __at(0x019B) __sfr SPBRG;
1549 typedef struct
1551 unsigned BRG0 : 1;
1552 unsigned BRG1 : 1;
1553 unsigned BRG2 : 1;
1554 unsigned BRG3 : 1;
1555 unsigned BRG4 : 1;
1556 unsigned BRG5 : 1;
1557 unsigned BRG6 : 1;
1558 unsigned BRG7 : 1;
1559 } __SPBRGbits_t;
1561 extern __at(0x019B) volatile __SPBRGbits_t SPBRGbits;
1563 #define _SPBRG_BRG0 0x01
1564 #define _SPBRG_BRG1 0x02
1565 #define _SPBRG_BRG2 0x04
1566 #define _SPBRG_BRG3 0x08
1567 #define _SPBRG_BRG4 0x10
1568 #define _SPBRG_BRG5 0x20
1569 #define _SPBRG_BRG6 0x40
1570 #define _SPBRG_BRG7 0x80
1572 //==============================================================================
1575 //==============================================================================
1576 // SPBRGL Bits
1578 extern __at(0x019B) __sfr SPBRGL;
1580 typedef struct
1582 unsigned BRG0 : 1;
1583 unsigned BRG1 : 1;
1584 unsigned BRG2 : 1;
1585 unsigned BRG3 : 1;
1586 unsigned BRG4 : 1;
1587 unsigned BRG5 : 1;
1588 unsigned BRG6 : 1;
1589 unsigned BRG7 : 1;
1590 } __SPBRGLbits_t;
1592 extern __at(0x019B) volatile __SPBRGLbits_t SPBRGLbits;
1594 #define _SPBRGL_BRG0 0x01
1595 #define _SPBRGL_BRG1 0x02
1596 #define _SPBRGL_BRG2 0x04
1597 #define _SPBRGL_BRG3 0x08
1598 #define _SPBRGL_BRG4 0x10
1599 #define _SPBRGL_BRG5 0x20
1600 #define _SPBRGL_BRG6 0x40
1601 #define _SPBRGL_BRG7 0x80
1603 //==============================================================================
1606 //==============================================================================
1607 // SPBRGL1 Bits
1609 extern __at(0x019B) __sfr SPBRGL1;
1611 typedef struct
1613 unsigned BRG0 : 1;
1614 unsigned BRG1 : 1;
1615 unsigned BRG2 : 1;
1616 unsigned BRG3 : 1;
1617 unsigned BRG4 : 1;
1618 unsigned BRG5 : 1;
1619 unsigned BRG6 : 1;
1620 unsigned BRG7 : 1;
1621 } __SPBRGL1bits_t;
1623 extern __at(0x019B) volatile __SPBRGL1bits_t SPBRGL1bits;
1625 #define _SPBRGL1_BRG0 0x01
1626 #define _SPBRGL1_BRG1 0x02
1627 #define _SPBRGL1_BRG2 0x04
1628 #define _SPBRGL1_BRG3 0x08
1629 #define _SPBRGL1_BRG4 0x10
1630 #define _SPBRGL1_BRG5 0x20
1631 #define _SPBRGL1_BRG6 0x40
1632 #define _SPBRGL1_BRG7 0x80
1634 //==============================================================================
1637 //==============================================================================
1638 // SP1BRGH Bits
1640 extern __at(0x019C) __sfr SP1BRGH;
1642 typedef struct
1644 unsigned BRG8 : 1;
1645 unsigned BRG9 : 1;
1646 unsigned BRG10 : 1;
1647 unsigned BRG11 : 1;
1648 unsigned BRG12 : 1;
1649 unsigned BRG13 : 1;
1650 unsigned BRG14 : 1;
1651 unsigned BRG15 : 1;
1652 } __SP1BRGHbits_t;
1654 extern __at(0x019C) volatile __SP1BRGHbits_t SP1BRGHbits;
1656 #define _BRG8 0x01
1657 #define _BRG9 0x02
1658 #define _BRG10 0x04
1659 #define _BRG11 0x08
1660 #define _BRG12 0x10
1661 #define _BRG13 0x20
1662 #define _BRG14 0x40
1663 #define _BRG15 0x80
1665 //==============================================================================
1668 //==============================================================================
1669 // SPBRGH Bits
1671 extern __at(0x019C) __sfr SPBRGH;
1673 typedef struct
1675 unsigned BRG8 : 1;
1676 unsigned BRG9 : 1;
1677 unsigned BRG10 : 1;
1678 unsigned BRG11 : 1;
1679 unsigned BRG12 : 1;
1680 unsigned BRG13 : 1;
1681 unsigned BRG14 : 1;
1682 unsigned BRG15 : 1;
1683 } __SPBRGHbits_t;
1685 extern __at(0x019C) volatile __SPBRGHbits_t SPBRGHbits;
1687 #define _SPBRGH_BRG8 0x01
1688 #define _SPBRGH_BRG9 0x02
1689 #define _SPBRGH_BRG10 0x04
1690 #define _SPBRGH_BRG11 0x08
1691 #define _SPBRGH_BRG12 0x10
1692 #define _SPBRGH_BRG13 0x20
1693 #define _SPBRGH_BRG14 0x40
1694 #define _SPBRGH_BRG15 0x80
1696 //==============================================================================
1699 //==============================================================================
1700 // SPBRGH1 Bits
1702 extern __at(0x019C) __sfr SPBRGH1;
1704 typedef struct
1706 unsigned BRG8 : 1;
1707 unsigned BRG9 : 1;
1708 unsigned BRG10 : 1;
1709 unsigned BRG11 : 1;
1710 unsigned BRG12 : 1;
1711 unsigned BRG13 : 1;
1712 unsigned BRG14 : 1;
1713 unsigned BRG15 : 1;
1714 } __SPBRGH1bits_t;
1716 extern __at(0x019C) volatile __SPBRGH1bits_t SPBRGH1bits;
1718 #define _SPBRGH1_BRG8 0x01
1719 #define _SPBRGH1_BRG9 0x02
1720 #define _SPBRGH1_BRG10 0x04
1721 #define _SPBRGH1_BRG11 0x08
1722 #define _SPBRGH1_BRG12 0x10
1723 #define _SPBRGH1_BRG13 0x20
1724 #define _SPBRGH1_BRG14 0x40
1725 #define _SPBRGH1_BRG15 0x80
1727 //==============================================================================
1730 //==============================================================================
1731 // RC1STA Bits
1733 extern __at(0x019D) __sfr RC1STA;
1735 typedef struct
1737 unsigned RX9D : 1;
1738 unsigned OERR : 1;
1739 unsigned FERR : 1;
1740 unsigned ADDEN : 1;
1741 unsigned CREN : 1;
1742 unsigned SREN : 1;
1743 unsigned RX9 : 1;
1744 unsigned SPEN : 1;
1745 } __RC1STAbits_t;
1747 extern __at(0x019D) volatile __RC1STAbits_t RC1STAbits;
1749 #define _RX9D 0x01
1750 #define _OERR 0x02
1751 #define _FERR 0x04
1752 #define _ADDEN 0x08
1753 #define _CREN 0x10
1754 #define _SREN 0x20
1755 #define _RX9 0x40
1756 #define _SPEN 0x80
1758 //==============================================================================
1761 //==============================================================================
1762 // RCSTA Bits
1764 extern __at(0x019D) __sfr RCSTA;
1766 typedef struct
1768 unsigned RX9D : 1;
1769 unsigned OERR : 1;
1770 unsigned FERR : 1;
1771 unsigned ADDEN : 1;
1772 unsigned CREN : 1;
1773 unsigned SREN : 1;
1774 unsigned RX9 : 1;
1775 unsigned SPEN : 1;
1776 } __RCSTAbits_t;
1778 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1780 #define _RCSTA_RX9D 0x01
1781 #define _RCSTA_OERR 0x02
1782 #define _RCSTA_FERR 0x04
1783 #define _RCSTA_ADDEN 0x08
1784 #define _RCSTA_CREN 0x10
1785 #define _RCSTA_SREN 0x20
1786 #define _RCSTA_RX9 0x40
1787 #define _RCSTA_SPEN 0x80
1789 //==============================================================================
1792 //==============================================================================
1793 // RCSTA1 Bits
1795 extern __at(0x019D) __sfr RCSTA1;
1797 typedef struct
1799 unsigned RX9D : 1;
1800 unsigned OERR : 1;
1801 unsigned FERR : 1;
1802 unsigned ADDEN : 1;
1803 unsigned CREN : 1;
1804 unsigned SREN : 1;
1805 unsigned RX9 : 1;
1806 unsigned SPEN : 1;
1807 } __RCSTA1bits_t;
1809 extern __at(0x019D) volatile __RCSTA1bits_t RCSTA1bits;
1811 #define _RCSTA1_RX9D 0x01
1812 #define _RCSTA1_OERR 0x02
1813 #define _RCSTA1_FERR 0x04
1814 #define _RCSTA1_ADDEN 0x08
1815 #define _RCSTA1_CREN 0x10
1816 #define _RCSTA1_SREN 0x20
1817 #define _RCSTA1_RX9 0x40
1818 #define _RCSTA1_SPEN 0x80
1820 //==============================================================================
1823 //==============================================================================
1824 // TX1STA Bits
1826 extern __at(0x019E) __sfr TX1STA;
1828 typedef struct
1830 unsigned TX9D : 1;
1831 unsigned TRMT : 1;
1832 unsigned BRGH : 1;
1833 unsigned SENDB : 1;
1834 unsigned SYNC : 1;
1835 unsigned TXEN : 1;
1836 unsigned TX9 : 1;
1837 unsigned CSRC : 1;
1838 } __TX1STAbits_t;
1840 extern __at(0x019E) volatile __TX1STAbits_t TX1STAbits;
1842 #define _TX9D 0x01
1843 #define _TRMT 0x02
1844 #define _BRGH 0x04
1845 #define _SENDB 0x08
1846 #define _SYNC 0x10
1847 #define _TXEN 0x20
1848 #define _TX9 0x40
1849 #define _CSRC 0x80
1851 //==============================================================================
1854 //==============================================================================
1855 // TXSTA Bits
1857 extern __at(0x019E) __sfr TXSTA;
1859 typedef struct
1861 unsigned TX9D : 1;
1862 unsigned TRMT : 1;
1863 unsigned BRGH : 1;
1864 unsigned SENDB : 1;
1865 unsigned SYNC : 1;
1866 unsigned TXEN : 1;
1867 unsigned TX9 : 1;
1868 unsigned CSRC : 1;
1869 } __TXSTAbits_t;
1871 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
1873 #define _TXSTA_TX9D 0x01
1874 #define _TXSTA_TRMT 0x02
1875 #define _TXSTA_BRGH 0x04
1876 #define _TXSTA_SENDB 0x08
1877 #define _TXSTA_SYNC 0x10
1878 #define _TXSTA_TXEN 0x20
1879 #define _TXSTA_TX9 0x40
1880 #define _TXSTA_CSRC 0x80
1882 //==============================================================================
1885 //==============================================================================
1886 // TXSTA1 Bits
1888 extern __at(0x019E) __sfr TXSTA1;
1890 typedef struct
1892 unsigned TX9D : 1;
1893 unsigned TRMT : 1;
1894 unsigned BRGH : 1;
1895 unsigned SENDB : 1;
1896 unsigned SYNC : 1;
1897 unsigned TXEN : 1;
1898 unsigned TX9 : 1;
1899 unsigned CSRC : 1;
1900 } __TXSTA1bits_t;
1902 extern __at(0x019E) volatile __TXSTA1bits_t TXSTA1bits;
1904 #define _TXSTA1_TX9D 0x01
1905 #define _TXSTA1_TRMT 0x02
1906 #define _TXSTA1_BRGH 0x04
1907 #define _TXSTA1_SENDB 0x08
1908 #define _TXSTA1_SYNC 0x10
1909 #define _TXSTA1_TXEN 0x20
1910 #define _TXSTA1_TX9 0x40
1911 #define _TXSTA1_CSRC 0x80
1913 //==============================================================================
1916 //==============================================================================
1917 // BAUD1CON Bits
1919 extern __at(0x019F) __sfr BAUD1CON;
1921 typedef struct
1923 unsigned ABDEN : 1;
1924 unsigned WUE : 1;
1925 unsigned : 1;
1926 unsigned BRG16 : 1;
1927 unsigned SCKP : 1;
1928 unsigned : 1;
1929 unsigned RCIDL : 1;
1930 unsigned ABDOVF : 1;
1931 } __BAUD1CONbits_t;
1933 extern __at(0x019F) volatile __BAUD1CONbits_t BAUD1CONbits;
1935 #define _ABDEN 0x01
1936 #define _WUE 0x02
1937 #define _BRG16 0x08
1938 #define _SCKP 0x10
1939 #define _RCIDL 0x40
1940 #define _ABDOVF 0x80
1942 //==============================================================================
1945 //==============================================================================
1946 // BAUDCON Bits
1948 extern __at(0x019F) __sfr BAUDCON;
1950 typedef struct
1952 unsigned ABDEN : 1;
1953 unsigned WUE : 1;
1954 unsigned : 1;
1955 unsigned BRG16 : 1;
1956 unsigned SCKP : 1;
1957 unsigned : 1;
1958 unsigned RCIDL : 1;
1959 unsigned ABDOVF : 1;
1960 } __BAUDCONbits_t;
1962 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
1964 #define _BAUDCON_ABDEN 0x01
1965 #define _BAUDCON_WUE 0x02
1966 #define _BAUDCON_BRG16 0x08
1967 #define _BAUDCON_SCKP 0x10
1968 #define _BAUDCON_RCIDL 0x40
1969 #define _BAUDCON_ABDOVF 0x80
1971 //==============================================================================
1974 //==============================================================================
1975 // BAUDCON1 Bits
1977 extern __at(0x019F) __sfr BAUDCON1;
1979 typedef struct
1981 unsigned ABDEN : 1;
1982 unsigned WUE : 1;
1983 unsigned : 1;
1984 unsigned BRG16 : 1;
1985 unsigned SCKP : 1;
1986 unsigned : 1;
1987 unsigned RCIDL : 1;
1988 unsigned ABDOVF : 1;
1989 } __BAUDCON1bits_t;
1991 extern __at(0x019F) volatile __BAUDCON1bits_t BAUDCON1bits;
1993 #define _BAUDCON1_ABDEN 0x01
1994 #define _BAUDCON1_WUE 0x02
1995 #define _BAUDCON1_BRG16 0x08
1996 #define _BAUDCON1_SCKP 0x10
1997 #define _BAUDCON1_RCIDL 0x40
1998 #define _BAUDCON1_ABDOVF 0x80
2000 //==============================================================================
2003 //==============================================================================
2004 // WPUB Bits
2006 extern __at(0x020D) __sfr WPUB;
2008 typedef struct
2010 unsigned WPUB0 : 1;
2011 unsigned WPUB1 : 1;
2012 unsigned WPUB2 : 1;
2013 unsigned WPUB3 : 1;
2014 unsigned WPUB4 : 1;
2015 unsigned WPUB5 : 1;
2016 unsigned WPUB6 : 1;
2017 unsigned WPUB7 : 1;
2018 } __WPUBbits_t;
2020 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2022 #define _WPUB0 0x01
2023 #define _WPUB1 0x02
2024 #define _WPUB2 0x04
2025 #define _WPUB3 0x08
2026 #define _WPUB4 0x10
2027 #define _WPUB5 0x20
2028 #define _WPUB6 0x40
2029 #define _WPUB7 0x80
2031 //==============================================================================
2034 //==============================================================================
2035 // WPUE Bits
2037 extern __at(0x0210) __sfr WPUE;
2039 typedef struct
2041 unsigned : 1;
2042 unsigned : 1;
2043 unsigned : 1;
2044 unsigned WPUE3 : 1;
2045 unsigned : 1;
2046 unsigned : 1;
2047 unsigned : 1;
2048 unsigned : 1;
2049 } __WPUEbits_t;
2051 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
2053 #define _WPUE3 0x08
2055 //==============================================================================
2058 //==============================================================================
2059 // IOCBP Bits
2061 extern __at(0x0394) __sfr IOCBP;
2063 typedef struct
2065 unsigned IOCBP0 : 1;
2066 unsigned IOCBP1 : 1;
2067 unsigned IOCBP2 : 1;
2068 unsigned IOCBP3 : 1;
2069 unsigned IOCBP4 : 1;
2070 unsigned IOCBP5 : 1;
2071 unsigned IOCBP6 : 1;
2072 unsigned IOCBP7 : 1;
2073 } __IOCBPbits_t;
2075 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
2077 #define _IOCBP0 0x01
2078 #define _IOCBP1 0x02
2079 #define _IOCBP2 0x04
2080 #define _IOCBP3 0x08
2081 #define _IOCBP4 0x10
2082 #define _IOCBP5 0x20
2083 #define _IOCBP6 0x40
2084 #define _IOCBP7 0x80
2086 //==============================================================================
2089 //==============================================================================
2090 // IOCBN Bits
2092 extern __at(0x0395) __sfr IOCBN;
2094 typedef struct
2096 unsigned IOCBN0 : 1;
2097 unsigned IOCBN1 : 1;
2098 unsigned IOCBN2 : 1;
2099 unsigned IOCBN3 : 1;
2100 unsigned IOCBN4 : 1;
2101 unsigned IOCBN5 : 1;
2102 unsigned IOCBN6 : 1;
2103 unsigned IOCBN7 : 1;
2104 } __IOCBNbits_t;
2106 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
2108 #define _IOCBN0 0x01
2109 #define _IOCBN1 0x02
2110 #define _IOCBN2 0x04
2111 #define _IOCBN3 0x08
2112 #define _IOCBN4 0x10
2113 #define _IOCBN5 0x20
2114 #define _IOCBN6 0x40
2115 #define _IOCBN7 0x80
2117 //==============================================================================
2120 //==============================================================================
2121 // IOCBF Bits
2123 extern __at(0x0396) __sfr IOCBF;
2125 typedef struct
2127 unsigned IOCBF0 : 1;
2128 unsigned IOCBF1 : 1;
2129 unsigned IOCBF2 : 1;
2130 unsigned IOCBF3 : 1;
2131 unsigned IOCBF4 : 1;
2132 unsigned IOCBF5 : 1;
2133 unsigned IOCBF6 : 1;
2134 unsigned IOCBF7 : 1;
2135 } __IOCBFbits_t;
2137 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
2139 #define _IOCBF0 0x01
2140 #define _IOCBF1 0x02
2141 #define _IOCBF2 0x04
2142 #define _IOCBF3 0x08
2143 #define _IOCBF4 0x10
2144 #define _IOCBF5 0x20
2145 #define _IOCBF6 0x40
2146 #define _IOCBF7 0x80
2148 //==============================================================================
2151 //==============================================================================
2152 // LCDCON Bits
2154 extern __at(0x0791) __sfr LCDCON;
2156 typedef union
2158 struct
2160 unsigned LMUX0 : 1;
2161 unsigned LMUX1 : 1;
2162 unsigned CS0 : 1;
2163 unsigned CS1 : 1;
2164 unsigned : 1;
2165 unsigned WERR : 1;
2166 unsigned SLPEN : 1;
2167 unsigned LCDEN : 1;
2170 struct
2172 unsigned LMUX : 2;
2173 unsigned : 6;
2176 struct
2178 unsigned : 2;
2179 unsigned CS : 2;
2180 unsigned : 4;
2182 } __LCDCONbits_t;
2184 extern __at(0x0791) volatile __LCDCONbits_t LCDCONbits;
2186 #define _LMUX0 0x01
2187 #define _LMUX1 0x02
2188 #define _CS0 0x04
2189 #define _CS1 0x08
2190 #define _WERR 0x20
2191 #define _SLPEN 0x40
2192 #define _LCDEN 0x80
2194 //==============================================================================
2197 //==============================================================================
2198 // LCDPS Bits
2200 extern __at(0x0792) __sfr LCDPS;
2202 typedef union
2204 struct
2206 unsigned LP0 : 1;
2207 unsigned LP1 : 1;
2208 unsigned LP2 : 1;
2209 unsigned LP3 : 1;
2210 unsigned WA : 1;
2211 unsigned LCDA : 1;
2212 unsigned BIASMD : 1;
2213 unsigned WFT : 1;
2216 struct
2218 unsigned LP : 4;
2219 unsigned : 4;
2221 } __LCDPSbits_t;
2223 extern __at(0x0792) volatile __LCDPSbits_t LCDPSbits;
2225 #define _LP0 0x01
2226 #define _LP1 0x02
2227 #define _LP2 0x04
2228 #define _LP3 0x08
2229 #define _WA 0x10
2230 #define _LCDA 0x20
2231 #define _BIASMD 0x40
2232 #define _WFT 0x80
2234 //==============================================================================
2237 //==============================================================================
2238 // LCDREF Bits
2240 extern __at(0x0793) __sfr LCDREF;
2242 typedef struct
2244 unsigned : 1;
2245 unsigned VLCD1PE : 1;
2246 unsigned VLCD2PE : 1;
2247 unsigned VLCD3PE : 1;
2248 unsigned : 1;
2249 unsigned LCDIRI : 1;
2250 unsigned : 1;
2251 unsigned LCDIRE : 1;
2252 } __LCDREFbits_t;
2254 extern __at(0x0793) volatile __LCDREFbits_t LCDREFbits;
2256 #define _VLCD1PE 0x02
2257 #define _VLCD2PE 0x04
2258 #define _VLCD3PE 0x08
2259 #define _LCDIRI 0x20
2260 #define _LCDIRE 0x80
2262 //==============================================================================
2265 //==============================================================================
2266 // LCDCST Bits
2268 extern __at(0x0794) __sfr LCDCST;
2270 typedef union
2272 struct
2274 unsigned LCDCST0 : 1;
2275 unsigned LCDCST1 : 1;
2276 unsigned LCDCST2 : 1;
2277 unsigned : 1;
2278 unsigned : 1;
2279 unsigned : 1;
2280 unsigned : 1;
2281 unsigned : 1;
2284 struct
2286 unsigned LCDCST : 3;
2287 unsigned : 5;
2289 } __LCDCSTbits_t;
2291 extern __at(0x0794) volatile __LCDCSTbits_t LCDCSTbits;
2293 #define _LCDCST0 0x01
2294 #define _LCDCST1 0x02
2295 #define _LCDCST2 0x04
2297 //==============================================================================
2300 //==============================================================================
2301 // LCDRL Bits
2303 extern __at(0x0795) __sfr LCDRL;
2305 typedef union
2307 struct
2309 unsigned LRLAT0 : 1;
2310 unsigned LRLAT1 : 1;
2311 unsigned LRLAT2 : 1;
2312 unsigned : 1;
2313 unsigned LRLBP0 : 1;
2314 unsigned LRLBP1 : 1;
2315 unsigned LRLAP0 : 1;
2316 unsigned LRLAP1 : 1;
2319 struct
2321 unsigned LRLAT : 3;
2322 unsigned : 5;
2325 struct
2327 unsigned : 4;
2328 unsigned LRLBP : 2;
2329 unsigned : 2;
2332 struct
2334 unsigned : 6;
2335 unsigned LRLAP : 2;
2337 } __LCDRLbits_t;
2339 extern __at(0x0795) volatile __LCDRLbits_t LCDRLbits;
2341 #define _LRLAT0 0x01
2342 #define _LRLAT1 0x02
2343 #define _LRLAT2 0x04
2344 #define _LRLBP0 0x10
2345 #define _LRLBP1 0x20
2346 #define _LRLAP0 0x40
2347 #define _LRLAP1 0x80
2349 //==============================================================================
2352 //==============================================================================
2353 // LCDSE0 Bits
2355 extern __at(0x0798) __sfr LCDSE0;
2357 typedef struct
2359 unsigned SE0 : 1;
2360 unsigned SE1 : 1;
2361 unsigned SE2 : 1;
2362 unsigned SE3 : 1;
2363 unsigned SE4 : 1;
2364 unsigned SE5 : 1;
2365 unsigned SE6 : 1;
2366 unsigned SE7 : 1;
2367 } __LCDSE0bits_t;
2369 extern __at(0x0798) volatile __LCDSE0bits_t LCDSE0bits;
2371 #define _SE0 0x01
2372 #define _SE1 0x02
2373 #define _SE2 0x04
2374 #define _SE3 0x08
2375 #define _SE4 0x10
2376 #define _SE5 0x20
2377 #define _SE6 0x40
2378 #define _SE7 0x80
2380 //==============================================================================
2383 //==============================================================================
2384 // LCDSE1 Bits
2386 extern __at(0x0799) __sfr LCDSE1;
2388 typedef struct
2390 unsigned SE8 : 1;
2391 unsigned SE9 : 1;
2392 unsigned SE10 : 1;
2393 unsigned SE11 : 1;
2394 unsigned SE12 : 1;
2395 unsigned SE13 : 1;
2396 unsigned SE14 : 1;
2397 unsigned SE15 : 1;
2398 } __LCDSE1bits_t;
2400 extern __at(0x0799) volatile __LCDSE1bits_t LCDSE1bits;
2402 #define _SE8 0x01
2403 #define _SE9 0x02
2404 #define _SE10 0x04
2405 #define _SE11 0x08
2406 #define _SE12 0x10
2407 #define _SE13 0x20
2408 #define _SE14 0x40
2409 #define _SE15 0x80
2411 //==============================================================================
2414 //==============================================================================
2415 // LCDSE2 Bits
2417 extern __at(0x079A) __sfr LCDSE2;
2419 typedef struct
2421 unsigned SE16 : 1;
2422 unsigned SE17 : 1;
2423 unsigned SE18 : 1;
2424 unsigned SE19 : 1;
2425 unsigned SE20 : 1;
2426 unsigned SE21 : 1;
2427 unsigned SE22 : 1;
2428 unsigned SE23 : 1;
2429 } __LCDSE2bits_t;
2431 extern __at(0x079A) volatile __LCDSE2bits_t LCDSE2bits;
2433 #define _SE16 0x01
2434 #define _SE17 0x02
2435 #define _SE18 0x04
2436 #define _SE19 0x08
2437 #define _SE20 0x10
2438 #define _SE21 0x20
2439 #define _SE22 0x40
2440 #define _SE23 0x80
2442 //==============================================================================
2445 //==============================================================================
2446 // LCDSE3 Bits
2448 extern __at(0x079B) __sfr LCDSE3;
2450 typedef struct
2452 unsigned SE24 : 1;
2453 unsigned SE25 : 1;
2454 unsigned SE26 : 1;
2455 unsigned SE27 : 1;
2456 unsigned SE28 : 1;
2457 unsigned : 1;
2458 unsigned : 1;
2459 unsigned : 1;
2460 } __LCDSE3bits_t;
2462 extern __at(0x079B) volatile __LCDSE3bits_t LCDSE3bits;
2464 #define _SE24 0x01
2465 #define _SE25 0x02
2466 #define _SE26 0x04
2467 #define _SE27 0x08
2468 #define _SE28 0x10
2470 //==============================================================================
2473 //==============================================================================
2474 // LCDDATA0 Bits
2476 extern __at(0x07A0) __sfr LCDDATA0;
2478 typedef struct
2480 unsigned SEG0COM0 : 1;
2481 unsigned SEG1COM0 : 1;
2482 unsigned SEG2COM0 : 1;
2483 unsigned SEG3COM0 : 1;
2484 unsigned SEG4COM0 : 1;
2485 unsigned SEG5COM0 : 1;
2486 unsigned SEG6COM0 : 1;
2487 unsigned SEG7COM0 : 1;
2488 } __LCDDATA0bits_t;
2490 extern __at(0x07A0) volatile __LCDDATA0bits_t LCDDATA0bits;
2492 #define _SEG0COM0 0x01
2493 #define _SEG1COM0 0x02
2494 #define _SEG2COM0 0x04
2495 #define _SEG3COM0 0x08
2496 #define _SEG4COM0 0x10
2497 #define _SEG5COM0 0x20
2498 #define _SEG6COM0 0x40
2499 #define _SEG7COM0 0x80
2501 //==============================================================================
2504 //==============================================================================
2505 // LCDDATA1 Bits
2507 extern __at(0x07A1) __sfr LCDDATA1;
2509 typedef struct
2511 unsigned SEG8COM0 : 1;
2512 unsigned SEG9COM0 : 1;
2513 unsigned SEG10COM0 : 1;
2514 unsigned SEG11COM0 : 1;
2515 unsigned SEG12COM0 : 1;
2516 unsigned SEG13COM0 : 1;
2517 unsigned SEG14COM0 : 1;
2518 unsigned SEG15COM0 : 1;
2519 } __LCDDATA1bits_t;
2521 extern __at(0x07A1) volatile __LCDDATA1bits_t LCDDATA1bits;
2523 #define _SEG8COM0 0x01
2524 #define _SEG9COM0 0x02
2525 #define _SEG10COM0 0x04
2526 #define _SEG11COM0 0x08
2527 #define _SEG12COM0 0x10
2528 #define _SEG13COM0 0x20
2529 #define _SEG14COM0 0x40
2530 #define _SEG15COM0 0x80
2532 //==============================================================================
2535 //==============================================================================
2536 // LCDDATA2 Bits
2538 extern __at(0x07A2) __sfr LCDDATA2;
2540 typedef struct
2542 unsigned SEG16COM0 : 1;
2543 unsigned SEG17COM0 : 1;
2544 unsigned SEG18COM0 : 1;
2545 unsigned SEG19COM0 : 1;
2546 unsigned SEG20COM0 : 1;
2547 unsigned SEG21COM0 : 1;
2548 unsigned SEG22COM0 : 1;
2549 unsigned SEG23COM0 : 1;
2550 } __LCDDATA2bits_t;
2552 extern __at(0x07A2) volatile __LCDDATA2bits_t LCDDATA2bits;
2554 #define _SEG16COM0 0x01
2555 #define _SEG17COM0 0x02
2556 #define _SEG18COM0 0x04
2557 #define _SEG19COM0 0x08
2558 #define _SEG20COM0 0x10
2559 #define _SEG21COM0 0x20
2560 #define _SEG22COM0 0x40
2561 #define _SEG23COM0 0x80
2563 //==============================================================================
2566 //==============================================================================
2567 // LCDDATA3 Bits
2569 extern __at(0x07A3) __sfr LCDDATA3;
2571 typedef struct
2573 unsigned SEG0COM1 : 1;
2574 unsigned SEG1COM1 : 1;
2575 unsigned SEG2COM1 : 1;
2576 unsigned SEG3COM1 : 1;
2577 unsigned SEG4COM1 : 1;
2578 unsigned SEG5COM1 : 1;
2579 unsigned SEG6COM1 : 1;
2580 unsigned SEG7COM1 : 1;
2581 } __LCDDATA3bits_t;
2583 extern __at(0x07A3) volatile __LCDDATA3bits_t LCDDATA3bits;
2585 #define _SEG0COM1 0x01
2586 #define _SEG1COM1 0x02
2587 #define _SEG2COM1 0x04
2588 #define _SEG3COM1 0x08
2589 #define _SEG4COM1 0x10
2590 #define _SEG5COM1 0x20
2591 #define _SEG6COM1 0x40
2592 #define _SEG7COM1 0x80
2594 //==============================================================================
2597 //==============================================================================
2598 // LCDDATA4 Bits
2600 extern __at(0x07A4) __sfr LCDDATA4;
2602 typedef struct
2604 unsigned SEG8COM1 : 1;
2605 unsigned SEG9COM1 : 1;
2606 unsigned SEG10COM1 : 1;
2607 unsigned SEG11COM1 : 1;
2608 unsigned SEG12COM1 : 1;
2609 unsigned SEG13COM1 : 1;
2610 unsigned SEG14COM1 : 1;
2611 unsigned SEG15COM1 : 1;
2612 } __LCDDATA4bits_t;
2614 extern __at(0x07A4) volatile __LCDDATA4bits_t LCDDATA4bits;
2616 #define _SEG8COM1 0x01
2617 #define _SEG9COM1 0x02
2618 #define _SEG10COM1 0x04
2619 #define _SEG11COM1 0x08
2620 #define _SEG12COM1 0x10
2621 #define _SEG13COM1 0x20
2622 #define _SEG14COM1 0x40
2623 #define _SEG15COM1 0x80
2625 //==============================================================================
2628 //==============================================================================
2629 // LCDDATA5 Bits
2631 extern __at(0x07A5) __sfr LCDDATA5;
2633 typedef struct
2635 unsigned SEG16COM1 : 1;
2636 unsigned SEG17COM1 : 1;
2637 unsigned SEG18COM1 : 1;
2638 unsigned SEG19COM1 : 1;
2639 unsigned SEG20COM1 : 1;
2640 unsigned SEG21COM1 : 1;
2641 unsigned SEG22COM1 : 1;
2642 unsigned SEG23COM1 : 1;
2643 } __LCDDATA5bits_t;
2645 extern __at(0x07A5) volatile __LCDDATA5bits_t LCDDATA5bits;
2647 #define _SEG16COM1 0x01
2648 #define _SEG17COM1 0x02
2649 #define _SEG18COM1 0x04
2650 #define _SEG19COM1 0x08
2651 #define _SEG20COM1 0x10
2652 #define _SEG21COM1 0x20
2653 #define _SEG22COM1 0x40
2654 #define _SEG23COM1 0x80
2656 //==============================================================================
2659 //==============================================================================
2660 // LCDDATA6 Bits
2662 extern __at(0x07A6) __sfr LCDDATA6;
2664 typedef struct
2666 unsigned SEG0COM2 : 1;
2667 unsigned SEG1COM2 : 1;
2668 unsigned SEG2COM2 : 1;
2669 unsigned SEG3COM2 : 1;
2670 unsigned SEG4COM2 : 1;
2671 unsigned SEG5COM2 : 1;
2672 unsigned SEG6COM2 : 1;
2673 unsigned SEG7COM2 : 1;
2674 } __LCDDATA6bits_t;
2676 extern __at(0x07A6) volatile __LCDDATA6bits_t LCDDATA6bits;
2678 #define _SEG0COM2 0x01
2679 #define _SEG1COM2 0x02
2680 #define _SEG2COM2 0x04
2681 #define _SEG3COM2 0x08
2682 #define _SEG4COM2 0x10
2683 #define _SEG5COM2 0x20
2684 #define _SEG6COM2 0x40
2685 #define _SEG7COM2 0x80
2687 //==============================================================================
2690 //==============================================================================
2691 // LCDDATA7 Bits
2693 extern __at(0x07A7) __sfr LCDDATA7;
2695 typedef struct
2697 unsigned SEG8COM2 : 1;
2698 unsigned SEG9COM2 : 1;
2699 unsigned SEG10COM2 : 1;
2700 unsigned SEG11COM2 : 1;
2701 unsigned SEG12COM2 : 1;
2702 unsigned SEG13COM2 : 1;
2703 unsigned SEG14COM2 : 1;
2704 unsigned SEG15COM2 : 1;
2705 } __LCDDATA7bits_t;
2707 extern __at(0x07A7) volatile __LCDDATA7bits_t LCDDATA7bits;
2709 #define _SEG8COM2 0x01
2710 #define _SEG9COM2 0x02
2711 #define _SEG10COM2 0x04
2712 #define _SEG11COM2 0x08
2713 #define _SEG12COM2 0x10
2714 #define _SEG13COM2 0x20
2715 #define _SEG14COM2 0x40
2716 #define _SEG15COM2 0x80
2718 //==============================================================================
2721 //==============================================================================
2722 // LCDDATA8 Bits
2724 extern __at(0x07A8) __sfr LCDDATA8;
2726 typedef struct
2728 unsigned SEG16COM2 : 1;
2729 unsigned SEG17COM2 : 1;
2730 unsigned SEG18COM2 : 1;
2731 unsigned SEG19COM2 : 1;
2732 unsigned SEG20COM2 : 1;
2733 unsigned SEG21COM2 : 1;
2734 unsigned SEG22COM2 : 1;
2735 unsigned SEG23COM2 : 1;
2736 } __LCDDATA8bits_t;
2738 extern __at(0x07A8) volatile __LCDDATA8bits_t LCDDATA8bits;
2740 #define _SEG16COM2 0x01
2741 #define _SEG17COM2 0x02
2742 #define _SEG18COM2 0x04
2743 #define _SEG19COM2 0x08
2744 #define _SEG20COM2 0x10
2745 #define _SEG21COM2 0x20
2746 #define _SEG22COM2 0x40
2747 #define _SEG23COM2 0x80
2749 //==============================================================================
2752 //==============================================================================
2753 // LCDDATA9 Bits
2755 extern __at(0x07A9) __sfr LCDDATA9;
2757 typedef struct
2759 unsigned SEG0COM3 : 1;
2760 unsigned SEG1COM3 : 1;
2761 unsigned SEG2COM3 : 1;
2762 unsigned SEG3COM3 : 1;
2763 unsigned SEG4COM3 : 1;
2764 unsigned SEG5COM3 : 1;
2765 unsigned SEG6COM3 : 1;
2766 unsigned SEG7COM3 : 1;
2767 } __LCDDATA9bits_t;
2769 extern __at(0x07A9) volatile __LCDDATA9bits_t LCDDATA9bits;
2771 #define _SEG0COM3 0x01
2772 #define _SEG1COM3 0x02
2773 #define _SEG2COM3 0x04
2774 #define _SEG3COM3 0x08
2775 #define _SEG4COM3 0x10
2776 #define _SEG5COM3 0x20
2777 #define _SEG6COM3 0x40
2778 #define _SEG7COM3 0x80
2780 //==============================================================================
2783 //==============================================================================
2784 // LCDDATA10 Bits
2786 extern __at(0x07AA) __sfr LCDDATA10;
2788 typedef struct
2790 unsigned SEG8COM3 : 1;
2791 unsigned SEG9COM3 : 1;
2792 unsigned SEG10COM3 : 1;
2793 unsigned SEG11COM3 : 1;
2794 unsigned SEG12COM3 : 1;
2795 unsigned SEG13COM3 : 1;
2796 unsigned SEG14COM3 : 1;
2797 unsigned SEG15COM3 : 1;
2798 } __LCDDATA10bits_t;
2800 extern __at(0x07AA) volatile __LCDDATA10bits_t LCDDATA10bits;
2802 #define _SEG8COM3 0x01
2803 #define _SEG9COM3 0x02
2804 #define _SEG10COM3 0x04
2805 #define _SEG11COM3 0x08
2806 #define _SEG12COM3 0x10
2807 #define _SEG13COM3 0x20
2808 #define _SEG14COM3 0x40
2809 #define _SEG15COM3 0x80
2811 //==============================================================================
2814 //==============================================================================
2815 // LCDDATA11 Bits
2817 extern __at(0x07AB) __sfr LCDDATA11;
2819 typedef struct
2821 unsigned SEG16COM3 : 1;
2822 unsigned SEG17COM3 : 1;
2823 unsigned SEG18COM3 : 1;
2824 unsigned SEG19COM3 : 1;
2825 unsigned SEG20COM3 : 1;
2826 unsigned SEG21COM3 : 1;
2827 unsigned SEG22COM3 : 1;
2828 unsigned SEG23COM3 : 1;
2829 } __LCDDATA11bits_t;
2831 extern __at(0x07AB) volatile __LCDDATA11bits_t LCDDATA11bits;
2833 #define _SEG16COM3 0x01
2834 #define _SEG17COM3 0x02
2835 #define _SEG18COM3 0x04
2836 #define _SEG19COM3 0x08
2837 #define _SEG20COM3 0x10
2838 #define _SEG21COM3 0x20
2839 #define _SEG22COM3 0x40
2840 #define _SEG23COM3 0x80
2842 //==============================================================================
2845 //==============================================================================
2846 // LCDDATA12 Bits
2848 extern __at(0x07AC) __sfr LCDDATA12;
2850 typedef struct
2852 unsigned SEG24COM0 : 1;
2853 unsigned SEG25COM0 : 1;
2854 unsigned SEG26COM0 : 1;
2855 unsigned SEG27COM0 : 1;
2856 unsigned SEG28COM0 : 1;
2857 unsigned : 1;
2858 unsigned : 1;
2859 unsigned : 1;
2860 } __LCDDATA12bits_t;
2862 extern __at(0x07AC) volatile __LCDDATA12bits_t LCDDATA12bits;
2864 #define _SEG24COM0 0x01
2865 #define _SEG25COM0 0x02
2866 #define _SEG26COM0 0x04
2867 #define _SEG27COM0 0x08
2868 #define _SEG28COM0 0x10
2870 //==============================================================================
2873 //==============================================================================
2874 // LCDDATA15 Bits
2876 extern __at(0x07AF) __sfr LCDDATA15;
2878 typedef struct
2880 unsigned SEG24COM1 : 1;
2881 unsigned SEG25COM1 : 1;
2882 unsigned SEG26COM1 : 1;
2883 unsigned SEG27COM1 : 1;
2884 unsigned SEG28COM1 : 1;
2885 unsigned : 1;
2886 unsigned : 1;
2887 unsigned : 1;
2888 } __LCDDATA15bits_t;
2890 extern __at(0x07AF) volatile __LCDDATA15bits_t LCDDATA15bits;
2892 #define _SEG24COM1 0x01
2893 #define _SEG25COM1 0x02
2894 #define _SEG26COM1 0x04
2895 #define _SEG27COM1 0x08
2896 #define _SEG28COM1 0x10
2898 //==============================================================================
2901 //==============================================================================
2902 // LCDDATA18 Bits
2904 extern __at(0x07B2) __sfr LCDDATA18;
2906 typedef struct
2908 unsigned SEG24COM2 : 1;
2909 unsigned SEG25COM2 : 1;
2910 unsigned SEG26COM2 : 1;
2911 unsigned SEG27COM2 : 1;
2912 unsigned SEG28COM2 : 1;
2913 unsigned : 1;
2914 unsigned : 1;
2915 unsigned : 1;
2916 } __LCDDATA18bits_t;
2918 extern __at(0x07B2) volatile __LCDDATA18bits_t LCDDATA18bits;
2920 #define _SEG24COM2 0x01
2921 #define _SEG25COM2 0x02
2922 #define _SEG26COM2 0x04
2923 #define _SEG27COM2 0x08
2924 #define _SEG28COM2 0x10
2926 //==============================================================================
2929 //==============================================================================
2930 // LCDDATA21 Bits
2932 extern __at(0x07B5) __sfr LCDDATA21;
2934 typedef struct
2936 unsigned SEG24COM3 : 1;
2937 unsigned SEG25COM3 : 1;
2938 unsigned SEG26COM3 : 1;
2939 unsigned SEG27COM3 : 1;
2940 unsigned SEG28COM3 : 1;
2941 unsigned : 1;
2942 unsigned : 1;
2943 unsigned : 1;
2944 } __LCDDATA21bits_t;
2946 extern __at(0x07B5) volatile __LCDDATA21bits_t LCDDATA21bits;
2948 #define _SEG24COM3 0x01
2949 #define _SEG25COM3 0x02
2950 #define _SEG26COM3 0x04
2951 #define _SEG27COM3 0x08
2952 #define _SEG28COM3 0x10
2954 //==============================================================================
2957 //==============================================================================
2958 // STATUS_SHAD Bits
2960 extern __at(0x0FE4) __sfr STATUS_SHAD;
2962 typedef struct
2964 unsigned C_SHAD : 1;
2965 unsigned DC_SHAD : 1;
2966 unsigned Z_SHAD : 1;
2967 unsigned : 1;
2968 unsigned : 1;
2969 unsigned : 1;
2970 unsigned : 1;
2971 unsigned : 1;
2972 } __STATUS_SHADbits_t;
2974 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
2976 #define _C_SHAD 0x01
2977 #define _DC_SHAD 0x02
2978 #define _Z_SHAD 0x04
2980 //==============================================================================
2982 extern __at(0x0FE5) __sfr WREG_SHAD;
2983 extern __at(0x0FE6) __sfr BSR_SHAD;
2984 extern __at(0x0FE7) __sfr PCLATH_SHAD;
2985 extern __at(0x0FE8) __sfr FSR0L_SHAD;
2986 extern __at(0x0FE9) __sfr FSR0H_SHAD;
2987 extern __at(0x0FEA) __sfr FSR1L_SHAD;
2988 extern __at(0x0FEB) __sfr FSR1H_SHAD;
2989 extern __at(0x0FED) __sfr STKPTR;
2990 extern __at(0x0FEE) __sfr TOSL;
2991 extern __at(0x0FEF) __sfr TOSH;
2993 //==============================================================================
2995 // Configuration Bits
2997 //==============================================================================
2999 #define _CONFIG1 0x8007
3000 #define _CONFIG2 0x8008
3002 //----------------------------- CONFIG1 Options -------------------------------
3004 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
3005 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
3006 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
3007 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin.
3008 #define _WDTE_OFF 0x3FE7 // WDT disabled.
3009 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
3010 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
3011 #define _WDTE_ON 0x3FFF // WDT enabled.
3012 #define _PWRTE_ON 0x3FDF // PWRT enabled.
3013 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
3014 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
3015 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
3016 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
3017 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
3018 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
3019 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
3020 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
3021 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
3022 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
3023 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
3025 //----------------------------- CONFIG2 Options -------------------------------
3027 #define _WRT_ALL 0x3FFC // 000h to 7FFh write protected, no addresses may be modified by PMCON control.
3028 #define _WRT_HALF 0x3FFD // 000h to 3FFh write protected, 400h to 7FFh may be modified by PMCON control.
3029 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 7FFh may be modified by PMCON control.
3030 #define _WRT_OFF 0x3FFF // Write protection off.
3031 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
3032 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
3033 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
3034 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3035 #define _BORV_19 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3036 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
3037 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
3038 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
3039 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
3040 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
3041 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
3043 //==============================================================================
3045 #define _DEVID1 0x8006
3047 #define _IDLOC0 0x8000
3048 #define _IDLOC1 0x8001
3049 #define _IDLOC2 0x8002
3050 #define _IDLOC3 0x8003
3052 //==============================================================================
3054 #ifndef NO_BIT_DEFINES
3056 #define ADON ADCON0bits.ADON // bit 0
3057 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
3058 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
3059 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
3060 #define NOT_DONE ADCON0bits.NOT_DONE // bit 1, shadows bit in ADCON0bits
3061 #define CHS0 ADCON0bits.CHS0 // bit 2
3062 #define CHS1 ADCON0bits.CHS1 // bit 3
3063 #define CHS2 ADCON0bits.CHS2 // bit 4
3064 #define CHS3 ADCON0bits.CHS3 // bit 5
3065 #define CHS4 ADCON0bits.CHS4 // bit 6
3067 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
3068 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
3069 #define ADCS0 ADCON1bits.ADCS0 // bit 4
3070 #define ADCS1 ADCON1bits.ADCS1 // bit 5
3071 #define ADCS2 ADCON1bits.ADCS2 // bit 6
3072 #define ADFM ADCON1bits.ADFM // bit 7
3074 #define ANSA0 ANSELAbits.ANSA0 // bit 0
3075 #define ANSA1 ANSELAbits.ANSA1 // bit 1
3076 #define ANSA2 ANSELAbits.ANSA2 // bit 2
3077 #define ANSA3 ANSELAbits.ANSA3 // bit 3
3078 #define ANSA5 ANSELAbits.ANSA5 // bit 5
3080 #define ANSB0 ANSELBbits.ANSB0 // bit 0
3081 #define ANSB1 ANSELBbits.ANSB1 // bit 1
3082 #define ANSB2 ANSELBbits.ANSB2 // bit 2
3083 #define ANSB3 ANSELBbits.ANSB3 // bit 3
3084 #define ANSB4 ANSELBbits.ANSB4 // bit 4
3085 #define ANSB5 ANSELBbits.ANSB5 // bit 5
3087 #define ANSE0 ANSELEbits.ANSE0 // bit 0
3088 #define ANSE1 ANSELEbits.ANSE1 // bit 1
3089 #define ANSE2 ANSELEbits.ANSE2 // bit 2
3091 #define ABDEN BAUD1CONbits.ABDEN // bit 0
3092 #define WUE BAUD1CONbits.WUE // bit 1
3093 #define BRG16 BAUD1CONbits.BRG16 // bit 3
3094 #define SCKP BAUD1CONbits.SCKP // bit 4
3095 #define RCIDL BAUD1CONbits.RCIDL // bit 6
3096 #define ABDOVF BAUD1CONbits.ABDOVF // bit 7
3098 #define BORRDY BORCONbits.BORRDY // bit 0
3099 #define BORFS BORCONbits.BORFS // bit 6
3100 #define SBOREN BORCONbits.SBOREN // bit 7
3102 #define BSR0 BSRbits.BSR0 // bit 0
3103 #define BSR1 BSRbits.BSR1 // bit 1
3104 #define BSR2 BSRbits.BSR2 // bit 2
3105 #define BSR3 BSRbits.BSR3 // bit 3
3106 #define BSR4 BSRbits.BSR4 // bit 4
3108 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
3109 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
3110 #define TSRNG FVRCONbits.TSRNG // bit 4
3111 #define TSEN FVRCONbits.TSEN // bit 5
3112 #define FVRRDY FVRCONbits.FVRRDY // bit 6
3113 #define FVREN FVRCONbits.FVREN // bit 7
3115 #define IOCIF INTCONbits.IOCIF // bit 0
3116 #define INTF INTCONbits.INTF // bit 1
3117 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
3118 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
3119 #define IOCIE INTCONbits.IOCIE // bit 3
3120 #define INTE INTCONbits.INTE // bit 4
3121 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
3122 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
3123 #define PEIE INTCONbits.PEIE // bit 6
3124 #define GIE INTCONbits.GIE // bit 7
3126 #define IOCBF0 IOCBFbits.IOCBF0 // bit 0
3127 #define IOCBF1 IOCBFbits.IOCBF1 // bit 1
3128 #define IOCBF2 IOCBFbits.IOCBF2 // bit 2
3129 #define IOCBF3 IOCBFbits.IOCBF3 // bit 3
3130 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
3131 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
3132 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
3133 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
3135 #define IOCBN0 IOCBNbits.IOCBN0 // bit 0
3136 #define IOCBN1 IOCBNbits.IOCBN1 // bit 1
3137 #define IOCBN2 IOCBNbits.IOCBN2 // bit 2
3138 #define IOCBN3 IOCBNbits.IOCBN3 // bit 3
3139 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
3140 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
3141 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
3142 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
3144 #define IOCBP0 IOCBPbits.IOCBP0 // bit 0
3145 #define IOCBP1 IOCBPbits.IOCBP1 // bit 1
3146 #define IOCBP2 IOCBPbits.IOCBP2 // bit 2
3147 #define IOCBP3 IOCBPbits.IOCBP3 // bit 3
3148 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
3149 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
3150 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
3151 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
3153 #define LATA0 LATAbits.LATA0 // bit 0
3154 #define LATA1 LATAbits.LATA1 // bit 1
3155 #define LATA2 LATAbits.LATA2 // bit 2
3156 #define LATA3 LATAbits.LATA3 // bit 3
3157 #define LATA4 LATAbits.LATA4 // bit 4
3158 #define LATA5 LATAbits.LATA5 // bit 5
3159 #define LATA6 LATAbits.LATA6 // bit 6
3160 #define LATA7 LATAbits.LATA7 // bit 7
3162 #define LATB0 LATBbits.LATB0 // bit 0
3163 #define LATB1 LATBbits.LATB1 // bit 1
3164 #define LATB2 LATBbits.LATB2 // bit 2
3165 #define LATB3 LATBbits.LATB3 // bit 3
3166 #define LATB4 LATBbits.LATB4 // bit 4
3167 #define LATB5 LATBbits.LATB5 // bit 5
3168 #define LATB6 LATBbits.LATB6 // bit 6
3169 #define LATB7 LATBbits.LATB7 // bit 7
3171 #define LATC0 LATCbits.LATC0 // bit 0
3172 #define LATC1 LATCbits.LATC1 // bit 1
3173 #define LATC2 LATCbits.LATC2 // bit 2
3174 #define LATC3 LATCbits.LATC3 // bit 3
3175 #define LATC4 LATCbits.LATC4 // bit 4
3176 #define LATC5 LATCbits.LATC5 // bit 5
3177 #define LATC6 LATCbits.LATC6 // bit 6
3178 #define LATC7 LATCbits.LATC7 // bit 7
3180 #define LATD0 LATDbits.LATD0 // bit 0
3181 #define LATD1 LATDbits.LATD1 // bit 1
3182 #define LATD2 LATDbits.LATD2 // bit 2
3183 #define LATD3 LATDbits.LATD3 // bit 3
3184 #define LATD4 LATDbits.LATD4 // bit 4
3185 #define LATD5 LATDbits.LATD5 // bit 5
3186 #define LATD6 LATDbits.LATD6 // bit 6
3187 #define LATD7 LATDbits.LATD7 // bit 7
3189 #define LATE0 LATEbits.LATE0 // bit 0
3190 #define LATE1 LATEbits.LATE1 // bit 1
3191 #define LATE2 LATEbits.LATE2 // bit 2
3193 #define LMUX0 LCDCONbits.LMUX0 // bit 0
3194 #define LMUX1 LCDCONbits.LMUX1 // bit 1
3195 #define CS0 LCDCONbits.CS0 // bit 2
3196 #define CS1 LCDCONbits.CS1 // bit 3
3197 #define WERR LCDCONbits.WERR // bit 5
3198 #define SLPEN LCDCONbits.SLPEN // bit 6
3199 #define LCDEN LCDCONbits.LCDEN // bit 7
3201 #define LCDCST0 LCDCSTbits.LCDCST0 // bit 0
3202 #define LCDCST1 LCDCSTbits.LCDCST1 // bit 1
3203 #define LCDCST2 LCDCSTbits.LCDCST2 // bit 2
3205 #define SEG0COM0 LCDDATA0bits.SEG0COM0 // bit 0
3206 #define SEG1COM0 LCDDATA0bits.SEG1COM0 // bit 1
3207 #define SEG2COM0 LCDDATA0bits.SEG2COM0 // bit 2
3208 #define SEG3COM0 LCDDATA0bits.SEG3COM0 // bit 3
3209 #define SEG4COM0 LCDDATA0bits.SEG4COM0 // bit 4
3210 #define SEG5COM0 LCDDATA0bits.SEG5COM0 // bit 5
3211 #define SEG6COM0 LCDDATA0bits.SEG6COM0 // bit 6
3212 #define SEG7COM0 LCDDATA0bits.SEG7COM0 // bit 7
3214 #define SEG8COM0 LCDDATA1bits.SEG8COM0 // bit 0
3215 #define SEG9COM0 LCDDATA1bits.SEG9COM0 // bit 1
3216 #define SEG10COM0 LCDDATA1bits.SEG10COM0 // bit 2
3217 #define SEG11COM0 LCDDATA1bits.SEG11COM0 // bit 3
3218 #define SEG12COM0 LCDDATA1bits.SEG12COM0 // bit 4
3219 #define SEG13COM0 LCDDATA1bits.SEG13COM0 // bit 5
3220 #define SEG14COM0 LCDDATA1bits.SEG14COM0 // bit 6
3221 #define SEG15COM0 LCDDATA1bits.SEG15COM0 // bit 7
3223 #define SEG16COM0 LCDDATA2bits.SEG16COM0 // bit 0
3224 #define SEG17COM0 LCDDATA2bits.SEG17COM0 // bit 1
3225 #define SEG18COM0 LCDDATA2bits.SEG18COM0 // bit 2
3226 #define SEG19COM0 LCDDATA2bits.SEG19COM0 // bit 3
3227 #define SEG20COM0 LCDDATA2bits.SEG20COM0 // bit 4
3228 #define SEG21COM0 LCDDATA2bits.SEG21COM0 // bit 5
3229 #define SEG22COM0 LCDDATA2bits.SEG22COM0 // bit 6
3230 #define SEG23COM0 LCDDATA2bits.SEG23COM0 // bit 7
3232 #define SEG0COM1 LCDDATA3bits.SEG0COM1 // bit 0
3233 #define SEG1COM1 LCDDATA3bits.SEG1COM1 // bit 1
3234 #define SEG2COM1 LCDDATA3bits.SEG2COM1 // bit 2
3235 #define SEG3COM1 LCDDATA3bits.SEG3COM1 // bit 3
3236 #define SEG4COM1 LCDDATA3bits.SEG4COM1 // bit 4
3237 #define SEG5COM1 LCDDATA3bits.SEG5COM1 // bit 5
3238 #define SEG6COM1 LCDDATA3bits.SEG6COM1 // bit 6
3239 #define SEG7COM1 LCDDATA3bits.SEG7COM1 // bit 7
3241 #define SEG8COM1 LCDDATA4bits.SEG8COM1 // bit 0
3242 #define SEG9COM1 LCDDATA4bits.SEG9COM1 // bit 1
3243 #define SEG10COM1 LCDDATA4bits.SEG10COM1 // bit 2
3244 #define SEG11COM1 LCDDATA4bits.SEG11COM1 // bit 3
3245 #define SEG12COM1 LCDDATA4bits.SEG12COM1 // bit 4
3246 #define SEG13COM1 LCDDATA4bits.SEG13COM1 // bit 5
3247 #define SEG14COM1 LCDDATA4bits.SEG14COM1 // bit 6
3248 #define SEG15COM1 LCDDATA4bits.SEG15COM1 // bit 7
3250 #define SEG16COM1 LCDDATA5bits.SEG16COM1 // bit 0
3251 #define SEG17COM1 LCDDATA5bits.SEG17COM1 // bit 1
3252 #define SEG18COM1 LCDDATA5bits.SEG18COM1 // bit 2
3253 #define SEG19COM1 LCDDATA5bits.SEG19COM1 // bit 3
3254 #define SEG20COM1 LCDDATA5bits.SEG20COM1 // bit 4
3255 #define SEG21COM1 LCDDATA5bits.SEG21COM1 // bit 5
3256 #define SEG22COM1 LCDDATA5bits.SEG22COM1 // bit 6
3257 #define SEG23COM1 LCDDATA5bits.SEG23COM1 // bit 7
3259 #define SEG0COM2 LCDDATA6bits.SEG0COM2 // bit 0
3260 #define SEG1COM2 LCDDATA6bits.SEG1COM2 // bit 1
3261 #define SEG2COM2 LCDDATA6bits.SEG2COM2 // bit 2
3262 #define SEG3COM2 LCDDATA6bits.SEG3COM2 // bit 3
3263 #define SEG4COM2 LCDDATA6bits.SEG4COM2 // bit 4
3264 #define SEG5COM2 LCDDATA6bits.SEG5COM2 // bit 5
3265 #define SEG6COM2 LCDDATA6bits.SEG6COM2 // bit 6
3266 #define SEG7COM2 LCDDATA6bits.SEG7COM2 // bit 7
3268 #define SEG8COM2 LCDDATA7bits.SEG8COM2 // bit 0
3269 #define SEG9COM2 LCDDATA7bits.SEG9COM2 // bit 1
3270 #define SEG10COM2 LCDDATA7bits.SEG10COM2 // bit 2
3271 #define SEG11COM2 LCDDATA7bits.SEG11COM2 // bit 3
3272 #define SEG12COM2 LCDDATA7bits.SEG12COM2 // bit 4
3273 #define SEG13COM2 LCDDATA7bits.SEG13COM2 // bit 5
3274 #define SEG14COM2 LCDDATA7bits.SEG14COM2 // bit 6
3275 #define SEG15COM2 LCDDATA7bits.SEG15COM2 // bit 7
3277 #define SEG16COM2 LCDDATA8bits.SEG16COM2 // bit 0
3278 #define SEG17COM2 LCDDATA8bits.SEG17COM2 // bit 1
3279 #define SEG18COM2 LCDDATA8bits.SEG18COM2 // bit 2
3280 #define SEG19COM2 LCDDATA8bits.SEG19COM2 // bit 3
3281 #define SEG20COM2 LCDDATA8bits.SEG20COM2 // bit 4
3282 #define SEG21COM2 LCDDATA8bits.SEG21COM2 // bit 5
3283 #define SEG22COM2 LCDDATA8bits.SEG22COM2 // bit 6
3284 #define SEG23COM2 LCDDATA8bits.SEG23COM2 // bit 7
3286 #define SEG0COM3 LCDDATA9bits.SEG0COM3 // bit 0
3287 #define SEG1COM3 LCDDATA9bits.SEG1COM3 // bit 1
3288 #define SEG2COM3 LCDDATA9bits.SEG2COM3 // bit 2
3289 #define SEG3COM3 LCDDATA9bits.SEG3COM3 // bit 3
3290 #define SEG4COM3 LCDDATA9bits.SEG4COM3 // bit 4
3291 #define SEG5COM3 LCDDATA9bits.SEG5COM3 // bit 5
3292 #define SEG6COM3 LCDDATA9bits.SEG6COM3 // bit 6
3293 #define SEG7COM3 LCDDATA9bits.SEG7COM3 // bit 7
3295 #define SEG8COM3 LCDDATA10bits.SEG8COM3 // bit 0
3296 #define SEG9COM3 LCDDATA10bits.SEG9COM3 // bit 1
3297 #define SEG10COM3 LCDDATA10bits.SEG10COM3 // bit 2
3298 #define SEG11COM3 LCDDATA10bits.SEG11COM3 // bit 3
3299 #define SEG12COM3 LCDDATA10bits.SEG12COM3 // bit 4
3300 #define SEG13COM3 LCDDATA10bits.SEG13COM3 // bit 5
3301 #define SEG14COM3 LCDDATA10bits.SEG14COM3 // bit 6
3302 #define SEG15COM3 LCDDATA10bits.SEG15COM3 // bit 7
3304 #define SEG16COM3 LCDDATA11bits.SEG16COM3 // bit 0
3305 #define SEG17COM3 LCDDATA11bits.SEG17COM3 // bit 1
3306 #define SEG18COM3 LCDDATA11bits.SEG18COM3 // bit 2
3307 #define SEG19COM3 LCDDATA11bits.SEG19COM3 // bit 3
3308 #define SEG20COM3 LCDDATA11bits.SEG20COM3 // bit 4
3309 #define SEG21COM3 LCDDATA11bits.SEG21COM3 // bit 5
3310 #define SEG22COM3 LCDDATA11bits.SEG22COM3 // bit 6
3311 #define SEG23COM3 LCDDATA11bits.SEG23COM3 // bit 7
3313 #define SEG24COM0 LCDDATA12bits.SEG24COM0 // bit 0
3314 #define SEG25COM0 LCDDATA12bits.SEG25COM0 // bit 1
3315 #define SEG26COM0 LCDDATA12bits.SEG26COM0 // bit 2
3316 #define SEG27COM0 LCDDATA12bits.SEG27COM0 // bit 3
3317 #define SEG28COM0 LCDDATA12bits.SEG28COM0 // bit 4
3319 #define SEG24COM1 LCDDATA15bits.SEG24COM1 // bit 0
3320 #define SEG25COM1 LCDDATA15bits.SEG25COM1 // bit 1
3321 #define SEG26COM1 LCDDATA15bits.SEG26COM1 // bit 2
3322 #define SEG27COM1 LCDDATA15bits.SEG27COM1 // bit 3
3323 #define SEG28COM1 LCDDATA15bits.SEG28COM1 // bit 4
3325 #define SEG24COM2 LCDDATA18bits.SEG24COM2 // bit 0
3326 #define SEG25COM2 LCDDATA18bits.SEG25COM2 // bit 1
3327 #define SEG26COM2 LCDDATA18bits.SEG26COM2 // bit 2
3328 #define SEG27COM2 LCDDATA18bits.SEG27COM2 // bit 3
3329 #define SEG28COM2 LCDDATA18bits.SEG28COM2 // bit 4
3331 #define SEG24COM3 LCDDATA21bits.SEG24COM3 // bit 0
3332 #define SEG25COM3 LCDDATA21bits.SEG25COM3 // bit 1
3333 #define SEG26COM3 LCDDATA21bits.SEG26COM3 // bit 2
3334 #define SEG27COM3 LCDDATA21bits.SEG27COM3 // bit 3
3335 #define SEG28COM3 LCDDATA21bits.SEG28COM3 // bit 4
3337 #define LP0 LCDPSbits.LP0 // bit 0
3338 #define LP1 LCDPSbits.LP1 // bit 1
3339 #define LP2 LCDPSbits.LP2 // bit 2
3340 #define LP3 LCDPSbits.LP3 // bit 3
3341 #define WA LCDPSbits.WA // bit 4
3342 #define LCDA LCDPSbits.LCDA // bit 5
3343 #define BIASMD LCDPSbits.BIASMD // bit 6
3344 #define WFT LCDPSbits.WFT // bit 7
3346 #define VLCD1PE LCDREFbits.VLCD1PE // bit 1
3347 #define VLCD2PE LCDREFbits.VLCD2PE // bit 2
3348 #define VLCD3PE LCDREFbits.VLCD3PE // bit 3
3349 #define LCDIRI LCDREFbits.LCDIRI // bit 5
3350 #define LCDIRE LCDREFbits.LCDIRE // bit 7
3352 #define LRLAT0 LCDRLbits.LRLAT0 // bit 0
3353 #define LRLAT1 LCDRLbits.LRLAT1 // bit 1
3354 #define LRLAT2 LCDRLbits.LRLAT2 // bit 2
3355 #define LRLBP0 LCDRLbits.LRLBP0 // bit 4
3356 #define LRLBP1 LCDRLbits.LRLBP1 // bit 5
3357 #define LRLAP0 LCDRLbits.LRLAP0 // bit 6
3358 #define LRLAP1 LCDRLbits.LRLAP1 // bit 7
3360 #define SE0 LCDSE0bits.SE0 // bit 0
3361 #define SE1 LCDSE0bits.SE1 // bit 1
3362 #define SE2 LCDSE0bits.SE2 // bit 2
3363 #define SE3 LCDSE0bits.SE3 // bit 3
3364 #define SE4 LCDSE0bits.SE4 // bit 4
3365 #define SE5 LCDSE0bits.SE5 // bit 5
3366 #define SE6 LCDSE0bits.SE6 // bit 6
3367 #define SE7 LCDSE0bits.SE7 // bit 7
3369 #define SE8 LCDSE1bits.SE8 // bit 0
3370 #define SE9 LCDSE1bits.SE9 // bit 1
3371 #define SE10 LCDSE1bits.SE10 // bit 2
3372 #define SE11 LCDSE1bits.SE11 // bit 3
3373 #define SE12 LCDSE1bits.SE12 // bit 4
3374 #define SE13 LCDSE1bits.SE13 // bit 5
3375 #define SE14 LCDSE1bits.SE14 // bit 6
3376 #define SE15 LCDSE1bits.SE15 // bit 7
3378 #define SE16 LCDSE2bits.SE16 // bit 0
3379 #define SE17 LCDSE2bits.SE17 // bit 1
3380 #define SE18 LCDSE2bits.SE18 // bit 2
3381 #define SE19 LCDSE2bits.SE19 // bit 3
3382 #define SE20 LCDSE2bits.SE20 // bit 4
3383 #define SE21 LCDSE2bits.SE21 // bit 5
3384 #define SE22 LCDSE2bits.SE22 // bit 6
3385 #define SE23 LCDSE2bits.SE23 // bit 7
3387 #define SE24 LCDSE3bits.SE24 // bit 0
3388 #define SE25 LCDSE3bits.SE25 // bit 1
3389 #define SE26 LCDSE3bits.SE26 // bit 2
3390 #define SE27 LCDSE3bits.SE27 // bit 3
3391 #define SE28 LCDSE3bits.SE28 // bit 4
3393 #define PS0 OPTION_REGbits.PS0 // bit 0
3394 #define PS1 OPTION_REGbits.PS1 // bit 1
3395 #define PS2 OPTION_REGbits.PS2 // bit 2
3396 #define PSA OPTION_REGbits.PSA // bit 3
3397 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
3398 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
3399 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
3400 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
3401 #define INTEDG OPTION_REGbits.INTEDG // bit 6
3402 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
3404 #define SCS0 OSCCONbits.SCS0 // bit 0
3405 #define SCS1 OSCCONbits.SCS1 // bit 1
3406 #define IRCF0 OSCCONbits.IRCF0 // bit 3
3407 #define IRCF1 OSCCONbits.IRCF1 // bit 4
3408 #define IRCF2 OSCCONbits.IRCF2 // bit 5
3409 #define IRCF3 OSCCONbits.IRCF3 // bit 6
3411 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
3412 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
3413 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
3414 #define OSTS OSCSTATbits.OSTS // bit 5
3415 #define T1OSCR OSCSTATbits.T1OSCR // bit 7
3417 #define NOT_BOR PCONbits.NOT_BOR // bit 0
3418 #define NOT_POR PCONbits.NOT_POR // bit 1
3419 #define NOT_RI PCONbits.NOT_RI // bit 2
3420 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
3421 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
3422 #define STKUNF PCONbits.STKUNF // bit 6
3423 #define STKOVF PCONbits.STKOVF // bit 7
3425 #define TMR1IE PIE1bits.TMR1IE // bit 0
3426 #define TXIE PIE1bits.TXIE // bit 4
3427 #define RCIE PIE1bits.RCIE // bit 5
3428 #define ADIE PIE1bits.ADIE // bit 6
3429 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
3431 #define LCDIE PIE2bits.LCDIE // bit 2
3433 #define TMR1IF PIR1bits.TMR1IF // bit 0
3434 #define TXIF PIR1bits.TXIF // bit 4
3435 #define RCIF PIR1bits.RCIF // bit 5
3436 #define ADIF PIR1bits.ADIF // bit 6
3437 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
3439 #define LCDIF PIR2bits.LCDIF // bit 2
3441 #define RD PMCON1bits.RD // bit 0
3442 #define WR PMCON1bits.WR // bit 1
3443 #define WREN PMCON1bits.WREN // bit 2
3444 #define WRERR PMCON1bits.WRERR // bit 3
3445 #define FREE PMCON1bits.FREE // bit 4
3446 #define LWLO PMCON1bits.LWLO // bit 5
3447 #define CFGS PMCON1bits.CFGS // bit 6
3449 #define RA0 PORTAbits.RA0 // bit 0
3450 #define RA1 PORTAbits.RA1 // bit 1
3451 #define RA2 PORTAbits.RA2 // bit 2
3452 #define RA3 PORTAbits.RA3 // bit 3
3453 #define RA4 PORTAbits.RA4 // bit 4
3454 #define RA5 PORTAbits.RA5 // bit 5
3455 #define RA6 PORTAbits.RA6 // bit 6
3456 #define RA7 PORTAbits.RA7 // bit 7
3458 #define RB0 PORTBbits.RB0 // bit 0
3459 #define RB1 PORTBbits.RB1 // bit 1
3460 #define RB2 PORTBbits.RB2 // bit 2
3461 #define RB3 PORTBbits.RB3 // bit 3
3462 #define RB4 PORTBbits.RB4 // bit 4
3463 #define RB5 PORTBbits.RB5 // bit 5
3464 #define RB6 PORTBbits.RB6 // bit 6
3465 #define RB7 PORTBbits.RB7 // bit 7
3467 #define RC0 PORTCbits.RC0 // bit 0
3468 #define RC1 PORTCbits.RC1 // bit 1
3469 #define RC2 PORTCbits.RC2 // bit 2
3470 #define RC3 PORTCbits.RC3 // bit 3
3471 #define RC4 PORTCbits.RC4 // bit 4
3472 #define RC5 PORTCbits.RC5 // bit 5
3473 #define RC6 PORTCbits.RC6 // bit 6
3474 #define RC7 PORTCbits.RC7 // bit 7
3476 #define RD0 PORTDbits.RD0 // bit 0
3477 #define RD1 PORTDbits.RD1 // bit 1
3478 #define RD2 PORTDbits.RD2 // bit 2
3479 #define RD3 PORTDbits.RD3 // bit 3
3480 #define RD4 PORTDbits.RD4 // bit 4
3481 #define RD5 PORTDbits.RD5 // bit 5
3482 #define RD6 PORTDbits.RD6 // bit 6
3483 #define RD7 PORTDbits.RD7 // bit 7
3485 #define RE0 PORTEbits.RE0 // bit 0
3486 #define RE1 PORTEbits.RE1 // bit 1
3487 #define RE2 PORTEbits.RE2 // bit 2
3488 #define RE3 PORTEbits.RE3 // bit 3
3490 #define RX9D RC1STAbits.RX9D // bit 0
3491 #define OERR RC1STAbits.OERR // bit 1
3492 #define FERR RC1STAbits.FERR // bit 2
3493 #define ADDEN RC1STAbits.ADDEN // bit 3
3494 #define CREN RC1STAbits.CREN // bit 4
3495 #define SREN RC1STAbits.SREN // bit 5
3496 #define RX9 RC1STAbits.RX9 // bit 6
3497 #define SPEN RC1STAbits.SPEN // bit 7
3499 #define BRG8 SP1BRGHbits.BRG8 // bit 0
3500 #define BRG9 SP1BRGHbits.BRG9 // bit 1
3501 #define BRG10 SP1BRGHbits.BRG10 // bit 2
3502 #define BRG11 SP1BRGHbits.BRG11 // bit 3
3503 #define BRG12 SP1BRGHbits.BRG12 // bit 4
3504 #define BRG13 SP1BRGHbits.BRG13 // bit 5
3505 #define BRG14 SP1BRGHbits.BRG14 // bit 6
3506 #define BRG15 SP1BRGHbits.BRG15 // bit 7
3508 #define BRG0 SP1BRGLbits.BRG0 // bit 0
3509 #define BRG1 SP1BRGLbits.BRG1 // bit 1
3510 #define BRG2 SP1BRGLbits.BRG2 // bit 2
3511 #define BRG3 SP1BRGLbits.BRG3 // bit 3
3512 #define BRG4 SP1BRGLbits.BRG4 // bit 4
3513 #define BRG5 SP1BRGLbits.BRG5 // bit 5
3514 #define BRG6 SP1BRGLbits.BRG6 // bit 6
3515 #define BRG7 SP1BRGLbits.BRG7 // bit 7
3517 #define C STATUSbits.C // bit 0
3518 #define DC STATUSbits.DC // bit 1
3519 #define Z STATUSbits.Z // bit 2
3520 #define NOT_PD STATUSbits.NOT_PD // bit 3
3521 #define NOT_TO STATUSbits.NOT_TO // bit 4
3523 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
3524 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
3525 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
3527 #define TMR1ON T1CONbits.TMR1ON // bit 0
3528 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
3529 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
3530 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
3531 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
3532 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
3533 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
3535 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
3536 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
3537 #define T1GVAL T1GCONbits.T1GVAL // bit 2
3538 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3, shadows bit in T1GCONbits
3539 #define T1GGO T1GCONbits.T1GGO // bit 3, shadows bit in T1GCONbits
3540 #define T1GSPM T1GCONbits.T1GSPM // bit 4
3541 #define T1GTM T1GCONbits.T1GTM // bit 5
3542 #define T1GPOL T1GCONbits.T1GPOL // bit 6
3543 #define TMR1GE T1GCONbits.TMR1GE // bit 7
3545 #define TRISA0 TRISAbits.TRISA0 // bit 0
3546 #define TRISA1 TRISAbits.TRISA1 // bit 1
3547 #define TRISA2 TRISAbits.TRISA2 // bit 2
3548 #define TRISA3 TRISAbits.TRISA3 // bit 3
3549 #define TRISA4 TRISAbits.TRISA4 // bit 4
3550 #define TRISA5 TRISAbits.TRISA5 // bit 5
3551 #define TRISA6 TRISAbits.TRISA6 // bit 6
3552 #define TRISA7 TRISAbits.TRISA7 // bit 7
3554 #define TRISB0 TRISBbits.TRISB0 // bit 0
3555 #define TRISB1 TRISBbits.TRISB1 // bit 1
3556 #define TRISB2 TRISBbits.TRISB2 // bit 2
3557 #define TRISB3 TRISBbits.TRISB3 // bit 3
3558 #define TRISB4 TRISBbits.TRISB4 // bit 4
3559 #define TRISB5 TRISBbits.TRISB5 // bit 5
3560 #define TRISB6 TRISBbits.TRISB6 // bit 6
3561 #define TRISB7 TRISBbits.TRISB7 // bit 7
3563 #define TRISC0 TRISCbits.TRISC0 // bit 0
3564 #define TRISC1 TRISCbits.TRISC1 // bit 1
3565 #define TRISC2 TRISCbits.TRISC2 // bit 2
3566 #define TRISC3 TRISCbits.TRISC3 // bit 3
3567 #define TRISC4 TRISCbits.TRISC4 // bit 4
3568 #define TRISC5 TRISCbits.TRISC5 // bit 5
3569 #define TRISC6 TRISCbits.TRISC6 // bit 6
3570 #define TRISC7 TRISCbits.TRISC7 // bit 7
3572 #define TRISD0 TRISDbits.TRISD0 // bit 0
3573 #define TRISD1 TRISDbits.TRISD1 // bit 1
3574 #define TRISD2 TRISDbits.TRISD2 // bit 2
3575 #define TRISD3 TRISDbits.TRISD3 // bit 3
3576 #define TRISD4 TRISDbits.TRISD4 // bit 4
3577 #define TRISD5 TRISDbits.TRISD5 // bit 5
3578 #define TRISD6 TRISDbits.TRISD6 // bit 6
3579 #define TRISD7 TRISDbits.TRISD7 // bit 7
3581 #define TRISE0 TRISEbits.TRISE0 // bit 0
3582 #define TRISE1 TRISEbits.TRISE1 // bit 1
3583 #define TRISE2 TRISEbits.TRISE2 // bit 2
3585 #define TX9D TX1STAbits.TX9D // bit 0
3586 #define TRMT TX1STAbits.TRMT // bit 1
3587 #define BRGH TX1STAbits.BRGH // bit 2
3588 #define SENDB TX1STAbits.SENDB // bit 3
3589 #define SYNC TX1STAbits.SYNC // bit 4
3590 #define TXEN TX1STAbits.TXEN // bit 5
3591 #define TX9 TX1STAbits.TX9 // bit 6
3592 #define CSRC TX1STAbits.CSRC // bit 7
3594 #define SWDTEN WDTCONbits.SWDTEN // bit 0
3595 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
3596 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
3597 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
3598 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
3599 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
3601 #define WPUB0 WPUBbits.WPUB0 // bit 0
3602 #define WPUB1 WPUBbits.WPUB1 // bit 1
3603 #define WPUB2 WPUBbits.WPUB2 // bit 2
3604 #define WPUB3 WPUBbits.WPUB3 // bit 3
3605 #define WPUB4 WPUBbits.WPUB4 // bit 4
3606 #define WPUB5 WPUBbits.WPUB5 // bit 5
3607 #define WPUB6 WPUBbits.WPUB6 // bit 6
3608 #define WPUB7 WPUBbits.WPUB7 // bit 7
3610 #define WPUE3 WPUEbits.WPUE3 // bit 3
3612 #endif // #ifndef NO_BIT_DEFINES
3614 #endif // #ifndef __PIC16LF1907_H__