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

« back to all changes in this revision

Viewing changes to header/p17c42a.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
; P17C42A.INC  Standard Header File, Version 1.04    Microchip Technology, Inc.
 
3
        NOLIST
 
4
 
 
5
; This header file defines configurations, registers, and other useful bits of
 
6
; information for the PIC17C42A 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 /PIC17C42A
 
14
;       2. LIST directive in the source file
 
15
;               LIST   P=PIC17C42A
 
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.04   03/14/97 Corrected configuration bits value for protected 
 
27
;                microcontroller mode
 
28
;1.03   07/15/96 Corrected MAXRAM
 
29
;1.02   06/28/96 Corrected MAXRAM, BADRAM, and registers in upper banks
 
30
;1.01   04/10/96 Added _WDT_OFF value, PSx values
 
31
;1.00   10/31/95 Initial Release
 
32
 
 
33
;==========================================================================
 
34
;
 
35
;       Verify Processor
 
36
;
 
37
;==========================================================================
 
38
 
 
39
        IFNDEF __17C42A
 
40
           MESSG "Processor-header file mismatch.  Verify selected processor."
 
41
        ENDIF
 
42
 
 
43
;==========================================================================
 
44
;
 
45
;       Register Definitions
 
46
;
 
47
;==========================================================================
 
48
 
 
49
W                               EQU     H'0000'
 
50
F                               EQU     H'0001'
 
51
 
 
52
BANK0                           EQU     H'0000'
 
53
BANK1                           EQU     H'0001'
 
54
BANK2                           EQU     H'0002'
 
55
BANK3                           EQU     H'0003'
 
56
 
 
57
;----- Register Files -----------------------------------------------------
 
58
 
 
59
INDF0                           EQU     H'0000'
 
60
FSR0                            EQU     H'0001'
 
61
PCL                             EQU     H'0002'
 
62
PCLATH                          EQU     H'0003'
 
63
ALUSTA                          EQU     H'0004'
 
64
T0STA                           EQU     H'0005'
 
65
CPUSTA                          EQU     H'0006'
 
66
INTSTA                          EQU     H'0007'
 
67
INDF1                           EQU     H'0008'
 
68
FSR1                            EQU     H'0009'
 
69
WREG                            EQU     H'000A'
 
70
TMR0L                           EQU     H'000B'
 
71
TMR0H                           EQU     H'000C'
 
72
TBLPTRL                         EQU     H'000D'
 
73
TBLPTRH                         EQU     H'000E'
 
74
BSR                             EQU     H'000F'
 
75
PORTA                           EQU     H'0010'
 
76
DDRB                            EQU     H'0011'
 
77
PORTB                           EQU     H'0012'
 
78
RCSTA                           EQU     H'0013'
 
79
RCREG                           EQU     H'0014'
 
80
TXSTA                           EQU     H'0015'
 
81
TXREG                           EQU     H'0016'
 
82
SPBRG                           EQU     H'0017'
 
83
PRODL                           EQU     H'0018'
 
84
PRODH                           EQU     H'0019'
 
85
 
 
86
DDRC                            EQU     H'0110'
 
87
PORTC                           EQU     H'0111'
 
88
DDRD                            EQU     H'0112'
 
89
PORTD                           EQU     H'0113'
 
90
DDRE                            EQU     H'0114'
 
91
PORTE                           EQU     H'0115'
 
92
PIR                             EQU     H'0116'
 
93
PIE                             EQU     H'0117'
 
94
 
 
95
TMR1                            EQU     H'0210'
 
96
TMR2                            EQU     H'0211'
 
97
TMR3L                           EQU     H'0212'
 
98
TMR3H                           EQU     H'0213'
 
99
PR1                             EQU     H'0214'
 
100
PR2                             EQU     H'0215'
 
101
PR3L                            EQU     H'0216'
 
102
PR3H                            EQU     H'0217'
 
103
 
 
104
CA1L                            EQU     H'0216'
 
105
CA1H                            EQU     H'0217'
 
106
 
 
107
PW1DCL                          EQU     H'0310'
 
108
PW2DCL                          EQU     H'0311'
 
109
PW1DCH                          EQU     H'0312'
 
110
PW2DCH                          EQU     H'0313'
 
111
CA2L                            EQU     H'0314'
 
112
CA2H                            EQU     H'0315'
 
113
TCON1                           EQU     H'0316'
 
114
TCON2                           EQU     H'0317'
 
115
 
 
116
;----- ALUSTA Bits --------------------------------------------------------
 
117
 
 
118
FS3                             EQU     H'0007'
 
119
FS2                             EQU     H'0006'
 
120
FS1                             EQU     H'0005'
 
121
FS0                             EQU     H'0004'
 
122
OV                              EQU     H'0003'
 
123
Z                               EQU     H'0002'
 
124
DC                              EQU     H'0001'
 
125
C                               EQU     H'0000'
 
126
 
 
127
;----- CPUSTA Bits --------------------------------------------------------
 
128
 
 
129
STKAV                           EQU     H'0005'
 
130
GLINTD                          EQU     H'0004'
 
131
NOT_TO                          EQU     H'0003'
 
132
NOT_PD                          EQU     H'0002'
 
133
 
 
134
;----- INTSTA Bits --------------------------------------------------------
 
135
 
 
136
PEIF                            EQU     H'0007'
 
137
T0CKIF                          EQU     H'0006'
 
138
T0IF                            EQU     H'0005'
 
139
INTF                            EQU     H'0004'
 
140
PEIE                            EQU     H'0003'
 
141
T0CKIE                          EQU     H'0002'
 
142
T0IE                            EQU     H'0001'
 
143
INTE                            EQU     H'0000'
 
144
 
 
145
;----- PIE Bits -----------------------------------------------------------
 
