2b6c26dcf573b31f3d24d9f8175c88228df693f0
[fw/sdcc] / device / include / pic / pic16f636.h
1 //
2 // Register Declarations for Microchip 16F636 Processor
3 //
4 //
5 // This header file was automatically generated by:
6 //
7 //      inc2h.pl V4585
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 P16F636_H
23 #define P16F636_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 // P16F636.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 PIC16F636 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 /PIC16F636
86 //       2. LIST directive in the source file
87 //               LIST   P=PIC16F636
88 //       3. Processor Type entry in the MPASM full-screen interface
89
90 //==========================================================================
91 //
92 //       Revision History
93 //
94 //==========================================================================
95 //1.00   12/07/03 Original
96 //1.10  04/19/04 Update to match first release datasheet  --kjd
97 //1.20  06/07/04 Update and correct badram definitions  --kjd
98 //==========================================================================
99 //
100 //       Verify Processor
101 //
102 //==========================================================================
103
104 //        IFNDEF __16F636
105 //            MESSG "Processor-header file mismatch.  Verify selected processor."
106 //         ENDIF
107
108 //==========================================================================
109 //
110 //       Register Definitions
111 //
112 //==========================================================================
113
114 #define W                    0x0000
115 #define F                    0x0001
116
117 //----- Register Files------------------------------------------------------
118 //Bank 0
119 extern __sfr  __at (INDF_ADDR)                    INDF;
120 extern __sfr  __at (TMR0_ADDR)                    TMR0;
121 extern __sfr  __at (PCL_ADDR)                     PCL;
122 extern __sfr  __at (STATUS_ADDR)                  STATUS;
123 extern __sfr  __at (FSR_ADDR)                     FSR;
124 extern __sfr  __at (PORTA_ADDR)                   PORTA;
125
126 extern __sfr  __at (PORTC_ADDR)                   PORTC;
127
128 extern __sfr  __at (PCLATH_ADDR)                  PCLATH;
129 extern __sfr  __at (INTCON_ADDR)                  INTCON;
130 extern __sfr  __at (PIR1_ADDR)                    PIR1;
131
132 extern __sfr  __at (TMR1L_ADDR)                   TMR1L;                
133 extern __sfr  __at (TMR1H_ADDR)                   TMR1H;                
134 extern __sfr  __at (T1CON_ADDR)                   T1CON;                
135
136 extern __sfr  __at (WDTCON_ADDR)                  WDTCON;
137 extern __sfr  __at (CMCON0_ADDR)                  CMCON0;               
138 extern __sfr  __at (CMCON1_ADDR)                  CMCON1;               
139
140 //Bank 1
141 extern __sfr  __at (OPTION_REG_ADDR)              OPTION_REG;
142
143 extern __sfr  __at (TRISA_ADDR)                   TRISA;
144 extern __sfr  __at (TRISC_ADDR)                   TRISC;
145
146 extern __sfr  __at (PIE1_ADDR)                    PIE1;
147
148 extern __sfr  __at (PCON_ADDR)                    PCON;
149 extern __sfr  __at (OSCCON_ADDR)                  OSCCON;
150 extern __sfr  __at (OSCTUNE_ADDR)                 OSCTUNE;
151
152 extern __sfr  __at (LVDCON_ADDR)                  LVDCON;
153 extern __sfr  __at (WPUDA_ADDR)                   WPUDA;
154 extern __sfr  __at (IOCA_ADDR)                    IOCA;
155 extern __sfr  __at (WDA_ADDR)                     WDA;
156
157 extern __sfr  __at (VRCON_ADDR)                   VRCON;
158 extern __sfr  __at (EEDAT_ADDR)                   EEDAT;        
159 extern __sfr  __at (EEDATA_ADDR)                  EEDATA;       
160 extern __sfr  __at (EEADR_ADDR)                   EEADR;        
161 extern __sfr  __at (EECON1_ADDR)                  EECON1;
162 extern __sfr  __at (EECON2_ADDR)                  EECON2;
163
164 //Bank 2
165 extern __sfr  __at (CRCON_ADDR)                   CRCON;
166 extern __sfr  __at (CRDAT0_ADDR)                  CRDAT0;
167 extern __sfr  __at (CRDAT1_ADDR)                  CRDAT1;
168 extern __sfr  __at (CRDAT2_ADDR)                  CRDAT2;
169 extern __sfr  __at (CRDAT3_ADDR)                  CRDAT3;
170
171 //----- STATUS Bits --------------------------------------------------------
172
173
174 //----- INTCON Bits --------------------------------------------------------
175
176
177 //----- PIR1 Bits ----------------------------------------------------------
178
179
180 //----- T1CON Bits ---------------------------------------------------------
181
182
183 //----- WDTCON Bits --------------------------------------------------------
184
185
186 //----- CMCON0 Bits -------------------------------------------------------
187
188
189 //----- CMCON1 Bits -------------------------------------------------------
190
191
192 //----- OPTION Bits --------------------------------------------------------
193
194
195 //----- PIE1 Bits ----------------------------------------------------------
196
197
198 //----- PCON Bits ----------------------------------------------------------
199
200
201 //----- OSCCON Bits --------------------------------------------------------
202
203
204 //----- OSCTUNE Bits -------------------------------------------------------
205
206
207 //----- IOCA --------------------------------------------------------------
208
209
210 //----- EECON1 -------------------------------------------------------------
211
212
213 //----- VRCON ---------------------------------------------------------
214
215
216
217 //----- CRCON -------------------------------------------------------------
218
219
220 //----- LVDCON -------------------------------------------------------------
221
222
223 //----- WDA    -------------------------------------------------------------
224
225
226 //----- WPUDA    -------------------------------------------------------------
227
228
229
230 //==========================================================================
231 //
232 //       RAM Definition
233 //
234 //==========================================================================
235
236 //         __MAXRAM H'1FF'
237 //         __BADRAM H'06', H'08'-H'09', H'0D', H'11'-H'17', H'1B'-H'1F'
238 //         __BADRAM H'86', H'88'-H'89', H'8D', H'91'-H'93', H'98', H'9E'-H'9F', H'C0'-H'EF'
239 //              __BADRAM H'10C'-H'10F', H'115'-H'16F', H'106', H'108'-H'109', H'186'
240 //              __BADRAM H'188'-H'189', H'18C'-H'1EF'
241
242 //==========================================================================
243 //
244 //       Configuration Bits
245 //
246 //==========================================================================
247 #define _WUREN_ON            0x2FFF
248 #define _WUREN_OFF           0x3FFF
249 #define _FCMEN_ON            0x3FFF
250 #define _FCMEN_OFF           0x37FF
251 #define _IESO_ON             0x3FFF
252 #define _IESO_OFF            0x3BFF
253 #define _BOD_ON              0x3FFF
254 #define _BOD_NSLEEP          0x3EFF
255 #define _BOD_SBODEN          0x3DFF
256 #define _BOD_OFF             0x3CFF
257 #define _CPD_ON              0x3F7F
258 #define _CPD_OFF             0x3FFF
259 #define _CP_ON               0x3FBF
260 #define _CP_OFF              0x3FFF
261 #define _MCLRE_ON            0x3FFF
262 #define _MCLRE_OFF           0x3FDF
263 #define _PWRTE_OFF           0x3FFF
264 #define _PWRTE_ON            0x3FEF
265 #define _WDT_ON              0x3FFF
266 #define _WDT_OFF             0x3FF7
267 #define _LP_OSC              0x3FF8
268 #define _XT_OSC              0x3FF9
269 #define _HS_OSC              0x3FFA
270 #define _EC_OSC              0x3FFB
271 #define _INTRC_OSC_NOCLKOUT  0x3FFC
272 #define _INTRC_OSC_CLKOUT    0x3FFD
273 #define _EXTRC_OSC_NOCLKOUT  0x3FFE
274 #define _EXTRC_OSC_CLKOUT    0x3FFF
275
276 //         LIST
277
278 // ----- CMCON0 bits --------------------
279 typedef union {
280   struct {
281     unsigned char CM0:1;
282     unsigned char CM1:1;
283     unsigned char CM2:1;
284     unsigned char CIS:1;
285     unsigned char C1INV:1;
286     unsigned char C2INV:1;
287     unsigned char C1OUT:1;
288     unsigned char C2OUT:1;
289   };
290 } __CMCON0_bits_t;
291 extern volatile __CMCON0_bits_t __at(CMCON0_ADDR) CMCON0_bits;
292
293 #define CM0                  CMCON0_bits.CM0
294 #define CM1                  CMCON0_bits.CM1
295 #define CM2                  CMCON0_bits.CM2
296 #define CIS                  CMCON0_bits.CIS
297 #define C1INV                CMCON0_bits.C1INV
298 #define C2INV                CMCON0_bits.C2INV
299 #define C1OUT                CMCON0_bits.C1OUT
300 #define C2OUT                CMCON0_bits.C2OUT
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 #define C2SYNC               CMCON1_bits.C2SYNC
318 #define T1GSS                CMCON1_bits.T1GSS
319
320 // ----- CRCON bits --------------------
321 typedef union {
322   struct {
323     unsigned char CRREG0:1;
324     unsigned char CRREG1:1;
325     unsigned char :1;
326     unsigned char :1;
327     unsigned char :1;
328     unsigned char :1;
329     unsigned char ENC_DEC:1;
330     unsigned char GO:1;
331   };
332 } __CRCON_bits_t;
333 extern volatile __CRCON_bits_t __at(CRCON_ADDR) CRCON_bits;
334
335 #define CRREG0               CRCON_bits.CRREG0
336 #define CRREG1               CRCON_bits.CRREG1
337 #define ENC_DEC              CRCON_bits.ENC_DEC
338 #define GO                   CRCON_bits.GO
339
340 // ----- EECON1 bits --------------------
341 typedef union {
342   struct {
343     unsigned char RD:1;
344     unsigned char WR:1;
345     unsigned char WREN:1;
346     unsigned char WRERR:1;
347     unsigned char :1;
348     unsigned char :1;
349     unsigned char :1;
350     unsigned char :1;
351   };
352 } __EECON1_bits_t;
353 extern volatile __EECON1_bits_t __at(EECON1_ADDR) EECON1_bits;
354
355 #define RD                   EECON1_bits.RD
356 #define WR                   EECON1_bits.WR
357 #define WREN                 EECON1_bits.WREN
358 #define WRERR                EECON1_bits.WRERR
359
360 // ----- INTCON bits --------------------
361 typedef union {
362   struct {
363     unsigned char RAIF:1;
364     unsigned char INTF:1;
365     unsigned char T0IF:1;
366     unsigned char RAIE:1;
367     unsigned char INTE:1;
368     unsigned char T0IE:1;
369     unsigned char PEIE:1;
370     unsigned char GIE:1;
371   };
372 } __INTCON_bits_t;
373 extern volatile __INTCON_bits_t __at(INTCON_ADDR) INTCON_bits;
374
375 #define RAIF                 INTCON_bits.RAIF
376 #define INTF                 INTCON_bits.INTF
377 #define T0IF                 INTCON_bits.T0IF
378 #define RAIE                 INTCON_bits.RAIE
379 #define INTE                 INTCON_bits.INTE
380 #define T0IE                 INTCON_bits.T0IE
381 #define PEIE                 INTCON_bits.PEIE
382 #define GIE                  INTCON_bits.GIE
383
384 // ----- IOCA bits --------------------
385 typedef union {
386   struct {
387     unsigned char IOCA0:1;
388     unsigned char IOCA1:1;
389     unsigned char IOCA2:1;
390     unsigned char IOCA3:1;
391     unsigned char IOCA4:1;
392     unsigned char IOCA5:1;
393     unsigned char :1;
394     unsigned char :1;
395   };
396 } __IOCA_bits_t;
397 extern volatile __IOCA_bits_t __at(IOCA_ADDR) IOCA_bits;
398
399 #define IOCA0                IOCA_bits.IOCA0
400 #define IOCA1                IOCA_bits.IOCA1
401 #define IOCA2                IOCA_bits.IOCA2
402 #define IOCA3                IOCA_bits.IOCA3
403 #define IOCA4                IOCA_bits.IOCA4
404 #define IOCA5                IOCA_bits.IOCA5
405
406 // ----- LVDCON bits --------------------
407 typedef union {
408   struct {
409     unsigned char LVDL0:1;
410     unsigned char LVDL1:1;
411     unsigned char LVDL2:1;
412     unsigned char :1;
413     unsigned char LVDEN:1;
414     unsigned char IRVST:1;
415     unsigned char :1;
416     unsigned char :1;
417   };
418 } __LVDCON_bits_t;
419 extern volatile __LVDCON_bits_t __at(LVDCON_ADDR) LVDCON_bits;
420
421 #define LVDL0                LVDCON_bits.LVDL0
422 #define LVDL1                LVDCON_bits.LVDL1
423 #define LVDL2                LVDCON_bits.LVDL2
424 #define LVDEN                LVDCON_bits.LVDEN
425 #define IRVST                LVDCON_bits.IRVST
426
427 // ----- OPTION_REG bits --------------------
428 typedef union {
429   struct {
430     unsigned char PS0:1;
431     unsigned char PS1:1;
432     unsigned char PS2:1;
433     unsigned char PSA:1;
434     unsigned char T0SE:1;
435     unsigned char T0CS:1;
436     unsigned char INTEDG:1;
437     unsigned char NOT_RAPU:1;
438   };
439 } __OPTION_REG_bits_t;
440 extern volatile __OPTION_REG_bits_t __at(OPTION_REG_ADDR) OPTION_REG_bits;
441
442 #define PS0                  OPTION_REG_bits.PS0
443 #define PS1                  OPTION_REG_bits.PS1
444 #define PS2                  OPTION_REG_bits.PS2
445 #define PSA                  OPTION_REG_bits.PSA
446 #define T0SE                 OPTION_REG_bits.T0SE
447 #define T0CS                 OPTION_REG_bits.T0CS
448 #define INTEDG               OPTION_REG_bits.INTEDG
449 #define NOT_RAPU             OPTION_REG_bits.NOT_RAPU
450
451 // ----- OSCCON bits --------------------
452 typedef union {
453   struct {
454     unsigned char SCS:1;
455     unsigned char LTS:1;
456     unsigned char HTS:1;
457     unsigned char OSTS:1;
458     unsigned char IRCF0:1;
459     unsigned char IRCF1:1;
460     unsigned char IRCF2:1;
461     unsigned char :1;
462   };
463 } __OSCCON_bits_t;
464 extern volatile __OSCCON_bits_t __at(OSCCON_ADDR) OSCCON_bits;
465
466 #define SCS                  OSCCON_bits.SCS
467 #define LTS                  OSCCON_bits.LTS
468 #define HTS                  OSCCON_bits.HTS
469 #define OSTS                 OSCCON_bits.OSTS
470 #define IRCF0                OSCCON_bits.IRCF0
471 #define IRCF1                OSCCON_bits.IRCF1
472 #define IRCF2                OSCCON_bits.IRCF2
473
474 // ----- OSCTUNE bits --------------------
475 typedef union {
476   struct {
477     unsigned char TUN0:1;
478     unsigned char TUN1:1;
479     unsigned char TUN2:1;
480     unsigned char TUN3:1;
481     unsigned char TUN4:1;
482     unsigned char :1;
483     unsigned char :1;
484     unsigned char :1;
485   };
486 } __OSCTUNE_bits_t;
487 extern volatile __OSCTUNE_bits_t __at(OSCTUNE_ADDR) OSCTUNE_bits;
488
489 #define TUN0                 OSCTUNE_bits.TUN0
490 #define TUN1                 OSCTUNE_bits.TUN1
491 #define TUN2                 OSCTUNE_bits.TUN2
492 #define TUN3                 OSCTUNE_bits.TUN3
493 #define TUN4                 OSCTUNE_bits.TUN4
494
495 // ----- PCON bits --------------------
496 typedef union {
497   struct {
498     unsigned char NOT_BOD:1;
499     unsigned char NOT_POR:1;
500     unsigned char :1;
501     unsigned char NOT_WUR:1;
502     unsigned char SBODEN:1;
503     unsigned char ULPWUE:1;
504     unsigned char :1;
505     unsigned char :1;
506   };
507 } __PCON_bits_t;
508 extern volatile __PCON_bits_t __at(PCON_ADDR) PCON_bits;
509
510 #define NOT_BOD              PCON_bits.NOT_BOD
511 #define NOT_POR              PCON_bits.NOT_POR
512 #define NOT_WUR              PCON_bits.NOT_WUR
513 #define SBODEN               PCON_bits.SBODEN
514 #define ULPWUE               PCON_bits.ULPWUE
515
516 // ----- PIE1 bits --------------------
517 typedef union {
518   struct {
519     unsigned char TMR1IE:1;
520     unsigned char :1;
521     unsigned char OSFIE:1;
522     unsigned char C1IE:1;
523     unsigned char C2IE:1;
524     unsigned char CRIE:1;
525     unsigned char LVDIE:1;
526     unsigned char EEIE:1;
527   };
528 } __PIE1_bits_t;
529 extern volatile __PIE1_bits_t __at(PIE1_ADDR) PIE1_bits;
530
531 #define TMR1IE               PIE1_bits.TMR1IE
532 #define OSFIE                PIE1_bits.OSFIE
533 #define C1IE                 PIE1_bits.C1IE
534 #define C2IE                 PIE1_bits.C2IE
535 #define CRIE                 PIE1_bits.CRIE
536 #define LVDIE                PIE1_bits.LVDIE
537 #define EEIE                 PIE1_bits.EEIE
538
539 // ----- PIR1 bits --------------------
540 typedef union {
541   struct {
542     unsigned char TMR1IF:1;
543     unsigned char :1;
544     unsigned char OSFIF:1;
545     unsigned char C1IF:1;
546     unsigned char C2IF:1;
547     unsigned char CRIF:1;
548     unsigned char LVDIF:1;
549     unsigned char EEIF:1;
550   };
551 } __PIR1_bits_t;
552 extern volatile __PIR1_bits_t __at(PIR1_ADDR) PIR1_bits;
553
554 #define TMR1IF               PIR1_bits.TMR1IF
555 #define OSFIF                PIR1_bits.OSFIF
556 #define C1IF                 PIR1_bits.C1IF
557 #define C2IF                 PIR1_bits.C2IF
558 #define CRIF                 PIR1_bits.CRIF
559 #define LVDIF                PIR1_bits.LVDIF
560 #define EEIF                 PIR1_bits.EEIF
561
562 // ----- PORTA bits --------------------
563 typedef union {
564   struct {
565     unsigned char RA0:1;
566     unsigned char RA1:1;
567     unsigned char RA2:1;
568     unsigned char RA3:1;
569     unsigned char RA4:1;
570     unsigned char RA5:1;
571     unsigned char :1;
572     unsigned char :1;
573   };
574 } __PORTA_bits_t;
575 extern volatile __PORTA_bits_t __at(PORTA_ADDR) PORTA_bits;
576
577 #define RA0                  PORTA_bits.RA0
578 #define RA1                  PORTA_bits.RA1
579 #define RA2                  PORTA_bits.RA2
580 #define RA3                  PORTA_bits.RA3
581 #define RA4                  PORTA_bits.RA4
582 #define RA5                  PORTA_bits.RA5
583
584 // ----- PORTC bits --------------------
585 typedef union {
586   struct {
587     unsigned char RC0:1;
588     unsigned char RC1:1;
589     unsigned char RC2:1;
590     unsigned char RC3:1;
591     unsigned char RC4:1;
592     unsigned char RC5:1;
593     unsigned char RC6:1;
594     unsigned char RC7:1;
595   };
596 } __PORTC_bits_t;
597 extern volatile __PORTC_bits_t __at(PORTC_ADDR) PORTC_bits;
598
599 #define RC0                  PORTC_bits.RC0
600 #define RC1                  PORTC_bits.RC1
601 #define RC2                  PORTC_bits.RC2
602 #define RC3                  PORTC_bits.RC3
603 #define RC4                  PORTC_bits.RC4
604 #define RC5                  PORTC_bits.RC5
605 #define RC6                  PORTC_bits.RC6
606 #define RC7                  PORTC_bits.RC7
607
608 // ----- STATUS bits --------------------
609 typedef union {
610   struct {
611     unsigned char C:1;
612     unsigned char DC:1;
613     unsigned char Z:1;
614     unsigned char NOT_PD:1;
615     unsigned char NOT_TO:1;
616     unsigned char RP0:1;
617     unsigned char RP1:1;
618     unsigned char IRP:1;
619   };
620 } __STATUS_bits_t;
621 extern volatile __STATUS_bits_t __at(STATUS_ADDR) STATUS_bits;
622
623 #define C                    STATUS_bits.C
624 #define DC                   STATUS_bits.DC
625 #define Z                    STATUS_bits.Z
626 #define NOT_PD               STATUS_bits.NOT_PD
627 #define NOT_TO               STATUS_bits.NOT_TO
628 #define RP0                  STATUS_bits.RP0
629 #define RP1                  STATUS_bits.RP1
630 #define IRP                  STATUS_bits.IRP
631
632 // ----- T1CON bits --------------------
633 typedef union {
634   struct {
635     unsigned char TMR1ON:1;
636     unsigned char TMR1CS:1;
637     unsigned char NOT_T1SYNC:1;
638     unsigned char T1OSCEN:1;
639     unsigned char T1CKPS0:1;
640     unsigned char T1CKPS1:1;
641     unsigned char TMR1GE:1;
642     unsigned char T1GINV:1;
643   };
644 } __T1CON_bits_t;
645 extern volatile __T1CON_bits_t __at(T1CON_ADDR) T1CON_bits;
646
647 #define TMR1ON               T1CON_bits.TMR1ON
648 #define TMR1CS               T1CON_bits.TMR1CS
649 #define NOT_T1SYNC           T1CON_bits.NOT_T1SYNC
650 #define T1OSCEN              T1CON_bits.T1OSCEN
651 #define T1CKPS0              T1CON_bits.T1CKPS0
652 #define T1CKPS1              T1CON_bits.T1CKPS1
653 #define TMR1GE               T1CON_bits.TMR1GE
654 #define T1GINV               T1CON_bits.T1GINV
655
656 // ----- TRISA bits --------------------
657 typedef union {
658   struct {
659     unsigned char TRISA0:1;
660     unsigned char TRISA1:1;
661     unsigned char TRISA2:1;
662     unsigned char TRISA3:1;
663     unsigned char TRISA4:1;
664     unsigned char TRISA5:1;
665     unsigned char :1;
666     unsigned char :1;
667   };
668 } __TRISA_bits_t;
669 extern volatile __TRISA_bits_t __at(TRISA_ADDR) TRISA_bits;
670
671 #define TRISA0               TRISA_bits.TRISA0
672 #define TRISA1               TRISA_bits.TRISA1
673 #define TRISA2               TRISA_bits.TRISA2
674 #define TRISA3               TRISA_bits.TRISA3
675 #define TRISA4               TRISA_bits.TRISA4
676 #define TRISA5               TRISA_bits.TRISA5
677
678 // ----- TRISC bits --------------------
679 typedef union {
680   struct {
681     unsigned char TRISC0:1;
682     unsigned char TRISC1:1;
683     unsigned char TRISC2:1;
684     unsigned char TRISC3:1;
685     unsigned char TRISC4:1;
686     unsigned char TRISC5:1;
687     unsigned char TRISC6:1;
688     unsigned char TRISC7:1;
689   };
690 } __TRISC_bits_t;
691 extern volatile __TRISC_bits_t __at(TRISC_ADDR) TRISC_bits;
692
693 #define TRISC0               TRISC_bits.TRISC0
694 #define TRISC1               TRISC_bits.TRISC1
695 #define TRISC2               TRISC_bits.TRISC2
696 #define TRISC3               TRISC_bits.TRISC3
697 #define TRISC4               TRISC_bits.TRISC4
698 #define TRISC5               TRISC_bits.TRISC5
699 #define TRISC6               TRISC_bits.TRISC6
700 #define TRISC7               TRISC_bits.TRISC7
701
702 // ----- VRCON bits --------------------
703 typedef union {
704   struct {
705     unsigned char VR0:1;
706     unsigned char VR1:1;
707     unsigned char VR2:1;
708     unsigned char VR3:1;
709     unsigned char :1;
710     unsigned char VRR:1;
711     unsigned char :1;
712     unsigned char VREN:1;
713   };
714 } __VRCON_bits_t;
715 extern volatile __VRCON_bits_t __at(VRCON_ADDR) VRCON_bits;
716
717 #define VR0                  VRCON_bits.VR0
718 #define VR1                  VRCON_bits.VR1
719 #define VR2                  VRCON_bits.VR2
720 #define VR3                  VRCON_bits.VR3
721 #define VRR                  VRCON_bits.VRR
722 #define VREN                 VRCON_bits.VREN
723
724 // ----- WDA bits --------------------
725 typedef union {
726   struct {
727     unsigned char WDA0:1;
728     unsigned char WDA1:1;
729     unsigned char WDA2:1;
730     unsigned char :1;
731     unsigned char WDA4:1;
732     unsigned char WDA5:1;
733     unsigned char :1;
734     unsigned char :1;
735   };
736 } __WDA_bits_t;
737 extern volatile __WDA_bits_t __at(WDA_ADDR) WDA_bits;
738
739 #define WDA0                 WDA_bits.WDA0
740 #define WDA1                 WDA_bits.WDA1
741 #define WDA2                 WDA_bits.WDA2
742 #define WDA4                 WDA_bits.WDA4
743 #define WDA5                 WDA_bits.WDA5
744
745 // ----- WDTCON bits --------------------
746 typedef union {
747   struct {
748     unsigned char SWDTEN:1;
749     unsigned char WDTPS0:1;
750     unsigned char WDTPS1:1;
751     unsigned char WDTPS2:1;
752     unsigned char WDTPS3:1;
753     unsigned char :1;
754     unsigned char :1;
755     unsigned char :1;
756   };
757 } __WDTCON_bits_t;
758 extern volatile __WDTCON_bits_t __at(WDTCON_ADDR) WDTCON_bits;
759
760 #define SWDTEN               WDTCON_bits.SWDTEN
761 #define WDTPS0               WDTCON_bits.WDTPS0
762 #define WDTPS1               WDTCON_bits.WDTPS1
763 #define WDTPS2               WDTCON_bits.WDTPS2
764 #define WDTPS3               WDTCON_bits.WDTPS3
765
766 // ----- WPUDA bits --------------------
767 typedef union {
768   struct {
769     unsigned char WPUDA0:1;
770     unsigned char WPUDA1:1;
771     unsigned char WPUDA2:1;
772     unsigned char :1;
773     unsigned char WPUDA4:1;
774     unsigned char WPUDA5:1;
775     unsigned char :1;
776     unsigned char :1;
777   };
778 } __WPUDA_bits_t;
779 extern volatile __WPUDA_bits_t __at(WPUDA_ADDR) WPUDA_bits;
780
781 #define WPUDA0               WPUDA_bits.WPUDA0
782 #define WPUDA1               WPUDA_bits.WPUDA1
783 #define WPUDA2               WPUDA_bits.WPUDA2
784 #define WPUDA4               WPUDA_bits.WPUDA4
785 #define WPUDA5               WPUDA_bits.WPUDA5
786
787 #endif