-
Notifications
You must be signed in to change notification settings - Fork 0
/
pic18f452.c
207 lines (158 loc) · 5.25 KB
/
pic18f452.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/*
* pic18f452.c - PIC18F452 Device Library Source
*
* This file is part of the GNU PIC Library.
*
* January, 2004
* The GNU PIC Library is maintained by,
* Vangelis Rokas <[email protected]>
*
* Modified by [email protected] for MIOS SDCC wrapper compliance: FSR0 registers swapped with FSR1
*
*/
#include "pic18f452.h"
sfr at 0xf80 PORTA;
volatile __PORTAbits_t at 0xf80 PORTAbits;
sfr at 0xf81 PORTB;
volatile __PORTBbits_t at 0xf81 PORTBbits;
sfr at 0xf82 PORTC;
volatile __PORTCbits_t at 0xf82 PORTCbits;
sfr at 0xf83 PORTD;
volatile __PORTDbits_t at 0xf83 PORTDbits;
sfr at 0xf84 PORTE;
volatile __PORTEbits_t at 0xf84 PORTEbits;
sfr at 0xf89 LATA;
volatile __LATAbits_t at 0xf89 LATAbits;
sfr at 0xf8a LATB;
volatile __LATBbits_t at 0xf8a LATBbits;
sfr at 0xf8b LATC;
volatile __LATCbits_t at 0xf8b LATCbits;
sfr at 0xf8c LATD;
volatile __LATDbits_t at 0xf8c LATDbits;
sfr at 0xf8d LATE;
volatile __LATEbits_t at 0xf8d LATEbits;
sfr at 0xf92 TRISA;
volatile __TRISAbits_t at 0xf92 TRISAbits;
sfr at 0xf93 TRISB;
volatile __TRISBbits_t at 0xf93 TRISBbits;
sfr at 0xf94 TRISC;
volatile __TRISCbits_t at 0xf94 TRISCbits;
sfr at 0xf95 TRISD;
volatile __TRISDbits_t at 0xf95 TRISDbits;
sfr at 0xf96 TRISE;
volatile __TRISEbits_t at 0xf96 TRISEbits;
sfr at 0xf9d PIE1;
volatile __PIE1bits_t at 0xf9d PIE1bits;
sfr at 0xf9e PIR1;
volatile __PIR1bits_t at 0xf9e PIR1bits;
sfr at 0xf9f IPR1;
volatile __IPR1bits_t at 0xf9f IPR1bits;
sfr at 0xfa0 PIE2;
volatile __PIE2bits_t at 0xfa0 PIE2bits;
sfr at 0xfa1 PIR2;
volatile __PIR2bits_t at 0xfa1 PIR2bits;
sfr at 0xfa2 IPR2;
volatile __IPR2bits_t at 0xfa2 IPR2bits;
sfr at 0xfa6 EECON1;
volatile __EECON1bits_t at 0xfa6 EECON1bits;
sfr at 0xfa7 EECON2;
sfr at 0xfa8 EEDATA;
sfr at 0xfa9 EEADR;
sfr at 0xfab RCSTA;
volatile __RCSTAbits_t at 0xfab RCSTAbits;
sfr at 0xfac TXSTA;
volatile __TXSTAbits_t at 0xfac TXSTAbits;
sfr at 0xfad TXREG;
sfr at 0xfae RCREG;
sfr at 0xfaf SPBRG;
sfr at 0xfb1 T3CON;
volatile __T3CONbits_t at 0xfb1 T3CONbits;
sfr at 0xfb2 TMR3L;
sfr at 0xfb3 TMR3H;
sfr at 0xfba CCP2CON;
volatile __CCP2CONbits_t at 0xfba CCP2CONbits;
sfr at 0xfbb CCPR2L;
sfr at 0xfbc CCPR2H;
sfr at 0xfbd CCP1CON;
volatile __CCP1CONbits_t at 0xfbd CCP1CONbits;
sfr at 0xfbe CCPR1L;
sfr at 0xfbf CCPR1H;
sfr at 0xfc1 ADCON1;
volatile __ADCON1bits_t at 0xfc1 ADCON1bits;
sfr at 0xfc2 ADCON0;
volatile __ADCON0bits_t at 0xfc2 ADCON0bits;
sfr at 0xfc3 ADRESL;
sfr at 0xfc4 ADRESH;
sfr at 0xfc5 SSPCON2;
volatile __SSPCON2bits_t at 0xfc5 SSPCON2bits;
sfr at 0xfc6 SSPCON1;
volatile __SSPCON1bits_t at 0xfc6 SSPCON1bits;
sfr at 0xfc7 SSPSTAT;
volatile __SSPSTATbits_t at 0xfc7 SSPSTATbits;
sfr at 0xfc8 SSPADD;
sfr at 0xfc9 SSPBUF;
sfr at 0xfca T2CON;
volatile __T2CONbits_t at 0xfca T2CONbits;
sfr at 0xfcb PR2;
sfr at 0xfcc TMR2;
sfr at 0xfcd T1CON;
volatile __T1CONbits_t at 0xfcd T1CONbits;
sfr at 0xfce TMR1L;
sfr at 0xfcf TMR1H;
sfr at 0xfd0 RCON;
volatile __RCONbits_t at 0xfd0 RCONbits;
sfr at 0xfd1 WDTCON;
volatile __WDTCONbits_t at 0xfd1 WDTCONbits;
sfr at 0xfd2 LVDCON;
volatile __LVDCONbits_t at 0xfd2 LVDCONbits;
sfr at 0xfd3 OSCCON;
volatile __OSCCONbits_t at 0xfd3 OSCCONbits;
sfr at 0xfd5 T0CON;
volatile __T0CONbits_t at 0xfd5 T0CONbits;
sfr at 0xfd6 TMR0L;
sfr at 0xfd7 TMR0H;
sfr at 0xfd8 STATUS;
volatile __STATUSbits_t at 0xfd8 STATUSbits;
sfr at 0xfd9 FSR2L;
sfr at 0xfda FSR2H;
sfr at 0xfdb PLUSW2;
sfr at 0xfdc PREINC2;
sfr at 0xfdd POSTDEC2;
sfr at 0xfde POSTINC2;
sfr at 0xfdf INDF2;
sfr at 0xfe0 BSR;
sfr at 0xfe9 FSR1L; // swapped with FSR0L for MIOS wrapper compliance
sfr at 0xfea FSR1H; // swapped with FSR0H for MIOS wrapper compliance
sfr at 0xfeb PLUSW1; // swapped with PLUSW0 for MIOS wrapper compliance
sfr at 0xfec PREINC1; // swapped with PREINC0 for MIOS wrapper compliance
sfr at 0xfed POSTDEC1; // swapped with POSTDEC0 for MIOS wrapper compliance
sfr at 0xfee POSTINC1; // swapped with POSTINC0 for MIOS wrapper compliance
sfr at 0xfef INDF1; // swapped with INDF0 for MIOS wrapper compliance
sfr at 0xfe8 WREG;
sfr at 0xfe1 FSR0L; // swapped with FSR1L for MIOS wrapper compliance
sfr at 0xfe2 FSR0H; // swapped with FSR1H for MIOS wrapper compliance
sfr at 0xfe3 PLUSW0; // swapped with PLUSW1 for MIOS wrapper compliance
sfr at 0xfe4 PREINC0; // swapped with PREINC1 for MIOS wrapper compliance
sfr at 0xfe5 POSTDEC0; // swapped with POSTDEC1 for MIOS wrapper compliance
sfr at 0xfe6 POSTINC0; // swapped with POSTINC1 for MIOS wrapper compliance
sfr at 0xfe7 INDF0; // swapped with INDF1 for MIOS wrapper compliance
sfr at 0xff0 INTCON3;
volatile __INTCON3bits_t at 0xff0 INTCON3bits;
sfr at 0xff1 INTCON2;
volatile __INTCON2bits_t at 0xff1 INTCON2bits;
sfr at 0xff2 INTCON;
volatile __INTCONbits_t at 0xff2 INTCONbits;
sfr at 0xff3 PRODL;
sfr at 0xff4 PRODH;
sfr at 0xff5 TABLAT;
sfr at 0xff6 TBLPTRL;
sfr at 0xff7 TBLPTRH;
sfr at 0xff8 TBLPTRU;
sfr at 0xff9 PCL;
sfr at 0xffa PCLATH;
sfr at 0xffb PCLATU;
sfr at 0xffc STKPTR;
volatile __STKPTRbits_t at 0xffc STKPTRbits;
sfr at 0xffd TOSL;
sfr at 0xffe TOSH;
sfr at 0xfff TOSU;