2 * This declarations of the PIC10F320 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:54 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 __PIC10F320_H__
26 #define __PIC10F320_H__
28 //==============================================================================
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 TRISA_ADDR 0x0006
43 #define LATA_ADDR 0x0007
44 #define ANSELA_ADDR 0x0008
45 #define WPUA_ADDR 0x0009
46 #define PCLATH_ADDR 0x000A
47 #define INTCON_ADDR 0x000B
48 #define PIR1_ADDR 0x000C
49 #define PIE1_ADDR 0x000D
50 #define OPTION_REG_ADDR 0x000E
51 #define PCON_ADDR 0x000F
52 #define OSCCON_ADDR 0x0010
53 #define TMR2_ADDR 0x0011
54 #define PR2_ADDR 0x0012
55 #define T2CON_ADDR 0x0013
56 #define PWM1DCL_ADDR 0x0014
57 #define PWM1DCH_ADDR 0x0015
58 #define PWM1CON_ADDR 0x0016
59 #define PWM1CON0_ADDR 0x0016
60 #define PWM2DCL_ADDR 0x0017
61 #define PWM2DCH_ADDR 0x0018
62 #define PWM2CON_ADDR 0x0019
63 #define PWM2CON0_ADDR 0x0019
64 #define IOCAP_ADDR 0x001A
65 #define IOCAN_ADDR 0x001B
66 #define IOCAF_ADDR 0x001C
67 #define FVRCON_ADDR 0x001D
68 #define ADRES_ADDR 0x001E
69 #define ADCON_ADDR 0x001F
70 #define PMADR_ADDR 0x0020
71 #define PMADRL_ADDR 0x0020
72 #define PMADRH_ADDR 0x0021
73 #define PMDAT_ADDR 0x0022
74 #define PMDATL_ADDR 0x0022
75 #define PMDATH_ADDR 0x0023
76 #define PMCON1_ADDR 0x0024
77 #define PMCON2_ADDR 0x0025
78 #define CLKRCON_ADDR 0x0026
79 #define NCO1ACC_ADDR 0x0027
80 #define NCO1ACCL_ADDR 0x0027
81 #define NCO1ACCH_ADDR 0x0028
82 #define NCO1ACCU_ADDR 0x0029
83 #define NCO1INC_ADDR 0x002A
84 #define NCO1INCL_ADDR 0x002A
85 #define NCO1INCH_ADDR 0x002B
86 #define NCO1INCU_ADDR 0x002C
87 #define NCO1CON_ADDR 0x002D
88 #define NCO1CLK_ADDR 0x002E
89 #define WDTCON_ADDR 0x0030
90 #define CLC1CON_ADDR 0x0031
91 #define CLC1SEL0_ADDR 0x0032
92 #define CLC1SEL1_ADDR 0x0033
93 #define CLC1POL_ADDR 0x0034
94 #define CLC1GLS0_ADDR 0x0035
95 #define CLC1GLS1_ADDR 0x0036
96 #define CLC1GLS2_ADDR 0x0037
97 #define CLC1GLS3_ADDR 0x0038
98 #define CWG1CON0_ADDR 0x0039
99 #define CWG1CON1_ADDR 0x003A
100 #define CWG1CON2_ADDR 0x003B
101 #define CWG1DBR_ADDR 0x003C
102 #define CWG1DBF_ADDR 0x003D
103 #define VREGCON_ADDR 0x003E
104 #define BORCON_ADDR 0x003F
106 #endif // #ifndef NO_ADDR_DEFINES
108 //==============================================================================
110 // Register Definitions
112 //==============================================================================
114 extern __at(0x0000) __sfr INDF
;
115 extern __at(0x0001) __sfr TMR0
;
116 extern __at(0x0002) __sfr PCL
;
118 //==============================================================================
121 extern __at(0x0003) __sfr STATUS
;
145 extern __at(0x0003) volatile __STATUSbits_t STATUSbits
;
156 //==============================================================================
158 extern __at(0x0004) __sfr FSR
;
160 //==============================================================================
163 extern __at(0x0005) __sfr PORTA
;
186 extern __at(0x0005) volatile __PORTAbits_t PORTAbits
;
193 //==============================================================================
196 //==============================================================================
199 extern __at(0x0006) __sfr TRISA
;
222 extern __at(0x0006) volatile __TRISAbits_t TRISAbits
;
228 //==============================================================================
231 //==============================================================================
234 extern __at(0x0007) __sfr LATA
;
257 extern __at(0x0007) volatile __LATAbits_t LATAbits
;
263 //==============================================================================
266 //==============================================================================
269 extern __at(0x0008) __sfr ANSELA
;
292 extern __at(0x0008) volatile __ANSELAbits_t ANSELAbits
;
298 //==============================================================================
301 //==============================================================================
304 extern __at(0x0009) __sfr WPUA
;
327 extern __at(0x0009) volatile __WPUAbits_t WPUAbits
;
334 //==============================================================================
337 //==============================================================================
340 extern __at(0x000A) __sfr PCLATH
;
354 extern __at(0x000A) volatile __PCLATHbits_t PCLATHbits
;
358 //==============================================================================
361 //==============================================================================
364 extern __at(0x000B) __sfr INTCON
;
378 extern __at(0x000B) volatile __INTCONbits_t INTCONbits
;
389 //==============================================================================
392 //==============================================================================
395 extern __at(0x000C) __sfr PIR1
;
409 extern __at(0x000C) volatile __PIR1bits_t PIR1bits
;
416 //==============================================================================
419 //==============================================================================
422 extern __at(0x000D) __sfr PIE1
;
436 extern __at(0x000D) volatile __PIE1bits_t PIE1bits
;
443 //==============================================================================
446 //==============================================================================
449 extern __at(0x000E) __sfr OPTION_REG
;
462 unsigned NOT_WPUEN
: 1;
470 } __OPTION_REGbits_t
;
472 extern __at(0x000E) volatile __OPTION_REGbits_t OPTION_REGbits
;
481 #define _NOT_WPUEN 0x80
483 //==============================================================================
486 //==============================================================================
489 extern __at(0x000F) __sfr PCON
;
493 unsigned NOT_BOR
: 1;
494 unsigned NOT_POR
: 1;
503 extern __at(0x000F) volatile __PCONbits_t PCONbits
;
505 #define _NOT_BOR 0x01
506 #define _NOT_POR 0x02
508 //==============================================================================
511 //==============================================================================
514 extern __at(0x0010) __sfr OSCCON
;
538 extern __at(0x0010) volatile __OSCCONbits_t OSCCONbits
;
547 //==============================================================================
549 extern __at(0x0011) __sfr TMR2
;
550 extern __at(0x0012) __sfr PR2
;
552 //==============================================================================
555 extern __at(0x0013) __sfr T2CON
;
561 unsigned T2CKPS0
: 1;
562 unsigned T2CKPS1
: 1;
564 unsigned TOUTPS0
: 1;
565 unsigned TOUTPS1
: 1;
566 unsigned TOUTPS2
: 1;
567 unsigned TOUTPS3
: 1;
585 extern __at(0x0013) volatile __T2CONbits_t T2CONbits
;
587 #define _T2CKPS0 0x01
588 #define _T2CKPS1 0x02
590 #define _TOUTPS0 0x08
591 #define _TOUTPS1 0x10
592 #define _TOUTPS2 0x20
593 #define _TOUTPS3 0x40
595 //==============================================================================
598 //==============================================================================
601 extern __at(0x0014) __sfr PWM1DCL
;
613 unsigned PWM1DCL0
: 1;
614 unsigned PWM1DCL1
: 1;
620 unsigned PWM1DCL
: 2;
624 extern __at(0x0014) volatile __PWM1DCLbits_t PWM1DCLbits
;
626 #define _PWM1DCL0 0x40
627 #define _PWM1DCL1 0x80
629 //==============================================================================
632 //==============================================================================
635 extern __at(0x0015) __sfr PWM1DCH
;
639 unsigned PWM1DCH0
: 1;
640 unsigned PWM1DCH1
: 1;
641 unsigned PWM1DCH2
: 1;
642 unsigned PWM1DCH3
: 1;
643 unsigned PWM1DCH4
: 1;
644 unsigned PWM1DCH5
: 1;
645 unsigned PWM1DCH6
: 1;
646 unsigned PWM1DCH7
: 1;
649 extern __at(0x0015) volatile __PWM1DCHbits_t PWM1DCHbits
;
651 #define _PWM1DCH0 0x01
652 #define _PWM1DCH1 0x02
653 #define _PWM1DCH2 0x04
654 #define _PWM1DCH3 0x08
655 #define _PWM1DCH4 0x10
656 #define _PWM1DCH5 0x20
657 #define _PWM1DCH6 0x40
658 #define _PWM1DCH7 0x80
660 //==============================================================================
663 //==============================================================================
666 extern __at(0x0016) __sfr PWM1CON
;
674 unsigned PWM1POL
: 1;
675 unsigned PWM1OUT
: 1;
680 extern __at(0x0016) volatile __PWM1CONbits_t PWM1CONbits
;
682 #define _PWM1POL 0x10
683 #define _PWM1OUT 0x20
687 //==============================================================================
690 //==============================================================================
693 extern __at(0x0016) __sfr PWM1CON0
;
701 unsigned PWM1POL
: 1;
702 unsigned PWM1OUT
: 1;
707 extern __at(0x0016) volatile __PWM1CON0bits_t PWM1CON0bits
;
709 #define _PWM1CON0_PWM1POL 0x10
710 #define _PWM1CON0_PWM1OUT 0x20
711 #define _PWM1CON0_PWM1OE 0x40
712 #define _PWM1CON0_PWM1EN 0x80
714 //==============================================================================
717 //==============================================================================
720 extern __at(0x0017) __sfr PWM2DCL
;
732 unsigned PWM2DCL0
: 1;
733 unsigned PWM2DCL1
: 1;
739 unsigned PWM2DCL
: 2;
743 extern __at(0x0017) volatile __PWM2DCLbits_t PWM2DCLbits
;
745 #define _PWM2DCL0 0x40
746 #define _PWM2DCL1 0x80
748 //==============================================================================
751 //==============================================================================
754 extern __at(0x0018) __sfr PWM2DCH
;
758 unsigned PWM2DCH0
: 1;
759 unsigned PWM2DCH1
: 1;
760 unsigned PWM2DCH2
: 1;
761 unsigned PWM2DCH3
: 1;
762 unsigned PWM2DCH4
: 1;
763 unsigned PWM2DCH5
: 1;
764 unsigned PWM2DCH6
: 1;
765 unsigned PWM2DCH7
: 1;
768 extern __at(0x0018) volatile __PWM2DCHbits_t PWM2DCHbits
;
770 #define _PWM2DCH0 0x01
771 #define _PWM2DCH1 0x02
772 #define _PWM2DCH2 0x04
773 #define _PWM2DCH3 0x08
774 #define _PWM2DCH4 0x10
775 #define _PWM2DCH5 0x20
776 #define _PWM2DCH6 0x40
777 #define _PWM2DCH7 0x80
779 //==============================================================================
782 //==============================================================================
785 extern __at(0x0019) __sfr PWM2CON
;
793 unsigned PWM2POL
: 1;
794 unsigned PWM2OUT
: 1;
799 extern __at(0x0019) volatile __PWM2CONbits_t PWM2CONbits
;
801 #define _PWM2POL 0x10
802 #define _PWM2OUT 0x20
806 //==============================================================================
809 //==============================================================================
812 extern __at(0x0019) __sfr PWM2CON0
;
820 unsigned PWM2POL
: 1;
821 unsigned PWM2OUT
: 1;
826 extern __at(0x0019) volatile __PWM2CON0bits_t PWM2CON0bits
;
828 #define _PWM2CON0_PWM2POL 0x10
829 #define _PWM2CON0_PWM2OUT 0x20
830 #define _PWM2CON0_PWM2OE 0x40
831 #define _PWM2CON0_PWM2EN 0x80
833 //==============================================================================
836 //==============================================================================
839 extern __at(0x001A) __sfr IOCAP
;
862 extern __at(0x001A) volatile __IOCAPbits_t IOCAPbits
;
869 //==============================================================================
872 //==============================================================================
875 extern __at(0x001B) __sfr IOCAN
;
898 extern __at(0x001B) volatile __IOCANbits_t IOCANbits
;
905 //==============================================================================
908 //==============================================================================
911 extern __at(0x001C) __sfr IOCAF
;
934 extern __at(0x001C) volatile __IOCAFbits_t IOCAFbits
;
941 //==============================================================================
944 //==============================================================================
947 extern __at(0x001D) __sfr FVRCON
;
970 extern __at(0x001D) volatile __FVRCONbits_t FVRCONbits
;
979 //==============================================================================
981 extern __at(0x001E) __sfr ADRES
;
983 //==============================================================================
986 extern __at(0x001F) __sfr ADCON
;
993 unsigned GO_NOT_DONE
: 1;
1016 extern __at(0x001F) volatile __ADCONbits_t ADCONbits
;
1019 #define _GO_NOT_DONE 0x02
1027 //==============================================================================
1029 extern __at(0x0020) __sfr PMADR
;
1030 extern __at(0x0020) __sfr PMADRL
;
1032 //==============================================================================
1035 extern __at(0x0021) __sfr PMADRH
;
1039 unsigned PMADR8
: 1;
1049 extern __at(0x0021) volatile __PMADRHbits_t PMADRHbits
;
1051 #define _PMADR8 0x01
1053 //==============================================================================
1055 extern __at(0x0022) __sfr PMDAT
;
1056 extern __at(0x0022) __sfr PMDATL
;
1057 extern __at(0x0023) __sfr PMDATH
;
1059 //==============================================================================
1062 extern __at(0x0024) __sfr PMCON1
;
1076 extern __at(0x0024) volatile __PMCON1bits_t PMCON1bits
;
1086 //==============================================================================
1088 extern __at(0x0025) __sfr PMCON2
;
1090 //==============================================================================
1093 extern __at(0x0026) __sfr CLKRCON
;
1103 unsigned CLKROE
: 1;
1107 extern __at(0x0026) volatile __CLKRCONbits_t CLKRCONbits
;
1109 #define _CLKROE 0x40
1111 //==============================================================================
1113 extern __at(0x0027) __sfr NCO1ACC
;
1115 //==============================================================================
1118 extern __at(0x0027) __sfr NCO1ACCL
;
1122 unsigned NCO1ACC0
: 1;
1123 unsigned NCO1ACC1
: 1;
1124 unsigned NCO1ACC2
: 1;
1125 unsigned NCO1ACC3
: 1;
1126 unsigned NCO1ACC4
: 1;
1127 unsigned NCO1ACC5
: 1;
1128 unsigned NCO1ACC6
: 1;
1129 unsigned NCO1ACC7
: 1;
1132 extern __at(0x0027) volatile __NCO1ACCLbits_t NCO1ACCLbits
;
1134 #define _NCO1ACC0 0x01
1135 #define _NCO1ACC1 0x02
1136 #define _NCO1ACC2 0x04
1137 #define _NCO1ACC3 0x08
1138 #define _NCO1ACC4 0x10
1139 #define _NCO1ACC5 0x20
1140 #define _NCO1ACC6 0x40
1141 #define _NCO1ACC7 0x80
1143 //==============================================================================
1146 //==============================================================================
1149 extern __at(0x0028) __sfr NCO1ACCH
;
1153 unsigned NCO1ACC8
: 1;
1154 unsigned NCO1ACC9
: 1;
1155 unsigned NCO1ACC10
: 1;
1156 unsigned NCO1ACC11
: 1;
1157 unsigned NCO1ACC12
: 1;
1158 unsigned NCO1ACC13
: 1;
1159 unsigned NCO1ACC14
: 1;
1160 unsigned NCO1ACC15
: 1;
1163 extern __at(0x0028) volatile __NCO1ACCHbits_t NCO1ACCHbits
;
1165 #define _NCO1ACC8 0x01
1166 #define _NCO1ACC9 0x02
1167 #define _NCO1ACC10 0x04
1168 #define _NCO1ACC11 0x08
1169 #define _NCO1ACC12 0x10
1170 #define _NCO1ACC13 0x20
1171 #define _NCO1ACC14 0x40
1172 #define _NCO1ACC15 0x80
1174 //==============================================================================
1177 //==============================================================================
1180 extern __at(0x0029) __sfr NCO1ACCU
;
1184 unsigned NCO1ACC16
: 1;
1185 unsigned NCO1ACC17
: 1;
1186 unsigned NCO1ACC18
: 1;
1187 unsigned NCO1ACC19
: 1;
1194 extern __at(0x0029) volatile __NCO1ACCUbits_t NCO1ACCUbits
;
1196 #define _NCO1ACC16 0x01
1197 #define _NCO1ACC17 0x02
1198 #define _NCO1ACC18 0x04
1199 #define _NCO1ACC19 0x08
1201 //==============================================================================
1203 extern __at(0x002A) __sfr NCO1INC
;
1205 //==============================================================================
1208 extern __at(0x002A) __sfr NCO1INCL
;
1212 unsigned NCO1INC0
: 1;
1213 unsigned NCO1INC1
: 1;
1214 unsigned NCO1INC2
: 1;
1215 unsigned NCO1INC3
: 1;
1216 unsigned NCO1INC4
: 1;
1217 unsigned NCO1INC5
: 1;
1218 unsigned NCO1INC6
: 1;
1219 unsigned NCO1INC7
: 1;
1222 extern __at(0x002A) volatile __NCO1INCLbits_t NCO1INCLbits
;
1224 #define _NCO1INC0 0x01
1225 #define _NCO1INC1 0x02
1226 #define _NCO1INC2 0x04
1227 #define _NCO1INC3 0x08
1228 #define _NCO1INC4 0x10
1229 #define _NCO1INC5 0x20
1230 #define _NCO1INC6 0x40
1231 #define _NCO1INC7 0x80
1233 //==============================================================================
1236 //==============================================================================
1239 extern __at(0x002B) __sfr NCO1INCH
;
1243 unsigned NCO1INC8
: 1;
1244 unsigned NCO1INC9
: 1;
1245 unsigned NCO1INC10
: 1;
1246 unsigned NCO1INC11
: 1;
1247 unsigned NCO1INC12
: 1;
1248 unsigned NCO1INC13
: 1;
1249 unsigned NCO1INC14
: 1;
1250 unsigned NCO1INC15
: 1;
1253 extern __at(0x002B) volatile __NCO1INCHbits_t NCO1INCHbits
;
1255 #define _NCO1INC8 0x01
1256 #define _NCO1INC9 0x02
1257 #define _NCO1INC10 0x04
1258 #define _NCO1INC11 0x08
1259 #define _NCO1INC12 0x10
1260 #define _NCO1INC13 0x20
1261 #define _NCO1INC14 0x40
1262 #define _NCO1INC15 0x80
1264 //==============================================================================
1266 extern __at(0x002C) __sfr NCO1INCU
;
1268 //==============================================================================
1271 extern __at(0x002D) __sfr NCO1CON
;
1285 extern __at(0x002D) volatile __NCO1CONbits_t NCO1CONbits
;
1293 //==============================================================================
1296 //==============================================================================
1299 extern __at(0x002E) __sfr NCO1CLK
;
1305 unsigned N1CKS0
: 1;
1306 unsigned N1CKS1
: 1;
1310 unsigned N1PWS0
: 1;
1311 unsigned N1PWS1
: 1;
1312 unsigned N1PWS2
: 1;
1328 extern __at(0x002E) volatile __NCO1CLKbits_t NCO1CLKbits
;
1330 #define _N1CKS0 0x01
1331 #define _N1CKS1 0x02
1332 #define _N1PWS0 0x20
1333 #define _N1PWS1 0x40
1334 #define _N1PWS2 0x80
1336 //==============================================================================
1339 //==============================================================================
1342 extern __at(0x0030) __sfr WDTCON
;
1348 unsigned SWDTEN
: 1;
1349 unsigned WDTPS0
: 1;
1350 unsigned WDTPS1
: 1;
1351 unsigned WDTPS2
: 1;
1352 unsigned WDTPS3
: 1;
1353 unsigned WDTPS4
: 1;
1366 extern __at(0x0030) volatile __WDTCONbits_t WDTCONbits
;
1368 #define _SWDTEN 0x01
1369 #define _WDTPS0 0x02
1370 #define _WDTPS1 0x04
1371 #define _WDTPS2 0x08
1372 #define _WDTPS3 0x10
1373 #define _WDTPS4 0x20
1375 //==============================================================================
1378 //==============================================================================
1381 extern __at(0x0031) __sfr CLC1CON
;
1387 unsigned LC1MODE0
: 1;
1388 unsigned LC1MODE1
: 1;
1389 unsigned LC1MODE2
: 1;
1390 unsigned LC1INTN
: 1;
1391 unsigned LC1INTP
: 1;
1392 unsigned LC1OUT
: 1;
1399 unsigned LCMODE0
: 1;
1400 unsigned LCMODE1
: 1;
1401 unsigned LCMODE2
: 1;
1402 unsigned LCINTN
: 1;
1403 unsigned LCINTP
: 1;
1411 unsigned LC1MODE
: 3;
1417 unsigned LCMODE
: 3;
1422 extern __at(0x0031) volatile __CLC1CONbits_t CLC1CONbits
;
1424 #define _LC1MODE0 0x01
1425 #define _LCMODE0 0x01
1426 #define _LC1MODE1 0x02
1427 #define _LCMODE1 0x02
1428 #define _LC1MODE2 0x04
1429 #define _LCMODE2 0x04
1430 #define _LC1INTN 0x08
1431 #define _LCINTN 0x08
1432 #define _LC1INTP 0x10
1433 #define _LCINTP 0x10
1434 #define _LC1OUT 0x20
1441 //==============================================================================
1444 //==============================================================================
1447 extern __at(0x0032) __sfr CLC1SEL0
;
1453 unsigned LC1D1S0
: 1;
1454 unsigned LC1D1S1
: 1;
1455 unsigned LC1D1S2
: 1;
1457 unsigned LC1D2S0
: 1;
1458 unsigned LC1D2S1
: 1;
1459 unsigned LC1D2S2
: 1;
1483 unsigned LC1D1S
: 3;
1497 unsigned LC1D2S
: 3;
1502 extern __at(0x0032) volatile __CLC1SEL0bits_t CLC1SEL0bits
;
1504 #define _LC1D1S0 0x01
1506 #define _LC1D1S1 0x02
1508 #define _LC1D1S2 0x04
1510 #define _LC1D2S0 0x10
1512 #define _LC1D2S1 0x20
1514 #define _LC1D2S2 0x40
1517 //==============================================================================
1520 //==============================================================================
1523 extern __at(0x0033) __sfr CLC1SEL1
;
1529 unsigned LC1D3S0
: 1;
1530 unsigned LC1D3S1
: 1;
1531 unsigned LC1D3S2
: 1;
1533 unsigned LC1D4S0
: 1;
1534 unsigned LC1D4S1
: 1;
1535 unsigned LC1D4S2
: 1;
1559 unsigned LC1D3S
: 3;
1573 unsigned LC1D4S
: 3;
1578 extern __at(0x0033) volatile __CLC1SEL1bits_t CLC1SEL1bits
;
1580 #define _LC1D3S0 0x01
1582 #define _LC1D3S1 0x02
1584 #define _LC1D3S2 0x04
1586 #define _LC1D4S0 0x10
1588 #define _LC1D4S1 0x20
1590 #define _LC1D4S2 0x40
1593 //==============================================================================
1596 //==============================================================================
1599 extern __at(0x0034) __sfr CLC1POL
;
1605 unsigned LC1G1POL
: 1;
1606 unsigned LC1G2POL
: 1;
1607 unsigned LC1G3POL
: 1;
1608 unsigned LC1G4POL
: 1;
1612 unsigned LC1POL
: 1;
1628 extern __at(0x0034) volatile __CLC1POLbits_t CLC1POLbits
;
1630 #define _LC1G1POL 0x01
1632 #define _LC1G2POL 0x02
1634 #define _LC1G3POL 0x04
1636 #define _LC1G4POL 0x08
1638 #define _LC1POL 0x80
1641 //==============================================================================
1644 //==============================================================================
1647 extern __at(0x0035) __sfr CLC1GLS0
;
1653 unsigned LC1G1D1N
: 1;
1654 unsigned LC1G1D1T
: 1;
1655 unsigned LC1G1D2N
: 1;
1656 unsigned LC1G1D2T
: 1;
1657 unsigned LC1G1D3N
: 1;
1658 unsigned LC1G1D3T
: 1;
1659 unsigned LC1G1D4N
: 1;
1660 unsigned LC1G1D4T
: 1;
1676 extern __at(0x0035) volatile __CLC1GLS0bits_t CLC1GLS0bits
;
1678 #define _LC1G1D1N 0x01
1680 #define _LC1G1D1T 0x02
1682 #define _LC1G1D2N 0x04
1684 #define _LC1G1D2T 0x08
1686 #define _LC1G1D3N 0x10
1688 #define _LC1G1D3T 0x20
1690 #define _LC1G1D4N 0x40
1692 #define _LC1G1D4T 0x80
1695 //==============================================================================
1698 //==============================================================================
1701 extern __at(0x0036) __sfr CLC1GLS1
;
1707 unsigned LC1G2D1N
: 1;
1708 unsigned LC1G2D1T
: 1;
1709 unsigned LC1G2D2N
: 1;
1710 unsigned LC1G2D2T
: 1;
1711 unsigned LC1G2D3N
: 1;
1712 unsigned LC1G2D3T
: 1;
1713 unsigned LC1G2D4N
: 1;
1714 unsigned LC1G2D4T
: 1;
1730 extern __at(0x0036) volatile __CLC1GLS1bits_t CLC1GLS1bits
;
1732 #define _CLC1GLS1_LC1G2D1N 0x01
1733 #define _CLC1GLS1_D1N 0x01
1734 #define _CLC1GLS1_LC1G2D1T 0x02
1735 #define _CLC1GLS1_D1T 0x02
1736 #define _CLC1GLS1_LC1G2D2N 0x04
1737 #define _CLC1GLS1_D2N 0x04
1738 #define _CLC1GLS1_LC1G2D2T 0x08
1739 #define _CLC1GLS1_D2T 0x08
1740 #define _CLC1GLS1_LC1G2D3N 0x10
1741 #define _CLC1GLS1_D3N 0x10
1742 #define _CLC1GLS1_LC1G2D3T 0x20
1743 #define _CLC1GLS1_D3T 0x20
1744 #define _CLC1GLS1_LC1G2D4N 0x40
1745 #define _CLC1GLS1_D4N 0x40
1746 #define _CLC1GLS1_LC1G2D4T 0x80
1747 #define _CLC1GLS1_D4T 0x80
1749 //==============================================================================
1752 //==============================================================================
1755 extern __at(0x0037) __sfr CLC1GLS2
;
1761 unsigned LC1G3D1N
: 1;
1762 unsigned LC1G3D1T
: 1;
1763 unsigned LC1G3D2N
: 1;
1764 unsigned LC1G3D2T
: 1;
1765 unsigned LC1G3D3N
: 1;
1766 unsigned LC1G3D3T
: 1;
1767 unsigned LC1G3D4N
: 1;
1768 unsigned LC1G3D4T
: 1;
1784 extern __at(0x0037) volatile __CLC1GLS2bits_t CLC1GLS2bits
;
1786 #define _CLC1GLS2_LC1G3D1N 0x01
1787 #define _CLC1GLS2_D1N 0x01
1788 #define _CLC1GLS2_LC1G3D1T 0x02
1789 #define _CLC1GLS2_D1T 0x02
1790 #define _CLC1GLS2_LC1G3D2N 0x04
1791 #define _CLC1GLS2_D2N 0x04
1792 #define _CLC1GLS2_LC1G3D2T 0x08
1793 #define _CLC1GLS2_D2T 0x08
1794 #define _CLC1GLS2_LC1G3D3N 0x10
1795 #define _CLC1GLS2_D3N 0x10
1796 #define _CLC1GLS2_LC1G3D3T 0x20
1797 #define _CLC1GLS2_D3T 0x20
1798 #define _CLC1GLS2_LC1G3D4N 0x40
1799 #define _CLC1GLS2_D4N 0x40
1800 #define _CLC1GLS2_LC1G3D4T 0x80
1801 #define _CLC1GLS2_D4T 0x80
1803 //==============================================================================
1806 //==============================================================================
1809 extern __at(0x0038) __sfr CLC1GLS3
;
1815 unsigned LC1G4D1N
: 1;
1816 unsigned LC1G4D1T
: 1;
1817 unsigned LC1G4D2N
: 1;
1818 unsigned LC1G4D2T
: 1;
1819 unsigned LC1G4D3N
: 1;
1820 unsigned LC1G4D3T
: 1;
1821 unsigned LC1G4D4N
: 1;
1822 unsigned LC1G4D4T
: 1;
1838 extern __at(0x0038) volatile __CLC1GLS3bits_t CLC1GLS3bits
;
1840 #define _LC1G4D1N 0x01
1842 #define _LC1G4D1T 0x02
1844 #define _LC1G4D2N 0x04
1846 #define _LC1G4D2T 0x08
1848 #define _LC1G4D3N 0x10
1850 #define _LC1G4D3T 0x20
1852 #define _LC1G4D4N 0x40
1854 #define _LC1G4D4T 0x80
1857 //==============================================================================
1860 //==============================================================================
1863 extern __at(0x0039) __sfr CWG1CON0
;
1870 unsigned G1POLA
: 1;
1871 unsigned G1POLB
: 1;
1877 extern __at(0x0039) volatile __CWG1CON0bits_t CWG1CON0bits
;
1880 #define _G1POLA 0x08
1881 #define _G1POLB 0x10
1886 //==============================================================================
1889 //==============================================================================
1892 extern __at(0x003A) __sfr CWG1CON1
;
1902 unsigned G1ASDLA0
: 1;
1903 unsigned G1ASDLA1
: 1;
1904 unsigned G1ASDLB0
: 1;
1905 unsigned G1ASDLB1
: 1;
1917 unsigned G1ASDLA
: 2;
1924 unsigned G1ASDLB
: 2;
1928 extern __at(0x003A) volatile __CWG1CON1bits_t CWG1CON1bits
;
1932 #define _G1ASDLA0 0x10
1933 #define _G1ASDLA1 0x20
1934 #define _G1ASDLB0 0x40
1935 #define _G1ASDLB1 0x80
1937 //==============================================================================
1940 //==============================================================================
1943 extern __at(0x003B) __sfr CWG1CON2
;
1947 unsigned G1ASDSFLT
: 1;
1948 unsigned G1ASDSCLC1
: 1;
1953 unsigned G1ARSEN
: 1;
1957 extern __at(0x003B) volatile __CWG1CON2bits_t CWG1CON2bits
;
1959 #define _G1ASDSFLT 0x01
1960 #define _G1ASDSCLC1 0x02
1961 #define _G1ARSEN 0x40
1964 //==============================================================================
1967 //==============================================================================
1970 extern __at(0x003C) __sfr CWG1DBR
;
1976 unsigned CWG1DBR0
: 1;
1977 unsigned CWG1DBR1
: 1;
1978 unsigned CWG1DBR2
: 1;
1979 unsigned CWG1DBR3
: 1;
1980 unsigned CWG1DBR4
: 1;
1981 unsigned CWG1DBR5
: 1;
1988 unsigned CWG1DBR
: 6;
1993 extern __at(0x003C) volatile __CWG1DBRbits_t CWG1DBRbits
;
1995 #define _CWG1DBR0 0x01
1996 #define _CWG1DBR1 0x02
1997 #define _CWG1DBR2 0x04
1998 #define _CWG1DBR3 0x08
1999 #define _CWG1DBR4 0x10
2000 #define _CWG1DBR5 0x20
2002 //==============================================================================
2005 //==============================================================================
2008 extern __at(0x003D) __sfr CWG1DBF
;
2014 unsigned CWG1DBF0
: 1;
2015 unsigned CWG1DBF1
: 1;
2016 unsigned CWG1DBF2
: 1;
2017 unsigned CWG1DBF3
: 1;
2018 unsigned CWG1DBF4
: 1;
2019 unsigned CWG1DBF5
: 1;
2026 unsigned CWG1DBF
: 6;
2031 extern __at(0x003D) volatile __CWG1DBFbits_t CWG1DBFbits
;
2033 #define _CWG1DBF0 0x01
2034 #define _CWG1DBF1 0x02
2035 #define _CWG1DBF2 0x04
2036 #define _CWG1DBF3 0x08
2037 #define _CWG1DBF4 0x10
2038 #define _CWG1DBF5 0x20
2040 //==============================================================================
2043 //==============================================================================
2046 extern __at(0x003E) __sfr VREGCON
;
2052 unsigned VREGPM0
: 1;
2053 unsigned VREGPM1
: 1;
2064 unsigned VREGPM
: 2;
2069 extern __at(0x003E) volatile __VREGCONbits_t VREGCONbits
;
2071 #define _VREGPM0 0x01
2072 #define _VREGPM1 0x02
2074 //==============================================================================
2077 //==============================================================================
2080 extern __at(0x003F) __sfr BORCON
;
2084 unsigned BORRDY
: 1;
2091 unsigned SBOREN
: 1;
2094 extern __at(0x003F) volatile __BORCONbits_t BORCONbits
;
2096 #define _BORRDY 0x01
2098 #define _SBOREN 0x80
2100 //==============================================================================
2103 //==============================================================================
2105 // Configuration Bits
2107 //==============================================================================
2109 #define _CONFIG 0x2007
2111 //----------------------------- CONFIG Options -------------------------------
2113 #define _FOSC_INTOSC 0x3FFE // INTOSC oscillator: CLKIN function disabled.
2114 #define _FOSC_EC 0x3FFF // EC: CLKIN function enabled.
2115 #define _BOREN_OFF 0x3FF9 // Brown-out Reset disabled.
2116 #define _BOREN_SBODEN 0x3FFB // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
2117 #define _BOREN_NSLEEP 0x3FFD // Brown-out Reset enabled while running and disabled in Sleep.
2118 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
2119 #define _WDTE_OFF 0x3FE7 // WDT disabled.
2120 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
2121 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
2122 #define _WDTE_ON 0x3FFF // WDT enabled.
2123 #define _PWRTE_ON 0x3FDF // PWRT enabled.
2124 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
2125 #define _MCLRE_OFF 0x3FBF // MCLR pin function is digital input, MCLR internally tied to VDD.
2126 #define _MCLRE_ON 0x3FFF // MCLR pin function is MCLR.
2127 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
2128 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
2129 #define _LVP_OFF 0x3EFF // High-voltage on MCLR/VPP must be used for programming.
2130 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
2131 #define _LPBOR_OFF 0x3DFF // BOR disabled.
2132 #define _LPBOR_ON 0x3FFF // BOR enabled.
2133 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
2134 #define _BORV_27 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
2135 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
2136 #define _BORV_24 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
2137 #define _WRT_ALL 0x27FF // 000h to 0FFh write protected, no addresses may be modified by PMCON control.
2138 #define _WRT_HALF 0x2FFF // 000h to 07Fh write protected, 080h to 0FFh may be modified by PMCON control.
2139 #define _WRT_BOOT 0x37FF // 000h to 03Fh write protected, 040h to 0FFh may be modified by PMCON control.
2140 #define _WRT_OFF 0x3FFF // Write protection off.
2142 //==============================================================================
2144 #define _DEVID1 0x2006
2146 #define _IDLOC0 0x2000
2147 #define _IDLOC1 0x2001
2148 #define _IDLOC2 0x2002
2149 #define _IDLOC3 0x2003
2151 //==============================================================================
2153 #ifndef NO_BIT_DEFINES
2155 #define ADON ADCONbits.ADON // bit 0
2156 #define GO_NOT_DONE ADCONbits.GO_NOT_DONE // bit 1
2157 #define CHS0 ADCONbits.CHS0 // bit 2
2158 #define CHS1 ADCONbits.CHS1 // bit 3
2159 #define CHS2 ADCONbits.CHS2 // bit 4
2160 #define ADCS0 ADCONbits.ADCS0 // bit 5
2161 #define ADCS1 ADCONbits.ADCS1 // bit 6
2162 #define ADCS2 ADCONbits.ADCS2 // bit 7
2164 #define ANSA0 ANSELAbits.ANSA0 // bit 0
2165 #define ANSA1 ANSELAbits.ANSA1 // bit 1
2166 #define ANSA2 ANSELAbits.ANSA2 // bit 2
2168 #define BORRDY BORCONbits.BORRDY // bit 0
2169 #define BORFS BORCONbits.BORFS // bit 6
2170 #define SBOREN BORCONbits.SBOREN // bit 7
2172 #define LC1MODE0 CLC1CONbits.LC1MODE0 // bit 0, shadows bit in CLC1CONbits
2173 #define LCMODE0 CLC1CONbits.LCMODE0 // bit 0, shadows bit in CLC1CONbits
2174 #define LC1MODE1 CLC1CONbits.LC1MODE1 // bit 1, shadows bit in CLC1CONbits
2175 #define LCMODE1 CLC1CONbits.LCMODE1 // bit 1, shadows bit in CLC1CONbits
2176 #define LC1MODE2 CLC1CONbits.LC1MODE2 // bit 2, shadows bit in CLC1CONbits
2177 #define LCMODE2 CLC1CONbits.LCMODE2 // bit 2, shadows bit in CLC1CONbits
2178 #define LC1INTN CLC1CONbits.LC1INTN // bit 3, shadows bit in CLC1CONbits
2179 #define LCINTN CLC1CONbits.LCINTN // bit 3, shadows bit in CLC1CONbits
2180 #define LC1INTP CLC1CONbits.LC1INTP // bit 4, shadows bit in CLC1CONbits
2181 #define LCINTP CLC1CONbits.LCINTP // bit 4, shadows bit in CLC1CONbits
2182 #define LC1OUT CLC1CONbits.LC1OUT // bit 5, shadows bit in CLC1CONbits
2183 #define LCOUT CLC1CONbits.LCOUT // bit 5, shadows bit in CLC1CONbits
2184 #define LC1OE CLC1CONbits.LC1OE // bit 6, shadows bit in CLC1CONbits
2185 #define LCOE CLC1CONbits.LCOE // bit 6, shadows bit in CLC1CONbits
2186 #define LC1EN CLC1CONbits.LC1EN // bit 7, shadows bit in CLC1CONbits
2187 #define LCEN CLC1CONbits.LCEN // bit 7, shadows bit in CLC1CONbits
2189 #define LC1G1D1N CLC1GLS0bits.LC1G1D1N // bit 0, shadows bit in CLC1GLS0bits
2190 #define D1N CLC1GLS0bits.D1N // bit 0, shadows bit in CLC1GLS0bits
2191 #define LC1G1D1T CLC1GLS0bits.LC1G1D1T // bit 1, shadows bit in CLC1GLS0bits
2192 #define D1T CLC1GLS0bits.D1T // bit 1, shadows bit in CLC1GLS0bits
2193 #define LC1G1D2N CLC1GLS0bits.LC1G1D2N // bit 2, shadows bit in CLC1GLS0bits
2194 #define D2N CLC1GLS0bits.D2N // bit 2, shadows bit in CLC1GLS0bits
2195 #define LC1G1D2T CLC1GLS0bits.LC1G1D2T // bit 3, shadows bit in CLC1GLS0bits
2196 #define D2T CLC1GLS0bits.D2T // bit 3, shadows bit in CLC1GLS0bits
2197 #define LC1G1D3N CLC1GLS0bits.LC1G1D3N // bit 4, shadows bit in CLC1GLS0bits
2198 #define D3N CLC1GLS0bits.D3N // bit 4, shadows bit in CLC1GLS0bits
2199 #define LC1G1D3T CLC1GLS0bits.LC1G1D3T // bit 5, shadows bit in CLC1GLS0bits
2200 #define D3T CLC1GLS0bits.D3T // bit 5, shadows bit in CLC1GLS0bits
2201 #define LC1G1D4N CLC1GLS0bits.LC1G1D4N // bit 6, shadows bit in CLC1GLS0bits
2202 #define D4N CLC1GLS0bits.D4N // bit 6, shadows bit in CLC1GLS0bits
2203 #define LC1G1D4T CLC1GLS0bits.LC1G1D4T // bit 7, shadows bit in CLC1GLS0bits
2204 #define D4T CLC1GLS0bits.D4T // bit 7, shadows bit in CLC1GLS0bits
2206 #define LC1G4D1N CLC1GLS3bits.LC1G4D1N // bit 0, shadows bit in CLC1GLS3bits
2207 #define G4D1N CLC1GLS3bits.G4D1N // bit 0, shadows bit in CLC1GLS3bits
2208 #define LC1G4D1T CLC1GLS3bits.LC1G4D1T // bit 1, shadows bit in CLC1GLS3bits
2209 #define G4D1T CLC1GLS3bits.G4D1T // bit 1, shadows bit in CLC1GLS3bits
2210 #define LC1G4D2N CLC1GLS3bits.LC1G4D2N // bit 2, shadows bit in CLC1GLS3bits
2211 #define G4D2N CLC1GLS3bits.G4D2N // bit 2, shadows bit in CLC1GLS3bits
2212 #define LC1G4D2T CLC1GLS3bits.LC1G4D2T // bit 3, shadows bit in CLC1GLS3bits
2213 #define G4D2T CLC1GLS3bits.G4D2T // bit 3, shadows bit in CLC1GLS3bits
2214 #define LC1G4D3N CLC1GLS3bits.LC1G4D3N // bit 4, shadows bit in CLC1GLS3bits
2215 #define G4D3N CLC1GLS3bits.G4D3N // bit 4, shadows bit in CLC1GLS3bits
2216 #define LC1G4D3T CLC1GLS3bits.LC1G4D3T // bit 5, shadows bit in CLC1GLS3bits
2217 #define G4D3T CLC1GLS3bits.G4D3T // bit 5, shadows bit in CLC1GLS3bits
2218 #define LC1G4D4N CLC1GLS3bits.LC1G4D4N // bit 6, shadows bit in CLC1GLS3bits
2219 #define G4D4N CLC1GLS3bits.G4D4N // bit 6, shadows bit in CLC1GLS3bits
2220 #define LC1G4D4T CLC1GLS3bits.LC1G4D4T // bit 7, shadows bit in CLC1GLS3bits
2221 #define G4D4T CLC1GLS3bits.G4D4T // bit 7, shadows bit in CLC1GLS3bits
2223 #define LC1G1POL CLC1POLbits.LC1G1POL // bit 0, shadows bit in CLC1POLbits
2224 #define G1POL CLC1POLbits.G1POL // bit 0, shadows bit in CLC1POLbits
2225 #define LC1G2POL CLC1POLbits.LC1G2POL // bit 1, shadows bit in CLC1POLbits
2226 #define G2POL CLC1POLbits.G2POL // bit 1, shadows bit in CLC1POLbits
2227 #define LC1G3POL CLC1POLbits.LC1G3POL // bit 2, shadows bit in CLC1POLbits
2228 #define G3POL CLC1POLbits.G3POL // bit 2, shadows bit in CLC1POLbits
2229 #define LC1G4POL CLC1POLbits.LC1G4POL // bit 3, shadows bit in CLC1POLbits
2230 #define G4POL CLC1POLbits.G4POL // bit 3, shadows bit in CLC1POLbits
2231 #define LC1POL CLC1POLbits.LC1POL // bit 7, shadows bit in CLC1POLbits
2232 #define POL CLC1POLbits.POL // bit 7, shadows bit in CLC1POLbits
2234 #define LC1D1S0 CLC1SEL0bits.LC1D1S0 // bit 0, shadows bit in CLC1SEL0bits
2235 #define D1S0 CLC1SEL0bits.D1S0 // bit 0, shadows bit in CLC1SEL0bits
2236 #define LC1D1S1 CLC1SEL0bits.LC1D1S1 // bit 1, shadows bit in CLC1SEL0bits
2237 #define D1S1 CLC1SEL0bits.D1S1 // bit 1, shadows bit in CLC1SEL0bits
2238 #define LC1D1S2 CLC1SEL0bits.LC1D1S2 // bit 2, shadows bit in CLC1SEL0bits
2239 #define D1S2 CLC1SEL0bits.D1S2 // bit 2, shadows bit in CLC1SEL0bits
2240 #define LC1D2S0 CLC1SEL0bits.LC1D2S0 // bit 4, shadows bit in CLC1SEL0bits
2241 #define D2S0 CLC1SEL0bits.D2S0 // bit 4, shadows bit in CLC1SEL0bits
2242 #define LC1D2S1 CLC1SEL0bits.LC1D2S1 // bit 5, shadows bit in CLC1SEL0bits
2243 #define D2S1 CLC1SEL0bits.D2S1 // bit 5, shadows bit in CLC1SEL0bits
2244 #define LC1D2S2 CLC1SEL0bits.LC1D2S2 // bit 6, shadows bit in CLC1SEL0bits
2245 #define D2S2 CLC1SEL0bits.D2S2 // bit 6, shadows bit in CLC1SEL0bits
2247 #define LC1D3S0 CLC1SEL1bits.LC1D3S0 // bit 0, shadows bit in CLC1SEL1bits
2248 #define D3S0 CLC1SEL1bits.D3S0 // bit 0, shadows bit in CLC1SEL1bits
2249 #define LC1D3S1 CLC1SEL1bits.LC1D3S1 // bit 1, shadows bit in CLC1SEL1bits
2250 #define D3S1 CLC1SEL1bits.D3S1 // bit 1, shadows bit in CLC1SEL1bits
2251 #define LC1D3S2 CLC1SEL1bits.LC1D3S2 // bit 2, shadows bit in CLC1SEL1bits
2252 #define D3S2 CLC1SEL1bits.D3S2 // bit 2, shadows bit in CLC1SEL1bits
2253 #define LC1D4S0 CLC1SEL1bits.LC1D4S0 // bit 4, shadows bit in CLC1SEL1bits
2254 #define D4S0 CLC1SEL1bits.D4S0 // bit 4, shadows bit in CLC1SEL1bits
2255 #define LC1D4S1 CLC1SEL1bits.LC1D4S1 // bit 5, shadows bit in CLC1SEL1bits
2256 #define D4S1 CLC1SEL1bits.D4S1 // bit 5, shadows bit in CLC1SEL1bits
2257 #define LC1D4S2 CLC1SEL1bits.LC1D4S2 // bit 6, shadows bit in CLC1SEL1bits
2258 #define D4S2 CLC1SEL1bits.D4S2 // bit 6, shadows bit in CLC1SEL1bits
2260 #define CLKROE CLKRCONbits.CLKROE // bit 6
2262 #define G1CS0 CWG1CON0bits.G1CS0 // bit 0
2263 #define G1POLA CWG1CON0bits.G1POLA // bit 3
2264 #define G1POLB CWG1CON0bits.G1POLB // bit 4
2265 #define G1OEA CWG1CON0bits.G1OEA // bit 5
2266 #define G1OEB CWG1CON0bits.G1OEB // bit 6
2267 #define G1EN CWG1CON0bits.G1EN // bit 7
2269 #define G1IS0 CWG1CON1bits.G1IS0 // bit 0
2270 #define G1IS1 CWG1CON1bits.G1IS1 // bit 1
2271 #define G1ASDLA0 CWG1CON1bits.G1ASDLA0 // bit 4
2272 #define G1ASDLA1 CWG1CON1bits.G1ASDLA1 // bit 5
2273 #define G1ASDLB0 CWG1CON1bits.G1ASDLB0 // bit 6
2274 #define G1ASDLB1 CWG1CON1bits.G1ASDLB1 // bit 7
2276 #define G1ASDSFLT CWG1CON2bits.G1ASDSFLT // bit 0
2277 #define G1ASDSCLC1 CWG1CON2bits.G1ASDSCLC1 // bit 1
2278 #define G1ARSEN CWG1CON2bits.G1ARSEN // bit 6
2279 #define G1ASE CWG1CON2bits.G1ASE // bit 7
2281 #define CWG1DBF0 CWG1DBFbits.CWG1DBF0 // bit 0
2282 #define CWG1DBF1 CWG1DBFbits.CWG1DBF1 // bit 1
2283 #define CWG1DBF2 CWG1DBFbits.CWG1DBF2 // bit 2
2284 #define CWG1DBF3 CWG1DBFbits.CWG1DBF3 // bit 3
2285 #define CWG1DBF4 CWG1DBFbits.CWG1DBF4 // bit 4
2286 #define CWG1DBF5 CWG1DBFbits.CWG1DBF5 // bit 5
2288 #define CWG1DBR0 CWG1DBRbits.CWG1DBR0 // bit 0
2289 #define CWG1DBR1 CWG1DBRbits.CWG1DBR1 // bit 1
2290 #define CWG1DBR2 CWG1DBRbits.CWG1DBR2 // bit 2
2291 #define CWG1DBR3 CWG1DBRbits.CWG1DBR3 // bit 3
2292 #define CWG1DBR4 CWG1DBRbits.CWG1DBR4 // bit 4
2293 #define CWG1DBR5 CWG1DBRbits.CWG1DBR5 // bit 5
2295 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
2296 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
2297 #define TSRNG FVRCONbits.TSRNG // bit 4
2298 #define TSEN FVRCONbits.TSEN // bit 5
2299 #define FVRRDY FVRCONbits.FVRRDY // bit 6
2300 #define FVREN FVRCONbits.FVREN // bit 7
2302 #define IOCIF INTCONbits.IOCIF // bit 0
2303 #define INTF INTCONbits.INTF // bit 1
2304 #define TMR0IF INTCONbits.TMR0IF // bit 2
2305 #define IOCIE INTCONbits.IOCIE // bit 3
2306 #define INTE INTCONbits.INTE // bit 4
2307 #define TMR0IE INTCONbits.TMR0IE // bit 5
2308 #define PEIE INTCONbits.PEIE // bit 6
2309 #define GIE INTCONbits.GIE // bit 7
2311 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
2312 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
2313 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
2314 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
2316 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
2317 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
2318 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
2319 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
2321 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
2322 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
2323 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
2324 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
2326 #define LATA0 LATAbits.LATA0 // bit 0
2327 #define LATA1 LATAbits.LATA1 // bit 1
2328 #define LATA2 LATAbits.LATA2 // bit 2
2330 #define NCO1ACC8 NCO1ACCHbits.NCO1ACC8 // bit 0
2331 #define NCO1ACC9 NCO1ACCHbits.NCO1ACC9 // bit 1
2332 #define NCO1ACC10 NCO1ACCHbits.NCO1ACC10 // bit 2
2333 #define NCO1ACC11 NCO1ACCHbits.NCO1ACC11 // bit 3
2334 #define NCO1ACC12 NCO1ACCHbits.NCO1ACC12 // bit 4
2335 #define NCO1ACC13 NCO1ACCHbits.NCO1ACC13 // bit 5
2336 #define NCO1ACC14 NCO1ACCHbits.NCO1ACC14 // bit 6
2337 #define NCO1ACC15 NCO1ACCHbits.NCO1ACC15 // bit 7
2339 #define NCO1ACC0 NCO1ACCLbits.NCO1ACC0 // bit 0
2340 #define NCO1ACC1 NCO1ACCLbits.NCO1ACC1 // bit 1
2341 #define NCO1ACC2 NCO1ACCLbits.NCO1ACC2 // bit 2
2342 #define NCO1ACC3 NCO1ACCLbits.NCO1ACC3 // bit 3
2343 #define NCO1ACC4 NCO1ACCLbits.NCO1ACC4 // bit 4
2344 #define NCO1ACC5 NCO1ACCLbits.NCO1ACC5 // bit 5
2345 #define NCO1ACC6 NCO1ACCLbits.NCO1ACC6 // bit 6
2346 #define NCO1ACC7 NCO1ACCLbits.NCO1ACC7 // bit 7
2348 #define NCO1ACC16 NCO1ACCUbits.NCO1ACC16 // bit 0
2349 #define NCO1ACC17 NCO1ACCUbits.NCO1ACC17 // bit 1
2350 #define NCO1ACC18 NCO1ACCUbits.NCO1ACC18 // bit 2
2351 #define NCO1ACC19 NCO1ACCUbits.NCO1ACC19 // bit 3
2353 #define N1CKS0 NCO1CLKbits.N1CKS0 // bit 0
2354 #define N1CKS1 NCO1CLKbits.N1CKS1 // bit 1
2355 #define N1PWS0 NCO1CLKbits.N1PWS0 // bit 5
2356 #define N1PWS1 NCO1CLKbits.N1PWS1 // bit 6
2357 #define N1PWS2 NCO1CLKbits.N1PWS2 // bit 7
2359 #define N1PFM NCO1CONbits.N1PFM // bit 0
2360 #define N1POL NCO1CONbits.N1POL // bit 4
2361 #define N1OUT NCO1CONbits.N1OUT // bit 5
2362 #define N1OE NCO1CONbits.N1OE // bit 6
2363 #define N1EN NCO1CONbits.N1EN // bit 7
2365 #define NCO1INC8 NCO1INCHbits.NCO1INC8 // bit 0
2366 #define NCO1INC9 NCO1INCHbits.NCO1INC9 // bit 1
2367 #define NCO1INC10 NCO1INCHbits.NCO1INC10 // bit 2
2368 #define NCO1INC11 NCO1INCHbits.NCO1INC11 // bit 3
2369 #define NCO1INC12 NCO1INCHbits.NCO1INC12 // bit 4
2370 #define NCO1INC13 NCO1INCHbits.NCO1INC13 // bit 5
2371 #define NCO1INC14 NCO1INCHbits.NCO1INC14 // bit 6
2372 #define NCO1INC15 NCO1INCHbits.NCO1INC15 // bit 7
2374 #define NCO1INC0 NCO1INCLbits.NCO1INC0 // bit 0
2375 #define NCO1INC1 NCO1INCLbits.NCO1INC1 // bit 1
2376 #define NCO1INC2 NCO1INCLbits.NCO1INC2 // bit 2
2377 #define NCO1INC3 NCO1INCLbits.NCO1INC3 // bit 3
2378 #define NCO1INC4 NCO1INCLbits.NCO1INC4 // bit 4
2379 #define NCO1INC5 NCO1INCLbits.NCO1INC5 // bit 5
2380 #define NCO1INC6 NCO1INCLbits.NCO1INC6 // bit 6
2381 #define NCO1INC7 NCO1INCLbits.NCO1INC7 // bit 7
2383 #define PS0 OPTION_REGbits.PS0 // bit 0
2384 #define PS1 OPTION_REGbits.PS1 // bit 1
2385 #define PS2 OPTION_REGbits.PS2 // bit 2
2386 #define PSA OPTION_REGbits.PSA // bit 3
2387 #define T0SE OPTION_REGbits.T0SE // bit 4
2388 #define T0CS OPTION_REGbits.T0CS // bit 5
2389 #define INTEDG OPTION_REGbits.INTEDG // bit 6
2390 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
2392 #define HFIOFS OSCCONbits.HFIOFS // bit 0
2393 #define LFIOFR OSCCONbits.LFIOFR // bit 1
2394 #define HFIOFR OSCCONbits.HFIOFR // bit 3
2395 #define IRCF0 OSCCONbits.IRCF0 // bit 4
2396 #define IRCF1 OSCCONbits.IRCF1 // bit 5
2397 #define IRCF2 OSCCONbits.IRCF2 // bit 6
2399 #define PCLH0 PCLATHbits.PCLH0 // bit 0
2401 #define NOT_BOR PCONbits.NOT_BOR // bit 0
2402 #define NOT_POR PCONbits.NOT_POR // bit 1
2404 #define TMR2IE PIE1bits.TMR2IE // bit 1
2405 #define CLC1IE PIE1bits.CLC1IE // bit 3
2406 #define NCO1IE PIE1bits.NCO1IE // bit 4
2407 #define ADIE PIE1bits.ADIE // bit 6
2409 #define TMR2IF PIR1bits.TMR2IF // bit 1
2410 #define CLC1IF PIR1bits.CLC1IF // bit 3
2411 #define NCO1IF PIR1bits.NCO1IF // bit 4
2412 #define ADIF PIR1bits.ADIF // bit 6
2414 #define PMADR8 PMADRHbits.PMADR8 // bit 0
2416 #define RD PMCON1bits.RD // bit 0
2417 #define WR PMCON1bits.WR // bit 1
2418 #define WREN PMCON1bits.WREN // bit 2
2419 #define WRERR PMCON1bits.WRERR // bit 3
2420 #define FREE PMCON1bits.FREE // bit 4
2421 #define LWLO PMCON1bits.LWLO // bit 5
2422 #define CFGS PMCON1bits.CFGS // bit 6
2424 #define RA0 PORTAbits.RA0 // bit 0
2425 #define RA1 PORTAbits.RA1 // bit 1
2426 #define RA2 PORTAbits.RA2 // bit 2
2427 #define RA3 PORTAbits.RA3 // bit 3
2429 #define PWM1POL PWM1CONbits.PWM1POL // bit 4
2430 #define PWM1OUT PWM1CONbits.PWM1OUT // bit 5
2431 #define PWM1OE PWM1CONbits.PWM1OE // bit 6
2432 #define PWM1EN PWM1CONbits.PWM1EN // bit 7
2434 #define PWM1DCH0 PWM1DCHbits.PWM1DCH0 // bit 0
2435 #define PWM1DCH1 PWM1DCHbits.PWM1DCH1 // bit 1
2436 #define PWM1DCH2 PWM1DCHbits.PWM1DCH2 // bit 2
2437 #define PWM1DCH3 PWM1DCHbits.PWM1DCH3 // bit 3
2438 #define PWM1DCH4 PWM1DCHbits.PWM1DCH4 // bit 4
2439 #define PWM1DCH5 PWM1DCHbits.PWM1DCH5 // bit 5
2440 #define PWM1DCH6 PWM1DCHbits.PWM1DCH6 // bit 6
2441 #define PWM1DCH7 PWM1DCHbits.PWM1DCH7 // bit 7
2443 #define PWM1DCL0 PWM1DCLbits.PWM1DCL0 // bit 6
2444 #define PWM1DCL1 PWM1DCLbits.PWM1DCL1 // bit 7
2446 #define PWM2POL PWM2CONbits.PWM2POL // bit 4
2447 #define PWM2OUT PWM2CONbits.PWM2OUT // bit 5
2448 #define PWM2OE PWM2CONbits.PWM2OE // bit 6
2449 #define PWM2EN PWM2CONbits.PWM2EN // bit 7
2451 #define PWM2DCH0 PWM2DCHbits.PWM2DCH0 // bit 0
2452 #define PWM2DCH1 PWM2DCHbits.PWM2DCH1 // bit 1
2453 #define PWM2DCH2 PWM2DCHbits.PWM2DCH2 // bit 2
2454 #define PWM2DCH3 PWM2DCHbits.PWM2DCH3 // bit 3
2455 #define PWM2DCH4 PWM2DCHbits.PWM2DCH4 // bit 4
2456 #define PWM2DCH5 PWM2DCHbits.PWM2DCH5 // bit 5
2457 #define PWM2DCH6 PWM2DCHbits.PWM2DCH6 // bit 6
2458 #define PWM2DCH7 PWM2DCHbits.PWM2DCH7 // bit 7
2460 #define PWM2DCL0 PWM2DCLbits.PWM2DCL0 // bit 6
2461 #define PWM2DCL1 PWM2DCLbits.PWM2DCL1 // bit 7
2463 #define C STATUSbits.C // bit 0
2464 #define DC STATUSbits.DC // bit 1
2465 #define Z STATUSbits.Z // bit 2
2466 #define NOT_PD STATUSbits.NOT_PD // bit 3
2467 #define NOT_TO STATUSbits.NOT_TO // bit 4
2468 #define RP0 STATUSbits.RP0 // bit 5
2469 #define RP1 STATUSbits.RP1 // bit 6
2470 #define IRP STATUSbits.IRP // bit 7
2472 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
2473 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
2474 #define TMR2ON T2CONbits.TMR2ON // bit 2
2475 #define TOUTPS0 T2CONbits.TOUTPS0 // bit 3
2476 #define TOUTPS1 T2CONbits.TOUTPS1 // bit 4
2477 #define TOUTPS2 T2CONbits.TOUTPS2 // bit 5
2478 #define TOUTPS3 T2CONbits.TOUTPS3 // bit 6
2480 #define TRISA0 TRISAbits.TRISA0 // bit 0
2481 #define TRISA1 TRISAbits.TRISA1 // bit 1
2482 #define TRISA2 TRISAbits.TRISA2 // bit 2
2484 #define VREGPM0 VREGCONbits.VREGPM0 // bit 0
2485 #define VREGPM1 VREGCONbits.VREGPM1 // bit 1
2487 #define SWDTEN WDTCONbits.SWDTEN // bit 0
2488 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
2489 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
2490 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
2491 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
2492 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
2494 #define WPUA0 WPUAbits.WPUA0 // bit 0
2495 #define WPUA1 WPUAbits.WPUA1 // bit 1
2496 #define WPUA2 WPUAbits.WPUA2 // bit 2
2497 #define WPUA3 WPUAbits.WPUA3 // bit 3
2499 #endif // #ifndef NO_BIT_DEFINES
2501 #endif // #ifndef __PIC10F320_H__