~ubuntu-branches/ubuntu/utopic/gputils/utopic

« back to all changes in this revision

Viewing changes to header/p16c771.inc

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Tardieu
  • Date: 2002-01-21 11:14:50 UTC
  • Revision ID: james.westby@ubuntu.com-20020121111450-rayvyl8jzft0ninr
Tags: upstream-0.10.0
ImportĀ upstreamĀ versionĀ 0.10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
        LIST
 
2
; P16C771.INC  Standard Header File, Version 1.00    Microchip Technology, Inc.
 
3
        NOLIST
 
4
 
 
5
; This header file defines configurations, registers, and other useful bits of
 
6
; information for the PIC16C771 microcontroller.  These names are taken to match 
 
7
; the data sheets as closely as possible.  
 
8
 
 
9
; Note that the processor must be selected before this file is 
 
10
; included.  The processor may be selected the following ways:
 
11
 
 
12
;       1. Command line switch:
 
13
;               C:\ MPASM MYFILE.ASM /PIC16C771
 
14
;       2. LIST directive in the source file
 
15
;               LIST   P=PIC16C771
 
16
;       3. Processor Type entry in the MPASM full-screen interface
 
17
 
 
18
;==========================================================================
 
19
;
 
20
;       Revision History
 
21
;
 
22
;==========================================================================
 
23
 
 
24
;Rev:   Date:    Reason:
 
25
 
 
26
;1.00   14Sep1999 Initial Release
 
27
 
 
28
;==========================================================================
 
29
;
 
30
;       Verify Processor
 
31
;
 
32
;==========================================================================
 
33
 
 
34
        IFNDEF __16C771
 
35
           MESSG "Processor-header file mismatch.  Verify selected processor."
 
36
        ENDIF
 
37
 
 
38
;==========================================================================
 
39
;
 
40
;       Register Definitions
 
41
;
 
42
;==========================================================================
 
43
 
 
44
W                            EQU     H'0000'
 
45
F                            EQU     H'0001'
 
46
 
 
47
;----- Register Files------------------------------------------------------
 
48
 
 
49
INDF                         EQU     H'0000'
 
50
TMR0                         EQU     H'0001'
 
51
PCL                          EQU     H'0002'
 
52
STATUS                       EQU     H'0003'
 
53
FSR                          EQU     H'0004'
 
54
PORTA                        EQU     H'0005'
 
55
PORTB                        EQU     H'0006'
 
56
PCLATH                       EQU     H'000A'
 
57
INTCON                       EQU     H'000B'
 
58
PIR1                         EQU     H'000C'
 
59
PIR2                         EQU     H'000D'
 
60
TMR1L                        EQU     H'000E'
 
61
TMR1H                        EQU     H'000F'
 
62
T1CON                        EQU     H'0010'
 
63
TMR2                         EQU     H'0011'
 
64
T2CON                        EQU     H'0012'
 
65
SSPBUF                       EQU     H'0013'
 
66
SSPCON                       EQU     H'0014'
 
67
CCPR1L                       EQU     H'0015'
 
68
CCPR1H                       EQU     H'0016'
 
69
CCP1CON                      EQU     H'0017'
 
70
ADRESH                       EQU     H'001E'
 
71
ADCON0                       EQU     H'001F'
 
72
 
 
73
OPTION_REG                   EQU     H'0081'
 
74
TRISA                        EQU     H'0085'
 
75
TRISB                        EQU     H'0086'
 
76
PIE1                         EQU     H'008C'
 
77
PIE2                         EQU     H'008D'
 
78
PCON                         EQU     H'008E'
 
79
SSPCON2                      EQU     H'0091'
 
80
PR2                          EQU     H'0092'
 
81
SSPADD                       EQU     H'0093'
 
82
SSPSTAT                      EQU     H'0094'
 
83
WPUB                         EQU     H'0095'
 
84
IOCB                         EQU     H'0096'
 
85
P1DEL                        EQU     H'0097'
 
86
REFCON                       EQU     H'009B'
 
87
LVDCON                       EQU     H'009C'
 
88
ANSEL                        EQU     H'009D'
 
89
ADRESL                       EQU     H'009E'
 
90
ADCON1                       EQU     H'009F'
 
91
 
 
92
PMDATL                       EQU     H'010C'
 
93
PMADRL                       EQU     H'010D'
 
94
PMDATH                       EQU     H'010E'
 
95
PMADRH                       EQU     H'010F'
 
96
 
 
97
PMCON1                       EQU     H'018C'
 
98
;----- STATUS Bits --------------------------------------------------------
 
99
 
 
100
IRP                          EQU     H'0007'
 
101
RP1                          EQU     H'0006'
 
102
RP0                          EQU     H'0005'
 
103
NOT_TO                       EQU     H'0004'
 
104
NOT_PD                       EQU     H'0003'
 
105
Z                            EQU     H'0002'
 
106
DC                           EQU     H'0001'
 
107
C                            EQU     H'0000'
 
108
 
 
109
;----- INTCON Bits --------------------------------------------------------
 
