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

« back to all changes in this revision

Viewing changes to header/p17c752.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
; P17C752.INC  Standard Header File, Version 1.0   Microchip Technology, Inc.
 
3
        NOLIST
 
4
 
 
5
; This header file defines configurations, registers, and other useful bits of
 
6
; information for the PIC17C752 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 /PIC17C752
 
14
;       2. LIST directive in the source file
 
15
;               LIST   P=PIC17C752
 
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   05/01/98 Initial Release
 
27
;1.01   05/13/98 Replaced original 17C752 with what was once called 17C752A
 
28
 
 
29
;==========================================================================
 
30
;
 
31
;       Verify Processor
 
32
;
 
33
;==========================================================================
 
34
 
 
35
        IFNDEF __17C752
 
36
           MESSG "Processor-header file mismatch.  Verify selected processor."
 
37
        ENDIF
 
38
 
 
39
;==========================================================================
 
40
;
 
41
;       Register Definitions
 
42
;
 
43
;==========================================================================
 
44
 
 
45
W                               EQU     H'0000'
 
46
F                               EQU     H'0001'
 
47
 
 
48
BANK0                           EQU     H'0000'
 
49
BANK1                           EQU     H'0001'
 
50
BANK2                           EQU     H'0002'
 
51
BANK3                           EQU     H'0003'
 
52
BANK4                           EQU     H'0004'
 
53
BANK5                           EQU     H'0005'
 
54
BANK6                           EQU     H'0006'
 
55
BANK7                           EQU     H'0007'
 
56
 
 
57
GPR_BANK0                       EQU    H'0000'
 
58
GPR_BANK1                       EQU    H'0008'
 
59
GPR_BANK2                       EQU    H'0010'
 
60
GPR_BANK3                       EQU    H'0018'
 
61
 
 
62
;----- Register Files -----------------------------------------------------
 
63
 
 
64
INDF0                           EQU     H'0000'
 
65
FSR0                            EQU     H'0001'
 
66
PCL                             EQU     H'0002'
 
67
PCLATH                          EQU     H'0003'
 
68
ALUSTA                          EQU     H'0004'
 
69
T0STA                           EQU     H'0005'
 
70
CPUSTA                          EQU     H'0006'
 
71
INTSTA                          EQU     H'0007'
 
72
INDF1                           EQU     H'0008'
 
73
FSR1                            EQU     H'0009'
 
74
WREG                            EQU     H'000A'
 
75
TMR0L                           EQU     H'000B'
 
76
TMR0H                           EQU     H'000C'
 
77
TBLPTRL                         EQU     H'000D'
 
78
TBLPTRH                         EQU     H'000E'
 
79
BSR                             EQU     H'000F'
 
80
 
 
81
;----- Bank 0 -------------------------------------------------------------
 
82
 
 
83
PORTA                           EQU     H'0010'
 
84
DDRB                            EQU     H'0011'
 
85
PORTB                           EQU     H'0012'
 
86
RCSTA                           EQU     H'0013'
 
87
RCSTA1                          EQU     H'0013'
 
88
RCREG                           EQU     H'0014'    ; Backward compatibility only
 
89
RCREG1                          EQU     H'0014'
 
90
TXSTA                           EQU     H'0015'    ; Backward compatibility only
 
91
TXSTA1                          EQU     H'0015'
 
92
TXREG                           EQU     H'0016'    ; Backward compatibility only
 
93
TXREG1                          EQU     H'0016'
 
94
SPBRG                           EQU     H'0017'    ; Backward compatibility only
 
95
SPBRG1                          EQU     H'0017'
 
96
 
 
97
;----- Bank 1 -------------------------------------------------------------
 
98
 
 
99
DDRC                            EQU     H'0110'
 
100
PORTC                           EQU     H'0111'
 
101
DDRD                            EQU     H'0112'
 
102
PORTD                           EQU     H'0113'
 
103
DDRE                            EQU     H'0114'
 
104
PORTE                           EQU     H'0115'
 
105
PIR                             EQU     H'0116'    ; Backward compatibility only
 
106
PIR1                            EQU     H'0116'
 