146
 
 
147
RBIE                            EQU     H'0007'
 
148
TMR3IE                          EQU     H'0006'
 
149
TMR2IE                          EQU     H'0005'
 
150
TMR1IE                          EQU     H'0004'
 
151
CA2IE                           EQU     H'0003'
 
152
CA1IE                           EQU     H'0002'
 
153
TXIE                            EQU     H'0001'
 
154
RCIE                            EQU     H'0000'
 
155
 
 
156
;----- PIR Bits -----------------------------------------------------------
 
157
 
 
158
RBIF                            EQU     H'0007'
 
159
TMR3IF                          EQU     H'0006'
 
160
TMR2IF                          EQU     H'0005'
 
161
TMR1IF                          EQU     H'0004'
 
162
CA2IF                           EQU     H'0003'
 
163
CA1IF                           EQU     H'0002'
 
164
TXIF                            EQU     H'0001'
 
165
RCIF                            EQU     H'0000'
 
166
 
 
167
;----- PORTA Bits ---------------------------------------------------------
 
168
 
 
169
NOT_RBPU                        EQU     H'0007'
 
170
T0CKI                           EQU     H'0001'
 
171
INT                             EQU     H'0000'
 
172
 
 
173
;----- RCSTA Bits ---------------------------------------------------------
 
174
 
 
175
SPEN                            EQU     H'0007'
 
176
RX9                             EQU     H'0006'
 
177
RC9                             EQU     H'0006'    ; Backward compatibility only
 
178
NOT_RC8                         EQU     H'0006'    ; Backward compatibility only
 
179
RC8_9                           EQU     H'0006'    ; Backward compatibility only
 
180
SREN                            EQU     H'0005'
 
181
CREN                            EQU     H'0004'
 
182
FERR                            EQU     H'0002'
 
183
OERR                            EQU     H'0001'
 
184
RX9D                            EQU     H'0000'
 
185
RCD8                            EQU     H'0000'    ; Backward compatibility only
 
186
 
 
187
;----- T0STA Bits --------------------------------------------------------
 
188
 
 
189
INTEDG                          EQU     H'0007'
 
190
T0SE                            EQU     H'0006'
 
191
T0CS                            EQU     H'0005'
 
192
T0PS3                           EQU     H'0004'
 
193
PS3                             EQU     H'0004'
 
194
T0PS2                           EQU     H'0003'
 
195
PS2                             EQU     H'0003'
 
196
T0PS1                           EQU     H'0002'
 
197
PS1                             EQU     H'0002'
 
198
T0PS0                           EQU     H'0001'
 
199
PS0                             EQU     H'0001'
 
200
 
 
201
;----- TCON1 Bits ---------------------------------------------------------
 
202
 
 
203
CA2ED1                          EQU     H'0007'
 
204
CA2ED0                          EQU     H'0006'
 
205
CA1ED1                          EQU     H'0005'
 
206
CA1ED0                          EQU     H'0004'
 
207
T16                             EQU     H'0003'
 
208
TMR3CS                          EQU     H'0002'
 
209
TMR2CS                          EQU     H'0001'
 
210
TMR1CS                          EQU     H'0000'
 
211
 
 
212
;----- TCON2 Bits ---------------------------------------------------------
 
213
 
 
214
CA2OVF                          EQU     H'0007'
 
215
CA1OVF                          EQU     H'0006'
 
216
PWM2ON                          EQU     H'0005'
 
217
PWM1ON                          EQU     H'0004'
 
218
CA1                             EQU     H'0003'
 
219
NOT_PR3                         EQU     H'0003'
 
220
CA1_PR3                         EQU     H'0003'
 
221
TMR3ON                          EQU     H'0002'
 
222
TMR2ON                          EQU     H'0001'
 
223
TMR1ON                          EQU     H'0000'
 
224
 
 
225
;----- TXSTA Bits ---------------------------------------------------------
 
226
 
 
227
CSRC                            EQU     H'0007'
 
228
TX9                             EQU     H'0006'
 
229
NOT_TX8                         EQU     H'0006'    ; Backward compatibility only
 
230
TX8_9                           EQU     H'0006'    ; Backward compatibility only
 
231
TXEN                            EQU     H'0005'
 
232
SYNC                            EQU     H'0004'
 
233
TRMT                            EQU     H'0001'
 
234
TX9D                            EQU     H'0000'
 
235
TXD8                            EQU     H'0000'    ; Backward compatibility only
 
236
 
 
237
;==========================================================================
 
238
;
 
239
;       RAM Definition
 
240
;
 
241
;==========================================================================
 
242
 
 
243
        __MAXRAM        H'3FF'
 
244
        __BADRAM        H'118'-H'11F', H'218'-H'2FF', H'318'-H'3FF'
 
245
 
 
246
;==========================================================================
 
247
;
 
248
;       Configuration Bits
 
249
;
 
250
;==========================================================================
 
251
 
 
252
_PMC_MODE                       EQU     H'7FAF'
 
253
_XMC_MODE                       EQU     H'FFBF'
 
254
_MC_MODE                        EQU     H'FFEF'
 
255
_MP_MODE                        EQU     H'FFFF'
 
256
 
 
257
_WDT_NORM                       EQU     H'FFF3'
 
258
_WDT_OFF                        EQU     H'FFF3'
 
259
_WDT_64                         EQU     H'FFF7'
 
260
_WDT_256                        EQU     H'FFFB'
 
261
_WDT_1                          EQU     H'FFFF'
 
262
 
 
263
_LF_OSC                         EQU     H'FFFC'
 
264
_RC_OSC                         EQU     H'FFFD'
 
265
_XT_OSC                         EQU     H'FFFE'
 
266
_EC_OSC                         EQU     H'FFFF'
 
267
 
 
268
        LIST