110
 
 
111
GIE                          EQU     H'0007'
 
112
PEIE                         EQU     H'0006'
 
113
T0IE                         EQU     H'0005'
 
114
INTE                         EQU     H'0004'
 
115
RBIE                         EQU     H'0003'
 
116
T0IF                         EQU     H'0002'
 
117
INTF                         EQU     H'0001'
 
118
RBIF                         EQU     H'0000'
 
119
 
 
120
;----- PIR1 Bits ----------------------------------------------------------
 
121
 
 
122
ADIF                         EQU     H'0006'
 
123
SSPIF                        EQU     H'0003'
 
124
CCP1IF                       EQU     H'0002'
 
125
TMR2IF                       EQU     H'0001'
 
126
TMR1IF                       EQU     H'0000'
 
127
 
 
128
;----- PIR2 Bits ----------------------------------------------------------
 
129
 
 
130
LVDIF                        EQU     H'0007'
 
131
BCLIF                        EQU     H'0003'
 
132
 
 
133
;----- T1CON Bits ---------------------------------------------------------
 
134
 
 
135
T1CKPS1                      EQU     H'0005'
 
136
T1CKPS0                      EQU     H'0004'
 
137
T1OSCEN                      EQU     H'0003'
 
138
NOT_T1SYNC                   EQU     H'0002'
 
139
T1INSYNC                     EQU     H'0002'    ; Backward compatibility only
 
140
TMR1CS                       EQU     H'0001'
 
141
TMR1ON                       EQU     H'0000'
 
142
 
 
143
;----- T2CON Bits ---------------------------------------------------------
 
144
 
 
145
TOUTPS3                      EQU     H'0006'
 
146
TOUTPS2                      EQU     H'0005'
 
147
TOUTPS1                      EQU     H'0004'
 
148
TOUTPS0                      EQU     H'0003'
 
149
TMR2ON                       EQU     H'0002'
 
150
T2CKPS1                      EQU     H'0001'
 
151
T2CKPS0                      EQU     H'0000'
 
152
 
 
153
;----- SSPCON Bits --------------------------------------------------------
 
154
 
 
155
WCOL                         EQU     H'0007'
 
156
SSPOV                        EQU     H'0006'
 
157
SSPEN                        EQU     H'0005'
 
158
CKP                          EQU     H'0004'
 
159
SSPM3                        EQU     H'0003'
 
160
SSPM2                        EQU     H'0002'
 
161
SSPM1                        EQU     H'0001'
 
162
SSPM0                        EQU     H'0000'
 
163
 
 
164
;----- CCP1CON Bits -------------------------------------------------------
 
165
 
 
166
PWM1M1                       EQU     H'0007'
 
167
PWM1M0                       EQU     H'0006'
 
168
DC1B1                        EQU     H'0005'
 
169
DC1B0                        EQU     H'0004'
 
170
CCP1M3                       EQU     H'0003'
 
171
CCP1M2                       EQU     H'0002'
 
172
CCP1M1                       EQU     H'0001'
 
173
CCP1M0                       EQU     H'0000'
 
174
 
 
175
;----- ADCON0 Bits --------------------------------------------------------
 
176
 
 
177
ADCS1                        EQU     H'0007'
 
178
ADCS0                        EQU     H'0006'
 
179
CHS2                         EQU     H'0005'
 
180
CHS1                         EQU     H'0004'
 
181
CHS0                         EQU     H'0003'
 
182
GO                           EQU     H'0002'
 
183
NOT_DONE                     EQU     H'0002'
 
184
GO_DONE                      EQU     H'0002'
 
185
CHS3                         EQU     H'0001'
 
186
ADON                         EQU     H'0000'
 
187
 
 
188
;----- OPTION_REG Bits ----------------------------------------------------
 
189
 
 
190
NOT_RBPU                     EQU     H'0007'
 
191
INTEDG                       EQU     H'0006'
 
192
T0CS                         EQU     H'0005'
 
193
T0SE                         EQU     H'0004'
 
194
PSA                          EQU     H'0003'
 
195
PS2                          EQU     H'0002'
 
196
PS1                          EQU     H'0001'
 
197
PS0                          EQU     H'0000'
 
198
 
 
199
 
 
200
;----- PIE1 Bits ----------------------------------------------------------
 
201
 
 
202
ADIE                         EQU     H'0006'
 
203
SSPIE                        EQU     H'0003'
 
204
CCP1IE                       EQU     H'0002'
 
205
TMR2IE                       EQU     H'0001'
 
206
TMR1IE                       EQU     H'0000'
 
207
 
 
208
;----- PIE2 Bits ----------------------------------------------------------
 
209
 
 
210
LVDIE                        EQU     H'0007'
 
211
BCLIE                        EQU     H'0003'
 
212
 
 
213
;----- PCON Bits ----------------------------------------------------------
 
214
 
 
215
OSCF                         EQU     H'0003'
 
216
NOT_POR                      EQU     H'0001'
 
217
NOT_BO                       EQU     H'0000'
 
218
NOT_BOR                      EQU     H'0000'
 
