1 /* 2 * This declarations of the PIC18F85K90 MCU. 3 * 4 * This file is part of the GNU PIC library for SDCC, originally 5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016. 6 * 7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:37 UTC. 8 * 9 * SDCC is licensed under the GNU Public license (GPL) v2. Note that 10 * this license covers the code to the compiler and other executables, 11 * but explicitly does not cover any code or objects generated by sdcc. 12 * 13 * For pic device libraries and header files which are derived from 14 * Microchip header (.inc) and linker script (.lkr) files Microchip 15 * requires that "The header files should state that they are only to be 16 * used with authentic Microchip devices" which makes them incompatible 17 * with the GPL. Pic device libraries and header files are located at 18 * non-free/lib and non-free/include directories respectively. 19 * Sdcc should be run with the --use-non-free command line option in 20 * order to include non-free header files and libraries. 21 * 22 * See http://sdcc.sourceforge.net/ for the latest information on sdcc. 23 */ 24 25 #ifndef __PIC18F85K90_H__ 26 #define __PIC18F85K90_H__ 27 28 //============================================================================== 29 30 //============================================================================== 31 // 32 // Register Definitions 33 // 34 //============================================================================== 35 36 37 //============================================================================== 38 // LCDCON Bits 39 40 extern __at(0x0EF4) __sfr LCDCON; 41 42 typedef union 43 { 44 struct 45 { 46 unsigned LMUX0 : 1; 47 unsigned LMUX1 : 1; 48 unsigned CS0 : 1; 49 unsigned CS1 : 1; 50 unsigned : 1; 51 unsigned WERR : 1; 52 unsigned SLPEN : 1; 53 unsigned LCDEN : 1; 54 }; 55 56 struct 57 { 58 unsigned LMUX : 2; 59 unsigned : 6; 60 }; 61 62 struct 63 { 64 unsigned : 2; 65 unsigned CS : 2; 66 unsigned : 4; 67 }; 68 } __LCDCONbits_t; 69 70 extern __at(0x0EF4) volatile __LCDCONbits_t LCDCONbits; 71 72 #define _LMUX0 0x01 73 #define _LMUX1 0x02 74 #define _CS0 0x04 75 #define _CS1 0x08 76 #define _WERR 0x20 77 #define _SLPEN 0x40 78 #define _LCDEN 0x80 79 80 //============================================================================== 81 82 83 //============================================================================== 84 // LCDPS Bits 85 86 extern __at(0x0EF5) __sfr LCDPS; 87 88 typedef union 89 { 90 struct 91 { 92 unsigned LP0 : 1; 93 unsigned LP1 : 1; 94 unsigned LP2 : 1; 95 unsigned LP3 : 1; 96 unsigned WA : 1; 97 unsigned LCDA : 1; 98 unsigned BIASMD : 1; 99 unsigned WFT : 1; 100 }; 101 102 struct 103 { 104 unsigned LP : 4; 105 unsigned : 4; 106 }; 107 } __LCDPSbits_t; 108 109 extern __at(0x0EF5) volatile __LCDPSbits_t LCDPSbits; 110 111 #define _LP0 0x01 112 #define _LP1 0x02 113 #define _LP2 0x04 114 #define _LP3 0x08 115 #define _WA 0x10 116 #define _LCDA 0x20 117 #define _BIASMD 0x40 118 #define _WFT 0x80 119 120 //============================================================================== 121 122 123 //============================================================================== 124 // LCDSE0 Bits 125 126 extern __at(0x0EF6) __sfr LCDSE0; 127 128 typedef struct 129 { 130 unsigned SE00 : 1; 131 unsigned SE01 : 1; 132 unsigned SE02 : 1; 133 unsigned SE03 : 1; 134 unsigned SE04 : 1; 135 unsigned SE05 : 1; 136 unsigned SE06 : 1; 137 unsigned SE07 : 1; 138 } __LCDSE0bits_t; 139 140 extern __at(0x0EF6) volatile __LCDSE0bits_t LCDSE0bits; 141 142 #define _SE00 0x01 143 #define _SE01 0x02 144 #define _SE02 0x04 145 #define _SE03 0x08 146 #define _SE04 0x10 147 #define _SE05 0x20 148 #define _SE06 0x40 149 #define _SE07 0x80 150 151 //============================================================================== 152 153 154 //============================================================================== 155 // LCDSE1 Bits 156 157 extern __at(0x0EF7) __sfr LCDSE1; 158 159 typedef struct 160 { 161 unsigned SE08 : 1; 162 unsigned SE09 : 1; 163 unsigned SE10 : 1; 164 unsigned SE11 : 1; 165 unsigned SE12 : 1; 166 unsigned SE13 : 1; 167 unsigned SE14 : 1; 168 unsigned SE15 : 1; 169 } __LCDSE1bits_t; 170 171 extern __at(0x0EF7) volatile __LCDSE1bits_t LCDSE1bits; 172 173 #define _SE08 0x01 174 #define _SE09 0x02 175 #define _SE10 0x04 176 #define _SE11 0x08 177 #define _SE12 0x10 178 #define _SE13 0x20 179 #define _SE14 0x40 180 #define _SE15 0x80 181 182 //============================================================================== 183 184 185 //============================================================================== 186 // LCDSE2 Bits 187 188 extern __at(0x0EF8) __sfr LCDSE2; 189 190 typedef struct 191 { 192 unsigned SE16 : 1; 193 unsigned SE17 : 1; 194 unsigned SE18 : 1; 195 unsigned SE19 : 1; 196 unsigned SE20 : 1; 197 unsigned SE21 : 1; 198 unsigned SE22 : 1; 199 unsigned SE23 : 1; 200 } __LCDSE2bits_t; 201 202 extern __at(0x0EF8) volatile __LCDSE2bits_t LCDSE2bits; 203 204 #define _SE16 0x01 205 #define _SE17 0x02 206 #define _SE18 0x04 207 #define _SE19 0x08 208 #define _SE20 0x10 209 #define _SE21 0x20 210 #define _SE22 0x40 211 #define _SE23 0x80 212 213 //============================================================================== 214 215 216 //============================================================================== 217 // LCDSE3 Bits 218 219 extern __at(0x0EF9) __sfr LCDSE3; 220 221 typedef struct 222 { 223 unsigned SE24 : 1; 224 unsigned SE25 : 1; 225 unsigned SE26 : 1; 226 unsigned SE27 : 1; 227 unsigned SE28 : 1; 228 unsigned SE29 : 1; 229 unsigned SE30 : 1; 230 unsigned SE31 : 1; 231 } __LCDSE3bits_t; 232 233 extern __at(0x0EF9) volatile __LCDSE3bits_t LCDSE3bits; 234 235 #define _SE24 0x01 236 #define _SE25 0x02 237 #define _SE26 0x04 238 #define _SE27 0x08 239 #define _SE28 0x10 240 #define _SE29 0x20 241 #define _SE30 0x40 242 #define _SE31 0x80 243 244 //============================================================================== 245 246 247 //============================================================================== 248 // LCDSE4 Bits 249 250 extern __at(0x0EFA) __sfr LCDSE4; 251 252 typedef struct 253 { 254 unsigned SE32 : 1; 255 unsigned SE33 : 1; 256 unsigned SE34 : 1; 257 unsigned SE35 : 1; 258 unsigned SE36 : 1; 259 unsigned SE37 : 1; 260 unsigned SE38 : 1; 261 unsigned SE39 : 1; 262 } __LCDSE4bits_t; 263 264 extern __at(0x0EFA) volatile __LCDSE4bits_t LCDSE4bits; 265 266 #define _SE32 0x01 267 #define _SE33 0x02 268 #define _SE34 0x04 269 #define _SE35 0x08 270 #define _SE36 0x10 271 #define _SE37 0x20 272 #define _SE38 0x40 273 #define _SE39 0x80 274 275 //============================================================================== 276 277 278 //============================================================================== 279 // LCDSE5 Bits 280 281 extern __at(0x0EFB) __sfr LCDSE5; 282 283 typedef struct 284 { 285 unsigned SE40 : 1; 286 unsigned SE41 : 1; 287 unsigned SE42 : 1; 288 unsigned SE43 : 1; 289 unsigned SE44 : 1; 290 unsigned SE45 : 1; 291 unsigned SE46 : 1; 292 unsigned SE47 : 1; 293 } __LCDSE5bits_t; 294 295 extern __at(0x0EFB) volatile __LCDSE5bits_t LCDSE5bits; 296 297 #define _SE40 0x01 298 #define _SE41 0x02 299 #define _SE42 0x04 300 #define _SE43 0x08 301 #define _SE44 0x10 302 #define _SE45 0x20 303 #define _SE46 0x40 304 #define _SE47 0x80 305 306 //============================================================================== 307 308 309 //============================================================================== 310 // LCDRL Bits 311 312 extern __at(0x0EFC) __sfr LCDRL; 313 314 typedef union 315 { 316 struct 317 { 318 unsigned LRLAT0 : 1; 319 unsigned LRLAT1 : 1; 320 unsigned LRLAT2 : 1; 321 unsigned LCDIRI : 1; 322 unsigned LRLBP0 : 1; 323 unsigned LRLBP1 : 1; 324 unsigned LRLAP0 : 1; 325 unsigned LRLAP1 : 1; 326 }; 327 328 struct 329 { 330 unsigned LRLAT : 3; 331 unsigned : 5; 332 }; 333 334 struct 335 { 336 unsigned : 4; 337 unsigned LRLBP : 2; 338 unsigned : 2; 339 }; 340 341 struct 342 { 343 unsigned : 6; 344 unsigned LRLAP : 2; 345 }; 346 } __LCDRLbits_t; 347 348 extern __at(0x0EFC) volatile __LCDRLbits_t LCDRLbits; 349 350 #define _LRLAT0 0x01 351 #define _LRLAT1 0x02 352 #define _LRLAT2 0x04 353 #define _LCDIRI 0x08 354 #define _LRLBP0 0x10 355 #define _LRLBP1 0x20 356 #define _LRLAP0 0x40 357 #define _LRLAP1 0x80 358 359 //============================================================================== 360 361 362 //============================================================================== 363 // LCDREF Bits 364 365 extern __at(0x0EFD) __sfr LCDREF; 366 367 typedef union 368 { 369 struct 370 { 371 unsigned VLCD1PE : 1; 372 unsigned VLCD2PE : 1; 373 unsigned VLCD3PE : 1; 374 unsigned LCDCST0 : 1; 375 unsigned LCDCST1 : 1; 376 unsigned LCDCST2 : 1; 377 unsigned LCDIRS : 1; 378 unsigned LCDIRE : 1; 379 }; 380 381 struct 382 { 383 unsigned : 3; 384 unsigned LCDCST : 3; 385 unsigned : 2; 386 }; 387 } __LCDREFbits_t; 388 389 extern __at(0x0EFD) volatile __LCDREFbits_t LCDREFbits; 390 391 #define _VLCD1PE 0x01 392 #define _VLCD2PE 0x02 393 #define _VLCD3PE 0x04 394 #define _LCDCST0 0x08 395 #define _LCDCST1 0x10 396 #define _LCDCST2 0x20 397 #define _LCDIRS 0x40 398 #define _LCDIRE 0x80 399 400 //============================================================================== 401 402 403 //============================================================================== 404 // SSP2CON2 Bits 405 406 extern __at(0x0EFE) __sfr SSP2CON2; 407 408 typedef union 409 { 410 struct 411 { 412 unsigned SEN : 1; 413 unsigned RSEN : 1; 414 unsigned PEN : 1; 415 unsigned RCEN : 1; 416 unsigned ACKEN : 1; 417 unsigned ACKDT : 1; 418 unsigned ACKSTAT : 1; 419 unsigned GCEN : 1; 420 }; 421 422 struct 423 { 424 unsigned : 1; 425 unsigned ADMSK1 : 1; 426 unsigned ADMSK2 : 1; 427 unsigned ADMSK3 : 1; 428 unsigned ADMSK4 : 1; 429 unsigned ADMSK5 : 1; 430 unsigned : 1; 431 unsigned : 1; 432 }; 433 } __SSP2CON2bits_t; 434 435 extern __at(0x0EFE) volatile __SSP2CON2bits_t SSP2CON2bits; 436 437 #define _SSP2CON2_SEN 0x01 438 #define _SSP2CON2_RSEN 0x02 439 #define _SSP2CON2_ADMSK1 0x02 440 #define _SSP2CON2_PEN 0x04 441 #define _SSP2CON2_ADMSK2 0x04 442 #define _SSP2CON2_RCEN 0x08 443 #define _SSP2CON2_ADMSK3 0x08 444 #define _SSP2CON2_ACKEN 0x10 445 #define _SSP2CON2_ADMSK4 0x10 446 #define _SSP2CON2_ACKDT 0x20 447 #define _SSP2CON2_ADMSK5 0x20 448 #define _SSP2CON2_ACKSTAT 0x40 449 #define _SSP2CON2_GCEN 0x80 450 451 //============================================================================== 452 453 454 //============================================================================== 455 // SSP2CON1 Bits 456 457 extern __at(0x0EFF) __sfr SSP2CON1; 458 459 typedef union 460 { 461 struct 462 { 463 unsigned SSPM0 : 1; 464 unsigned SSPM1 : 1; 465 unsigned SSPM2 : 1; 466 unsigned SSPM3 : 1; 467 unsigned CKP : 1; 468 unsigned SSPEN : 1; 469 unsigned SSPOV : 1; 470 unsigned WCOL : 1; 471 }; 472 473 struct 474 { 475 unsigned SSPM : 4; 476 unsigned : 4; 477 }; 478 } __SSP2CON1bits_t; 479 480 extern __at(0x0EFF) volatile __SSP2CON1bits_t SSP2CON1bits; 481 482 #define _SSP2CON1_SSPM0 0x01 483 #define _SSP2CON1_SSPM1 0x02 484 #define _SSP2CON1_SSPM2 0x04 485 #define _SSP2CON1_SSPM3 0x08 486 #define _SSP2CON1_CKP 0x10 487 #define _SSP2CON1_SSPEN 0x20 488 #define _SSP2CON1_SSPOV 0x40 489 #define _SSP2CON1_WCOL 0x80 490 491 //============================================================================== 492 493 494 //============================================================================== 495 // SSP2STAT Bits 496 497 extern __at(0x0F00) __sfr SSP2STAT; 498 499 typedef union 500 { 501 struct 502 { 503 unsigned BF : 1; 504 unsigned UA : 1; 505 unsigned R_NOT_W : 1; 506 unsigned S : 1; 507 unsigned P : 1; 508 unsigned D_NOT_A : 1; 509 unsigned CKE : 1; 510 unsigned SMP : 1; 511 }; 512 513 struct 514 { 515 unsigned : 1; 516 unsigned : 1; 517 unsigned R : 1; 518 unsigned I2C_START : 1; 519 unsigned I2C_STOP : 1; 520 unsigned D : 1; 521 unsigned : 1; 522 unsigned : 1; 523 }; 524 525 struct 526 { 527 unsigned : 1; 528 unsigned : 1; 529 unsigned R_W : 1; 530 unsigned : 1; 531 unsigned : 1; 532 unsigned D_A : 1; 533 unsigned : 1; 534 unsigned : 1; 535 }; 536 537 struct 538 { 539 unsigned : 1; 540 unsigned : 1; 541 unsigned NOT_W : 1; 542 unsigned : 1; 543 unsigned : 1; 544 unsigned NOT_A : 1; 545 unsigned : 1; 546 unsigned : 1; 547 }; 548 549 struct 550 { 551 unsigned : 1; 552 unsigned : 1; 553 unsigned NOT_WRITE : 1; 554 unsigned : 1; 555 unsigned : 1; 556 unsigned NOT_ADDRESS : 1; 557 unsigned : 1; 558 unsigned : 1; 559 }; 560 561 struct 562 { 563 unsigned : 1; 564 unsigned : 1; 565 unsigned READ_WRITE : 1; 566 unsigned : 1; 567 unsigned : 1; 568 unsigned DATA_ADDRESS : 1; 569 unsigned : 1; 570 unsigned : 1; 571 }; 572 573 struct 574 { 575 unsigned : 1; 576 unsigned : 1; 577 unsigned I2C_READ : 1; 578 unsigned : 1; 579 unsigned : 1; 580 unsigned I2C_DAT : 1; 581 unsigned : 1; 582 unsigned : 1; 583 }; 584 } __SSP2STATbits_t; 585 586 extern __at(0x0F00) volatile __SSP2STATbits_t SSP2STATbits; 587 588 #define _SSP2STAT_BF 0x01 589 #define _SSP2STAT_UA 0x02 590 #define _SSP2STAT_R_NOT_W 0x04 591 #define _SSP2STAT_R 0x04 592 #define _SSP2STAT_R_W 0x04 593 #define _SSP2STAT_NOT_W 0x04 594 #define _SSP2STAT_NOT_WRITE 0x04 595 #define _SSP2STAT_READ_WRITE 0x04 596 #define _SSP2STAT_I2C_READ 0x04 597 #define _SSP2STAT_S 0x08 598 #define _SSP2STAT_I2C_START 0x08 599 #define _SSP2STAT_P 0x10 600 #define _SSP2STAT_I2C_STOP 0x10 601 #define _SSP2STAT_D_NOT_A 0x20 602 #define _SSP2STAT_D 0x20 603 #define _SSP2STAT_D_A 0x20 604 #define _SSP2STAT_NOT_A 0x20 605 #define _SSP2STAT_NOT_ADDRESS 0x20 606 #define _SSP2STAT_DATA_ADDRESS 0x20 607 #define _SSP2STAT_I2C_DAT 0x20 608 #define _SSP2STAT_CKE 0x40 609 #define _SSP2STAT_SMP 0x80 610 611 //============================================================================== 612 613 614 //============================================================================== 615 // SSP2ADD Bits 616 617 extern __at(0x0F01) __sfr SSP2ADD; 618 619 typedef struct 620 { 621 unsigned MSK0 : 1; 622 unsigned MSK1 : 1; 623 unsigned MSK2 : 1; 624 unsigned MSK3 : 1; 625 unsigned MSK4 : 1; 626 unsigned MSK5 : 1; 627 unsigned MSK6 : 1; 628 unsigned MSK7 : 1; 629 } __SSP2ADDbits_t; 630 631 extern __at(0x0F01) volatile __SSP2ADDbits_t SSP2ADDbits; 632 633 #define _SSP2ADD_MSK0 0x01 634 #define _SSP2ADD_MSK1 0x02 635 #define _SSP2ADD_MSK2 0x04 636 #define _SSP2ADD_MSK3 0x08 637 #define _SSP2ADD_MSK4 0x10 638 #define _SSP2ADD_MSK5 0x20 639 #define _SSP2ADD_MSK6 0x40 640 #define _SSP2ADD_MSK7 0x80 641 642 //============================================================================== 643 644 extern __at(0x0F02) __sfr SSP2BUF; 645 646 //============================================================================== 647 // T4CON Bits 648 649 extern __at(0x0F03) __sfr T4CON; 650 651 typedef union 652 { 653 struct 654 { 655 unsigned T4CKPS0 : 1; 656 unsigned T4CKPS1 : 1; 657 unsigned TMR4ON : 1; 658 unsigned T4OUTPS0 : 1; 659 unsigned T4OUTPS1 : 1; 660 unsigned T4OUTPS2 : 1; 661 unsigned T4OUTPS3 : 1; 662 unsigned : 1; 663 }; 664 665 struct 666 { 667 unsigned T4CKPS : 2; 668 unsigned : 6; 669 }; 670 671 struct 672 { 673 unsigned : 3; 674 unsigned T4OUTPS : 4; 675 unsigned : 1; 676 }; 677 } __T4CONbits_t; 678 679 extern __at(0x0F03) volatile __T4CONbits_t T4CONbits; 680 681 #define _T4CKPS0 0x01 682 #define _T4CKPS1 0x02 683 #define _TMR4ON 0x04 684 #define _T4OUTPS0 0x08 685 #define _T4OUTPS1 0x10 686 #define _T4OUTPS2 0x20 687 #define _T4OUTPS3 0x40 688 689 //============================================================================== 690 691 extern __at(0x0F04) __sfr PR4; 692 extern __at(0x0F05) __sfr TMR4; 693 694 //============================================================================== 695 // CCP7CON Bits 696 697 extern __at(0x0F06) __sfr CCP7CON; 698 699 typedef union 700 { 701 struct 702 { 703 unsigned CCP7M0 : 1; 704 unsigned CCP7M1 : 1; 705 unsigned CCP7M2 : 1; 706 unsigned CCP7M3 : 1; 707 unsigned DC7B0 : 1; 708 unsigned DC7B1 : 1; 709 unsigned : 1; 710 unsigned : 1; 711 }; 712 713 struct 714 { 715 unsigned : 1; 716 unsigned : 1; 717 unsigned : 1; 718 unsigned : 1; 719 unsigned CCP7Y : 1; 720 unsigned CCP7X : 1; 721 unsigned : 1; 722 unsigned : 1; 723 }; 724 725 struct 726 { 727 unsigned CCP7M : 4; 728 unsigned : 4; 729 }; 730 731 struct 732 { 733 unsigned : 4; 734 unsigned DC7B : 2; 735 unsigned : 2; 736 }; 737 } __CCP7CONbits_t; 738 739 extern __at(0x0F06) volatile __CCP7CONbits_t CCP7CONbits; 740 741 #define _CCP7M0 0x01 742 #define _CCP7M1 0x02 743 #define _CCP7M2 0x04 744 #define _CCP7M3 0x08 745 #define _DC7B0 0x10 746 #define _CCP7Y 0x10 747 #define _DC7B1 0x20 748 #define _CCP7X 0x20 749 750 //============================================================================== 751 752 extern __at(0x0F07) __sfr CCPR7; 753 extern __at(0x0F07) __sfr CCPR7L; 754 extern __at(0x0F08) __sfr CCPR7H; 755 756 //============================================================================== 757 // CCP6CON Bits 758 759 extern __at(0x0F09) __sfr CCP6CON; 760 761 typedef union 762 { 763 struct 764 { 765 unsigned CCP6M0 : 1; 766 unsigned CCP6M1 : 1; 767 unsigned CCP6M2 : 1; 768 unsigned CCP6M3 : 1; 769 unsigned DC6B0 : 1; 770 unsigned DC6B1 : 1; 771 unsigned : 1; 772 unsigned : 1; 773 }; 774 775 struct 776 { 777 unsigned : 1; 778 unsigned : 1; 779 unsigned : 1; 780 unsigned : 1; 781 unsigned CCP6Y : 1; 782 unsigned CCP6X : 1; 783 unsigned : 1; 784 unsigned : 1; 785 }; 786 787 struct 788 { 789 unsigned CCP6M : 4; 790 unsigned : 4; 791 }; 792 793 struct 794 { 795 unsigned : 4; 796 unsigned DC6B : 2; 797 unsigned : 2; 798 }; 799 } __CCP6CONbits_t; 800 801 extern __at(0x0F09) volatile __CCP6CONbits_t CCP6CONbits; 802 803 #define _CCP6M0 0x01 804 #define _CCP6M1 0x02 805 #define _CCP6M2 0x04 806 #define _CCP6M3 0x08 807 #define _DC6B0 0x10 808 #define _CCP6Y 0x10 809 #define _DC6B1 0x20 810 #define _CCP6X 0x20 811 812 //============================================================================== 813 814 extern __at(0x0F0A) __sfr CCPR6; 815 extern __at(0x0F0A) __sfr CCPR6L; 816 extern __at(0x0F0B) __sfr CCPR6H; 817 818 //============================================================================== 819 // CCP5CON Bits 820 821 extern __at(0x0F0C) __sfr CCP5CON; 822 823 typedef union 824 { 825 struct 826 { 827 unsigned CCP5M0 : 1; 828 unsigned CCP5M1 : 1; 829 unsigned CCP5M2 : 1; 830 unsigned CCP5M3 : 1; 831 unsigned DC5B0 : 1; 832 unsigned DC5B1 : 1; 833 unsigned : 1; 834 unsigned : 1; 835 }; 836 837 struct 838 { 839 unsigned : 1; 840 unsigned : 1; 841 unsigned : 1; 842 unsigned : 1; 843 unsigned CCP5Y : 1; 844 unsigned CCP5X : 1; 845 unsigned : 1; 846 unsigned : 1; 847 }; 848 849 struct 850 { 851 unsigned CCP5M : 4; 852 unsigned : 4; 853 }; 854 855 struct 856 { 857 unsigned : 4; 858 unsigned DC5B : 2; 859 unsigned : 2; 860 }; 861 } __CCP5CONbits_t; 862 863 extern __at(0x0F0C) volatile __CCP5CONbits_t CCP5CONbits; 864 865 #define _CCP5M0 0x01 866 #define _CCP5M1 0x02 867 #define _CCP5M2 0x04 868 #define _CCP5M3 0x08 869 #define _DC5B0 0x10 870 #define _CCP5Y 0x10 871 #define _DC5B1 0x20 872 #define _CCP5X 0x20 873 874 //============================================================================== 875 876 extern __at(0x0F0D) __sfr CCPR5; 877 extern __at(0x0F0D) __sfr CCPR5L; 878 extern __at(0x0F0E) __sfr CCPR5H; 879 880 //============================================================================== 881 // CCP4CON Bits 882 883 extern __at(0x0F0F) __sfr CCP4CON; 884 885 typedef union 886 { 887 struct 888 { 889 unsigned CCP4M0 : 1; 890 unsigned CCP4M1 : 1; 891 unsigned CCP4M2 : 1; 892 unsigned CCP4M3 : 1; 893 unsigned DC4B0 : 1; 894 unsigned DC4B1 : 1; 895 unsigned : 1; 896 unsigned : 1; 897 }; 898 899 struct 900 { 901 unsigned : 1; 902 unsigned : 1; 903 unsigned : 1; 904 unsigned : 1; 905 unsigned CCP4Y : 1; 906 unsigned CCP4X : 1; 907 unsigned : 1; 908 unsigned : 1; 909 }; 910 911 struct 912 { 913 unsigned CCP4M : 4; 914 unsigned : 4; 915 }; 916 917 struct 918 { 919 unsigned : 4; 920 unsigned DC4B : 2; 921 unsigned : 2; 922 }; 923 } __CCP4CONbits_t; 924 925 extern __at(0x0F0F) volatile __CCP4CONbits_t CCP4CONbits; 926 927 #define _CCP4M0 0x01 928 #define _CCP4M1 0x02 929 #define _CCP4M2 0x04 930 #define _CCP4M3 0x08 931 #define _DC4B0 0x10 932 #define _CCP4Y 0x10 933 #define _DC4B1 0x20 934 #define _CCP4X 0x20 935 936 //============================================================================== 937 938 extern __at(0x0F10) __sfr CCPR4; 939 extern __at(0x0F10) __sfr CCPR4L; 940 extern __at(0x0F11) __sfr CCPR4H; 941 942 //============================================================================== 943 // T5GCON Bits 944 945 extern __at(0x0F12) __sfr T5GCON; 946 947 typedef union 948 { 949 struct 950 { 951 unsigned T5GSS0 : 1; 952 unsigned T5GSS1 : 1; 953 unsigned T5GVAL : 1; 954 unsigned T5GGO_NOT_T5DONE : 1; 955 unsigned T5GSPM : 1; 956 unsigned T5GTM : 1; 957 unsigned T5GPOL : 1; 958 unsigned TMR5GE : 1; 959 }; 960 961 struct 962 { 963 unsigned : 1; 964 unsigned : 1; 965 unsigned : 1; 966 unsigned T5GGO : 1; 967 unsigned : 1; 968 unsigned : 1; 969 unsigned : 1; 970 unsigned : 1; 971 }; 972 973 struct 974 { 975 unsigned : 1; 976 unsigned : 1; 977 unsigned : 1; 978 unsigned NOT_T5DONE : 1; 979 unsigned : 1; 980 unsigned : 1; 981 unsigned : 1; 982 unsigned : 1; 983 }; 984 985 struct 986 { 987 unsigned T5GSS : 2; 988 unsigned : 6; 989 }; 990 } __T5GCONbits_t; 991 992 extern __at(0x0F12) volatile __T5GCONbits_t T5GCONbits; 993 994 #define _T5GSS0 0x01 995 #define _T5GSS1 0x02 996 #define _T5GVAL 0x04 997 #define _T5GGO_NOT_T5DONE 0x08 998 #define _T5GGO 0x08 999 #define _NOT_T5DONE 0x08 1000 #define _T5GSPM 0x10 1001 #define _T5GTM 0x20 1002 #define _T5GPOL 0x40 1003 #define _TMR5GE 0x80 1004 1005 //============================================================================== 1006 1007 1008 //============================================================================== 1009 // T5CON Bits 1010 1011 extern __at(0x0F13) __sfr T5CON; 1012 1013 typedef union 1014 { 1015 struct 1016 { 1017 unsigned TMR5ON : 1; 1018 unsigned RD16 : 1; 1019 unsigned NOT_T5SYNC : 1; 1020 unsigned SOSCEN : 1; 1021 unsigned T5CKPS0 : 1; 1022 unsigned T5CKPS1 : 1; 1023 unsigned TMR5CS0 : 1; 1024 unsigned TMR5CS1 : 1; 1025 }; 1026 1027 struct 1028 { 1029 unsigned : 4; 1030 unsigned T5CKPS : 2; 1031 unsigned : 2; 1032 }; 1033 1034 struct 1035 { 1036 unsigned : 6; 1037 unsigned TMR5CS : 2; 1038 }; 1039 } __T5CONbits_t; 1040 1041 extern __at(0x0F13) volatile __T5CONbits_t T5CONbits; 1042 1043 #define _T5CON_TMR5ON 0x01 1044 #define _T5CON_RD16 0x02 1045 #define _T5CON_NOT_T5SYNC 0x04 1046 #define _T5CON_SOSCEN 0x08 1047 #define _T5CON_T5CKPS0 0x10 1048 #define _T5CON_T5CKPS1 0x20 1049 #define _T5CON_TMR5CS0 0x40 1050 #define _T5CON_TMR5CS1 0x80 1051 1052 //============================================================================== 1053 1054 extern __at(0x0F14) __sfr TMR5; 1055 extern __at(0x0F14) __sfr TMR5L; 1056 extern __at(0x0F15) __sfr TMR5H; 1057 1058 //============================================================================== 1059 // PMD3 Bits 1060 1061 extern __at(0x0F16) __sfr PMD3; 1062 1063 typedef struct 1064 { 1065 unsigned : 1; 1066 unsigned CCP4MD : 1; 1067 unsigned CCP5MD : 1; 1068 unsigned CCP6MD : 1; 1069 unsigned CCP7MD : 1; 1070 unsigned CCP8MD : 1; 1071 unsigned : 1; 1072 unsigned : 1; 1073 } __PMD3bits_t; 1074 1075 extern __at(0x0F16) volatile __PMD3bits_t PMD3bits; 1076 1077 #define _CCP4MD 0x02 1078 #define _CCP5MD 0x04 1079 #define _CCP6MD 0x08 1080 #define _CCP7MD 0x10 1081 #define _CCP8MD 0x20 1082 1083 //============================================================================== 1084 1085 1086 //============================================================================== 1087 // PMD2 Bits 1088 1089 extern __at(0x0F17) __sfr PMD2; 1090 1091 typedef struct 1092 { 1093 unsigned CMP1MD : 1; 1094 unsigned CMP2MD : 1; 1095 unsigned CMP3MD : 1; 1096 unsigned TMR5MD : 1; 1097 unsigned TMR6MD : 1; 1098 unsigned : 1; 1099 unsigned TMR8MD : 1; 1100 unsigned : 1; 1101 } __PMD2bits_t; 1102 1103 extern __at(0x0F17) volatile __PMD2bits_t PMD2bits; 1104 1105 #define _CMP1MD 0x01 1106 #define _CMP2MD 0x02 1107 #define _CMP3MD 0x04 1108 #define _TMR5MD 0x08 1109 #define _TMR6MD 0x10 1110 #define _TMR8MD 0x40 1111 1112 //============================================================================== 1113 1114 1115 //============================================================================== 1116 // PMD1 Bits 1117 1118 extern __at(0x0F18) __sfr PMD1; 1119 1120 typedef struct 1121 { 1122 unsigned : 1; 1123 unsigned TMR1MD : 1; 1124 unsigned TMR2MD : 1; 1125 unsigned TMR3MD : 1; 1126 unsigned TMR4MD : 1; 1127 unsigned RTCCMD : 1; 1128 unsigned CTMUMD : 1; 1129 unsigned : 1; 1130 } __PMD1bits_t; 1131 1132 extern __at(0x0F18) volatile __PMD1bits_t PMD1bits; 1133 1134 #define _TMR1MD 0x02 1135 #define _TMR2MD 0x04 1136 #define _TMR3MD 0x08 1137 #define _TMR4MD 0x10 1138 #define _RTCCMD 0x20 1139 #define _CTMUMD 0x40 1140 1141 //============================================================================== 1142 1143 1144 //============================================================================== 1145 // PMD0 Bits 1146 1147 extern __at(0x0F19) __sfr PMD0; 1148 1149 typedef struct 1150 { 1151 unsigned ADCMD : 1; 1152 unsigned SSP1MD : 1; 1153 unsigned SSP2MD : 1; 1154 unsigned UART1MD : 1; 1155 unsigned UART2MD : 1; 1156 unsigned CCP1MD : 1; 1157 unsigned CCP2MD : 1; 1158 unsigned CCP3MD : 1; 1159 } __PMD0bits_t; 1160 1161 extern __at(0x0F19) volatile __PMD0bits_t PMD0bits; 1162 1163 #define _ADCMD 0x01 1164 #define _SSP1MD 0x02 1165 #define _SSP2MD 0x04 1166 #define _UART1MD 0x08 1167 #define _UART2MD 0x10 1168 #define _CCP1MD 0x20 1169 #define _CCP2MD 0x40 1170 #define _CCP3MD 0x80 1171 1172 //============================================================================== 1173 1174 1175 //============================================================================== 1176 // PSTR3CON Bits 1177 1178 extern __at(0x0F1A) __sfr PSTR3CON; 1179 1180 typedef union 1181 { 1182 struct 1183 { 1184 unsigned STRA : 1; 1185 unsigned STRB : 1; 1186 unsigned STRC : 1; 1187 unsigned STRD : 1; 1188 unsigned STRSYNC : 1; 1189 unsigned : 1; 1190 unsigned CMPL0 : 1; 1191 unsigned CMPL1 : 1; 1192 }; 1193 1194 struct 1195 { 1196 unsigned : 6; 1197 unsigned CMPL : 2; 1198 }; 1199 } __PSTR3CONbits_t; 1200 1201 extern __at(0x0F1A) volatile __PSTR3CONbits_t PSTR3CONbits; 1202 1203 #define _PSTR3CON_STRA 0x01 1204 #define _PSTR3CON_STRB 0x02 1205 #define _PSTR3CON_STRC 0x04 1206 #define _PSTR3CON_STRD 0x08 1207 #define _PSTR3CON_STRSYNC 0x10 1208 #define _PSTR3CON_CMPL0 0x40 1209 #define _PSTR3CON_CMPL1 0x80 1210 1211 //============================================================================== 1212 1213 1214 //============================================================================== 1215 // PSTR2CON Bits 1216 1217 extern __at(0x0F1B) __sfr PSTR2CON; 1218 1219 typedef union 1220 { 1221 struct 1222 { 1223 unsigned STRA : 1; 1224 unsigned STRB : 1; 1225 unsigned STRC : 1; 1226 unsigned STRD : 1; 1227 unsigned STRSYNC : 1; 1228 unsigned : 1; 1229 unsigned CMPL0 : 1; 1230 unsigned CMPL1 : 1; 1231 }; 1232 1233 struct 1234 { 1235 unsigned : 6; 1236 unsigned CMPL : 2; 1237 }; 1238 } __PSTR2CONbits_t; 1239 1240 extern __at(0x0F1B) volatile __PSTR2CONbits_t PSTR2CONbits; 1241 1242 #define _PSTR2CON_STRA 0x01 1243 #define _PSTR2CON_STRB 0x02 1244 #define _PSTR2CON_STRC 0x04 1245 #define _PSTR2CON_STRD 0x08 1246 #define _PSTR2CON_STRSYNC 0x10 1247 #define _PSTR2CON_CMPL0 0x40 1248 #define _PSTR2CON_CMPL1 0x80 1249 1250 //============================================================================== 1251 1252 extern __at(0x0F1C) __sfr TXREG2; 1253 extern __at(0x0F1D) __sfr RCREG2; 1254 extern __at(0x0F1E) __sfr SPBRG2; 1255 extern __at(0x0F1F) __sfr SPBRGH2; 1256 1257 //============================================================================== 1258 // BAUDCON2 Bits 1259 1260 extern __at(0x0F20) __sfr BAUDCON2; 1261 1262 typedef struct 1263 { 1264 unsigned ABDEN : 1; 1265 unsigned WUE : 1; 1266 unsigned : 1; 1267 unsigned BRG16 : 1; 1268 unsigned TXCKP : 1; 1269 unsigned RXDTP : 1; 1270 unsigned RCIDL : 1; 1271 unsigned ABDOVF : 1; 1272 } __BAUDCON2bits_t; 1273 1274 extern __at(0x0F20) volatile __BAUDCON2bits_t BAUDCON2bits; 1275 1276 #define _BAUDCON2_ABDEN 0x01 1277 #define _BAUDCON2_WUE 0x02 1278 #define _BAUDCON2_BRG16 0x08 1279 #define _BAUDCON2_TXCKP 0x10 1280 #define _BAUDCON2_RXDTP 0x20 1281 #define _BAUDCON2_RCIDL 0x40 1282 #define _BAUDCON2_ABDOVF 0x80 1283 1284 //============================================================================== 1285 1286 1287 //============================================================================== 1288 // TXSTA2 Bits 1289 1290 extern __at(0x0F21) __sfr TXSTA2; 1291 1292 typedef union 1293 { 1294 struct 1295 { 1296 unsigned TX9D : 1; 1297 unsigned TRMT : 1; 1298 unsigned BRGH : 1; 1299 unsigned SENDB : 1; 1300 unsigned SYNC : 1; 1301 unsigned TXEN : 1; 1302 unsigned TX9 : 1; 1303 unsigned CSRC : 1; 1304 }; 1305 1306 struct 1307 { 1308 unsigned TX9D2 : 1; 1309 unsigned TRMT2 : 1; 1310 unsigned BRGH2 : 1; 1311 unsigned SENDB2 : 1; 1312 unsigned SYNC2 : 1; 1313 unsigned TXEN2 : 1; 1314 unsigned TX92 : 1; 1315 unsigned CSRC2 : 1; 1316 }; 1317 } __TXSTA2bits_t; 1318 1319 extern __at(0x0F21) volatile __TXSTA2bits_t TXSTA2bits; 1320 1321 #define _TXSTA2_TX9D 0x01 1322 #define _TXSTA2_TX9D2 0x01 1323 #define _TXSTA2_TRMT 0x02 1324 #define _TXSTA2_TRMT2 0x02 1325 #define _TXSTA2_BRGH 0x04 1326 #define _TXSTA2_BRGH2 0x04 1327 #define _TXSTA2_SENDB 0x08 1328 #define _TXSTA2_SENDB2 0x08 1329 #define _TXSTA2_SYNC 0x10 1330 #define _TXSTA2_SYNC2 0x10 1331 #define _TXSTA2_TXEN 0x20 1332 #define _TXSTA2_TXEN2 0x20 1333 #define _TXSTA2_TX9 0x40 1334 #define _TXSTA2_TX92 0x40 1335 #define _TXSTA2_CSRC 0x80 1336 #define _TXSTA2_CSRC2 0x80 1337 1338 //============================================================================== 1339 1340 1341 //============================================================================== 1342 // RCSTA2 Bits 1343 1344 extern __at(0x0F22) __sfr RCSTA2; 1345 1346 typedef union 1347 { 1348 struct 1349 { 1350 unsigned RX9D : 1; 1351 unsigned OERR : 1; 1352 unsigned FERR : 1; 1353 unsigned ADDEN : 1; 1354 unsigned CREN : 1; 1355 unsigned SREN : 1; 1356 unsigned RX9 : 1; 1357 unsigned SPEN : 1; 1358 }; 1359 1360 struct 1361 { 1362 unsigned RX9D2 : 1; 1363 unsigned OERR2 : 1; 1364 unsigned FERR2 : 1; 1365 unsigned ADDEN2 : 1; 1366 unsigned CREN2 : 1; 1367 unsigned SREN2 : 1; 1368 unsigned RX92 : 1; 1369 unsigned SPEN2 : 1; 1370 }; 1371 } __RCSTA2bits_t; 1372 1373 extern __at(0x0F22) volatile __RCSTA2bits_t RCSTA2bits; 1374 1375 #define _RCSTA2_RX9D 0x01 1376 #define _RCSTA2_RX9D2 0x01 1377 #define _RCSTA2_OERR 0x02 1378 #define _RCSTA2_OERR2 0x02 1379 #define _RCSTA2_FERR 0x04 1380 #define _RCSTA2_FERR2 0x04 1381 #define _RCSTA2_ADDEN 0x08 1382 #define _RCSTA2_ADDEN2 0x08 1383 #define _RCSTA2_CREN 0x10 1384 #define _RCSTA2_CREN2 0x10 1385 #define _RCSTA2_SREN 0x20 1386 #define _RCSTA2_SREN2 0x20 1387 #define _RCSTA2_RX9 0x40 1388 #define _RCSTA2_RX92 0x40 1389 #define _RCSTA2_SPEN 0x80 1390 #define _RCSTA2_SPEN2 0x80 1391 1392 //============================================================================== 1393 1394 1395 //============================================================================== 1396 // ANCON2 Bits 1397 1398 extern __at(0x0F23) __sfr ANCON2; 1399 1400 typedef struct 1401 { 1402 unsigned ANSEL16 : 1; 1403 unsigned ANSEL17 : 1; 1404 unsigned ANSEL18 : 1; 1405 unsigned ANSEL19 : 1; 1406 unsigned ANSEL20 : 1; 1407 unsigned ANSEL21 : 1; 1408 unsigned ANSEL22 : 1; 1409 unsigned ANSEL23 : 1; 1410 } __ANCON2bits_t; 1411 1412 extern __at(0x0F23) volatile __ANCON2bits_t ANCON2bits; 1413 1414 #define _ANSEL16 0x01 1415 #define _ANSEL17 0x02 1416 #define _ANSEL18 0x04 1417 #define _ANSEL19 0x08 1418 #define _ANSEL20 0x10 1419 #define _ANSEL21 0x20 1420 #define _ANSEL22 0x40 1421 #define _ANSEL23 0x80 1422 1423 //============================================================================== 1424 1425 1426 //============================================================================== 1427 // ANCON1 Bits 1428 1429 extern __at(0x0F24) __sfr ANCON1; 1430 1431 typedef struct 1432 { 1433 unsigned ANSEL8 : 1; 1434 unsigned ANSEL9 : 1; 1435 unsigned ANSEL10 : 1; 1436 unsigned ANSEL11 : 1; 1437 unsigned ANSEL12 : 1; 1438 unsigned ANSEL13 : 1; 1439 unsigned ANSEL14 : 1; 1440 unsigned ANSEL15 : 1; 1441 } __ANCON1bits_t; 1442 1443 extern __at(0x0F24) volatile __ANCON1bits_t ANCON1bits; 1444 1445 #define _ANSEL8 0x01 1446 #define _ANSEL9 0x02 1447 #define _ANSEL10 0x04 1448 #define _ANSEL11 0x08 1449 #define _ANSEL12 0x10 1450 #define _ANSEL13 0x20 1451 #define _ANSEL14 0x40 1452 #define _ANSEL15 0x80 1453 1454 //============================================================================== 1455 1456 1457 //============================================================================== 1458 // ANCON0 Bits 1459 1460 extern __at(0x0F25) __sfr ANCON0; 1461 1462 typedef struct 1463 { 1464 unsigned ANSEL0 : 1; 1465 unsigned ANSEL1 : 1; 1466 unsigned ANSEL2 : 1; 1467 unsigned ANSEL3 : 1; 1468 unsigned ANSEL4 : 1; 1469 unsigned ANSEL5 : 1; 1470 unsigned ANSEL6 : 1; 1471 unsigned ANSEL7 : 1; 1472 } __ANCON0bits_t; 1473 1474 extern __at(0x0F25) volatile __ANCON0bits_t ANCON0bits; 1475 1476 #define _ANSEL0 0x01 1477 #define _ANSEL1 0x02 1478 #define _ANSEL2 0x04 1479 #define _ANSEL3 0x08 1480 #define _ANSEL4 0x10 1481 #define _ANSEL5 0x20 1482 #define _ANSEL6 0x40 1483 #define _ANSEL7 0x80 1484 1485 //============================================================================== 1486 1487 1488 //============================================================================== 1489 // ODCON3 Bits 1490 1491 extern __at(0x0F27) __sfr ODCON3; 1492 1493 typedef struct 1494 { 1495 unsigned CTMUDS : 1; 1496 unsigned : 1; 1497 unsigned : 1; 1498 unsigned : 1; 1499 unsigned : 1; 1500 unsigned : 1; 1501 unsigned U1OD : 1; 1502 unsigned U2OD : 1; 1503 } __ODCON3bits_t; 1504 1505 extern __at(0x0F27) volatile __ODCON3bits_t ODCON3bits; 1506 1507 #define _CTMUDS 0x01 1508 #define _U1OD 0x40 1509 #define _U2OD 0x80 1510 1511 //============================================================================== 1512 1513 1514 //============================================================================== 1515 // ODCON2 Bits 1516 1517 extern __at(0x0F28) __sfr ODCON2; 1518 1519 typedef struct 1520 { 1521 unsigned CCP3OD : 1; 1522 unsigned CCP4OD : 1; 1523 unsigned CCP5OD : 1; 1524 unsigned CCP6OD : 1; 1525 unsigned CCP7OD : 1; 1526 unsigned CCP8OD : 1; 1527 unsigned : 1; 1528 unsigned : 1; 1529 } __ODCON2bits_t; 1530 1531 extern __at(0x0F28) volatile __ODCON2bits_t ODCON2bits; 1532 1533 #define _CCP3OD 0x01 1534 #define _CCP4OD 0x02 1535 #define _CCP5OD 0x04 1536 #define _CCP6OD 0x08 1537 #define _CCP7OD 0x10 1538 #define _CCP8OD 0x20 1539 1540 //============================================================================== 1541 1542 1543 //============================================================================== 1544 // ODCON1 Bits 1545 1546 extern __at(0x0F29) __sfr ODCON1; 1547 1548 typedef struct 1549 { 1550 unsigned SPI2OD : 1; 1551 unsigned : 1; 1552 unsigned : 1; 1553 unsigned : 1; 1554 unsigned : 1; 1555 unsigned CCP1OD : 1; 1556 unsigned CCP2OD : 1; 1557 unsigned SPI1OD : 1; 1558 } __ODCON1bits_t; 1559 1560 extern __at(0x0F29) volatile __ODCON1bits_t ODCON1bits; 1561 1562 #define _SPI2OD 0x01 1563 #define _CCP1OD 0x20 1564 #define _CCP2OD 0x40 1565 #define _SPI1OD 0x80 1566 1567 //============================================================================== 1568 1569 1570 //============================================================================== 1571 // REFOCON Bits 1572 1573 extern __at(0x0F2A) __sfr REFOCON; 1574 1575 typedef union 1576 { 1577 struct 1578 { 1579 unsigned RODIV0 : 1; 1580 unsigned RODIV1 : 1; 1581 unsigned RODIV2 : 1; 1582 unsigned RODIV3 : 1; 1583 unsigned ROSEL : 1; 1584 unsigned ROSSLP : 1; 1585 unsigned : 1; 1586 unsigned ROON : 1; 1587 }; 1588 1589 struct 1590 { 1591 unsigned RODIV : 4; 1592 unsigned : 4; 1593 }; 1594 } __REFOCONbits_t; 1595 1596 extern __at(0x0F2A) volatile __REFOCONbits_t REFOCONbits; 1597 1598 #define _RODIV0 0x01 1599 #define _RODIV1 0x02 1600 #define _RODIV2 0x04 1601 #define _RODIV3 0x08 1602 #define _ROSEL 0x10 1603 #define _ROSSLP 0x20 1604 #define _ROON 0x80 1605 1606 //============================================================================== 1607 1608 1609 //============================================================================== 1610 // CCPTMRS2 Bits 1611 1612 extern __at(0x0F2B) __sfr CCPTMRS2; 1613 1614 typedef union 1615 { 1616 struct 1617 { 1618 unsigned C8TSEL0 : 1; 1619 unsigned C8TSEL1 : 1; 1620 unsigned : 1; 1621 unsigned : 1; 1622 unsigned : 1; 1623 unsigned : 1; 1624 unsigned : 1; 1625 unsigned : 1; 1626 }; 1627 1628 struct 1629 { 1630 unsigned C8TSEL : 2; 1631 unsigned : 6; 1632 }; 1633 } __CCPTMRS2bits_t; 1634 1635 extern __at(0x0F2B) volatile __CCPTMRS2bits_t CCPTMRS2bits; 1636 1637 #define _C8TSEL0 0x01 1638 #define _C8TSEL1 0x02 1639 1640 //============================================================================== 1641 1642 1643 //============================================================================== 1644 // CCPTMRS1 Bits 1645 1646 extern __at(0x0F2C) __sfr CCPTMRS1; 1647 1648 typedef union 1649 { 1650 struct 1651 { 1652 unsigned C4TSEL0 : 1; 1653 unsigned C4TSEL1 : 1; 1654 unsigned C5TSEL0 : 1; 1655 unsigned : 1; 1656 unsigned C6TSEL0 : 1; 1657 unsigned : 1; 1658 unsigned C7TSEL0 : 1; 1659 unsigned C7TSEL1 : 1; 1660 }; 1661 1662 struct 1663 { 1664 unsigned C4TSEL : 2; 1665 unsigned : 6; 1666 }; 1667 1668 struct 1669 { 1670 unsigned : 6; 1671 unsigned C7TSEL : 2; 1672 }; 1673 } __CCPTMRS1bits_t; 1674 1675 extern __at(0x0F2C) volatile __CCPTMRS1bits_t CCPTMRS1bits; 1676 1677 #define _C4TSEL0 0x01 1678 #define _C4TSEL1 0x02 1679 #define _C5TSEL0 0x04 1680 #define _C6TSEL0 0x10 1681 #define _C7TSEL0 0x40 1682 #define _C7TSEL1 0x80 1683 1684 //============================================================================== 1685 1686 1687 //============================================================================== 1688 // CCPTMRS0 Bits 1689 1690 extern __at(0x0F2D) __sfr CCPTMRS0; 1691 1692 typedef union 1693 { 1694 struct 1695 { 1696 unsigned C1TSEL0 : 1; 1697 unsigned C1TSEL1 : 1; 1698 unsigned C1TSEL2 : 1; 1699 unsigned C2TSEL0 : 1; 1700 unsigned C2TSEL1 : 1; 1701 unsigned C2TSEL2 : 1; 1702 unsigned C3TSEL0 : 1; 1703 unsigned C3TSEL1 : 1; 1704 }; 1705 1706 struct 1707 { 1708 unsigned C1TSEL : 3; 1709 unsigned : 5; 1710 }; 1711 1712 struct 1713 { 1714 unsigned : 3; 1715 unsigned C2TSEL : 3; 1716 unsigned : 2; 1717 }; 1718 1719 struct 1720 { 1721 unsigned : 6; 1722 unsigned C3TSEL : 2; 1723 }; 1724 } __CCPTMRS0bits_t; 1725 1726 extern __at(0x0F2D) volatile __CCPTMRS0bits_t CCPTMRS0bits; 1727 1728 #define _C1TSEL0 0x01 1729 #define _C1TSEL1 0x02 1730 #define _C1TSEL2 0x04 1731 #define _C2TSEL0 0x08 1732 #define _C2TSEL1 0x10 1733 #define _C2TSEL2 0x20 1734 #define _C3TSEL0 0x40 1735 #define _C3TSEL1 0x80 1736 1737 //============================================================================== 1738 1739 1740 //============================================================================== 1741 // CM3CON Bits 1742 1743 extern __at(0x0F2E) __sfr CM3CON; 1744 1745 typedef union 1746 { 1747 struct 1748 { 1749 unsigned CCH0 : 1; 1750 unsigned CCH1 : 1; 1751 unsigned CREF : 1; 1752 unsigned EVPOL0 : 1; 1753 unsigned EVPOL1 : 1; 1754 unsigned CPOL : 1; 1755 unsigned COE : 1; 1756 unsigned CON : 1; 1757 }; 1758 1759 struct 1760 { 1761 unsigned CCH : 2; 1762 unsigned : 6; 1763 }; 1764 1765 struct 1766 { 1767 unsigned : 3; 1768 unsigned EVPOL : 2; 1769 unsigned : 3; 1770 }; 1771 } __CM3CONbits_t; 1772 1773 extern __at(0x0F2E) volatile __CM3CONbits_t CM3CONbits; 1774 1775 #define _CM3CON_CCH0 0x01 1776 #define _CM3CON_CCH1 0x02 1777 #define _CM3CON_CREF 0x04 1778 #define _CM3CON_EVPOL0 0x08 1779 #define _CM3CON_EVPOL1 0x10 1780 #define _CM3CON_CPOL 0x20 1781 #define _CM3CON_COE 0x40 1782 #define _CM3CON_CON 0x80 1783 1784 //============================================================================== 1785 1786 1787 //============================================================================== 1788 // CM3CON1 Bits 1789 1790 extern __at(0x0F2E) __sfr CM3CON1; 1791 1792 typedef union 1793 { 1794 struct 1795 { 1796 unsigned CCH0 : 1; 1797 unsigned CCH1 : 1; 1798 unsigned CREF : 1; 1799 unsigned EVPOL0 : 1; 1800 unsigned EVPOL1 : 1; 1801 unsigned CPOL : 1; 1802 unsigned COE : 1; 1803 unsigned CON : 1; 1804 }; 1805 1806 struct 1807 { 1808 unsigned CCH : 2; 1809 unsigned : 6; 1810 }; 1811 1812 struct 1813 { 1814 unsigned : 3; 1815 unsigned EVPOL : 2; 1816 unsigned : 3; 1817 }; 1818 } __CM3CON1bits_t; 1819 1820 extern __at(0x0F2E) volatile __CM3CON1bits_t CM3CON1bits; 1821 1822 #define _CM3CON1_CCH0 0x01 1823 #define _CM3CON1_CCH1 0x02 1824 #define _CM3CON1_CREF 0x04 1825 #define _CM3CON1_EVPOL0 0x08 1826 #define _CM3CON1_EVPOL1 0x10 1827 #define _CM3CON1_CPOL 0x20 1828 #define _CM3CON1_COE 0x40 1829 #define _CM3CON1_CON 0x80 1830 1831 //============================================================================== 1832 1833 1834 //============================================================================== 1835 // CM2CON Bits 1836 1837 extern __at(0x0F2F) __sfr CM2CON; 1838 1839 typedef union 1840 { 1841 struct 1842 { 1843 unsigned CCH0 : 1; 1844 unsigned CCH1 : 1; 1845 unsigned CREF : 1; 1846 unsigned EVPOL0 : 1; 1847 unsigned EVPOL1 : 1; 1848 unsigned CPOL : 1; 1849 unsigned COE : 1; 1850 unsigned CON : 1; 1851 }; 1852 1853 struct 1854 { 1855 unsigned CCH : 2; 1856 unsigned : 6; 1857 }; 1858 1859 struct 1860 { 1861 unsigned : 3; 1862 unsigned EVPOL : 2; 1863 unsigned : 3; 1864 }; 1865 } __CM2CONbits_t; 1866 1867 extern __at(0x0F2F) volatile __CM2CONbits_t CM2CONbits; 1868 1869 #define _CM2CON_CCH0 0x01 1870 #define _CM2CON_CCH1 0x02 1871 #define _CM2CON_CREF 0x04 1872 #define _CM2CON_EVPOL0 0x08 1873 #define _CM2CON_EVPOL1 0x10 1874 #define _CM2CON_CPOL 0x20 1875 #define _CM2CON_COE 0x40 1876 #define _CM2CON_CON 0x80 1877 1878 //============================================================================== 1879 1880 1881 //============================================================================== 1882 // CM2CON1 Bits 1883 1884 extern __at(0x0F2F) __sfr CM2CON1; 1885 1886 typedef union 1887 { 1888 struct 1889 { 1890 unsigned CCH0 : 1; 1891 unsigned CCH1 : 1; 1892 unsigned CREF : 1; 1893 unsigned EVPOL0 : 1; 1894 unsigned EVPOL1 : 1; 1895 unsigned CPOL : 1; 1896 unsigned COE : 1; 1897 unsigned CON : 1; 1898 }; 1899 1900 struct 1901 { 1902 unsigned CCH : 2; 1903 unsigned : 6; 1904 }; 1905 1906 struct 1907 { 1908 unsigned : 3; 1909 unsigned EVPOL : 2; 1910 unsigned : 3; 1911 }; 1912 } __CM2CON1bits_t; 1913 1914 extern __at(0x0F2F) volatile __CM2CON1bits_t CM2CON1bits; 1915 1916 #define _CM2CON1_CCH0 0x01 1917 #define _CM2CON1_CCH1 0x02 1918 #define _CM2CON1_CREF 0x04 1919 #define _CM2CON1_EVPOL0 0x08 1920 #define _CM2CON1_EVPOL1 0x10 1921 #define _CM2CON1_CPOL 0x20 1922 #define _CM2CON1_COE 0x40 1923 #define _CM2CON1_CON 0x80 1924 1925 //============================================================================== 1926 1927 1928 //============================================================================== 1929 // T8CON Bits 1930 1931 extern __at(0x0F36) __sfr T8CON; 1932 1933 typedef union 1934 { 1935 struct 1936 { 1937 unsigned T8CKPS0 : 1; 1938 unsigned T8CKPS1 : 1; 1939 unsigned TMR8ON : 1; 1940 unsigned T8OUTPS0 : 1; 1941 unsigned T8OUTPS1 : 1; 1942 unsigned T8OUTPS2 : 1; 1943 unsigned T8OUTPS3 : 1; 1944 unsigned : 1; 1945 }; 1946 1947 struct 1948 { 1949 unsigned T8CKPS : 2; 1950 unsigned : 6; 1951 }; 1952 1953 struct 1954 { 1955 unsigned : 3; 1956 unsigned T8OUTPS : 4; 1957 unsigned : 1; 1958 }; 1959 } __T8CONbits_t; 1960 1961 extern __at(0x0F36) volatile __T8CONbits_t T8CONbits; 1962 1963 #define _T8CKPS0 0x01 1964 #define _T8CKPS1 0x02 1965 #define _TMR8ON 0x04 1966 #define _T8OUTPS0 0x08 1967 #define _T8OUTPS1 0x10 1968 #define _T8OUTPS2 0x20 1969 #define _T8OUTPS3 0x40 1970 1971 //============================================================================== 1972 1973 extern __at(0x0F37) __sfr PR8; 1974 extern __at(0x0F38) __sfr TMR8; 1975 1976 //============================================================================== 1977 // T6CON Bits 1978 1979 extern __at(0x0F39) __sfr T6CON; 1980 1981 typedef union 1982 { 1983 struct 1984 { 1985 unsigned T6CKPS0 : 1; 1986 unsigned T6CKPS1 : 1; 1987 unsigned TMR6ON : 1; 1988 unsigned T6OUTPS0 : 1; 1989 unsigned T6OUTPS1 : 1; 1990 unsigned T6OUTPS2 : 1; 1991 unsigned T6OUTPS3 : 1; 1992 unsigned : 1; 1993 }; 1994 1995 struct 1996 { 1997 unsigned T6CKPS : 2; 1998 unsigned : 6; 1999 }; 2000 2001 struct 2002 { 2003 unsigned : 3; 2004 unsigned T6OUTPS : 4; 2005 unsigned : 1; 2006 }; 2007 } __T6CONbits_t; 2008 2009 extern __at(0x0F39) volatile __T6CONbits_t T6CONbits; 2010 2011 #define _T6CKPS0 0x01 2012 #define _T6CKPS1 0x02 2013 #define _TMR6ON 0x04 2014 #define _T6OUTPS0 0x08 2015 #define _T6OUTPS1 0x10 2016 #define _T6OUTPS2 0x20 2017 #define _T6OUTPS3 0x40 2018 2019 //============================================================================== 2020 2021 extern __at(0x0F3A) __sfr PR6; 2022 extern __at(0x0F3B) __sfr TMR6; 2023 2024 //============================================================================== 2025 // CCP8CON Bits 2026 2027 extern __at(0x0F46) __sfr CCP8CON; 2028 2029 typedef union 2030 { 2031 struct 2032 { 2033 unsigned CCP8M0 : 1; 2034 unsigned CCP8M1 : 1; 2035 unsigned CCP8M2 : 1; 2036 unsigned CCP8M3 : 1; 2037 unsigned DC8B0 : 1; 2038 unsigned DC8B1 : 1; 2039 unsigned : 1; 2040 unsigned : 1; 2041 }; 2042 2043 struct 2044 { 2045 unsigned : 1; 2046 unsigned : 1; 2047 unsigned : 1; 2048 unsigned : 1; 2049 unsigned CCP8Y : 1; 2050 unsigned CCP8X : 1; 2051 unsigned : 1; 2052 unsigned : 1; 2053 }; 2054 2055 struct 2056 { 2057 unsigned CCP8M : 4; 2058 unsigned : 4; 2059 }; 2060 2061 struct 2062 { 2063 unsigned : 4; 2064 unsigned DC8B : 2; 2065 unsigned : 2; 2066 }; 2067 } __CCP8CONbits_t; 2068 2069 extern __at(0x0F46) volatile __CCP8CONbits_t CCP8CONbits; 2070 2071 #define _CCP8M0 0x01 2072 #define _CCP8M1 0x02 2073 #define _CCP8M2 0x04 2074 #define _CCP8M3 0x08 2075 #define _DC8B0 0x10 2076 #define _CCP8Y 0x10 2077 #define _DC8B1 0x20 2078 #define _CCP8X 0x20 2079 2080 //============================================================================== 2081 2082 extern __at(0x0F47) __sfr CCPR8; 2083 extern __at(0x0F47) __sfr CCPR8L; 2084 extern __at(0x0F48) __sfr CCPR8H; 2085 2086 //============================================================================== 2087 // CCP3CON Bits 2088 2089 extern __at(0x0F49) __sfr CCP3CON; 2090 2091 typedef union 2092 { 2093 struct 2094 { 2095 unsigned CCP3M0 : 1; 2096 unsigned CCP3M1 : 1; 2097 unsigned CCP3M2 : 1; 2098 unsigned CCP3M3 : 1; 2099 unsigned DC3B0 : 1; 2100 unsigned DC3B1 : 1; 2101 unsigned P3M0 : 1; 2102 unsigned P3M1 : 1; 2103 }; 2104 2105 struct 2106 { 2107 unsigned : 1; 2108 unsigned : 1; 2109 unsigned : 1; 2110 unsigned : 1; 2111 unsigned CCP3Y : 1; 2112 unsigned CCP3X : 1; 2113 unsigned : 1; 2114 unsigned : 1; 2115 }; 2116 2117 struct 2118 { 2119 unsigned CCP3M : 4; 2120 unsigned : 4; 2121 }; 2122 2123 struct 2124 { 2125 unsigned : 4; 2126 unsigned DC3B : 2; 2127 unsigned : 2; 2128 }; 2129 2130 struct 2131 { 2132 unsigned : 6; 2133 unsigned P3M : 2; 2134 }; 2135 } __CCP3CONbits_t; 2136 2137 extern __at(0x0F49) volatile __CCP3CONbits_t CCP3CONbits; 2138 2139 #define _CCP3M0 0x01 2140 #define _CCP3M1 0x02 2141 #define _CCP3M2 0x04 2142 #define _CCP3M3 0x08 2143 #define _DC3B0 0x10 2144 #define _CCP3Y 0x10 2145 #define _DC3B1 0x20 2146 #define _CCP3X 0x20 2147 #define _P3M0 0x40 2148 #define _P3M1 0x80 2149 2150 //============================================================================== 2151 2152 extern __at(0x0F4A) __sfr CCPR3; 2153 extern __at(0x0F4A) __sfr CCPR3L; 2154 extern __at(0x0F4B) __sfr CCPR3H; 2155 2156 //============================================================================== 2157 // ECCP3DEL Bits 2158 2159 extern __at(0x0F4C) __sfr ECCP3DEL; 2160 2161 typedef union 2162 { 2163 struct 2164 { 2165 unsigned P3DC0 : 1; 2166 unsigned P3DC1 : 1; 2167 unsigned P3DC2 : 1; 2168 unsigned P3DC3 : 1; 2169 unsigned P3DC4 : 1; 2170 unsigned P3DC5 : 1; 2171 unsigned P3DC6 : 1; 2172 unsigned P3RSEN : 1; 2173 }; 2174 2175 struct 2176 { 2177 unsigned P3DC : 7; 2178 unsigned : 1; 2179 }; 2180 } __ECCP3DELbits_t; 2181 2182 extern __at(0x0F4C) volatile __ECCP3DELbits_t ECCP3DELbits; 2183 2184 #define _P3DC0 0x01 2185 #define _P3DC1 0x02 2186 #define _P3DC2 0x04 2187 #define _P3DC3 0x08 2188 #define _P3DC4 0x10 2189 #define _P3DC5 0x20 2190 #define _P3DC6 0x40 2191 #define _P3RSEN 0x80 2192 2193 //============================================================================== 2194 2195 2196 //============================================================================== 2197 // PWM3CON Bits 2198 2199 extern __at(0x0F4C) __sfr PWM3CON; 2200 2201 typedef union 2202 { 2203 struct 2204 { 2205 unsigned P3DC0 : 1; 2206 unsigned P3DC1 : 1; 2207 unsigned P3DC2 : 1; 2208 unsigned P3DC3 : 1; 2209 unsigned P3DC4 : 1; 2210 unsigned P3DC5 : 1; 2211 unsigned P3DC6 : 1; 2212 unsigned P3RSEN : 1; 2213 }; 2214 2215 struct 2216 { 2217 unsigned P3DC : 7; 2218 unsigned : 1; 2219 }; 2220 } __PWM3CONbits_t; 2221 2222 extern __at(0x0F4C) volatile __PWM3CONbits_t PWM3CONbits; 2223 2224 #define _PWM3CON_P3DC0 0x01 2225 #define _PWM3CON_P3DC1 0x02 2226 #define _PWM3CON_P3DC2 0x04 2227 #define _PWM3CON_P3DC3 0x08 2228 #define _PWM3CON_P3DC4 0x10 2229 #define _PWM3CON_P3DC5 0x20 2230 #define _PWM3CON_P3DC6 0x40 2231 #define _PWM3CON_P3RSEN 0x80 2232 2233 //============================================================================== 2234 2235 2236 //============================================================================== 2237 // ECCP3AS Bits 2238 2239 extern __at(0x0F4D) __sfr ECCP3AS; 2240 2241 typedef union 2242 { 2243 struct 2244 { 2245 unsigned PSS3BD0 : 1; 2246 unsigned PSS3BD1 : 1; 2247 unsigned PSS3AC0 : 1; 2248 unsigned PSS3AC1 : 1; 2249 unsigned ECCP3AS0 : 1; 2250 unsigned ECCP3AS1 : 1; 2251 unsigned ECCP3AS2 : 1; 2252 unsigned ECCP3ASE : 1; 2253 }; 2254 2255 struct 2256 { 2257 unsigned PSS3BD : 2; 2258 unsigned : 6; 2259 }; 2260 2261 struct 2262 { 2263 unsigned : 2; 2264 unsigned PSS3AC : 2; 2265 unsigned : 4; 2266 }; 2267 2268 struct 2269 { 2270 unsigned : 4; 2271 unsigned ECCP3AS : 3; 2272 unsigned : 1; 2273 }; 2274 } __ECCP3ASbits_t; 2275 2276 extern __at(0x0F4D) volatile __ECCP3ASbits_t ECCP3ASbits; 2277 2278 #define _PSS3BD0 0x01 2279 #define _PSS3BD1 0x02 2280 #define _PSS3AC0 0x04 2281 #define _PSS3AC1 0x08 2282 #define _ECCP3AS0 0x10 2283 #define _ECCP3AS1 0x20 2284 #define _ECCP3AS2 0x40 2285 #define _ECCP3ASE 0x80 2286 2287 //============================================================================== 2288 2289 2290 //============================================================================== 2291 // CCP2CON Bits 2292 2293 extern __at(0x0F4E) __sfr CCP2CON; 2294 2295 typedef union 2296 { 2297 struct 2298 { 2299 unsigned CCP2M0 : 1; 2300 unsigned CCP2M1 : 1; 2301 unsigned CCP2M2 : 1; 2302 unsigned CCP2M3 : 1; 2303 unsigned DC2B0 : 1; 2304 unsigned DC2B1 : 1; 2305 unsigned P2M0 : 1; 2306 unsigned P2M1 : 1; 2307 }; 2308 2309 struct 2310 { 2311 unsigned : 1; 2312 unsigned : 1; 2313 unsigned : 1; 2314 unsigned : 1; 2315 unsigned CCP2Y : 1; 2316 unsigned CCP2X : 1; 2317 unsigned : 1; 2318 unsigned : 1; 2319 }; 2320 2321 struct 2322 { 2323 unsigned CCP2M : 4; 2324 unsigned : 4; 2325 }; 2326 2327 struct 2328 { 2329 unsigned : 4; 2330 unsigned DC2B : 2; 2331 unsigned : 2; 2332 }; 2333 2334 struct 2335 { 2336 unsigned : 6; 2337 unsigned P2M : 2; 2338 }; 2339 } __CCP2CONbits_t; 2340 2341 extern __at(0x0F4E) volatile __CCP2CONbits_t CCP2CONbits; 2342 2343 #define _CCP2M0 0x01 2344 #define _CCP2M1 0x02 2345 #define _CCP2M2 0x04 2346 #define _CCP2M3 0x08 2347 #define _DC2B0 0x10 2348 #define _CCP2Y 0x10 2349 #define _DC2B1 0x20 2350 #define _CCP2X 0x20 2351 #define _P2M0 0x40 2352 #define _P2M1 0x80 2353 2354 //============================================================================== 2355 2356 2357 //============================================================================== 2358 // ECCP2CON Bits 2359 2360 extern __at(0x0F4E) __sfr ECCP2CON; 2361 2362 typedef union 2363 { 2364 struct 2365 { 2366 unsigned CCP2M0 : 1; 2367 unsigned CCP2M1 : 1; 2368 unsigned CCP2M2 : 1; 2369 unsigned CCP2M3 : 1; 2370 unsigned DC2B0 : 1; 2371 unsigned DC2B1 : 1; 2372 unsigned P2M0 : 1; 2373 unsigned P2M1 : 1; 2374 }; 2375 2376 struct 2377 { 2378 unsigned : 1; 2379 unsigned : 1; 2380 unsigned : 1; 2381 unsigned : 1; 2382 unsigned CCP2Y : 1; 2383 unsigned CCP2X : 1; 2384 unsigned : 1; 2385 unsigned : 1; 2386 }; 2387 2388 struct 2389 { 2390 unsigned CCP2M : 4; 2391 unsigned : 4; 2392 }; 2393 2394 struct 2395 { 2396 unsigned : 4; 2397 unsigned DC2B : 2; 2398 unsigned : 2; 2399 }; 2400 2401 struct 2402 { 2403 unsigned : 6; 2404 unsigned P2M : 2; 2405 }; 2406 } __ECCP2CONbits_t; 2407 2408 extern __at(0x0F4E) volatile __ECCP2CONbits_t ECCP2CONbits; 2409 2410 #define _ECCP2CON_CCP2M0 0x01 2411 #define _ECCP2CON_CCP2M1 0x02 2412 #define _ECCP2CON_CCP2M2 0x04 2413 #define _ECCP2CON_CCP2M3 0x08 2414 #define _ECCP2CON_DC2B0 0x10 2415 #define _ECCP2CON_CCP2Y 0x10 2416 #define _ECCP2CON_DC2B1 0x20 2417 #define _ECCP2CON_CCP2X 0x20 2418 #define _ECCP2CON_P2M0 0x40 2419 #define _ECCP2CON_P2M1 0x80 2420 2421 //============================================================================== 2422 2423 extern __at(0x0F4F) __sfr CCPR2; 2424 extern __at(0x0F4F) __sfr CCPR2L; 2425 extern __at(0x0F50) __sfr CCPR2H; 2426 2427 //============================================================================== 2428 // ECCP2DEL Bits 2429 2430 extern __at(0x0F51) __sfr ECCP2DEL; 2431 2432 typedef union 2433 { 2434 struct 2435 { 2436 unsigned P2DC0 : 1; 2437 unsigned P2DC1 : 1; 2438 unsigned P2DC2 : 1; 2439 unsigned P2DC3 : 1; 2440 unsigned P2DC4 : 1; 2441 unsigned P2DC5 : 1; 2442 unsigned P2DC6 : 1; 2443 unsigned P2RSEN : 1; 2444 }; 2445 2446 struct 2447 { 2448 unsigned P2DC : 7; 2449 unsigned : 1; 2450 }; 2451 } __ECCP2DELbits_t; 2452 2453 extern __at(0x0F51) volatile __ECCP2DELbits_t ECCP2DELbits; 2454 2455 #define _P2DC0 0x01 2456 #define _P2DC1 0x02 2457 #define _P2DC2 0x04 2458 #define _P2DC3 0x08 2459 #define _P2DC4 0x10 2460 #define _P2DC5 0x20 2461 #define _P2DC6 0x40 2462 #define _P2RSEN 0x80 2463 2464 //============================================================================== 2465 2466 2467 //============================================================================== 2468 // PWM2CON Bits 2469 2470 extern __at(0x0F51) __sfr PWM2CON; 2471 2472 typedef union 2473 { 2474 struct 2475 { 2476 unsigned P2DC0 : 1; 2477 unsigned P2DC1 : 1; 2478 unsigned P2DC2 : 1; 2479 unsigned P2DC3 : 1; 2480 unsigned P2DC4 : 1; 2481 unsigned P2DC5 : 1; 2482 unsigned P2DC6 : 1; 2483 unsigned P2RSEN : 1; 2484 }; 2485 2486 struct 2487 { 2488 unsigned P2DC : 7; 2489 unsigned : 1; 2490 }; 2491 } __PWM2CONbits_t; 2492 2493 extern __at(0x0F51) volatile __PWM2CONbits_t PWM2CONbits; 2494 2495 #define _PWM2CON_P2DC0 0x01 2496 #define _PWM2CON_P2DC1 0x02 2497 #define _PWM2CON_P2DC2 0x04 2498 #define _PWM2CON_P2DC3 0x08 2499 #define _PWM2CON_P2DC4 0x10 2500 #define _PWM2CON_P2DC5 0x20 2501 #define _PWM2CON_P2DC6 0x40 2502 #define _PWM2CON_P2RSEN 0x80 2503 2504 //============================================================================== 2505 2506 2507 //============================================================================== 2508 // ECCP2AS Bits 2509 2510 extern __at(0x0F52) __sfr ECCP2AS; 2511 2512 typedef union 2513 { 2514 struct 2515 { 2516 unsigned PSS2BD0 : 1; 2517 unsigned PSS2BD1 : 1; 2518 unsigned PSS2AC0 : 1; 2519 unsigned PSS2AC1 : 1; 2520 unsigned ECCP2AS0 : 1; 2521 unsigned ECCP2AS1 : 1; 2522 unsigned ECCP2AS2 : 1; 2523 unsigned ECCP2ASE : 1; 2524 }; 2525 2526 struct 2527 { 2528 unsigned PSS2BD : 2; 2529 unsigned : 6; 2530 }; 2531 2532 struct 2533 { 2534 unsigned : 2; 2535 unsigned PSS2AC : 2; 2536 unsigned : 4; 2537 }; 2538 2539 struct 2540 { 2541 unsigned : 4; 2542 unsigned ECCP2AS : 3; 2543 unsigned : 1; 2544 }; 2545 } __ECCP2ASbits_t; 2546 2547 extern __at(0x0F52) volatile __ECCP2ASbits_t ECCP2ASbits; 2548 2549 #define _PSS2BD0 0x01 2550 #define _PSS2BD1 0x02 2551 #define _PSS2AC0 0x04 2552 #define _PSS2AC1 0x08 2553 #define _ECCP2AS0 0x10 2554 #define _ECCP2AS1 0x20 2555 #define _ECCP2AS2 0x40 2556 #define _ECCP2ASE 0x80 2557 2558 //============================================================================== 2559 2560 2561 //============================================================================== 2562 // PADCFG1 Bits 2563 2564 extern __at(0x0F53) __sfr PADCFG1; 2565 2566 typedef union 2567 { 2568 struct 2569 { 2570 unsigned : 1; 2571 unsigned RTSECSEL0 : 1; 2572 unsigned RTSECSEL1 : 1; 2573 unsigned : 1; 2574 unsigned : 1; 2575 unsigned RJPU : 1; 2576 unsigned REPU : 1; 2577 unsigned RDPU : 1; 2578 }; 2579 2580 struct 2581 { 2582 unsigned : 1; 2583 unsigned RTSECSEL : 2; 2584 unsigned : 5; 2585 }; 2586 } __PADCFG1bits_t; 2587 2588 extern __at(0x0F53) volatile __PADCFG1bits_t PADCFG1bits; 2589 2590 #define _RTSECSEL0 0x02 2591 #define _RTSECSEL1 0x04 2592 #define _RJPU 0x20 2593 #define _REPU 0x40 2594 #define _RDPU 0x80 2595 2596 //============================================================================== 2597 2598 2599 //============================================================================== 2600 // CM1CON Bits 2601 2602 extern __at(0x0F54) __sfr CM1CON; 2603 2604 typedef union 2605 { 2606 struct 2607 { 2608 unsigned CCH0 : 1; 2609 unsigned CCH1 : 1; 2610 unsigned CREF : 1; 2611 unsigned EVPOL0 : 1; 2612 unsigned EVPOL1 : 1; 2613 unsigned CPOL : 1; 2614 unsigned COE : 1; 2615 unsigned CON : 1; 2616 }; 2617 2618 struct 2619 { 2620 unsigned CCH : 2; 2621 unsigned : 6; 2622 }; 2623 2624 struct 2625 { 2626 unsigned : 3; 2627 unsigned EVPOL : 2; 2628 unsigned : 3; 2629 }; 2630 } __CM1CONbits_t; 2631 2632 extern __at(0x0F54) volatile __CM1CONbits_t CM1CONbits; 2633 2634 #define _CCH0 0x01 2635 #define _CCH1 0x02 2636 #define _CREF 0x04 2637 #define _EVPOL0 0x08 2638 #define _EVPOL1 0x10 2639 #define _CPOL 0x20 2640 #define _COE 0x40 2641 #define _CON 0x80 2642 2643 //============================================================================== 2644 2645 2646 //============================================================================== 2647 // CM1CON1 Bits 2648 2649 extern __at(0x0F54) __sfr CM1CON1; 2650 2651 typedef union 2652 { 2653 struct 2654 { 2655 unsigned CCH0 : 1; 2656 unsigned CCH1 : 1; 2657 unsigned CREF : 1; 2658 unsigned EVPOL0 : 1; 2659 unsigned EVPOL1 : 1; 2660 unsigned CPOL : 1; 2661 unsigned COE : 1; 2662 unsigned CON : 1; 2663 }; 2664 2665 struct 2666 { 2667 unsigned CCH : 2; 2668 unsigned : 6; 2669 }; 2670 2671 struct 2672 { 2673 unsigned : 3; 2674 unsigned EVPOL : 2; 2675 unsigned : 3; 2676 }; 2677 } __CM1CON1bits_t; 2678 2679 extern __at(0x0F54) volatile __CM1CON1bits_t CM1CON1bits; 2680 2681 #define _CM1CON1_CCH0 0x01 2682 #define _CM1CON1_CCH1 0x02 2683 #define _CM1CON1_CREF 0x04 2684 #define _CM1CON1_EVPOL0 0x08 2685 #define _CM1CON1_EVPOL1 0x10 2686 #define _CM1CON1_CPOL 0x20 2687 #define _CM1CON1_COE 0x40 2688 #define _CM1CON1_CON 0x80 2689 2690 //============================================================================== 2691 2692 2693 //============================================================================== 2694 // CTMUICON Bits 2695 2696 extern __at(0x0F55) __sfr CTMUICON; 2697 2698 typedef union 2699 { 2700 struct 2701 { 2702 unsigned IRNG0 : 1; 2703 unsigned IRNG1 : 1; 2704 unsigned ITRIM0 : 1; 2705 unsigned ITRIM1 : 1; 2706 unsigned ITRIM2 : 1; 2707 unsigned ITRIM3 : 1; 2708 unsigned ITRIM4 : 1; 2709 unsigned ITRIM5 : 1; 2710 }; 2711 2712 struct 2713 { 2714 unsigned IRNG : 2; 2715 unsigned : 6; 2716 }; 2717 2718 struct 2719 { 2720 unsigned : 2; 2721 unsigned ITRIM : 6; 2722 }; 2723 } __CTMUICONbits_t; 2724 2725 extern __at(0x0F55) volatile __CTMUICONbits_t CTMUICONbits; 2726 2727 #define _IRNG0 0x01 2728 #define _IRNG1 0x02 2729 #define _ITRIM0 0x04 2730 #define _ITRIM1 0x08 2731 #define _ITRIM2 0x10 2732 #define _ITRIM3 0x20 2733 #define _ITRIM4 0x40 2734 #define _ITRIM5 0x80 2735 2736 //============================================================================== 2737 2738 2739 //============================================================================== 2740 // CTMUCONL Bits 2741 2742 extern __at(0x0F56) __sfr CTMUCONL; 2743 2744 typedef union 2745 { 2746 struct 2747 { 2748 unsigned EDG1STAT : 1; 2749 unsigned EDG2STAT : 1; 2750 unsigned EDG1SEL0 : 1; 2751 unsigned EDG1SEL1 : 1; 2752 unsigned EDG1POL : 1; 2753 unsigned EDG2SEL0 : 1; 2754 unsigned EDG2SEL1 : 1; 2755 unsigned EDG2POL : 1; 2756 }; 2757 2758 struct 2759 { 2760 unsigned : 2; 2761 unsigned EDG1SEL : 2; 2762 unsigned : 4; 2763 }; 2764 2765 struct 2766 { 2767 unsigned : 5; 2768 unsigned EDG2SEL : 2; 2769 unsigned : 1; 2770 }; 2771 } __CTMUCONLbits_t; 2772 2773 extern __at(0x0F56) volatile __CTMUCONLbits_t CTMUCONLbits; 2774 2775 #define _EDG1STAT 0x01 2776 #define _EDG2STAT 0x02 2777 #define _EDG1SEL0 0x04 2778 #define _EDG1SEL1 0x08 2779 #define _EDG1POL 0x10 2780 #define _EDG2SEL0 0x20 2781 #define _EDG2SEL1 0x40 2782 #define _EDG2POL 0x80 2783 2784 //============================================================================== 2785 2786 2787 //============================================================================== 2788 // CTMUCONH Bits 2789 2790 extern __at(0x0F57) __sfr CTMUCONH; 2791 2792 typedef struct 2793 { 2794 unsigned CTTRIG : 1; 2795 unsigned IDISSEN : 1; 2796 unsigned EDGSEQEN : 1; 2797 unsigned EDGEN : 1; 2798 unsigned TGEN : 1; 2799 unsigned CTMUSIDL : 1; 2800 unsigned : 1; 2801 unsigned CTMUEN : 1; 2802 } __CTMUCONHbits_t; 2803 2804 extern __at(0x0F57) volatile __CTMUCONHbits_t CTMUCONHbits; 2805 2806 #define _CTTRIG 0x01 2807 #define _IDISSEN 0x02 2808 #define _EDGSEQEN 0x04 2809 #define _EDGEN 0x08 2810 #define _TGEN 0x10 2811 #define _CTMUSIDL 0x20 2812 #define _CTMUEN 0x80 2813 2814 //============================================================================== 2815 2816 extern __at(0x0F58) __sfr ALRMVAL; 2817 extern __at(0x0F58) __sfr ALRMVALL; 2818 extern __at(0x0F59) __sfr ALRMVALH; 2819 2820 //============================================================================== 2821 // ALRMRPT Bits 2822 2823 extern __at(0x0F5A) __sfr ALRMRPT; 2824 2825 typedef struct 2826 { 2827 unsigned ARPT0 : 1; 2828 unsigned ARPT1 : 1; 2829 unsigned ARPT2 : 1; 2830 unsigned ARPT3 : 1; 2831 unsigned ARPT4 : 1; 2832 unsigned ARPT5 : 1; 2833 unsigned ARPT6 : 1; 2834 unsigned ARPT7 : 1; 2835 } __ALRMRPTbits_t; 2836 2837 extern __at(0x0F5A) volatile __ALRMRPTbits_t ALRMRPTbits; 2838 2839 #define _ARPT0 0x01 2840 #define _ARPT1 0x02 2841 #define _ARPT2 0x04 2842 #define _ARPT3 0x08 2843 #define _ARPT4 0x10 2844 #define _ARPT5 0x20 2845 #define _ARPT6 0x40 2846 #define _ARPT7 0x80 2847 2848 //============================================================================== 2849 2850 2851 //============================================================================== 2852 // ALRMCFG Bits 2853 2854 extern __at(0x0F5B) __sfr ALRMCFG; 2855 2856 typedef union 2857 { 2858 struct 2859 { 2860 unsigned ALRMPTR0 : 1; 2861 unsigned ALRMPTR1 : 1; 2862 unsigned AMASK0 : 1; 2863 unsigned AMASK1 : 1; 2864 unsigned AMASK2 : 1; 2865 unsigned AMASK3 : 1; 2866 unsigned CHIME : 1; 2867 unsigned ALRMEN : 1; 2868 }; 2869 2870 struct 2871 { 2872 unsigned ALRMPTR : 2; 2873 unsigned : 6; 2874 }; 2875 2876 struct 2877 { 2878 unsigned : 2; 2879 unsigned AMASK : 4; 2880 unsigned : 2; 2881 }; 2882 } __ALRMCFGbits_t; 2883 2884 extern __at(0x0F5B) volatile __ALRMCFGbits_t ALRMCFGbits; 2885 2886 #define _ALRMPTR0 0x01 2887 #define _ALRMPTR1 0x02 2888 #define _AMASK0 0x04 2889 #define _AMASK1 0x08 2890 #define _AMASK2 0x10 2891 #define _AMASK3 0x20 2892 #define _CHIME 0x40 2893 #define _ALRMEN 0x80 2894 2895 //============================================================================== 2896 2897 extern __at(0x0F5C) __sfr RTCVAL; 2898 extern __at(0x0F5C) __sfr RTCVALL; 2899 2900 //============================================================================== 2901 // RTCVALH Bits 2902 2903 extern __at(0x0F5D) __sfr RTCVALH; 2904 2905 typedef union 2906 { 2907 struct 2908 { 2909 unsigned WAITE0 : 1; 2910 unsigned WAITE1 : 1; 2911 unsigned WAITM0 : 1; 2912 unsigned WAITM1 : 1; 2913 unsigned WAITM2 : 1; 2914 unsigned WAITM3 : 1; 2915 unsigned WAITB0 : 1; 2916 unsigned WAITB1 : 1; 2917 }; 2918 2919 struct 2920 { 2921 unsigned WAITE : 2; 2922 unsigned : 6; 2923 }; 2924 2925 struct 2926 { 2927 unsigned : 2; 2928 unsigned WAITM : 4; 2929 unsigned : 2; 2930 }; 2931 2932 struct 2933 { 2934 unsigned : 6; 2935 unsigned WAITB : 2; 2936 }; 2937 } __RTCVALHbits_t; 2938 2939 extern __at(0x0F5D) volatile __RTCVALHbits_t RTCVALHbits; 2940 2941 #define _WAITE0 0x01 2942 #define _WAITE1 0x02 2943 #define _WAITM0 0x04 2944 #define _WAITM1 0x08 2945 #define _WAITM2 0x10 2946 #define _WAITM3 0x20 2947 #define _WAITB0 0x40 2948 #define _WAITB1 0x80 2949 2950 //============================================================================== 2951 2952 2953 //============================================================================== 2954 // RTCCAL Bits 2955 2956 extern __at(0x0F5E) __sfr RTCCAL; 2957 2958 typedef struct 2959 { 2960 unsigned CAL0 : 1; 2961 unsigned CAL1 : 1; 2962 unsigned CAL2 : 1; 2963 unsigned CAL3 : 1; 2964 unsigned CAL4 : 1; 2965 unsigned CAL5 : 1; 2966 unsigned CAL6 : 1; 2967 unsigned CAL7 : 1; 2968 } __RTCCALbits_t; 2969 2970 extern __at(0x0F5E) volatile __RTCCALbits_t RTCCALbits; 2971 2972 #define _CAL0 0x01 2973 #define _CAL1 0x02 2974 #define _CAL2 0x04 2975 #define _CAL3 0x08 2976 #define _CAL4 0x10 2977 #define _CAL5 0x20 2978 #define _CAL6 0x40 2979 #define _CAL7 0x80 2980 2981 //============================================================================== 2982 2983 2984 //============================================================================== 2985 // RTCCFG Bits 2986 2987 extern __at(0x0F5F) __sfr RTCCFG; 2988 2989 typedef union 2990 { 2991 struct 2992 { 2993 unsigned RTCPTR0 : 1; 2994 unsigned RTCPTR1 : 1; 2995 unsigned RTCOE : 1; 2996 unsigned HALFSEC : 1; 2997 unsigned RTCSYNC : 1; 2998 unsigned RTCWREN : 1; 2999 unsigned : 1; 3000 unsigned RTCEN : 1; 3001 }; 3002 3003 struct 3004 { 3005 unsigned RTCPTR : 2; 3006 unsigned : 6; 3007 }; 3008 } __RTCCFGbits_t; 3009 3010 extern __at(0x0F5F) volatile __RTCCFGbits_t RTCCFGbits; 3011 3012 #define _RTCPTR0 0x01 3013 #define _RTCPTR1 0x02 3014 #define _RTCOE 0x04 3015 #define _HALFSEC 0x08 3016 #define _RTCSYNC 0x10 3017 #define _RTCWREN 0x20 3018 #define _RTCEN 0x80 3019 3020 //============================================================================== 3021 3022 3023 //============================================================================== 3024 // PIE6 Bits 3025 3026 extern __at(0x0F60) __sfr PIE6; 3027 3028 typedef struct 3029 { 3030 unsigned CMP1IE : 1; 3031 unsigned CMP2IE : 1; 3032 unsigned CMP3IE : 1; 3033 unsigned : 1; 3034 unsigned EEIE : 1; 3035 unsigned : 1; 3036 unsigned : 1; 3037 unsigned : 1; 3038 } __PIE6bits_t; 3039 3040 extern __at(0x0F60) volatile __PIE6bits_t PIE6bits; 3041 3042 #define _CMP1IE 0x01 3043 #define _CMP2IE 0x02 3044 #define _CMP3IE 0x04 3045 #define _EEIE 0x10 3046 3047 //============================================================================== 3048 3049 extern __at(0x0F61) __sfr EEDATA; 3050 extern __at(0x0F62) __sfr EEADR; 3051 extern __at(0x0F63) __sfr EEADRH; 3052 3053 //============================================================================== 3054 // OSCCON2 Bits 3055 3056 extern __at(0x0F64) __sfr OSCCON2; 3057 3058 typedef struct 3059 { 3060 unsigned MFIOSEL : 1; 3061 unsigned MFIOFS : 1; 3062 unsigned : 1; 3063 unsigned SOSCGO : 1; 3064 unsigned : 1; 3065 unsigned : 1; 3066 unsigned SOSCRUN : 1; 3067 unsigned : 1; 3068 } __OSCCON2bits_t; 3069 3070 extern __at(0x0F64) volatile __OSCCON2bits_t OSCCON2bits; 3071 3072 #define _MFIOSEL 0x01 3073 #define _MFIOFS 0x02 3074 #define _SOSCGO 0x08 3075 #define _SOSCRUN 0x40 3076 3077 //============================================================================== 3078 3079 3080 //============================================================================== 3081 // BAUDCON Bits 3082 3083 extern __at(0x0F65) __sfr BAUDCON; 3084 3085 typedef struct 3086 { 3087 unsigned ABDEN : 1; 3088 unsigned WUE : 1; 3089 unsigned : 1; 3090 unsigned BRG16 : 1; 3091 unsigned TXCKP : 1; 3092 unsigned RXDTP : 1; 3093 unsigned RCIDL : 1; 3094 unsigned ABDOVF : 1; 3095 } __BAUDCONbits_t; 3096 3097 extern __at(0x0F65) volatile __BAUDCONbits_t BAUDCONbits; 3098 3099 #define _ABDEN 0x01 3100 #define _WUE 0x02 3101 #define _BRG16 0x08 3102 #define _TXCKP 0x10 3103 #define _RXDTP 0x20 3104 #define _RCIDL 0x40 3105 #define _ABDOVF 0x80 3106 3107 //============================================================================== 3108 3109 3110 //============================================================================== 3111 // BAUDCON1 Bits 3112 3113 extern __at(0x0F65) __sfr BAUDCON1; 3114 3115 typedef struct 3116 { 3117 unsigned ABDEN : 1; 3118 unsigned WUE : 1; 3119 unsigned : 1; 3120 unsigned BRG16 : 1; 3121 unsigned TXCKP : 1; 3122 unsigned RXDTP : 1; 3123 unsigned RCIDL : 1; 3124 unsigned ABDOVF : 1; 3125 } __BAUDCON1bits_t; 3126 3127 extern __at(0x0F65) volatile __BAUDCON1bits_t BAUDCON1bits; 3128 3129 #define _BAUDCON1_ABDEN 0x01 3130 #define _BAUDCON1_WUE 0x02 3131 #define _BAUDCON1_BRG16 0x08 3132 #define _BAUDCON1_TXCKP 0x10 3133 #define _BAUDCON1_RXDTP 0x20 3134 #define _BAUDCON1_RCIDL 0x40 3135 #define _BAUDCON1_ABDOVF 0x80 3136 3137 //============================================================================== 3138 3139 3140 //============================================================================== 3141 // BAUDCTL Bits 3142 3143 extern __at(0x0F65) __sfr BAUDCTL; 3144 3145 typedef struct 3146 { 3147 unsigned ABDEN : 1; 3148 unsigned WUE : 1; 3149 unsigned : 1; 3150 unsigned BRG16 : 1; 3151 unsigned TXCKP : 1; 3152 unsigned RXDTP : 1; 3153 unsigned RCIDL : 1; 3154 unsigned ABDOVF : 1; 3155 } __BAUDCTLbits_t; 3156 3157 extern __at(0x0F65) volatile __BAUDCTLbits_t BAUDCTLbits; 3158 3159 #define _BAUDCTL_ABDEN 0x01 3160 #define _BAUDCTL_WUE 0x02 3161 #define _BAUDCTL_BRG16 0x08 3162 #define _BAUDCTL_TXCKP 0x10 3163 #define _BAUDCTL_RXDTP 0x20 3164 #define _BAUDCTL_RCIDL 0x40 3165 #define _BAUDCTL_ABDOVF 0x80 3166 3167 //============================================================================== 3168 3169 3170 //============================================================================== 3171 // LCDDATA0 Bits 3172 3173 extern __at(0x0F66) __sfr LCDDATA0; 3174 3175 typedef struct 3176 { 3177 unsigned S00C0 : 1; 3178 unsigned S01C0 : 1; 3179 unsigned S02C0 : 1; 3180 unsigned S03C0 : 1; 3181 unsigned S04C0 : 1; 3182 unsigned S05C0 : 1; 3183 unsigned S06C0 : 1; 3184 unsigned S07C0 : 1; 3185 } __LCDDATA0bits_t; 3186 3187 extern __at(0x0F66) volatile __LCDDATA0bits_t LCDDATA0bits; 3188 3189 #define _S00C0 0x01 3190 #define _S01C0 0x02 3191 #define _S02C0 0x04 3192 #define _S03C0 0x08 3193 #define _S04C0 0x10 3194 #define _S05C0 0x20 3195 #define _S06C0 0x40 3196 #define _S07C0 0x80 3197 3198 //============================================================================== 3199 3200 3201 //============================================================================== 3202 // LCDDATA1 Bits 3203 3204 extern __at(0x0F67) __sfr LCDDATA1; 3205 3206 typedef struct 3207 { 3208 unsigned S08C0 : 1; 3209 unsigned S09C0 : 1; 3210 unsigned S10C0 : 1; 3211 unsigned S11C0 : 1; 3212 unsigned S12C0 : 1; 3213 unsigned S13C0 : 1; 3214 unsigned S14C0 : 1; 3215 unsigned S15C0 : 1; 3216 } __LCDDATA1bits_t; 3217 3218 extern __at(0x0F67) volatile __LCDDATA1bits_t LCDDATA1bits; 3219 3220 #define _S08C0 0x01 3221 #define _S09C0 0x02 3222 #define _S10C0 0x04 3223 #define _S11C0 0x08 3224 #define _S12C0 0x10 3225 #define _S13C0 0x20 3226 #define _S14C0 0x40 3227 #define _S15C0 0x80 3228 3229 //============================================================================== 3230 3231 3232 //============================================================================== 3233 // LCDDATA2 Bits 3234 3235 extern __at(0x0F68) __sfr LCDDATA2; 3236 3237 typedef struct 3238 { 3239 unsigned S16C0 : 1; 3240 unsigned S17C0 : 1; 3241 unsigned S18C0 : 1; 3242 unsigned S19C0 : 1; 3243 unsigned S20C0 : 1; 3244 unsigned S21C0 : 1; 3245 unsigned S22C0 : 1; 3246 unsigned S23C0 : 1; 3247 } __LCDDATA2bits_t; 3248 3249 extern __at(0x0F68) volatile __LCDDATA2bits_t LCDDATA2bits; 3250 3251 #define _S16C0 0x01 3252 #define _S17C0 0x02 3253 #define _S18C0 0x04 3254 #define _S19C0 0x08 3255 #define _S20C0 0x10 3256 #define _S21C0 0x20 3257 #define _S22C0 0x40 3258 #define _S23C0 0x80 3259 3260 //============================================================================== 3261 3262 3263 //============================================================================== 3264 // LCDDATA3 Bits 3265 3266 extern __at(0x0F69) __sfr LCDDATA3; 3267 3268 typedef struct 3269 { 3270 unsigned S24C0 : 1; 3271 unsigned S25C0 : 1; 3272 unsigned S26C0 : 1; 3273 unsigned S27C0 : 1; 3274 unsigned S28C0 : 1; 3275 unsigned S29C0 : 1; 3276 unsigned S30C0 : 1; 3277 unsigned S31C0 : 1; 3278 } __LCDDATA3bits_t; 3279 3280 extern __at(0x0F69) volatile __LCDDATA3bits_t LCDDATA3bits; 3281 3282 #define _S24C0 0x01 3283 #define _S25C0 0x02 3284 #define _S26C0 0x04 3285 #define _S27C0 0x08 3286 #define _S28C0 0x10 3287 #define _S29C0 0x20 3288 #define _S30C0 0x40 3289 #define _S31C0 0x80 3290 3291 //============================================================================== 3292 3293 3294 //============================================================================== 3295 // LCDDATA4 Bits 3296 3297 extern __at(0x0F6A) __sfr LCDDATA4; 3298 3299 typedef struct 3300 { 3301 unsigned S32C0 : 1; 3302 unsigned S33C0 : 1; 3303 unsigned S34C0 : 1; 3304 unsigned S35C0 : 1; 3305 unsigned S36C0 : 1; 3306 unsigned S37C0 : 1; 3307 unsigned S38C0 : 1; 3308 unsigned S39C0 : 1; 3309 } __LCDDATA4bits_t; 3310 3311 extern __at(0x0F6A) volatile __LCDDATA4bits_t LCDDATA4bits; 3312 3313 #define _S32C0 0x01 3314 #define _S33C0 0x02 3315 #define _S34C0 0x04 3316 #define _S35C0 0x08 3317 #define _S36C0 0x10 3318 #define _S37C0 0x20 3319 #define _S38C0 0x40 3320 #define _S39C0 0x80 3321 3322 //============================================================================== 3323 3324 3325 //============================================================================== 3326 // LCDDATA5 Bits 3327 3328 extern __at(0x0F6B) __sfr LCDDATA5; 3329 3330 typedef struct 3331 { 3332 unsigned S40C0 : 1; 3333 unsigned S41C0 : 1; 3334 unsigned S42C0 : 1; 3335 unsigned S43C0 : 1; 3336 unsigned S44C0 : 1; 3337 unsigned S45C0 : 1; 3338 unsigned S46C0 : 1; 3339 unsigned S47C0 : 1; 3340 } __LCDDATA5bits_t; 3341 3342 extern __at(0x0F6B) volatile __LCDDATA5bits_t LCDDATA5bits; 3343 3344 #define _S40C0 0x01 3345 #define _S41C0 0x02 3346 #define _S42C0 0x04 3347 #define _S43C0 0x08 3348 #define _S44C0 0x10 3349 #define _S45C0 0x20 3350 #define _S46C0 0x40 3351 #define _S47C0 0x80 3352 3353 //============================================================================== 3354 3355 3356 //============================================================================== 3357 // LCDDATA6 Bits 3358 3359 extern __at(0x0F6C) __sfr LCDDATA6; 3360 3361 typedef struct 3362 { 3363 unsigned S00C1 : 1; 3364 unsigned S01C1 : 1; 3365 unsigned S02C1 : 1; 3366 unsigned S03C1 : 1; 3367 unsigned S04C1 : 1; 3368 unsigned S05C1 : 1; 3369 unsigned S06C1 : 1; 3370 unsigned S07C1 : 1; 3371 } __LCDDATA6bits_t; 3372 3373 extern __at(0x0F6C) volatile __LCDDATA6bits_t LCDDATA6bits; 3374 3375 #define _S00C1 0x01 3376 #define _S01C1 0x02 3377 #define _S02C1 0x04 3378 #define _S03C1 0x08 3379 #define _S04C1 0x10 3380 #define _S05C1 0x20 3381 #define _S06C1 0x40 3382 #define _S07C1 0x80 3383 3384 //============================================================================== 3385 3386 3387 //============================================================================== 3388 // LCDDATA7 Bits 3389 3390 extern __at(0x0F6D) __sfr LCDDATA7; 3391 3392 typedef struct 3393 { 3394 unsigned S08C1 : 1; 3395 unsigned S09C1 : 1; 3396 unsigned S10C1 : 1; 3397 unsigned S11C1 : 1; 3398 unsigned S12C1 : 1; 3399 unsigned S13C1 : 1; 3400 unsigned S14C1 : 1; 3401 unsigned S15C1 : 1; 3402 } __LCDDATA7bits_t; 3403 3404 extern __at(0x0F6D) volatile __LCDDATA7bits_t LCDDATA7bits; 3405 3406 #define _S08C1 0x01 3407 #define _S09C1 0x02 3408 #define _S10C1 0x04 3409 #define _S11C1 0x08 3410 #define _S12C1 0x10 3411 #define _S13C1 0x20 3412 #define _S14C1 0x40 3413 #define _S15C1 0x80 3414 3415 //============================================================================== 3416 3417 3418 //============================================================================== 3419 // LCDDATA8 Bits 3420 3421 extern __at(0x0F6E) __sfr LCDDATA8; 3422 3423 typedef struct 3424 { 3425 unsigned S16C1 : 1; 3426 unsigned S17C1 : 1; 3427 unsigned S18C1 : 1; 3428 unsigned S19C1 : 1; 3429 unsigned S20C1 : 1; 3430 unsigned S21C1 : 1; 3431 unsigned S22C1 : 1; 3432 unsigned S23C1 : 1; 3433 } __LCDDATA8bits_t; 3434 3435 extern __at(0x0F6E) volatile __LCDDATA8bits_t LCDDATA8bits; 3436 3437 #define _S16C1 0x01 3438 #define _S17C1 0x02 3439 #define _S18C1 0x04 3440 #define _S19C1 0x08 3441 #define _S20C1 0x10 3442 #define _S21C1 0x20 3443 #define _S22C1 0x40 3444 #define _S23C1 0x80 3445 3446 //============================================================================== 3447 3448 3449 //============================================================================== 3450 // LCDDATA9 Bits 3451 3452 extern __at(0x0F6F) __sfr LCDDATA9; 3453 3454 typedef struct 3455 { 3456 unsigned S24C1 : 1; 3457 unsigned S25C1 : 1; 3458 unsigned S26C1 : 1; 3459 unsigned S27C1 : 1; 3460 unsigned S28C1 : 1; 3461 unsigned S29C1 : 1; 3462 unsigned S30C1 : 1; 3463 unsigned S31C1 : 1; 3464 } __LCDDATA9bits_t; 3465 3466 extern __at(0x0F6F) volatile __LCDDATA9bits_t LCDDATA9bits; 3467 3468 #define _S24C1 0x01 3469 #define _S25C1 0x02 3470 #define _S26C1 0x04 3471 #define _S27C1 0x08 3472 #define _S28C1 0x10 3473 #define _S29C1 0x20 3474 #define _S30C1 0x40 3475 #define _S31C1 0x80 3476 3477 //============================================================================== 3478 3479 3480 //============================================================================== 3481 // LCDDATA10 Bits 3482 3483 extern __at(0x0F70) __sfr LCDDATA10; 3484 3485 typedef struct 3486 { 3487 unsigned S32C1 : 1; 3488 unsigned S33C1 : 1; 3489 unsigned S34C1 : 1; 3490 unsigned S35C1 : 1; 3491 unsigned S36C1 : 1; 3492 unsigned S37C1 : 1; 3493 unsigned S38C1 : 1; 3494 unsigned S39C1 : 1; 3495 } __LCDDATA10bits_t; 3496 3497 extern __at(0x0F70) volatile __LCDDATA10bits_t LCDDATA10bits; 3498 3499 #define _S32C1 0x01 3500 #define _S33C1 0x02 3501 #define _S34C1 0x04 3502 #define _S35C1 0x08 3503 #define _S36C1 0x10 3504 #define _S37C1 0x20 3505 #define _S38C1 0x40 3506 #define _S39C1 0x80 3507 3508 //============================================================================== 3509 3510 3511 //============================================================================== 3512 // LCDDATA11 Bits 3513 3514 extern __at(0x0F71) __sfr LCDDATA11; 3515 3516 typedef struct 3517 { 3518 unsigned S40C1 : 1; 3519 unsigned S41C1 : 1; 3520 unsigned S42C1 : 1; 3521 unsigned S43C1 : 1; 3522 unsigned S44C1 : 1; 3523 unsigned S45C1 : 1; 3524 unsigned S46C1 : 1; 3525 unsigned S47C1 : 1; 3526 } __LCDDATA11bits_t; 3527 3528 extern __at(0x0F71) volatile __LCDDATA11bits_t LCDDATA11bits; 3529 3530 #define _S40C1 0x01 3531 #define _S41C1 0x02 3532 #define _S42C1 0x04 3533 #define _S43C1 0x08 3534 #define _S44C1 0x10 3535 #define _S45C1 0x20 3536 #define _S46C1 0x40 3537 #define _S47C1 0x80 3538 3539 //============================================================================== 3540 3541 3542 //============================================================================== 3543 // LCDDATA12 Bits 3544 3545 extern __at(0x0F72) __sfr LCDDATA12; 3546 3547 typedef struct 3548 { 3549 unsigned S00C2 : 1; 3550 unsigned S01C2 : 1; 3551 unsigned S02C2 : 1; 3552 unsigned S03C2 : 1; 3553 unsigned S04C2 : 1; 3554 unsigned S05C2 : 1; 3555 unsigned S06C2 : 1; 3556 unsigned S07C2 : 1; 3557 } __LCDDATA12bits_t; 3558 3559 extern __at(0x0F72) volatile __LCDDATA12bits_t LCDDATA12bits; 3560 3561 #define _S00C2 0x01 3562 #define _S01C2 0x02 3563 #define _S02C2 0x04 3564 #define _S03C2 0x08 3565 #define _S04C2 0x10 3566 #define _S05C2 0x20 3567 #define _S06C2 0x40 3568 #define _S07C2 0x80 3569 3570 //============================================================================== 3571 3572 3573 //============================================================================== 3574 // LCDDATA13 Bits 3575 3576 extern __at(0x0F73) __sfr LCDDATA13; 3577 3578 typedef struct 3579 { 3580 unsigned S08C2 : 1; 3581 unsigned S09C2 : 1; 3582 unsigned S10C2 : 1; 3583 unsigned S11C2 : 1; 3584 unsigned S12C2 : 1; 3585 unsigned S13C2 : 1; 3586 unsigned S14C2 : 1; 3587 unsigned S15C2 : 1; 3588 } __LCDDATA13bits_t; 3589 3590 extern __at(0x0F73) volatile __LCDDATA13bits_t LCDDATA13bits; 3591 3592 #define _S08C2 0x01 3593 #define _S09C2 0x02 3594 #define _S10C2 0x04 3595 #define _S11C2 0x08 3596 #define _S12C2 0x10 3597 #define _S13C2 0x20 3598 #define _S14C2 0x40 3599 #define _S15C2 0x80 3600 3601 //============================================================================== 3602 3603 3604 //============================================================================== 3605 // LCDDATA14 Bits 3606 3607 extern __at(0x0F74) __sfr LCDDATA14; 3608 3609 typedef struct 3610 { 3611 unsigned S16C2 : 1; 3612 unsigned S17C2 : 1; 3613 unsigned S18C2 : 1; 3614 unsigned S19C2 : 1; 3615 unsigned S20C2 : 1; 3616 unsigned S21C2 : 1; 3617 unsigned S22C2 : 1; 3618 unsigned S23C2 : 1; 3619 } __LCDDATA14bits_t; 3620 3621 extern __at(0x0F74) volatile __LCDDATA14bits_t LCDDATA14bits; 3622 3623 #define _S16C2 0x01 3624 #define _S17C2 0x02 3625 #define _S18C2 0x04 3626 #define _S19C2 0x08 3627 #define _S20C2 0x10 3628 #define _S21C2 0x20 3629 #define _S22C2 0x40 3630 #define _S23C2 0x80 3631 3632 //============================================================================== 3633 3634 3635 //============================================================================== 3636 // LCDDATA15 Bits 3637 3638 extern __at(0x0F75) __sfr LCDDATA15; 3639 3640 typedef struct 3641 { 3642 unsigned S24C2 : 1; 3643 unsigned S25C2 : 1; 3644 unsigned S26C2 : 1; 3645 unsigned S27C2 : 1; 3646 unsigned S28C2 : 1; 3647 unsigned S29C2 : 1; 3648 unsigned S30C2 : 1; 3649 unsigned S31C2 : 1; 3650 } __LCDDATA15bits_t; 3651 3652 extern __at(0x0F75) volatile __LCDDATA15bits_t LCDDATA15bits; 3653 3654 #define _S24C2 0x01 3655 #define _S25C2 0x02 3656 #define _S26C2 0x04 3657 #define _S27C2 0x08 3658 #define _S28C2 0x10 3659 #define _S29C2 0x20 3660 #define _S30C2 0x40 3661 #define _S31C2 0x80 3662 3663 //============================================================================== 3664 3665 3666 //============================================================================== 3667 // LCDDATA16 Bits 3668 3669 extern __at(0x0F76) __sfr LCDDATA16; 3670 3671 typedef struct 3672 { 3673 unsigned S32C2 : 1; 3674 unsigned S33C2 : 1; 3675 unsigned S34C2 : 1; 3676 unsigned S35C2 : 1; 3677 unsigned S36C2 : 1; 3678 unsigned S37C2 : 1; 3679 unsigned S38C2 : 1; 3680 unsigned S39C2 : 1; 3681 } __LCDDATA16bits_t; 3682 3683 extern __at(0x0F76) volatile __LCDDATA16bits_t LCDDATA16bits; 3684 3685 #define _S32C2 0x01 3686 #define _S33C2 0x02 3687 #define _S34C2 0x04 3688 #define _S35C2 0x08 3689 #define _S36C2 0x10 3690 #define _S37C2 0x20 3691 #define _S38C2 0x40 3692 #define _S39C2 0x80 3693 3694 //============================================================================== 3695 3696 3697 //============================================================================== 3698 // LCDDATA17 Bits 3699 3700 extern __at(0x0F77) __sfr LCDDATA17; 3701 3702 typedef struct 3703 { 3704 unsigned S40C2 : 1; 3705 unsigned S41C2 : 1; 3706 unsigned S42C2 : 1; 3707 unsigned S43C2 : 1; 3708 unsigned S44C2 : 1; 3709 unsigned S45C2 : 1; 3710 unsigned S46C2 : 1; 3711 unsigned S47C2 : 1; 3712 } __LCDDATA17bits_t; 3713 3714 extern __at(0x0F77) volatile __LCDDATA17bits_t LCDDATA17bits; 3715 3716 #define _S40C2 0x01 3717 #define _S41C2 0x02 3718 #define _S42C2 0x04 3719 #define _S43C2 0x08 3720 #define _S44C2 0x10 3721 #define _S45C2 0x20 3722 #define _S46C2 0x40 3723 #define _S47C2 0x80 3724 3725 //============================================================================== 3726 3727 3728 //============================================================================== 3729 // LCDDATA18 Bits 3730 3731 extern __at(0x0F78) __sfr LCDDATA18; 3732 3733 typedef struct 3734 { 3735 unsigned S00C3 : 1; 3736 unsigned S01C3 : 1; 3737 unsigned S02C3 : 1; 3738 unsigned S03C3 : 1; 3739 unsigned S04C3 : 1; 3740 unsigned S05C3 : 1; 3741 unsigned S06C3 : 1; 3742 unsigned S07C3 : 1; 3743 } __LCDDATA18bits_t; 3744 3745 extern __at(0x0F78) volatile __LCDDATA18bits_t LCDDATA18bits; 3746 3747 #define _S00C3 0x01 3748 #define _S01C3 0x02 3749 #define _S02C3 0x04 3750 #define _S03C3 0x08 3751 #define _S04C3 0x10 3752 #define _S05C3 0x20 3753 #define _S06C3 0x40 3754 #define _S07C3 0x80 3755 3756 //============================================================================== 3757 3758 3759 //============================================================================== 3760 // LCDDATA19 Bits 3761 3762 extern __at(0x0F79) __sfr LCDDATA19; 3763 3764 typedef struct 3765 { 3766 unsigned S08C3 : 1; 3767 unsigned S09C3 : 1; 3768 unsigned S10C3 : 1; 3769 unsigned S11C3 : 1; 3770 unsigned S12C3 : 1; 3771 unsigned S13C3 : 1; 3772 unsigned S14C3 : 1; 3773 unsigned S15C3 : 1; 3774 } __LCDDATA19bits_t; 3775 3776 extern __at(0x0F79) volatile __LCDDATA19bits_t LCDDATA19bits; 3777 3778 #define _S08C3 0x01 3779 #define _S09C3 0x02 3780 #define _S10C3 0x04 3781 #define _S11C3 0x08 3782 #define _S12C3 0x10 3783 #define _S13C3 0x20 3784 #define _S14C3 0x40 3785 #define _S15C3 0x80 3786 3787 //============================================================================== 3788 3789 3790 //============================================================================== 3791 // LCDDATA20 Bits 3792 3793 extern __at(0x0F7A) __sfr LCDDATA20; 3794 3795 typedef struct 3796 { 3797 unsigned S16C3 : 1; 3798 unsigned S17C3 : 1; 3799 unsigned S18C3 : 1; 3800 unsigned S19C3 : 1; 3801 unsigned S20C3 : 1; 3802 unsigned S21C3 : 1; 3803 unsigned S22C3 : 1; 3804 unsigned S23C3 : 1; 3805 } __LCDDATA20bits_t; 3806 3807 extern __at(0x0F7A) volatile __LCDDATA20bits_t LCDDATA20bits; 3808 3809 #define _S16C3 0x01 3810 #define _S17C3 0x02 3811 #define _S18C3 0x04 3812 #define _S19C3 0x08 3813 #define _S20C3 0x10 3814 #define _S21C3 0x20 3815 #define _S22C3 0x40 3816 #define _S23C3 0x80 3817 3818 //============================================================================== 3819 3820 3821 //============================================================================== 3822 // LCDDATA21 Bits 3823 3824 extern __at(0x0F7B) __sfr LCDDATA21; 3825 3826 typedef struct 3827 { 3828 unsigned S24C3 : 1; 3829 unsigned S25C3 : 1; 3830 unsigned S26C3 : 1; 3831 unsigned S27C3 : 1; 3832 unsigned S28C3 : 1; 3833 unsigned S29C3 : 1; 3834 unsigned S30C3 : 1; 3835 unsigned S31C3 : 1; 3836 } __LCDDATA21bits_t; 3837 3838 extern __at(0x0F7B) volatile __LCDDATA21bits_t LCDDATA21bits; 3839 3840 #define _S24C3 0x01 3841 #define _S25C3 0x02 3842 #define _S26C3 0x04 3843 #define _S27C3 0x08 3844 #define _S28C3 0x10 3845 #define _S29C3 0x20 3846 #define _S30C3 0x40 3847 #define _S31C3 0x80 3848 3849 //============================================================================== 3850 3851 3852 //============================================================================== 3853 // LCDDATA22 Bits 3854 3855 extern __at(0x0F7C) __sfr LCDDATA22; 3856 3857 typedef struct 3858 { 3859 unsigned S32C3 : 1; 3860 unsigned S33C3 : 1; 3861 unsigned S34C3 : 1; 3862 unsigned S35C3 : 1; 3863 unsigned S36C3 : 1; 3864 unsigned S37C3 : 1; 3865 unsigned S38C3 : 1; 3866 unsigned S39C3 : 1; 3867 } __LCDDATA22bits_t; 3868 3869 extern __at(0x0F7C) volatile __LCDDATA22bits_t LCDDATA22bits; 3870 3871 #define _S32C3 0x01 3872 #define _S33C3 0x02 3873 #define _S34C3 0x04 3874 #define _S35C3 0x08 3875 #define _S36C3 0x10 3876 #define _S37C3 0x20 3877 #define _S38C3 0x40 3878 #define _S39C3 0x80 3879 3880 //============================================================================== 3881 3882 3883 //============================================================================== 3884 // LCDDATA23 Bits 3885 3886 extern __at(0x0F7D) __sfr LCDDATA23; 3887 3888 typedef struct 3889 { 3890 unsigned S40C3 : 1; 3891 unsigned S41C3 : 1; 3892 unsigned S42C3 : 1; 3893 unsigned S43C3 : 1; 3894 unsigned S44C3 : 1; 3895 unsigned S45C3 : 1; 3896 unsigned S46C3 : 1; 3897 unsigned S47C3 : 1; 3898 } __LCDDATA23bits_t; 3899 3900 extern __at(0x0F7D) volatile __LCDDATA23bits_t LCDDATA23bits; 3901 3902 #define _S40C3 0x01 3903 #define _S41C3 0x02 3904 #define _S42C3 0x04 3905 #define _S43C3 0x08 3906 #define _S44C3 0x10 3907 #define _S45C3 0x20 3908 #define _S46C3 0x40 3909 #define _S47C3 0x80 3910 3911 //============================================================================== 3912 3913 extern __at(0x0F7E) __sfr EECON2; 3914 3915 //============================================================================== 3916 // EECON1 Bits 3917 3918 extern __at(0x0F7F) __sfr EECON1; 3919 3920 typedef struct 3921 { 3922 unsigned RD : 1; 3923 unsigned WR : 1; 3924 unsigned WREN : 1; 3925 unsigned WRERR : 1; 3926 unsigned FREE : 1; 3927 unsigned : 1; 3928 unsigned CFGS : 1; 3929 unsigned EEPGD : 1; 3930 } __EECON1bits_t; 3931 3932 extern __at(0x0F7F) volatile __EECON1bits_t EECON1bits; 3933 3934 #define _RD 0x01 3935 #define _WR 0x02 3936 #define _WREN 0x04 3937 #define _WRERR 0x08 3938 #define _FREE 0x10 3939 #define _CFGS 0x40 3940 #define _EEPGD 0x80 3941 3942 //============================================================================== 3943 3944 3945 //============================================================================== 3946 // PORTA Bits 3947 3948 extern __at(0x0F80) __sfr PORTA; 3949 3950 typedef union 3951 { 3952 struct 3953 { 3954 unsigned RA0 : 1; 3955 unsigned RA1 : 1; 3956 unsigned RA2 : 1; 3957 unsigned RA3 : 1; 3958 unsigned RA4 : 1; 3959 unsigned RA5 : 1; 3960 unsigned RA6 : 1; 3961 unsigned RA7 : 1; 3962 }; 3963 3964 struct 3965 { 3966 unsigned AN0 : 1; 3967 unsigned AN1 : 1; 3968 unsigned AN2 : 1; 3969 unsigned AN3 : 1; 3970 unsigned SEG14 : 1; 3971 unsigned AN4 : 1; 3972 unsigned OSC2 : 1; 3973 unsigned OSC1 : 1; 3974 }; 3975 3976 struct 3977 { 3978 unsigned ULPWUIN : 1; 3979 unsigned SEG18 : 1; 3980 unsigned VREF_MINUS : 1; 3981 unsigned VREF_PLUS : 1; 3982 unsigned T0CKI : 1; 3983 unsigned SEG15 : 1; 3984 unsigned CLKO : 1; 3985 unsigned CLKI : 1; 3986 }; 3987 3988 struct 3989 { 3990 unsigned : 1; 3991 unsigned : 1; 3992 unsigned : 1; 3993 unsigned : 1; 3994 unsigned : 1; 3995 unsigned T1CKI : 1; 3996 unsigned : 1; 3997 unsigned : 1; 3998 }; 3999 4000 struct 4001 { 4002 unsigned : 1; 4003 unsigned : 1; 4004 unsigned : 1; 4005 unsigned : 1; 4006 unsigned : 1; 4007 unsigned T3G : 1; 4008 unsigned : 1; 4009 unsigned : 1; 4010 }; 4011 4012 struct 4013 { 4014 unsigned : 1; 4015 unsigned : 1; 4016 unsigned : 1; 4017 unsigned : 1; 4018 unsigned : 1; 4019 unsigned LVDIN : 1; 4020 unsigned : 1; 4021 unsigned : 1; 4022 }; 4023 } __PORTAbits_t; 4024 4025 extern __at(0x0F80) volatile __PORTAbits_t PORTAbits; 4026 4027 #define _RA0 0x01 4028 #define _AN0 0x01 4029 #define _ULPWUIN 0x01 4030 #define _RA1 0x02 4031 #define _AN1 0x02 4032 #define _SEG18 0x02 4033 #define _RA2 0x04 4034 #define _AN2 0x04 4035 #define _VREF_MINUS 0x04 4036 #define _RA3 0x08 4037 #define _AN3 0x08 4038 #define _VREF_PLUS 0x08 4039 #define _RA4 0x10 4040 #define _SEG14 0x10 4041 #define _T0CKI 0x10 4042 #define _RA5 0x20 4043 #define _AN4 0x20 4044 #define _SEG15 0x20 4045 #define _T1CKI 0x20 4046 #define _T3G 0x20 4047 #define _LVDIN 0x20 4048 #define _RA6 0x40 4049 #define _OSC2 0x40 4050 #define _CLKO 0x40 4051 #define _RA7 0x80 4052 #define _OSC1 0x80 4053 #define _CLKI 0x80 4054 4055 //============================================================================== 4056 4057 4058 //============================================================================== 4059 // PORTB Bits 4060 4061 extern __at(0x0F81) __sfr PORTB; 4062 4063 typedef union 4064 { 4065 struct 4066 { 4067 unsigned RB0 : 1; 4068 unsigned RB1 : 1; 4069 unsigned RB2 : 1; 4070 unsigned RB3 : 1; 4071 unsigned RB4 : 1; 4072 unsigned RB5 : 1; 4073 unsigned RB6 : 1; 4074 unsigned RB7 : 1; 4075 }; 4076 4077 struct 4078 { 4079 unsigned INT0 : 1; 4080 unsigned INT1 : 1; 4081 unsigned INT2 : 1; 4082 unsigned INT3 : 1; 4083 unsigned KBI0 : 1; 4084 unsigned KBI1 : 1; 4085 unsigned KBI2 : 1; 4086 unsigned KBI3 : 1; 4087 }; 4088 4089 struct 4090 { 4091 unsigned SEG30 : 1; 4092 unsigned SEG8 : 1; 4093 unsigned SEG9 : 1; 4094 unsigned SEG10 : 1; 4095 unsigned SEG11 : 1; 4096 unsigned SEG29 : 1; 4097 unsigned PGC : 1; 4098 unsigned PGD : 1; 4099 }; 4100 4101 struct 4102 { 4103 unsigned FLT0 : 1; 4104 unsigned : 1; 4105 unsigned CTED1 : 1; 4106 unsigned CTED2 : 1; 4107 unsigned : 1; 4108 unsigned T3CKI : 1; 4109 unsigned : 1; 4110 unsigned : 1; 4111 }; 4112 4113 struct 4114 { 4115 unsigned : 1; 4116 unsigned : 1; 4117 unsigned : 1; 4118 unsigned CCP2_PA2 : 1; 4119 unsigned : 1; 4120 unsigned T1G : 1; 4121 unsigned : 1; 4122 unsigned : 1; 4123 }; 4124 4125 struct 4126 { 4127 unsigned : 1; 4128 unsigned : 1; 4129 unsigned : 1; 4130 unsigned : 1; 4131 unsigned : 1; 4132 unsigned PGM : 1; 4133 unsigned : 1; 4134 unsigned : 1; 4135 }; 4136 4137 struct 4138 { 4139 unsigned INT : 4; 4140 unsigned : 4; 4141 }; 4142 4143 struct 4144 { 4145 unsigned : 4; 4146 unsigned KBI : 4; 4147 }; 4148 } __PORTBbits_t; 4149 4150 extern __at(0x0F81) volatile __PORTBbits_t PORTBbits; 4151 4152 #define _RB0 0x01 4153 #define _INT0 0x01 4154 #define _SEG30 0x01 4155 #define _FLT0 0x01 4156 #define _RB1 0x02 4157 #define _INT1 0x02 4158 #define _SEG8 0x02 4159 #define _RB2 0x04 4160 #define _INT2 0x04 4161 #define _SEG9 0x04 4162 #define _CTED1 0x04 4163 #define _RB3 0x08 4164 #define _INT3 0x08 4165 #define _SEG10 0x08 4166 #define _CTED2 0x08 4167 #define _CCP2_PA2 0x08 4168 #define _RB4 0x10 4169 #define _KBI0 0x10 4170 #define _SEG11 0x10 4171 #define _RB5 0x20 4172 #define _KBI1 0x20 4173 #define _SEG29 0x20 4174 #define _T3CKI 0x20 4175 #define _T1G 0x20 4176 #define _PGM 0x20 4177 #define _RB6 0x40 4178 #define _KBI2 0x40 4179 #define _PGC 0x40 4180 #define _RB7 0x80 4181 #define _KBI3 0x80 4182 #define _PGD 0x80 4183 4184 //============================================================================== 4185 4186 4187 //============================================================================== 4188 // PORTC Bits 4189 4190 extern __at(0x0F82) __sfr PORTC; 4191 4192 typedef union 4193 { 4194 struct 4195 { 4196 unsigned RC0 : 1; 4197 unsigned RC1 : 1; 4198 unsigned RC2 : 1; 4199 unsigned RC3 : 1; 4200 unsigned RC4 : 1; 4201 unsigned RC5 : 1; 4202 unsigned RC6 : 1; 4203 unsigned RC7 : 1; 4204 }; 4205 4206 struct 4207 { 4208 unsigned SOSCO : 1; 4209 unsigned SEG32 : 1; 4210 unsigned SEG13 : 1; 4211 unsigned SEG17 : 1; 4212 unsigned SEG16 : 1; 4213 unsigned SEG12 : 1; 4214 unsigned SEG27 : 1; 4215 unsigned SEG28 : 1; 4216 }; 4217 4218 struct 4219 { 4220 unsigned SCKLI : 1; 4221 unsigned SOSCI : 1; 4222 unsigned CCP1 : 1; 4223 unsigned SCK1 : 1; 4224 unsigned SDI1 : 1; 4225 unsigned SDO1 : 1; 4226 unsigned TX1 : 1; 4227 unsigned RX1 : 1; 4228 }; 4229 4230 struct 4231 { 4232 unsigned : 1; 4233 unsigned CCP2 : 1; 4234 unsigned PA1 : 1; 4235 unsigned SCL1 : 1; 4236 unsigned SDA1 : 1; 4237 unsigned : 1; 4238 unsigned CK1 : 1; 4239 unsigned DT1 : 1; 4240 }; 4241 4242 struct 4243 { 4244 unsigned : 1; 4245 unsigned PA2 : 1; 4246 unsigned : 1; 4247 unsigned : 1; 4248 unsigned : 1; 4249 unsigned : 1; 4250 unsigned : 1; 4251 unsigned : 1; 4252 }; 4253 } __PORTCbits_t; 4254 4255 extern __at(0x0F82) volatile __PORTCbits_t PORTCbits; 4256 4257 #define _RC0 0x01 4258 #define _SOSCO 0x01 4259 #define _SCKLI 0x01 4260 #define _RC1 0x02 4261 #define _SEG32 0x02 4262 #define _SOSCI 0x02 4263 #define _CCP2 0x02 4264 #define _PA2 0x02 4265 #define _RC2 0x04 4266 #define _SEG13 0x04 4267 #define _CCP1 0x04 4268 #define _PA1 0x04 4269 #define _RC3 0x08 4270 #define _SEG17 0x08 4271 #define _SCK1 0x08 4272 #define _SCL1 0x08 4273 #define _RC4 0x10 4274 #define _SEG16 0x10 4275 #define _SDI1 0x10 4276 #define _SDA1 0x10 4277 #define _RC5 0x20 4278 #define _SEG12 0x20 4279 #define _SDO1 0x20 4280 #define _RC6 0x40 4281 #define _SEG27 0x40 4282 #define _TX1 0x40 4283 #define _CK1 0x40 4284 #define _RC7 0x80 4285 #define _SEG28 0x80 4286 #define _RX1 0x80 4287 #define _DT1 0x80 4288 4289 //============================================================================== 4290 4291 4292 //============================================================================== 4293 // PORTD Bits 4294 4295 extern __at(0x0F83) __sfr PORTD; 4296 4297 typedef union 4298 { 4299 struct 4300 { 4301 unsigned RD0 : 1; 4302 unsigned RD1 : 1; 4303 unsigned RD2 : 1; 4304 unsigned RD3 : 1; 4305 unsigned RD4 : 1; 4306 unsigned RD5 : 1; 4307 unsigned RD6 : 1; 4308 unsigned RD7 : 1; 4309 }; 4310 4311 struct 4312 { 4313 unsigned AD0 : 1; 4314 unsigned AD1 : 1; 4315 unsigned AD2 : 1; 4316 unsigned AD3 : 1; 4317 unsigned AD4 : 1; 4318 unsigned AD5 : 1; 4319 unsigned AD6 : 1; 4320 unsigned AD7 : 1; 4321 }; 4322 4323 struct 4324 { 4325 unsigned PSP0 : 1; 4326 unsigned PSP1 : 1; 4327 unsigned PSP2 : 1; 4328 unsigned PSP3 : 1; 4329 unsigned PSP4 : 1; 4330 unsigned PSP5 : 1; 4331 unsigned PSP6 : 1; 4332 unsigned PSP7 : 1; 4333 }; 4334 4335 struct 4336 { 4337 unsigned SEG0 : 1; 4338 unsigned SEG1 : 1; 4339 unsigned SEG2 : 1; 4340 unsigned SEG3 : 1; 4341 unsigned SEG4 : 1; 4342 unsigned SEG5 : 1; 4343 unsigned SEG6 : 1; 4344 unsigned SEG7 : 1; 4345 }; 4346 4347 struct 4348 { 4349 unsigned CTPLS : 1; 4350 unsigned T5CKI : 1; 4351 unsigned : 1; 4352 unsigned : 1; 4353 unsigned SDO2 : 1; 4354 unsigned SDI2 : 1; 4355 unsigned SCK2 : 1; 4356 unsigned SS2 : 1; 4357 }; 4358 4359 struct 4360 { 4361 unsigned : 1; 4362 unsigned T7G : 1; 4363 unsigned : 1; 4364 unsigned : 1; 4365 unsigned : 1; 4366 unsigned SDA2 : 1; 4367 unsigned SCL2 : 1; 4368 unsigned : 1; 4369 }; 4370 } __PORTDbits_t; 4371 4372 extern __at(0x0F83) volatile __PORTDbits_t PORTDbits; 4373 4374 #define _RD0 0x01 4375 #define _AD0 0x01 4376 #define _PSP0 0x01 4377 #define _SEG0 0x01 4378 #define _CTPLS 0x01 4379 #define _RD1 0x02 4380 #define _AD1 0x02 4381 #define _PSP1 0x02 4382 #define _SEG1 0x02 4383 #define _T5CKI 0x02 4384 #define _T7G 0x02 4385 #define _RD2 0x04 4386 #define _AD2 0x04 4387 #define _PSP2 0x04 4388 #define _SEG2 0x04 4389 #define _RD3 0x08 4390 #define _AD3 0x08 4391 #define _PSP3 0x08 4392 #define _SEG3 0x08 4393 #define _RD4 0x10 4394 #define _AD4 0x10 4395 #define _PSP4 0x10 4396 #define _SEG4 0x10 4397 #define _SDO2 0x10 4398 #define _RD5 0x20 4399 #define _AD5 0x20 4400 #define _PSP5 0x20 4401 #define _SEG5 0x20 4402 #define _SDI2 0x20 4403 #define _SDA2 0x20 4404 #define _RD6 0x40 4405 #define _AD6 0x40 4406 #define _PSP6 0x40 4407 #define _SEG6 0x40 4408 #define _SCK2 0x40 4409 #define _SCL2 0x40 4410 #define _RD7 0x80 4411 #define _AD7 0x80 4412 #define _PSP7 0x80 4413 #define _SEG7 0x80 4414 #define _SS2 0x80 4415 4416 //============================================================================== 4417 4418 4419 //============================================================================== 4420 // PORTE Bits 4421 4422 extern __at(0x0F84) __sfr PORTE; 4423 4424 typedef union 4425 { 4426 struct 4427 { 4428 unsigned RE0 : 1; 4429 unsigned RE1 : 1; 4430 unsigned RE2 : 1; 4431 unsigned RE3 : 1; 4432 unsigned RE4 : 1; 4433 unsigned RE5 : 1; 4434 unsigned RE6 : 1; 4435 unsigned RE7 : 1; 4436 }; 4437 4438 struct 4439 { 4440 unsigned AD8 : 1; 4441 unsigned AD9 : 1; 4442 unsigned AD10 : 1; 4443 unsigned AD11 : 1; 4444 unsigned AD12 : 1; 4445 unsigned AD13 : 1; 4446 unsigned AD14 : 1; 4447 unsigned AD15 : 1; 4448 }; 4449 4450 struct 4451 { 4452 unsigned PD2 : 1; 4453 unsigned PC2 : 1; 4454 unsigned PB2 : 1; 4455 unsigned PC3 : 1; 4456 unsigned PB3 : 1; 4457 unsigned PC1 : 1; 4458 unsigned PB1 : 1; 4459 unsigned PA2 : 1; 4460 }; 4461 4462 struct 4463 { 4464 unsigned RD : 1; 4465 unsigned WR : 1; 4466 unsigned CCP10 : 1; 4467 unsigned CCP9 : 1; 4468 unsigned CCP8 : 1; 4469 unsigned CCP7 : 1; 4470 unsigned CCP6 : 1; 4471 unsigned CCP2 : 1; 4472 }; 4473 4474 struct 4475 { 4476 unsigned LCDBIAS1 : 1; 4477 unsigned LCDBIAS2 : 1; 4478 unsigned CS : 1; 4479 unsigned COM0 : 1; 4480 unsigned COM1 : 1; 4481 unsigned COM2 : 1; 4482 unsigned COM3 : 1; 4483 unsigned SEG31 : 1; 4484 }; 4485 4486 struct 4487 { 4488 unsigned : 1; 4489 unsigned : 1; 4490 unsigned LCDBIAS3 : 1; 4491 unsigned : 1; 4492 unsigned REFO : 1; 4493 unsigned : 1; 4494 unsigned : 1; 4495 unsigned : 1; 4496 }; 4497 4498 struct 4499 { 4500 unsigned : 3; 4501 unsigned COM : 4; 4502 unsigned : 1; 4503 }; 4504 } __PORTEbits_t; 4505 4506 extern __at(0x0F84) volatile __PORTEbits_t PORTEbits; 4507 4508 #define _PORTE_RE0 0x01 4509 #define _PORTE_AD8 0x01 4510 #define _PORTE_PD2 0x01 4511 #define _PORTE_RD 0x01 4512 #define _PORTE_LCDBIAS1 0x01 4513 #define _PORTE_RE1 0x02 4514 #define _PORTE_AD9 0x02 4515 #define _PORTE_PC2 0x02 4516 #define _PORTE_WR 0x02 4517 #define _PORTE_LCDBIAS2 0x02 4518 #define _PORTE_RE2 0x04 4519 #define _PORTE_AD10 0x04 4520 #define _PORTE_PB2 0x04 4521 #define _PORTE_CCP10 0x04 4522 #define _PORTE_CS 0x04 4523 #define _PORTE_LCDBIAS3 0x04 4524 #define _PORTE_RE3 0x08 4525 #define _PORTE_AD11 0x08 4526 #define _PORTE_PC3 0x08 4527 #define _PORTE_CCP9 0x08 4528 #define _PORTE_COM0 0x08 4529 #define _PORTE_RE4 0x10 4530 #define _PORTE_AD12 0x10 4531 #define _PORTE_PB3 0x10 4532 #define _PORTE_CCP8 0x10 4533 #define _PORTE_COM1 0x10 4534 #define _PORTE_REFO 0x10 4535 #define _PORTE_RE5 0x20 4536 #define _PORTE_AD13 0x20 4537 #define _PORTE_PC1 0x20 4538 #define _PORTE_CCP7 0x20 4539 #define _PORTE_COM2 0x20 4540 #define _PORTE_RE6 0x40 4541 #define _PORTE_AD14 0x40 4542 #define _PORTE_PB1 0x40 4543 #define _PORTE_CCP6 0x40 4544 #define _PORTE_COM3 0x40 4545 #define _PORTE_RE7 0x80 4546 #define _PORTE_AD15 0x80 4547 #define _PORTE_PA2 0x80 4548 #define _PORTE_CCP2 0x80 4549 #define _PORTE_SEG31 0x80 4550 4551 //============================================================================== 4552 4553 4554 //============================================================================== 4555 // PORTF Bits 4556 4557 extern __at(0x0F85) __sfr PORTF; 4558 4559 typedef union 4560 { 4561 struct 4562 { 4563 unsigned : 1; 4564 unsigned RF1 : 1; 4565 unsigned RF2 : 1; 4566 unsigned RF3 : 1; 4567 unsigned RF4 : 1; 4568 unsigned RF5 : 1; 4569 unsigned RF6 : 1; 4570 unsigned RF7 : 1; 4571 }; 4572 4573 struct 4574 { 4575 unsigned : 1; 4576 unsigned AN6 : 1; 4577 unsigned AN7 : 1; 4578 unsigned AN8 : 1; 4579 unsigned AN9 : 1; 4580 unsigned AN10 : 1; 4581 unsigned AN11 : 1; 4582 unsigned AN5 : 1; 4583 }; 4584 4585 struct 4586 { 4587 unsigned : 1; 4588 unsigned SEG19 : 1; 4589 unsigned SEG20 : 1; 4590 unsigned SEG21 : 1; 4591 unsigned SEG22 : 1; 4592 unsigned SEG23 : 1; 4593 unsigned SEG24 : 1; 4594 unsigned SEG25 : 1; 4595 }; 4596 4597 struct 4598 { 4599 unsigned : 1; 4600 unsigned C2OUT : 1; 4601 unsigned C1OUT : 1; 4602 unsigned C2INB : 1; 4603 unsigned C2INA : 1; 4604 unsigned C1INB : 1; 4605 unsigned C1INA : 1; 4606 unsigned SS1 : 1; 4607 }; 4608 4609 struct 4610 { 4611 unsigned : 1; 4612 unsigned CTDIN : 1; 4613 unsigned : 1; 4614 unsigned CTMUI : 1; 4615 unsigned : 1; 4616 unsigned CVREF : 1; 4617 unsigned : 1; 4618 unsigned : 1; 4619 }; 4620 } __PORTFbits_t; 4621 4622 extern __at(0x0F85) volatile __PORTFbits_t PORTFbits; 4623 4624 #define _PORTF_RF1 0x02 4625 #define _PORTF_AN6 0x02 4626 #define _PORTF_SEG19 0x02 4627 #define _PORTF_C2OUT 0x02 4628 #define _PORTF_CTDIN 0x02 4629 #define _PORTF_RF2 0x04 4630 #define _PORTF_AN7 0x04 4631 #define _PORTF_SEG20 0x04 4632 #define _PORTF_C1OUT 0x04 4633 #define _PORTF_RF3 0x08 4634 #define _PORTF_AN8 0x08 4635 #define _PORTF_SEG21 0x08 4636 #define _PORTF_C2INB 0x08 4637 #define _PORTF_CTMUI 0x08 4638 #define _PORTF_RF4 0x10 4639 #define _PORTF_AN9 0x10 4640 #define _PORTF_SEG22 0x10 4641 #define _PORTF_C2INA 0x10 4642 #define _PORTF_RF5 0x20 4643 #define _PORTF_AN10 0x20 4644 #define _PORTF_SEG23 0x20 4645 #define _PORTF_C1INB 0x20 4646 #define _PORTF_CVREF 0x20 4647 #define _PORTF_RF6 0x40 4648 #define _PORTF_AN11 0x40 4649 #define _PORTF_SEG24 0x40 4650 #define _PORTF_C1INA 0x40 4651 #define _PORTF_RF7 0x80 4652 #define _PORTF_AN5 0x80 4653 #define _PORTF_SEG25 0x80 4654 #define _PORTF_SS1 0x80 4655 4656 //============================================================================== 4657 4658 4659 //============================================================================== 4660 // PORTG Bits 4661 4662 extern __at(0x0F86) __sfr PORTG; 4663 4664 typedef union 4665 { 4666 struct 4667 { 4668 unsigned RG0 : 1; 4669 unsigned RG1 : 1; 4670 unsigned RG2 : 1; 4671 unsigned RG3 : 1; 4672 unsigned RG4 : 1; 4673 unsigned RG5 : 1; 4674 unsigned : 1; 4675 unsigned : 1; 4676 }; 4677 4678 struct 4679 { 4680 unsigned CCP3 : 1; 4681 unsigned C3OUT : 1; 4682 unsigned C3INA : 1; 4683 unsigned C3INB : 1; 4684 unsigned C3INC : 1; 4685 unsigned : 1; 4686 unsigned : 1; 4687 unsigned : 1; 4688 }; 4689 4690 struct 4691 { 4692 unsigned PA3 : 1; 4693 unsigned TX2 : 1; 4694 unsigned RX2 : 1; 4695 unsigned PD3 : 1; 4696 unsigned PD1 : 1; 4697 unsigned : 1; 4698 unsigned : 1; 4699 unsigned : 1; 4700 }; 4701 4702 struct 4703 { 4704 unsigned : 1; 4705 unsigned AN19 : 1; 4706 unsigned AN18 : 1; 4707 unsigned AN17 : 1; 4708 unsigned AN16 : 1; 4709 unsigned : 1; 4710 unsigned : 1; 4711 unsigned : 1; 4712 }; 4713 4714 struct 4715 { 4716 unsigned : 1; 4717 unsigned CK2 : 1; 4718 unsigned DT2 : 1; 4719 unsigned CCP4 : 1; 4720 unsigned CCP5 : 1; 4721 unsigned : 1; 4722 unsigned : 1; 4723 unsigned : 1; 4724 }; 4725 4726 struct 4727 { 4728 unsigned : 1; 4729 unsigned : 1; 4730 unsigned : 1; 4731 unsigned : 1; 4732 unsigned SEG26 : 1; 4733 unsigned : 1; 4734 unsigned : 1; 4735 unsigned : 1; 4736 }; 4737 4738 struct 4739 { 4740 unsigned : 1; 4741 unsigned : 1; 4742 unsigned : 1; 4743 unsigned : 1; 4744 unsigned T7CKI : 1; 4745 unsigned : 1; 4746 unsigned : 1; 4747 unsigned : 1; 4748 }; 4749 4750 struct 4751 { 4752 unsigned : 1; 4753 unsigned : 1; 4754 unsigned : 1; 4755 unsigned : 1; 4756 unsigned T5G : 1; 4757 unsigned : 1; 4758 unsigned : 1; 4759 unsigned : 1; 4760 }; 4761 4762 struct 4763 { 4764 unsigned : 1; 4765 unsigned : 1; 4766 unsigned : 1; 4767 unsigned : 1; 4768 unsigned RTCC : 1; 4769 unsigned : 1; 4770 unsigned : 1; 4771 unsigned : 1; 4772 }; 4773 4774 struct 4775 { 4776 unsigned RG : 6; 4777 unsigned : 2; 4778 }; 4779 } __PORTGbits_t; 4780 4781 extern __at(0x0F86) volatile __PORTGbits_t PORTGbits; 4782 4783 #define _PORTG_RG0 0x01 4784 #define _PORTG_CCP3 0x01 4785 #define _PORTG_PA3 0x01 4786 #define _PORTG_RG1 0x02 4787 #define _PORTG_C3OUT 0x02 4788 #define _PORTG_TX2 0x02 4789 #define _PORTG_AN19 0x02 4790 #define _PORTG_CK2 0x02 4791 #define _PORTG_RG2 0x04 4792 #define _PORTG_C3INA 0x04 4793 #define _PORTG_RX2 0x04 4794 #define _PORTG_AN18 0x04 4795 #define _PORTG_DT2 0x04 4796 #define _PORTG_RG3 0x08 4797 #define _PORTG_C3INB 0x08 4798 #define _PORTG_PD3 0x08 4799 #define _PORTG_AN17 0x08 4800 #define _PORTG_CCP4 0x08 4801 #define _PORTG_RG4 0x10 4802 #define _PORTG_C3INC 0x10 4803 #define _PORTG_PD1 0x10 4804 #define _PORTG_AN16 0x10 4805 #define _PORTG_CCP5 0x10 4806 #define _PORTG_SEG26 0x10 4807 #define _PORTG_T7CKI 0x10 4808 #define _PORTG_T5G 0x10 4809 #define _PORTG_RTCC 0x10 4810 #define _PORTG_RG5 0x20 4811 4812 //============================================================================== 4813 4814 4815 //============================================================================== 4816 // PORTH Bits 4817 4818 extern __at(0x0F87) __sfr PORTH; 4819 4820 typedef union 4821 { 4822 struct 4823 { 4824 unsigned RH0 : 1; 4825 unsigned RH1 : 1; 4826 unsigned RH2 : 1; 4827 unsigned RH3 : 1; 4828 unsigned RH4 : 1; 4829 unsigned RH5 : 1; 4830 unsigned RH6 : 1; 4831 unsigned RH7 : 1; 4832 }; 4833 4834 struct 4835 { 4836 unsigned SEG47 : 1; 4837 unsigned SEG46 : 1; 4838 unsigned SEG45 : 1; 4839 unsigned SEG44 : 1; 4840 unsigned SEG40 : 1; 4841 unsigned SEG41 : 1; 4842 unsigned SEG42 : 1; 4843 unsigned SEG43 : 1; 4844 }; 4845 4846 struct 4847 { 4848 unsigned AN23 : 1; 4849 unsigned AN22 : 1; 4850 unsigned AN21 : 1; 4851 unsigned AN20 : 1; 4852 unsigned AN12 : 1; 4853 unsigned AN13 : 1; 4854 unsigned AN14 : 1; 4855 unsigned AN15 : 1; 4856 }; 4857 4858 struct 4859 { 4860 unsigned A16 : 1; 4861 unsigned A17 : 1; 4862 unsigned A18 : 1; 4863 unsigned A19 : 1; 4864 unsigned CCP9 : 1; 4865 unsigned CCP8 : 1; 4866 unsigned CCP7 : 1; 4867 unsigned CCP6 : 1; 4868 }; 4869 4870 struct 4871 { 4872 unsigned : 1; 4873 unsigned : 1; 4874 unsigned : 1; 4875 unsigned : 1; 4876 unsigned PC3 : 1; 4877 unsigned PB3 : 1; 4878 unsigned PC1 : 1; 4879 unsigned PB1 : 1; 4880 }; 4881 4882 struct 4883 { 4884 unsigned : 1; 4885 unsigned : 1; 4886 unsigned : 1; 4887 unsigned : 1; 4888 unsigned C2INC : 1; 4889 unsigned C2IND : 1; 4890 unsigned C1INC : 1; 4891 unsigned : 1; 4892 }; 4893 } __PORTHbits_t; 4894 4895 extern __at(0x0F87) volatile __PORTHbits_t PORTHbits; 4896 4897 #define _PORTH_RH0 0x01 4898 #define _PORTH_SEG47 0x01 4899 #define _PORTH_AN23 0x01 4900 #define _PORTH_A16 0x01 4901 #define _PORTH_RH1 0x02 4902 #define _PORTH_SEG46 0x02 4903 #define _PORTH_AN22 0x02 4904 #define _PORTH_A17 0x02 4905 #define _PORTH_RH2 0x04 4906 #define _PORTH_SEG45 0x04 4907 #define _PORTH_AN21 0x04 4908 #define _PORTH_A18 0x04 4909 #define _PORTH_RH3 0x08 4910 #define _PORTH_SEG44 0x08 4911 #define _PORTH_AN20 0x08 4912 #define _PORTH_A19 0x08 4913 #define _PORTH_RH4 0x10 4914 #define _PORTH_SEG40 0x10 4915 #define _PORTH_AN12 0x10 4916 #define _PORTH_CCP9 0x10 4917 #define _PORTH_PC3 0x10 4918 #define _PORTH_C2INC 0x10 4919 #define _PORTH_RH5 0x20 4920 #define _PORTH_SEG41 0x20 4921 #define _PORTH_AN13 0x20 4922 #define _PORTH_CCP8 0x20 4923 #define _PORTH_PB3 0x20 4924 #define _PORTH_C2IND 0x20 4925 #define _PORTH_RH6 0x40 4926 #define _PORTH_SEG42 0x40 4927 #define _PORTH_AN14 0x40 4928 #define _PORTH_CCP7 0x40 4929 #define _PORTH_PC1 0x40 4930 #define _PORTH_C1INC 0x40 4931 #define _PORTH_RH7 0x80 4932 #define _PORTH_SEG43 0x80 4933 #define _PORTH_AN15 0x80 4934 #define _PORTH_CCP6 0x80 4935 #define _PORTH_PB1 0x80 4936 4937 //============================================================================== 4938 4939 4940 //============================================================================== 4941 // PORTJ Bits 4942 4943 extern __at(0x0F88) __sfr PORTJ; 4944 4945 typedef union 4946 { 4947 struct 4948 { 4949 unsigned RJ0 : 1; 4950 unsigned RJ1 : 1; 4951 unsigned RJ2 : 1; 4952 unsigned RJ3 : 1; 4953 unsigned RJ4 : 1; 4954 unsigned RJ5 : 1; 4955 unsigned RJ6 : 1; 4956 unsigned RJ7 : 1; 4957 }; 4958 4959 struct 4960 { 4961 unsigned ALE : 1; 4962 unsigned OE : 1; 4963 unsigned WRL : 1; 4964 unsigned WRH : 1; 4965 unsigned BA0 : 1; 4966 unsigned CE : 1; 4967 unsigned LB : 1; 4968 unsigned UB : 1; 4969 }; 4970 4971 struct 4972 { 4973 unsigned : 1; 4974 unsigned SEG33 : 1; 4975 unsigned SEG34 : 1; 4976 unsigned SEG35 : 1; 4977 unsigned SEG39 : 1; 4978 unsigned SEG38 : 1; 4979 unsigned SEG37 : 1; 4980 unsigned SEG36 : 1; 4981 }; 4982 } __PORTJbits_t; 4983 4984 extern __at(0x0F88) volatile __PORTJbits_t PORTJbits; 4985 4986 #define _RJ0 0x01 4987 #define _ALE 0x01 4988 #define _RJ1 0x02 4989 #define _OE 0x02 4990 #define _SEG33 0x02 4991 #define _RJ2 0x04 4992 #define _WRL 0x04 4993 #define _SEG34 0x04 4994 #define _RJ3 0x08 4995 #define _WRH 0x08 4996 #define _SEG35 0x08 4997 #define _RJ4 0x10 4998 #define _BA0 0x10 4999 #define _SEG39 0x10 5000 #define _RJ5 0x20 5001 #define _CE 0x20 5002 #define _SEG38 0x20 5003 #define _RJ6 0x40 5004 #define _LB 0x40 5005 #define _SEG37 0x40 5006 #define _RJ7 0x80 5007 #define _UB 0x80 5008 #define _SEG36 0x80 5009 5010 //============================================================================== 5011 5012 5013 //============================================================================== 5014 // LATA Bits 5015 5016 extern __at(0x0F89) __sfr LATA; 5017 5018 typedef struct 5019 { 5020 unsigned LATA0 : 1; 5021 unsigned LATA1 : 1; 5022 unsigned LATA2 : 1; 5023 unsigned LATA3 : 1; 5024 unsigned LATA4 : 1; 5025 unsigned LATA5 : 1; 5026 unsigned LATA6 : 1; 5027 unsigned LATA7 : 1; 5028 } __LATAbits_t; 5029 5030 extern __at(0x0F89) volatile __LATAbits_t LATAbits; 5031 5032 #define _LATA0 0x01 5033 #define _LATA1 0x02 5034 #define _LATA2 0x04 5035 #define _LATA3 0x08 5036 #define _LATA4 0x10 5037 #define _LATA5 0x20 5038 #define _LATA6 0x40 5039 #define _LATA7 0x80 5040 5041 //============================================================================== 5042 5043 5044 //============================================================================== 5045 // LATB Bits 5046 5047 extern __at(0x0F8A) __sfr LATB; 5048 5049 typedef struct 5050 { 5051 unsigned LATB0 : 1; 5052 unsigned LATB1 : 1; 5053 unsigned LATB2 : 1; 5054 unsigned LATB3 : 1; 5055 unsigned LATB4 : 1; 5056 unsigned LATB5 : 1; 5057 unsigned LATB6 : 1; 5058 unsigned LATB7 : 1; 5059 } __LATBbits_t; 5060 5061 extern __at(0x0F8A) volatile __LATBbits_t LATBbits; 5062 5063 #define _LATB0 0x01 5064 #define _LATB1 0x02 5065 #define _LATB2 0x04 5066 #define _LATB3 0x08 5067 #define _LATB4 0x10 5068 #define _LATB5 0x20 5069 #define _LATB6 0x40 5070 #define _LATB7 0x80 5071 5072 //============================================================================== 5073 5074 5075 //============================================================================== 5076 // LATC Bits 5077 5078 extern __at(0x0F8B) __sfr LATC; 5079 5080 typedef struct 5081 { 5082 unsigned LATC0 : 1; 5083 unsigned LATC1 : 1; 5084 unsigned LATC2 : 1; 5085 unsigned LATC3 : 1; 5086 unsigned LATC4 : 1; 5087 unsigned LATC5 : 1; 5088 unsigned LATC6 : 1; 5089 unsigned LATC7 : 1; 5090 } __LATCbits_t; 5091 5092 extern __at(0x0F8B) volatile __LATCbits_t LATCbits; 5093 5094 #define _LATC0 0x01 5095 #define _LATC1 0x02 5096 #define _LATC2 0x04 5097 #define _LATC3 0x08 5098 #define _LATC4 0x10 5099 #define _LATC5 0x20 5100 #define _LATC6 0x40 5101 #define _LATC7 0x80 5102 5103 //============================================================================== 5104 5105 5106 //============================================================================== 5107 // LATD Bits 5108 5109 extern __at(0x0F8C) __sfr LATD; 5110 5111 typedef struct 5112 { 5113 unsigned LATD0 : 1; 5114 unsigned LATD1 : 1; 5115 unsigned LATD2 : 1; 5116 unsigned LATD3 : 1; 5117 unsigned LATD4 : 1; 5118 unsigned LATD5 : 1; 5119 unsigned LATD6 : 1; 5120 unsigned LATD7 : 1; 5121 } __LATDbits_t; 5122 5123 extern __at(0x0F8C) volatile __LATDbits_t LATDbits; 5124 5125 #define _LATD0 0x01 5126 #define _LATD1 0x02 5127 #define _LATD2 0x04 5128 #define _LATD3 0x08 5129 #define _LATD4 0x10 5130 #define _LATD5 0x20 5131 #define _LATD6 0x40 5132 #define _LATD7 0x80 5133 5134 //============================================================================== 5135 5136 5137 //============================================================================== 5138 // LATE Bits 5139 5140 extern __at(0x0F8D) __sfr LATE; 5141 5142 typedef struct 5143 { 5144 unsigned LATE0 : 1; 5145 unsigned LATE1 : 1; 5146 unsigned LATE2 : 1; 5147 unsigned LATE3 : 1; 5148 unsigned LATE4 : 1; 5149 unsigned LATE5 : 1; 5150 unsigned LATE6 : 1; 5151 unsigned LATE7 : 1; 5152 } __LATEbits_t; 5153 5154 extern __at(0x0F8D) volatile __LATEbits_t LATEbits; 5155 5156 #define _LATE0 0x01 5157 #define _LATE1 0x02 5158 #define _LATE2 0x04 5159 #define _LATE3 0x08 5160 #define _LATE4 0x10 5161 #define _LATE5 0x20 5162 #define _LATE6 0x40 5163 #define _LATE7 0x80 5164 5165 //============================================================================== 5166 5167 5168 //============================================================================== 5169 // LATF Bits 5170 5171 extern __at(0x0F8E) __sfr LATF; 5172 5173 typedef struct 5174 { 5175 unsigned : 1; 5176 unsigned LATF1 : 1; 5177 unsigned LATF2 : 1; 5178 unsigned LATF3 : 1; 5179 unsigned LATF4 : 1; 5180 unsigned LATF5 : 1; 5181 unsigned LATF6 : 1; 5182 unsigned LATF7 : 1; 5183 } __LATFbits_t; 5184 5185 extern __at(0x0F8E) volatile __LATFbits_t LATFbits; 5186 5187 #define _LATF1 0x02 5188 #define _LATF2 0x04 5189 #define _LATF3 0x08 5190 #define _LATF4 0x10 5191 #define _LATF5 0x20 5192 #define _LATF6 0x40 5193 #define _LATF7 0x80 5194 5195 //============================================================================== 5196 5197 5198 //============================================================================== 5199 // LATG Bits 5200 5201 extern __at(0x0F8F) __sfr LATG; 5202 5203 typedef union 5204 { 5205 struct 5206 { 5207 unsigned LATG0 : 1; 5208 unsigned LATG1 : 1; 5209 unsigned LATG2 : 1; 5210 unsigned LATG3 : 1; 5211 unsigned LATG4 : 1; 5212 unsigned : 1; 5213 unsigned : 1; 5214 unsigned : 1; 5215 }; 5216 5217 struct 5218 { 5219 unsigned LATG : 5; 5220 unsigned : 3; 5221 }; 5222 } __LATGbits_t; 5223 5224 extern __at(0x0F8F) volatile __LATGbits_t LATGbits; 5225 5226 #define _LATG0 0x01 5227 #define _LATG1 0x02 5228 #define _LATG2 0x04 5229 #define _LATG3 0x08 5230 #define _LATG4 0x10 5231 5232 //============================================================================== 5233 5234 5235 //============================================================================== 5236 // LATH Bits 5237 5238 extern __at(0x0F90) __sfr LATH; 5239 5240 typedef struct 5241 { 5242 unsigned LATH0 : 1; 5243 unsigned LATH1 : 1; 5244 unsigned LATH2 : 1; 5245 unsigned LATH3 : 1; 5246 unsigned LATH4 : 1; 5247 unsigned LATH5 : 1; 5248 unsigned LATH6 : 1; 5249 unsigned LATH7 : 1; 5250 } __LATHbits_t; 5251 5252 extern __at(0x0F90) volatile __LATHbits_t LATHbits; 5253 5254 #define _LATH0 0x01 5255 #define _LATH1 0x02 5256 #define _LATH2 0x04 5257 #define _LATH3 0x08 5258 #define _LATH4 0x10 5259 #define _LATH5 0x20 5260 #define _LATH6 0x40 5261 #define _LATH7 0x80 5262 5263 //============================================================================== 5264 5265 5266 //============================================================================== 5267 // LATJ Bits 5268 5269 extern __at(0x0F91) __sfr LATJ; 5270 5271 typedef struct 5272 { 5273 unsigned LATJ0 : 1; 5274 unsigned LATJ1 : 1; 5275 unsigned LATJ2 : 1; 5276 unsigned LATJ3 : 1; 5277 unsigned LATJ4 : 1; 5278 unsigned LATJ5 : 1; 5279 unsigned LATJ6 : 1; 5280 unsigned LATJ7 : 1; 5281 } __LATJbits_t; 5282 5283 extern __at(0x0F91) volatile __LATJbits_t LATJbits; 5284 5285 #define _LATJ0 0x01 5286 #define _LATJ1 0x02 5287 #define _LATJ2 0x04 5288 #define _LATJ3 0x08 5289 #define _LATJ4 0x10 5290 #define _LATJ5 0x20 5291 #define _LATJ6 0x40 5292 #define _LATJ7 0x80 5293 5294 //============================================================================== 5295 5296 5297 //============================================================================== 5298 // TRISA Bits 5299 5300 extern __at(0x0F92) __sfr TRISA; 5301 5302 typedef struct 5303 { 5304 unsigned TRISA0 : 1; 5305 unsigned TRISA1 : 1; 5306 unsigned TRISA2 : 1; 5307 unsigned TRISA3 : 1; 5308 unsigned TRISA4 : 1; 5309 unsigned TRISA5 : 1; 5310 unsigned TRISA6 : 1; 5311 unsigned TRISA7 : 1; 5312 } __TRISAbits_t; 5313 5314 extern __at(0x0F92) volatile __TRISAbits_t TRISAbits; 5315 5316 #define _TRISA0 0x01 5317 #define _TRISA1 0x02 5318 #define _TRISA2 0x04 5319 #define _TRISA3 0x08 5320 #define _TRISA4 0x10 5321 #define _TRISA5 0x20 5322 #define _TRISA6 0x40 5323 #define _TRISA7 0x80 5324 5325 //============================================================================== 5326 5327 5328 //============================================================================== 5329 // TRISB Bits 5330 5331 extern __at(0x0F93) __sfr TRISB; 5332 5333 typedef struct 5334 { 5335 unsigned TRISB0 : 1; 5336 unsigned TRISB1 : 1; 5337 unsigned TRISB2 : 1; 5338 unsigned TRISB3 : 1; 5339 unsigned TRISB4 : 1; 5340 unsigned TRISB5 : 1; 5341 unsigned TRISB6 : 1; 5342 unsigned TRISB7 : 1; 5343 } __TRISBbits_t; 5344 5345 extern __at(0x0F93) volatile __TRISBbits_t TRISBbits; 5346 5347 #define _TRISB0 0x01 5348 #define _TRISB1 0x02 5349 #define _TRISB2 0x04 5350 #define _TRISB3 0x08 5351 #define _TRISB4 0x10 5352 #define _TRISB5 0x20 5353 #define _TRISB6 0x40 5354 #define _TRISB7 0x80 5355 5356 //============================================================================== 5357 5358 5359 //============================================================================== 5360 // TRISC Bits 5361 5362 extern __at(0x0F94) __sfr TRISC; 5363 5364 typedef struct 5365 { 5366 unsigned TRISC0 : 1; 5367 unsigned TRISC1 : 1; 5368 unsigned TRISC2 : 1; 5369 unsigned TRISC3 : 1; 5370 unsigned TRISC4 : 1; 5371 unsigned TRISC5 : 1; 5372 unsigned TRISC6 : 1; 5373 unsigned TRISC7 : 1; 5374 } __TRISCbits_t; 5375 5376 extern __at(0x0F94) volatile __TRISCbits_t TRISCbits; 5377 5378 #define _TRISC0 0x01 5379 #define _TRISC1 0x02 5380 #define _TRISC2 0x04 5381 #define _TRISC3 0x08 5382 #define _TRISC4 0x10 5383 #define _TRISC5 0x20 5384 #define _TRISC6 0x40 5385 #define _TRISC7 0x80 5386 5387 //============================================================================== 5388 5389 5390 //============================================================================== 5391 // TRISD Bits 5392 5393 extern __at(0x0F95) __sfr TRISD; 5394 5395 typedef struct 5396 { 5397 unsigned TRISD0 : 1; 5398 unsigned TRISD1 : 1; 5399 unsigned TRISD2 : 1; 5400 unsigned TRISD3 : 1; 5401 unsigned TRISD4 : 1; 5402 unsigned TRISD5 : 1; 5403 unsigned TRISD6 : 1; 5404 unsigned TRISD7 : 1; 5405 } __TRISDbits_t; 5406 5407 extern __at(0x0F95) volatile __TRISDbits_t TRISDbits; 5408 5409 #define _TRISD0 0x01 5410 #define _TRISD1 0x02 5411 #define _TRISD2 0x04 5412 #define _TRISD3 0x08 5413 #define _TRISD4 0x10 5414 #define _TRISD5 0x20 5415 #define _TRISD6 0x40 5416 #define _TRISD7 0x80 5417 5418 //============================================================================== 5419 5420 5421 //============================================================================== 5422 // TRISE Bits 5423 5424 extern __at(0x0F96) __sfr TRISE; 5425 5426 typedef struct 5427 { 5428 unsigned TRISE0 : 1; 5429 unsigned TRISE1 : 1; 5430 unsigned TRISE2 : 1; 5431 unsigned TRISE3 : 1; 5432 unsigned TRISE4 : 1; 5433 unsigned TRISE5 : 1; 5434 unsigned TRISE6 : 1; 5435 unsigned TRISE7 : 1; 5436 } __TRISEbits_t; 5437 5438 extern __at(0x0F96) volatile __TRISEbits_t TRISEbits; 5439 5440 #define _TRISE0 0x01 5441 #define _TRISE1 0x02 5442 #define _TRISE2 0x04 5443 #define _TRISE3 0x08 5444 #define _TRISE4 0x10 5445 #define _TRISE5 0x20 5446 #define _TRISE6 0x40 5447 #define _TRISE7 0x80 5448 5449 //============================================================================== 5450 5451 5452 //============================================================================== 5453 // TRISF Bits 5454 5455 extern __at(0x0F97) __sfr TRISF; 5456 5457 typedef struct 5458 { 5459 unsigned : 1; 5460 unsigned TRISF1 : 1; 5461 unsigned TRISF2 : 1; 5462 unsigned TRISF3 : 1; 5463 unsigned TRISF4 : 1; 5464 unsigned TRISF5 : 1; 5465 unsigned TRISF6 : 1; 5466 unsigned TRISF7 : 1; 5467 } __TRISFbits_t; 5468 5469 extern __at(0x0F97) volatile __TRISFbits_t TRISFbits; 5470 5471 #define _TRISF1 0x02 5472 #define _TRISF2 0x04 5473 #define _TRISF3 0x08 5474 #define _TRISF4 0x10 5475 #define _TRISF5 0x20 5476 #define _TRISF6 0x40 5477 #define _TRISF7 0x80 5478 5479 //============================================================================== 5480 5481 5482 //============================================================================== 5483 // TRISG Bits 5484 5485 extern __at(0x0F98) __sfr TRISG; 5486 5487 typedef union 5488 { 5489 struct 5490 { 5491 unsigned TRISG0 : 1; 5492 unsigned TRISG1 : 1; 5493 unsigned TRISG2 : 1; 5494 unsigned TRISG3 : 1; 5495 unsigned TRISG4 : 1; 5496 unsigned : 1; 5497 unsigned : 1; 5498 unsigned : 1; 5499 }; 5500 5501 struct 5502 { 5503 unsigned TRISG : 5; 5504 unsigned : 3; 5505 }; 5506 } __TRISGbits_t; 5507 5508 extern __at(0x0F98) volatile __TRISGbits_t TRISGbits; 5509 5510 #define _TRISG0 0x01 5511 #define _TRISG1 0x02 5512 #define _TRISG2 0x04 5513 #define _TRISG3 0x08 5514 #define _TRISG4 0x10 5515 5516 //============================================================================== 5517 5518 5519 //============================================================================== 5520 // TRISH Bits 5521 5522 extern __at(0x0F99) __sfr TRISH; 5523 5524 typedef struct 5525 { 5526 unsigned TRISH0 : 1; 5527 unsigned TRISH1 : 1; 5528 unsigned TRISH2 : 1; 5529 unsigned TRISH3 : 1; 5530 unsigned TRISH4 : 1; 5531 unsigned TRISH5 : 1; 5532 unsigned TRISH6 : 1; 5533 unsigned TRISH7 : 1; 5534 } __TRISHbits_t; 5535 5536 extern __at(0x0F99) volatile __TRISHbits_t TRISHbits; 5537 5538 #define _TRISH0 0x01 5539 #define _TRISH1 0x02 5540 #define _TRISH2 0x04 5541 #define _TRISH3 0x08 5542 #define _TRISH4 0x10 5543 #define _TRISH5 0x20 5544 #define _TRISH6 0x40 5545 #define _TRISH7 0x80 5546 5547 //============================================================================== 5548 5549 5550 //============================================================================== 5551 // TRISJ Bits 5552 5553 extern __at(0x0F9A) __sfr TRISJ; 5554 5555 typedef struct 5556 { 5557 unsigned TRISJ0 : 1; 5558 unsigned TRISJ1 : 1; 5559 unsigned TRISJ2 : 1; 5560 unsigned TRISJ3 : 1; 5561 unsigned TRISJ4 : 1; 5562 unsigned TRISJ5 : 1; 5563 unsigned TRISJ6 : 1; 5564 unsigned TRISJ7 : 1; 5565 } __TRISJbits_t; 5566 5567 extern __at(0x0F9A) volatile __TRISJbits_t TRISJbits; 5568 5569 #define _TRISJ0 0x01 5570 #define _TRISJ1 0x02 5571 #define _TRISJ2 0x04 5572 #define _TRISJ3 0x08 5573 #define _TRISJ4 0x10 5574 #define _TRISJ5 0x20 5575 #define _TRISJ6 0x40 5576 #define _TRISJ7 0x80 5577 5578 //============================================================================== 5579 5580 5581 //============================================================================== 5582 // OSCTUNE Bits 5583 5584 extern __at(0x0F9B) __sfr OSCTUNE; 5585 5586 typedef union 5587 { 5588 struct 5589 { 5590 unsigned TUN0 : 1; 5591 unsigned TUN1 : 1; 5592 unsigned TUN2 : 1; 5593 unsigned TUN3 : 1; 5594 unsigned TUN4 : 1; 5595 unsigned TUN5 : 1; 5596 unsigned PLLEN : 1; 5597 unsigned INTSRC : 1; 5598 }; 5599 5600 struct 5601 { 5602 unsigned TUN : 6; 5603 unsigned : 2; 5604 }; 5605 } __OSCTUNEbits_t; 5606 5607 extern __at(0x0F9B) volatile __OSCTUNEbits_t OSCTUNEbits; 5608 5609 #define _TUN0 0x01 5610 #define _TUN1 0x02 5611 #define _TUN2 0x04 5612 #define _TUN3 0x08 5613 #define _TUN4 0x10 5614 #define _TUN5 0x20 5615 #define _PLLEN 0x40 5616 #define _INTSRC 0x80 5617 5618 //============================================================================== 5619 5620 5621 //============================================================================== 5622 // PSTR1CON Bits 5623 5624 extern __at(0x0F9C) __sfr PSTR1CON; 5625 5626 typedef union 5627 { 5628 struct 5629 { 5630 unsigned STRA : 1; 5631 unsigned STRB : 1; 5632 unsigned STRC : 1; 5633 unsigned STRD : 1; 5634 unsigned STRSYNC : 1; 5635 unsigned : 1; 5636 unsigned CMPL0 : 1; 5637 unsigned CMPL1 : 1; 5638 }; 5639 5640 struct 5641 { 5642 unsigned : 6; 5643 unsigned CMPL : 2; 5644 }; 5645 } __PSTR1CONbits_t; 5646 5647 extern __at(0x0F9C) volatile __PSTR1CONbits_t PSTR1CONbits; 5648 5649 #define _STRA 0x01 5650 #define _STRB 0x02 5651 #define _STRC 0x04 5652 #define _STRD 0x08 5653 #define _STRSYNC 0x10 5654 #define _CMPL0 0x40 5655 #define _CMPL1 0x80 5656 5657 //============================================================================== 5658 5659 5660 //============================================================================== 5661 // PIE1 Bits 5662 5663 extern __at(0x0F9D) __sfr PIE1; 5664 5665 typedef union 5666 { 5667 struct 5668 { 5669 unsigned TMR1IE : 1; 5670 unsigned TMR2IE : 1; 5671 unsigned TMR1GIE : 1; 5672 unsigned SSP1IE : 1; 5673 unsigned TX1IE : 1; 5674 unsigned RC1IE : 1; 5675 unsigned ADIE : 1; 5676 unsigned : 1; 5677 }; 5678 5679 struct 5680 { 5681 unsigned : 1; 5682 unsigned : 1; 5683 unsigned : 1; 5684 unsigned SSPIE : 1; 5685 unsigned TXIE : 1; 5686 unsigned RCIE : 1; 5687 unsigned : 1; 5688 unsigned : 1; 5689 }; 5690 } __PIE1bits_t; 5691 5692 extern __at(0x0F9D) volatile __PIE1bits_t PIE1bits; 5693 5694 #define _TMR1IE 0x01 5695 #define _TMR2IE 0x02 5696 #define _TMR1GIE 0x04 5697 #define _SSP1IE 0x08 5698 #define _SSPIE 0x08 5699 #define _TX1IE 0x10 5700 #define _TXIE 0x10 5701 #define _RC1IE 0x20 5702 #define _RCIE 0x20 5703 #define _ADIE 0x40 5704 5705 //============================================================================== 5706 5707 5708 //============================================================================== 5709 // PIR1 Bits 5710 5711 extern __at(0x0F9E) __sfr PIR1; 5712 5713 typedef union 5714 { 5715 struct 5716 { 5717 unsigned TMR1IF : 1; 5718 unsigned TMR2IF : 1; 5719 unsigned TMR1GIF : 1; 5720 unsigned SSP1IF : 1; 5721 unsigned TX1IF : 1; 5722 unsigned RC1IF : 1; 5723 unsigned ADIF : 1; 5724 unsigned : 1; 5725 }; 5726 5727 struct 5728 { 5729 unsigned : 1; 5730 unsigned : 1; 5731 unsigned : 1; 5732 unsigned SSPIF : 1; 5733 unsigned TXIF : 1; 5734 unsigned RCIF : 1; 5735 unsigned : 1; 5736 unsigned : 1; 5737 }; 5738 } __PIR1bits_t; 5739 5740 extern __at(0x0F9E) volatile __PIR1bits_t PIR1bits; 5741 5742 #define _TMR1IF 0x01 5743 #define _TMR2IF 0x02 5744 #define _TMR1GIF 0x04 5745 #define _SSP1IF 0x08 5746 #define _SSPIF 0x08 5747 #define _TX1IF 0x10 5748 #define _TXIF 0x10 5749 #define _RC1IF 0x20 5750 #define _RCIF 0x20 5751 #define _ADIF 0x40 5752 5753 //============================================================================== 5754 5755 5756 //============================================================================== 5757 // IPR1 Bits 5758 5759 extern __at(0x0F9F) __sfr IPR1; 5760 5761 typedef union 5762 { 5763 struct 5764 { 5765 unsigned TMR1IP : 1; 5766 unsigned TMR2IP : 1; 5767 unsigned TMR1GIP : 1; 5768 unsigned SSP1IP : 1; 5769 unsigned TX1IP : 1; 5770 unsigned RC1IP : 1; 5771 unsigned ADIP : 1; 5772 unsigned : 1; 5773 }; 5774 5775 struct 5776 { 5777 unsigned : 1; 5778 unsigned : 1; 5779 unsigned : 1; 5780 unsigned SSPIP : 1; 5781 unsigned TXIP : 1; 5782 unsigned RCIP : 1; 5783 unsigned : 1; 5784 unsigned : 1; 5785 }; 5786 } __IPR1bits_t; 5787 5788 extern __at(0x0F9F) volatile __IPR1bits_t IPR1bits; 5789 5790 #define _TMR1IP 0x01 5791 #define _TMR2IP 0x02 5792 #define _TMR1GIP 0x04 5793 #define _SSP1IP 0x08 5794 #define _SSPIP 0x08 5795 #define _TX1IP 0x10 5796 #define _TXIP 0x10 5797 #define _RC1IP 0x20 5798 #define _RCIP 0x20 5799 #define _ADIP 0x40 5800 5801 //============================================================================== 5802 5803 5804 //============================================================================== 5805 // PIE2 Bits 5806 5807 extern __at(0x0FA0) __sfr PIE2; 5808 5809 typedef union 5810 { 5811 struct 5812 { 5813 unsigned TMR3GIE : 1; 5814 unsigned TMR3IE : 1; 5815 unsigned HLVDIE : 1; 5816 unsigned BCL1IE : 1; 5817 unsigned BCL2IE : 1; 5818 unsigned SSP2IE : 1; 5819 unsigned : 1; 5820 unsigned OSCFIE : 1; 5821 }; 5822 5823 struct 5824 { 5825 unsigned : 1; 5826 unsigned : 1; 5827 unsigned LVDIE : 1; 5828 unsigned BCLIE : 1; 5829 unsigned : 1; 5830 unsigned : 1; 5831 unsigned : 1; 5832 unsigned : 1; 5833 }; 5834 } __PIE2bits_t; 5835 5836 extern __at(0x0FA0) volatile __PIE2bits_t PIE2bits; 5837 5838 #define _TMR3GIE 0x01 5839 #define _TMR3IE 0x02 5840 #define _HLVDIE 0x04 5841 #define _LVDIE 0x04 5842 #define _BCL1IE 0x08 5843 #define _BCLIE 0x08 5844 #define _BCL2IE 0x10 5845 #define _SSP2IE 0x20 5846 #define _OSCFIE 0x80 5847 5848 //============================================================================== 5849 5850 5851 //============================================================================== 5852 // PIR2 Bits 5853 5854 extern __at(0x0FA1) __sfr PIR2; 5855 5856 typedef union 5857 { 5858 struct 5859 { 5860 unsigned TMR3GIF : 1; 5861 unsigned TMR3IF : 1; 5862 unsigned HLVDIF : 1; 5863 unsigned BCL1IF : 1; 5864 unsigned BCL2IF : 1; 5865 unsigned SSP2IF : 1; 5866 unsigned : 1; 5867 unsigned OSCFIF : 1; 5868 }; 5869 5870 struct 5871 { 5872 unsigned : 1; 5873 unsigned : 1; 5874 unsigned LVDIF : 1; 5875 unsigned BCLIF : 1; 5876 unsigned : 1; 5877 unsigned : 1; 5878 unsigned : 1; 5879 unsigned : 1; 5880 }; 5881 } __PIR2bits_t; 5882 5883 extern __at(0x0FA1) volatile __PIR2bits_t PIR2bits; 5884 5885 #define _TMR3GIF 0x01 5886 #define _TMR3IF 0x02 5887 #define _HLVDIF 0x04 5888 #define _LVDIF 0x04 5889 #define _BCL1IF 0x08 5890 #define _BCLIF 0x08 5891 #define _BCL2IF 0x10 5892 #define _SSP2IF 0x20 5893 #define _OSCFIF 0x80 5894 5895 //============================================================================== 5896 5897 5898 //============================================================================== 5899 // IPR2 Bits 5900 5901 extern __at(0x0FA2) __sfr IPR2; 5902 5903 typedef union 5904 { 5905 struct 5906 { 5907 unsigned TMR3GIP : 1; 5908 unsigned TMR3IP : 1; 5909 unsigned HLVDIP : 1; 5910 unsigned BCL1IP : 1; 5911 unsigned BCL2IP : 1; 5912 unsigned SSP2IP : 1; 5913 unsigned : 1; 5914 unsigned OSCFIP : 1; 5915 }; 5916 5917 struct 5918 { 5919 unsigned : 1; 5920 unsigned : 1; 5921 unsigned LVDIP : 1; 5922 unsigned BCLIP : 1; 5923 unsigned : 1; 5924 unsigned : 1; 5925 unsigned : 1; 5926 unsigned : 1; 5927 }; 5928 } __IPR2bits_t; 5929 5930 extern __at(0x0FA2) volatile __IPR2bits_t IPR2bits; 5931 5932 #define _TMR3GIP 0x01 5933 #define _TMR3IP 0x02 5934 #define _HLVDIP 0x04 5935 #define _LVDIP 0x04 5936 #define _BCL1IP 0x08 5937 #define _BCLIP 0x08 5938 #define _BCL2IP 0x10 5939 #define _SSP2IP 0x20 5940 #define _OSCFIP 0x80 5941 5942 //============================================================================== 5943 5944 5945 //============================================================================== 5946 // PIE3 Bits 5947 5948 extern __at(0x0FA3) __sfr PIE3; 5949 5950 typedef struct 5951 { 5952 unsigned RTCCIE : 1; 5953 unsigned CCP1IE : 1; 5954 unsigned CCP2IE : 1; 5955 unsigned CTMUIE : 1; 5956 unsigned TX2IE : 1; 5957 unsigned RC2IE : 1; 5958 unsigned LCDIE : 1; 5959 unsigned TMR5GIE : 1; 5960 } __PIE3bits_t; 5961 5962 extern __at(0x0FA3) volatile __PIE3bits_t PIE3bits; 5963 5964 #define _RTCCIE 0x01 5965 #define _CCP1IE 0x02 5966 #define _CCP2IE 0x04 5967 #define _CTMUIE 0x08 5968 #define _TX2IE 0x10 5969 #define _RC2IE 0x20 5970 #define _LCDIE 0x40 5971 #define _TMR5GIE 0x80 5972 5973 //============================================================================== 5974 5975 5976 //============================================================================== 5977 // PIR3 Bits 5978 5979 extern __at(0x0FA4) __sfr PIR3; 5980 5981 typedef struct 5982 { 5983 unsigned RTCCIF : 1; 5984 unsigned CCP1IF : 1; 5985 unsigned CCP2IF : 1; 5986 unsigned CTMUIF : 1; 5987 unsigned TX2IF : 1; 5988 unsigned RC2IF : 1; 5989 unsigned LCDIF : 1; 5990 unsigned TMR5GIF : 1; 5991 } __PIR3bits_t; 5992 5993 extern __at(0x0FA4) volatile __PIR3bits_t PIR3bits; 5994 5995 #define _RTCCIF 0x01 5996 #define _CCP1IF 0x02 5997 #define _CCP2IF 0x04 5998 #define _CTMUIF 0x08 5999 #define _TX2IF 0x10 6000 #define _RC2IF 0x20 6001 #define _LCDIF 0x40 6002 #define _TMR5GIF 0x80 6003 6004 //============================================================================== 6005 6006 6007 //============================================================================== 6008 // IPR3 Bits 6009 6010 extern __at(0x0FA5) __sfr IPR3; 6011 6012 typedef struct 6013 { 6014 unsigned RTCCIP : 1; 6015 unsigned CCP1IP : 1; 6016 unsigned CCP2IP : 1; 6017 unsigned CTMUIP : 1; 6018 unsigned TX2IP : 1; 6019 unsigned RC2IP : 1; 6020 unsigned LCDIP : 1; 6021 unsigned TMR5GIP : 1; 6022 } __IPR3bits_t; 6023 6024 extern __at(0x0FA5) volatile __IPR3bits_t IPR3bits; 6025 6026 #define _RTCCIP 0x01 6027 #define _CCP1IP 0x02 6028 #define _CCP2IP 0x04 6029 #define _CTMUIP 0x08 6030 #define _TX2IP 0x10 6031 #define _RC2IP 0x20 6032 #define _LCDIP 0x40 6033 #define _TMR5GIP 0x80 6034 6035 //============================================================================== 6036 6037 6038 //============================================================================== 6039 // PIR6 Bits 6040 6041 extern __at(0x0FA6) __sfr PIR6; 6042 6043 typedef struct 6044 { 6045 unsigned CMP1IF : 1; 6046 unsigned CMP2IF : 1; 6047 unsigned CMP3IF : 1; 6048 unsigned : 1; 6049 unsigned EEIF : 1; 6050 unsigned : 1; 6051 unsigned : 1; 6052 unsigned : 1; 6053 } __PIR6bits_t; 6054 6055 extern __at(0x0FA6) volatile __PIR6bits_t PIR6bits; 6056 6057 #define _CMP1IF 0x01 6058 #define _CMP2IF 0x02 6059 #define _CMP3IF 0x04 6060 #define _EEIF 0x10 6061 6062 //============================================================================== 6063 6064 6065 //============================================================================== 6066 // HLVDCON Bits 6067 6068 extern __at(0x0FA8) __sfr HLVDCON; 6069 6070 typedef union 6071 { 6072 struct 6073 { 6074 unsigned HLVDL0 : 1; 6075 unsigned HLVDL1 : 1; 6076 unsigned HLVDL2 : 1; 6077 unsigned HLVDL3 : 1; 6078 unsigned HLVDEN : 1; 6079 unsigned IRVST : 1; 6080 unsigned BGVST : 1; 6081 unsigned VDIRMAG : 1; 6082 }; 6083 6084 struct 6085 { 6086 unsigned HLVDL : 4; 6087 unsigned : 4; 6088 }; 6089 } __HLVDCONbits_t; 6090 6091 extern __at(0x0FA8) volatile __HLVDCONbits_t HLVDCONbits; 6092 6093 #define _HLVDL0 0x01 6094 #define _HLVDL1 0x02 6095 #define _HLVDL2 0x04 6096 #define _HLVDL3 0x08 6097 #define _HLVDEN 0x10 6098 #define _IRVST 0x20 6099 #define _BGVST 0x40 6100 #define _VDIRMAG 0x80 6101 6102 //============================================================================== 6103 6104 6105 //============================================================================== 6106 // IPR6 Bits 6107 6108 extern __at(0x0FA9) __sfr IPR6; 6109 6110 typedef struct 6111 { 6112 unsigned CMP1IP : 1; 6113 unsigned CMP2IP : 1; 6114 unsigned CMP3IP : 1; 6115 unsigned : 1; 6116 unsigned EEIP : 1; 6117 unsigned : 1; 6118 unsigned : 1; 6119 unsigned : 1; 6120 } __IPR6bits_t; 6121 6122 extern __at(0x0FA9) volatile __IPR6bits_t IPR6bits; 6123 6124 #define _CMP1IP 0x01 6125 #define _CMP2IP 0x02 6126 #define _CMP3IP 0x04 6127 #define _EEIP 0x10 6128 6129 //============================================================================== 6130 6131 6132 //============================================================================== 6133 // T1GCON Bits 6134 6135 extern __at(0x0FAA) __sfr T1GCON; 6136 6137 typedef union 6138 { 6139 struct 6140 { 6141 unsigned T1GSS0 : 1; 6142 unsigned T1GSS1 : 1; 6143 unsigned T1GVAL : 1; 6144 unsigned T1GGO_NOT_T1DONE : 1; 6145 unsigned T1GSPM : 1; 6146 unsigned T1GTM : 1; 6147 unsigned T1GPOL : 1; 6148 unsigned TMR1GE : 1; 6149 }; 6150 6151 struct 6152 { 6153 unsigned : 1; 6154 unsigned : 1; 6155 unsigned : 1; 6156 unsigned T1GGO : 1; 6157 unsigned : 1; 6158 unsigned : 1; 6159 unsigned : 1; 6160 unsigned : 1; 6161 }; 6162 6163 struct 6164 { 6165 unsigned : 1; 6166 unsigned : 1; 6167 unsigned : 1; 6168 unsigned NOT_T1DONE : 1; 6169 unsigned : 1; 6170 unsigned : 1; 6171 unsigned : 1; 6172 unsigned : 1; 6173 }; 6174 6175 struct 6176 { 6177 unsigned T1GSS : 2; 6178 unsigned : 6; 6179 }; 6180 } __T1GCONbits_t; 6181 6182 extern __at(0x0FAA) volatile __T1GCONbits_t T1GCONbits; 6183 6184 #define _T1GSS0 0x01 6185 #define _T1GSS1 0x02 6186 #define _T1GVAL 0x04 6187 #define _T1GGO_NOT_T1DONE 0x08 6188 #define _T1GGO 0x08 6189 #define _NOT_T1DONE 0x08 6190 #define _T1GSPM 0x10 6191 #define _T1GTM 0x20 6192 #define _T1GPOL 0x40 6193 #define _TMR1GE 0x80 6194 6195 //============================================================================== 6196 6197 6198 //============================================================================== 6199 // RCSTA Bits 6200 6201 extern __at(0x0FAB) __sfr RCSTA; 6202 6203 typedef union 6204 { 6205 struct 6206 { 6207 unsigned RX9D : 1; 6208 unsigned OERR : 1; 6209 unsigned FERR : 1; 6210 unsigned ADDEN : 1; 6211 unsigned CREN : 1; 6212 unsigned SREN : 1; 6213 unsigned RX9 : 1; 6214 unsigned SPEN : 1; 6215 }; 6216 6217 struct 6218 { 6219 unsigned RCD8 : 1; 6220 unsigned OERR1 : 1; 6221 unsigned FERR1 : 1; 6222 unsigned ADEN : 1; 6223 unsigned CREN1 : 1; 6224 unsigned SREN1 : 1; 6225 unsigned RC9 : 1; 6226 unsigned SPEN1 : 1; 6227 }; 6228 6229 struct 6230 { 6231 unsigned RX9D1 : 1; 6232 unsigned : 1; 6233 unsigned : 1; 6234 unsigned ADDEN1 : 1; 6235 unsigned : 1; 6236 unsigned : 1; 6237 unsigned NOT_RC8 : 1; 6238 unsigned : 1; 6239 }; 6240 6241 struct 6242 { 6243 unsigned : 1; 6244 unsigned : 1; 6245 unsigned : 1; 6246 unsigned : 1; 6247 unsigned : 1; 6248 unsigned : 1; 6249 unsigned RC8_9 : 1; 6250 unsigned : 1; 6251 }; 6252 6253 struct 6254 { 6255 unsigned : 1; 6256 unsigned : 1; 6257 unsigned : 1; 6258 unsigned : 1; 6259 unsigned : 1; 6260 unsigned : 1; 6261 unsigned RX91 : 1; 6262 unsigned : 1; 6263 }; 6264 } __RCSTAbits_t; 6265 6266 extern __at(0x0FAB) volatile __RCSTAbits_t RCSTAbits; 6267 6268 #define _RX9D 0x01 6269 #define _RCD8 0x01 6270 #define _RX9D1 0x01 6271 #define _OERR 0x02 6272 #define _OERR1 0x02 6273 #define _FERR 0x04 6274 #define _FERR1 0x04 6275 #define _ADDEN 0x08 6276 #define _ADEN 0x08 6277 #define _ADDEN1 0x08 6278 #define _CREN 0x10 6279 #define _CREN1 0x10 6280 #define _SREN 0x20 6281 #define _SREN1 0x20 6282 #define _RX9 0x40 6283 #define _RC9 0x40 6284 #define _NOT_RC8 0x40 6285 #define _RC8_9 0x40 6286 #define _RX91 0x40 6287 #define _SPEN 0x80 6288 #define _SPEN1 0x80 6289 6290 //============================================================================== 6291 6292 6293 //============================================================================== 6294 // RCSTA1 Bits 6295 6296 extern __at(0x0FAB) __sfr RCSTA1; 6297 6298 typedef union 6299 { 6300 struct 6301 { 6302 unsigned RX9D : 1; 6303 unsigned OERR : 1; 6304 unsigned FERR : 1; 6305 unsigned ADDEN : 1; 6306 unsigned CREN : 1; 6307 unsigned SREN : 1; 6308 unsigned RX9 : 1; 6309 unsigned SPEN : 1; 6310 }; 6311 6312 struct 6313 { 6314 unsigned RCD8 : 1; 6315 unsigned OERR1 : 1; 6316 unsigned FERR1 : 1; 6317 unsigned ADEN : 1; 6318 unsigned CREN1 : 1; 6319 unsigned SREN1 : 1; 6320 unsigned RC9 : 1; 6321 unsigned SPEN1 : 1; 6322 }; 6323 6324 struct 6325 { 6326 unsigned RX9D1 : 1; 6327 unsigned : 1; 6328 unsigned : 1; 6329 unsigned ADDEN1 : 1; 6330 unsigned : 1; 6331 unsigned : 1; 6332 unsigned NOT_RC8 : 1; 6333 unsigned : 1; 6334 }; 6335 6336 struct 6337 { 6338 unsigned : 1; 6339 unsigned : 1; 6340 unsigned : 1; 6341 unsigned : 1; 6342 unsigned : 1; 6343 unsigned : 1; 6344 unsigned RC8_9 : 1; 6345 unsigned : 1; 6346 }; 6347 6348 struct 6349 { 6350 unsigned : 1; 6351 unsigned : 1; 6352 unsigned : 1; 6353 unsigned : 1; 6354 unsigned : 1; 6355 unsigned : 1; 6356 unsigned RX91 : 1; 6357 unsigned : 1; 6358 }; 6359 } __RCSTA1bits_t; 6360 6361 extern __at(0x0FAB) volatile __RCSTA1bits_t RCSTA1bits; 6362 6363 #define _RCSTA1_RX9D 0x01 6364 #define _RCSTA1_RCD8 0x01 6365 #define _RCSTA1_RX9D1 0x01 6366 #define _RCSTA1_OERR 0x02 6367 #define _RCSTA1_OERR1 0x02 6368 #define _RCSTA1_FERR 0x04 6369 #define _RCSTA1_FERR1 0x04 6370 #define _RCSTA1_ADDEN 0x08 6371 #define _RCSTA1_ADEN 0x08 6372 #define _RCSTA1_ADDEN1 0x08 6373 #define _RCSTA1_CREN 0x10 6374 #define _RCSTA1_CREN1 0x10 6375 #define _RCSTA1_SREN 0x20 6376 #define _RCSTA1_SREN1 0x20 6377 #define _RCSTA1_RX9 0x40 6378 #define _RCSTA1_RC9 0x40 6379 #define _RCSTA1_NOT_RC8 0x40 6380 #define _RCSTA1_RC8_9 0x40 6381 #define _RCSTA1_RX91 0x40 6382 #define _RCSTA1_SPEN 0x80 6383 #define _RCSTA1_SPEN1 0x80 6384 6385 //============================================================================== 6386 6387 6388 //============================================================================== 6389 // TXSTA Bits 6390 6391 extern __at(0x0FAC) __sfr TXSTA; 6392 6393 typedef union 6394 { 6395 struct 6396 { 6397 unsigned TX9D : 1; 6398 unsigned TRMT : 1; 6399 unsigned BRGH : 1; 6400 unsigned SENDB : 1; 6401 unsigned SYNC : 1; 6402 unsigned TXEN : 1; 6403 unsigned TX9 : 1; 6404 unsigned CSRC : 1; 6405 }; 6406 6407 struct 6408 { 6409 unsigned TXD8 : 1; 6410 unsigned TRMT1 : 1; 6411 unsigned BRGH1 : 1; 6412 unsigned SENDB1 : 1; 6413 unsigned SYNC1 : 1; 6414 unsigned TXEN1 : 1; 6415 unsigned TX8_9 : 1; 6416 unsigned CSRC1 : 1; 6417 }; 6418 6419 struct 6420 { 6421 unsigned TX9D1 : 1; 6422 unsigned : 1; 6423 unsigned : 1; 6424 unsigned : 1; 6425 unsigned : 1; 6426 unsigned : 1; 6427 unsigned NOT_TX8 : 1; 6428 unsigned : 1; 6429 }; 6430 6431 struct 6432 { 6433 unsigned : 1; 6434 unsigned : 1; 6435 unsigned : 1; 6436 unsigned : 1; 6437 unsigned : 1; 6438 unsigned : 1; 6439 unsigned TX91 : 1; 6440 unsigned : 1; 6441 }; 6442 } __TXSTAbits_t; 6443 6444 extern __at(0x0FAC) volatile __TXSTAbits_t TXSTAbits; 6445 6446 #define _TX9D 0x01 6447 #define _TXD8 0x01 6448 #define _TX9D1 0x01 6449 #define _TRMT 0x02 6450 #define _TRMT1 0x02 6451 #define _BRGH 0x04 6452 #define _BRGH1 0x04 6453 #define _SENDB 0x08 6454 #define _SENDB1 0x08 6455 #define _SYNC 0x10 6456 #define _SYNC1 0x10 6457 #define _TXEN 0x20 6458 #define _TXEN1 0x20 6459 #define _TX9 0x40 6460 #define _TX8_9 0x40 6461 #define _NOT_TX8 0x40 6462 #define _TX91 0x40 6463 #define _CSRC 0x80 6464 #define _CSRC1 0x80 6465 6466 //============================================================================== 6467 6468 6469 //============================================================================== 6470 // TXSTA1 Bits 6471 6472 extern __at(0x0FAC) __sfr TXSTA1; 6473 6474 typedef union 6475 { 6476 struct 6477 { 6478 unsigned TX9D : 1; 6479 unsigned TRMT : 1; 6480 unsigned BRGH : 1; 6481 unsigned SENDB : 1; 6482 unsigned SYNC : 1; 6483 unsigned TXEN : 1; 6484 unsigned TX9 : 1; 6485 unsigned CSRC : 1; 6486 }; 6487 6488 struct 6489 { 6490 unsigned TXD8 : 1; 6491 unsigned TRMT1 : 1; 6492 unsigned BRGH1 : 1; 6493 unsigned SENDB1 : 1; 6494 unsigned SYNC1 : 1; 6495 unsigned TXEN1 : 1; 6496 unsigned TX8_9 : 1; 6497 unsigned CSRC1 : 1; 6498 }; 6499 6500 struct 6501 { 6502 unsigned TX9D1 : 1; 6503 unsigned : 1; 6504 unsigned : 1; 6505 unsigned : 1; 6506 unsigned : 1; 6507 unsigned : 1; 6508 unsigned NOT_TX8 : 1; 6509 unsigned : 1; 6510 }; 6511 6512 struct 6513 { 6514 unsigned : 1; 6515 unsigned : 1; 6516 unsigned : 1; 6517 unsigned : 1; 6518 unsigned : 1; 6519 unsigned : 1; 6520 unsigned TX91 : 1; 6521 unsigned : 1; 6522 }; 6523 } __TXSTA1bits_t; 6524 6525 extern __at(0x0FAC) volatile __TXSTA1bits_t TXSTA1bits; 6526 6527 #define _TXSTA1_TX9D 0x01 6528 #define _TXSTA1_TXD8 0x01 6529 #define _TXSTA1_TX9D1 0x01 6530 #define _TXSTA1_TRMT 0x02 6531 #define _TXSTA1_TRMT1 0x02 6532 #define _TXSTA1_BRGH 0x04 6533 #define _TXSTA1_BRGH1 0x04 6534 #define _TXSTA1_SENDB 0x08 6535 #define _TXSTA1_SENDB1 0x08 6536 #define _TXSTA1_SYNC 0x10 6537 #define _TXSTA1_SYNC1 0x10 6538 #define _TXSTA1_TXEN 0x20 6539 #define _TXSTA1_TXEN1 0x20 6540 #define _TXSTA1_TX9 0x40 6541 #define _TXSTA1_TX8_9 0x40 6542 #define _TXSTA1_NOT_TX8 0x40 6543 #define _TXSTA1_TX91 0x40 6544 #define _TXSTA1_CSRC 0x80 6545 #define _TXSTA1_CSRC1 0x80 6546 6547 //============================================================================== 6548 6549 extern __at(0x0FAD) __sfr TXREG; 6550 extern __at(0x0FAD) __sfr TXREG1; 6551 extern __at(0x0FAE) __sfr RCREG; 6552 extern __at(0x0FAE) __sfr RCREG1; 6553 extern __at(0x0FAF) __sfr SPBRG; 6554 extern __at(0x0FAF) __sfr SPBRG1; 6555 6556 //============================================================================== 6557 // T3GCON Bits 6558 6559 extern __at(0x0FB0) __sfr T3GCON; 6560 6561 typedef union 6562 { 6563 struct 6564 { 6565 unsigned T3GSS0 : 1; 6566 unsigned T3GSS1 : 1; 6567 unsigned T3GVAL : 1; 6568 unsigned T3GGO_NOT_T3DONE : 1; 6569 unsigned T3GSPM : 1; 6570 unsigned T3GTM : 1; 6571 unsigned T3GPOL : 1; 6572 unsigned TMR3GE : 1; 6573 }; 6574 6575 struct 6576 { 6577 unsigned : 1; 6578 unsigned : 1; 6579 unsigned : 1; 6580 unsigned T3GGO : 1; 6581 unsigned : 1; 6582 unsigned : 1; 6583 unsigned : 1; 6584 unsigned : 1; 6585 }; 6586 6587 struct 6588 { 6589 unsigned : 1; 6590 unsigned : 1; 6591 unsigned : 1; 6592 unsigned NOT_T3DONE : 1; 6593 unsigned : 1; 6594 unsigned : 1; 6595 unsigned : 1; 6596 unsigned : 1; 6597 }; 6598 6599 struct 6600 { 6601 unsigned T3GSS : 2; 6602 unsigned : 6; 6603 }; 6604 } __T3GCONbits_t; 6605 6606 extern __at(0x0FB0) volatile __T3GCONbits_t T3GCONbits; 6607 6608 #define _T3GSS0 0x01 6609 #define _T3GSS1 0x02 6610 #define _T3GVAL 0x04 6611 #define _T3GGO_NOT_T3DONE 0x08 6612 #define _T3GGO 0x08 6613 #define _NOT_T3DONE 0x08 6614 #define _T3GSPM 0x10 6615 #define _T3GTM 0x20 6616 #define _T3GPOL 0x40 6617 #define _TMR3GE 0x80 6618 6619 //============================================================================== 6620 6621 6622 //============================================================================== 6623 // T3CON Bits 6624 6625 extern __at(0x0FB1) __sfr T3CON; 6626 6627 typedef union 6628 { 6629 struct 6630 { 6631 unsigned TMR3ON : 1; 6632 unsigned RD16 : 1; 6633 unsigned NOT_T3SYNC : 1; 6634 unsigned SOSCEN : 1; 6635 unsigned T3CKPS0 : 1; 6636 unsigned T3CKPS1 : 1; 6637 unsigned TMR3CS0 : 1; 6638 unsigned TMR3CS1 : 1; 6639 }; 6640 6641 struct 6642 { 6643 unsigned : 4; 6644 unsigned T3CKPS : 2; 6645 unsigned : 2; 6646 }; 6647 6648 struct 6649 { 6650 unsigned : 6; 6651 unsigned TMR3CS : 2; 6652 }; 6653 } __T3CONbits_t; 6654 6655 extern __at(0x0FB1) volatile __T3CONbits_t T3CONbits; 6656 6657 #define _T3CON_TMR3ON 0x01 6658 #define _T3CON_RD16 0x02 6659 #define _T3CON_NOT_T3SYNC 0x04 6660 #define _T3CON_SOSCEN 0x08 6661 #define _T3CON_T3CKPS0 0x10 6662 #define _T3CON_T3CKPS1 0x20 6663 #define _T3CON_TMR3CS0 0x40 6664 #define _T3CON_TMR3CS1 0x80 6665 6666 //============================================================================== 6667 6668 extern __at(0x0FB2) __sfr TMR3; 6669 extern __at(0x0FB2) __sfr TMR3L; 6670 extern __at(0x0FB3) __sfr TMR3H; 6671 6672 //============================================================================== 6673 // CMSTAT Bits 6674 6675 extern __at(0x0FB4) __sfr CMSTAT; 6676 6677 typedef union 6678 { 6679 struct 6680 { 6681 unsigned : 1; 6682 unsigned : 1; 6683 unsigned : 1; 6684 unsigned : 1; 6685 unsigned : 1; 6686 unsigned CMP1OUT : 1; 6687 unsigned CMP2OUT : 1; 6688 unsigned CMP3OUT : 1; 6689 }; 6690 6691 struct 6692 { 6693 unsigned : 1; 6694 unsigned : 1; 6695 unsigned : 1; 6696 unsigned : 1; 6697 unsigned : 1; 6698 unsigned C1OUT : 1; 6699 unsigned C2OUT : 1; 6700 unsigned C3OUT : 1; 6701 }; 6702 } __CMSTATbits_t; 6703 6704 extern __at(0x0FB4) volatile __CMSTATbits_t CMSTATbits; 6705 6706 #define _CMP1OUT 0x20 6707 #define _C1OUT 0x20 6708 #define _CMP2OUT 0x40 6709 #define _C2OUT 0x40 6710 #define _CMP3OUT 0x80 6711 #define _C3OUT 0x80 6712 6713 //============================================================================== 6714 6715 6716 //============================================================================== 6717 // CMSTATUS Bits 6718 6719 extern __at(0x0FB4) __sfr CMSTATUS; 6720 6721 typedef union 6722 { 6723 struct 6724 { 6725 unsigned : 1; 6726 unsigned : 1; 6727 unsigned : 1; 6728 unsigned : 1; 6729 unsigned : 1; 6730 unsigned CMP1OUT : 1; 6731 unsigned CMP2OUT : 1; 6732 unsigned CMP3OUT : 1; 6733 }; 6734 6735 struct 6736 { 6737 unsigned : 1; 6738 unsigned : 1; 6739 unsigned : 1; 6740 unsigned : 1; 6741 unsigned : 1; 6742 unsigned C1OUT : 1; 6743 unsigned C2OUT : 1; 6744 unsigned C3OUT : 1; 6745 }; 6746 } __CMSTATUSbits_t; 6747 6748 extern __at(0x0FB4) volatile __CMSTATUSbits_t CMSTATUSbits; 6749 6750 #define _CMSTATUS_CMP1OUT 0x20 6751 #define _CMSTATUS_C1OUT 0x20 6752 #define _CMSTATUS_CMP2OUT 0x40 6753 #define _CMSTATUS_C2OUT 0x40 6754 #define _CMSTATUS_CMP3OUT 0x80 6755 #define _CMSTATUS_C3OUT 0x80 6756 6757 //============================================================================== 6758 6759 6760 //============================================================================== 6761 // CVRCON Bits 6762 6763 extern __at(0x0FB5) __sfr CVRCON; 6764 6765 typedef union 6766 { 6767 struct 6768 { 6769 unsigned CVR0 : 1; 6770 unsigned CVR1 : 1; 6771 unsigned CVR2 : 1; 6772 unsigned CVR3 : 1; 6773 unsigned CVR4 : 1; 6774 unsigned CVRSS : 1; 6775 unsigned CVROE : 1; 6776 unsigned CVREN : 1; 6777 }; 6778 6779 struct 6780 { 6781 unsigned CVR : 5; 6782 unsigned : 3; 6783 }; 6784 } __CVRCONbits_t; 6785 6786 extern __at(0x0FB5) volatile __CVRCONbits_t CVRCONbits; 6787 6788 #define _CVR0 0x01 6789 #define _CVR1 0x02 6790 #define _CVR2 0x04 6791 #define _CVR3 0x08 6792 #define _CVR4 0x10 6793 #define _CVRSS 0x20 6794 #define _CVROE 0x40 6795 #define _CVREN 0x80 6796 6797 //============================================================================== 6798 6799 6800 //============================================================================== 6801 // PIE4 Bits 6802 6803 extern __at(0x0FB6) __sfr PIE4; 6804 6805 typedef struct 6806 { 6807 unsigned CCP3IE : 1; 6808 unsigned CCP4IE : 1; 6809 unsigned CCP5IE : 1; 6810 unsigned CCP6IE : 1; 6811 unsigned CCP7IE : 1; 6812 unsigned CCP8IE : 1; 6813 unsigned : 1; 6814 unsigned : 1; 6815 } __PIE4bits_t; 6816 6817 extern __at(0x0FB6) volatile __PIE4bits_t PIE4bits; 6818 6819 #define _CCP3IE 0x01 6820 #define _CCP4IE 0x02 6821 #define _CCP5IE 0x04 6822 #define _CCP6IE 0x08 6823 #define _CCP7IE 0x10 6824 #define _CCP8IE 0x20 6825 6826 //============================================================================== 6827 6828 6829 //============================================================================== 6830 // PIR4 Bits 6831 6832 extern __at(0x0FB7) __sfr PIR4; 6833 6834 typedef struct 6835 { 6836 unsigned CCP3IF : 1; 6837 unsigned CCP4IF : 1; 6838 unsigned CCP5IF : 1; 6839 unsigned CCP6IF : 1; 6840 unsigned CCP7IF : 1; 6841 unsigned CCP8IF : 1; 6842 unsigned : 1; 6843 unsigned : 1; 6844 } __PIR4bits_t; 6845 6846 extern __at(0x0FB7) volatile __PIR4bits_t PIR4bits; 6847 6848 #define _CCP3IF 0x01 6849 #define _CCP4IF 0x02 6850 #define _CCP5IF 0x04 6851 #define _CCP6IF 0x08 6852 #define _CCP7IF 0x10 6853 #define _CCP8IF 0x20 6854 6855 //============================================================================== 6856 6857 6858 //============================================================================== 6859 // IPR4 Bits 6860 6861 extern __at(0x0FB8) __sfr IPR4; 6862 6863 typedef struct 6864 { 6865 unsigned CCP3IP : 1; 6866 unsigned CCP4IP : 1; 6867 unsigned CCP5IP : 1; 6868 unsigned CCP6IP : 1; 6869 unsigned CCP7IP : 1; 6870 unsigned CCP8IP : 1; 6871 unsigned : 1; 6872 unsigned : 1; 6873 } __IPR4bits_t; 6874 6875 extern __at(0x0FB8) volatile __IPR4bits_t IPR4bits; 6876 6877 #define _CCP3IP 0x01 6878 #define _CCP4IP 0x02 6879 #define _CCP5IP 0x04 6880 #define _CCP6IP 0x08 6881 #define _CCP7IP 0x10 6882 #define _CCP8IP 0x20 6883 6884 //============================================================================== 6885 6886 6887 //============================================================================== 6888 // PIE5 Bits 6889 6890 extern __at(0x0FB9) __sfr PIE5; 6891 6892 typedef struct 6893 { 6894 unsigned TMR4IE : 1; 6895 unsigned TMR5IE : 1; 6896 unsigned TMR6IE : 1; 6897 unsigned : 1; 6898 unsigned TMR8IE : 1; 6899 unsigned : 1; 6900 unsigned : 1; 6901 unsigned : 1; 6902 } __PIE5bits_t; 6903 6904 extern __at(0x0FB9) volatile __PIE5bits_t PIE5bits; 6905 6906 #define _TMR4IE 0x01 6907 #define _TMR5IE 0x02 6908 #define _TMR6IE 0x04 6909 #define _TMR8IE 0x10 6910 6911 //============================================================================== 6912 6913 6914 //============================================================================== 6915 // PIR5 Bits 6916 6917 extern __at(0x0FBA) __sfr PIR5; 6918 6919 typedef struct 6920 { 6921 unsigned TMR4IF : 1; 6922 unsigned TMR5IF : 1; 6923 unsigned TMR6IF : 1; 6924 unsigned : 1; 6925 unsigned TMR8IF : 1; 6926 unsigned : 1; 6927 unsigned : 1; 6928 unsigned : 1; 6929 } __PIR5bits_t; 6930 6931 extern __at(0x0FBA) volatile __PIR5bits_t PIR5bits; 6932 6933 #define _TMR4IF 0x01 6934 #define _TMR5IF 0x02 6935 #define _TMR6IF 0x04 6936 #define _TMR8IF 0x10 6937 6938 //============================================================================== 6939 6940 6941 //============================================================================== 6942 // CCP1CON Bits 6943 6944 extern __at(0x0FBB) __sfr CCP1CON; 6945 6946 typedef union 6947 { 6948 struct 6949 { 6950 unsigned CCP1M0 : 1; 6951 unsigned CCP1M1 : 1; 6952 unsigned CCP1M2 : 1; 6953 unsigned CCP1M3 : 1; 6954 unsigned DC1B0 : 1; 6955 unsigned DC1B1 : 1; 6956 unsigned P1M0 : 1; 6957 unsigned P1M1 : 1; 6958 }; 6959 6960 struct 6961 { 6962 unsigned : 1; 6963 unsigned : 1; 6964 unsigned : 1; 6965 unsigned : 1; 6966 unsigned CCP1Y : 1; 6967 unsigned CCP1X : 1; 6968 unsigned : 1; 6969 unsigned : 1; 6970 }; 6971 6972 struct 6973 { 6974 unsigned CCP1M : 4; 6975 unsigned : 4; 6976 }; 6977 6978 struct 6979 { 6980 unsigned : 4; 6981 unsigned DC1B : 2; 6982 unsigned : 2; 6983 }; 6984 6985 struct 6986 { 6987 unsigned : 6; 6988 unsigned P1M : 2; 6989 }; 6990 } __CCP1CONbits_t; 6991 6992 extern __at(0x0FBB) volatile __CCP1CONbits_t CCP1CONbits; 6993 6994 #define _CCP1M0 0x01 6995 #define _CCP1M1 0x02 6996 #define _CCP1M2 0x04 6997 #define _CCP1M3 0x08 6998 #define _DC1B0 0x10 6999 #define _CCP1Y 0x10 7000 #define _DC1B1 0x20 7001 #define _CCP1X 0x20 7002 #define _P1M0 0x40 7003 #define _P1M1 0x80 7004 7005 //============================================================================== 7006 7007 7008 //============================================================================== 7009 // ECCP1CON Bits 7010 7011 extern __at(0x0FBB) __sfr ECCP1CON; 7012 7013 typedef union 7014 { 7015 struct 7016 { 7017 unsigned CCP1M0 : 1; 7018 unsigned CCP1M1 : 1; 7019 unsigned CCP1M2 : 1; 7020 unsigned CCP1M3 : 1; 7021 unsigned DC1B0 : 1; 7022 unsigned DC1B1 : 1; 7023 unsigned P1M0 : 1; 7024 unsigned P1M1 : 1; 7025 }; 7026 7027 struct 7028 { 7029 unsigned : 1; 7030 unsigned : 1; 7031 unsigned : 1; 7032 unsigned : 1; 7033 unsigned CCP1Y : 1; 7034 unsigned CCP1X : 1; 7035 unsigned : 1; 7036 unsigned : 1; 7037 }; 7038 7039 struct 7040 { 7041 unsigned CCP1M : 4; 7042 unsigned : 4; 7043 }; 7044 7045 struct 7046 { 7047 unsigned : 4; 7048 unsigned DC1B : 2; 7049 unsigned : 2; 7050 }; 7051 7052 struct 7053 { 7054 unsigned : 6; 7055 unsigned P1M : 2; 7056 }; 7057 } __ECCP1CONbits_t; 7058 7059 extern __at(0x0FBB) volatile __ECCP1CONbits_t ECCP1CONbits; 7060 7061 #define _ECCP1CON_CCP1M0 0x01 7062 #define _ECCP1CON_CCP1M1 0x02 7063 #define _ECCP1CON_CCP1M2 0x04 7064 #define _ECCP1CON_CCP1M3 0x08 7065 #define _ECCP1CON_DC1B0 0x10 7066 #define _ECCP1CON_CCP1Y 0x10 7067 #define _ECCP1CON_DC1B1 0x20 7068 #define _ECCP1CON_CCP1X 0x20 7069 #define _ECCP1CON_P1M0 0x40 7070 #define _ECCP1CON_P1M1 0x80 7071 7072 //============================================================================== 7073 7074 extern __at(0x0FBC) __sfr CCPR1; 7075 extern __at(0x0FBC) __sfr CCPR1L; 7076 extern __at(0x0FBD) __sfr CCPR1H; 7077 7078 //============================================================================== 7079 // ECCP1DEL Bits 7080 7081 extern __at(0x0FBE) __sfr ECCP1DEL; 7082 7083 typedef union 7084 { 7085 struct 7086 { 7087 unsigned P1DC0 : 1; 7088 unsigned P1DC1 : 1; 7089 unsigned P1DC2 : 1; 7090 unsigned P1DC3 : 1; 7091 unsigned P1DC4 : 1; 7092 unsigned P1DC5 : 1; 7093 unsigned P1DC6 : 1; 7094 unsigned P1RSEN : 1; 7095 }; 7096 7097 struct 7098 { 7099 unsigned P1DC : 7; 7100 unsigned : 1; 7101 }; 7102 } __ECCP1DELbits_t; 7103 7104 extern __at(0x0FBE) volatile __ECCP1DELbits_t ECCP1DELbits; 7105 7106 #define _P1DC0 0x01 7107 #define _P1DC1 0x02 7108 #define _P1DC2 0x04 7109 #define _P1DC3 0x08 7110 #define _P1DC4 0x10 7111 #define _P1DC5 0x20 7112 #define _P1DC6 0x40 7113 #define _P1RSEN 0x80 7114 7115 //============================================================================== 7116 7117 7118 //============================================================================== 7119 // PWM1CON Bits 7120 7121 extern __at(0x0FBE) __sfr PWM1CON; 7122 7123 typedef union 7124 { 7125 struct 7126 { 7127 unsigned P1DC0 : 1; 7128 unsigned P1DC1 : 1; 7129 unsigned P1DC2 : 1; 7130 unsigned P1DC3 : 1; 7131 unsigned P1DC4 : 1; 7132 unsigned P1DC5 : 1; 7133 unsigned P1DC6 : 1; 7134 unsigned P1RSEN : 1; 7135 }; 7136 7137 struct 7138 { 7139 unsigned P1DC : 7; 7140 unsigned : 1; 7141 }; 7142 } __PWM1CONbits_t; 7143 7144 extern __at(0x0FBE) volatile __PWM1CONbits_t PWM1CONbits; 7145 7146 #define _PWM1CON_P1DC0 0x01 7147 #define _PWM1CON_P1DC1 0x02 7148 #define _PWM1CON_P1DC2 0x04 7149 #define _PWM1CON_P1DC3 0x08 7150 #define _PWM1CON_P1DC4 0x10 7151 #define _PWM1CON_P1DC5 0x20 7152 #define _PWM1CON_P1DC6 0x40 7153 #define _PWM1CON_P1RSEN 0x80 7154 7155 //============================================================================== 7156 7157 7158 //============================================================================== 7159 // ECCP1AS Bits 7160 7161 extern __at(0x0FBF) __sfr ECCP1AS; 7162 7163 typedef union 7164 { 7165 struct 7166 { 7167 unsigned PSS1BD0 : 1; 7168 unsigned PSS1BD1 : 1; 7169 unsigned PSS1AC0 : 1; 7170 unsigned PSS1AC1 : 1; 7171 unsigned ECCP1AS0 : 1; 7172 unsigned ECCP1AS1 : 1; 7173 unsigned ECCP1AS2 : 1; 7174 unsigned ECCP1ASE : 1; 7175 }; 7176 7177 struct 7178 { 7179 unsigned PSS1BD : 2; 7180 unsigned : 6; 7181 }; 7182 7183 struct 7184 { 7185 unsigned : 2; 7186 unsigned PSS1AC : 2; 7187 unsigned : 4; 7188 }; 7189 7190 struct 7191 { 7192 unsigned : 4; 7193 unsigned ECCP1AS : 3; 7194 unsigned : 1; 7195 }; 7196 } __ECCP1ASbits_t; 7197 7198 extern __at(0x0FBF) volatile __ECCP1ASbits_t ECCP1ASbits; 7199 7200 #define _PSS1BD0 0x01 7201 #define _PSS1BD1 0x02 7202 #define _PSS1AC0 0x04 7203 #define _PSS1AC1 0x08 7204 #define _ECCP1AS0 0x10 7205 #define _ECCP1AS1 0x20 7206 #define _ECCP1AS2 0x40 7207 #define _ECCP1ASE 0x80 7208 7209 //============================================================================== 7210 7211 7212 //============================================================================== 7213 // ADCON2 Bits 7214 7215 extern __at(0x0FC0) __sfr ADCON2; 7216 7217 typedef union 7218 { 7219 struct 7220 { 7221 unsigned ADCS0 : 1; 7222 unsigned ADCS1 : 1; 7223 unsigned ADCS2 : 1; 7224 unsigned ACQT0 : 1; 7225 unsigned ACQT1 : 1; 7226 unsigned ACQT2 : 1; 7227 unsigned : 1; 7228 unsigned ADFM : 1; 7229 }; 7230 7231 struct 7232 { 7233 unsigned ADCS : 3; 7234 unsigned : 5; 7235 }; 7236 7237 struct 7238 { 7239 unsigned : 3; 7240 unsigned ACQT : 3; 7241 unsigned : 2; 7242 }; 7243 } __ADCON2bits_t; 7244 7245 extern __at(0x0FC0) volatile __ADCON2bits_t ADCON2bits; 7246 7247 #define _ADCS0 0x01 7248 #define _ADCS1 0x02 7249 #define _ADCS2 0x04 7250 #define _ACQT0 0x08 7251 #define _ACQT1 0x10 7252 #define _ACQT2 0x20 7253 #define _ADFM 0x80 7254 7255 //============================================================================== 7256 7257 7258 //============================================================================== 7259 // ADCON1 Bits 7260 7261 extern __at(0x0FC1) __sfr ADCON1; 7262 7263 typedef union 7264 { 7265 struct 7266 { 7267 unsigned CHSN0 : 1; 7268 unsigned CHSN1 : 1; 7269 unsigned CHSN2 : 1; 7270 unsigned VNCFG : 1; 7271 unsigned VCFG0 : 1; 7272 unsigned VCFG1 : 1; 7273 unsigned TRIGSEL0 : 1; 7274 unsigned TRIGSEL1 : 1; 7275 }; 7276 7277 struct 7278 { 7279 unsigned CHSN : 3; 7280 unsigned : 5; 7281 }; 7282 7283 struct 7284 { 7285 unsigned : 4; 7286 unsigned VCFG : 2; 7287 unsigned : 2; 7288 }; 7289 7290 struct 7291 { 7292 unsigned : 6; 7293 unsigned TRIGSEL : 2; 7294 }; 7295 } __ADCON1bits_t; 7296 7297 extern __at(0x0FC1) volatile __ADCON1bits_t ADCON1bits; 7298 7299 #define _CHSN0 0x01 7300 #define _CHSN1 0x02 7301 #define _CHSN2 0x04 7302 #define _VNCFG 0x08 7303 #define _VCFG0 0x10 7304 #define _VCFG1 0x20 7305 #define _TRIGSEL0 0x40 7306 #define _TRIGSEL1 0x80 7307 7308 //============================================================================== 7309 7310 7311 //============================================================================== 7312 // ADCON0 Bits 7313 7314 extern __at(0x0FC2) __sfr ADCON0; 7315 7316 typedef union 7317 { 7318 struct 7319 { 7320 unsigned ADON : 1; 7321 unsigned GO_NOT_DONE : 1; 7322 unsigned CHS0 : 1; 7323 unsigned CHS1 : 1; 7324 unsigned CHS2 : 1; 7325 unsigned CHS3 : 1; 7326 unsigned CHS4 : 1; 7327 unsigned : 1; 7328 }; 7329 7330 struct 7331 { 7332 unsigned : 1; 7333 unsigned DONE : 1; 7334 unsigned : 1; 7335 unsigned : 1; 7336 unsigned : 1; 7337 unsigned : 1; 7338 unsigned : 1; 7339 unsigned : 1; 7340 }; 7341 7342 struct 7343 { 7344 unsigned : 1; 7345 unsigned GO : 1; 7346 unsigned : 1; 7347 unsigned : 1; 7348 unsigned : 1; 7349 unsigned : 1; 7350 unsigned : 1; 7351 unsigned : 1; 7352 }; 7353 7354 struct 7355 { 7356 unsigned : 1; 7357 unsigned NOT_DONE : 1; 7358 unsigned : 1; 7359 unsigned : 1; 7360 unsigned : 1; 7361 unsigned : 1; 7362 unsigned : 1; 7363 unsigned : 1; 7364 }; 7365 7366 struct 7367 { 7368 unsigned : 2; 7369 unsigned CHS : 5; 7370 unsigned : 1; 7371 }; 7372 } __ADCON0bits_t; 7373 7374 extern __at(0x0FC2) volatile __ADCON0bits_t ADCON0bits; 7375 7376 #define _ADON 0x01 7377 #define _GO_NOT_DONE 0x02 7378 #define _DONE 0x02 7379 #define _GO 0x02 7380 #define _NOT_DONE 0x02 7381 #define _CHS0 0x04 7382 #define _CHS1 0x08 7383 #define _CHS2 0x10 7384 #define _CHS3 0x20 7385 #define _CHS4 0x40 7386 7387 //============================================================================== 7388 7389 extern __at(0x0FC3) __sfr ADRES; 7390 extern __at(0x0FC3) __sfr ADRESL; 7391 extern __at(0x0FC4) __sfr ADRESH; 7392 7393 //============================================================================== 7394 // SSP1CON2 Bits 7395 7396 extern __at(0x0FC5) __sfr SSP1CON2; 7397 7398 typedef union 7399 { 7400 struct 7401 { 7402 unsigned SEN : 1; 7403 unsigned RSEN : 1; 7404 unsigned PEN : 1; 7405 unsigned RCEN : 1; 7406 unsigned ACKEN : 1; 7407 unsigned ACKDT : 1; 7408 unsigned ACKSTAT : 1; 7409 unsigned GCEN : 1; 7410 }; 7411 7412 struct 7413 { 7414 unsigned : 1; 7415 unsigned ADMSK1 : 1; 7416 unsigned ADMSK2 : 1; 7417 unsigned ADMSK3 : 1; 7418 unsigned ADMSK4 : 1; 7419 unsigned ADMSK5 : 1; 7420 unsigned : 1; 7421 unsigned : 1; 7422 }; 7423 } __SSP1CON2bits_t; 7424 7425 extern __at(0x0FC5) volatile __SSP1CON2bits_t SSP1CON2bits; 7426 7427 #define _SEN 0x01 7428 #define _RSEN 0x02 7429 #define _ADMSK1 0x02 7430 #define _PEN 0x04 7431 #define _ADMSK2 0x04 7432 #define _RCEN 0x08 7433 #define _ADMSK3 0x08 7434 #define _ACKEN 0x10 7435 #define _ADMSK4 0x10 7436 #define _ACKDT 0x20 7437 #define _ADMSK5 0x20 7438 #define _ACKSTAT 0x40 7439 #define _GCEN 0x80 7440 7441 //============================================================================== 7442 7443 7444 //============================================================================== 7445 // SSPCON2 Bits 7446 7447 extern __at(0x0FC5) __sfr SSPCON2; 7448 7449 typedef union 7450 { 7451 struct 7452 { 7453 unsigned SEN : 1; 7454 unsigned RSEN : 1; 7455 unsigned PEN : 1; 7456 unsigned RCEN : 1; 7457 unsigned ACKEN : 1; 7458 unsigned ACKDT : 1; 7459 unsigned ACKSTAT : 1; 7460 unsigned GCEN : 1; 7461 }; 7462 7463 struct 7464 { 7465 unsigned : 1; 7466 unsigned ADMSK1 : 1; 7467 unsigned ADMSK2 : 1; 7468 unsigned ADMSK3 : 1; 7469 unsigned ADMSK4 : 1; 7470 unsigned ADMSK5 : 1; 7471 unsigned : 1; 7472 unsigned : 1; 7473 }; 7474 } __SSPCON2bits_t; 7475 7476 extern __at(0x0FC5) volatile __SSPCON2bits_t SSPCON2bits; 7477 7478 #define _SSPCON2_SEN 0x01 7479 #define _SSPCON2_RSEN 0x02 7480 #define _SSPCON2_ADMSK1 0x02 7481 #define _SSPCON2_PEN 0x04 7482 #define _SSPCON2_ADMSK2 0x04 7483 #define _SSPCON2_RCEN 0x08 7484 #define _SSPCON2_ADMSK3 0x08 7485 #define _SSPCON2_ACKEN 0x10 7486 #define _SSPCON2_ADMSK4 0x10 7487 #define _SSPCON2_ACKDT 0x20 7488 #define _SSPCON2_ADMSK5 0x20 7489 #define _SSPCON2_ACKSTAT 0x40 7490 #define _SSPCON2_GCEN 0x80 7491 7492 //============================================================================== 7493 7494 7495 //============================================================================== 7496 // SSP1CON1 Bits 7497 7498 extern __at(0x0FC6) __sfr SSP1CON1; 7499 7500 typedef union 7501 { 7502 struct 7503 { 7504 unsigned SSPM0 : 1; 7505 unsigned SSPM1 : 1; 7506 unsigned SSPM2 : 1; 7507 unsigned SSPM3 : 1; 7508 unsigned CKP : 1; 7509 unsigned SSPEN : 1; 7510 unsigned SSPOV : 1; 7511 unsigned WCOL : 1; 7512 }; 7513 7514 struct 7515 { 7516 unsigned SSPM : 4; 7517 unsigned : 4; 7518 }; 7519 } __SSP1CON1bits_t; 7520 7521 extern __at(0x0FC6) volatile __SSP1CON1bits_t SSP1CON1bits; 7522 7523 #define _SSPM0 0x01 7524 #define _SSPM1 0x02 7525 #define _SSPM2 0x04 7526 #define _SSPM3 0x08 7527 #define _CKP 0x10 7528 #define _SSPEN 0x20 7529 #define _SSPOV 0x40 7530 #define _WCOL 0x80 7531 7532 //============================================================================== 7533 7534 7535 //============================================================================== 7536 // SSPCON1 Bits 7537 7538 extern __at(0x0FC6) __sfr SSPCON1; 7539 7540 typedef union 7541 { 7542 struct 7543 { 7544 unsigned SSPM0 : 1; 7545 unsigned SSPM1 : 1; 7546 unsigned SSPM2 : 1; 7547 unsigned SSPM3 : 1; 7548 unsigned CKP : 1; 7549 unsigned SSPEN : 1; 7550 unsigned SSPOV : 1; 7551 unsigned WCOL : 1; 7552 }; 7553 7554 struct 7555 { 7556 unsigned SSPM : 4; 7557 unsigned : 4; 7558 }; 7559 } __SSPCON1bits_t; 7560 7561 extern __at(0x0FC6) volatile __SSPCON1bits_t SSPCON1bits; 7562 7563 #define _SSPCON1_SSPM0 0x01 7564 #define _SSPCON1_SSPM1 0x02 7565 #define _SSPCON1_SSPM2 0x04 7566 #define _SSPCON1_SSPM3 0x08 7567 #define _SSPCON1_CKP 0x10 7568 #define _SSPCON1_SSPEN 0x20 7569 #define _SSPCON1_SSPOV 0x40 7570 #define _SSPCON1_WCOL 0x80 7571 7572 //============================================================================== 7573 7574 7575 //============================================================================== 7576 // SSP1STAT Bits 7577 7578 extern __at(0x0FC7) __sfr SSP1STAT; 7579 7580 typedef union 7581 { 7582 struct 7583 { 7584 unsigned BF : 1; 7585 unsigned UA : 1; 7586 unsigned R_NOT_W : 1; 7587 unsigned S : 1; 7588 unsigned P : 1; 7589 unsigned D_NOT_A : 1; 7590 unsigned CKE : 1; 7591 unsigned SMP : 1; 7592 }; 7593 7594 struct 7595 { 7596 unsigned : 1; 7597 unsigned : 1; 7598 unsigned R : 1; 7599 unsigned I2C_START : 1; 7600 unsigned I2C_STOP : 1; 7601 unsigned D : 1; 7602 unsigned : 1; 7603 unsigned : 1; 7604 }; 7605 7606 struct 7607 { 7608 unsigned : 1; 7609 unsigned : 1; 7610 unsigned R_W : 1; 7611 unsigned : 1; 7612 unsigned : 1; 7613 unsigned D_A : 1; 7614 unsigned : 1; 7615 unsigned : 1; 7616 }; 7617 7618 struct 7619 { 7620 unsigned : 1; 7621 unsigned : 1; 7622 unsigned NOT_W : 1; 7623 unsigned : 1; 7624 unsigned : 1; 7625 unsigned NOT_A : 1; 7626 unsigned : 1; 7627 unsigned : 1; 7628 }; 7629 7630 struct 7631 { 7632 unsigned : 1; 7633 unsigned : 1; 7634 unsigned NOT_WRITE : 1; 7635 unsigned : 1; 7636 unsigned : 1; 7637 unsigned NOT_ADDRESS : 1; 7638 unsigned : 1; 7639 unsigned : 1; 7640 }; 7641 7642 struct 7643 { 7644 unsigned : 1; 7645 unsigned : 1; 7646 unsigned READ_WRITE : 1; 7647 unsigned : 1; 7648 unsigned : 1; 7649 unsigned DATA_ADDRESS : 1; 7650 unsigned : 1; 7651 unsigned : 1; 7652 }; 7653 7654 struct 7655 { 7656 unsigned : 1; 7657 unsigned : 1; 7658 unsigned I2C_READ : 1; 7659 unsigned : 1; 7660 unsigned : 1; 7661 unsigned I2C_DAT : 1; 7662 unsigned : 1; 7663 unsigned : 1; 7664 }; 7665 } __SSP1STATbits_t; 7666 7667 extern __at(0x0FC7) volatile __SSP1STATbits_t SSP1STATbits; 7668 7669 #define _BF 0x01 7670 #define _UA 0x02 7671 #define _R_NOT_W 0x04 7672 #define _R 0x04 7673 #define _R_W 0x04 7674 #define _NOT_W 0x04 7675 #define _NOT_WRITE 0x04 7676 #define _READ_WRITE 0x04 7677 #define _I2C_READ 0x04 7678 #define _S 0x08 7679 #define _I2C_START 0x08 7680 #define _P 0x10 7681 #define _I2C_STOP 0x10 7682 #define _D_NOT_A 0x20 7683 #define _D 0x20 7684 #define _D_A 0x20 7685 #define _NOT_A 0x20 7686 #define _NOT_ADDRESS 0x20 7687 #define _DATA_ADDRESS 0x20 7688 #define _I2C_DAT 0x20 7689 #define _CKE 0x40 7690 #define _SMP 0x80 7691 7692 //============================================================================== 7693 7694 7695 //============================================================================== 7696 // SSPSTAT Bits 7697 7698 extern __at(0x0FC7) __sfr SSPSTAT; 7699 7700 typedef union 7701 { 7702 struct 7703 { 7704 unsigned BF : 1; 7705 unsigned UA : 1; 7706 unsigned R_NOT_W : 1; 7707 unsigned S : 1; 7708 unsigned P : 1; 7709 unsigned D_NOT_A : 1; 7710 unsigned CKE : 1; 7711 unsigned SMP : 1; 7712 }; 7713 7714 struct 7715 { 7716 unsigned : 1; 7717 unsigned : 1; 7718 unsigned R : 1; 7719 unsigned I2C_START : 1; 7720 unsigned I2C_STOP : 1; 7721 unsigned D : 1; 7722 unsigned : 1; 7723 unsigned : 1; 7724 }; 7725 7726 struct 7727 { 7728 unsigned : 1; 7729 unsigned : 1; 7730 unsigned R_W : 1; 7731 unsigned : 1; 7732 unsigned : 1; 7733 unsigned D_A : 1; 7734 unsigned : 1; 7735 unsigned : 1; 7736 }; 7737 7738 struct 7739 { 7740 unsigned : 1; 7741 unsigned : 1; 7742 unsigned NOT_W : 1; 7743 unsigned : 1; 7744 unsigned : 1; 7745 unsigned NOT_A : 1; 7746 unsigned : 1; 7747 unsigned : 1; 7748 }; 7749 7750 struct 7751 { 7752 unsigned : 1; 7753 unsigned : 1; 7754 unsigned NOT_WRITE : 1; 7755 unsigned : 1; 7756 unsigned : 1; 7757 unsigned NOT_ADDRESS : 1; 7758 unsigned : 1; 7759 unsigned : 1; 7760 }; 7761 7762 struct 7763 { 7764 unsigned : 1; 7765 unsigned : 1; 7766 unsigned READ_WRITE : 1; 7767 unsigned : 1; 7768 unsigned : 1; 7769 unsigned DATA_ADDRESS : 1; 7770 unsigned : 1; 7771 unsigned : 1; 7772 }; 7773 7774 struct 7775 { 7776 unsigned : 1; 7777 unsigned : 1; 7778 unsigned I2C_READ : 1; 7779 unsigned : 1; 7780 unsigned : 1; 7781 unsigned I2C_DAT : 1; 7782 unsigned : 1; 7783 unsigned : 1; 7784 }; 7785 } __SSPSTATbits_t; 7786 7787 extern __at(0x0FC7) volatile __SSPSTATbits_t SSPSTATbits; 7788 7789 #define _SSPSTAT_BF 0x01 7790 #define _SSPSTAT_UA 0x02 7791 #define _SSPSTAT_R_NOT_W 0x04 7792 #define _SSPSTAT_R 0x04 7793 #define _SSPSTAT_R_W 0x04 7794 #define _SSPSTAT_NOT_W 0x04 7795 #define _SSPSTAT_NOT_WRITE 0x04 7796 #define _SSPSTAT_READ_WRITE 0x04 7797 #define _SSPSTAT_I2C_READ 0x04 7798 #define _SSPSTAT_S 0x08 7799 #define _SSPSTAT_I2C_START 0x08 7800 #define _SSPSTAT_P 0x10 7801 #define _SSPSTAT_I2C_STOP 0x10 7802 #define _SSPSTAT_D_NOT_A 0x20 7803 #define _SSPSTAT_D 0x20 7804 #define _SSPSTAT_D_A 0x20 7805 #define _SSPSTAT_NOT_A 0x20 7806 #define _SSPSTAT_NOT_ADDRESS 0x20 7807 #define _SSPSTAT_DATA_ADDRESS 0x20 7808 #define _SSPSTAT_I2C_DAT 0x20 7809 #define _SSPSTAT_CKE 0x40 7810 #define _SSPSTAT_SMP 0x80 7811 7812 //============================================================================== 7813 7814 7815 //============================================================================== 7816 // SSP1ADD Bits 7817 7818 extern __at(0x0FC8) __sfr SSP1ADD; 7819 7820 typedef struct 7821 { 7822 unsigned MSK0 : 1; 7823 unsigned MSK1 : 1; 7824 unsigned MSK2 : 1; 7825 unsigned MSK3 : 1; 7826 unsigned MSK4 : 1; 7827 unsigned MSK5 : 1; 7828 unsigned MSK6 : 1; 7829 unsigned MSK7 : 1; 7830 } __SSP1ADDbits_t; 7831 7832 extern __at(0x0FC8) volatile __SSP1ADDbits_t SSP1ADDbits; 7833 7834 #define _MSK0 0x01 7835 #define _MSK1 0x02 7836 #define _MSK2 0x04 7837 #define _MSK3 0x08 7838 #define _MSK4 0x10 7839 #define _MSK5 0x20 7840 #define _MSK6 0x40 7841 #define _MSK7 0x80 7842 7843 //============================================================================== 7844 7845 7846 //============================================================================== 7847 // SSPADD Bits 7848 7849 extern __at(0x0FC8) __sfr SSPADD; 7850 7851 typedef struct 7852 { 7853 unsigned MSK0 : 1; 7854 unsigned MSK1 : 1; 7855 unsigned MSK2 : 1; 7856 unsigned MSK3 : 1; 7857 unsigned MSK4 : 1; 7858 unsigned MSK5 : 1; 7859 unsigned MSK6 : 1; 7860 unsigned MSK7 : 1; 7861 } __SSPADDbits_t; 7862 7863 extern __at(0x0FC8) volatile __SSPADDbits_t SSPADDbits; 7864 7865 #define _SSPADD_MSK0 0x01 7866 #define _SSPADD_MSK1 0x02 7867 #define _SSPADD_MSK2 0x04 7868 #define _SSPADD_MSK3 0x08 7869 #define _SSPADD_MSK4 0x10 7870 #define _SSPADD_MSK5 0x20 7871 #define _SSPADD_MSK6 0x40 7872 #define _SSPADD_MSK7 0x80 7873 7874 //============================================================================== 7875 7876 extern __at(0x0FC9) __sfr SSP1BUF; 7877 extern __at(0x0FC9) __sfr SSPBUF; 7878 7879 //============================================================================== 7880 // T2CON Bits 7881 7882 extern __at(0x0FCA) __sfr T2CON; 7883 7884 typedef union 7885 { 7886 struct 7887 { 7888 unsigned T2CKPS0 : 1; 7889 unsigned T2CKPS1 : 1; 7890 unsigned TMR2ON : 1; 7891 unsigned T2OUTPS0 : 1; 7892 unsigned T2OUTPS1 : 1; 7893 unsigned T2OUTPS2 : 1; 7894 unsigned T2OUTPS3 : 1; 7895 unsigned : 1; 7896 }; 7897 7898 struct 7899 { 7900 unsigned T2CKPS : 2; 7901 unsigned : 6; 7902 }; 7903 7904 struct 7905 { 7906 unsigned : 3; 7907 unsigned T2OUTPS : 4; 7908 unsigned : 1; 7909 }; 7910 } __T2CONbits_t; 7911 7912 extern __at(0x0FCA) volatile __T2CONbits_t T2CONbits; 7913 7914 #define _T2CKPS0 0x01 7915 #define _T2CKPS1 0x02 7916 #define _TMR2ON 0x04 7917 #define _T2OUTPS0 0x08 7918 #define _T2OUTPS1 0x10 7919 #define _T2OUTPS2 0x20 7920 #define _T2OUTPS3 0x40 7921 7922 //============================================================================== 7923 7924 extern __at(0x0FCB) __sfr PR2; 7925 extern __at(0x0FCC) __sfr TMR2; 7926 7927 //============================================================================== 7928 // T1CON Bits 7929 7930 extern __at(0x0FCD) __sfr T1CON; 7931 7932 typedef union 7933 { 7934 struct 7935 { 7936 unsigned TMR1ON : 1; 7937 unsigned RD16 : 1; 7938 unsigned NOT_T1SYNC : 1; 7939 unsigned SOSCEN : 1; 7940 unsigned T1CKPS0 : 1; 7941 unsigned T1CKPS1 : 1; 7942 unsigned TMR1CS0 : 1; 7943 unsigned TMR1CS1 : 1; 7944 }; 7945 7946 struct 7947 { 7948 unsigned : 4; 7949 unsigned T1CKPS : 2; 7950 unsigned : 2; 7951 }; 7952 7953 struct 7954 { 7955 unsigned : 6; 7956 unsigned TMR1CS : 2; 7957 }; 7958 } __T1CONbits_t; 7959 7960 extern __at(0x0FCD) volatile __T1CONbits_t T1CONbits; 7961 7962 #define _TMR1ON 0x01 7963 #define _RD16 0x02 7964 #define _NOT_T1SYNC 0x04 7965 #define _SOSCEN 0x08 7966 #define _T1CKPS0 0x10 7967 #define _T1CKPS1 0x20 7968 #define _TMR1CS0 0x40 7969 #define _TMR1CS1 0x80 7970 7971 //============================================================================== 7972 7973 extern __at(0x0FCE) __sfr TMR1; 7974 extern __at(0x0FCE) __sfr TMR1L; 7975 extern __at(0x0FCF) __sfr TMR1H; 7976 7977 //============================================================================== 7978 // RCON Bits 7979 7980 extern __at(0x0FD0) __sfr RCON; 7981 7982 typedef union 7983 { 7984 struct 7985 { 7986 unsigned NOT_BOR : 1; 7987 unsigned NOT_POR : 1; 7988 unsigned NOT_PD : 1; 7989 unsigned NOT_TO : 1; 7990 unsigned NOT_RI : 1; 7991 unsigned NOT_CM : 1; 7992 unsigned SBOREN : 1; 7993 unsigned IPEN : 1; 7994 }; 7995 7996 struct 7997 { 7998 unsigned BOR : 1; 7999 unsigned POR : 1; 8000 unsigned PD : 1; 8001 unsigned TO : 1; 8002 unsigned RI : 1; 8003 unsigned CM : 1; 8004 unsigned : 1; 8005 unsigned : 1; 8006 }; 8007 } __RCONbits_t; 8008 8009 extern __at(0x0FD0) volatile __RCONbits_t RCONbits; 8010 8011 #define _NOT_BOR 0x01 8012 #define _BOR 0x01 8013 #define _NOT_POR 0x02 8014 #define _POR 0x02 8015 #define _NOT_PD 0x04 8016 #define _PD 0x04 8017 #define _NOT_TO 0x08 8018 #define _TO 0x08 8019 #define _NOT_RI 0x10 8020 #define _RI 0x10 8021 #define _NOT_CM 0x20 8022 #define _CM 0x20 8023 #define _SBOREN 0x40 8024 #define _IPEN 0x80 8025 8026 //============================================================================== 8027 8028 8029 //============================================================================== 8030 // WDTCON Bits 8031 8032 extern __at(0x0FD1) __sfr WDTCON; 8033 8034 typedef union 8035 { 8036 struct 8037 { 8038 unsigned SWDTEN : 1; 8039 unsigned ULPSINK : 1; 8040 unsigned ULPEN : 1; 8041 unsigned : 1; 8042 unsigned SRETEN : 1; 8043 unsigned ULPLVL : 1; 8044 unsigned : 1; 8045 unsigned REGSLP : 1; 8046 }; 8047 8048 struct 8049 { 8050 unsigned SWDTE : 1; 8051 unsigned : 1; 8052 unsigned : 1; 8053 unsigned : 1; 8054 unsigned : 1; 8055 unsigned : 1; 8056 unsigned : 1; 8057 unsigned : 1; 8058 }; 8059 } __WDTCONbits_t; 8060 8061 extern __at(0x0FD1) volatile __WDTCONbits_t WDTCONbits; 8062 8063 #define _SWDTEN 0x01 8064 #define _SWDTE 0x01 8065 #define _ULPSINK 0x02 8066 #define _ULPEN 0x04 8067 #define _SRETEN 0x10 8068 #define _ULPLVL 0x20 8069 #define _REGSLP 0x80 8070 8071 //============================================================================== 8072 8073 8074 //============================================================================== 8075 // IPR5 Bits 8076 8077 extern __at(0x0FD2) __sfr IPR5; 8078 8079 typedef struct 8080 { 8081 unsigned TMR4IP : 1; 8082 unsigned TMR5IP : 1; 8083 unsigned TMR6IP : 1; 8084 unsigned : 1; 8085 unsigned TMR8IP : 1; 8086 unsigned : 1; 8087 unsigned : 1; 8088 unsigned : 1; 8089 } __IPR5bits_t; 8090 8091 extern __at(0x0FD2) volatile __IPR5bits_t IPR5bits; 8092 8093 #define _TMR4IP 0x01 8094 #define _TMR5IP 0x02 8095 #define _TMR6IP 0x04 8096 #define _TMR8IP 0x10 8097 8098 //============================================================================== 8099 8100 8101 //============================================================================== 8102 // OSCCON Bits 8103 8104 extern __at(0x0FD3) __sfr OSCCON; 8105 8106 typedef union 8107 { 8108 struct 8109 { 8110 unsigned SCS0 : 1; 8111 unsigned SCS1 : 1; 8112 unsigned HFIOFS : 1; 8113 unsigned OSTS : 1; 8114 unsigned IRCF0 : 1; 8115 unsigned IRCF1 : 1; 8116 unsigned IRCF2 : 1; 8117 unsigned IDLEN : 1; 8118 }; 8119 8120 struct 8121 { 8122 unsigned SCS : 2; 8123 unsigned : 6; 8124 }; 8125 8126 struct 8127 { 8128 unsigned : 4; 8129 unsigned IRCF : 3; 8130 unsigned : 1; 8131 }; 8132 } __OSCCONbits_t; 8133 8134 extern __at(0x0FD3) volatile __OSCCONbits_t OSCCONbits; 8135 8136 #define _SCS0 0x01 8137 #define _SCS1 0x02 8138 #define _HFIOFS 0x04 8139 #define _OSTS 0x08 8140 #define _IRCF0 0x10 8141 #define _IRCF1 0x20 8142 #define _IRCF2 0x40 8143 #define _IDLEN 0x80 8144 8145 //============================================================================== 8146 8147 extern __at(0x0FD4) __sfr SPBRGH1; 8148 8149 //============================================================================== 8150 // T0CON Bits 8151 8152 extern __at(0x0FD5) __sfr T0CON; 8153 8154 typedef union 8155 { 8156 struct 8157 { 8158 unsigned T0PS0 : 1; 8159 unsigned T0PS1 : 1; 8160 unsigned T0PS2 : 1; 8161 unsigned PSA : 1; 8162 unsigned T0SE : 1; 8163 unsigned T0CS : 1; 8164 unsigned T08BIT : 1; 8165 unsigned TMR0ON : 1; 8166 }; 8167 8168 struct 8169 { 8170 unsigned T0PS : 3; 8171 unsigned : 5; 8172 }; 8173 } __T0CONbits_t; 8174 8175 extern __at(0x0FD5) volatile __T0CONbits_t T0CONbits; 8176 8177 #define _T0PS0 0x01 8178 #define _T0PS1 0x02 8179 #define _T0PS2 0x04 8180 #define _PSA 0x08 8181 #define _T0SE 0x10 8182 #define _T0CS 0x20 8183 #define _T08BIT 0x40 8184 #define _TMR0ON 0x80 8185 8186 //============================================================================== 8187 8188 extern __at(0x0FD6) __sfr TMR0; 8189 extern __at(0x0FD6) __sfr TMR0L; 8190 extern __at(0x0FD7) __sfr TMR0H; 8191 8192 //============================================================================== 8193 // STATUS Bits 8194 8195 extern __at(0x0FD8) __sfr STATUS; 8196 8197 typedef struct 8198 { 8199 unsigned C : 1; 8200 unsigned DC : 1; 8201 unsigned Z : 1; 8202 unsigned OV : 1; 8203 unsigned N : 1; 8204 unsigned : 1; 8205 unsigned : 1; 8206 unsigned : 1; 8207 } __STATUSbits_t; 8208 8209 extern __at(0x0FD8) volatile __STATUSbits_t STATUSbits; 8210 8211 #define _C 0x01 8212 #define _DC 0x02 8213 #define _Z 0x04 8214 #define _OV 0x08 8215 #define _N 0x10 8216 8217 //============================================================================== 8218 8219 extern __at(0x0FD9) __sfr FSR2L; 8220 extern __at(0x0FDA) __sfr FSR2H; 8221 extern __at(0x0FDB) __sfr PLUSW2; 8222 extern __at(0x0FDC) __sfr PREINC2; 8223 extern __at(0x0FDD) __sfr POSTDEC2; 8224 extern __at(0x0FDE) __sfr POSTINC2; 8225 extern __at(0x0FDF) __sfr INDF2; 8226 extern __at(0x0FE0) __sfr BSR; 8227 extern __at(0x0FE1) __sfr FSR1L; 8228 extern __at(0x0FE2) __sfr FSR1H; 8229 extern __at(0x0FE3) __sfr PLUSW1; 8230 extern __at(0x0FE4) __sfr PREINC1; 8231 extern __at(0x0FE5) __sfr POSTDEC1; 8232 extern __at(0x0FE6) __sfr POSTINC1; 8233 extern __at(0x0FE7) __sfr INDF1; 8234 extern __at(0x0FE8) __sfr WREG; 8235 extern __at(0x0FE9) __sfr FSR0L; 8236 extern __at(0x0FEA) __sfr FSR0H; 8237 extern __at(0x0FEB) __sfr PLUSW0; 8238 extern __at(0x0FEC) __sfr PREINC0; 8239 extern __at(0x0FED) __sfr POSTDEC0; 8240 extern __at(0x0FEE) __sfr POSTINC0; 8241 extern __at(0x0FEF) __sfr INDF0; 8242 8243 //============================================================================== 8244 // INTCON3 Bits 8245 8246 extern __at(0x0FF0) __sfr INTCON3; 8247 8248 typedef union 8249 { 8250 struct 8251 { 8252 unsigned INT1IF : 1; 8253 unsigned INT2IF : 1; 8254 unsigned INT3IF : 1; 8255 unsigned INT1IE : 1; 8256 unsigned INT2IE : 1; 8257 unsigned INT3IE : 1; 8258 unsigned INT1IP : 1; 8259 unsigned INT2IP : 1; 8260 }; 8261 8262 struct 8263 { 8264 unsigned INT1F : 1; 8265 unsigned INT2F : 1; 8266 unsigned INT3F : 1; 8267 unsigned INT1E : 1; 8268 unsigned INT2E : 1; 8269 unsigned INT3E : 1; 8270 unsigned INT1P : 1; 8271 unsigned INT2P : 1; 8272 }; 8273 } __INTCON3bits_t; 8274 8275 extern __at(0x0FF0) volatile __INTCON3bits_t INTCON3bits; 8276 8277 #define _INT1IF 0x01 8278 #define _INT1F 0x01 8279 #define _INT2IF 0x02 8280 #define _INT2F 0x02 8281 #define _INT3IF 0x04 8282 #define _INT3F 0x04 8283 #define _INT1IE 0x08 8284 #define _INT1E 0x08 8285 #define _INT2IE 0x10 8286 #define _INT2E 0x10 8287 #define _INT3IE 0x20 8288 #define _INT3E 0x20 8289 #define _INT1IP 0x40 8290 #define _INT1P 0x40 8291 #define _INT2IP 0x80 8292 #define _INT2P 0x80 8293 8294 //============================================================================== 8295 8296 8297 //============================================================================== 8298 // INTCON2 Bits 8299 8300 extern __at(0x0FF1) __sfr INTCON2; 8301 8302 typedef union 8303 { 8304 struct 8305 { 8306 unsigned RBIP : 1; 8307 unsigned INT3IP : 1; 8308 unsigned TMR0IP : 1; 8309 unsigned INTEDG3 : 1; 8310 unsigned INTEDG2 : 1; 8311 unsigned INTEDG1 : 1; 8312 unsigned INTEDG0 : 1; 8313 unsigned NOT_RBPU : 1; 8314 }; 8315 8316 struct 8317 { 8318 unsigned : 1; 8319 unsigned INT3P : 1; 8320 unsigned T0IP : 1; 8321 unsigned : 1; 8322 unsigned : 1; 8323 unsigned : 1; 8324 unsigned : 1; 8325 unsigned RBPU : 1; 8326 }; 8327 } __INTCON2bits_t; 8328 8329 extern __at(0x0FF1) volatile __INTCON2bits_t INTCON2bits; 8330 8331 #define _RBIP 0x01 8332 #define _INT3IP 0x02 8333 #define _INT3P 0x02 8334 #define _TMR0IP 0x04 8335 #define _T0IP 0x04 8336 #define _INTEDG3 0x08 8337 #define _INTEDG2 0x10 8338 #define _INTEDG1 0x20 8339 #define _INTEDG0 0x40 8340 #define _NOT_RBPU 0x80 8341 #define _RBPU 0x80 8342 8343 //============================================================================== 8344 8345 8346 //============================================================================== 8347 // INTCON Bits 8348 8349 extern __at(0x0FF2) __sfr INTCON; 8350 8351 typedef union 8352 { 8353 struct 8354 { 8355 unsigned RBIF : 1; 8356 unsigned INT0IF : 1; 8357 unsigned TMR0IF : 1; 8358 unsigned RBIE : 1; 8359 unsigned INT0IE : 1; 8360 unsigned TMR0IE : 1; 8361 unsigned PEIE_GIEL : 1; 8362 unsigned GIE_GIEH : 1; 8363 }; 8364 8365 struct 8366 { 8367 unsigned : 1; 8368 unsigned INT0F : 1; 8369 unsigned T0IF : 1; 8370 unsigned : 1; 8371 unsigned INT0E : 1; 8372 unsigned T0IE : 1; 8373 unsigned PEIE : 1; 8374 unsigned GIE : 1; 8375 }; 8376 8377 struct 8378 { 8379 unsigned : 1; 8380 unsigned : 1; 8381 unsigned : 1; 8382 unsigned : 1; 8383 unsigned : 1; 8384 unsigned : 1; 8385 unsigned GIEL : 1; 8386 unsigned GIEH : 1; 8387 }; 8388 } __INTCONbits_t; 8389 8390 extern __at(0x0FF2) volatile __INTCONbits_t INTCONbits; 8391 8392 #define _RBIF 0x01 8393 #define _INT0IF 0x02 8394 #define _INT0F 0x02 8395 #define _TMR0IF 0x04 8396 #define _T0IF 0x04 8397 #define _RBIE 0x08 8398 #define _INT0IE 0x10 8399 #define _INT0E 0x10 8400 #define _TMR0IE 0x20 8401 #define _T0IE 0x20 8402 #define _PEIE_GIEL 0x40 8403 #define _PEIE 0x40 8404 #define _GIEL 0x40 8405 #define _GIE_GIEH 0x80 8406 #define _GIE 0x80 8407 #define _GIEH 0x80 8408 8409 //============================================================================== 8410 8411 extern __at(0x0FF3) __sfr PROD; 8412 extern __at(0x0FF3) __sfr PRODL; 8413 extern __at(0x0FF4) __sfr PRODH; 8414 extern __at(0x0FF5) __sfr TABLAT; 8415 extern __at(0x0FF6) __sfr TBLPTR; 8416 extern __at(0x0FF6) __sfr TBLPTRL; 8417 extern __at(0x0FF7) __sfr TBLPTRH; 8418 extern __at(0x0FF8) __sfr TBLPTRU; 8419 extern __at(0x0FF9) __sfr PC; 8420 extern __at(0x0FF9) __sfr PCL; 8421 extern __at(0x0FFA) __sfr PCLATH; 8422 extern __at(0x0FFB) __sfr PCLATU; 8423 8424 //============================================================================== 8425 // STKPTR Bits 8426 8427 extern __at(0x0FFC) __sfr STKPTR; 8428 8429 typedef union 8430 { 8431 struct 8432 { 8433 unsigned SP0 : 1; 8434 unsigned SP1 : 1; 8435 unsigned SP2 : 1; 8436 unsigned SP3 : 1; 8437 unsigned SP4 : 1; 8438 unsigned : 1; 8439 unsigned STKUNF : 1; 8440 unsigned STKFUL : 1; 8441 }; 8442 8443 struct 8444 { 8445 unsigned : 1; 8446 unsigned : 1; 8447 unsigned : 1; 8448 unsigned : 1; 8449 unsigned : 1; 8450 unsigned : 1; 8451 unsigned : 1; 8452 unsigned STKOVF : 1; 8453 }; 8454 8455 struct 8456 { 8457 unsigned SP : 5; 8458 unsigned : 3; 8459 }; 8460 } __STKPTRbits_t; 8461 8462 extern __at(0x0FFC) volatile __STKPTRbits_t STKPTRbits; 8463 8464 #define _SP0 0x01 8465 #define _SP1 0x02 8466 #define _SP2 0x04 8467 #define _SP3 0x08 8468 #define _SP4 0x10 8469 #define _STKUNF 0x40 8470 #define _STKFUL 0x80 8471 #define _STKOVF 0x80 8472 8473 //============================================================================== 8474 8475 extern __at(0x0FFD) __sfr TOS; 8476 extern __at(0x0FFD) __sfr TOSL; 8477 extern __at(0x0FFE) __sfr TOSH; 8478 extern __at(0x0FFF) __sfr TOSU; 8479 8480 //============================================================================== 8481 // 8482 // Configuration Bits 8483 // 8484 //============================================================================== 8485 8486 #define __CONFIG1L 0x300000 8487 #define __CONFIG1H 0x300001 8488 #define __CONFIG2L 0x300002 8489 #define __CONFIG2H 0x300003 8490 #define __CONFIG3L 0x300004 8491 #define __CONFIG3H 0x300005 8492 #define __CONFIG4L 0x300006 8493 #define __CONFIG5L 0x300008 8494 #define __CONFIG5H 0x300009 8495 #define __CONFIG6L 0x30000A 8496 #define __CONFIG6H 0x30000B 8497 #define __CONFIG7L 0x30000C 8498 #define __CONFIG7H 0x30000D 8499 8500 //----------------------------- CONFIG1L Options ------------------------------- 8501 8502 #define _RETEN_OFF_1L 0xFE // Disabled - Controlled by SRETEN bit. 8503 #define _RETEN_ON_1L 0xFF // Enabled. 8504 #define _INTOSCSEL_LOW_1L 0xFB // LF-INTOSC in Low-power mode during Sleep. 8505 #define _INTOSCSEL_HIGH_1L 0xFF // LF-INTOSC in High-power mode during Sleep. 8506 #define _SOSCSEL_LOW_1L 0xEF // Low Power SOSC circuit selected. 8507 #define _SOSCSEL_DIG_1L 0xF7 // Digital (SCLKI) mode. 8508 #define _SOSCSEL_HIGH_1L 0xFF // High Power SOSC circuit selected. 8509 #define _XINST_OFF_1L 0xBF // Disabled. 8510 #define _XINST_ON_1L 0xFF // Enabled. 8511 8512 //----------------------------- CONFIG1H Options ------------------------------- 8513 8514 #define _FOSC_LP_1H 0xF0 // LP oscillator. 8515 #define _FOSC_XT_1H 0xF1 // XT oscillator. 8516 #define _FOSC_HS2_1H 0xF2 // HS oscillator (High power, 16 MHz - 25 MHz). 8517 #define _FOSC_HS1_1H 0xF3 // HS oscillator (Medium power, 4 MHz - 16 MHz). 8518 #define _FOSC_EC3IO_1H 0xF4 // EC oscillator, CLKOUT function on OSC2 (High power, 16 MHz - 64 MHz). 8519 #define _FOSC_EC3_1H 0xF5 // EC oscillator (High power, 16 MHz - 64 MHz). 8520 #define _FOSC_RC_1H 0xF6 // External RC oscillator, CLKOUT function on OSC2. 8521 #define _FOSC_RCIO_1H 0xF7 // External RC oscillator. 8522 #define _FOSC_INTIO2_1H 0xF8 // Internal RC oscillator. 8523 #define _FOSC_INTIO1_1H 0xF9 // Internal RC oscillator, CLKOUT function on OSC2. 8524 #define _FOSC_EC2IO_1H 0xFA // EC oscillator, CLKOUT function on OSC2 (Medium power, 160 kHz - 16 MHz). 8525 #define _FOSC_EC2_1H 0xFB // EC oscillator (Medium power, 160 kHz - 16 MHz). 8526 #define _FOSC_EC1IO_1H 0xFC // EC oscillator, CLKOUT function on OSC2 (Low power, DC - 160 kHz). 8527 #define _FOSC_EC1_1H 0xFD // EC oscillator (Low power, DC - 160 kHz). 8528 #define _PLLCFG_OFF_1H 0xEF // Disabled. 8529 #define _PLLCFG_ON_1H 0xFF // Enabled. 8530 #define _FCMEN_OFF_1H 0xBF // Disabled. 8531 #define _FCMEN_ON_1H 0xFF // Enabled. 8532 #define _IESO_OFF_1H 0x7F // Disabled. 8533 #define _IESO_ON_1H 0xFF // Enabled. 8534 8535 //----------------------------- CONFIG2L Options ------------------------------- 8536 8537 #define _PWRTEN_ON_2L 0xFE // Enabled. 8538 #define _PWRTEN_OFF_2L 0xFF // Disabled. 8539 #define _BOREN_OFF_2L 0xF9 // Disabled in hardware, SBOREN disabled. 8540 #define _BOREN_ON_2L 0xFB // Controlled with SBOREN bit. 8541 #define _BOREN_NOSLP_2L 0xFD // Enabled while active, disabled in SLEEP, SBOREN disabled. 8542 #define _BOREN_SBORDIS_2L 0xFF // Enabled in hardware, SBOREN disabled. 8543 #define _BORV_0_2L 0xE7 // 3.0V. 8544 #define _BORV_1_2L 0xEF // 2.7V. 8545 #define _BORV_2_2L 0xF7 // 2.0V. 8546 #define _BORV_3_2L 0xFF // 1.8V. 8547 #define _BORPWR_LOW_2L 0x9F // BORMV set to low power level. 8548 #define _BORPWR_MEDIUM_2L 0xBF // BORMV set to medium power level. 8549 #define _BORPWR_HIGH_2L 0xDF // BORMV set to high power level. 8550 #define _BORPWR_ZPBORMV_2L 0xFF // ZPBORMV instead of BORMV is selected. 8551 8552 //----------------------------- CONFIG2H Options ------------------------------- 8553 8554 #define _WDTEN_OFF_2H 0xFC // WDT disabled in hardware; SWDTEN bit disabled. 8555 #define _WDTEN_NOSLP_2H 0xFD // WDT enabled only while device is active and disabled in Sleep mode; SWDTEN bit disabled. 8556 #define _WDTEN_ON_2H 0xFE // WDT controlled by SWDTEN bit setting. 8557 #define _WDTEN_SWDTDIS_2H 0xFF // WDT enabled in hardware; SWDTEN bit disabled. 8558 #define _WDTPS_1_2H 0x83 // 1:1. 8559 #define _WDTPS_2_2H 0x87 // 1:2. 8560 #define _WDTPS_4_2H 0x8B // 1:4. 8561 #define _WDTPS_8_2H 0x8F // 1:8. 8562 #define _WDTPS_16_2H 0x93 // 1:16. 8563 #define _WDTPS_32_2H 0x97 // 1:32. 8564 #define _WDTPS_64_2H 0x9B // 1:64. 8565 #define _WDTPS_128_2H 0x9F // 1:128. 8566 #define _WDTPS_256_2H 0xA3 // 1:256. 8567 #define _WDTPS_512_2H 0xA7 // 1:512. 8568 #define _WDTPS_1024_2H 0xAB // 1:1024. 8569 #define _WDTPS_2048_2H 0xAF // 1:2048. 8570 #define _WDTPS_4096_2H 0xB3 // 1:4096. 8571 #define _WDTPS_8192_2H 0xB7 // 1:8192. 8572 #define _WDTPS_16384_2H 0xBB // 1:16384. 8573 #define _WDTPS_32768_2H 0xBF // 1:32768. 8574 #define _WDTPS_65536_2H 0xC3 // 1:65536. 8575 #define _WDTPS_131072_2H 0xC7 // 1:131072. 8576 #define _WDTPS_262144_2H 0xCB // 1:262144. 8577 #define _WDTPS_524288_2H 0xCF // 1:524288. 8578 #define _WDTPS_1048576_2H 0xFF // 1:1048576. 8579 8580 //----------------------------- CONFIG3L Options ------------------------------- 8581 8582 #define _RTCOSC_INTOSCREF_3L 0xFE // RTCC uses INTRC. 8583 #define _RTCOSC_SOSCREF_3L 0xFF // RTCC uses SOSC. 8584 8585 //----------------------------- CONFIG3H Options ------------------------------- 8586 8587 #define _CCP2MX_PORTBE_3H 0xFE // RE7-Microcontroller Mode/RB3-All other modes. 8588 #define _CCP2MX_PORTC_3H 0xFF // RC1. 8589 #define _ECCPMX_PORTH_3H 0xFD // Enhanced CCP1/3 [P1B/P1C/P3B/P3C] muxed with RH7/RH6/RH5/RH4. 8590 #define _ECCPMX_PORTE_3H 0xFF // Enhanced CCP1/3 [P1B/P1C/P3B/P3C] muxed with RE6/RE5/RE4/RE3. 8591 #define _MSSPMSK_MSK5_3H 0xF7 // 5 bit address masking mode. 8592 #define _MSSPMSK_MSK7_3H 0xFF // 7 Bit address masking mode. 8593 #define _MCLRE_OFF_3H 0x7F // MCLR Disabled, RG5 Enabled. 8594 #define _MCLRE_ON_3H 0xFF // MCLR Enabled, RG5 Disabled. 8595 8596 //----------------------------- CONFIG4L Options ------------------------------- 8597 8598 #define _STVREN_OFF_4L 0xFE // Disabled. 8599 #define _STVREN_ON_4L 0xFF // Enabled. 8600 #define _BBSIZ_BB1K_4L 0xEF // 1K word Boot Block size. 8601 #define _BBSIZ_BB2K_4L 0xFF // 2K word Boot Block size. 8602 #define _DEBUG_ON_4L 0x7F // Enabled. 8603 #define _DEBUG_OFF_4L 0xFF // Disabled. 8604 8605 //----------------------------- CONFIG5L Options ------------------------------- 8606 8607 #define _CP0_ON_5L 0xFE // Enabled. 8608 #define _CP0_OFF_5L 0xFF // Disabled. 8609 #define _CP1_ON_5L 0xFD // Enabled. 8610 #define _CP1_OFF_5L 0xFF // Disabled. 8611 #define _CP2_ON_5L 0xFB // Enabled. 8612 #define _CP2_OFF_5L 0xFF // Disabled. 8613 #define _CP3_ON_5L 0xF7 // Enabled. 8614 #define _CP3_OFF_5L 0xFF // Disabled. 8615 8616 //----------------------------- CONFIG5H Options ------------------------------- 8617 8618 #define _CPB_ON_5H 0xBF // Enabled. 8619 #define _CPB_OFF_5H 0xFF // Disabled. 8620 #define _CPD_ON_5H 0x7F // Enabled. 8621 #define _CPD_OFF_5H 0xFF // Disabled. 8622 8623 //----------------------------- CONFIG6L Options ------------------------------- 8624 8625 #define _WRT0_ON_6L 0xFE // Enabled. 8626 #define _WRT0_OFF_6L 0xFF // Disabled. 8627 #define _WRT1_ON_6L 0xFD // Enabled. 8628 #define _WRT1_OFF_6L 0xFF // Disabled. 8629 #define _WRT2_ON_6L 0xFB // Enabled. 8630 #define _WRT2_OFF_6L 0xFF // Disabled. 8631 #define _WRT3_ON_6L 0xF7 // Enabled. 8632 #define _WRT3_OFF_6L 0xFF // Disabled. 8633 8634 //----------------------------- CONFIG6H Options ------------------------------- 8635 8636 #define _WRTC_ON_6H 0xDF // Enabled. 8637 #define _WRTC_OFF_6H 0xFF // Disabled. 8638 #define _WRTB_ON_6H 0xBF // Enabled. 8639 #define _WRTB_OFF_6H 0xFF // Disabled. 8640 #define _WRTD_ON_6H 0x7F // Enabled. 8641 #define _WRTD_OFF_6H 0xFF // Disabled. 8642 8643 //----------------------------- CONFIG7L Options ------------------------------- 8644 8645 #define _EBRT0_ON_7L 0xFE // Enabled. 8646 #define _EBRT0_OFF_7L 0xFF // Disabled. 8647 #define _EBRT1_ON_7L 0xFD // Enabled. 8648 #define _EBRT1_OFF_7L 0xFF // Disabled. 8649 #define _EBRT2_ON_7L 0xFB // Enabled. 8650 #define _EBRT2_OFF_7L 0xFF // Disabled. 8651 #define _EBRT3_ON_7L 0xF7 // Enabled. 8652 #define _EBRT3_OFF_7L 0xFF // Disabled. 8653 8654 //----------------------------- CONFIG7H Options ------------------------------- 8655 8656 #define _EBRTB_ON_7H 0xBF // Enabled. 8657 #define _EBRTB_OFF_7H 0xFF // Disabled. 8658 8659 //============================================================================== 8660 8661 #define __DEVID1 0x3FFFFE 8662 #define __DEVID2 0x3FFFFF 8663 8664 #define __IDLOC0 0x200000 8665 #define __IDLOC1 0x200001 8666 #define __IDLOC2 0x200002 8667 #define __IDLOC3 0x200003 8668 #define __IDLOC4 0x200004 8669 #define __IDLOC5 0x200005 8670 #define __IDLOC6 0x200006 8671 #define __IDLOC7 0x200007 8672 8673 #endif // #ifndef __PIC18F85K90_H__ 8674