Imported Upstream version 2.9.0
[debian/cc1111] / device / include / pic / pic16f639.h
1 //
2 // Register Declarations for Microchip 16F639 Processor
3 //
4 //
5 // This header file was automatically generated by:
6 //
7 //      inc2h.pl V4783
8 //
9 //      Copyright (c) 2002, Kevin L. Pauba, All Rights Reserved
10 //
11 //      SDCC is licensed under the GNU Public license (GPL) v2.  Note that
12 //      this license covers the code to the compiler and other executables,
13 //      but explicitly does not cover any code or objects generated by sdcc.
14 //      We have not yet decided on a license for the run time libraries, but
15 //      it will not put any requirements on code linked against it. See:
16 // 
17 //      http://www.gnu.org/copyleft/gpl/html
18 //
19 //      See http://sdcc.sourceforge.net/ for the latest information on sdcc.
20 //
21 // 
22 #ifndef P16F639_H
23 #define P16F639_H
24
25 //
26 // Register addresses.
27 //
28 #define INDF_ADDR       0x0000
29 #define TMR0_ADDR       0x0001
30 #define PCL_ADDR        0x0002
31 #define STATUS_ADDR     0x0003
32 #define FSR_ADDR        0x0004
33 #define PORTA_ADDR      0x0005
34 #define PORTC_ADDR      0x0007
35 #define PCLATH_ADDR     0x000A
36 #define INTCON_ADDR     0x000B
37 #define PIR1_ADDR       0x000C
38 #define TMR1L_ADDR      0x000E
39 #define TMR1H_ADDR      0x000F
40 #define T1CON_ADDR      0x0010
41 #define WDTCON_ADDR     0x0018
42 #define CMCON0_ADDR     0x0019
43 #define CMCON1_ADDR     0x001A
44 #define OPTION_REG_ADDR 0x0081
45 #define TRISA_ADDR      0x0085
46 #define TRISC_ADDR      0x0087
47 #define PIE1_ADDR       0x008C
48 #define PCON_ADDR       0x008E
49 #define OSCCON_ADDR     0x008F
50 #define OSCTUNE_ADDR    0x0090
51 #define LVDCON_ADDR     0x0094
52 #define WPUDA_ADDR      0x0095
53 #define IOCA_ADDR       0x0096
54 #define WDA_ADDR        0x0097
55 #define VRCON_ADDR      0x0099
56 #define EEDAT_ADDR      0x009A
57 #define EEDATA_ADDR     0x009A
58 #define EEADR_ADDR      0x009B
59 #define EECON1_ADDR     0x009C
60 #define EECON2_ADDR     0x009D
61 #define CRCON_ADDR      0x0110
62 #define CRDAT0_ADDR     0x0111
63 #define CRDAT1_ADDR     0x0112
64 #define CRDAT2_ADDR     0x0113
65 #define CRDAT3_ADDR     0x0114
66
67 //
68 // Memory organization.
69 //
70
71
72
73 //         LIST
74 // P16F639.INC  Standard Header File, Version 1.00    Microchip Technology, Inc.
75 //         NOLIST
76
77 // This header file defines configurations, registers, and other useful bits of
78 // information for the PIC16F639 microcontroller.  These names are taken to match 
79 // the data sheets as closely as possible.  
80
81 // Note that the processor must be selected before this file is 
82 // included.  The processor may be selected the following ways:
83
84 //       1. Command line switch:
85 //               C:\ MPASM MYFILE.ASM /PIC16F639
86 //       2. LIST directive in the source file
87 //               LIST   P=PIC16F639
88 //       3. Processor Type entry in the MPASM full-screen interface
89
90 //==========================================================================
91 //
92 //       Revision History
93 //
94 //==========================================================================
95 //1.00   10/28/04 Original based on P16F636.INC
96 //==========================================================================
97 //
98 //       Verify Processor
99 //
100 //==========================================================================
101
102 //        IFNDEF __16F639
103 //            MESSG "Processor-header file mismatch.  Verify selected processor."
104 //         ENDIF
105
106 //==========================================================================
107 //
108 //       Register Definitions
109 //
110 //==========================================================================
111
112 #define W                    0x0000
113 #define F                    0x0001
114
115 //----- Register Files------------------------------------------------------
116 //Bank 0
117 extern __sfr  __at (INDF_ADDR)                    INDF;
118 extern __sfr  __at (TMR0_ADDR)                    TMR0;
119 extern __sfr  __at (PCL_ADDR)                     PCL;
120 extern __sfr  __at (STATUS_ADDR)                  STATUS;
121 extern __sfr  __at (FSR_ADDR)                     FSR;
122 extern __sfr  __at (PORTA_ADDR)                   PORTA;
123
124 extern __sfr  __at (PORTC_ADDR)                   PORTC;
125
126 extern __sfr  __at (PCLATH_ADDR)                  PCLATH;
127 extern __sfr  __at (INTCON_ADDR)                  INTCON;
128 extern __sfr  __at (PIR1_ADDR)                    PIR1;
129
130 extern __sfr  __at (TMR1L_ADDR)                   TMR1L;                
131 extern __sfr  __at (TMR1H_ADDR)                   TMR1H;                
132 extern __sfr  __at (T1CON_ADDR)                   T1CON;                
133
134 extern __sfr  __at (WDTCON_ADDR)                  WDTCON;
135 extern __sfr  __at (CMCON0_ADDR)                  CMCON0;               
136 extern __sfr  __at (CMCON1_ADDR)                  CMCON1;               
137
138 //Bank 1
139 extern __sfr  __at (OPTION_REG_ADDR)              OPTION_REG;
140
141 extern __sfr  __at (TRISA_ADDR)                   TRISA;
142 extern __sfr  __at (TRISC_ADDR)                   TRISC;
143
144 extern __sfr  __at (PIE1_ADDR)                    PIE1;
145
146 extern __sfr  __at (PCON_ADDR)                    PCON;
147 extern __sfr  __at (OSCCON_ADDR)                  OSCCON;
148 extern __sfr  __at (OSCTUNE_ADDR)                 OSCTUNE;
149
150 extern __sfr  __at (LVDCON_ADDR)                  LVDCON;
151 extern __sfr  __at (WPUDA_ADDR)                   WPUDA;
152 extern __sfr  __at (IOCA_ADDR)                    IOCA;
153 extern __sfr  __at (WDA_ADDR)                     WDA;
154
155 extern __sfr  __at (VRCON_ADDR)                   VRCON;
156 extern __sfr  __at (EEDAT_ADDR)                   EEDAT;        
157 extern __sfr  __at (EEDATA_ADDR)                  EEDATA;       
158 extern __sfr  __at (EEADR_ADDR)                   EEADR;        
159 extern __sfr  __at (EECON1_ADDR)                  EECON1;
160 extern __sfr  __at (EECON2_ADDR)                  EECON2;
161
162 //Bank 2
163 extern __sfr  __at (CRCON_ADDR)                   CRCON;
164 extern __sfr  __at (CRDAT0_ADDR)                  CRDAT0;
165 extern __sfr  __at (CRDAT1_ADDR)                  CRDAT1;
166 extern __sfr  __at (CRDAT2_ADDR)                  CRDAT2;
167 extern __sfr  __at (CRDAT3_ADDR)                  CRDAT3;
168
169 //----- STATUS Bits --------------------------------------------------------
170
171
172 //----- INTCON Bits --------------------------------------------------------
173
174
175 //----- PIR1 Bits ----------------------------------------------------------
176
177
178 //----- T1CON Bits ---------------------------------------------------------
179
180
181 //----- WDTCON Bits --------------------------------------------------------
182
183
184 //----- CMCON0 Bits -------------------------------------------------------
185
186
187 //----- CMCON1 Bits -------------------------------------------------------
188
189
190 //----- OPTION Bits --------------------------------------------------------
191
192
193 //----- PIE1 Bits ----------------------------------------------------------
194
195
196 //----- PCON Bits ----------------------------------------------------------
197
198
199 //----- OSCCON Bits --------------------------------------------------------
200
201
202 //----- OSCTUNE Bits -------------------------------------------------------
203
204
205 //----- IOCA --------------------------------------------------------------
206
207
208 //----- EECON1 -------------------------------------------------------------
209
210
211 //----- VRCON ---------------------------------------------------------
212
213
214
215 //----- CRCON -------------------------------------------------------------
216
217
218 //----- LVDCON -------------------------------------------------------------
219
220
221 //----- WDA    -------------------------------------------------------------
222
223
224 //----- WPUDA    -------------------------------------------------------------
225
226
227
228 //==========================================================================
229 //
230 //       RAM Definition
231 //
232 //==========================================================================
233
234 //         __MAXRAM H'1FF'
235 //         __BADRAM H'06', H'08'-H'09', H'0D', H'11'-H'17', H'1B'-H'1F'
236 //         __BADRAM H'86', H'88'-H'89', H'8D', H'91'-H'93', H'98', H'9E'-H'9F', H'C0'-H'EF'
237 //              __BADRAM H'10C'-H'10F', H'115'-H'16F', H'106', H'108'-H'109', H'186'
238 //              __BADRAM H'188'-H'189', H'18C'-H'1EF'
239
240 //==========================================================================
241 //
242 //       Configuration Bits
243 //
244 //==========================================================================
245 #define _WUREN_ON            0x2FFF
246 #define _WUREN_OFF           0x3FFF
247 #define _FCMEN_ON            0x3FFF
248 #define _FCMEN_OFF           0x37FF
249 #define _IESO_ON             0x3FFF
250 #define _IESO_OFF            0x3BFF
251 #define _BOD_ON              0x3FFF
252 #define _BOD_NSLEEP          0x3EFF
253 #define _BOD_SBODEN          0x3DFF
254 #define _BOD_OFF             0x3CFF
255 #define _CPD_ON              0x3F7F
256 #define _CPD_OFF             0x3FFF
257 #define _CP_ON               0x3FBF
258 #define _CP_OFF              0x3FFF
259 #define _MCLRE_ON            0x3FFF
260 #define _MCLRE_OFF           0x3FDF
261 #define _PWRTE_OFF           0x3FFF
262 #define _PWRTE_ON            0x3FEF
263 #define _WDT_ON              0x3FFF
264 #define _WDT_OFF             0x3FF7
265 #define _LP_OSC              0x3FF8
266 #define _XT_OSC              0x3FF9
267 #define _HS_OSC              0x3FFA
268 #define _EC_OSC              0x3FFB
269 #define _INTRC_OSC_NOCLKOUT  0x3FFC
270 #define _INTRC_OSC_CLKOUT    0x3FFD
271 #define _EXTRC_OSC_NOCLKOUT  0x3FFE
272 #define _EXTRC_OSC_CLKOUT    0x3FFF
273
274 //         LIST
275
276 // ----- CMCON0 bits --------------------
277 typedef union {
278   struct {
279     unsigned char CM0:1;
280     unsigned char CM1:1;
281     unsigned char CM2:1;
282     unsigned char CIS:1;
283     unsigned char C1INV:1;
284     unsigned char C2INV:1;
285     unsigned char C1OUT:1;
286     unsigned char C2OUT:1;
287   };
288 } __CMCON0_bits_t;
289 extern volatile __CMCON0_bits_t __at(CMCON0_ADDR) CMCON0_bits;
290
291 #ifndef NO_BIT_DEFINES
292 #define CM0                  CMCON0_bits.CM0
293 #define CM1                  CMCON0_bits.CM1
294 #define CM2                  CMCON0_bits.CM2
295 #define CIS                  CMCON0_bits.CIS
296 #define C1INV                CMCON0_bits.C1INV
297 #define C2INV                CMCON0_bits.C2INV
298 #define C1OUT                CMCON0_bits.C1OUT
299 #define C2OUT                CMCON0_bits.C2OUT
300 #endif /* NO_BIT_DEFINES */
301
302 // ----- CMCON1 bits --------------------
303 typedef union {
304   struct {
305     unsigned char C2SYNC:1;
306     unsigned char T1GSS:1;
307     unsigned char :1;
308     unsigned char :1;
309     unsigned char :1;
310     unsigned char :1;
311     unsigned char :1;
312     unsigned char :1;
313   };
314 } __CMCON1_bits_t;
315 extern volatile __CMCON1_bits_t __at(CMCON1_ADDR) CMCON1_bits;
316
317 #ifndef NO_BIT_DEFINES
318 #define C2SYNC               CMCON1_bits.C2SYNC
319 #define T1GSS                CMCON1_bits.T1GSS
320 #endif /* NO_BIT_DEFINES */
321
322 // ----- CRCON bits --------------------
323 typedef union {
324   struct {
325     unsigned char CRREG0:1;
326     unsigned char CRREG1:1;
327     unsigned char :1;
328     unsigned char :1;
329     unsigned char :1;
330     unsigned char :1;
331     unsigned char ENC_DEC:1;
332     unsigned char GO:1;
333   };
334 } __CRCON_bits_t;
335 extern volatile __CRCON_bits_t __at(CRCON_ADDR) CRCON_bits;
336
337 #ifndef NO_BIT_DEFINES
338 #define CRREG0               CRCON_bits.CRREG0
339 #define CRREG1               CRCON_bits.CRREG1
340 #define ENC_DEC              CRCON_bits.ENC_DEC
341 #define GO                   CRCON_bits.GO
342 #endif /* NO_BIT_DEFINES */
343
344 // ----- EECON1 bits --------------------
345 typedef union {
346   struct {
347     unsigned char RD:1;
348     unsigned char WR:1;
349     unsigned char WREN:1;
350     unsigned char WRERR:1;
351     unsigned char :1;
352     unsigned char :1;
353     unsigned char :1;
354     unsigned char :1;
355   };
356 } __EECON1_bits_t;
357 extern volatile __EECON1_bits_t __at(EECON1_ADDR) EECON1_bits;
358
359 #ifndef NO_BIT_DEFINES
360 #define RD                   EECON1_bits.RD
361 #define WR                   EECON1_bits.WR
362 #define WREN                 EECON1_bits.WREN
363 #define WRERR                EECON1_bits.WRERR
364 #endif /* NO_BIT_DEFINES */
365
366 // ----- INTCON bits --------------------
367 typedef union {
368   struct {
369     unsigned char RAIF:1;
370     unsigned char INTF:1;
371     unsigned char T0IF:1;
372     unsigned char RAIE:1;
373     unsigned char INTE:1;
374     unsigned char T0IE:1;
375     unsigned char PEIE:1;
376     unsigned char GIE:1;
377   };
378 } __INTCON_bits_t;
379 extern volatile __INTCON_bits_t __at(INTCON_ADDR) INTCON_bits;
380
381 #ifndef NO_BIT_DEFINES
382 #define RAIF                 INTCON_bits.RAIF
383 #define INTF                 INTCON_bits.INTF
384 #define T0IF                 INTCON_bits.T0IF
385 #define RAIE                 INTCON_bits.RAIE
386 #define INTE                 INTCON_bits.INTE
387 #define T0IE                 INTCON_bits.T0IE
388 #define PEIE                 INTCON_bits.PEIE
389 #define GIE                  INTCON_bits.GIE
390 #endif /* NO_BIT_DEFINES */
391
392 // ----- IOCA bits --------------------
393 typedef union {
394   struct {
395     unsigned char IOCA0:1;
396     unsigned char IOCA1:1;
397     unsigned char IOCA2:1;
398     unsigned char IOCA3:1;
399     unsigned char IOCA4:1;
400     unsigned char IOCA5:1;
401     unsigned char :1;
402     unsigned char :1;
403   };
404 } __IOCA_bits_t;
405 extern volatile __IOCA_bits_t __at(IOCA_ADDR) IOCA_bits;
406
407 #ifndef NO_BIT_DEFINES
408 #define IOCA0                IOCA_bits.IOCA0
409 #define IOCA1                IOCA_bits.IOCA1
410 #define IOCA2                IOCA_bits.IOCA2
411 #define IOCA3                IOCA_bits.IOCA3
412 #define IOCA4                IOCA_bits.IOCA4
413 #define IOCA5                IOCA_bits.IOCA5
414 #endif /* NO_BIT_DEFINES */
415
416 // ----- LVDCON bits --------------------
417 typedef union {
418   struct {
419     unsigned char LVDL0:1;
420     unsigned char LVDL1:1;
421     unsigned char LVDL2:1;
422     unsigned char :1;
423     unsigned char LVDEN:1;
424     unsigned char IRVST:1;
425     unsigned char :1;
426     unsigned char :1;
427   };
428 } __LVDCON_bits_t;
429 extern volatile __LVDCON_bits_t __at(LVDCON_ADDR) LVDCON_bits;
430
431 #ifndef NO_BIT_DEFINES
432 #define LVDL0                LVDCON_bits.LVDL0
433 #define LVDL1                LVDCON_bits.LVDL1
434 #define LVDL2                LVDCON_bits.LVDL2
435 #define LVDEN                LVDCON_bits.LVDEN
436 #define IRVST                LVDCON_bits.IRVST
437 #endif /* NO_BIT_DEFINES */
438
439 // ----- OPTION_REG bits --------------------
440 typedef union {
441   struct {
442     unsigned char PS0:1;
443     unsigned char PS1:1;
444     unsigned char PS2:1;
445     unsigned char PSA:1;
446     unsigned char T0SE:1;
447     unsigned char T0CS:1;
448     unsigned char INTEDG:1;
449     unsigned char NOT_RAPU:1;
450   };
451 } __OPTION_REG_bits_t;
452 extern volatile __OPTION_REG_bits_t __at(OPTION_REG_ADDR) OPTION_REG_bits;
453
454 #ifndef NO_BIT_DEFINES
455 #define PS0                  OPTION_REG_bits.PS0
456 #define PS1                  OPTION_REG_bits.PS1
457 #define PS2                  OPTION_REG_bits.PS2
458 #define PSA                  OPTION_REG_bits.PSA
459 #define T0SE                 OPTION_REG_bits.T0SE
460 #define T0CS                 OPTION_REG_bits.T0CS
461 #define INTEDG               OPTION_REG_bits.INTEDG
462 #define NOT_RAPU             OPTION_REG_bits.NOT_RAPU
463 #endif /* NO_BIT_DEFINES */
464
465 // ----- OSCCON bits --------------------
466 typedef union {
467   struct {
468     unsigned char SCS:1;
469     unsigned char LTS:1;
470     unsigned char HTS:1;
471     unsigned char OSTS:1;
472     unsigned char IRCF0:1;
473     unsigned char IRCF1:1;
474     unsigned char IRCF2:1;
475     unsigned char :1;
476   };
477 } __OSCCON_bits_t;
478 extern volatile __OSCCON_bits_t __at(OSCCON_ADDR) OSCCON_bits;
479
480 #ifndef NO_BIT_DEFINES
481 #define SCS                  OSCCON_bits.SCS
482 #define LTS                  OSCCON_bits.LTS
483 #define HTS                  OSCCON_bits.HTS
484 #define OSTS                 OSCCON_bits.OSTS
485 #define IRCF0                OSCCON_bits.IRCF0
486 #define IRCF1                OSCCON_bits.IRCF1
487 #define IRCF2                OSCCON_bits.IRCF2
488 #endif /* NO_BIT_DEFINES */
489
490 // ----- OSCTUNE bits --------------------
491 typedef union {
492   struct {
493     unsigned char TUN0:1;
494     unsigned char TUN1:1;
495     unsigned char TUN2:1;
496     unsigned char TUN3:1;
497     unsigned char TUN4:1;
498     unsigned char :1;
499     unsigned char :1;
500     unsigned char :1;
501   };
502 } __OSCTUNE_bits_t;
503 extern volatile __OSCTUNE_bits_t __at(OSCTUNE_ADDR) OSCTUNE_bits;
504
505 #ifndef NO_BIT_DEFINES
506 #define TUN0                 OSCTUNE_bits.TUN0
507 #define TUN1                 OSCTUNE_bits.TUN1
508 #define TUN2                 OSCTUNE_bits.TUN2
509 #define TUN3                 OSCTUNE_bits.TUN3
510 #define TUN4                 OSCTUNE_bits.TUN4
511 #endif /* NO_BIT_DEFINES */
512
513 // ----- PCON bits --------------------
514 typedef union {
515   struct {
516     unsigned char NOT_BOD:1;
517     unsigned char NOT_POR:1;
518     unsigned char :1;
519     unsigned char NOT_WUR:1;
520     unsigned char SBODEN:1;
521     unsigned char ULPWUE:1;
522     unsigned char :1;
523     unsigned char :1;
524   };
525 } __PCON_bits_t;
526 extern volatile __PCON_bits_t __at(PCON_ADDR) PCON_bits;
527
528 #ifndef NO_BIT_DEFINES
529 #define NOT_BOD              PCON_bits.NOT_BOD
530 #define NOT_POR              PCON_bits.NOT_POR
531 #define NOT_WUR              PCON_bits.NOT_WUR
532 #define SBODEN               PCON_bits.SBODEN
533 #define ULPWUE               PCON_bits.ULPWUE
534 #endif /* NO_BIT_DEFINES */
535
536 // ----- PIE1 bits --------------------
537 typedef union {
538   struct {
539     unsigned char TMR1IE:1;
540     unsigned char :1;
541     unsigned char OSFIE:1;
542     unsigned char C1IE:1;
543     unsigned char C2IE:1;
544     unsigned char CRIE:1;
545     unsigned char LVDIE:1;
546     unsigned char EEIE:1;
547   };
548 } __PIE1_bits_t;
549 extern volatile __PIE1_bits_t __at(PIE1_ADDR) PIE1_bits;
550
551 #ifndef NO_BIT_DEFINES
552 #define TMR1IE               PIE1_bits.TMR1IE
553 #define OSFIE                PIE1_bits.OSFIE
554 #define C1IE                 PIE1_bits.C1IE
555 #define C2IE                 PIE1_bits.C2IE
556 #define CRIE                 PIE1_bits.CRIE
557 #define LVDIE                PIE1_bits.LVDIE
558 #define EEIE                 PIE1_bits.EEIE
559 #endif /* NO_BIT_DEFINES */
560
561 // ----- PIR1 bits --------------------
562 typedef union {
563   struct {
564     unsigned char TMR1IF:1;
565     unsigned char :1;
566     unsigned char OSFIF:1;
567     unsigned char C1IF:1;
568     unsigned char C2IF:1;
569     unsigned char CRIF:1;
570     unsigned char LVDIF:1;
571     unsigned char EEIF:1;
572   };
573 } __PIR1_bits_t;
574 extern volatile __PIR1_bits_t __at(PIR1_ADDR) PIR1_bits;
575
576 #ifndef NO_BIT_DEFINES
577 #define TMR1IF               PIR1_bits.TMR1IF
578 #define OSFIF                PIR1_bits.OSFIF
579 #define C1IF                 PIR1_bits.C1IF
580 #define C2IF                 PIR1_bits.C2IF
581 #define CRIF                 PIR1_bits.CRIF
582 #define LVDIF                PIR1_bits.LVDIF
583 #define EEIF                 PIR1_bits.EEIF
584 #endif /* NO_BIT_DEFINES */
585
586 // ----- PORTA bits --------------------
587 typedef union {
588   struct {
589     unsigned char RA0:1;
590     unsigned char RA1:1;
591     unsigned char RA2:1;
592     unsigned char RA3:1;
593     unsigned char RA4:1;
594     unsigned char RA5:1;
595     unsigned char :1;
596     unsigned char :1;
597   };
598 } __PORTA_bits_t;
599 extern volatile __PORTA_bits_t __at(PORTA_ADDR) PORTA_bits;
600
601 #ifndef NO_BIT_DEFINES
602 #define RA0                  PORTA_bits.RA0
603 #define RA1                  PORTA_bits.RA1
604 #define RA2                  PORTA_bits.RA2
605 #define RA3                  PORTA_bits.RA3
606 #define RA4                  PORTA_bits.RA4
607 #define RA5                  PORTA_bits.RA5
608 #endif /* NO_BIT_DEFINES */
609
610 // ----- PORTC bits --------------------
611 typedef union {
612   struct {
613     unsigned char RC0:1;
614     unsigned char RC1:1;
615     unsigned char RC2:1;
616     unsigned char RC3:1;
617     unsigned char RC4:1;
618     unsigned char RC5:1;
619     unsigned char RC6:1;
620     unsigned char RC7:1;
621   };
622 } __PORTC_bits_t;
623 extern volatile __PORTC_bits_t __at(PORTC_ADDR) PORTC_bits;
624
625 #ifndef NO_BIT_DEFINES
626 #define RC0                  PORTC_bits.RC0
627 #define RC1                  PORTC_bits.RC1
628 #define RC2                  PORTC_bits.RC2
629 #define RC3                  PORTC_bits.RC3
630 #define RC4                  PORTC_bits.RC4
631 #define RC5                  PORTC_bits.RC5
632 #define RC6                  PORTC_bits.RC6
633 #define RC7                  PORTC_bits.RC7
634 #endif /* NO_BIT_DEFINES */
635
636 // ----- STATUS bits --------------------
637 typedef union {
638   struct {
639     unsigned char C:1;
640     unsigned char DC:1;
641     unsigned char Z:1;
642     unsigned char NOT_PD:1;
643     unsigned char NOT_TO:1;
644     unsigned char RP0:1;
645     unsigned char RP1:1;
646     unsigned char IRP:1;
647   };
648 } __STATUS_bits_t;
649 extern volatile __STATUS_bits_t __at(STATUS_ADDR) STATUS_bits;
650
651 #ifndef NO_BIT_DEFINES
652 #define C                    STATUS_bits.C
653 #define DC                   STATUS_bits.DC
654 #define Z                    STATUS_bits.Z
655 #define NOT_PD               STATUS_bits.NOT_PD
656 #define NOT_TO               STATUS_bits.NOT_TO
657 #define RP0                  STATUS_bits.RP0
658 #define RP1                  STATUS_bits.RP1
659 #define IRP                  STATUS_bits.IRP
660 #endif /* NO_BIT_DEFINES */
661
662 // ----- T1CON bits --------------------
663 typedef union {
664   struct {
665     unsigned char TMR1ON:1;
666     unsigned char TMR1CS:1;
667     unsigned char NOT_T1SYNC:1;
668     unsigned char T1OSCEN:1;
669     unsigned char T1CKPS0:1;
670     unsigned char T1CKPS1:1;
671     unsigned char TMR1GE:1;
672     unsigned char T1GINV:1;
673   };
674 } __T1CON_bits_t;
675 extern volatile __T1CON_bits_t __at(T1CON_ADDR) T1CON_bits;
676
677 #ifndef NO_BIT_DEFINES
678 #define TMR1ON               T1CON_bits.TMR1ON
679 #define TMR1CS               T1CON_bits.TMR1CS
680 #define NOT_T1SYNC           T1CON_bits.NOT_T1SYNC
681 #define T1OSCEN              T1CON_bits.T1OSCEN
682 #define T1CKPS0              T1CON_bits.T1CKPS0
683 #define T1CKPS1              T1CON_bits.T1CKPS1
684 #define TMR1GE               T1CON_bits.TMR1GE
685 #define T1GINV               T1CON_bits.T1GINV
686 #endif /* NO_BIT_DEFINES */
687
688 // ----- TRISA bits --------------------
689 typedef union {
690   struct {
691     unsigned char TRISA0:1;
692     unsigned char TRISA1:1;
693     unsigned char TRISA2:1;
694     unsigned char TRISA3:1;
695     unsigned char TRISA4:1;
696     unsigned char TRISA5:1;
697     unsigned char :1;
698     unsigned char :1;
699   };
700 } __TRISA_bits_t;
701 extern volatile __TRISA_bits_t __at(TRISA_ADDR) TRISA_bits;
702
703 #ifndef NO_BIT_DEFINES
704 #define TRISA0               TRISA_bits.TRISA0
705 #define TRISA1               TRISA_bits.TRISA1
706 #define TRISA2               TRISA_bits.TRISA2
707 #define TRISA3               TRISA_bits.TRISA3
708 #define TRISA4               TRISA_bits.TRISA4
709 #define TRISA5               TRISA_bits.TRISA5
710 #endif /* NO_BIT_DEFINES */
711
712 // ----- TRISC bits --------------------
713 typedef union {
714   struct {
715     unsigned char TRISC0:1;
716     unsigned char TRISC1:1;
717     unsigned char TRISC2:1;
718     unsigned char TRISC3:1;
719     unsigned char TRISC4:1;
720     unsigned char TRISC5:1;
721     unsigned char TRISC6:1;
722     unsigned char TRISC7:1;
723   };
724 } __TRISC_bits_t;
725 extern volatile __TRISC_bits_t __at(TRISC_ADDR) TRISC_bits;
726
727 #ifndef NO_BIT_DEFINES
728 #define TRISC0               TRISC_bits.TRISC0
729 #define TRISC1               TRISC_bits.TRISC1
730 #define TRISC2               TRISC_bits.TRISC2
731 #define TRISC3               TRISC_bits.TRISC3
732 #define TRISC4               TRISC_bits.TRISC4
733 #define TRISC5               TRISC_bits.TRISC5
734 #define TRISC6               TRISC_bits.TRISC6
735 #define TRISC7               TRISC_bits.TRISC7
736 #endif /* NO_BIT_DEFINES */
737
738 // ----- VRCON bits --------------------
739 typedef union {
740   struct {
741     unsigned char VR0:1;
742     unsigned char VR1:1;
743     unsigned char VR2:1;
744     unsigned char VR3:1;
745     unsigned char :1;
746     unsigned char VRR:1;
747     unsigned char :1;
748     unsigned char VREN:1;
749   };
750 } __VRCON_bits_t;
751 extern volatile __VRCON_bits_t __at(VRCON_ADDR) VRCON_bits;
752
753 #ifndef NO_BIT_DEFINES
754 #define VR0                  VRCON_bits.VR0
755 #define VR1                  VRCON_bits.VR1
756 #define VR2                  VRCON_bits.VR2
757 #define VR3                  VRCON_bits.VR3
758 #define VRR                  VRCON_bits.VRR
759 #define VREN                 VRCON_bits.VREN
760 #endif /* NO_BIT_DEFINES */
761
762 // ----- WDA bits --------------------
763 typedef union {
764   struct {
765     unsigned char WDA0:1;
766     unsigned char WDA1:1;
767     unsigned char WDA2:1;
768     unsigned char :1;
769     unsigned char WDA4:1;
770     unsigned char WDA5:1;
771     unsigned char :1;
772     unsigned char :1;
773   };
774 } __WDA_bits_t;
775 extern volatile __WDA_bits_t __at(WDA_ADDR) WDA_bits;
776
777 #ifndef NO_BIT_DEFINES
778 #define WDA0                 WDA_bits.WDA0
779 #define WDA1                 WDA_bits.WDA1
780 #define WDA2                 WDA_bits.WDA2
781 #define WDA4                 WDA_bits.WDA4
782 #define WDA5                 WDA_bits.WDA5
783 #endif /* NO_BIT_DEFINES */
784
785 // ----- WDTCON bits --------------------
786 typedef union {
787   struct {
788     unsigned char SWDTEN:1;
789     unsigned char WDTPS0:1;
790     unsigned char WDTPS1:1;
791     unsigned char WDTPS2:1;
792     unsigned char WDTPS3:1;
793     unsigned char :1;
794     unsigned char :1;
795     unsigned char :1;
796   };
797 } __WDTCON_bits_t;
798 extern volatile __WDTCON_bits_t __at(WDTCON_ADDR) WDTCON_bits;
799
800 #ifndef NO_BIT_DEFINES
801 #define SWDTEN               WDTCON_bits.SWDTEN
802 #define WDTPS0               WDTCON_bits.WDTPS0
803 #define WDTPS1               WDTCON_bits.WDTPS1
804 #define WDTPS2               WDTCON_bits.WDTPS2
805 #define WDTPS3               WDTCON_bits.WDTPS3
806 #endif /* NO_BIT_DEFINES */
807
808 // ----- WPUDA bits --------------------
809 typedef union {
810   struct {
811     unsigned char WPUDA0:1;
812     unsigned char WPUDA1:1;
813     unsigned char WPUDA2:1;
814     unsigned char :1;
815     unsigned char WPUDA4:1;
816     unsigned char WPUDA5:1;
817     unsigned char :1;
818     unsigned char :1;
819   };
820 } __WPUDA_bits_t;
821 extern volatile __WPUDA_bits_t __at(WPUDA_ADDR) WPUDA_bits;
822
823 #ifndef NO_BIT_DEFINES
824 #define WPUDA0               WPUDA_bits.WPUDA0
825 #define WPUDA1               WPUDA_bits.WPUDA1
826 #define WPUDA2               WPUDA_bits.WPUDA2
827 #define WPUDA4               WPUDA_bits.WPUDA4
828 #define WPUDA5               WPUDA_bits.WPUDA5
829 #endif /* NO_BIT_DEFINES */
830
831 #endif