1 LIST 2 3;========================================================================== 4; Build date : Aug 13 2015 5; MPASM PIC12LF1840T48A 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 PIC12LF1840T48A 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 /PIC12LF1840T48A 22; 2. LIST directive in the source file 23; LIST P=PIC12LF1840T48A 24; 3. Processor Type entry in the MPASM full-screen interface 25; 4. Setting the processor in the MPLAB Project Dialog 26;========================================================================== 27;;;; Begin: Added in gputils 28 29;========================================================================== 30; 31; Gputils Specific Revision History 32; 33;========================================================================== 34 35; 22 Jan 2014 Added the _DEBUG_ON and _DEBUG_OFF config options. 36;;;; End: Added in gputils 37 38;========================================================================== 39; 40; Verify Processor 41; 42;========================================================================== 43 IFNDEF __12LF1840T48A 44 MESSG "Processor-header file mismatch. Verify selected processor." 45 ENDIF 46 47 48 49;========================================================================== 50; 51; Register Definitions 52; 53;========================================================================== 54 55W EQU H'0000' 56F EQU H'0001' 57 58;----- Register Files ----------------------------------------------------- 59 60;-----Bank0------------------ 61INDF0 EQU H'0000' 62INDF1 EQU H'0001' 63PCL EQU H'0002' 64STATUS EQU H'0003' 65FSR0 EQU H'0004' 66FSR0L EQU H'0004' 67FSR0H EQU H'0005' 68FSR1 EQU H'0006' 69FSR1L EQU H'0006' 70FSR1H EQU H'0007' 71BSR EQU H'0008' 72WREG EQU H'0009' 73PCLATH EQU H'000A' 74INTCON EQU H'000B' 75PORTA EQU H'000C' 76PIR1 EQU H'0011' 77PIR2 EQU H'0012' 78TMR0 EQU H'0015' 79TMR1 EQU H'0016' 80TMR1L EQU H'0016' 81TMR1H EQU H'0017' 82T1CON EQU H'0018' 83T1GCON EQU H'0019' 84TMR2 EQU H'001A' 85PR2 EQU H'001B' 86T2CON EQU H'001C' 87CPSCON0 EQU H'001E' 88CPSCON1 EQU H'001F' 89 90;-----Bank1------------------ 91TRISA EQU H'008C' 92PIE1 EQU H'0091' 93PIE2 EQU H'0092' 94OPTION_REG EQU H'0095' 95PCON EQU H'0096' 96WDTCON EQU H'0097' 97OSCTUNE EQU H'0098' 98OSCCON EQU H'0099' 99OSCSTAT EQU H'009A' 100ADRES EQU H'009B' 101ADRESL EQU H'009B' 102ADRESH EQU H'009C' 103ADCON0 EQU H'009D' 104ADCON1 EQU H'009E' 105 106;-----Bank2------------------ 107LATA EQU H'010C' 108CM1CON0 EQU H'0111' 109CM1CON1 EQU H'0112' 110CMOUT EQU H'0115' 111BORCON EQU H'0116' 112FVRCON EQU H'0117' 113DACCON0 EQU H'0118' 114DACCON1 EQU H'0119' 115SRCON0 EQU H'011A' 116SRCON1 EQU H'011B' 117APFCON EQU H'011D' 118APFCON0 EQU H'011D' 119 120;-----Bank3------------------ 121ANSELA EQU H'018C' 122EEADR EQU H'0191' 123EEADRL EQU H'0191' 124EEADRH EQU H'0192' 125EEDAT EQU H'0193' 126EEDATL EQU H'0193' 127EEDATH EQU H'0194' 128EECON1 EQU H'0195' 129EECON2 EQU H'0196' 130RCREG EQU H'0199' 131TXREG EQU H'019A' 132SP1BRG EQU H'019B' 133SP1BRGL EQU H'019B' 134SPBRG EQU H'019B' 135SPBRGL EQU H'019B' 136SP1BRGH EQU H'019C' 137SPBRGH EQU H'019C' 138RCSTA EQU H'019D' 139TXSTA EQU H'019E' 140BAUDCON EQU H'019F' 141 142;-----Bank4------------------ 143WPUA EQU H'020C' 144SSP1BUF EQU H'0211' 145SSPBUF EQU H'0211' 146SSP1ADD EQU H'0212' 147SSPADD EQU H'0212' 148SSP1MSK EQU H'0213' 149SSPMSK EQU H'0213' 150SSP1STAT EQU H'0214' 151SSPSTAT EQU H'0214' 152SSP1CON1 EQU H'0215' 153SSPCON EQU H'0215' 154SSPCON1 EQU H'0215' 155SSP1CON2 EQU H'0216' 156SSPCON2 EQU H'0216' 157SSP1CON3 EQU H'0217' 158SSPCON3 EQU H'0217' 159 160;-----Bank5------------------ 161CCPR1 EQU H'0291' 162CCPR1L EQU H'0291' 163CCPR1H EQU H'0292' 164CCP1CON EQU H'0293' 165PWM1CON EQU H'0294' 166CCP1AS EQU H'0295' 167ECCP1AS EQU H'0295' 168PSTR1CON EQU H'0296' 169 170;-----Bank7------------------ 171IOCAP EQU H'0391' 172IOCAN EQU H'0392' 173IOCAF EQU H'0393' 174CLKRCON EQU H'039A' 175MDCON EQU H'039C' 176MDSRC EQU H'039D' 177MDCARL EQU H'039E' 178MDCARH EQU H'039F' 179 180;-----Bank31------------------ 181STATUS_SHAD EQU H'0FE4' 182WREG_SHAD EQU H'0FE5' 183BSR_SHAD EQU H'0FE6' 184PCLATH_SHAD EQU H'0FE7' 185FSR0L_SHAD EQU H'0FE8' 186FSR0H_SHAD EQU H'0FE9' 187FSR1L_SHAD EQU H'0FEA' 188FSR1H_SHAD EQU H'0FEB' 189STKPTR EQU H'0FED' 190TOSL EQU H'0FEE' 191TOSH EQU H'0FEF' 192 193;----- STATUS Bits ----------------------------------------------------- 194C EQU H'0000' 195DC EQU H'0001' 196Z EQU H'0002' 197NOT_PD EQU H'0003' 198NOT_TO EQU H'0004' 199 200 201;----- BSR Bits ----------------------------------------------------- 202BSR0 EQU H'0000' 203BSR1 EQU H'0001' 204BSR2 EQU H'0002' 205BSR3 EQU H'0003' 206BSR4 EQU H'0004' 207 208 209 210;----- INTCON Bits ----------------------------------------------------- 211IOCIF EQU H'0000' 212INTF EQU H'0001' 213TMR0IF EQU H'0002' 214IOCIE EQU H'0003' 215INTE EQU H'0004' 216TMR0IE EQU H'0005' 217PEIE EQU H'0006' 218GIE EQU H'0007' 219 220T0IF EQU H'0002' 221T0IE EQU H'0005' 222 223 224;----- PORTA Bits ----------------------------------------------------- 225RA0 EQU H'0000' 226RA1 EQU H'0001' 227RA2 EQU H'0002' 228RA3 EQU H'0003' 229RA4 EQU H'0004' 230RA5 EQU H'0005' 231 232 233;----- PIR1 Bits ----------------------------------------------------- 234TMR1IF EQU H'0000' 235TMR2IF EQU H'0001' 236CCP1IF EQU H'0002' 237SSP1IF EQU H'0003' 238TXIF EQU H'0004' 239RCIF EQU H'0005' 240ADIF EQU H'0006' 241TMR1GIF EQU H'0007' 242 243 244;----- PIR2 Bits ----------------------------------------------------- 245BCL1IF EQU H'0003' 246EEIF EQU H'0004' 247C1IF EQU H'0005' 248OSFIF EQU H'0007' 249 250 251;----- T1CON Bits ----------------------------------------------------- 252TMR1ON EQU H'0000' 253NOT_T1SYNC EQU H'0002' 254T1OSCEN EQU H'0003' 255T1CKPS0 EQU H'0004' 256T1CKPS1 EQU H'0005' 257TMR1CS0 EQU H'0006' 258TMR1CS1 EQU H'0007' 259 260 261 262;----- T1GCON Bits ----------------------------------------------------- 263T1GSS0 EQU H'0000' 264T1GSS1 EQU H'0001' 265T1GVAL EQU H'0002' 266T1GGO EQU H'0003' 267T1GSPM EQU H'0004' 268T1GTM EQU H'0005' 269T1GPOL EQU H'0006' 270TMR1GE EQU H'0007' 271 272 273 274;----- T2CON Bits ----------------------------------------------------- 275T2CKPS0 EQU H'0000' 276T2CKPS1 EQU H'0001' 277TMR2ON EQU H'0002' 278T2OUTPS0 EQU H'0003' 279T2OUTPS1 EQU H'0004' 280T2OUTPS2 EQU H'0005' 281T2OUTPS3 EQU H'0006' 282 283 284 285;----- CPSCON0 Bits ----------------------------------------------------- 286T0XCS EQU H'0000' 287CPSOUT EQU H'0001' 288CPSRNG0 EQU H'0002' 289CPSRNG1 EQU H'0003' 290CPSRM EQU H'0006' 291CPSON EQU H'0007' 292 293 294 295;----- CPSCON1 Bits ----------------------------------------------------- 296CPSCH0 EQU H'0000' 297CPSCH1 EQU H'0001' 298 299 300 301;----- TRISA Bits ----------------------------------------------------- 302TRISA0 EQU H'0000' 303TRISA1 EQU H'0001' 304TRISA2 EQU H'0002' 305TRISA3 EQU H'0003' 306TRISA4 EQU H'0004' 307TRISA5 EQU H'0005' 308 309 310;----- PIE1 Bits ----------------------------------------------------- 311TMR1IE EQU H'0000' 312TMR2IE EQU H'0001' 313CCP1IE EQU H'0002' 314SSP1IE EQU H'0003' 315TXIE EQU H'0004' 316RCIE EQU H'0005' 317ADIE EQU H'0006' 318TMR1GIE EQU H'0007' 319 320 321;----- PIE2 Bits ----------------------------------------------------- 322BCL1IE EQU H'0003' 323EEIE EQU H'0004' 324C1IE EQU H'0005' 325OSFIE EQU H'0007' 326 327 328;----- OPTION_REG Bits ----------------------------------------------------- 329PS0 EQU H'0000' 330PS1 EQU H'0001' 331PS2 EQU H'0002' 332PSA EQU H'0003' 333TMR0SE EQU H'0004' 334TMR0CS EQU H'0005' 335INTEDG EQU H'0006' 336NOT_WPUEN EQU H'0007' 337 338T0SE EQU H'0004' 339T0CS EQU H'0005' 340 341 342;----- PCON Bits ----------------------------------------------------- 343NOT_BOR EQU H'0000' 344NOT_POR EQU H'0001' 345NOT_RI EQU H'0002' 346NOT_RMCLR EQU H'0003' 347STKUNF EQU H'0006' 348STKOVF EQU H'0007' 349 350 351;----- WDTCON Bits ----------------------------------------------------- 352SWDTEN EQU H'0000' 353WDTPS0 EQU H'0001' 354WDTPS1 EQU H'0002' 355WDTPS2 EQU H'0003' 356WDTPS3 EQU H'0004' 357WDTPS4 EQU H'0005' 358 359 360 361;----- OSCTUNE Bits ----------------------------------------------------- 362TUN0 EQU H'0000' 363TUN1 EQU H'0001' 364TUN2 EQU H'0002' 365TUN3 EQU H'0003' 366TUN4 EQU H'0004' 367TUN5 EQU H'0005' 368 369 370 371;----- OSCCON Bits ----------------------------------------------------- 372SCS0 EQU H'0000' 373SCS1 EQU H'0001' 374IRCF0 EQU H'0003' 375IRCF1 EQU H'0004' 376IRCF2 EQU H'0005' 377IRCF3 EQU H'0006' 378SPLLEN EQU H'0007' 379 380 381 382;----- OSCSTAT Bits ----------------------------------------------------- 383HFIOFS EQU H'0000' 384LFIOFR EQU H'0001' 385MFIOFR EQU H'0002' 386HFIOFL EQU H'0003' 387HFIOFR EQU H'0004' 388OSTS EQU H'0005' 389PLLR EQU H'0006' 390T1OSCR EQU H'0007' 391 392 393;----- ADCON0 Bits ----------------------------------------------------- 394ADON EQU H'0000' 395GO_NOT_DONE EQU H'0001' 396CHS0 EQU H'0002' 397CHS1 EQU H'0003' 398CHS2 EQU H'0004' 399CHS3 EQU H'0005' 400CHS4 EQU H'0006' 401 402ADGO EQU H'0001' 403 404GO EQU H'0001' 405 406 407;----- ADCON1 Bits ----------------------------------------------------- 408ADPREF0 EQU H'0000' 409ADPREF1 EQU H'0001' 410ADCS0 EQU H'0004' 411ADCS1 EQU H'0005' 412ADCS2 EQU H'0006' 413ADFM EQU H'0007' 414 415 416 417;----- LATA Bits ----------------------------------------------------- 418LATA0 EQU H'0000' 419LATA1 EQU H'0001' 420LATA2 EQU H'0002' 421LATA4 EQU H'0004' 422LATA5 EQU H'0005' 423 424 425;----- CM1CON0 Bits ----------------------------------------------------- 426C1SYNC EQU H'0000' 427C1HYS EQU H'0001' 428C1SP EQU H'0002' 429C1POL EQU H'0004' 430C1OE EQU H'0005' 431C1OUT EQU H'0006' 432C1ON EQU H'0007' 433 434 435;----- CM1CON1 Bits ----------------------------------------------------- 436C1NCH EQU H'0000' 437C1PCH0 EQU H'0004' 438C1PCH1 EQU H'0005' 439C1INTN EQU H'0006' 440C1INTP EQU H'0007' 441 442C1NCH0 EQU H'0000' 443 444 445;----- CMOUT Bits ----------------------------------------------------- 446MC1OUT EQU H'0000' 447 448 449;----- BORCON Bits ----------------------------------------------------- 450BORRDY EQU H'0000' 451BORFS EQU H'0006' 452SBOREN EQU H'0007' 453 454 455;----- FVRCON Bits ----------------------------------------------------- 456ADFVR0 EQU H'0000' 457ADFVR1 EQU H'0001' 458CDAFVR0 EQU H'0002' 459CDAFVR1 EQU H'0003' 460TSRNG EQU H'0004' 461TSEN EQU H'0005' 462FVRRDY EQU H'0006' 463FVREN EQU H'0007' 464 465 466 467;----- DACCON0 Bits ----------------------------------------------------- 468DACPSS0 EQU H'0002' 469DACPSS1 EQU H'0003' 470DACOE EQU H'0005' 471DACLPS EQU H'0006' 472DACEN EQU H'0007' 473 474 475 476;----- DACCON1 Bits ----------------------------------------------------- 477DACR0 EQU H'0000' 478DACR1 EQU H'0001' 479DACR2 EQU H'0002' 480DACR3 EQU H'0003' 481DACR4 EQU H'0004' 482 483 484 485;----- SRCON0 Bits ----------------------------------------------------- 486SRPR EQU H'0000' 487SRPS EQU H'0001' 488SRNQEN EQU H'0002' 489SRQEN EQU H'0003' 490SRCLK0 EQU H'0004' 491SRCLK1 EQU H'0005' 492SRCLK2 EQU H'0006' 493SRLEN EQU H'0007' 494 495 496 497;----- SRCON1 Bits ----------------------------------------------------- 498SRRC1E EQU H'0000' 499SRRCKE EQU H'0002' 500SRRPE EQU H'0003' 501SRSC1E EQU H'0004' 502SRSCKE EQU H'0006' 503SRSPE EQU H'0007' 504 505 506;----- APFCON Bits ----------------------------------------------------- 507CCP1SEL EQU H'0000' 508P1BSEL EQU H'0001' 509TXCKSEL EQU H'0002' 510T1GSEL EQU H'0003' 511SSSEL EQU H'0005' 512SDOSEL EQU H'0006' 513RXDTSEL EQU H'0007' 514 515SS1SEL EQU H'0005' 516SDO1SEL EQU H'0006' 517 518 519;----- APFCON0 Bits ----------------------------------------------------- 520CCP1SEL EQU H'0000' 521P1BSEL EQU H'0001' 522TXCKSEL EQU H'0002' 523T1GSEL EQU H'0003' 524SSSEL EQU H'0005' 525SDOSEL EQU H'0006' 526RXDTSEL EQU H'0007' 527 528SS1SEL EQU H'0005' 529SDO1SEL EQU H'0006' 530 531 532;----- ANSELA Bits ----------------------------------------------------- 533ANSA0 EQU H'0000' 534ANSA1 EQU H'0001' 535ANSA2 EQU H'0002' 536ANSA4 EQU H'0004' 537 538 539 540;----- EECON1 Bits ----------------------------------------------------- 541RD EQU H'0000' 542WR EQU H'0001' 543WREN EQU H'0002' 544WRERR EQU H'0003' 545FREE EQU H'0004' 546LWLO EQU H'0005' 547CFGS EQU H'0006' 548EEPGD EQU H'0007' 549 550 551;----- RCSTA Bits ----------------------------------------------------- 552RX9D EQU H'0000' 553OERR EQU H'0001' 554FERR EQU H'0002' 555ADDEN EQU H'0003' 556CREN EQU H'0004' 557SREN EQU H'0005' 558RX9 EQU H'0006' 559SPEN EQU H'0007' 560 561 562;----- TXSTA Bits ----------------------------------------------------- 563TX9D EQU H'0000' 564TRMT EQU H'0001' 565BRGH EQU H'0002' 566SENDB EQU H'0003' 567SYNC EQU H'0004' 568TXEN EQU H'0005' 569TX9 EQU H'0006' 570CSRC EQU H'0007' 571 572 573;----- BAUDCON Bits ----------------------------------------------------- 574ABDEN EQU H'0000' 575WUE EQU H'0001' 576BRG16 EQU H'0003' 577SCKP EQU H'0004' 578RCIDL EQU H'0006' 579ABDOVF EQU H'0007' 580 581 582;----- WPUA Bits ----------------------------------------------------- 583WPUA0 EQU H'0000' 584WPUA1 EQU H'0001' 585WPUA2 EQU H'0002' 586WPUA3 EQU H'0003' 587WPUA4 EQU H'0004' 588WPUA5 EQU H'0005' 589 590 591 592;----- SSP1STAT Bits ----------------------------------------------------- 593BF EQU H'0000' 594UA EQU H'0001' 595R_NOT_W EQU H'0002' 596S EQU H'0003' 597P EQU H'0004' 598D_NOT_A EQU H'0005' 599CKE EQU H'0006' 600SMP EQU H'0007' 601 602 603;----- SSPSTAT Bits ----------------------------------------------------- 604BF EQU H'0000' 605UA EQU H'0001' 606R_NOT_W EQU H'0002' 607S EQU H'0003' 608P EQU H'0004' 609D_NOT_A EQU H'0005' 610CKE EQU H'0006' 611SMP EQU H'0007' 612 613 614;----- SSP1CON1 Bits ----------------------------------------------------- 615SSPM0 EQU H'0000' 616SSPM1 EQU H'0001' 617SSPM2 EQU H'0002' 618SSPM3 EQU H'0003' 619CKP EQU H'0004' 620SSPEN EQU H'0005' 621SSPOV EQU H'0006' 622WCOL EQU H'0007' 623 624 625 626;----- SSPCON Bits ----------------------------------------------------- 627SSPM0 EQU H'0000' 628SSPM1 EQU H'0001' 629SSPM2 EQU H'0002' 630SSPM3 EQU H'0003' 631CKP EQU H'0004' 632SSPEN EQU H'0005' 633SSPOV EQU H'0006' 634WCOL EQU H'0007' 635 636 637 638;----- SSPCON1 Bits ----------------------------------------------------- 639SSPM0 EQU H'0000' 640SSPM1 EQU H'0001' 641SSPM2 EQU H'0002' 642SSPM3 EQU H'0003' 643CKP EQU H'0004' 644SSPEN EQU H'0005' 645SSPOV EQU H'0006' 646WCOL EQU H'0007' 647 648 649 650;----- SSP1CON2 Bits ----------------------------------------------------- 651SEN EQU H'0000' 652RSEN EQU H'0001' 653PEN EQU H'0002' 654RCEN EQU H'0003' 655ACKEN EQU H'0004' 656ACKDT EQU H'0005' 657ACKSTAT EQU H'0006' 658GCEN EQU H'0007' 659 660 661;----- SSPCON2 Bits ----------------------------------------------------- 662SEN EQU H'0000' 663RSEN EQU H'0001' 664PEN EQU H'0002' 665RCEN EQU H'0003' 666ACKEN EQU H'0004' 667ACKDT EQU H'0005' 668ACKSTAT EQU H'0006' 669GCEN EQU H'0007' 670 671 672;----- SSP1CON3 Bits ----------------------------------------------------- 673DHEN EQU H'0000' 674AHEN EQU H'0001' 675SBCDE EQU H'0002' 676SDAHT EQU H'0003' 677BOEN EQU H'0004' 678SCIE EQU H'0005' 679PCIE EQU H'0006' 680ACKTIM EQU H'0007' 681 682 683;----- SSPCON3 Bits ----------------------------------------------------- 684DHEN EQU H'0000' 685AHEN EQU H'0001' 686SBCDE EQU H'0002' 687SDAHT EQU H'0003' 688BOEN EQU H'0004' 689SCIE EQU H'0005' 690PCIE EQU H'0006' 691ACKTIM EQU H'0007' 692 693 694;----- CCP1CON Bits ----------------------------------------------------- 695CCP1M0 EQU H'0000' 696CCP1M1 EQU H'0001' 697CCP1M2 EQU H'0002' 698CCP1M3 EQU H'0003' 699DC1B0 EQU H'0004' 700DC1B1 EQU H'0005' 701P1M0 EQU H'0006' 702P1M1 EQU H'0007' 703 704 705 706;----- PWM1CON Bits ----------------------------------------------------- 707P1DC0 EQU H'0000' 708P1DC1 EQU H'0001' 709P1DC2 EQU H'0002' 710P1DC3 EQU H'0003' 711P1DC4 EQU H'0004' 712P1DC5 EQU H'0005' 713P1DC6 EQU H'0006' 714P1RSEN EQU H'0007' 715 716 717 718;----- CCP1AS Bits ----------------------------------------------------- 719PSS1BD0 EQU H'0000' 720PSS1BD1 EQU H'0001' 721PSS1AC0 EQU H'0002' 722PSS1AC1 EQU H'0003' 723CCP1AS0 EQU H'0004' 724CCP1AS1 EQU H'0005' 725CCP1AS2 EQU H'0006' 726CCP1ASE EQU H'0007' 727 728 729 730;----- ECCP1AS Bits ----------------------------------------------------- 731PSS1BD0 EQU H'0000' 732PSS1BD1 EQU H'0001' 733PSS1AC0 EQU H'0002' 734PSS1AC1 EQU H'0003' 735CCP1AS0 EQU H'0004' 736CCP1AS1 EQU H'0005' 737CCP1AS2 EQU H'0006' 738CCP1ASE EQU H'0007' 739 740 741 742;----- PSTR1CON Bits ----------------------------------------------------- 743STR1A EQU H'0000' 744STR1B EQU H'0001' 745STR1SYNC EQU H'0004' 746 747 748;----- IOCAP Bits ----------------------------------------------------- 749IOCAP0 EQU H'0000' 750IOCAP1 EQU H'0001' 751IOCAP2 EQU H'0002' 752IOCAP3 EQU H'0003' 753IOCAP4 EQU H'0004' 754IOCAP5 EQU H'0005' 755 756 757 758;----- IOCAN Bits ----------------------------------------------------- 759IOCAN0 EQU H'0000' 760IOCAN1 EQU H'0001' 761IOCAN2 EQU H'0002' 762IOCAN3 EQU H'0003' 763IOCAN4 EQU H'0004' 764IOCAN5 EQU H'0005' 765 766 767 768;----- IOCAF Bits ----------------------------------------------------- 769IOCAF0 EQU H'0000' 770IOCAF1 EQU H'0001' 771IOCAF2 EQU H'0002' 772IOCAF3 EQU H'0003' 773IOCAF4 EQU H'0004' 774IOCAF5 EQU H'0005' 775 776 777 778;----- CLKRCON Bits ----------------------------------------------------- 779CLKRDIV0 EQU H'0000' 780CLKRDIV1 EQU H'0001' 781CLKRDIV2 EQU H'0002' 782CLKRDC0 EQU H'0003' 783CLKRDC1 EQU H'0004' 784CLKRSLR EQU H'0005' 785CLKROE EQU H'0006' 786CLKREN EQU H'0007' 787 788 789 790;----- MDCON Bits ----------------------------------------------------- 791MDBIT EQU H'0000' 792MDOUT EQU H'0003' 793MDOPOL EQU H'0004' 794MDSLR EQU H'0005' 795MDOE EQU H'0006' 796MDEN EQU H'0007' 797 798 799;----- MDSRC Bits ----------------------------------------------------- 800MDMS0 EQU H'0000' 801MDMS1 EQU H'0001' 802MDMS2 EQU H'0002' 803MDMS3 EQU H'0003' 804MDMSODIS EQU H'0007' 805 806 807 808;----- MDCARL Bits ----------------------------------------------------- 809MDCL0 EQU H'0000' 810MDCL1 EQU H'0001' 811MDCL2 EQU H'0002' 812MDCL3 EQU H'0003' 813MDCLSYNC EQU H'0005' 814MDCLPOL EQU H'0006' 815MDCLODIS EQU H'0007' 816 817 818 819;----- MDCARH Bits ----------------------------------------------------- 820MDCH0 EQU H'0000' 821MDCH1 EQU H'0001' 822MDCH2 EQU H'0002' 823MDCH3 EQU H'0003' 824MDCHSYNC EQU H'0005' 825MDCHPOL EQU H'0006' 826MDCHODIS EQU H'0007' 827 828 829 830;----- STATUS_SHAD Bits ----------------------------------------------------- 831C_SHAD EQU H'0000' 832DC_SHAD EQU H'0001' 833Z_SHAD EQU H'0002' 834 835 836 837;========================================================================== 838; 839; RAM Definitions 840; 841;========================================================================== 842 __MAXRAM H'0FFF' 843 __BADRAM H'000D'-H'0010' 844 __BADRAM H'0013'-H'0014' 845 __BADRAM H'001D' 846 __BADRAM H'008D'-H'0090' 847 __BADRAM H'0093'-H'0094' 848 __BADRAM H'009F' 849 __BADRAM H'010D'-H'0110' 850 __BADRAM H'0113'-H'0114' 851 __BADRAM H'011C' 852 __BADRAM H'011E'-H'011F' 853 __BADRAM H'018D'-H'0190' 854 __BADRAM H'0197'-H'0198' 855 __BADRAM H'01A0'-H'01EF' 856 __BADRAM H'020D'-H'0210' 857 __BADRAM H'0218'-H'021F' 858 __BADRAM H'0220'-H'026F' 859 __BADRAM H'028C'-H'0290' 860 __BADRAM H'0297'-H'029F' 861 __BADRAM H'02A0'-H'02EF' 862 __BADRAM H'030C'-H'031F' 863 __BADRAM H'0320'-H'036F' 864 __BADRAM H'038C'-H'0390' 865 __BADRAM H'0394'-H'0399' 866 __BADRAM H'039B' 867 __BADRAM H'03A0'-H'03EF' 868 __BADRAM H'040C'-H'041F' 869 __BADRAM H'0420'-H'046F' 870 __BADRAM H'048C'-H'049F' 871 __BADRAM H'04A0'-H'04EF' 872 __BADRAM H'050C'-H'051F' 873 __BADRAM H'0520'-H'056F' 874 __BADRAM H'058C'-H'059F' 875 __BADRAM H'05A0'-H'05EF' 876 __BADRAM H'060C'-H'061F' 877 __BADRAM H'0620'-H'066F' 878 __BADRAM H'068C'-H'069F' 879 __BADRAM H'06A0'-H'06EF' 880 __BADRAM H'070C'-H'071F' 881 __BADRAM H'0720'-H'076F' 882 __BADRAM H'078C'-H'079F' 883 __BADRAM H'07A0'-H'07EF' 884 __BADRAM H'080C'-H'081F' 885 __BADRAM H'0820'-H'086F' 886 __BADRAM H'088C'-H'089F' 887 __BADRAM H'08A0'-H'08EF' 888 __BADRAM H'090C'-H'091F' 889 __BADRAM H'0920'-H'096F' 890 __BADRAM H'098C'-H'099F' 891 __BADRAM H'09A0'-H'09EF' 892 __BADRAM H'0A0C'-H'0A1F' 893 __BADRAM H'0A20'-H'0A6F' 894 __BADRAM H'0A8C'-H'0A9F' 895 __BADRAM H'0AA0'-H'0AEF' 896 __BADRAM H'0B0C'-H'0B1F' 897 __BADRAM H'0B20'-H'0B6F' 898 __BADRAM H'0B8C'-H'0B9F' 899 __BADRAM H'0BA0'-H'0BEF' 900 __BADRAM H'0C0C'-H'0C1F' 901 __BADRAM H'0C20'-H'0C6F' 902 __BADRAM H'0C8C'-H'0C9F' 903 __BADRAM H'0CA0'-H'0CEF' 904 __BADRAM H'0D0C'-H'0D1F' 905 __BADRAM H'0D20'-H'0D6F' 906 __BADRAM H'0D8C'-H'0D9F' 907 __BADRAM H'0DA0'-H'0DEF' 908 __BADRAM H'0E0C'-H'0E1F' 909 __BADRAM H'0E20'-H'0E6F' 910 __BADRAM H'0E8C'-H'0E9F' 911 __BADRAM H'0EA0'-H'0EEF' 912 __BADRAM H'0F0C'-H'0F1F' 913 __BADRAM H'0F20'-H'0F6F' 914 __BADRAM H'0F8C'-H'0FE3' 915 __BADRAM H'0FEC' 916 917;========================================================================== 918; 919; Configuration Bits 920; 921; NAME Address 922; CONFIG1 8007h 923; CONFIG2 8008h 924; 925;========================================================================== 926 927; The following is an assignment of address values for all of the 928; configuration registers for the purpose of table reads 929_CONFIG1 EQU H'8007' 930_CONFIG2 EQU H'8008' 931 932;----- CONFIG1 Options -------------------------------------------------- 933_FOSC_LP EQU H'3FF8' ; LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins 934_FOSC_XT EQU H'3FF9' ; XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins 935_FOSC_HS EQU H'3FFA' ; HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins 936_FOSC_EXTRC EQU H'3FFB' ; EXTRC oscillator: External RC circuit connected to CLKIN pin 937_FOSC_INTOSC EQU H'3FFC' ; INTOSC oscillator: I/O function on CLKIN pin 938_FOSC_ECL EQU H'3FFD' ; ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin 939_FOSC_ECM EQU H'3FFE' ; ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin 940_FOSC_ECH EQU H'3FFF' ; ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin 941 942_WDTE_OFF EQU H'3FE7' ; WDT disabled 943_WDTE_SWDTEN EQU H'3FEF' ; WDT controlled by the SWDTEN bit in the WDTCON register 944_WDTE_NSLEEP EQU H'3FF7' ; WDT enabled while running and disabled in Sleep 945_WDTE_ON EQU H'3FFF' ; WDT enabled 946 947_PWRTE_ON EQU H'3FDF' ; PWRT enabled 948_PWRTE_OFF EQU H'3FFF' ; PWRT disabled 949 950_MCLRE_OFF EQU H'3FBF' ; MCLR/VPP pin function is digital input 951_MCLRE_ON EQU H'3FFF' ; MCLR/VPP pin function is MCLR 952 953_CP_ON EQU H'3F7F' ; Program memory code protection is enabled 954_CP_OFF EQU H'3FFF' ; Program memory code protection is disabled 955 956_CPD_ON EQU H'3EFF' ; Data memory code protection is enabled 957_CPD_OFF EQU H'3FFF' ; Data memory code protection is disabled 958 959_BOREN_OFF EQU H'39FF' ; Brown-out Reset disabled 960_BOREN_SBODEN EQU H'3BFF' ; Brown-out Reset controlled by the SBOREN bit in the BORCON register 961_BOREN_NSLEEP EQU H'3DFF' ; Brown-out Reset enabled while running and disabled in Sleep 962_BOREN_ON EQU H'3FFF' ; Brown-out Reset enabled 963 964_CLKOUTEN_ON EQU H'37FF' ; CLKOUT function is enabled on the CLKOUT pin 965_CLKOUTEN_OFF EQU H'3FFF' ; CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin 966 967_IESO_OFF EQU H'2FFF' ; Internal/External Switchover mode is disabled 968_IESO_ON EQU H'3FFF' ; Internal/External Switchover mode is enabled 969 970_FCMEN_OFF EQU H'1FFF' ; Fail-Safe Clock Monitor is disabled 971_FCMEN_ON EQU H'3FFF' ; Fail-Safe Clock Monitor is enabled 972 973;----- CONFIG2 Options -------------------------------------------------- 974_WRT_ALL EQU H'3FFC' ; 000h to FFFh write protected, no addresses may be modified by EECON control 975_WRT_HALF EQU H'3FFD' ; 000h to 7FFh write protected, 800h to FFFh may be modified by EECON control 976_WRT_BOOT EQU H'3FFE' ; 000h to 1FFh write protected, 200h to FFFh may be modified by EECON control 977_WRT_OFF EQU H'3FFF' ; Write protection off 978 979_PLLEN_OFF EQU H'3EFF' ; 4x PLL disabled 980_PLLEN_ON EQU H'3FFF' ; 4x PLL enabled 981 982_STVREN_OFF EQU H'3DFF' ; Stack Overflow or Underflow will not cause a Reset 983_STVREN_ON EQU H'3FFF' ; Stack Overflow or Underflow will cause a Reset 984 985_BORV_HI EQU H'3BFF' ; Brown-out Reset Voltage (Vbor), high trip point selected. 986_BORV_LO EQU H'3FFF' ; Brown-out Reset Voltage (Vbor), low trip point selected. 987_BORV_19 EQU H'3FFF' ; Brown-out Reset Voltage (Vbor), low trip point selected. 988 989;;;; Begin: Added in gputils 990_DEBUG_ON EQU H'2FFF' ; In-Circuit Debugger enabled 991_DEBUG_OFF EQU H'3FFF' ; In-Circuit Debugger disabled 992 993;;;; End: Added in gputils 994_LVP_OFF EQU H'1FFF' ; High-voltage on MCLR/VPP must be used for programming 995_LVP_ON EQU H'3FFF' ; Low-voltage programming enabled 996 997;----- DEVID Equates -------------------------------------------------- 998_DEVID1 EQU H'8006' 999 1000;----- IDLOC Equates -------------------------------------------------- 1001_IDLOC0 EQU H'8000' 1002_IDLOC1 EQU H'8001' 1003_IDLOC2 EQU H'8002' 1004_IDLOC3 EQU H'8003' 1005 1006 LIST 1007