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

« back to all changes in this revision

Viewing changes to header/p16c923.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
; P16C923.INC  Standard Header File, Version 1.02    Microchip Technology, Inc.
 
3
        NOLIST
 
4
 
 
5
; This header file defines configurations, registers, and other useful bits of
 
6
; information for the PIC16C923 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 /PIC16C923
 
14
;       2. LIST directive in the source file
 
15
;               LIST   P=PIC16C923
 
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.02   04/23/00 Added LCD controller bits
 
27
;1.01   05/12/97 Corrected ports F and G addresses
 
28
;1.00   04/10/96 Initial Release
 
29
 
 
30
;==========================================================================
 
31
;
 
32
;       Verify Processor
 
33
;
 
34
;==========================================================================
 
35
 
 
36
        IFNDEF __16C923
 
37
           MESSG "Processor-header file mismatch.  Verify selected processor."
 
38
        ENDIF
 
39
 
 
40
;==========================================================================
 
41
;
 
42
;       Register Definitions
 
43
;
 
44
;==========================================================================
 
45
 
 
46
W                            EQU     H'0000'
 
47
F                            EQU     H'0001'
 
48
 
 
49
;----- Register Files------------------------------------------------------
 
50
 
 
51
INDF                         EQU     H'0000'
 
52
TMR0                         EQU     H'0001'
 
53
PCL                          EQU     H'0002'
 
54
STATUS                       EQU     H'0003'
 
55
FSR                          EQU     H'0004'
 
56
PORTA                        EQU     H'0005'
 
57
PORTB                        EQU     H'0006'
 
58
PORTC                        EQU     H'0007'
 
59
PORTD                        EQU     H'0008'
 
60
PORTE                        EQU     H'0009'
 
61
PCLATH                       EQU     H'000A'
 
62
INTCON                       EQU     H'000B'
 
63
PIR1                         EQU     H'000C'
 
64
TMR1L                        EQU     H'000E'
 
65
TMR1H                        EQU     H'000F'
 
66
T1CON                        EQU     H'0010'
 
67
TMR2                         EQU     H'0011'
 
68
T2CON                        EQU     H'0012'
 
69
SSPBUF                       EQU     H'0013'
 
70
SSPCON                       EQU     H'0014'
 
71
CCPR1L                       EQU     H'0015'
 
72
CCPR1H                       EQU     H'0016'
 
73
CCP1CON                      EQU     H'0017'
 
74
 
 
75
OPTION_REG                   EQU     H'0081'
 
76
TRISA                        EQU     H'0085'
 
77
TRISB                        EQU     H'0086'
 
78
TRISC                        EQU     H'0087'
 
79
TRISD                        EQU     H'0088'
 
80
TRISE                        EQU     H'0089'
 
81
PIE1                         EQU     H'008C'
 
82
PCON                         EQU     H'008E'
 
83
PR2                          EQU     H'0092'
 
84
SSPADD                       EQU     H'0093'
 
85
SSPSTAT                      EQU     H'0094'
 
86
 
 
87
PORTF                        EQU     H'0107'
 
88
PORTG                        EQU     H'0108'
 
89
LCDSE                        EQU     H'010D'
 
90
LCDPS                        EQU     H'010E'
 
91
LCDCON                       EQU     H'010F'
 
92
LCDD00                       EQU     H'0110'
 
93
LCDD01                       EQU     H'0111'
 
94
LCDD02                       EQU     H'0112'
 
95
LCDD03                       EQU     H'0113'
 
96
LCDD04                       EQU     H'0114'
 
97
LCDD05                       EQU     H'0115'
 
98
LCDD06                       EQU     H'0116'
 
99
LCDD07                       EQU     H'0117'
 
100
LCDD08                       EQU     H'0118'
 
101
LCDD09                       EQU     H'0119'
 
102
LCDD10                       EQU     H'011A'
 
103
LCDD11                       EQU     H'011B'
 
104
LCDD12                       EQU     H'011C'
 
105
LCDD13                       EQU     H'011D'
 
106
LCDD14                       EQU     H'011E'
 
107
LCDD15                       EQU     H'011F'
 
108
 
 
109
TRISF                        EQU     H'0187'
 
110
TRISG                        EQU     H'0188'
 