107
PIE                             EQU     H'0117'    ; Backward compatibility only
 
108
PIE1                            EQU     H'0117'
 
109
 
 
110
;----- Bank 2 -------------------------------------------------------------
 
111
 
 
112
TMR1                            EQU     H'0210'
 
113
TMR2                            EQU     H'0211'
 
114
TMR3L                           EQU     H'0212'
 
115
TMR3H                           EQU     H'0213'
 
116
PR1                             EQU     H'0214'
 
117
PR2                             EQU     H'0215'
 
118
PR3L                            EQU     H'0216'
 
119
PR3H                            EQU     H'0217'
 
120
 
 
121
CA1L                            EQU     H'0216'
 
122
CA1H                            EQU     H'0217'
 
123
 
 
124
;----- Bank 3 -------------------------------------------------------------
 
125
 
 
126
PW1DCL                          EQU     H'0310'
 
127
PW2DCL                          EQU     H'0311'
 
128
PW1DCH                          EQU     H'0312'
 
129
PW2DCH                          EQU     H'0313'
 
130
CA2L                            EQU     H'0314'
 
131
CA2H                            EQU     H'0315'
 
132
TCON1                           EQU     H'0316'
 
133
TCON2                           EQU     H'0317'
 
134
 
 
135
;----- Bank 4 -------------------------------------------------------------
 
136
 
 
137
PIR2                            EQU     H'0410'
 
138
PIE2                            EQU     H'0411'
 
139
 
 
140
RCSTA2                          EQU     H'0413'
 
141
RCREG2                          EQU     H'0414'
 
142
TXSTA2                          EQU     H'0415'
 
143
TXREG2                          EQU     H'0416'
 
144
SPBRG2                          EQU     H'0417'
 
145
 
 
146
;----- Bank 5 -------------------------------------------------------------
 
147
 
 
148
DDRF                            EQU     H'0510'
 
149
PORTF                           EQU     H'0511'
 
150
DDRG                            EQU     H'0512'
 
151
PORTG                           EQU     H'0513'
 
152
ADCON0                          EQU     H'0514'
 
153
ADCON1                          EQU     H'0515'
 
154
ADRESL                          EQU     H'0516'
 
155
ADRESH                          EQU     H'0517'
 
156
 
 
157
;----- Bank 6 -------------------------------------------------------------
 
158
 
 
159
SSPADD                          EQU     H'0610'
 
160
SSPCON1                         EQU     H'0611'
 
161
SSPCON2                         EQU     H'0612'
 
162
SSPSTAT                         EQU     H'0613'
 
163
SSPBUF                          EQU     H'0614'
 
164
 
 
165
;----- Bank 7 -------------------------------------------------------------
 
166
 
 
167
PW3DCL                          EQU     H'0710'
 
168
PW3DCH                          EQU     H'0711'
 
169
CA3L                            EQU     H'0712'
 
170
CA3H                            EQU     H'0713'
 
171
CA4L                            EQU     H'0714'
 
172
CA4H                            EQU     H'0715'
 
173
TCON3                           EQU     H'0716'
 
174
 
 
175
;----- Unbanked -----------------------------------------------------------
 
176
 
 
177
PRODL                           EQU     H'0018'
 
178
PL                              EQU     H'0018'    ; Backward compatibility only
 
179
PRODH                           EQU     H'0019'
 
180
PH                              EQU     H'0019'    ; Backward compatibility only
 
181
 
 
182
;----- Special Function Register Bit Definitions --------------------------
 
183
;
 
184
;----- ALUSTA Bits --------------------------------------------------------
 
185
 
 
186
FS3                             EQU     H'0007'
 
187
FS2                             EQU     H'0006'
 
188
FS1                             EQU     H'0005'
 
189
FS0                             EQU     H'0004'
 
190
OV                              EQU     H'0003'
 
191
Z                               EQU     H'0002'
 
192
DC                              EQU     H'0001'
 
193
C                               EQU     H'0000'
 
194
 
 
195
;----- CPUSTA Bits --------------------------------------------------------
 
196
 
 
197
STKAV                           EQU     H'0005'
 
