2 * This definitions of the PIC12F1572 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:05 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 #include <pic12f1572.h>
27 //==============================================================================
29 __at(0x0000) __sfr INDF0
;
31 __at(0x0001) __sfr INDF1
;
33 __at(0x0002) __sfr PCL
;
35 __at(0x0003) __sfr STATUS
;
36 __at(0x0003) volatile __STATUSbits_t STATUSbits
;
38 __at(0x0004) __sfr FSR0
;
40 __at(0x0004) __sfr FSR0L
;
42 __at(0x0005) __sfr FSR0H
;
44 __at(0x0006) __sfr FSR1
;
46 __at(0x0006) __sfr FSR1L
;
48 __at(0x0007) __sfr FSR1H
;
50 __at(0x0008) __sfr BSR
;
51 __at(0x0008) volatile __BSRbits_t BSRbits
;
53 __at(0x0009) __sfr WREG
;
55 __at(0x000A) __sfr PCLATH
;
57 __at(0x000B) __sfr INTCON
;
58 __at(0x000B) volatile __INTCONbits_t INTCONbits
;
60 __at(0x000C) __sfr PORTA
;
61 __at(0x000C) volatile __PORTAbits_t PORTAbits
;
63 __at(0x0011) __sfr PIR1
;
64 __at(0x0011) volatile __PIR1bits_t PIR1bits
;
66 __at(0x0012) __sfr PIR2
;
67 __at(0x0012) volatile __PIR2bits_t PIR2bits
;
69 __at(0x0013) __sfr PIR3
;
70 __at(0x0013) volatile __PIR3bits_t PIR3bits
;
72 __at(0x0015) __sfr TMR0
;
74 __at(0x0016) __sfr TMR1
;
76 __at(0x0016) __sfr TMR1L
;
78 __at(0x0017) __sfr TMR1H
;
80 __at(0x0018) __sfr T1CON
;
81 __at(0x0018) volatile __T1CONbits_t T1CONbits
;
83 __at(0x0019) __sfr T1GCON
;
84 __at(0x0019) volatile __T1GCONbits_t T1GCONbits
;
86 __at(0x001A) __sfr TMR2
;
88 __at(0x001B) __sfr PR2
;
90 __at(0x001C) __sfr T2CON
;
91 __at(0x001C) volatile __T2CONbits_t T2CONbits
;
93 __at(0x008C) __sfr TRISA
;
94 __at(0x008C) volatile __TRISAbits_t TRISAbits
;
96 __at(0x0091) __sfr PIE1
;
97 __at(0x0091) volatile __PIE1bits_t PIE1bits
;
99 __at(0x0092) __sfr PIE2
;
100 __at(0x0092) volatile __PIE2bits_t PIE2bits
;
102 __at(0x0093) __sfr PIE3
;
103 __at(0x0093) volatile __PIE3bits_t PIE3bits
;
105 __at(0x0095) __sfr OPTION_REG
;
106 __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits
;
108 __at(0x0096) __sfr PCON
;
109 __at(0x0096) volatile __PCONbits_t PCONbits
;
111 __at(0x0097) __sfr WDTCON
;
112 __at(0x0097) volatile __WDTCONbits_t WDTCONbits
;
114 __at(0x0098) __sfr OSCTUNE
;
115 __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits
;
117 __at(0x0099) __sfr OSCCON
;
118 __at(0x0099) volatile __OSCCONbits_t OSCCONbits
;
120 __at(0x009A) __sfr OSCSTAT
;
121 __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits
;
123 __at(0x009B) __sfr ADRES
;
125 __at(0x009B) __sfr ADRESL
;
127 __at(0x009C) __sfr ADRESH
;
129 __at(0x009D) __sfr ADCON0
;
130 __at(0x009D) volatile __ADCON0bits_t ADCON0bits
;
132 __at(0x009E) __sfr ADCON1
;
133 __at(0x009E) volatile __ADCON1bits_t ADCON1bits
;
135 __at(0x009F) __sfr ADCON2
;
136 __at(0x009F) volatile __ADCON2bits_t ADCON2bits
;
138 __at(0x010C) __sfr LATA
;
139 __at(0x010C) volatile __LATAbits_t LATAbits
;
141 __at(0x0111) __sfr CM1CON0
;
142 __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits
;
144 __at(0x0112) __sfr CM1CON1
;
145 __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits
;
147 __at(0x0115) __sfr CMOUT
;
148 __at(0x0115) volatile __CMOUTbits_t CMOUTbits
;
150 __at(0x0116) __sfr BORCON
;
151 __at(0x0116) volatile __BORCONbits_t BORCONbits
;
153 __at(0x0117) __sfr FVRCON
;
154 __at(0x0117) volatile __FVRCONbits_t FVRCONbits
;
156 __at(0x0118) __sfr DACCON0
;
157 __at(0x0118) volatile __DACCON0bits_t DACCON0bits
;
159 __at(0x0119) __sfr DACCON1
;
160 __at(0x0119) volatile __DACCON1bits_t DACCON1bits
;
162 __at(0x011D) __sfr APFCON
;
163 __at(0x011D) volatile __APFCONbits_t APFCONbits
;
165 __at(0x011D) __sfr APFCON0
;
166 __at(0x011D) volatile __APFCON0bits_t APFCON0bits
;
168 __at(0x018C) __sfr ANSELA
;
169 __at(0x018C) volatile __ANSELAbits_t ANSELAbits
;
171 __at(0x0191) __sfr PMADR
;
173 __at(0x0191) __sfr PMADRL
;
175 __at(0x0192) __sfr PMADRH
;
177 __at(0x0193) __sfr PMDAT
;
179 __at(0x0193) __sfr PMDATL
;
181 __at(0x0194) __sfr PMDATH
;
183 __at(0x0195) __sfr PMCON1
;
184 __at(0x0195) volatile __PMCON1bits_t PMCON1bits
;
186 __at(0x0196) __sfr PMCON2
;
188 __at(0x0197) __sfr VREGCON
;
189 __at(0x0197) volatile __VREGCONbits_t VREGCONbits
;
191 __at(0x0199) __sfr RCREG
;
193 __at(0x019A) __sfr TXREG
;
195 __at(0x019B) __sfr SPBRG
;
197 __at(0x019B) __sfr SPBRGL
;
199 __at(0x019C) __sfr SPBRGH
;
201 __at(0x019D) __sfr RCSTA
;
202 __at(0x019D) volatile __RCSTAbits_t RCSTAbits
;
204 __at(0x019E) __sfr TXSTA
;
205 __at(0x019E) volatile __TXSTAbits_t TXSTAbits
;
207 __at(0x019F) __sfr BAUDCON
;
208 __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits
;
210 __at(0x020C) __sfr WPUA
;
211 __at(0x020C) volatile __WPUAbits_t WPUAbits
;
213 __at(0x028C) __sfr ODCONA
;
214 __at(0x028C) volatile __ODCONAbits_t ODCONAbits
;
216 __at(0x030C) __sfr SLRCONA
;
217 __at(0x030C) volatile __SLRCONAbits_t SLRCONAbits
;
219 __at(0x038C) __sfr INLVLA
;
220 __at(0x038C) volatile __INLVLAbits_t INLVLAbits
;
222 __at(0x0391) __sfr IOCAP
;
223 __at(0x0391) volatile __IOCAPbits_t IOCAPbits
;
225 __at(0x0392) __sfr IOCAN
;
226 __at(0x0392) volatile __IOCANbits_t IOCANbits
;
228 __at(0x0393) __sfr IOCAF
;
229 __at(0x0393) volatile __IOCAFbits_t IOCAFbits
;
231 __at(0x0691) __sfr CWG1DBR
;
232 __at(0x0691) volatile __CWG1DBRbits_t CWG1DBRbits
;
234 __at(0x0692) __sfr CWG1DBF
;
235 __at(0x0692) volatile __CWG1DBFbits_t CWG1DBFbits
;
237 __at(0x0693) __sfr CWG1CON0
;
238 __at(0x0693) volatile __CWG1CON0bits_t CWG1CON0bits
;
240 __at(0x0694) __sfr CWG1CON1
;
241 __at(0x0694) volatile __CWG1CON1bits_t CWG1CON1bits
;
243 __at(0x0695) __sfr CWG1CON2
;
244 __at(0x0695) volatile __CWG1CON2bits_t CWG1CON2bits
;
246 __at(0x0D8E) __sfr PWMEN
;
247 __at(0x0D8E) volatile __PWMENbits_t PWMENbits
;
249 __at(0x0D8F) __sfr PWMLD
;
250 __at(0x0D8F) volatile __PWMLDbits_t PWMLDbits
;
252 __at(0x0D90) __sfr PWMOUT
;
253 __at(0x0D90) volatile __PWMOUTbits_t PWMOUTbits
;
255 __at(0x0D91) __sfr PWM1PH
;
257 __at(0x0D91) __sfr PWM1PHL
;
258 __at(0x0D91) volatile __PWM1PHLbits_t PWM1PHLbits
;
260 __at(0x0D92) __sfr PWM1PHH
;
261 __at(0x0D92) volatile __PWM1PHHbits_t PWM1PHHbits
;
263 __at(0x0D93) __sfr PWM1DC
;
265 __at(0x0D93) __sfr PWM1DCL
;
266 __at(0x0D93) volatile __PWM1DCLbits_t PWM1DCLbits
;
268 __at(0x0D94) __sfr PWM1DCH
;
269 __at(0x0D94) volatile __PWM1DCHbits_t PWM1DCHbits
;
271 __at(0x0D95) __sfr PWM1PR
;
273 __at(0x0D95) __sfr PWM1PRL
;
274 __at(0x0D95) volatile __PWM1PRLbits_t PWM1PRLbits
;
276 __at(0x0D96) __sfr PWM1PRH
;
277 __at(0x0D96) volatile __PWM1PRHbits_t PWM1PRHbits
;
279 __at(0x0D97) __sfr PWM1OF
;
281 __at(0x0D97) __sfr PWM1OFL
;
282 __at(0x0D97) volatile __PWM1OFLbits_t PWM1OFLbits
;
284 __at(0x0D98) __sfr PWM1OFH
;
285 __at(0x0D98) volatile __PWM1OFHbits_t PWM1OFHbits
;
287 __at(0x0D99) __sfr PWM1TMR
;
289 __at(0x0D99) __sfr PWM1TMRL
;
290 __at(0x0D99) volatile __PWM1TMRLbits_t PWM1TMRLbits
;
292 __at(0x0D9A) __sfr PWM1TMRH
;
293 __at(0x0D9A) volatile __PWM1TMRHbits_t PWM1TMRHbits
;
295 __at(0x0D9B) __sfr PWM1CON
;
296 __at(0x0D9B) volatile __PWM1CONbits_t PWM1CONbits
;
298 __at(0x0D9C) __sfr PWM1INTCON
;
299 __at(0x0D9C) volatile __PWM1INTCONbits_t PWM1INTCONbits
;
301 __at(0x0D9C) __sfr PWM1INTE
;
302 __at(0x0D9C) volatile __PWM1INTEbits_t PWM1INTEbits
;
304 __at(0x0D9D) __sfr PWM1INTF
;
305 __at(0x0D9D) volatile __PWM1INTFbits_t PWM1INTFbits
;
307 __at(0x0D9D) __sfr PWM1INTFLG
;
308 __at(0x0D9D) volatile __PWM1INTFLGbits_t PWM1INTFLGbits
;
310 __at(0x0D9E) __sfr PWM1CLKCON
;
311 __at(0x0D9E) volatile __PWM1CLKCONbits_t PWM1CLKCONbits
;
313 __at(0x0D9F) __sfr PWM1LDCON
;
314 __at(0x0D9F) volatile __PWM1LDCONbits_t PWM1LDCONbits
;
316 __at(0x0DA0) __sfr PWM1OFCON
;
317 __at(0x0DA0) volatile __PWM1OFCONbits_t PWM1OFCONbits
;
319 __at(0x0DA1) __sfr PWM2PH
;
321 __at(0x0DA1) __sfr PWM2PHL
;
322 __at(0x0DA1) volatile __PWM2PHLbits_t PWM2PHLbits
;
324 __at(0x0DA2) __sfr PWM2PHH
;
325 __at(0x0DA2) volatile __PWM2PHHbits_t PWM2PHHbits
;
327 __at(0x0DA3) __sfr PWM2DC
;
329 __at(0x0DA3) __sfr PWM2DCL
;
330 __at(0x0DA3) volatile __PWM2DCLbits_t PWM2DCLbits
;
332 __at(0x0DA4) __sfr PWM2DCH
;
333 __at(0x0DA4) volatile __PWM2DCHbits_t PWM2DCHbits
;
335 __at(0x0DA5) __sfr PWM2PR
;
337 __at(0x0DA5) __sfr PWM2PRL
;
338 __at(0x0DA5) volatile __PWM2PRLbits_t PWM2PRLbits
;
340 __at(0x0DA6) __sfr PWM2PRH
;
341 __at(0x0DA6) volatile __PWM2PRHbits_t PWM2PRHbits
;
343 __at(0x0DA7) __sfr PWM2OF
;
345 __at(0x0DA7) __sfr PWM2OFL
;
346 __at(0x0DA7) volatile __PWM2OFLbits_t PWM2OFLbits
;
348 __at(0x0DA8) __sfr PWM2OFH
;
349 __at(0x0DA8) volatile __PWM2OFHbits_t PWM2OFHbits
;
351 __at(0x0DA9) __sfr PWM2TMR
;
353 __at(0x0DA9) __sfr PWM2TMRL
;
354 __at(0x0DA9) volatile __PWM2TMRLbits_t PWM2TMRLbits
;
356 __at(0x0DAA) __sfr PWM2TMRH
;
357 __at(0x0DAA) volatile __PWM2TMRHbits_t PWM2TMRHbits
;
359 __at(0x0DAB) __sfr PWM2CON
;
360 __at(0x0DAB) volatile __PWM2CONbits_t PWM2CONbits
;
362 __at(0x0DAC) __sfr PWM2INTCON
;
363 __at(0x0DAC) volatile __PWM2INTCONbits_t PWM2INTCONbits
;
365 __at(0x0DAC) __sfr PWM2INTE
;
366 __at(0x0DAC) volatile __PWM2INTEbits_t PWM2INTEbits
;
368 __at(0x0DAD) __sfr PWM2INTF
;
369 __at(0x0DAD) volatile __PWM2INTFbits_t PWM2INTFbits
;
371 __at(0x0DAD) __sfr PWM2INTFLG
;
372 __at(0x0DAD) volatile __PWM2INTFLGbits_t PWM2INTFLGbits
;
374 __at(0x0DAE) __sfr PWM2CLKCON
;
375 __at(0x0DAE) volatile __PWM2CLKCONbits_t PWM2CLKCONbits
;
377 __at(0x0DAF) __sfr PWM2LDCON
;
378 __at(0x0DAF) volatile __PWM2LDCONbits_t PWM2LDCONbits
;
380 __at(0x0DB0) __sfr PWM2OFCON
;
381 __at(0x0DB0) volatile __PWM2OFCONbits_t PWM2OFCONbits
;
383 __at(0x0DB1) __sfr PWM3PH
;
385 __at(0x0DB1) __sfr PWM3PHL
;
386 __at(0x0DB1) volatile __PWM3PHLbits_t PWM3PHLbits
;
388 __at(0x0DB2) __sfr PWM3PHH
;
389 __at(0x0DB2) volatile __PWM3PHHbits_t PWM3PHHbits
;
391 __at(0x0DB3) __sfr PWM3DC
;
393 __at(0x0DB3) __sfr PWM3DCL
;
394 __at(0x0DB3) volatile __PWM3DCLbits_t PWM3DCLbits
;
396 __at(0x0DB4) __sfr PWM3DCH
;
397 __at(0x0DB4) volatile __PWM3DCHbits_t PWM3DCHbits
;
399 __at(0x0DB5) __sfr PWM3PR
;
401 __at(0x0DB5) __sfr PWM3PRL
;
402 __at(0x0DB5) volatile __PWM3PRLbits_t PWM3PRLbits
;
404 __at(0x0DB6) __sfr PWM3PRH
;
405 __at(0x0DB6) volatile __PWM3PRHbits_t PWM3PRHbits
;
407 __at(0x0DB7) __sfr PWM3OF
;
409 __at(0x0DB7) __sfr PWM3OFL
;
410 __at(0x0DB7) volatile __PWM3OFLbits_t PWM3OFLbits
;
412 __at(0x0DB8) __sfr PWM3OFH
;
413 __at(0x0DB8) volatile __PWM3OFHbits_t PWM3OFHbits
;
415 __at(0x0DB9) __sfr PWM3TMR
;
417 __at(0x0DB9) __sfr PWM3TMRL
;
418 __at(0x0DB9) volatile __PWM3TMRLbits_t PWM3TMRLbits
;
420 __at(0x0DBA) __sfr PWM3TMRH
;
421 __at(0x0DBA) volatile __PWM3TMRHbits_t PWM3TMRHbits
;
423 __at(0x0DBB) __sfr PWM3CON
;
424 __at(0x0DBB) volatile __PWM3CONbits_t PWM3CONbits
;
426 __at(0x0DBC) __sfr PWM3INTCON
;
427 __at(0x0DBC) volatile __PWM3INTCONbits_t PWM3INTCONbits
;
429 __at(0x0DBC) __sfr PWM3INTE
;
430 __at(0x0DBC) volatile __PWM3INTEbits_t PWM3INTEbits
;
432 __at(0x0DBD) __sfr PWM3INTF
;
433 __at(0x0DBD) volatile __PWM3INTFbits_t PWM3INTFbits
;
435 __at(0x0DBD) __sfr PWM3INTFLG
;
436 __at(0x0DBD) volatile __PWM3INTFLGbits_t PWM3INTFLGbits
;
438 __at(0x0DBE) __sfr PWM3CLKCON
;
439 __at(0x0DBE) volatile __PWM3CLKCONbits_t PWM3CLKCONbits
;
441 __at(0x0DBF) __sfr PWM3LDCON
;
442 __at(0x0DBF) volatile __PWM3LDCONbits_t PWM3LDCONbits
;
444 __at(0x0DC0) __sfr PWM3OFCON
;
445 __at(0x0DC0) volatile __PWM3OFCONbits_t PWM3OFCONbits
;
447 __at(0x0FE4) __sfr STATUS_SHAD
;
448 __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits
;
450 __at(0x0FE5) __sfr WREG_SHAD
;
452 __at(0x0FE6) __sfr BSR_SHAD
;
454 __at(0x0FE7) __sfr PCLATH_SHAD
;
456 __at(0x0FE8) __sfr FSR0L_SHAD
;
458 __at(0x0FE8) __sfr FSR0_SHAD
;
460 __at(0x0FE9) __sfr FSR0H_SHAD
;
462 __at(0x0FEA) __sfr FSR1L_SHAD
;
464 __at(0x0FEA) __sfr FSR1_SHAD
;
466 __at(0x0FEB) __sfr FSR1H_SHAD
;
468 __at(0x0FED) __sfr STKPTR
;
470 __at(0x0FEE) __sfr TOS
;
472 __at(0x0FEE) __sfr TOSL
;
474 __at(0x0FEF) __sfr TOSH
;