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