219
 
 
220
;----- SSPCON2 Bits --------------------------------------------------------
 
221
 
 
222
GCEN                         EQU     H'0007'
 
223
ACKSTAT                      EQU     H'0006'
 
224
ACKDT                        EQU     H'0005'
 
225
ACKEN                        EQU     H'0004'
 
226
RCEN                         EQU     H'0003'
 
227
PEN                          EQU     H'0002'
 
228
RSEN                         EQU     H'0001'   
 
229
SEN                          EQU     H'0000'   
 
230
 
 
231
;----- SSPSTAT Bits -------------------------------------------------------
 
232
 
 
233
SMP                          EQU     H'0007'
 
234
CKE                          EQU     H'0006'
 
235
D                            EQU     H'0005'
 
236
I2C_DATA                     EQU     H'0005'
 
237
NOT_A                        EQU     H'0005'
 
238
NOT_ADDRESS                  EQU     H'0005'
 
239
D_A                          EQU     H'0005'
 
240
DATA_ADDRESS                 EQU     H'0005'
 
241
P                            EQU     H'0004'
 
242
I2C_STOP                     EQU     H'0004'
 
243
S                            EQU     H'0003'
 
244
I2C_START                    EQU     H'0003'
 
245
R                            EQU     H'0002'
 
246
I2C_READ                     EQU     H'0002'
 
247
NOT_W                        EQU     H'0002'
 
248
NOT_WRITE                    EQU     H'0002'
 
249
R_W                          EQU     H'0002'
 
250
READ_WRITE                   EQU     H'0002'
 
251
UA                           EQU     H'0001'
 
252
BF                           EQU     H'0000'
 
253
 
 
254
;----- REFCON Bits --------------------------------------------------------
 
255
 
 
256
VRHEN                        EQU     H'0007'
 
257
VRLEN                        EQU     H'0006'
 
258
VRHOEN                       EQU     H'0005'
 
259
VRLOEN                       EQU     H'0004'
 
260
 
 
261
;----- LVDCON Bits --------------------------------------------------------
 
262
 
 
263
BGST                         EQU     H'0005'
 
264
LVDEN                        EQU     H'0004'
 
265
LV3                          EQU     H'0003'
 
266
LV2                          EQU     H'0002'
 
267
LV1                          EQU     H'0001'
 
268
LV0                          EQU     H'0000'
 
269
 
 
270
;----- ADCON1 Bits --------------------------------------------------------
 
271
 
 
272
ADFM                         EQU     H'0007'
 
273
VCFG2                        EQU     H'0006'
 
274
VCFG1                        EQU     H'0005'
 
275
VCFG0                        EQU     H'0004'
 
276
 
 
277
;----- PMCON1 Bits --------------------------------------------------------
 
278
 
 
279
RD                           EQU     H'0000'
 
280
 
 
281
 
 
282
;==========================================================================
 
283
;
 
284
;       RAM Definition
 
285
;
 
286
;==========================================================================
 
287
 
 
288
        __MAXRAM H'1FF'
 
289
        __BADRAM H'07'-H'09', H'18'-H'1D'
 
290
        __BADRAM H'87'-H'89'
 
291
        __BADRAM H'8F'-H'90', H'98'-H'9A'
 
292
        __BADRAM H'105', H'107'-H'109', H'110'-H'11F'
 
293
        __BADRAM H'185', H'187'-H'189', H'18D'-H'1EF'
 
294
 
 
295
;==========================================================================
 
296
;
 
297
;       Configuration Bits
 
298
;
 
299
;==========================================================================
 
300
 
 
301
_BODEN_ON                    EQU     H'3FFF'
 
302
_BODEN_OFF                   EQU     H'3FBF'
 
303
_CP_ALL                      EQU     H'0CFF'
 
304
_CP_OFF                      EQU     H'3FFF'
 
305
_VBOR_25                     EQU     H'3FFF'
 
306
_VBOR_27                     EQU     H'3BFF'
 
307
_VBOR_42                     EQU     H'37FF'
 
308
_VBOR_45                     EQU     H'33FF'
 
309
_PWRTE_OFF                   EQU     H'3FFF'
 
310
_PWRTE_ON                    EQU     H'3FEF'
 
311
_MCLRE_OFF                   EQU     H'3FDF'
 
312
_MCLRE_ON                    EQU     H'3FFF'
 
313
_WDT_ON                      EQU     H'3FFF'
 
314
_WDT_OFF                     EQU     H'3FF7'
 
315
_ER_OSC_CLKOUT               EQU     H'3FFF'
 
316
_ER_OSC_NOCLKOUT             EQU     H'3FFE'
 
317
_INTRC_OSC_CLKOUT            EQU     H'3FFD'
 
318
_INTRC_OSC_NOCLKOUT          EQU     H'3FFC'
 
319
_EXTCLK_OSC                  EQU     H'3FFB'
 
320
_HS_OSC                      EQU     H'3FFA'
 
321
_XT_OSC                      EQU     H'3FF9'
 
322
_LP_OSC                      EQU     H'3FF8'
 
323
 
 
324
        LIST