198
GLINTD                          EQU     H'0004'
 
199
NOT_TO                          EQU     H'0003'
 
200
TO                              EQU     H'0003'
 
201
NOT_PD                          EQU     H'0002'
 
202
PD                              EQU     H'0002'
 
203
NOT_POR                         EQU     H'0001'
 
204
POR                             EQU     H'0001'
 
205
NOT_BOR                         EQU     H'0000'
 
206
BOR                             EQU     H'0000'
 
207
 
 
208
;----- INTSTA Bits --------------------------------------------------------
 
209
 
 
210
PEIF                            EQU     H'0007'
 
211
T0CKIF                          EQU     H'0006'
 
212
T0IF                            EQU     H'0005'
 
213
INTF                            EQU     H'0004'
 
214
PEIE                            EQU     H'0003'
 
215
T0CKIE                          EQU     H'0002'
 
216
T0IE                            EQU     H'0001'
 
217
INTE                            EQU     H'0000'
 
218
 
 
219
;----- PIR1 Bits ----------------------------------------------------------
 
220
 
 
221
RBIF                            EQU     H'0007'
 
222
TMR3IF                          EQU     H'0006'
 
223
TMR2IF                          EQU     H'0005'
 
224
TMR1IF                          EQU     H'0004'
 
225
CA2IF                           EQU     H'0003'
 
226
CA1IF                           EQU     H'0002'
 
227
TXIF                            EQU     H'0001'    ; Backward compatibility only
 
228
TX1IF                           EQU     H'0001'
 
229
RCIF                            EQU     H'0000'    ; Backward compatibility only
 
230
RC1IF                           EQU     H'0000'
 
231
 
 
232
;----- PIE1 Bits -----------------------------------------------------------
 
233
 
 
234
RBIE                            EQU     H'0007'
 
235
TMR3IE                          EQU     H'0006'
 
236
TMR2IE                          EQU     H'0005'
 
237
TMR1IE                          EQU     H'0004'
 
238
CA2IE                           EQU     H'0003'
 
239
CA1IE                           EQU     H'0002'
 
240
TXIE                            EQU     H'0001'    ; Backward compatibility only
 
241
TX1IE                           EQU     H'0001'
 
242
RCIE                            EQU     H'0000'    ; Backward compatibility only
 
243
RC1IE                           EQU     H'0000'
 
244
 
 
245
;----- PORTA Bits ---------------------------------------------------------
 
246
 
 
247
NOT_RBPU                        EQU    H'0007'
 
248
RBPU                            EQU    H'0007'
 
249
 
 
250
;----- RCSTA1 and 2 Bits --------------------------------------------------
 
251
 
 
252
SPEN                            EQU     H'0007'
 
253
RX9                             EQU     H'0006'
 
254
RC9                             EQU     H'0006'    ; Backward compatibility only
 
255
NOT_RC8                         EQU     H'0006'    ; Backward compatibility only
 
256
RC8_9                           EQU     H'0006'    ; Backward compatibility only
 
257
SREN                            EQU     H'0005'
 
258
CREN                            EQU     H'0004'
 
259
FERR                            EQU     H'0002'
 
260
OERR                            EQU     H'0001'
 
261
RX9D                            EQU     H'0000'
 
262
RCD8                            EQU     H'0000'    ; Backward compatibility only
 
263
 
 
264
;----- T0STA Bits --------------------------------------------------------
 
265
 
 
266
INTEDG                          EQU     H'0007'
 
267
T0SE                            EQU     H'0006'
 
268
T0CS                            EQU     H'0005'
 
269
T0PS3                           EQU     H'0004'
 
270
PS3                             EQU     H'0004'    ; Backward compatibility only
 
271
T0PS2                           EQU     H'0003'
 
272
PS2                             EQU     H'0003'    ; Backward compatibility only
 
273
T0PS1                           EQU     H'0002'
 
274
PS1                             EQU     H'0002'    ; Backward compatibility only
 
275
T0PS0                           EQU     H'0001'
 
276
PS0                             EQU     H'0001'    ; Backward compatibility only
 
