struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f630.h
blob41856ef18d6866c6e974c0fd457f61fee64bd71f
1 /*
2 * This declarations of the PIC16F630 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:22:57 UTC.
9 * SDCC is licensed under the GNU Public license (GPL) v2. Note that
10 * this license covers the code to the compiler and other executables,
11 * but explicitly does not cover any code or objects generated by sdcc.
13 * For pic device libraries and header files which are derived from
14 * Microchip header (.inc) and linker script (.lkr) files Microchip
15 * requires that "The header files should state that they are only to be
16 * used with authentic Microchip devices" which makes them incompatible
17 * with the GPL. Pic device libraries and header files are located at
18 * non-free/lib and non-free/include directories respectively.
19 * Sdcc should be run with the --use-non-free command line option in
20 * order to include non-free header files and libraries.
22 * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
25 #ifndef __PIC16F630_H__
26 #define __PIC16F630_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF_ADDR 0x0000
37 #define TMR0_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR_ADDR 0x0004
41 #define PORTA_ADDR 0x0005
42 #define PORTC_ADDR 0x0007
43 #define PCLATH_ADDR 0x000A
44 #define INTCON_ADDR 0x000B
45 #define PIR1_ADDR 0x000C
46 #define TMR1_ADDR 0x000E
47 #define TMR1L_ADDR 0x000E
48 #define TMR1H_ADDR 0x000F
49 #define T1CON_ADDR 0x0010
50 #define CMCON_ADDR 0x0019
51 #define OPTION_REG_ADDR 0x0081
52 #define TRISA_ADDR 0x0085
53 #define TRISC_ADDR 0x0087
54 #define PIE1_ADDR 0x008C
55 #define PCON_ADDR 0x008E
56 #define OSCCAL_ADDR 0x0090
57 #define WPU_ADDR 0x0095
58 #define WPUA_ADDR 0x0095
59 #define IOC_ADDR 0x0096
60 #define IOCA_ADDR 0x0096
61 #define VRCON_ADDR 0x0099
62 #define EEDAT_ADDR 0x009A
63 #define EEDATA_ADDR 0x009A
64 #define EEADR_ADDR 0x009B
65 #define EECON1_ADDR 0x009C
66 #define EECON2_ADDR 0x009D
68 #endif // #ifndef NO_ADDR_DEFINES
70 //==============================================================================
72 // Register Definitions
74 //==============================================================================
76 extern __at(0x0000) __sfr INDF;
77 extern __at(0x0001) __sfr TMR0;
78 extern __at(0x0002) __sfr PCL;
80 //==============================================================================
81 // STATUS Bits
83 extern __at(0x0003) __sfr STATUS;
85 typedef union
87 struct
89 unsigned C : 1;
90 unsigned DC : 1;
91 unsigned Z : 1;
92 unsigned NOT_PD : 1;
93 unsigned NOT_TO : 1;
94 unsigned RP0 : 1;
95 unsigned RP1 : 1;
96 unsigned IRP : 1;
99 struct
101 unsigned : 5;
102 unsigned RP : 2;
103 unsigned : 1;
105 } __STATUSbits_t;
107 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
109 #define _C 0x01
110 #define _DC 0x02
111 #define _Z 0x04
112 #define _NOT_PD 0x08
113 #define _NOT_TO 0x10
114 #define _RP0 0x20
115 #define _RP1 0x40
116 #define _IRP 0x80
118 //==============================================================================
120 extern __at(0x0004) __sfr FSR;
122 //==============================================================================
123 // PORTA Bits
125 extern __at(0x0005) __sfr PORTA;
127 typedef union
129 struct
131 unsigned RA0 : 1;
132 unsigned RA1 : 1;
133 unsigned RA2 : 1;
134 unsigned RA3 : 1;
135 unsigned RA4 : 1;
136 unsigned RA5 : 1;
137 unsigned : 1;
138 unsigned : 1;
141 struct
143 unsigned RA : 6;
144 unsigned : 2;
146 } __PORTAbits_t;
148 extern __at(0x0005) volatile __PORTAbits_t PORTAbits;
150 #define _RA0 0x01
151 #define _RA1 0x02
152 #define _RA2 0x04
153 #define _RA3 0x08
154 #define _RA4 0x10
155 #define _RA5 0x20
157 //==============================================================================
160 //==============================================================================
161 // PORTC Bits
163 extern __at(0x0007) __sfr PORTC;
165 typedef union
167 struct
169 unsigned RC0 : 1;
170 unsigned RC1 : 1;
171 unsigned RC2 : 1;
172 unsigned RC3 : 1;
173 unsigned RC4 : 1;
174 unsigned RC5 : 1;
175 unsigned : 1;
176 unsigned : 1;
179 struct
181 unsigned RC : 6;
182 unsigned : 2;
184 } __PORTCbits_t;
186 extern __at(0x0007) volatile __PORTCbits_t PORTCbits;
188 #define _RC0 0x01
189 #define _RC1 0x02
190 #define _RC2 0x04
191 #define _RC3 0x08
192 #define _RC4 0x10
193 #define _RC5 0x20
195 //==============================================================================
197 extern __at(0x000A) __sfr PCLATH;
199 //==============================================================================
200 // INTCON Bits
202 extern __at(0x000B) __sfr INTCON;
204 typedef union
206 struct
208 unsigned RAIF : 1;
209 unsigned INTF : 1;
210 unsigned T0IF : 1;
211 unsigned RAIE : 1;
212 unsigned INTE : 1;
213 unsigned T0IE : 1;
214 unsigned PEIE : 1;
215 unsigned GIE : 1;
218 struct
220 unsigned : 1;
221 unsigned : 1;
222 unsigned TMR0IF : 1;
223 unsigned : 1;
224 unsigned : 1;
225 unsigned TMR0IE : 1;
226 unsigned : 1;
227 unsigned : 1;
229 } __INTCONbits_t;
231 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
233 #define _RAIF 0x01
234 #define _INTF 0x02
235 #define _T0IF 0x04
236 #define _TMR0IF 0x04
237 #define _RAIE 0x08
238 #define _INTE 0x10
239 #define _T0IE 0x20
240 #define _TMR0IE 0x20
241 #define _PEIE 0x40
242 #define _GIE 0x80
244 //==============================================================================
247 //==============================================================================
248 // PIR1 Bits
250 extern __at(0x000C) __sfr PIR1;
252 typedef union
254 struct
256 unsigned TMR1IF : 1;
257 unsigned : 1;
258 unsigned : 1;
259 unsigned CMIF : 1;
260 unsigned : 1;
261 unsigned : 1;
262 unsigned : 1;
263 unsigned EEIF : 1;
266 struct
268 unsigned T1IF : 1;
269 unsigned : 1;
270 unsigned : 1;
271 unsigned : 1;
272 unsigned : 1;
273 unsigned : 1;
274 unsigned : 1;
275 unsigned : 1;
277 } __PIR1bits_t;
279 extern __at(0x000C) volatile __PIR1bits_t PIR1bits;
281 #define _TMR1IF 0x01
282 #define _T1IF 0x01
283 #define _CMIF 0x08
284 #define _EEIF 0x80
286 //==============================================================================
288 extern __at(0x000E) __sfr TMR1;
289 extern __at(0x000E) __sfr TMR1L;
290 extern __at(0x000F) __sfr TMR1H;
292 //==============================================================================
293 // T1CON Bits
295 extern __at(0x0010) __sfr T1CON;
297 typedef union
299 struct
301 unsigned TMR1ON : 1;
302 unsigned TMR1CS : 1;
303 unsigned NOT_T1SYNC : 1;
304 unsigned T1OSCEN : 1;
305 unsigned T1CKPS0 : 1;
306 unsigned T1CKPS1 : 1;
307 unsigned TMR1GE : 1;
308 unsigned : 1;
311 struct
313 unsigned : 4;
314 unsigned T1CKPS : 2;
315 unsigned : 2;
317 } __T1CONbits_t;
319 extern __at(0x0010) volatile __T1CONbits_t T1CONbits;
321 #define _TMR1ON 0x01
322 #define _TMR1CS 0x02
323 #define _NOT_T1SYNC 0x04
324 #define _T1OSCEN 0x08
325 #define _T1CKPS0 0x10
326 #define _T1CKPS1 0x20
327 #define _TMR1GE 0x40
329 //==============================================================================
332 //==============================================================================
333 // CMCON Bits
335 extern __at(0x0019) __sfr CMCON;
337 typedef union
339 struct
341 unsigned CM0 : 1;
342 unsigned CM1 : 1;
343 unsigned CM2 : 1;
344 unsigned CIS : 1;
345 unsigned CINV : 1;
346 unsigned : 1;
347 unsigned COUT : 1;
348 unsigned : 1;
351 struct
353 unsigned CM : 3;
354 unsigned : 5;
356 } __CMCONbits_t;
358 extern __at(0x0019) volatile __CMCONbits_t CMCONbits;
360 #define _CM0 0x01
361 #define _CM1 0x02
362 #define _CM2 0x04
363 #define _CIS 0x08
364 #define _CINV 0x10
365 #define _COUT 0x40
367 //==============================================================================
370 //==============================================================================
371 // OPTION_REG Bits
373 extern __at(0x0081) __sfr OPTION_REG;
375 typedef union
377 struct
379 unsigned PS0 : 1;
380 unsigned PS1 : 1;
381 unsigned PS2 : 1;
382 unsigned PSA : 1;
383 unsigned T0SE : 1;
384 unsigned T0CS : 1;
385 unsigned INTEDG : 1;
386 unsigned NOT_RAPU : 1;
389 struct
391 unsigned : 1;
392 unsigned : 1;
393 unsigned : 1;
394 unsigned : 1;
395 unsigned : 1;
396 unsigned : 1;
397 unsigned : 1;
398 unsigned NOT_GPPU : 1;
401 struct
403 unsigned PS : 3;
404 unsigned : 5;
406 } __OPTION_REGbits_t;
408 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits;
410 #define _PS0 0x01
411 #define _PS1 0x02
412 #define _PS2 0x04
413 #define _PSA 0x08
414 #define _T0SE 0x10
415 #define _T0CS 0x20
416 #define _INTEDG 0x40
417 #define _NOT_RAPU 0x80
418 #define _NOT_GPPU 0x80
420 //==============================================================================
423 //==============================================================================
424 // TRISA Bits
426 extern __at(0x0085) __sfr TRISA;
428 typedef union
430 struct
432 unsigned TRISA0 : 1;
433 unsigned TRISA1 : 1;
434 unsigned TRISA2 : 1;
435 unsigned TRISA3 : 1;
436 unsigned TRISA4 : 1;
437 unsigned TRISA5 : 1;
438 unsigned : 1;
439 unsigned : 1;
442 struct
444 unsigned TRISA : 6;
445 unsigned : 2;
447 } __TRISAbits_t;
449 extern __at(0x0085) volatile __TRISAbits_t TRISAbits;
451 #define _TRISA0 0x01
452 #define _TRISA1 0x02
453 #define _TRISA2 0x04
454 #define _TRISA3 0x08
455 #define _TRISA4 0x10
456 #define _TRISA5 0x20
458 //==============================================================================
461 //==============================================================================
462 // TRISC Bits
464 extern __at(0x0087) __sfr TRISC;
466 typedef union
468 struct
470 unsigned TRISC0 : 1;
471 unsigned TRISC1 : 1;
472 unsigned TRISC2 : 1;
473 unsigned TRISC3 : 1;
474 unsigned TRISC4 : 1;
475 unsigned TRISC5 : 1;
476 unsigned : 1;
477 unsigned : 1;
480 struct
482 unsigned TRISC : 6;
483 unsigned : 2;
485 } __TRISCbits_t;
487 extern __at(0x0087) volatile __TRISCbits_t TRISCbits;
489 #define _TRISC0 0x01
490 #define _TRISC1 0x02
491 #define _TRISC2 0x04
492 #define _TRISC3 0x08
493 #define _TRISC4 0x10
494 #define _TRISC5 0x20
496 //==============================================================================
499 //==============================================================================
500 // PIE1 Bits
502 extern __at(0x008C) __sfr PIE1;
504 typedef union
506 struct
508 unsigned TMR1IE : 1;
509 unsigned : 1;
510 unsigned : 1;
511 unsigned CMIE : 1;
512 unsigned : 1;
513 unsigned : 1;
514 unsigned : 1;
515 unsigned EEIE : 1;
518 struct
520 unsigned T1IE : 1;
521 unsigned : 1;
522 unsigned : 1;
523 unsigned : 1;
524 unsigned : 1;
525 unsigned : 1;
526 unsigned : 1;
527 unsigned : 1;
529 } __PIE1bits_t;
531 extern __at(0x008C) volatile __PIE1bits_t PIE1bits;
533 #define _TMR1IE 0x01
534 #define _T1IE 0x01
535 #define _CMIE 0x08
536 #define _EEIE 0x80
538 //==============================================================================
541 //==============================================================================
542 // PCON Bits
544 extern __at(0x008E) __sfr PCON;
546 typedef union
548 struct
550 unsigned NOT_BOR : 1;
551 unsigned NOT_POR : 1;
552 unsigned : 1;
553 unsigned : 1;
554 unsigned : 1;
555 unsigned : 1;
556 unsigned : 1;
557 unsigned : 1;
560 struct
562 unsigned NOT_BOD : 1;
563 unsigned : 1;
564 unsigned : 1;
565 unsigned : 1;
566 unsigned : 1;
567 unsigned : 1;
568 unsigned : 1;
569 unsigned : 1;
571 } __PCONbits_t;
573 extern __at(0x008E) volatile __PCONbits_t PCONbits;
575 #define _NOT_BOR 0x01
576 #define _NOT_BOD 0x01
577 #define _NOT_POR 0x02
579 //==============================================================================
582 //==============================================================================
583 // OSCCAL Bits
585 extern __at(0x0090) __sfr OSCCAL;
587 typedef union
589 struct
591 unsigned : 1;
592 unsigned : 1;
593 unsigned CAL0 : 1;
594 unsigned CAL1 : 1;
595 unsigned CAL2 : 1;
596 unsigned CAL3 : 1;
597 unsigned CAL4 : 1;
598 unsigned CAL5 : 1;
601 struct
603 unsigned : 2;
604 unsigned CAL : 6;
606 } __OSCCALbits_t;
608 extern __at(0x0090) volatile __OSCCALbits_t OSCCALbits;
610 #define _CAL0 0x04
611 #define _CAL1 0x08
612 #define _CAL2 0x10
613 #define _CAL3 0x20
614 #define _CAL4 0x40
615 #define _CAL5 0x80
617 //==============================================================================
620 //==============================================================================
621 // WPU Bits
623 extern __at(0x0095) __sfr WPU;
625 typedef struct
627 unsigned WPUA0 : 1;
628 unsigned WPUA1 : 1;
629 unsigned WPUA2 : 1;
630 unsigned : 1;
631 unsigned WPUA4 : 1;
632 unsigned WPUA5 : 1;
633 unsigned : 1;
634 unsigned : 1;
635 } __WPUbits_t;
637 extern __at(0x0095) volatile __WPUbits_t WPUbits;
639 #define _WPUA0 0x01
640 #define _WPUA1 0x02
641 #define _WPUA2 0x04
642 #define _WPUA4 0x10
643 #define _WPUA5 0x20
645 //==============================================================================
648 //==============================================================================
649 // WPUA Bits
651 extern __at(0x0095) __sfr WPUA;
653 typedef struct
655 unsigned WPUA0 : 1;
656 unsigned WPUA1 : 1;
657 unsigned WPUA2 : 1;
658 unsigned : 1;
659 unsigned WPUA4 : 1;
660 unsigned WPUA5 : 1;
661 unsigned : 1;
662 unsigned : 1;
663 } __WPUAbits_t;
665 extern __at(0x0095) volatile __WPUAbits_t WPUAbits;
667 #define _WPUA_WPUA0 0x01
668 #define _WPUA_WPUA1 0x02
669 #define _WPUA_WPUA2 0x04
670 #define _WPUA_WPUA4 0x10
671 #define _WPUA_WPUA5 0x20
673 //==============================================================================
676 //==============================================================================
677 // IOC Bits
679 extern __at(0x0096) __sfr IOC;
681 typedef union
683 struct
685 unsigned IOCA0 : 1;
686 unsigned IOCA1 : 1;
687 unsigned IOCA2 : 1;
688 unsigned IOCA3 : 1;
689 unsigned IOCA4 : 1;
690 unsigned IOCA5 : 1;
691 unsigned : 1;
692 unsigned : 1;
695 struct
697 unsigned IOCA : 6;
698 unsigned : 2;
700 } __IOCbits_t;
702 extern __at(0x0096) volatile __IOCbits_t IOCbits;
704 #define _IOCA0 0x01
705 #define _IOCA1 0x02
706 #define _IOCA2 0x04
707 #define _IOCA3 0x08
708 #define _IOCA4 0x10
709 #define _IOCA5 0x20
711 //==============================================================================
714 //==============================================================================
715 // IOCA Bits
717 extern __at(0x0096) __sfr IOCA;
719 typedef union
721 struct
723 unsigned IOCA0 : 1;
724 unsigned IOCA1 : 1;
725 unsigned IOCA2 : 1;
726 unsigned IOCA3 : 1;
727 unsigned IOCA4 : 1;
728 unsigned IOCA5 : 1;
729 unsigned : 1;
730 unsigned : 1;
733 struct
735 unsigned IOCA : 6;
736 unsigned : 2;
738 } __IOCAbits_t;
740 extern __at(0x0096) volatile __IOCAbits_t IOCAbits;
742 #define _IOCA_IOCA0 0x01
743 #define _IOCA_IOCA1 0x02
744 #define _IOCA_IOCA2 0x04
745 #define _IOCA_IOCA3 0x08
746 #define _IOCA_IOCA4 0x10
747 #define _IOCA_IOCA5 0x20
749 //==============================================================================
752 //==============================================================================
753 // VRCON Bits
755 extern __at(0x0099) __sfr VRCON;
757 typedef union
759 struct
761 unsigned VR0 : 1;
762 unsigned VR1 : 1;
763 unsigned VR2 : 1;
764 unsigned VR3 : 1;
765 unsigned : 1;
766 unsigned VRR : 1;
767 unsigned : 1;
768 unsigned VREN : 1;
771 struct
773 unsigned VR : 4;
774 unsigned : 4;
776 } __VRCONbits_t;
778 extern __at(0x0099) volatile __VRCONbits_t VRCONbits;
780 #define _VR0 0x01
781 #define _VR1 0x02
782 #define _VR2 0x04
783 #define _VR3 0x08
784 #define _VRR 0x20
785 #define _VREN 0x80
787 //==============================================================================
789 extern __at(0x009A) __sfr EEDAT;
790 extern __at(0x009A) __sfr EEDATA;
791 extern __at(0x009B) __sfr EEADR;
793 //==============================================================================
794 // EECON1 Bits
796 extern __at(0x009C) __sfr EECON1;
798 typedef struct
800 unsigned RD : 1;
801 unsigned WR : 1;
802 unsigned WREN : 1;
803 unsigned WRERR : 1;
804 unsigned : 1;
805 unsigned : 1;
806 unsigned : 1;
807 unsigned : 1;
808 } __EECON1bits_t;
810 extern __at(0x009C) volatile __EECON1bits_t EECON1bits;
812 #define _RD 0x01
813 #define _WR 0x02
814 #define _WREN 0x04
815 #define _WRERR 0x08
817 //==============================================================================
819 extern __at(0x009D) __sfr EECON2;
821 //==============================================================================
823 // Configuration Bits
825 //==============================================================================
827 #define _CONFIG 0x2007
829 //----------------------------- CONFIG Options -------------------------------
831 #define _FOSC_LP 0x3FF8 // LP oscillator: Low power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
832 #define _LP_OSC 0x3FF8 // LP oscillator: Low power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
833 #define _FOSC_XT 0x3FF9 // XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
834 #define _XT_OSC 0x3FF9 // XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
835 #define _FOSC_HS 0x3FFA // HS oscillator: High speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
836 #define _HS_OSC 0x3FFA // HS oscillator: High speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
837 #define _FOSC_EC 0x3FFB // EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN.
838 #define _EC_OSC 0x3FFB // EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN.
839 #define _FOSC_INTRCIO 0x3FFC // INTOSC oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
840 #define _INTRC_OSC_NOCLKOUT 0x3FFC // INTOSC oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
841 #define _FOSC_INTRCCLK 0x3FFD // INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
842 #define _INTRC_OSC_CLKOUT 0x3FFD // INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
843 #define _FOSC_EXTRCIO 0x3FFE // RC oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
844 #define _EXTRC_OSC_NOCLKOUT 0x3FFE // RC oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
845 #define _FOSC_EXTRCCLK 0x3FFF // RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
846 #define _EXTRC_OSC_CLKOUT 0x3FFF // RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN.
847 #define _WDTE_OFF 0x3FF7 // WDT disabled.
848 #define _WDT_OFF 0x3FF7 // WDT disabled.
849 #define _WDTE_ON 0x3FFF // WDT enabled.
850 #define _WDT_ON 0x3FFF // WDT enabled.
851 #define _PWRTE_ON 0x3FEF // PWRT enabled.
852 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
853 #define _MCLRE_OFF 0x3FDF // RA3/MCLR pin function is digital I/O, MCLR internally tied to VDD.
854 #define _MCLRE_ON 0x3FFF // RA3/MCLR pin function is MCLR.
855 #define _BOREN_OFF 0x3FBF // BOD disabled.
856 #define _BODEN_OFF 0x3FBF // BOD disabled.
857 #define _BOREN_ON 0x3FFF // BOD enabled.
858 #define _BODEN 0x3FFF // BOD enabled.
859 #define _CP_ON 0x3F7F // Program Memory code protection is enabled.
860 #define _CP 0x3F7F // Program Memory code protection is enabled.
861 #define _CP_OFF 0x3FFF // Program Memory code protection is disabled.
862 #define _CPD_ON 0x3EFF // Data memory code protection is enabled.
863 #define _CPD 0x3EFF // Data memory code protection is enabled.
864 #define _CPD_OFF 0x3FFF // Data memory code protection is disabled.
866 //==============================================================================
868 #define _DEVID1 0x2006
870 #define _IDLOC0 0x2000
871 #define _IDLOC1 0x2001
872 #define _IDLOC2 0x2002
873 #define _IDLOC3 0x2003
875 //==============================================================================
877 #ifndef NO_BIT_DEFINES
879 #define CM0 CMCONbits.CM0 // bit 0
880 #define CM1 CMCONbits.CM1 // bit 1
881 #define CM2 CMCONbits.CM2 // bit 2
882 #define CIS CMCONbits.CIS // bit 3
883 #define CINV CMCONbits.CINV // bit 4
884 #define COUT CMCONbits.COUT // bit 6
886 #define RD EECON1bits.RD // bit 0
887 #define WR EECON1bits.WR // bit 1
888 #define WREN EECON1bits.WREN // bit 2
889 #define WRERR EECON1bits.WRERR // bit 3
891 #define RAIF INTCONbits.RAIF // bit 0
892 #define INTF INTCONbits.INTF // bit 1
893 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
894 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
895 #define RAIE INTCONbits.RAIE // bit 3
896 #define INTE INTCONbits.INTE // bit 4
897 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
898 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
899 #define PEIE INTCONbits.PEIE // bit 6
900 #define GIE INTCONbits.GIE // bit 7
902 #define IOCA0 IOCbits.IOCA0 // bit 0
903 #define IOCA1 IOCbits.IOCA1 // bit 1
904 #define IOCA2 IOCbits.IOCA2 // bit 2
905 #define IOCA3 IOCbits.IOCA3 // bit 3
906 #define IOCA4 IOCbits.IOCA4 // bit 4
907 #define IOCA5 IOCbits.IOCA5 // bit 5
909 #define PS0 OPTION_REGbits.PS0 // bit 0
910 #define PS1 OPTION_REGbits.PS1 // bit 1
911 #define PS2 OPTION_REGbits.PS2 // bit 2
912 #define PSA OPTION_REGbits.PSA // bit 3
913 #define T0SE OPTION_REGbits.T0SE // bit 4
914 #define T0CS OPTION_REGbits.T0CS // bit 5
915 #define INTEDG OPTION_REGbits.INTEDG // bit 6
916 #define NOT_RAPU OPTION_REGbits.NOT_RAPU // bit 7, shadows bit in OPTION_REGbits
917 #define NOT_GPPU OPTION_REGbits.NOT_GPPU // bit 7, shadows bit in OPTION_REGbits
919 #define CAL0 OSCCALbits.CAL0 // bit 2
920 #define CAL1 OSCCALbits.CAL1 // bit 3
921 #define CAL2 OSCCALbits.CAL2 // bit 4
922 #define CAL3 OSCCALbits.CAL3 // bit 5
923 #define CAL4 OSCCALbits.CAL4 // bit 6
924 #define CAL5 OSCCALbits.CAL5 // bit 7
926 #define NOT_BOR PCONbits.NOT_BOR // bit 0, shadows bit in PCONbits
927 #define NOT_BOD PCONbits.NOT_BOD // bit 0, shadows bit in PCONbits
928 #define NOT_POR PCONbits.NOT_POR // bit 1
930 #define TMR1IE PIE1bits.TMR1IE // bit 0, shadows bit in PIE1bits
931 #define T1IE PIE1bits.T1IE // bit 0, shadows bit in PIE1bits
932 #define CMIE PIE1bits.CMIE // bit 3
933 #define EEIE PIE1bits.EEIE // bit 7
935 #define TMR1IF PIR1bits.TMR1IF // bit 0, shadows bit in PIR1bits
936 #define T1IF PIR1bits.T1IF // bit 0, shadows bit in PIR1bits
937 #define CMIF PIR1bits.CMIF // bit 3
938 #define EEIF PIR1bits.EEIF // bit 7
940 #define RA0 PORTAbits.RA0 // bit 0
941 #define RA1 PORTAbits.RA1 // bit 1
942 #define RA2 PORTAbits.RA2 // bit 2
943 #define RA3 PORTAbits.RA3 // bit 3
944 #define RA4 PORTAbits.RA4 // bit 4
945 #define RA5 PORTAbits.RA5 // bit 5
947 #define RC0 PORTCbits.RC0 // bit 0
948 #define RC1 PORTCbits.RC1 // bit 1
949 #define RC2 PORTCbits.RC2 // bit 2
950 #define RC3 PORTCbits.RC3 // bit 3
951 #define RC4 PORTCbits.RC4 // bit 4
952 #define RC5 PORTCbits.RC5 // bit 5
954 #define C STATUSbits.C // bit 0
955 #define DC STATUSbits.DC // bit 1
956 #define Z STATUSbits.Z // bit 2
957 #define NOT_PD STATUSbits.NOT_PD // bit 3
958 #define NOT_TO STATUSbits.NOT_TO // bit 4
959 #define RP0 STATUSbits.RP0 // bit 5
960 #define RP1 STATUSbits.RP1 // bit 6
961 #define IRP STATUSbits.IRP // bit 7
963 #define TMR1ON T1CONbits.TMR1ON // bit 0
964 #define TMR1CS T1CONbits.TMR1CS // bit 1
965 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
966 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
967 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
968 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
969 #define TMR1GE T1CONbits.TMR1GE // bit 6
971 #define TRISA0 TRISAbits.TRISA0 // bit 0
972 #define TRISA1 TRISAbits.TRISA1 // bit 1
973 #define TRISA2 TRISAbits.TRISA2 // bit 2
974 #define TRISA3 TRISAbits.TRISA3 // bit 3
975 #define TRISA4 TRISAbits.TRISA4 // bit 4
976 #define TRISA5 TRISAbits.TRISA5 // bit 5
978 #define TRISC0 TRISCbits.TRISC0 // bit 0
979 #define TRISC1 TRISCbits.TRISC1 // bit 1
980 #define TRISC2 TRISCbits.TRISC2 // bit 2
981 #define TRISC3 TRISCbits.TRISC3 // bit 3
982 #define TRISC4 TRISCbits.TRISC4 // bit 4
983 #define TRISC5 TRISCbits.TRISC5 // bit 5
985 #define VR0 VRCONbits.VR0 // bit 0
986 #define VR1 VRCONbits.VR1 // bit 1
987 #define VR2 VRCONbits.VR2 // bit 2
988 #define VR3 VRCONbits.VR3 // bit 3
989 #define VRR VRCONbits.VRR // bit 5
990 #define VREN VRCONbits.VREN // bit 7
992 #define WPUA0 WPUbits.WPUA0 // bit 0
993 #define WPUA1 WPUbits.WPUA1 // bit 1
994 #define WPUA2 WPUbits.WPUA2 // bit 2
995 #define WPUA4 WPUbits.WPUA4 // bit 4
996 #define WPUA5 WPUbits.WPUA5 // bit 5
998 #endif // #ifndef NO_BIT_DEFINES
1000 #endif // #ifndef __PIC16F630_H__