111
 
 
112
;----- STATUS Bits --------------------------------------------------------
 
113
 
 
114
IRP                          EQU     H'0007'
 
115
RP1                          EQU     H'0006'
 
116
RP0                          EQU     H'0005'
 
117
NOT_TO                       EQU     H'0004'
 
118
NOT_PD                       EQU     H'0003'
 
119
Z                            EQU     H'0002'
 
120
DC                           EQU     H'0001'
 
121
C                            EQU     H'0000'
 
122
 
 
123
;----- INTCON Bits --------------------------------------------------------
 
124
 
 
125
GIE                          EQU     H'0007'
 
126
PEIE                         EQU     H'0006'
 
127
T0IE                         EQU     H'0005'
 
128
INTE                         EQU     H'0004'
 
129
RBIE                         EQU     H'0003'
 
130
T0IF                         EQU     H'0002'
 
131
INTF                         EQU     H'0001'
 
132
RBIF                         EQU     H'0000'
 
133
 
 
134
;----- PIR1 Bits ----------------------------------------------------------
 
135
 
 
136
LCDIF                        EQU     H'0007'
 
137
SSPIF                        EQU     H'0003'
 
138
CCP1IF                       EQU     H'0002'
 
139
TMR2IF                       EQU     H'0001'
 
140
TMR1IF                       EQU     H'0000'
 
141
 
 
142
;----- T1CON Bits ---------------------------------------------------------
 
143
 
 
144
T1CKPS1                      EQU     H'0005'
 
145
T1CKPS0                      EQU     H'0004'
 
146
T1OSCEN                      EQU     H'0003'
 
147
NOT_T1SYNC                   EQU     H'0002'
 
148
T1INSYNC                     EQU     H'0002'    ; Backward compatibility only
 
149
TMR1CS                       EQU     H'0001'
 
150
TMR1ON                       EQU     H'0000'
 
151
 
 
152
;----- T2CON Bits ---------------------------------------------------------
 
153
 
 
154
TOUTPS3                      EQU     H'0006'
 
155
TOUTPS2                      EQU     H'0005'
 
156
TOUTPS1                      EQU     H'0004'
 
157
TOUTPS0                      EQU     H'0003'
 
158
TMR2ON                       EQU     H'0002'
 
159
T2CKPS1                      EQU     H'0001'
 
160
T2CKPS0                      EQU     H'0000'
 
161
 
 
162
;----- SSPCON Bits --------------------------------------------------------
 
163
 
 
164
WCOL                         EQU     H'0007'
 
165
SSPOV                        EQU     H'0006'
 
166
SSPEN                        EQU     H'0005'
 
167
CKP                          EQU     H'0004'
 
168
SSPM3                        EQU     H'0003'
 
169
SSPM2                        EQU     H'0002'
 
170
SSPM1                        EQU     H'0001'
 
171
SSPM0                        EQU     H'0000'
 
172
 
 
173
;----- CCP1CON Bits -------------------------------------------------------
 
174
 
 
175
CCP1X                        EQU     H'0005'
 
176
CCP1Y                        EQU     H'0004'
 
177
CCP1M3                       EQU     H'0003'
 
178
CCP1M2                       EQU     H'0002'
 
179
CCP1M1                       EQU     H'0001'
 
180
CCP1M0                       EQU     H'0000'
 
181
 
 
182
;----- OPTION Bits --------------------------------------------------------
 
183
 
 
184
NOT_RBPU                     EQU     H'0007'
 
185
INTEDG                       EQU     H'0006'
 
186
T0CS                         EQU     H'0005'
 
187
T0SE                         EQU     H'0004'
 
188
PSA                          EQU     H'0003'
 
189
PS2                          EQU     H'0002'
 
190
PS1                          EQU     H'0001'
 
191
PS0                          EQU     H'0000'
 
192
 
 
193
;----- TRISE Bits ---------------------------------------------------------
 
194
 
 
195
IBF                          EQU     H'0007'
 
196
OBF                          EQU     H'0006'
 
197
IBOV                         EQU     H'0005'
 
198
PSPMODE                      EQU     H'0004'
 
199
TRISE2                       EQU     H'0002'
 
200
TRISE1                       EQU     H'0001'
 
201
TRISE0                       EQU     H'0000'
 