277
 
 
278
;----- TCON1 Bits ---------------------------------------------------------
 
279
 
 
280
CA2ED1                          EQU     H'0007'
 
281
CA2ED0                          EQU     H'0006'
 
282
CA1ED1                          EQU     H'0005'
 
283
CA1ED0                          EQU     H'0004'
 
284
T16                             EQU     H'0003'
 
285
TMR3CS                          EQU     H'0002'
 
286
TMR2CS                          EQU     H'0001'
 
287
TMR1CS                          EQU     H'0000'
 
288
 
 
289
;----- TCON2 Bits ---------------------------------------------------------
 
290
 
 
291
CA2OVF                          EQU     H'0007'
 
292
CA1OVF                          EQU     H'0006'
 
293
PWM2ON                          EQU     H'0005'
 
294
PWM1ON                          EQU     H'0004'
 
295
CA1                             EQU     H'0003'
 
296
NOT_PR3                         EQU     H'0003'
 
297
PR3                             EQU     H'0003'
 
298
CA1_PR3                         EQU     H'0003'
 
299
TMR3ON                          EQU     H'0002'
 
300
TMR2ON                          EQU     H'0001'
 
301
TMR1ON                          EQU     H'0000'
 
302
 
 
303
;----- PIR2 Bits ----------------------------------------------------------
 
304
 
 
305
SSPIF                           EQU    H'0007'
 
306
BCLIF                           EQU    H'0006'
 
307
ADIF                            EQU    H'0005'
 
308
CA4IF                           EQU    H'0003'
 
309
CA3IF                           EQU    H'0002'
 
310
TX2IF                           EQU    H'0001'
 
311
RC2IF                           EQU    H'0000'
 
312
 
 
313
;----- PIE2 Bits ----------------------------------------------------------
 
314
 
 
315
SSPIE                           EQU    H'0007'
 
316
BCLIE                           EQU    H'0006'
 
317
ADIE                            EQU    H'0005'
 
318
CA4IE                           EQU    H'0003'
 
319
CA3IE                           EQU    H'0002'
 
320
TX2IE                           EQU    H'0001'
 
321
RC2IE                           EQU    H'0000'
 
322
 
 
323
;----- TXSTA1 and 2 Bits --------------------------------------------------
 
324
 
 
325
CSRC                            EQU     H'0007'
 
326
TX9                             EQU     H'0006'
 
327
NOT_TX8                         EQU     H'0006'    ; Backward compatibility only
 
328
TX8_9                           EQU     H'0006'    ; Backward compatibility only
 
329
TXEN                            EQU     H'0005'
 
330
SYNC                            EQU     H'0004'
 
331
TRMT                            EQU     H'0001'
 
332
TX9D                            EQU     H'0000'
 
333
TXD8                            EQU     H'0000'    ; Backward compatibility only
 
334
 
 
335
;----- ADCON0 Bits --------------------------------------------------------
 
336
 
 
337
CHS3                            EQU    H'0007'
 
338
CHS2                            EQU    H'0006'
 
339
CHS1                            EQU    H'0005'
 
340
CHS0                            EQU    H'0004'
 
341
GO                              EQU    H'0002'
 
342
NOT_DONE                        EQU    H'0002'
 
343
DONE                            EQU    H'0002'
 
344
ADON                            EQU    H'0000'
 
345
 
 
346
;----- ADCON1 Bits --------------------------------------------------------
 
347
 
 
348
ADCS1                           EQU    H'0007'
 
349
ADCS0                           EQU    H'0006'
 
350
ADFM                            EQU    H'0005'
 
351
PCFG3                           EQU    H'0003'
 
352
PCFG2                           EQU    H'0002'
 
353
PCFG1                           EQU    H'0001'
 
354
PCFG0                           EQU    H'0000'
 
355
 
 
356
;----- SSPCON1 Bits -------------------------------------------------------
 
357
 
 
358
WCOL                            EQU    H'0007'
 
359
SSPOV                           EQU    H'0006'
 
360
SSPEN                           EQU    H'0005'
 
361
CKP                             EQU    H'0004'
 
362
SSPM3                           EQU    H'0003'
 
