1        LIST
2
3;==========================================================================
4; Build date : Oct 21 2015
5;  MPASM PIC18LF2523 processor include
6;
7;  (c) Copyright 1999-2015 Microchip Technology, All rights reserved
8;==========================================================================
9
10        NOLIST
11
12;==========================================================================
13;  This header file defines configurations, registers, and other useful
14;  bits of information for the PIC18LF2523 microcontroller.  These names
15;  are taken to match the data sheets as closely as possible.
16;
17;  Note that the processor must be selected before this file is included.
18;  The processor may be selected the following ways:
19;
20;       1. Command line switch:
21;               C:\MPASM MYFILE.ASM /PIC18LF2523
22;       2. LIST directive in the source file
23;               LIST   P=PIC18LF2523
24;       3. Processor Type entry in the MPASM full-screen interface
25;       4. Setting the processor in the MPLAB Project Dialog
26;==========================================================================
27
28;==========================================================================
29;
30;       Verify Processor
31;
32;==========================================================================
33        IFNDEF __18LF2523
34           MESSG "Processor-header file mismatch.  Verify selected processor."
35        ENDIF
36
37;==========================================================================
38;       18xxxx Family        EQUates
39;==========================================================================
40FSR0             EQU  0
41FSR1             EQU  1
42FSR2             EQU  2
43
44FAST             EQU  1
45
46W                EQU  0
47A                EQU  0
48ACCESS           EQU  0
49BANKED           EQU  1
50;==========================================================================
51
52;==========================================================================
53;       16Cxxx/17Cxxx Substitutions
54;==========================================================================
55  #define DDRA  TRISA      ; PIC17Cxxx SFR substitution
56  #define DDRB  TRISB      ; PIC17Cxxx SFR substitution
57  #define DDRC  TRISC      ; PIC17Cxxx SFR substitution
58  #define DDRD  TRISD      ; PIC17Cxxx SFR substitution
59  #define DDRE  TRISE      ; PIC17Cxxx SFR substitution
60
61;==========================================================================
62;
63;       Register Definitions
64;
65;==========================================================================
66
67;----- Register Files -----------------------------------------------------
68PORTA            EQU  H'0F80'
69PORTB            EQU  H'0F81'
70PORTC            EQU  H'0F82'
71PORTE            EQU  H'0F84'
72LATA             EQU  H'0F89'
73LATB             EQU  H'0F8A'
74LATC             EQU  H'0F8B'
75DDRA             EQU  H'0F92'
76TRISA            EQU  H'0F92'
77DDRB             EQU  H'0F93'
78TRISB            EQU  H'0F93'
79DDRC             EQU  H'0F94'
80TRISC            EQU  H'0F94'
81OSCTUNE          EQU  H'0F9B'
82PIE1             EQU  H'0F9D'
83PIR1             EQU  H'0F9E'
84IPR1             EQU  H'0F9F'
85PIE2             EQU  H'0FA0'
86PIR2             EQU  H'0FA1'
87IPR2             EQU  H'0FA2'
88EECON1           EQU  H'0FA6'
89EECON2           EQU  H'0FA7'
90EEDATA           EQU  H'0FA8'
91EEADR            EQU  H'0FA9'
92RCSTA            EQU  H'0FAB'
93RCSTA1           EQU  H'0FAB'
94TXSTA            EQU  H'0FAC'
95TXSTA1           EQU  H'0FAC'
96TXREG            EQU  H'0FAD'
97TXREG1           EQU  H'0FAD'
98RCREG            EQU  H'0FAE'
99RCREG1           EQU  H'0FAE'
100SPBRG            EQU  H'0FAF'
101SPBTG1           EQU  H'0FAF'
102SPBRGH           EQU  H'0FB0'
103T3CON            EQU  H'0FB1'
104TMR3             EQU  H'0FB2'
105TMR3L            EQU  H'0FB2'
106TMR3H            EQU  H'0FB3'
107CMCON            EQU  H'0FB4'
108CVRCON           EQU  H'0FB5'
109ECCP1AS          EQU  H'0FB6'
110ECCPAS           EQU  H'0FB6'
111ECCP1DEL         EQU  H'0FB7'
112PWM1CON          EQU  H'0FB7'
113BAUDCON          EQU  H'0FB8'
114BAUDCTL          EQU  H'0FB8'
115CCP2CON          EQU  H'0FBA'
116CCPR2            EQU  H'0FBB'
117CCPR2L           EQU  H'0FBB'
118CCPR2H           EQU  H'0FBC'
119CCP1CON          EQU  H'0FBD'
120CCPR1            EQU  H'0FBE'
121CCPR1L           EQU  H'0FBE'
122CCPR1H           EQU  H'0FBF'
123ADCON2           EQU  H'0FC0'
124ADCON1           EQU  H'0FC1'
125ADCON0           EQU  H'0FC2'
126ADRES            EQU  H'0FC3'
127ADRESL           EQU  H'0FC3'
128ADRESH           EQU  H'0FC4'
129SSPCON2          EQU  H'0FC5'
130SSPCON1          EQU  H'0FC6'
131SSPSTAT          EQU  H'0FC7'
132SSPADD           EQU  H'0FC8'
133SSPBUF           EQU  H'0FC9'
134T2CON            EQU  H'0FCA'
135PR2              EQU  H'0FCB'
136TMR2             EQU  H'0FCC'
137T1CON            EQU  H'0FCD'
138TMR1             EQU  H'0FCE'
139TMR1L            EQU  H'0FCE'
140TMR1H            EQU  H'0FCF'
141RCON             EQU  H'0FD0'
142WDTCON           EQU  H'0FD1'
143HLVDCON          EQU  H'0FD2'
144LVDCON           EQU  H'0FD2'
145OSCCON           EQU  H'0FD3'
146T0CON            EQU  H'0FD5'
147TMR0             EQU  H'0FD6'
148TMR0L            EQU  H'0FD6'
149TMR0H            EQU  H'0FD7'
150STATUS           EQU  H'0FD8'
151FSR2L            EQU  H'0FD9'
152FSR2H            EQU  H'0FDA'
153PLUSW2           EQU  H'0FDB'
154PREINC2          EQU  H'0FDC'
155POSTDEC2         EQU  H'0FDD'
156POSTINC2         EQU  H'0FDE'
157INDF2            EQU  H'0FDF'
158BSR              EQU  H'0FE0'
159FSR1L            EQU  H'0FE1'
160FSR1H            EQU  H'0FE2'
161PLUSW1           EQU  H'0FE3'
162PREINC1          EQU  H'0FE4'
163POSTDEC1         EQU  H'0FE5'
164POSTINC1         EQU  H'0FE6'
165INDF1            EQU  H'0FE7'
166WREG             EQU  H'0FE8'
167FSR0L            EQU  H'0FE9'
168FSR0H            EQU  H'0FEA'
169PLUSW0           EQU  H'0FEB'
170PREINC0          EQU  H'0FEC'
171POSTDEC0         EQU  H'0FED'
172POSTINC0         EQU  H'0FEE'
173INDF0            EQU  H'0FEF'
174INTCON3          EQU  H'0FF0'
175INTCON2          EQU  H'0FF1'
176INTCON           EQU  H'0FF2'
177PROD             EQU  H'0FF3'
178PRODL            EQU  H'0FF3'
179PRODH            EQU  H'0FF4'
180TABLAT           EQU  H'0FF5'
181TBLPTR           EQU  H'0FF6'
182TBLPTRL          EQU  H'0FF6'
183TBLPTRH          EQU  H'0FF7'
184TBLPTRU          EQU  H'0FF8'
185PC               EQU  H'0FF9'
186PCL              EQU  H'0FF9'
187PCLATH           EQU  H'0FFA'
188PCLATU           EQU  H'0FFB'
189STKPTR           EQU  H'0FFC'
190TOS              EQU  H'0FFD'
191TOSL             EQU  H'0FFD'
192TOSH             EQU  H'0FFE'
193TOSU             EQU  H'0FFF'
194
195;----- PORTA Bits -----------------------------------------------------
196RA0              EQU  H'0000'
197RA1              EQU  H'0001'
198RA2              EQU  H'0002'
199RA3              EQU  H'0003'
200RA4              EQU  H'0004'
201RA5              EQU  H'0005'
202RA6              EQU  H'0006'
203RA7              EQU  H'0007'
204
205AN0              EQU  H'0000'
206AN1              EQU  H'0001'
207AN2              EQU  H'0002'
208AN3              EQU  H'0003'
209T0CKI            EQU  H'0004'
210AN4              EQU  H'0005'
211OSC2             EQU  H'0006'
212OSC1             EQU  H'0007'
213
214VREFN            EQU  H'0002'
215VREFP            EQU  H'0003'
216SS               EQU  H'0005'
217CLKO             EQU  H'0006'
218CLKI             EQU  H'0007'
219
220CVREF            EQU  H'0002'
221NOT_SS           EQU  H'0005'
222
223LVDIN            EQU  H'0005'
224
225HLVDIN           EQU  H'0005'
226
227C1OUT_PORTA      EQU  H'0004'
228C2OUT_PORTA      EQU  H'0005'
229
230
231;----- PORTB Bits -----------------------------------------------------
232RB0              EQU  H'0000'
233RB1              EQU  H'0001'
234RB2              EQU  H'0002'
235RB3              EQU  H'0003'
236RB4              EQU  H'0004'
237RB5              EQU  H'0005'
238RB6              EQU  H'0006'
239RB7              EQU  H'0007'
240
241INT0             EQU  H'0000'
242INT1             EQU  H'0001'
243INT2             EQU  H'0002'
244CCP2_PORTB       EQU  H'0003'
245KBI0             EQU  H'0004'
246KBI1             EQU  H'0005'
247KBI2             EQU  H'0006'
248KBI3             EQU  H'0007'
249
250AN12             EQU  H'0000'
251AN10             EQU  H'0001'
252AN8              EQU  H'0002'
253AN9              EQU  H'0003'
254AN11             EQU  H'0004'
255PGM              EQU  H'0005'
256PGC              EQU  H'0006'
257PGD              EQU  H'0007'
258
259FLT0             EQU  H'0000'
260
261
262;----- PORTC Bits -----------------------------------------------------
263RC0              EQU  H'0000'
264RC1              EQU  H'0001'
265RC2              EQU  H'0002'
266RC3              EQU  H'0003'
267RC4              EQU  H'0004'
268RC5              EQU  H'0005'
269RC6              EQU  H'0006'
270RC7              EQU  H'0007'
271
272T1OSO            EQU  H'0000'
273T1OSI            EQU  H'0001'
274CCP1             EQU  H'0002'
275SCK              EQU  H'0003'
276SDI              EQU  H'0004'
277SDO              EQU  H'0005'
278TX               EQU  H'0006'
279RX               EQU  H'0007'
280
281T13CKI           EQU  H'0000'
282CCP2_PORTC       EQU  H'0001'
283SCL              EQU  H'0003'
284SDA              EQU  H'0004'
285CK               EQU  H'0006'
286; DT is a reserved word
287; DT               EQU  H'0007'
288
289T1CKI            EQU  H'0000'
290
291
292;----- PORTE Bits -----------------------------------------------------
293RE3              EQU  H'0003'
294
295MCLR             EQU  H'0003'
296
297NOT_MCLR         EQU  H'0003'
298
299VPP              EQU  H'0003'
300
301
302;----- LATA Bits -----------------------------------------------------
303LATA0            EQU  H'0000'
304LATA1            EQU  H'0001'
305LATA2            EQU  H'0002'
306LATA3            EQU  H'0003'
307LATA4            EQU  H'0004'
308LATA5            EQU  H'0005'
309LATA6            EQU  H'0006'
310LATA7            EQU  H'0007'
311
312
313;----- LATB Bits -----------------------------------------------------
314LATB0            EQU  H'0000'
315LATB1            EQU  H'0001'
316LATB2            EQU  H'0002'
317LATB3            EQU  H'0003'
318LATB4            EQU  H'0004'
319LATB5            EQU  H'0005'
320LATB6            EQU  H'0006'
321LATB7            EQU  H'0007'
322
323
324;----- LATC Bits -----------------------------------------------------
325LATC0            EQU  H'0000'
326LATC1            EQU  H'0001'
327LATC2            EQU  H'0002'
328LATC3            EQU  H'0003'
329LATC4            EQU  H'0004'
330LATC5            EQU  H'0005'
331LATC6            EQU  H'0006'
332LATC7            EQU  H'0007'
333
334
335;----- DDRA Bits -----------------------------------------------------
336TRISA0           EQU  H'0000'
337TRISA1           EQU  H'0001'
338TRISA2           EQU  H'0002'
339TRISA3           EQU  H'0003'
340TRISA4           EQU  H'0004'
341TRISA5           EQU  H'0005'
342TRISA6           EQU  H'0006'
343TRISA7           EQU  H'0007'
344
345RA0              EQU  H'0000'
346RA1              EQU  H'0001'
347RA2              EQU  H'0002'
348RA3              EQU  H'0003'
349RA4              EQU  H'0004'
350RA5              EQU  H'0005'
351RA6              EQU  H'0006'
352RA7              EQU  H'0007'
353
354
355;----- TRISA Bits -----------------------------------------------------
356TRISA0           EQU  H'0000'
357TRISA1           EQU  H'0001'
358TRISA2           EQU  H'0002'
359TRISA3           EQU  H'0003'
360TRISA4           EQU  H'0004'
361TRISA5           EQU  H'0005'
362TRISA6           EQU  H'0006'
363TRISA7           EQU  H'0007'
364
365RA0              EQU  H'0000'
366RA1              EQU  H'0001'
367RA2              EQU  H'0002'
368RA3              EQU  H'0003'
369RA4              EQU  H'0004'
370RA5              EQU  H'0005'
371RA6              EQU  H'0006'
372RA7              EQU  H'0007'
373
374
375;----- DDRB Bits -----------------------------------------------------
376TRISB0           EQU  H'0000'
377TRISB1           EQU  H'0001'
378TRISB2           EQU  H'0002'
379TRISB3           EQU  H'0003'
380TRISB4           EQU  H'0004'
381TRISB5           EQU  H'0005'
382TRISB6           EQU  H'0006'
383TRISB7           EQU  H'0007'
384
385RB0              EQU  H'0000'
386RB1              EQU  H'0001'
387RB2              EQU  H'0002'
388RB3              EQU  H'0003'
389RB4              EQU  H'0004'
390RB5              EQU  H'0005'
391RB6              EQU  H'0006'
392RB7              EQU  H'0007'
393
394
395;----- TRISB Bits -----------------------------------------------------
396TRISB0           EQU  H'0000'
397TRISB1           EQU  H'0001'
398TRISB2           EQU  H'0002'
399TRISB3           EQU  H'0003'
400TRISB4           EQU  H'0004'
401TRISB5           EQU  H'0005'
402TRISB6           EQU  H'0006'
403TRISB7           EQU  H'0007'
404
405RB0              EQU  H'0000'
406RB1              EQU  H'0001'
407RB2              EQU  H'0002'
408RB3              EQU  H'0003'
409RB4              EQU  H'0004'
410RB5              EQU  H'0005'
411RB6              EQU  H'0006'
412RB7              EQU  H'0007'
413
414
415;----- DDRC Bits -----------------------------------------------------
416TRISC0           EQU  H'0000'
417TRISC1           EQU  H'0001'
418TRISC2           EQU  H'0002'
419TRISC3           EQU  H'0003'
420TRISC4           EQU  H'0004'
421TRISC5           EQU  H'0005'
422TRISC6           EQU  H'0006'
423TRISC7           EQU  H'0007'
424
425RC0              EQU  H'0000'
426RC1              EQU  H'0001'
427RC2              EQU  H'0002'
428RC3              EQU  H'0003'
429RC4              EQU  H'0004'
430RC5              EQU  H'0005'
431RC6              EQU  H'0006'
432RC7              EQU  H'0007'
433
434
435;----- TRISC Bits -----------------------------------------------------
436TRISC0           EQU  H'0000'
437TRISC1           EQU  H'0001'
438TRISC2           EQU  H'0002'
439TRISC3           EQU  H'0003'
440TRISC4           EQU  H'0004'
441TRISC5           EQU  H'0005'
442TRISC6           EQU  H'0006'
443TRISC7           EQU  H'0007'
444
445RC0              EQU  H'0000'
446RC1              EQU  H'0001'
447RC2              EQU  H'0002'
448RC3              EQU  H'0003'
449RC4              EQU  H'0004'
450RC5              EQU  H'0005'
451RC6              EQU  H'0006'
452RC7              EQU  H'0007'
453
454
455;----- OSCTUNE Bits -----------------------------------------------------
456PLLEN            EQU  H'0006'
457INTSRC           EQU  H'0007'
458
459TUN0             EQU  H'0000'
460TUN1             EQU  H'0001'
461TUN2             EQU  H'0002'
462TUN3             EQU  H'0003'
463TUN4             EQU  H'0004'
464
465
466;----- PIE1 Bits -----------------------------------------------------
467TMR1IE           EQU  H'0000'
468TMR2IE           EQU  H'0001'
469CCP1IE           EQU  H'0002'
470SSPIE            EQU  H'0003'
471TXIE             EQU  H'0004'
472RCIE             EQU  H'0005'
473ADIE             EQU  H'0006'
474
475
476;----- PIR1 Bits -----------------------------------------------------
477TMR1IF           EQU  H'0000'
478TMR2IF           EQU  H'0001'
479CCP1IF           EQU  H'0002'
480SSPIF            EQU  H'0003'
481TXIF             EQU  H'0004'
482RCIF             EQU  H'0005'
483ADIF             EQU  H'0006'
484
485
486;----- IPR1 Bits -----------------------------------------------------
487TMR1IP           EQU  H'0000'
488TMR2IP           EQU  H'0001'
489CCP1IP           EQU  H'0002'
490SSPIP            EQU  H'0003'
491TXIP             EQU  H'0004'
492RCIP             EQU  H'0005'
493ADIP             EQU  H'0006'
494
495
496;----- PIE2 Bits -----------------------------------------------------
497CCP2IE           EQU  H'0000'
498TMR3IE           EQU  H'0001'
499HLVDIE           EQU  H'0002'
500BCLIE            EQU  H'0003'
501EEIE             EQU  H'0004'
502CMIE             EQU  H'0006'
503OSCFIE           EQU  H'0007'
504
505LVDIE            EQU  H'0002'
506
507
508;----- PIR2 Bits -----------------------------------------------------
509CCP2IF           EQU  H'0000'
510TMR3IF           EQU  H'0001'
511HLVDIF           EQU  H'0002'
512BCLIF            EQU  H'0003'
513EEIF             EQU  H'0004'
514CMIF             EQU  H'0006'
515OSCFIF           EQU  H'0007'
516
517LVDIF            EQU  H'0002'
518
519
520;----- IPR2 Bits -----------------------------------------------------
521CCP2IP           EQU  H'0000'
522TMR3IP           EQU  H'0001'
523HLVDIP           EQU  H'0002'
524BCLIP            EQU  H'0003'
525EEIP             EQU  H'0004'
526CMIP             EQU  H'0006'
527OSCFIP           EQU  H'0007'
528
529LVDIP            EQU  H'0002'
530
531
532;----- EECON1 Bits -----------------------------------------------------
533RD               EQU  H'0000'
534WR               EQU  H'0001'
535WREN             EQU  H'0002'
536WRERR            EQU  H'0003'
537FREE             EQU  H'0004'
538CFGS             EQU  H'0006'
539EEPGD            EQU  H'0007'
540
541
542;----- RCSTA Bits -----------------------------------------------------
543RX9D             EQU  H'0000'
544OERR             EQU  H'0001'
545FERR             EQU  H'0002'
546ADDEN            EQU  H'0003'
547CREN             EQU  H'0004'
548SREN             EQU  H'0005'
549RX9              EQU  H'0006'
550SPEN             EQU  H'0007'
551
552ADEN             EQU  H'0003'
553
554
555;----- RCSTA1 Bits -----------------------------------------------------
556RX9D             EQU  H'0000'
557OERR             EQU  H'0001'
558FERR             EQU  H'0002'
559ADDEN            EQU  H'0003'
560CREN             EQU  H'0004'
561SREN             EQU  H'0005'
562RX9              EQU  H'0006'
563SPEN             EQU  H'0007'
564
565ADEN             EQU  H'0003'
566
567
568;----- TXSTA Bits -----------------------------------------------------
569TX9D             EQU  H'0000'
570TRMT             EQU  H'0001'
571BRGH             EQU  H'0002'
572SENDB            EQU  H'0003'
573SYNC             EQU  H'0004'
574TXEN             EQU  H'0005'
575TX9              EQU  H'0006'
576CSRC             EQU  H'0007'
577
578
579;----- TXSTA1 Bits -----------------------------------------------------
580TX9D             EQU  H'0000'
581TRMT             EQU  H'0001'
582BRGH             EQU  H'0002'
583SENDB            EQU  H'0003'
584SYNC             EQU  H'0004'
585TXEN             EQU  H'0005'
586TX9              EQU  H'0006'
587CSRC             EQU  H'0007'
588
589
590;----- T3CON Bits -----------------------------------------------------
591TMR3ON           EQU  H'0000'
592TMR3CS           EQU  H'0001'
593NOT_T3SYNC       EQU  H'0002'
594T3CCP1           EQU  H'0003'
595T3CCP2           EQU  H'0006'
596RD16             EQU  H'0007'
597
598T3SYNC           EQU  H'0002'
599T3CKPS0          EQU  H'0004'
600T3CKPS1          EQU  H'0005'
601
602
603;----- CMCON Bits -----------------------------------------------------
604CIS              EQU  H'0003'
605C1INV            EQU  H'0004'
606C2INV            EQU  H'0005'
607C1OUT_CMCON      EQU  H'0006'
608C2OUT_CMCON      EQU  H'0007'
609
610CM0              EQU  H'0000'
611CM1              EQU  H'0001'
612CM2              EQU  H'0002'
613
614
615;----- CVRCON Bits -----------------------------------------------------
616CVRSS            EQU  H'0004'
617CVRR             EQU  H'0005'
618CVROE            EQU  H'0006'
619CVREN            EQU  H'0007'
620
621CVR0             EQU  H'0000'
622CVR1             EQU  H'0001'
623CVR2             EQU  H'0002'
624CVR3             EQU  H'0003'
625
626
627;----- ECCP1AS Bits -----------------------------------------------------
628ECCPASE          EQU  H'0007'
629
630PSSAC0           EQU  H'0002'
631PSSAC1           EQU  H'0003'
632ECCPAS0          EQU  H'0004'
633ECCPAS1          EQU  H'0005'
634ECCPAS2          EQU  H'0006'
635
636
637;----- ECCPAS Bits -----------------------------------------------------
638ECCPASE          EQU  H'0007'
639
640PSSAC0           EQU  H'0002'
641PSSAC1           EQU  H'0003'
642ECCPAS0          EQU  H'0004'
643ECCPAS1          EQU  H'0005'
644ECCPAS2          EQU  H'0006'
645
646
647;----- ECCP1DEL Bits -----------------------------------------------------
648PRSEN            EQU  H'0007'
649
650
651;----- PWM1CON Bits -----------------------------------------------------
652PRSEN            EQU  H'0007'
653
654
655;----- BAUDCON Bits -----------------------------------------------------
656ABDEN            EQU  H'0000'
657WUE              EQU  H'0001'
658BRG16            EQU  H'0003'
659TXCKP            EQU  H'0004'
660RXDTP            EQU  H'0005'
661RCIDL            EQU  H'0006'
662ABDOVF           EQU  H'0007'
663
664SCKP             EQU  H'0004'
665RCMT             EQU  H'0006'
666
667
668;----- BAUDCTL Bits -----------------------------------------------------
669ABDEN            EQU  H'0000'
670WUE              EQU  H'0001'
671BRG16            EQU  H'0003'
672TXCKP            EQU  H'0004'
673RXDTP            EQU  H'0005'
674RCIDL            EQU  H'0006'
675ABDOVF           EQU  H'0007'
676
677SCKP             EQU  H'0004'
678RCMT             EQU  H'0006'
679
680
681;----- CCP2CON Bits -----------------------------------------------------
682CCP2M0           EQU  H'0000'
683CCP2M1           EQU  H'0001'
684CCP2M2           EQU  H'0002'
685CCP2M3           EQU  H'0003'
686CCP2Y            EQU  H'0004'
687CCP2X            EQU  H'0005'
688
689DC2B0            EQU  H'0004'
690DC2B1            EQU  H'0005'
691
692
693;----- CCP1CON Bits -----------------------------------------------------
694CCP1M0           EQU  H'0000'
695CCP1M1           EQU  H'0001'
696CCP1M2           EQU  H'0002'
697CCP1M3           EQU  H'0003'
698CCP1Y            EQU  H'0004'
699CCP1X            EQU  H'0005'
700
701DC1B0            EQU  H'0004'
702DC1B1            EQU  H'0005'
703
704
705;----- ADCON2 Bits -----------------------------------------------------
706ADFM             EQU  H'0007'
707
708ADCS0            EQU  H'0000'
709ADCS1            EQU  H'0001'
710ADCS2            EQU  H'0002'
711ACQT0            EQU  H'0003'
712ACQT1            EQU  H'0004'
713ACQT2            EQU  H'0005'
714
715
716;----- ADCON1 Bits -----------------------------------------------------
717PCFG0            EQU  H'0000'
718PCFG1            EQU  H'0001'
719PCFG2            EQU  H'0002'
720PCFG3            EQU  H'0003'
721VCFG0            EQU  H'0004'
722VCFG1            EQU  H'0005'
723
724
725;----- ADCON0 Bits -----------------------------------------------------
726ADON             EQU  H'0000'
727GO_NOT_DONE      EQU  H'0001'
728
729GO               EQU  H'0001'
730CHS0             EQU  H'0002'
731CHS1             EQU  H'0003'
732CHS2             EQU  H'0004'
733CHS3             EQU  H'0005'
734
735DONE             EQU  H'0001'
736
737NOT_DONE         EQU  H'0001'
738
739GO_DONE          EQU  H'0001'
740
741
742;----- SSPCON2 Bits -----------------------------------------------------
743SEN              EQU  H'0000'
744RSEN             EQU  H'0001'
745PEN              EQU  H'0002'
746RCEN             EQU  H'0003'
747ACKEN            EQU  H'0004'
748ACKDT            EQU  H'0005'
749ACKSTAT          EQU  H'0006'
750GCEN             EQU  H'0007'
751
752ADMSK1           EQU  H'0001'
753ADMSK2           EQU  H'0002'
754ADMSK3           EQU  H'0003'
755ADMSK4           EQU  H'0004'
756ADMSK5           EQU  H'0005'
757
758
759;----- SSPCON1 Bits -----------------------------------------------------
760CKP              EQU  H'0004'
761SSPEN            EQU  H'0005'
762SSPOV            EQU  H'0006'
763WCOL             EQU  H'0007'
764
765SSPM0            EQU  H'0000'
766SSPM1            EQU  H'0001'
767SSPM2            EQU  H'0002'
768SSPM3            EQU  H'0003'
769
770
771;----- SSPSTAT Bits -----------------------------------------------------
772BF               EQU  H'0000'
773UA               EQU  H'0001'
774R_NOT_W          EQU  H'0002'
775S                EQU  H'0003'
776P                EQU  H'0004'
777D_NOT_A          EQU  H'0005'
778CKE              EQU  H'0006'
779SMP              EQU  H'0007'
780
781R                EQU  H'0002'
782D                EQU  H'0005'
783
784
785NOT_W            EQU  H'0002'
786NOT_A            EQU  H'0005'
787
788R_W              EQU  H'0002'
789D_A              EQU  H'0005'
790
791NOT_WRITE        EQU  H'0002'
792NOT_ADDRESS      EQU  H'0005'
793
794
795;----- T2CON Bits -----------------------------------------------------
796TMR2ON           EQU  H'0002'
797
798T2CKPS0          EQU  H'0000'
799T2CKPS1          EQU  H'0001'
800T2OUTPS0         EQU  H'0003'
801T2OUTPS1         EQU  H'0004'
802T2OUTPS2         EQU  H'0005'
803T2OUTPS3         EQU  H'0006'
804
805TOUTPS0          EQU  H'0003'
806TOUTPS1          EQU  H'0004'
807TOUTPS2          EQU  H'0005'
808TOUTPS3          EQU  H'0006'
809
810
811;----- T1CON Bits -----------------------------------------------------
812TMR1ON           EQU  H'0000'
813TMR1CS           EQU  H'0001'
814NOT_T1SYNC       EQU  H'0002'
815T1OSCEN          EQU  H'0003'
816T1RUN            EQU  H'0006'
817RD16             EQU  H'0007'
818
819T1SYNC           EQU  H'0002'
820T1CKPS0          EQU  H'0004'
821T1CKPS1          EQU  H'0005'
822
823
824;----- RCON Bits -----------------------------------------------------
825NOT_BOR          EQU  H'0000'
826NOT_POR          EQU  H'0001'
827NOT_PD           EQU  H'0002'
828NOT_TO           EQU  H'0003'
829NOT_RI           EQU  H'0004'
830SBOREN           EQU  H'0006'
831IPEN             EQU  H'0007'
832
833BOR              EQU  H'0000'
834POR              EQU  H'0001'
835PD               EQU  H'0002'
836TO               EQU  H'0003'
837RI               EQU  H'0004'
838
839
840;----- WDTCON Bits -----------------------------------------------------
841SWDTEN           EQU  H'0000'
842
843SWDTE            EQU  H'0000'
844
845
846;----- HLVDCON Bits -----------------------------------------------------
847HLVDEN           EQU  H'0004'
848IVRST            EQU  H'0005'
849VDIRMAG          EQU  H'0007'
850
851HLVDL0           EQU  H'0000'
852HLVDL1           EQU  H'0001'
853HLVDL2           EQU  H'0002'
854HLVDL3           EQU  H'0003'
855
856LVDL0            EQU  H'0000'
857LVDL1            EQU  H'0001'
858LVDL2            EQU  H'0002'
859LVDL3            EQU  H'0003'
860LVDEN            EQU  H'0004'
861IRVST            EQU  H'0005'
862
863LVV0             EQU  H'0000'
864LVV1             EQU  H'0001'
865LVV2             EQU  H'0002'
866LVV3             EQU  H'0003'
867BGST             EQU  H'0005'
868
869
870;----- LVDCON Bits -----------------------------------------------------
871HLVDEN           EQU  H'0004'
872IVRST            EQU  H'0005'
873VDIRMAG          EQU  H'0007'
874
875HLVDL0           EQU  H'0000'
876HLVDL1           EQU  H'0001'
877HLVDL2           EQU  H'0002'
878HLVDL3           EQU  H'0003'
879
880LVDL0            EQU  H'0000'
881LVDL1            EQU  H'0001'
882LVDL2            EQU  H'0002'
883LVDL3            EQU  H'0003'
884LVDEN            EQU  H'0004'
885IRVST            EQU  H'0005'
886
887LVV0             EQU  H'0000'
888LVV1             EQU  H'0001'
889LVV2             EQU  H'0002'
890LVV3             EQU  H'0003'
891BGST             EQU  H'0005'
892
893
894;----- OSCCON Bits -----------------------------------------------------
895IOFS             EQU  H'0002'
896OSTS             EQU  H'0003'
897IDLEN            EQU  H'0007'
898
899SCS0             EQU  H'0000'
900SCS1             EQU  H'0001'
901FLTS             EQU  H'0002'
902IRCF0            EQU  H'0004'
903IRCF1            EQU  H'0005'
904IRCF2            EQU  H'0006'
905
906
907;----- T0CON Bits -----------------------------------------------------
908PSA              EQU  H'0003'
909T0SE             EQU  H'0004'
910T0CS             EQU  H'0005'
911T08BIT           EQU  H'0006'
912TMR0ON           EQU  H'0007'
913
914T0PS0            EQU  H'0000'
915T0PS1            EQU  H'0001'
916T0PS2            EQU  H'0002'
917T0PS3            EQU  H'0003'
918T016BIT          EQU  H'0006'
919
920
921;----- STATUS Bits -----------------------------------------------------
922C                EQU  H'0000'
923DC               EQU  H'0001'
924Z                EQU  H'0002'
925OV               EQU  H'0003'
926N                EQU  H'0004'
927
928
929;----- INTCON3 Bits -----------------------------------------------------
930INT1IF           EQU  H'0000'
931INT2IF           EQU  H'0001'
932INT1IE           EQU  H'0003'
933INT2IE           EQU  H'0004'
934INT1IP           EQU  H'0006'
935INT2IP           EQU  H'0007'
936
937INT1F            EQU  H'0000'
938INT2F            EQU  H'0001'
939INT1E            EQU  H'0003'
940INT2E            EQU  H'0004'
941INT1P            EQU  H'0006'
942INT2P            EQU  H'0007'
943
944
945;----- INTCON2 Bits -----------------------------------------------------
946RBIP             EQU  H'0000'
947TMR0IP           EQU  H'0002'
948INTEDG2          EQU  H'0004'
949INTEDG1          EQU  H'0005'
950INTEDG0          EQU  H'0006'
951NOT_RBPU         EQU  H'0007'
952
953RBPU             EQU  H'0007'
954
955
956;----- INTCON Bits -----------------------------------------------------
957RBIF             EQU  H'0000'
958INT0IF           EQU  H'0001'
959TMR0IF           EQU  H'0002'
960RBIE             EQU  H'0003'
961INT0IE           EQU  H'0004'
962TMR0IE           EQU  H'0005'
963PEIE_GIEL        EQU  H'0006'
964GIE_GIEH         EQU  H'0007'
965
966INT0F            EQU  H'0001'
967T0IF             EQU  H'0002'
968INT0E            EQU  H'0004'
969T0IE             EQU  H'0005'
970PEIE             EQU  H'0006'
971GIE              EQU  H'0007'
972
973GIEL             EQU  H'0006'
974GIEH             EQU  H'0007'
975
976
977;----- STKPTR Bits -----------------------------------------------------
978STKUNF           EQU  H'0006'
979STKFUL           EQU  H'0007'
980
981SP0              EQU  H'0000'
982SP1              EQU  H'0001'
983SP2              EQU  H'0002'
984SP3              EQU  H'0003'
985SP4              EQU  H'0004'
986STKOVF           EQU  H'0007'
987
988
989
990;==========================================================================
991;
992;       RAM Definitions
993;
994;==========================================================================
995       __MAXRAM  H'0FFF'
996       __BADRAM  H'0600'-H'0F7F'
997       __BADRAM  H'0F83'
998       __BADRAM  H'0F85'-H'0F88'
999       __BADRAM  H'0F8C'-H'0F91'
1000       __BADRAM  H'0F95'-H'0F9A'
1001       __BADRAM  H'0F9C'
1002       __BADRAM  H'0FA3'-H'0FA5'
1003       __BADRAM  H'0FAA'
1004       __BADRAM  H'0FB9'
1005       __BADRAM  H'0FD4'
1006
1007;==========================================================================
1008;
1009;   IMPORTANT: For the PIC18 devices, the __CONFIG directive has been
1010;              superseded by the CONFIG directive.  The following settings
1011;              are available for this device.
1012;
1013;   Oscillator Selection bits:
1014;     OSC = LP             LP oscillator
1015;     OSC = XT             XT oscillator
1016;     OSC = HS             HS oscillator
1017;     OSC = RC             External RC oscillator, CLKO function on RA6
1018;     OSC = EC             EC oscillator, CLKO function on RA6
1019;     OSC = ECIO6          EC oscillator, port function on RA6
1020;     OSC = HSPLL          HS oscillator, PLL enabled (Clock Frequency = 4 x FOSC1)
1021;     OSC = RCIO6          External RC oscillator, port function on RA6
1022;     OSC = INTIO67        Internal oscillator block, port function on RA6 and RA7
1023;     OSC = INTIO7         Internal oscillator block, CLKO function on RA6, port function on RA7
1024;
1025;   Fail-Safe Clock Monitor Enable bit:
1026;     FCMEN = OFF          Fail-Safe Clock Monitor disabled
1027;     FCMEN = ON           Fail-Safe Clock Monitor enabled
1028;
1029;   Internal/External Oscillator Switchover bit:
1030;     IESO = OFF           Oscillator Switchover mode disabled
1031;     IESO = ON            Oscillator Switchover mode enabled
1032;
1033;   Power-up Timer Enable bit:
1034;     PWRT = ON            PWRT enabled
1035;     PWRT = OFF           PWRT disabled
1036;
1037;   Brown-out Reset Enable bits:
1038;     BOREN = OFF          Brown-out Reset disabled in hardware and software
1039;     BOREN = ON           Brown-out Reset enabled and controlled by software (SBOREN is enabled)
1040;     BOREN = NOSLP        Brown-out Reset enabled in hardware only and disabled in Sleep mode (SBOREN is disabled)
1041;     BOREN = SBORDIS      Brown-out Reset enabled in hardware only (SBOREN is disabled)
1042;
1043;   Brown Out Reset Voltage bits:
1044;     BORV = 0             Maximum setting
1045;     BORV = 1
1046;     BORV = 2
1047;     BORV = 3             Minimum setting
1048;
1049;   Watchdog Timer Enable bit:
1050;     WDT = OFF            WDT disabled (control is placed on the SWDTEN bit)
1051;     WDT = ON             WDT enabled
1052;
1053;   Watchdog Timer Postscale Select bits:
1054;     WDTPS = 1            1:1
1055;     WDTPS = 2            1:2
1056;     WDTPS = 4            1:4
1057;     WDTPS = 8            1:8
1058;     WDTPS = 16           1:16
1059;     WDTPS = 32           1:32
1060;     WDTPS = 64           1:64
1061;     WDTPS = 128          1:128
1062;     WDTPS = 256          1:256
1063;     WDTPS = 512          1:512
1064;     WDTPS = 1024         1:1024
1065;     WDTPS = 2048         1:2048
1066;     WDTPS = 4096         1:4096
1067;     WDTPS = 8192         1:8192
1068;     WDTPS = 16384        1:16384
1069;     WDTPS = 32768        1:32768
1070;
1071;   CCP2 MUX bit:
1072;     CCP2MX = PORTB       CCP2 input/output is multiplexed with RB3
1073;     CCP2MX = PORTC       CCP2 input/output is multiplexed with RC1
1074;
1075;   PORTB A/D Enable bit:
1076;     PBADEN = OFF         PORTB<4:0> pins are configured as digital I/O on Reset
1077;     PBADEN = ON          PORTB<4:0> pins are configured as analog input channels on Reset
1078;
1079;   Low-Power Timer1 Oscillator Enable bit:
1080;     LPT1OSC = OFF        Timer1 configured for higher power operation
1081;     LPT1OSC = ON         Timer1 configured for low-power operation
1082;
1083;   MCLR Pin Enable bit:
1084;     MCLRE = OFF          RE3 input pin enabled; MCLR disabled
1085;     MCLRE = ON           MCLR pin enabled; RE3 input pin disabled
1086;
1087;   Stack Full/Underflow Reset Enable bit:
1088;     STVREN = OFF         Stack full/underflow will not cause Reset
1089;     STVREN = ON          Stack full/underflow will cause Reset
1090;
1091;   Single-Supply ICSP Enable bit:
1092;     LVP = OFF            Single-Supply ICSP disabled
1093;     LVP = ON             Single-Supply ICSP enabled
1094;
1095;   Extended Instruction Set Enable bit:
1096;     XINST = OFF          Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
1097;     XINST = ON           Instruction set extension and Indexed Addressing mode enabled
1098;
1099;   Background Debugger Enable bit:
1100;     DEBUG = ON           Background debugger enabled, RB6 and RB7 are dedicated to In-Circuit Debug
1101;     DEBUG = OFF          Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins
1102;
1103;   Code Protection bit:
1104;     CP0 = ON             Block 0 (000800-001FFFh) code-protected
1105;     CP0 = OFF            Block 0 (000800-001FFFh) not code-protected
1106;
1107;   Code Protection bit:
1108;     CP1 = ON             Block 1 (002000-003FFFh) code-protected
1109;     CP1 = OFF            Block 1 (002000-003FFFh) not code-protected
1110;
1111;   Code Protection bit:
1112;     CP2 = ON             Block 2 (004000-005FFFh) code-protected
1113;     CP2 = OFF            Block 2 (004000-005FFFh) not code-protected
1114;
1115;   Code Protection bit:
1116;     CP3 = ON             Block 3 (006000-007FFFh) code-protected
1117;     CP3 = OFF            Block 3 (006000-007FFFh) not code-protected
1118;
1119;   Boot Block Code Protection bit:
1120;     CPB = ON             Boot block (000000-0007FFh) code-protected
1121;     CPB = OFF            Boot block (000000-0007FFh) not code-protected
1122;
1123;   Data EEPROM Code Protection bit:
1124;     CPD = ON             Data EEPROM code-protected
1125;     CPD = OFF            Data EEPROM not code-protected
1126;
1127;   Write Protection bit:
1128;     WRT0 = ON            Block 0 (000800-001FFFh) write-protected
1129;     WRT0 = OFF           Block 0 (000800-001FFFh) not write-protected
1130;
1131;   Write Protection bit:
1132;     WRT1 = ON            Block 1 (002000-003FFFh) write-protected
1133;     WRT1 = OFF           Block 1 (002000-003FFFh) not write-protected
1134;
1135;   Write Protection bit:
1136;     WRT2 = ON            Block 2 (004000-005FFFh) write-protected
1137;     WRT2 = OFF           Block 2 (004000-005FFFh) not write-protected
1138;
1139;   Write Protection bit:
1140;     WRT3 = ON            Block 3 (006000-007FFFh) write-protected
1141;     WRT3 = OFF           Block 3 (006000-007FFFh) not write-protected
1142;
1143;   Configuration Register Write Protection bit:
1144;     WRTC = ON            Configuration registers (300000-3000FFh) write-protected
1145;     WRTC = OFF           Configuration registers (300000-3000FFh) not write-protected
1146;
1147;   Boot Block Write Protection bit:
1148;     WRTB = ON            Boot block (000000-0007FFh) write-protected
1149;     WRTB = OFF           Boot block (000000-0007FFh) not write-protected
1150;
1151;   Data EEPROM Write Protection bit:
1152;     WRTD = ON            Data EEPROM write-protected
1153;     WRTD = OFF           Data EEPROM not write-protected
1154;
1155;   Table Read Protection bit:
1156;     EBTR0 = ON           Block 0 (000800-001FFFh) protected from table reads executed in other blocks
1157;     EBTR0 = OFF          Block 0 (000800-001FFFh) not protected from table reads executed in other blocks
1158;
1159;   Table Read Protection bit:
1160;     EBTR1 = ON           Block 1 (002000-003FFFh) protected from table reads executed in other blocks
1161;     EBTR1 = OFF          Block 1 (002000-003FFFh) not protected from table reads executed in other blocks
1162;
1163;   Table Read Protection bit:
1164;     EBTR2 = ON           Block 2 (004000-005FFFh) protected from table reads executed in other blocks
1165;     EBTR2 = OFF          Block 2 (004000-005FFFh) not protected from table reads executed in other blocks
1166;
1167;   Table Read Protection bit:
1168;     EBTR3 = ON           Block 3 (006000-007FFFh) protected from table reads executed in other blocks
1169;     EBTR3 = OFF          Block 3 (006000-007FFFh) not protected from table reads executed in other blocks
1170;
1171;   Boot Block Table Read Protection bit:
1172;     EBTRB = ON           Boot block (000000-0007FFh) protected from table reads executed in other blocks
1173;     EBTRB = OFF          Boot block (000000-0007FFh) not protected from table reads executed in other blocks
1174;
1175;==========================================================================
1176;==========================================================================
1177;
1178;       Configuration Bits
1179;
1180;   NAME            Address
1181;   CONFIG1H        300001h
1182;   CONFIG2L        300002h
1183;   CONFIG2H        300003h
1184;   CONFIG3H        300005h
1185;   CONFIG4L        300006h
1186;   CONFIG5L        300008h
1187;   CONFIG5H        300009h
1188;   CONFIG6L        30000Ah
1189;   CONFIG6H        30000Bh
1190;   CONFIG7L        30000Ch
1191;   CONFIG7H        30000Dh
1192;
1193;==========================================================================
1194
1195; The following is an assignment of address values for all of the
1196; configuration registers for the purpose of table reads
1197_CONFIG1H       EQU  H'300001'
1198_CONFIG2L       EQU  H'300002'
1199_CONFIG2H       EQU  H'300003'
1200_CONFIG3H       EQU  H'300005'
1201_CONFIG4L       EQU  H'300006'
1202_CONFIG5L       EQU  H'300008'
1203_CONFIG5H       EQU  H'300009'
1204_CONFIG6L       EQU  H'30000A'
1205_CONFIG6H       EQU  H'30000B'
1206_CONFIG7L       EQU  H'30000C'
1207_CONFIG7H       EQU  H'30000D'
1208
1209;----- CONFIG1H Options --------------------------------------------------
1210_OSC_LP_1H           EQU  H'F0'; LP oscillator
1211_OSC_XT_1H           EQU  H'F1'; XT oscillator
1212_OSC_HS_1H           EQU  H'F2'; HS oscillator
1213_OSC_RC_1H           EQU  H'F3'; External RC oscillator, CLKO function on RA6
1214_OSC_EC_1H           EQU  H'F4'; EC oscillator, CLKO function on RA6
1215_OSC_ECIO6_1H        EQU  H'F5'; EC oscillator, port function on RA6
1216_OSC_HSPLL_1H        EQU  H'F6'; HS oscillator, PLL enabled (Clock Frequency = 4 x FOSC1)
1217_OSC_RCIO6_1H        EQU  H'F7'; External RC oscillator, port function on RA6
1218_OSC_INTIO67_1H      EQU  H'F8'; Internal oscillator block, port function on RA6 and RA7
1219_OSC_INTIO7_1H       EQU  H'F9'; Internal oscillator block, CLKO function on RA6, port function on RA7
1220
1221_FCMEN_OFF_1H        EQU  H'BF'; Fail-Safe Clock Monitor disabled
1222_FCMEN_ON_1H         EQU  H'FF'; Fail-Safe Clock Monitor enabled
1223
1224_IESO_OFF_1H         EQU  H'7F'; Oscillator Switchover mode disabled
1225_IESO_ON_1H          EQU  H'FF'; Oscillator Switchover mode enabled
1226
1227;----- CONFIG2L Options --------------------------------------------------
1228_PWRT_ON_2L          EQU  H'FE'; PWRT enabled
1229_PWRT_OFF_2L         EQU  H'FF'; PWRT disabled
1230
1231_BOREN_OFF_2L        EQU  H'F9'; Brown-out Reset disabled in hardware and software
1232_BOREN_ON_2L         EQU  H'FB'; Brown-out Reset enabled and controlled by software (SBOREN is enabled)
1233_BOREN_NOSLP_2L      EQU  H'FD'; Brown-out Reset enabled in hardware only and disabled in Sleep mode (SBOREN is disabled)
1234_BOREN_SBORDIS_2L    EQU  H'FF'; Brown-out Reset enabled in hardware only (SBOREN is disabled)
1235
1236_BORV_0_2L           EQU  H'E7'; Maximum setting
1237_BORV_1_2L           EQU  H'EF'
1238_BORV_2_2L           EQU  H'F7'
1239_BORV_3_2L           EQU  H'FF'; Minimum setting
1240
1241;----- CONFIG2H Options --------------------------------------------------
1242_WDT_OFF_2H          EQU  H'FE'; WDT disabled (control is placed on the SWDTEN bit)
1243_WDT_ON_2H           EQU  H'FF'; WDT enabled
1244
1245_WDTPS_1_2H          EQU  H'E1'; 1:1
1246_WDTPS_2_2H          EQU  H'E3'; 1:2
1247_WDTPS_4_2H          EQU  H'E5'; 1:4
1248_WDTPS_8_2H          EQU  H'E7'; 1:8
1249_WDTPS_16_2H         EQU  H'E9'; 1:16
1250_WDTPS_32_2H         EQU  H'EB'; 1:32
1251_WDTPS_64_2H         EQU  H'ED'; 1:64
1252_WDTPS_128_2H        EQU  H'EF'; 1:128
1253_WDTPS_256_2H        EQU  H'F1'; 1:256
1254_WDTPS_512_2H        EQU  H'F3'; 1:512
1255_WDTPS_1024_2H       EQU  H'F5'; 1:1024
1256_WDTPS_2048_2H       EQU  H'F7'; 1:2048
1257_WDTPS_4096_2H       EQU  H'F9'; 1:4096
1258_WDTPS_8192_2H       EQU  H'FB'; 1:8192
1259_WDTPS_16384_2H      EQU  H'FD'; 1:16384
1260_WDTPS_32768_2H      EQU  H'FF'; 1:32768
1261
1262;----- CONFIG3H Options --------------------------------------------------
1263_CCP2MX_PORTB_3H     EQU  H'FE'; CCP2 input/output is multiplexed with RB3
1264_CCP2MX_PORTC_3H     EQU  H'FF'; CCP2 input/output is multiplexed with RC1
1265
1266_PBADEN_OFF_3H       EQU  H'FD'; PORTB<4:0> pins are configured as digital I/O on Reset
1267_PBADEN_ON_3H        EQU  H'FF'; PORTB<4:0> pins are configured as analog input channels on Reset
1268
1269_LPT1OSC_OFF_3H      EQU  H'FB'; Timer1 configured for higher power operation
1270_LPT1OSC_ON_3H       EQU  H'FF'; Timer1 configured for low-power operation
1271
1272_MCLRE_OFF_3H        EQU  H'7F'; RE3 input pin enabled; MCLR disabled
1273_MCLRE_ON_3H         EQU  H'FF'; MCLR pin enabled; RE3 input pin disabled
1274
1275;----- CONFIG4L Options --------------------------------------------------
1276_STVREN_OFF_4L       EQU  H'FE'; Stack full/underflow will not cause Reset
1277_STVREN_ON_4L        EQU  H'FF'; Stack full/underflow will cause Reset
1278
1279_LVP_OFF_4L          EQU  H'FB'; Single-Supply ICSP disabled
1280_LVP_ON_4L           EQU  H'FF'; Single-Supply ICSP enabled
1281
1282_XINST_OFF_4L        EQU  H'BF'; Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
1283_XINST_ON_4L         EQU  H'FF'; Instruction set extension and Indexed Addressing mode enabled
1284
1285_DEBUG_ON_4L         EQU  H'7F'; Background debugger enabled, RB6 and RB7 are dedicated to In-Circuit Debug
1286_DEBUG_OFF_4L        EQU  H'FF'; Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins
1287
1288;----- CONFIG5L Options --------------------------------------------------
1289_CP0_ON_5L           EQU  H'FE'; Block 0 (000800-001FFFh) code-protected
1290_CP0_OFF_5L          EQU  H'FF'; Block 0 (000800-001FFFh) not code-protected
1291
1292_CP1_ON_5L           EQU  H'FD'; Block 1 (002000-003FFFh) code-protected
1293_CP1_OFF_5L          EQU  H'FF'; Block 1 (002000-003FFFh) not code-protected
1294
1295_CP2_ON_5L           EQU  H'FB'; Block 2 (004000-005FFFh) code-protected
1296_CP2_OFF_5L          EQU  H'FF'; Block 2 (004000-005FFFh) not code-protected
1297
1298_CP3_ON_5L           EQU  H'F7'; Block 3 (006000-007FFFh) code-protected
1299_CP3_OFF_5L          EQU  H'FF'; Block 3 (006000-007FFFh) not code-protected
1300
1301;----- CONFIG5H Options --------------------------------------------------
1302_CPB_ON_5H           EQU  H'BF'; Boot block (000000-0007FFh) code-protected
1303_CPB_OFF_5H          EQU  H'FF'; Boot block (000000-0007FFh) not code-protected
1304
1305_CPD_ON_5H           EQU  H'7F'; Data EEPROM code-protected
1306_CPD_OFF_5H          EQU  H'FF'; Data EEPROM not code-protected
1307
1308;----- CONFIG6L Options --------------------------------------------------
1309_WRT0_ON_6L          EQU  H'FE'; Block 0 (000800-001FFFh) write-protected
1310_WRT0_OFF_6L         EQU  H'FF'; Block 0 (000800-001FFFh) not write-protected
1311
1312_WRT1_ON_6L          EQU  H'FD'; Block 1 (002000-003FFFh) write-protected
1313_WRT1_OFF_6L         EQU  H'FF'; Block 1 (002000-003FFFh) not write-protected
1314
1315_WRT2_ON_6L          EQU  H'FB'; Block 2 (004000-005FFFh) write-protected
1316_WRT2_OFF_6L         EQU  H'FF'; Block 2 (004000-005FFFh) not write-protected
1317
1318_WRT3_ON_6L          EQU  H'F7'; Block 3 (006000-007FFFh) write-protected
1319_WRT3_OFF_6L         EQU  H'FF'; Block 3 (006000-007FFFh) not write-protected
1320
1321;----- CONFIG6H Options --------------------------------------------------
1322_WRTC_ON_6H          EQU  H'DF'; Configuration registers (300000-3000FFh) write-protected
1323_WRTC_OFF_6H         EQU  H'FF'; Configuration registers (300000-3000FFh) not write-protected
1324
1325_WRTB_ON_6H          EQU  H'BF'; Boot block (000000-0007FFh) write-protected
1326_WRTB_OFF_6H         EQU  H'FF'; Boot block (000000-0007FFh) not write-protected
1327
1328_WRTD_ON_6H          EQU  H'7F'; Data EEPROM write-protected
1329_WRTD_OFF_6H         EQU  H'FF'; Data EEPROM not write-protected
1330
1331;----- CONFIG7L Options --------------------------------------------------
1332_EBTR0_ON_7L         EQU  H'FE'; Block 0 (000800-001FFFh) protected from table reads executed in other blocks
1333_EBTR0_OFF_7L        EQU  H'FF'; Block 0 (000800-001FFFh) not protected from table reads executed in other blocks
1334
1335_EBTR1_ON_7L         EQU  H'FD'; Block 1 (002000-003FFFh) protected from table reads executed in other blocks
1336_EBTR1_OFF_7L        EQU  H'FF'; Block 1 (002000-003FFFh) not protected from table reads executed in other blocks
1337
1338_EBTR2_ON_7L         EQU  H'FB'; Block 2 (004000-005FFFh) protected from table reads executed in other blocks
1339_EBTR2_OFF_7L        EQU  H'FF'; Block 2 (004000-005FFFh) not protected from table reads executed in other blocks
1340
1341_EBTR3_ON_7L         EQU  H'F7'; Block 3 (006000-007FFFh) protected from table reads executed in other blocks
1342_EBTR3_OFF_7L        EQU  H'FF'; Block 3 (006000-007FFFh) not protected from table reads executed in other blocks
1343
1344;----- CONFIG7H Options --------------------------------------------------
1345_EBTRB_ON_7H         EQU  H'BF'; Boot block (000000-0007FFh) protected from table reads executed in other blocks
1346_EBTRB_OFF_7H        EQU  H'FF'; Boot block (000000-0007FFh) not protected from table reads executed in other blocks
1347
1348
1349;----- DEVID Equates --------------------------------------------------
1350_DEVID1          EQU  H'3FFFFE'
1351_DEVID2          EQU  H'3FFFFF'
1352
1353;----- IDLOC Equates --------------------------------------------------
1354_IDLOC0          EQU  H'200000'
1355_IDLOC1          EQU  H'200001'
1356_IDLOC2          EQU  H'200002'
1357_IDLOC3          EQU  H'200003'
1358_IDLOC4          EQU  H'200004'
1359_IDLOC5          EQU  H'200005'
1360_IDLOC6          EQU  H'200006'
1361_IDLOC7          EQU  H'200007'
1362
1363        LIST
1364