202
 
 
203
;----- PIE1 Bits ----------------------------------------------------------
 
204
 
 
205
LCDIE                        EQU     H'0007'
 
206
SSPIE                        EQU     H'0003'
 
207
CCP1IE                       EQU     H'0002'
 
208
TMR2IE                       EQU     H'0001'
 
209
TMR1IE                       EQU     H'0000'
 
210
 
 
211
;----- PCON Bits ----------------------------------------------------------
 
212
 
 
213
NOT_POR                      EQU     H'0001'
 
214
 
 
215
;----- SSPSTAT Bits -------------------------------------------------------
 
216
 
 
217
D                            EQU     H'0005'
 
218
I2C_DATA                     EQU     H'0005'
 
219
NOT_A                        EQU     H'0005'
 
220
NOT_ADDRESS                  EQU     H'0005'
 
221
D_A                          EQU     H'0005'
 
222
DATA_ADDRESS                 EQU     H'0005'
 
223
P                            EQU     H'0004'
 
224
I2C_STOP                     EQU     H'0004'
 
225
S                            EQU     H'0003'
 
226
I2C_START                    EQU     H'0003'
 
227
R                            EQU     H'0002'
 
228
I2C_READ                     EQU     H'0002'
 
229
NOT_W                        EQU     H'0002'
 
230
NOT_WRITE                    EQU     H'0002'
 
231
R_W                          EQU     H'0002'
 
232
READ_WRITE                   EQU     H'0002'
 
233
UA                           EQU     H'0001'
 
234
BF                           EQU     H'0000'
 
235
 
 
236
;----- LCDSE Bits ---------------------------------------------------------
 
237
 
 
238
SE29                         EQU     H'0007'
 
239
SE27                         EQU     H'0006'
 
240
SE20                         EQU     H'0005'
 
241
SE16                         EQU     H'0004'
 
242
SE12                         EQU     H'0003'
 
243
SE9                          EQU     H'0002'
 
244
SE5                          EQU     H'0001'
 
245
SE0                          EQU     H'0000'
 
246
 
 
247
;----- LCDPS Bits ---------------------------------------------------------
 
248
 
 
249
LP3                          EQU     H'0003'
 
250
LP2                          EQU     H'0002'
 
251
LP1                          EQU     H'0001'
 
252
LP0                          EQU     H'0000'
 
253
 
 
254
;----- LCDCON Bits --------------------------------------------------------
 
255
 
 
256
LCDEN                        EQU     H'0007'
 
257
SLPEN                        EQU     H'0006'
 
258
VGEN                         EQU     H'0004'
 
259
CS1                          EQU     H'0003'
 
260
CS0                          EQU     H'0002'
 
261
LMUX1                        EQU     H'0001'
 
262
LMUX0                        EQU     H'0000'
 
263
 
 
264
;==========================================================================
 
265
;
 
266
;       RAM Definition
 
267
;
 
268
;==========================================================================
 
269
 
 
270
        __MAXRAM H'1FF'
 
271
        __BADRAM H'0D', H'18'-H'1F'
 
272
        __BADRAM H'8D', H'8F'-H'91', H'95'-H'9F'
 
273
        __BADRAM H'105', H'109', H'10C', H'120'-H'16F'
 
274
        __BADRAM H'185', H'189', H'18C'-H'1EF'
 
275
 
 
276
;==========================================================================
 
277
;
 
278
;       Configuration Bits
 
279
;
 
280
;==========================================================================
 
281
 
 
282
_CP_ALL                      EQU     H'00CF'
 
283
_CP_75                       EQU     H'15DF'
 
284
_CP_50                       EQU     H'2AEF'
 
285
_CP_OFF                      EQU     H'3FFF'
 
286
_PWRTE_OFF                   EQU     H'3FFF'
 
287
_PWRTE_ON                    EQU     H'3FF7'
 
288
_WDT_ON                      EQU     H'3FFF'
 
289
_WDT_OFF                     EQU     H'3FFB'
 
290
_LP_OSC                      EQU     H'3FFC'
 
291
_XT_OSC                      EQU     H'3FFD'
 
292
_HS_OSC                      EQU     H'3FFE'
 
293
_RC_OSC                      EQU     H'3FFF'
 
294
 
 
295
        LIST