363
SSPM2                           EQU    H'0002'
 
364
SSPM1                           EQU    H'0001'
 
365
SSPM0                           EQU    H'0000'
 
366
 
 
367
;----- SSPCON2 Bits -------------------------------------------------------
 
368
 
 
369
GCEN                            EQU    H'0007'
 
370
ACKSTAT                         EQU    H'0006'
 
371
AKSTAT                          EQU    H'0006'
 
372
ACKDT                           EQU    H'0005'
 
373
AKDT                            EQU    H'0005'
 
374
ACKEN                           EQU    H'0004'
 
375
AKEN                            EQU    H'0004'
 
376
RCEN                            EQU    H'0003'
 
377
PEN                             EQU    H'0002'
 
378
RSEN                            EQU    H'0001'
 
379
SEN                             EQU    H'0000'
 
380
 
 
381
;----- SSPSTAT Bits -------------------------------------------------------
 
382
 
 
383
SMP                             EQU    H'0007'
 
384
CKE                             EQU    H'0006'
 
385
D                               EQU    H'0005'
 
386
NOT_A                           EQU    H'0005'
 
387
D_A                             EQU    H'0005'
 
388
P                               EQU    H'0004'
 
389
S                               EQU    H'0003'
 
390
R                               EQU    H'0002'
 
391
NOT_W                           EQU    H'0002'
 
392
R_W                             EQU    H'0002'
 
393
UA                              EQU    H'0001'
 
394
BF                              EQU    H'0000'
 
395
 
 
396
;----- TCON3 Bits ---------------------------------------------------------
 
397
 
 
398
CA4OVF                          EQU    H'0006'
 
399
CA3OVF                          EQU    H'0005'
 
400
CA4ED1                          EQU    H'0004'
 
401
CA4ED0                          EQU    H'0003'
 
402
CA3ED1                          EQU    H'0002'
 
403
CA3ED0                          EQU    H'0001'
 
404
PWM3ON                          EQU    H'0000'
 
405
 
 
406
;----- PW2DCL Bit ---------------------------------------------------------
 
407
 
 
408
TM2PW2                          EQU    H'0005'
 
409
 
 
410
 
 
411
;----- PW3DCL Bit ---------------------------------------------------------
 
412
 
 
413
TM2PW3                          EQU    H'0005'
 
414
 
 
415
;==========================================================================
 
416
;
 
417
;       RAM Definition
 
418
;
 
419
;==========================================================================
 
420
 
 
421
        __MAXRAM        H'7FF'
 
422
        __BADRAM        H'118'-H'11F', H'218'-H'21F', H'318'-H'31F'
 
423
        __BADRAM        H'412', H'418'-H'4FF'
 
424
        __BADRAM        H'518'-H'5FF'
 
425
        __BADRAM        H'615'-H'6FF'
 
426
        __BADRAM        H'717'-H'7FF'
 
427
 
 
428
;==========================================================================
 
429
;
 
430
;       Configuration Bits
 
431
;
 
432
;==========================================================================
 
433
 
 
434
_PMC_MODE                       EQU     H'7FAF'
 
435
_XMC_MODE                       EQU     H'FFBF'
 
436
_MC_MODE                        EQU     H'FFEF'
 
437
_MP_MODE                        EQU     H'FFFF'
 
438
 
 
439
_BODEN_OFF                      EQU     H'BFFF'
 
440
_BODEN_ON                       EQU     H'FFFF'
 
441
 
 
442
_WDT_NORM                       EQU     H'FFF3'
 
443
_WDT_OFF                        EQU     H'FFF3'
 
444
_WDT_64                         EQU     H'FFF7'
 
445
_WDT_256                        EQU     H'FFFB'
 
446
_WDT_1                          EQU     H'FFFF'
 
447
_WDT_0                          EQU     H'FFFF'
 
448
 
 
449
_LF_OSC                         EQU     H'FFFC'
 
450
_RC_OSC                         EQU     H'FFFD'
 
451
_XT_OSC                         EQU     H'FFFE'
 
452
_EC_OSC                         EQU     H'FFFF'
 
453
 
 
454
        LIST