yangjq 发表于 2026-1-27 09:02:27

手册写不清,调试搞昏头 !都是坑! STC8G单片机SFR地址的寄存器

比如   ORL PCA_PWM1,#03E, 执行完后PCA_PWM1竟然没变化,于是下面的一段程序,执行结果完全不符合预期

PCA_PWM1=PCA_PWM1;
PCA_PWM1&=(~0x30);
PCA_PWM|=byteh;
if(lumin==1023)PCA_PWM1|=0x02;
else PCA_PWM1&=(~0x02);
CCAP1H=bytel;

没办法只能使用中间变量,申明一个 unsigned char pcapwm1, 把PCA_PWM1先读出来,处理完再整体写入,这样才对

unsigned char pcapwm1;

pcapwm1=PCA_PWM1;
pcapwm1=PCA_PWM1;   
pcapwm1&=(~0x30);
pcapwm1|=byteh;
if(lumin==1023)pcapwm1|=0x02;
else pcapwm1&=(~0x02);
PCA_PWM1=pcapwm1;
CCAP1H=bytel;

神农鼎 发表于 2026-1-27 10:00:05








神农鼎 发表于 2026-1-27 09:19:07








神农鼎 发表于 2026-1-27 09:23:47









神农鼎 发表于 2026-1-27 09:25:52






神农鼎 发表于 2026-1-27 09:28:54






#ifndef __STC8G_H__
#define __STC8G_H__

/////////////////////////////////////////////////

//包含本头文件后,不用另外再包含"REG51.H"

#include "stdio.h"
#include "intrins.h"

/////////////////////////////////////////////////

sfr         P0          =         0x80;
    sbit    P00         =         P0^0;
    sbit    P01         =         P0^1;
    sbit    P02         =         P0^2;
    sbit    P03         =         P0^3;
    sbit    P04         =         P0^4;
    sbit    P05         =         P0^5;
    sbit    P06         =         P0^6;
    sbit    P07         =         P0^7;

sfr         SP          =         0x81;
sfr         DPL         =         0x82;
sfr         DPH         =         0x83;
sfr         S4CON       =         0x84;
sfr         S4BUF       =         0x85;
sfr         PCON      =         0x87;

sfr         TCON      =         0x88;
    sbit    TF1         =         TCON^7;
    sbit    TR1         =         TCON^6;
    sbit    TF0         =         TCON^5;
    sbit    TR0         =         TCON^4;
    sbit    IE1         =         TCON^3;
    sbit    IT1         =         TCON^2;
    sbit    IE0         =         TCON^1;
    sbit    IT0         =         TCON^0;

sfr         TMOD      =         0x89;
sfr         TL0         =         0x8A;
sfr         TL1         =         0x8B;
sfr         TH0         =         0x8C;
sfr         TH1         =         0x8D;
sfr         AUXR      =         0x8E;
sfr         INTCLKO   =         0x8F;

sfr         P1          =         0x90;
    sbit    P10         =         P1^0;
    sbit    P11         =         P1^1;
    sbit    P12         =         P1^2;
    sbit    P13         =         P1^3;
    sbit    P14         =         P1^4;
    sbit    P15         =         P1^5;
    sbit    P16         =         P1^6;
    sbit    P17         =         P1^7;

sfr         P1M1      =         0x91;
sfr         P1M0      =         0x92;
sfr         P0M1      =         0x93;
sfr         P0M0      =         0x94;
sfr         P2M1      =         0x95;
sfr         P2M0      =         0x96;

sfr         SCON      =         0x98;
    sbit    SM0         =         SCON^7;
    sbit    SM1         =         SCON^6;
    sbit    SM2         =         SCON^5;
    sbit    REN         =         SCON^4;
    sbit    TB8         =         SCON^3;
    sbit    RB8         =         SCON^2;
    sbit    TI          =         SCON^1;
    sbit    RI          =         SCON^0;

sfr         SBUF      =         0x99;
sfr         S2CON       =         0x9A;
sfr         S2BUF       =         0x9B;
sfr         IRCBAND   =         0x9D;
sfr         LIRTRIM   =         0x9E;
sfr         IRTRIM      =         0x9F;

sfr         P2          =         0xA0;
    sbit    P20         =         P2^0;
    sbit    P21         =         P2^1;
    sbit    P22         =         P2^2;
    sbit    P23         =         P2^3;
    sbit    P24         =         P2^4;
    sbit    P25         =         P2^5;
    sbit    P26         =         P2^6;
    sbit    P27         =         P2^7;

sfr         P_SW1       =         0xA2;

sfr         IE          =         0xA8;
    sbit    EA          =         IE^7;
    sbit    ELVD      =         IE^6;
    sbit    EADC      =         IE^5;
    sbit    ES          =         IE^4;
    sbit    ET1         =         IE^3;
    sbit    EX1         =         IE^2;
    sbit    ET0         =         IE^1;
    sbit    EX0         =         IE^0;

sfr         SADDR       =         0xA9;
sfr         WKTCL       =         0xAA;
sfr         WKTCH       =         0xAB;
sfr         S3CON       =         0xAC;
sfr         S3BUF       =         0xAD;
sfr         TA          =         0xAE;
sfr         IE2         =         0xAF;

sfr         P3          =         0xB0;
    sbit    P30         =         P3^0;
    sbit    P31         =         P3^1;
    sbit    P32         =         P3^2;
    sbit    P33         =         P3^3;
    sbit    P34         =         P3^4;
    sbit    P35         =         P3^5;
    sbit    P36         =         P3^6;
    sbit    P37         =         P3^7;

    sbit    RD          =         P3^7;
    sbit    WR          =         P3^6;
    sbit    T1          =         P3^5;
    sbit    T0          =         P3^4;
    sbit    INT1      =         P3^3;
    sbit    INT0      =         P3^2;
    sbit    TXD         =         P3^1;
    sbit    RXD         =         P3^0;

sfr         P3M1      =         0xB1;
sfr         P3M0      =         0xB2;
sfr         P4M1      =         0xB3;
sfr         P4M0      =         0xB4;
sfr         IP2         =         0xB5;
sfr         IP2H      =         0xB6;
sfr         IPH         =         0xB7;

sfr         IP          =         0xB8;
    sbit    PPCA      =         IP^7;
    sbit    PLVD      =         IP^6;
    sbit    PADC      =         IP^5;
    sbit    PS          =         IP^4;
    sbit    PT1         =         IP^3;
    sbit    PX1         =         IP^2;
    sbit    PT0         =         IP^1;
    sbit    PX0         =         IP^0;

sfr         SADEN       =         0xB9;
sfr         P_SW2       =         0xBA;
sfr         ADC_CONTR   =         0xBC;
sfr         ADC_RES   =         0xBD;
sfr         ADC_RESL    =         0xBE;

sfr         P4          =         0xC0;
    sbit    P40         =         P4^0;
    sbit    P41         =         P4^1;
    sbit    P42         =         P4^2;
    sbit    P43         =         P4^3;
    sbit    P44         =         P4^4;
    sbit    P45         =         P4^5;
    sbit    P46         =         P4^6;
    sbit    P47         =         P4^7;

sfr         WDT_CONTR   =         0xC1;
sfr         IAP_DATA    =         0xC2;
sfr         IAP_ADDRH   =         0xC3;
sfr         IAP_ADDRL   =         0xC4;
sfr         IAP_CMD   =         0xC5;
sfr         IAP_TRIG    =         0xC6;
sfr         IAP_CONTR   =         0xC7;

sfr         P5          =         0xC8;
    sbit    P50         =         P5^0;
    sbit    P51         =         P5^1;
    sbit    P52         =         P5^2;
    sbit    P53         =         P5^3;
    sbit    P54         =         P5^4;
    sbit    P55         =         P5^5;
    sbit    P56         =         P5^6;
    sbit    P57         =         P5^7;

sfr         P5M1      =         0xC9;
sfr         P5M0      =         0xCA;
sfr         P6M1      =         0xcb;
sfr         P6M0      =         0xcc;
sfr         SPSTAT      =         0xCD;
sfr         SPCTL       =         0xCE;
sfr         SPDAT       =         0xCF;

sfr         PSW         =         0xD0;
    sbit    CY          =         PSW^7;
    sbit    AC          =         PSW^6;
    sbit    F0          =         PSW^5;
    sbit    RS1         =         PSW^4;
    sbit    RS0         =         PSW^3;
    sbit    OV          =         PSW^2;
    sbit    F1          =         PSW^1;
    sbit    P         =         PSW^0;

sfr         T4T3M       =         0xD1;
sfr         T4H         =         0xD2;
sfr         T4L         =         0xD3;
sfr         T3H         =         0xD4;
sfr         T3L         =         0xD5;
sfr         T2H         =         0xD6;
sfr         T2L         =         0xD7;

sfr         T3T4M       =         0xD1;
sfr         TH4         =         0xD2;
sfr         TL4         =         0xD3;
sfr         TH3         =         0xD4;
sfr         TL3         =         0xD5;
sfr         TH2         =         0xD6;
sfr         TL2         =         0xD7;

sfr         CCON      =         0xD8;
    sbit    CF          =         CCON^7;
    sbit    CR          =         CCON^6;
    sbit    CCF2      =         CCON^2;
    sbit    CCF1      =         CCON^1;
    sbit    CCF0      =         CCON^0;

sfr         CMOD      =         0xD9;
sfr         CCAPM0      =         0xDA;
sfr         CCAPM1      =         0xDB;
sfr         CCAPM2      =         0xDC;
sfr         ADCCFG      =         0xDE;
sfr         IP3         =         0xDF;

sfr         ACC         =         0xE0;
    sbit    ACC0      =         ACC^0;
    sbit    ACC1      =         ACC^1;
    sbit    ACC2      =         ACC^2;
    sbit    ACC3      =         ACC^3;
    sbit    ACC4      =         ACC^4;
    sbit    ACC5      =         ACC^5;
    sbit    ACC6      =         ACC^6;
    sbit    ACC7      =         ACC^7;

sfr         P7M1      =         0xe1;
sfr         P7M0      =         0xe2;
sfr         DPS         =         0xE3;
sfr         DPL1      =         0xE4;
sfr         DPH1      =         0xE5;
sfr         CMPCR1      =         0xE6;
sfr         CMPCR2      =         0xE7;

sfr         P6          =         0xe8;
    sbit    P60         =         P6^0;
    sbit    P61         =         P6^1;
    sbit    P62         =         P6^2;
    sbit    P63         =         P6^3;
    sbit    P64         =         P6^4;
    sbit    P65         =         P6^5;
    sbit    P66         =         P6^6;
    sbit    P67         =         P6^7;

sfr         CL          =         0xE9;
sfr         CCAP0L      =         0xEA;
sfr         CCAP1L      =         0xEB;
sfr         CCAP2L      =         0xEC;
sfr         IP3H      =         0xEE;
sfr         AUXINTIF    =         0xEF;

sfr         B         =         0xF0;
    sbit    B0          =         B^0;
    sbit    B1          =         B^1;
    sbit    B2          =         B^2;
    sbit    B3          =         B^3;
    sbit    B4          =         B^4;
    sbit    B5          =         B^5;
    sbit    B6          =         B^6;
    sbit    B7          =         B^7;

sfr         PWMSET      =         0xF1;
sfr         PCA_PWM0    =         0xF2;
sfr         PCA_PWM1    =         0xF3;
sfr         PCA_PWM2    =         0xF4;
sfr         IAP_TPS   =         0xF5;
sfr         PWMCFG01    =         0xF6;
sfr         PWMCFG23    =         0xF7;

sfr         P7          =         0xf8;
    sbit    P70         =         P7^0;
    sbit    P71         =         P7^1;
    sbit    P72         =         P7^2;
    sbit    P73         =         P7^3;
    sbit    P74         =         P7^4;
    sbit    P75         =         P7^5;
    sbit    P76         =         P7^6;
    sbit    P77         =         P7^7;

sfr         CH          =         0xF9;
sfr         CCAP0H      =         0xFA;
sfr         CCAP1H      =         0xFB;
sfr         CCAP2H      =         0xFC;
sfr         PWMCFG45    =         0xFE;
sfr         RSTCFG      =         0xFF;

//如下特殊功能寄存器位于扩展RAM区域
//访问这些寄存器,需先将P_SW2的BIT7设置为1,才可正常读写

/////////////////////////////////////////////////
//FF00H-FFFFH
/////////////////////////////////////////////////

#define   PWM0C                   (*(unsigned intvolatile xdata *)0xff00)
#define   PWM0CH                  (*(unsigned char volatile xdata *)0xff00)
#define   PWM0CL                  (*(unsigned char volatile xdata *)0xff01)
#define   PWM0CKS               (*(unsigned char volatile xdata *)0xff02)
#define   PWM0TADC                (*(unsigned intvolatile xdata *)0xff03)
#define   PWM0TADCH               (*(unsigned char volatile xdata *)0xff03)
#define   PWM0TADCL               (*(unsigned char volatile xdata *)0xff04)
#define   PWM0IF                  (*(unsigned char volatile xdata *)0xff05)
#define   PWM0FDCR                (*(unsigned char volatile xdata *)0xff06)
#define   PWM00T1               (*(unsigned intvolatile xdata *)0xff10)
#define   PWM00T1H                (*(unsigned char volatile xdata *)0xff10)
#define   PWM00T1L                (*(unsigned char volatile xdata *)0xff11)
#define   PWM00T2               (*(unsigned intvolatile xdata *)0xff12)
#define   PWM00T2H                (*(unsigned char volatile xdata *)0xff12)
#define   PWM00T2L                (*(unsigned char volatile xdata *)0xff13)
#define   PWM00CR               (*(unsigned char volatile xdata *)0xff14)
#define   PWM00HLD                (*(unsigned char volatile xdata *)0xff15)
#define   PWM01T1               (*(unsigned intvolatile xdata *)0xff18)
#define   PWM01T1H                (*(unsigned char volatile xdata *)0xff18)
#define   PWM01T1L                (*(unsigned char volatile xdata *)0xff19)
#define   PWM01T2               (*(unsigned intvolatile xdata *)0xff1a)
#define   PWM01T2H                (*(unsigned char volatile xdata *)0xff1a)
#define   PWM01T2L                (*(unsigned char volatile xdata *)0xff1b)
#define   PWM01CR               (*(unsigned char volatile xdata *)0xff1c)
#define   PWM01HLD                (*(unsigned char volatile xdata *)0xff1d)
#define   PWM02T1               (*(unsigned intvolatile xdata *)0xff20)
#define   PWM02T1H                (*(unsigned char volatile xdata *)0xff20)
#define   PWM02T1L                (*(unsigned char volatile xdata *)0xff21)
#define   PWM02T2               (*(unsigned intvolatile xdata *)0xff22)
#define   PWM02T2H                (*(unsigned char volatile xdata *)0xff22)
#define   PWM02T2L                (*(unsigned char volatile xdata *)0xff23)
#define   PWM02CR               (*(unsigned char volatile xdata *)0xff24)
#define   PWM02HLD                (*(unsigned char volatile xdata *)0xff25)
#define   PWM03T1               (*(unsigned intvolatile xdata *)0xff28)
#define   PWM03T1H                (*(unsigned char volatile xdata *)0xff28)
#define   PWM03T1L                (*(unsigned char volatile xdata *)0xff29)
#define   PWM03T2               (*(unsigned intvolatile xdata *)0xff2a)
#define   PWM03T2H                (*(unsigned char volatile xdata *)0xff2a)
#define   PWM03T2L                (*(unsigned char volatile xdata *)0xff2b)
#define   PWM03CR               (*(unsigned char volatile xdata *)0xff2c)
#define   PWM03HLD                (*(unsigned char volatile xdata *)0xff2d)
#define   PWM04T1               (*(unsigned intvolatile xdata *)0xff30)
#define   PWM04T1H                (*(unsigned char volatile xdata *)0xff30)
#define   PWM04T1L                (*(unsigned char volatile xdata *)0xff31)
#define   PWM04T2               (*(unsigned intvolatile xdata *)0xff32)
#define   PWM04T2H                (*(unsigned char volatile xdata *)0xff32)
#define   PWM04T2L                (*(unsigned char volatile xdata *)0xff33)
#define   PWM04CR               (*(unsigned char volatile xdata *)0xff34)
#define   PWM04HLD                (*(unsigned char volatile xdata *)0xff35)
#define   PWM05T1               (*(unsigned intvolatile xdata *)0xff38)
#define   PWM05T1H                (*(unsigned char volatile xdata *)0xff38)
#define   PWM05T1L                (*(unsigned char volatile xdata *)0xff39)
#define   PWM05T2               (*(unsigned intvolatile xdata *)0xff3a)
#define   PWM05T2H                (*(unsigned char volatile xdata *)0xff3a)
#define   PWM05T2L                (*(unsigned char volatile xdata *)0xff3b)
#define   PWM05CR               (*(unsigned char volatile xdata *)0xff3c)
#define   PWM05HLD                (*(unsigned char volatile xdata *)0xff3d)
#define   PWM06T1               (*(unsigned intvolatile xdata *)0xff40)
#define   PWM06T1H                (*(unsigned char volatile xdata *)0xff40)
#define   PWM06T1L                (*(unsigned char volatile xdata *)0xff41)
#define   PWM06T2               (*(unsigned intvolatile xdata *)0xff42)
#define   PWM06T2H                (*(unsigned char volatile xdata *)0xff42)
#define   PWM06T2L                (*(unsigned char volatile xdata *)0xff43)
#define   PWM06CR               (*(unsigned char volatile xdata *)0xff44)
#define   PWM06HLD                (*(unsigned char volatile xdata *)0xff45)
#define   PWM07T1               (*(unsigned intvolatile xdata *)0xff48)
#define   PWM07T1H                (*(unsigned char volatile xdata *)0xff48)
#define   PWM07T1L                (*(unsigned char volatile xdata *)0xff49)
#define   PWM07T2               (*(unsigned intvolatile xdata *)0xff4a)
#define   PWM07T2H                (*(unsigned char volatile xdata *)0xff4a)
#define   PWM07T2L                (*(unsigned char volatile xdata *)0xff4b)
#define   PWM07CR               (*(unsigned char volatile xdata *)0xff4c)
#define   PWM07HLD                (*(unsigned char volatile xdata *)0xff4d)
#define   PWM1C                   (*(unsigned intvolatile xdata *)0xff50)
#define   PWM1CH                  (*(unsigned char volatile xdata *)0xff50)
#define   PWM1CL                  (*(unsigned char volatile xdata *)0xff51)
#define   PWM1CKS               (*(unsigned char volatile xdata *)0xff52)
#define   PWM1IF                  (*(unsigned char volatile xdata *)0xff55)
#define   PWM1FDCR                (*(unsigned char volatile xdata *)0xff56)
#define   PWM10T1               (*(unsigned intvolatile xdata *)0xff60)
#define   PWM10T1H                (*(unsigned char volatile xdata *)0xff60)
#define   PWM10T1L                (*(unsigned char volatile xdata *)0xff61)
#define   PWM10T2               (*(unsigned intvolatile xdata *)0xff62)
#define   PWM10T2H                (*(unsigned char volatile xdata *)0xff62)
#define   PWM10T2L                (*(unsigned char volatile xdata *)0xff63)
#define   PWM10CR               (*(unsigned char volatile xdata *)0xff64)
#define   PWM10HLD                (*(unsigned char volatile xdata *)0xff65)
#define   PWM11T1               (*(unsigned intvolatile xdata *)0xff68)
#define   PWM11T1H                (*(unsigned char volatile xdata *)0xff68)
#define   PWM11T1L                (*(unsigned char volatile xdata *)0xff69)
#define   PWM11T2               (*(unsigned intvolatile xdata *)0xff6a)
#define   PWM11T2H                (*(unsigned char volatile xdata *)0xff6a)
#define   PWM11T2L                (*(unsigned char volatile xdata *)0xff6b)
#define   PWM11CR               (*(unsigned char volatile xdata *)0xff6c)
#define   PWM11HLD                (*(unsigned char volatile xdata *)0xff6d)
#define   PWM12T1               (*(unsigned intvolatile xdata *)0xff70)
#define   PWM12T1H                (*(unsigned char volatile xdata *)0xff70)
#define   PWM12T1L                (*(unsigned char volatile xdata *)0xff71)
#define   PWM12T2               (*(unsigned intvolatile xdata *)0xff72)
#define   PWM12T2H                (*(unsigned char volatile xdata *)0xff72)
#define   PWM12T2L                (*(unsigned char volatile xdata *)0xff73)
#define   PWM12CR               (*(unsigned char volatile xdata *)0xff74)
#define   PWM12HLD                (*(unsigned char volatile xdata *)0xff75)
#define   PWM13T1               (*(unsigned intvolatile xdata *)0xff78)
#define   PWM13T1H                (*(unsigned char volatile xdata *)0xff78)
#define   PWM13T1L                (*(unsigned char volatile xdata *)0xff79)
#define   PWM13T2               (*(unsigned intvolatile xdata *)0xff7a)
#define   PWM13T2H                (*(unsigned char volatile xdata *)0xff7a)
#define   PWM13T2L                (*(unsigned char volatile xdata *)0xff7b)
#define   PWM13CR               (*(unsigned char volatile xdata *)0xff7c)
#define   PWM13HLD                (*(unsigned char volatile xdata *)0xff7d)
#define   PWM14T1               (*(unsigned intvolatile xdata *)0xff80)
#define   PWM14T1H                (*(unsigned char volatile xdata *)0xff80)
#define   PWM14T1L                (*(unsigned char volatile xdata *)0xff81)
#define   PWM14T2               (*(unsigned intvolatile xdata *)0xff82)
#define   PWM14T2H                (*(unsigned char volatile xdata *)0xff82)
#define   PWM14T2L                (*(unsigned char volatile xdata *)0xff83)
#define   PWM14CR               (*(unsigned char volatile xdata *)0xff84)
#define   PWM14HLD                (*(unsigned char volatile xdata *)0xff85)
#define   PWM15T1               (*(unsigned intvolatile xdata *)0xff88)
#define   PWM15T1H                (*(unsigned char volatile xdata *)0xff88)
#define   PWM15T1L                (*(unsigned char volatile xdata *)0xff89)
#define   PWM15T2               (*(unsigned intvolatile xdata *)0xff8a)
#define   PWM15T2H                (*(unsigned char volatile xdata *)0xff8a)
#define   PWM15T2L                (*(unsigned char volatile xdata *)0xff8b)
#define   PWM15CR               (*(unsigned char volatile xdata *)0xff8c)
#define   PWM15HLD                (*(unsigned char volatile xdata *)0xff8d)
#define   PWM16T1               (*(unsigned intvolatile xdata *)0xff90)
#define   PWM16T1H                (*(unsigned char volatile xdata *)0xff90)
#define   PWM16T1L                (*(unsigned char volatile xdata *)0xff91)
#define   PWM16T2               (*(unsigned intvolatile xdata *)0xff92)
#define   PWM16T2H                (*(unsigned char volatile xdata *)0xff92)
#define   PWM16T2L                (*(unsigned char volatile xdata *)0xff93)
#define   PWM16CR               (*(unsigned char volatile xdata *)0xff94)
#define   PWM16HLD                (*(unsigned char volatile xdata *)0xff95)
#define   PWM17T1               (*(unsigned intvolatile xdata *)0xff98)
#define   PWM17T1H                (*(unsigned char volatile xdata *)0xff98)
#define   PWM17T1L                (*(unsigned char volatile xdata *)0xff99)
#define   PWM17T2               (*(unsigned intvolatile xdata *)0xff9a)
#define   PWM17T2H                (*(unsigned char volatile xdata *)0xff9a)
#define   PWM17T2L                (*(unsigned char volatile xdata *)0xff9b)
#define   PWM17CR               (*(unsigned char volatile xdata *)0xff9c)
#define   PWM17HLD                (*(unsigned char volatile xdata *)0xff9d)
#define   PWM2C                   (*(unsigned intvolatile xdata *)0xffa0)
#define   PWM2CH                  (*(unsigned char volatile xdata *)0xffa0)
#define   PWM2CL                  (*(unsigned char volatile xdata *)0xffa1)
#define   PWM2CKS               (*(unsigned char volatile xdata *)0xffa2)
#define   PWM2TADC                (*(unsigned intvolatile xdata *)0xffa3)
#define   PWM2TADCH               (*(unsigned char volatile xdata *)0xffa3)
#define   PWM2TADCL               (*(unsigned char volatile xdata *)0xffa4)
#define   PWM2IF                  (*(unsigned char volatile xdata *)0xffa5)
#define   PWM2FDCR                (*(unsigned char volatile xdata *)0xffa6)
#define   PWM20T1               (*(unsigned intvolatile xdata *)0xffb0)
#define   PWM20T1H                (*(unsigned char volatile xdata *)0xffb0)
#define   PWM20T1L                (*(unsigned char volatile xdata *)0xffb1)
#define   PWM20T2               (*(unsigned intvolatile xdata *)0xffb2)
#define   PWM20T2H                (*(unsigned char volatile xdata *)0xffb2)
#define   PWM20T2L                (*(unsigned char volatile xdata *)0xffb3)
#define   PWM20CR               (*(unsigned char volatile xdata *)0xffb4)
#define   PWM20HLD                (*(unsigned char volatile xdata *)0xffb5)
#define   PWM21T1               (*(unsigned intvolatile xdata *)0xffb8)
#define   PWM21T1H                (*(unsigned char volatile xdata *)0xffb8)
#define   PWM21T1L                (*(unsigned char volatile xdata *)0xffb9)
#define   PWM21T2               (*(unsigned intvolatile xdata *)0xffba)
#define   PWM21T2H                (*(unsigned char volatile xdata *)0xffba)
#define   PWM21T2L                (*(unsigned char volatile xdata *)0xffbb)
#define   PWM21CR               (*(unsigned char volatile xdata *)0xffbc)
#define   PWM21HLD                (*(unsigned char volatile xdata *)0xffbd)
#define   PWM22T1               (*(unsigned intvolatile xdata *)0xffc0)
#define   PWM22T1H                (*(unsigned char volatile xdata *)0xffc0)
#define   PWM22T1L                (*(unsigned char volatile xdata *)0xffc1)
#define   PWM22T2               (*(unsigned intvolatile xdata *)0xffc2)
#define   PWM22T2H                (*(unsigned char volatile xdata *)0xffc2)
#define   PWM22T2L                (*(unsigned char volatile xdata *)0xffc3)
#define   PWM22CR               (*(unsigned char volatile xdata *)0xffc4)
#define   PWM22HLD                (*(unsigned char volatile xdata *)0xffc5)
#define   PWM23T1               (*(unsigned intvolatile xdata *)0xffc8)
#define   PWM23T1H                (*(unsigned char volatile xdata *)0xffc8)
#define   PWM23T1L                (*(unsigned char volatile xdata *)0xffc9)
#define   PWM23T2               (*(unsigned intvolatile xdata *)0xffca)
#define   PWM23T2H                (*(unsigned char volatile xdata *)0xffca)
#define   PWM23T2L                (*(unsigned char volatile xdata *)0xffcb)
#define   PWM23CR               (*(unsigned char volatile xdata *)0xffcc)
#define   PWM23HLD                (*(unsigned char volatile xdata *)0xffcd)
#define   PWM24T1               (*(unsigned intvolatile xdata *)0xffd0)
#define   PWM24T1H                (*(unsigned char volatile xdata *)0xffd0)
#define   PWM24T1L                (*(unsigned char volatile xdata *)0xffd1)
#define   PWM24T2               (*(unsigned intvolatile xdata *)0xffd2)
#define   PWM24T2H                (*(unsigned char volatile xdata *)0xffd2)
#define   PWM24T2L                (*(unsigned char volatile xdata *)0xffd3)
#define   PWM24CR               (*(unsigned char volatile xdata *)0xffd4)
#define   PWM24HLD                (*(unsigned char volatile xdata *)0xffd5)
#define   PWM25T1               (*(unsigned intvolatile xdata *)0xffd8)
#define   PWM25T1H                (*(unsigned char volatile xdata *)0xffd8)
#define   PWM25T1L                (*(unsigned char volatile xdata *)0xffd9)
#define   PWM25T2               (*(unsigned intvolatile xdata *)0xffda)
#define   PWM25T2H                (*(unsigned char volatile xdata *)0xffda)
#define   PWM25T2L                (*(unsigned char volatile xdata *)0xffdb)
#define   PWM25CR               (*(unsigned char volatile xdata *)0xffdc)
#define   PWM25HLD                (*(unsigned char volatile xdata *)0xffdd)
#define   PWM26T1               (*(unsigned intvolatile xdata *)0xffe0)
#define   PWM26T1H                (*(unsigned char volatile xdata *)0xffe0)
#define   PWM26T1L                (*(unsigned char volatile xdata *)0xffe1)
#define   PWM26T2               (*(unsigned intvolatile xdata *)0xffe2)
#define   PWM26T2H                (*(unsigned char volatile xdata *)0xffe2)
#define   PWM26T2L                (*(unsigned char volatile xdata *)0xffe3)
#define   PWM26CR               (*(unsigned char volatile xdata *)0xffe4)
#define   PWM26HLD                (*(unsigned char volatile xdata *)0xffe5)
#define   PWM27T1               (*(unsigned intvolatile xdata *)0xffe8)
#define   PWM27T1H                (*(unsigned char volatile xdata *)0xffe8)
#define   PWM27T1L                (*(unsigned char volatile xdata *)0xffe9)
#define   PWM27T2               (*(unsigned intvolatile xdata *)0xffea)
#define   PWM27T2H                (*(unsigned char volatile xdata *)0xffea)
#define   PWM27T2L                (*(unsigned char volatile xdata *)0xffeb)
#define   PWM27CR               (*(unsigned char volatile xdata *)0xffec)
#define   PWM27HLD                (*(unsigned char volatile xdata *)0xffed)

/////////////////////////////////////////////////
//FE00H-FEFFH
/////////////////////////////////////////////////

#define   CLKSEL                  (*(unsigned char volatile xdata *)0xfe00)
#define   CLKDIV                  (*(unsigned char volatile xdata *)0xfe01)
#define   HIRCCR                  (*(unsigned char volatile xdata *)0xfe02)
#define   XOSCCR                  (*(unsigned char volatile xdata *)0xfe03)
#define   IRC32KCR                (*(unsigned char volatile xdata *)0xfe04)
#define   MCLKOCR               (*(unsigned char volatile xdata *)0xfe05)
#define   IRCDB                   (*(unsigned char volatile xdata *)0xfe06)
#define   X32KCR                  (*(unsigned char volatile xdata *)0xfe08)

#define   P0PU                  (*(unsigned char volatile xdata *)0xfe10)
#define   P1PU                  (*(unsigned char volatile xdata *)0xfe11)
#define   P2PU                  (*(unsigned char volatile xdata *)0xfe12)
#define   P3PU                  (*(unsigned char volatile xdata *)0xfe13)
#define   P4PU                  (*(unsigned char volatile xdata *)0xfe14)
#define   P5PU                  (*(unsigned char volatile xdata *)0xfe15)
#define   P6PU                  (*(unsigned char volatile xdata *)0xfe16)
#define   P7PU                  (*(unsigned char volatile xdata *)0xfe17)
#define   P0NCS                   (*(unsigned char volatile xdata *)0xfe18)
#define   P1NCS                   (*(unsigned char volatile xdata *)0xfe19)
#define   P2NCS                   (*(unsigned char volatile xdata *)0xfe1a)
#define   P3NCS                   (*(unsigned char volatile xdata *)0xfe1b)
#define   P4NCS                   (*(unsigned char volatile xdata *)0xfe1c)
#define   P5NCS                   (*(unsigned char volatile xdata *)0xfe1d)
#define   P6NCS                   (*(unsigned char volatile xdata *)0xfe1e)
#define   P7NCS                   (*(unsigned char volatile xdata *)0xfe1f)
#define   P0SR                  (*(unsigned char volatile xdata *)0xfe20)
#define   P1SR                  (*(unsigned char volatile xdata *)0xfe21)
#define   P2SR                  (*(unsigned char volatile xdata *)0xfe22)
#define   P3SR                  (*(unsigned char volatile xdata *)0xfe23)
#define   P4SR                  (*(unsigned char volatile xdata *)0xfe24)
#define   P5SR                  (*(unsigned char volatile xdata *)0xfe25)
#define   P6SR                  (*(unsigned char volatile xdata *)0xfe26)
#define   P7SR                  (*(unsigned char volatile xdata *)0xfe27)
#define   P0DR                  (*(unsigned char volatile xdata *)0xfe28)
#define   P1DR                  (*(unsigned char volatile xdata *)0xfe29)
#define   P2DR                  (*(unsigned char volatile xdata *)0xfe2a)
#define   P3DR                  (*(unsigned char volatile xdata *)0xfe2b)
#define   P4DR                  (*(unsigned char volatile xdata *)0xfe2c)
#define   P5DR                  (*(unsigned char volatile xdata *)0xfe2d)
#define   P6DR                  (*(unsigned char volatile xdata *)0xfe2e)
#define   P7DR                  (*(unsigned char volatile xdata *)0xfe2f)
#define   P0IE                  (*(unsigned char volatile xdata *)0xfe30)
#define   P1IE                  (*(unsigned char volatile xdata *)0xfe31)
#define   P2IE                  (*(unsigned char volatile xdata *)0xfe32)
#define   P3IE                  (*(unsigned char volatile xdata *)0xfe33)
#define   P4IE                  (*(unsigned char volatile xdata *)0xfe34)
#define   P5IE                  (*(unsigned char volatile xdata *)0xfe35)
#define   P6IE                  (*(unsigned char volatile xdata *)0xfe36)
#define   P7IE                  (*(unsigned char volatile xdata *)0xfe37)

#define   RTCCR                   (*(unsigned char volatile xdata *)0xfe60)
#define   RTCCFG                  (*(unsigned char volatile xdata *)0xfe61)
#define   RTCIEN                  (*(unsigned char volatile xdata *)0xfe62)
#define   RTCIF                   (*(unsigned char volatile xdata *)0xfe63)
#define   ALAHOUR               (*(unsigned char volatile xdata *)0xfe64)
#define   ALAMIN                  (*(unsigned char volatile xdata *)0xfe65)
#define   ALASEC                  (*(unsigned char volatile xdata *)0xfe66)
#define   ALASSEC               (*(unsigned char volatile xdata *)0xfe67)
#define   INIYEAR               (*(unsigned char volatile xdata *)0xfe68)
#define   INIMONTH                (*(unsigned char volatile xdata *)0xfe69)
#define   INIDAY                  (*(unsigned char volatile xdata *)0xfe6a)
#define   INIHOUR               (*(unsigned char volatile xdata *)0xfe6b)
#define   INIMIN                  (*(unsigned char volatile xdata *)0xfe6c)
#define   INISEC                  (*(unsigned char volatile xdata *)0xfe6d)
#define   INISSEC               (*(unsigned char volatile xdata *)0xfe6e)
#define   RTCYEAR               (*(unsigned char volatile xdata *)0xfe70)
#define   RTCMONTH                (*(unsigned char volatile xdata *)0xfe71)
#define   RTCDAY                  (*(unsigned char volatile xdata *)0xfe72)
#define   RTCHOUR               (*(unsigned char volatile xdata *)0xfe73)
#define   RTCMIN                  (*(unsigned char volatile xdata *)0xfe74)
#define   RTCSEC                  (*(unsigned char volatile xdata *)0xfe75)
#define   RTCSSEC               (*(unsigned char volatile xdata *)0xfe76)

#define   I2CCFG                  (*(unsigned char volatile xdata *)0xfe80)
#define   I2CMSCR               (*(unsigned char volatile xdata *)0xfe81)
#define   I2CMSST               (*(unsigned char volatile xdata *)0xfe82)
#define   I2CSLCR               (*(unsigned char volatile xdata *)0xfe83)
#define   I2CSLST               (*(unsigned char volatile xdata *)0xfe84)
#define   I2CSLADR                (*(unsigned char volatile xdata *)0xfe85)
#define   I2CTXD                  (*(unsigned char volatile xdata *)0xfe86)
#define   I2CRXD                  (*(unsigned char volatile xdata *)0xfe87)
#define   I2CMSAUX                (*(unsigned char volatile xdata *)0xfe88)

#define   TM2PS                   (*(unsigned char volatile xdata *)0xfea2)
#define   TM3PS                   (*(unsigned char volatile xdata *)0xfea3)
#define   TM4PS                   (*(unsigned char volatile xdata *)0xfea4)
#define   ADCTIM                  (*(unsigned char volatile xdata *)0xfea8)
#define   T3T4PS                  (*(unsigned char volatile xdata *)0xfeac)

/////////////////////////////////////////////////
//FD00H-FDFFH
/////////////////////////////////////////////////

#define   P0INTE                  (*(unsigned char volatile xdata *)0xfd00)
#define   P1INTE                  (*(unsigned char volatile xdata *)0xfd01)
#define   P2INTE                  (*(unsigned char volatile xdata *)0xfd02)
#define   P3INTE                  (*(unsigned char volatile xdata *)0xfd03)
#define   P4INTE                  (*(unsigned char volatile xdata *)0xfd04)
#define   P5INTE                  (*(unsigned char volatile xdata *)0xfd05)
#define   P6INTE                  (*(unsigned char volatile xdata *)0xfd06)
#define   P7INTE                  (*(unsigned char volatile xdata *)0xfd07)
#define   P0INTF                  (*(unsigned char volatile xdata *)0xfd10)
#define   P1INTF                  (*(unsigned char volatile xdata *)0xfd11)
#define   P2INTF                  (*(unsigned char volatile xdata *)0xfd12)
#define   P3INTF                  (*(unsigned char volatile xdata *)0xfd13)
#define   P4INTF                  (*(unsigned char volatile xdata *)0xfd14)
#define   P5INTF                  (*(unsigned char volatile xdata *)0xfd15)
#define   P6INTF                  (*(unsigned char volatile xdata *)0xfd16)
#define   P7INTF                  (*(unsigned char volatile xdata *)0xfd17)
#define   P0IM0                   (*(unsigned char volatile xdata *)0xfd20)
#define   P1IM0                   (*(unsigned char volatile xdata *)0xfd21)
#define   P2IM0                   (*(unsigned char volatile xdata *)0xfd22)
#define   P3IM0                   (*(unsigned char volatile xdata *)0xfd23)
#define   P4IM0                   (*(unsigned char volatile xdata *)0xfd24)
#define   P5IM0                   (*(unsigned char volatile xdata *)0xfd25)
#define   P6IM0                   (*(unsigned char volatile xdata *)0xfd26)
#define   P7IM0                   (*(unsigned char volatile xdata *)0xfd27)
#define   P0IM1                   (*(unsigned char volatile xdata *)0xfd30)
#define   P1IM1                   (*(unsigned char volatile xdata *)0xfd31)
#define   P2IM1                   (*(unsigned char volatile xdata *)0xfd32)
#define   P3IM1                   (*(unsigned char volatile xdata *)0xfd33)
#define   P4IM1                   (*(unsigned char volatile xdata *)0xfd34)
#define   P5IM1                   (*(unsigned char volatile xdata *)0xfd35)
#define   P6IM1                   (*(unsigned char volatile xdata *)0xfd36)
#define   P7IM1                   (*(unsigned char volatile xdata *)0xfd37)
#define   P0WKUE                  (*(unsigned char volatile xdata *)0xfd40)
#define   P1WKUE                  (*(unsigned char volatile xdata *)0xfd41)
#define   P2WKUE                  (*(unsigned char volatile xdata *)0xfd42)
#define   P3WKUE                  (*(unsigned char volatile xdata *)0xfd43)
#define   P4WKUE                  (*(unsigned char volatile xdata *)0xfd44)
#define   P5WKUE                  (*(unsigned char volatile xdata *)0xfd45)
#define   P6WKUE                  (*(unsigned char volatile xdata *)0xfd46)
#define   P7WKUE                  (*(unsigned char volatile xdata *)0xfd47)
#define   PINIPL                  (*(unsigned char volatile xdata *)0xfd60)
#define   PINIPH                  (*(unsigned char volatile xdata *)0xfd61)

/////////////////////////////////////////////////
//FC00H-FCFFH
/////////////////////////////////////////////////

#define   PWM3C                   (*(unsigned intvolatile xdata *)0xfc00)
#define   PWM3CH                  (*(unsigned char volatile xdata *)0xfc00)
#define   PWM3CL                  (*(unsigned char volatile xdata *)0xfc01)
#define   PWM3CKS               (*(unsigned char volatile xdata *)0xfc02)
#define   PWM3IF                  (*(unsigned char volatile xdata *)0xfc05)
#define   PWM3FDCR                (*(unsigned char volatile xdata *)0xfc06)
#define   PWM30T1               (*(unsigned intvolatile xdata *)0xfc10)
#define   PWM30T1H                (*(unsigned char volatile xdata *)0xfc10)
#define   PWM30T1L                (*(unsigned char volatile xdata *)0xfc11)
#define   PWM30T2               (*(unsigned intvolatile xdata *)0xfc12)
#define   PWM30T2H                (*(unsigned char volatile xdata *)0xfc12)
#define   PWM30T2L                (*(unsigned char volatile xdata *)0xfc13)
#define   PWM30CR               (*(unsigned char volatile xdata *)0xfc14)
#define   PWM30HLD                (*(unsigned char volatile xdata *)0xfc15)
#define   PWM31T1               (*(unsigned intvolatile xdata *)0xfc18)
#define   PWM31T1H                (*(unsigned char volatile xdata *)0xfc18)
#define   PWM31T1L                (*(unsigned char volatile xdata *)0xfc19)
#define   PWM31T2               (*(unsigned intvolatile xdata *)0xfc1a)
#define   PWM31T2H                (*(unsigned char volatile xdata *)0xfc1a)
#define   PWM31T2L                (*(unsigned char volatile xdata *)0xfc1b)
#define   PWM31CR               (*(unsigned char volatile xdata *)0xfc1c)
#define   PWM31HLD                (*(unsigned char volatile xdata *)0xfc1d)
#define   PWM32T1               (*(unsigned intvolatile xdata *)0xfc20)
#define   PWM32T1H                (*(unsigned char volatile xdata *)0xfc20)
#define   PWM32T1L                (*(unsigned char volatile xdata *)0xfc21)
#define   PWM32T2               (*(unsigned intvolatile xdata *)0xfc22)
#define   PWM32T2H                (*(unsigned char volatile xdata *)0xfc22)
#define   PWM32T2L                (*(unsigned char volatile xdata *)0xfc23)
#define   PWM32CR               (*(unsigned char volatile xdata *)0xfc24)
#define   PWM32HLD                (*(unsigned char volatile xdata *)0xfc25)
#define   PWM33T1               (*(unsigned intvolatile xdata *)0xfc28)
#define   PWM33T1H                (*(unsigned char volatile xdata *)0xfc28)
#define   PWM33T1L                (*(unsigned char volatile xdata *)0xfc29)
#define   PWM33T2               (*(unsigned intvolatile xdata *)0xfc2a)
#define   PWM33T2H                (*(unsigned char volatile xdata *)0xfc2a)
#define   PWM33T2L                (*(unsigned char volatile xdata *)0xfc2b)
#define   PWM33CR               (*(unsigned char volatile xdata *)0xfc2c)
#define   PWM33HLD                (*(unsigned char volatile xdata *)0xfc2d)
#define   PWM34T1               (*(unsigned intvolatile xdata *)0xfc30)
#define   PWM34T1H                (*(unsigned char volatile xdata *)0xfc30)
#define   PWM34T1L                (*(unsigned char volatile xdata *)0xfc31)
#define   PWM34T2               (*(unsigned intvolatile xdata *)0xfc32)
#define   PWM34T2H                (*(unsigned char volatile xdata *)0xfc32)
#define   PWM34T2L                (*(unsigned char volatile xdata *)0xfc33)
#define   PWM34CR               (*(unsigned char volatile xdata *)0xfc34)
#define   PWM34HLD                (*(unsigned char volatile xdata *)0xfc35)
#define   PWM35T1               (*(unsigned intvolatile xdata *)0xfc38)
#define   PWM35T1H                (*(unsigned char volatile xdata *)0xfc38)
#define   PWM35T1L                (*(unsigned char volatile xdata *)0xfc39)
#define   PWM35T2               (*(unsigned intvolatile xdata *)0xfc3a)
#define   PWM35T2H                (*(unsigned char volatile xdata *)0xfc3a)
#define   PWM35T2L                (*(unsigned char volatile xdata *)0xfc3b)
#define   PWM35CR               (*(unsigned char volatile xdata *)0xfc3c)
#define   PWM35HLD                (*(unsigned char volatile xdata *)0xfc3d)
#define   PWM36T1               (*(unsigned intvolatile xdata *)0xfc40)
#define   PWM36T1H                (*(unsigned char volatile xdata *)0xfc40)
#define   PWM36T1L                (*(unsigned char volatile xdata *)0xfc41)
#define   PWM36T2               (*(unsigned intvolatile xdata *)0xfc42)
#define   PWM36T2H                (*(unsigned char volatile xdata *)0xfc42)
#define   PWM36T2L                (*(unsigned char volatile xdata *)0xfc43)
#define   PWM36CR               (*(unsigned char volatile xdata *)0xfc44)
#define   PWM36HLD                (*(unsigned char volatile xdata *)0xfc45)
#define   PWM37T1               (*(unsigned intvolatile xdata *)0xfc48)
#define   PWM37T1H                (*(unsigned char volatile xdata *)0xfc48)
#define   PWM37T1L                (*(unsigned char volatile xdata *)0xfc49)
#define   PWM37T2               (*(unsigned intvolatile xdata *)0xfc4a)
#define   PWM37T2H                (*(unsigned char volatile xdata *)0xfc4a)
#define   PWM37T2L                (*(unsigned char volatile xdata *)0xfc4b)
#define   PWM37CR               (*(unsigned char volatile xdata *)0xfc4c)
#define   PWM37HLD                (*(unsigned char volatile xdata *)0xfc4d)
#define   PWM4C                   (*(unsigned intvolatile xdata *)0xfc50)
#define   PWM4CH                  (*(unsigned char volatile xdata *)0xfc50)
#define   PWM4CL                  (*(unsigned char volatile xdata *)0xfc51)
#define   PWM4CKS               (*(unsigned char volatile xdata *)0xfc52)
#define   PWM4TADC                (*(unsigned intvolatile xdata *)0xfc53)
#define   PWM4TADCH               (*(unsigned char volatile xdata *)0xfc53)
#define   PWM4TADCL               (*(unsigned char volatile xdata *)0xfc54)
#define   PWM4IF                  (*(unsigned char volatile xdata *)0xfc55)
#define   PWM4FDCR                (*(unsigned char volatile xdata *)0xfc56)
#define   PWM40T1               (*(unsigned intvolatile xdata *)0xfc60)
#define   PWM40T1H                (*(unsigned char volatile xdata *)0xfc60)
#define   PWM40T1L                (*(unsigned char volatile xdata *)0xfc61)
#define   PWM40T2               (*(unsigned intvolatile xdata *)0xfc62)
#define   PWM40T2H                (*(unsigned char volatile xdata *)0xfc62)
#define   PWM40T2L                (*(unsigned char volatile xdata *)0xfc63)
#define   PWM40CR               (*(unsigned char volatile xdata *)0xfc64)
#define   PWM40HLD                (*(unsigned char volatile xdata *)0xfc65)
#define   PWM41T1               (*(unsigned intvolatile xdata *)0xfc68)
#define   PWM41T1H                (*(unsigned char volatile xdata *)0xfc68)
#define   PWM41T1L                (*(unsigned char volatile xdata *)0xfc69)
#define   PWM41T2               (*(unsigned intvolatile xdata *)0xfc6a)
#define   PWM41T2H                (*(unsigned char volatile xdata *)0xfc6a)
#define   PWM41T2L                (*(unsigned char volatile xdata *)0xfc6b)
#define   PWM41CR               (*(unsigned char volatile xdata *)0xfc6c)
#define   PWM41HLD                (*(unsigned char volatile xdata *)0xfc6d)
#define   PWM42T1               (*(unsigned intvolatile xdata *)0xfc70)
#define   PWM42T1H                (*(unsigned char volatile xdata *)0xfc70)
#define   PWM42T1L                (*(unsigned char volatile xdata *)0xfc71)
#define   PWM42T2               (*(unsigned intvolatile xdata *)0xfc72)
#define   PWM42T2H                (*(unsigned char volatile xdata *)0xfc72)
#define   PWM42T2L                (*(unsigned char volatile xdata *)0xfc73)
#define   PWM42CR               (*(unsigned char volatile xdata *)0xfc74)
#define   PWM42HLD                (*(unsigned char volatile xdata *)0xfc75)
#define   PWM43T1               (*(unsigned intvolatile xdata *)0xfc78)
#define   PWM43T1H                (*(unsigned char volatile xdata *)0xfc78)
#define   PWM43T1L                (*(unsigned char volatile xdata *)0xfc79)
#define   PWM43T2               (*(unsigned intvolatile xdata *)0xfc7a)
#define   PWM43T2H                (*(unsigned char volatile xdata *)0xfc7a)
#define   PWM43T2L                (*(unsigned char volatile xdata *)0xfc7b)
#define   PWM43CR               (*(unsigned char volatile xdata *)0xfc7c)
#define   PWM43HLD                (*(unsigned char volatile xdata *)0xfc7d)
#define   PWM44T1               (*(unsigned intvolatile xdata *)0xfc80)
#define   PWM44T1H                (*(unsigned char volatile xdata *)0xfc80)
#define   PWM44T1L                (*(unsigned char volatile xdata *)0xfc81)
#define   PWM44T2               (*(unsigned intvolatile xdata *)0xfc82)
#define   PWM44T2H                (*(unsigned char volatile xdata *)0xfc82)
#define   PWM44T2L                (*(unsigned char volatile xdata *)0xfc83)
#define   PWM44CR               (*(unsigned char volatile xdata *)0xfc84)
#define   PWM44HLD                (*(unsigned char volatile xdata *)0xfc85)
#define   PWM45T1               (*(unsigned intvolatile xdata *)0xfc88)
#define   PWM45T1H                (*(unsigned char volatile xdata *)0xfc88)
#define   PWM45T1L                (*(unsigned char volatile xdata *)0xfc89)
#define   PWM45T2               (*(unsigned intvolatile xdata *)0xfc8a)
#define   PWM45T2H                (*(unsigned char volatile xdata *)0xfc8a)
#define   PWM45T2L                (*(unsigned char volatile xdata *)0xfc8b)
#define   PWM45CR               (*(unsigned char volatile xdata *)0xfc8c)
#define   PWM45HLD                (*(unsigned char volatile xdata *)0xfc8d)
#define   PWM46T1               (*(unsigned intvolatile xdata *)0xfc90)
#define   PWM46T1H                (*(unsigned char volatile xdata *)0xfc90)
#define   PWM46T1L                (*(unsigned char volatile xdata *)0xfc91)
#define   PWM46T2               (*(unsigned intvolatile xdata *)0xfc92)
#define   PWM46T2H                (*(unsigned char volatile xdata *)0xfc92)
#define   PWM46T2L                (*(unsigned char volatile xdata *)0xfc93)
#define   PWM46CR               (*(unsigned char volatile xdata *)0xfc94)
#define   PWM46HLD                (*(unsigned char volatile xdata *)0xfc95)
#define   PWM47T1               (*(unsigned intvolatile xdata *)0xfc98)
#define   PWM47T1H                (*(unsigned char volatile xdata *)0xfc98)
#define   PWM47T1L                (*(unsigned char volatile xdata *)0xfc99)
#define   PWM47T2               (*(unsigned intvolatile xdata *)0xfc9a)
#define   PWM47T2H                (*(unsigned char volatile xdata *)0xfc9a)
#define   PWM47T2L                (*(unsigned char volatile xdata *)0xfc9b)
#define   PWM47CR               (*(unsigned char volatile xdata *)0xfc9c)
#define   PWM47HLD                (*(unsigned char volatile xdata *)0xfc9d)
#define   PWM5C                   (*(unsigned intvolatile xdata *)0xfca0)
#define   PWM5CH                  (*(unsigned char volatile xdata *)0xfca0)
#define   PWM5CL                  (*(unsigned char volatile xdata *)0xfca1)
#define   PWM5CKS               (*(unsigned char volatile xdata *)0xfca2)
#define   PWM5IF                  (*(unsigned char volatile xdata *)0xfca5)
#define   PWM5FDCR                (*(unsigned char volatile xdata *)0xfca6)
#define   PWM50T1               (*(unsigned intvolatile xdata *)0xfcb0)
#define   PWM50T1H                (*(unsigned char volatile xdata *)0xfcb0)
#define   PWM50T1L                (*(unsigned char volatile xdata *)0xfcb1)
#define   PWM50T2               (*(unsigned intvolatile xdata *)0xfcb2)
#define   PWM50T2H                (*(unsigned char volatile xdata *)0xfcb2)
#define   PWM50T2L                (*(unsigned char volatile xdata *)0xfcb3)
#define   PWM50CR               (*(unsigned char volatile xdata *)0xfcb4)
#define   PWM50HLD                (*(unsigned char volatile xdata *)0xfcb5)
#define   PWM51T1               (*(unsigned intvolatile xdata *)0xfcb8)
#define   PWM51T1H                (*(unsigned char volatile xdata *)0xfcb8)
#define   PWM51T1L                (*(unsigned char volatile xdata *)0xfcb9)
#define   PWM51T2               (*(unsigned intvolatile xdata *)0xfcba)
#define   PWM51T2H                (*(unsigned char volatile xdata *)0xfcba)
#define   PWM51T2L                (*(unsigned char volatile xdata *)0xfcbb)
#define   PWM51CR               (*(unsigned char volatile xdata *)0xfcbc)
#define   PWM51HLD                (*(unsigned char volatile xdata *)0xfcbd)
#define   PWM52T1               (*(unsigned intvolatile xdata *)0xfcc0)
#define   PWM52T1H                (*(unsigned char volatile xdata *)0xfcc0)
#define   PWM52T1L                (*(unsigned char volatile xdata *)0xfcc1)
#define   PWM52T2               (*(unsigned intvolatile xdata *)0xfcc2)
#define   PWM52T2H                (*(unsigned char volatile xdata *)0xfcc2)
#define   PWM52T2L                (*(unsigned char volatile xdata *)0xfcc3)
#define   PWM52CR               (*(unsigned char volatile xdata *)0xfcc4)
#define   PWM52HLD                (*(unsigned char volatile xdata *)0xfcc5)
#define   PWM53T1               (*(unsigned intvolatile xdata *)0xfcc8)
#define   PWM53T1H                (*(unsigned char volatile xdata *)0xfcc8)
#define   PWM53T1L                (*(unsigned char volatile xdata *)0xfcc9)
#define   PWM53T2               (*(unsigned intvolatile xdata *)0xfcca)
#define   PWM53T2H                (*(unsigned char volatile xdata *)0xfcca)
#define   PWM53T2L                (*(unsigned char volatile xdata *)0xfccb)
#define   PWM53CR               (*(unsigned char volatile xdata *)0xfccc)
#define   PWM53HLD                (*(unsigned char volatile xdata *)0xfccd)
#define   PWM54T1               (*(unsigned intvolatile xdata *)0xfcd0)
#define   PWM54T1H                (*(unsigned char volatile xdata *)0xfcd0)
#define   PWM54T1L                (*(unsigned char volatile xdata *)0xfcd1)
#define   PWM54T2               (*(unsigned intvolatile xdata *)0xfcd2)
#define   PWM54T2H                (*(unsigned char volatile xdata *)0xfcd2)
#define   PWM54T2L                (*(unsigned char volatile xdata *)0xfcd3)
#define   PWM54CR               (*(unsigned char volatile xdata *)0xfcd4)
#define   PWM54HLD                (*(unsigned char volatile xdata *)0xfcd5)
#define   PWM55T1               (*(unsigned intvolatile xdata *)0xfcd8)
#define   PWM55T1H                (*(unsigned char volatile xdata *)0xfcd8)
#define   PWM55T1L                (*(unsigned char volatile xdata *)0xfcd9)
#define   PWM55T2               (*(unsigned intvolatile xdata *)0xfcda)
#define   PWM55T2H                (*(unsigned char volatile xdata *)0xfcda)
#define   PWM55T2L                (*(unsigned char volatile xdata *)0xfcdb)
#define   PWM55CR               (*(unsigned char volatile xdata *)0xfcdc)
#define   PWM55HLD                (*(unsigned char volatile xdata *)0xfcdd)
#define   PWM56T1               (*(unsigned intvolatile xdata *)0xfce0)
#define   PWM56T1H                (*(unsigned char volatile xdata *)0xfce0)
#define   PWM56T1L                (*(unsigned char volatile xdata *)0xfce1)
#define   PWM56T2               (*(unsigned intvolatile xdata *)0xfce2)
#define   PWM56T2H                (*(unsigned char volatile xdata *)0xfce2)
#define   PWM56T2L                (*(unsigned char volatile xdata *)0xfce3)
#define   PWM56CR               (*(unsigned char volatile xdata *)0xfce4)
#define   PWM56HLD                (*(unsigned char volatile xdata *)0xfce5)
#define   PWM57T1               (*(unsigned intvolatile xdata *)0xfce8)
#define   PWM57T1H                (*(unsigned char volatile xdata *)0xfce8)
#define   PWM57T1L                (*(unsigned char volatile xdata *)0xfce9)
#define   PWM57T2               (*(unsigned intvolatile xdata *)0xfcea)
#define   PWM57T2H                (*(unsigned char volatile xdata *)0xfcea)
#define   PWM57T2L                (*(unsigned char volatile xdata *)0xfceb)
#define   PWM57CR               (*(unsigned char volatile xdata *)0xfcec)
#define   PWM57HLD                (*(unsigned char volatile xdata *)0xfced)

#define   MD3                     (*(unsigned char volatile xdata *)0xfcf0)
#define   MD2                     (*(unsigned char volatile xdata *)0xfcf1)
#define   MD1                     (*(unsigned char volatile xdata *)0xfcf2)
#define   MD0                     (*(unsigned char volatile xdata *)0xfcf3)
#define   MD5                     (*(unsigned char volatile xdata *)0xfcf4)
#define   MD4                     (*(unsigned char volatile xdata *)0xfcf5)
#define   ARCON                   (*(unsigned char volatile xdata *)0xfcf6)
#define   OPCON                   (*(unsigned char volatile xdata *)0xfcf7)

/////////////////////////////////////////////////
//FB00H-FBFFH
/////////////////////////////////////////////////

#define   COMEN                   (*(unsigned char volatile xdata *)0xfb00)
#define   SEGENL                  (*(unsigned char volatile xdata *)0xfb01)
#define   SEGENH                  (*(unsigned char volatile xdata *)0xfb02)
#define   LEDCTRL               (*(unsigned char volatile xdata *)0xfb03)
#define   LEDCKS                  (*(unsigned char volatile xdata *)0xfb04)
#define   COM0_DA_L               (*(unsigned char volatile xdata *)0xfb10)
#define   COM1_DA_L               (*(unsigned char volatile xdata *)0xfb11)
#define   COM2_DA_L               (*(unsigned char volatile xdata *)0xfb12)
#define   COM3_DA_L               (*(unsigned char volatile xdata *)0xfb13)
#define   COM4_DA_L               (*(unsigned char volatile xdata *)0xfb14)
#define   COM5_DA_L               (*(unsigned char volatile xdata *)0xfb15)
#define   COM6_DA_L               (*(unsigned char volatile xdata *)0xfb16)
#define   COM7_DA_L               (*(unsigned char volatile xdata *)0xfb17)
#define   COM0_DA_H               (*(unsigned char volatile xdata *)0xfb18)
#define   COM1_DA_H               (*(unsigned char volatile xdata *)0xfb19)
#define   COM2_DA_H               (*(unsigned char volatile xdata *)0xfb1a)
#define   COM3_DA_H               (*(unsigned char volatile xdata *)0xfb1b)
#define   COM4_DA_H               (*(unsigned char volatile xdata *)0xfb1c)
#define   COM5_DA_H               (*(unsigned char volatile xdata *)0xfb1d)
#define   COM6_DA_H               (*(unsigned char volatile xdata *)0xfb1e)
#define   COM7_DA_H               (*(unsigned char volatile xdata *)0xfb1f)
#define   COM0_DC_L               (*(unsigned char volatile xdata *)0xfb20)
#define   COM1_DC_L               (*(unsigned char volatile xdata *)0xfb21)
#define   COM2_DC_L               (*(unsigned char volatile xdata *)0xfb22)
#define   COM3_DC_L               (*(unsigned char volatile xdata *)0xfb23)
#define   COM4_DC_L               (*(unsigned char volatile xdata *)0xfb24)
#define   COM5_DC_L               (*(unsigned char volatile xdata *)0xfb25)
#define   COM6_DC_L               (*(unsigned char volatile xdata *)0xfb26)
#define   COM7_DC_L               (*(unsigned char volatile xdata *)0xfb27)
#define   COM0_DC_H               (*(unsigned char volatile xdata *)0xfb28)
#define   COM1_DC_H               (*(unsigned char volatile xdata *)0xfb29)
#define   COM2_DC_H               (*(unsigned char volatile xdata *)0xfb2a)
#define   COM3_DC_H               (*(unsigned char volatile xdata *)0xfb2b)
#define   COM4_DC_H               (*(unsigned char volatile xdata *)0xfb2c)
#define   COM5_DC_H               (*(unsigned char volatile xdata *)0xfb2d)
#define   COM6_DC_H               (*(unsigned char volatile xdata *)0xfb2e)
#define   COM7_DC_H               (*(unsigned char volatile xdata *)0xfb2f)

#define   TSCHEN1               (*(unsigned char volatile xdata *)0xfb40)
#define   TSCHEN2               (*(unsigned char volatile xdata *)0xfb41)
#define   TSCFG1                  (*(unsigned char volatile xdata *)0xfb42)
#define   TSCFG2                  (*(unsigned char volatile xdata *)0xfb43)
#define   TSWUTC                  (*(unsigned char volatile xdata *)0xfb44)
#define   TSCTRL                  (*(unsigned char volatile xdata *)0xfb45)
#define   TSSTA1                  (*(unsigned char volatile xdata *)0xfb46)
#define   TSSTA2                  (*(unsigned char volatile xdata *)0xfb47)
#define   TSRT                  (*(unsigned char volatile xdata *)0xfb48)
#define   TSDAT                   (*(unsigned intvolatile xdata *)0xfb49)
#define   TSDATH                  (*(unsigned char volatile xdata *)0xfb49)
#define   TSDATL                  (*(unsigned char volatile xdata *)0xfb4a)
#define   TSTH00                  (*(unsigned intvolatile xdata *)0xfb50)
#define   TSTH00H               (*(unsigned char volatile xdata *)0xfb50)
#define   TSTH00L               (*(unsigned char volatile xdata *)0xfb51)
#define   TSTH01                  (*(unsigned intvolatile xdata *)0xfb52)
#define   TSTH01H               (*(unsigned char volatile xdata *)0xfb52)
#define   TSTH01L               (*(unsigned char volatile xdata *)0xfb53)
#define   TSTH02                  (*(unsigned intvolatile xdata *)0xfb54)
#define   TSTH02H               (*(unsigned char volatile xdata *)0xfb54)
#define   TSTH02L               (*(unsigned char volatile xdata *)0xfb55)
#define   TSTH03                  (*(unsigned intvolatile xdata *)0xfb56)
#define   TSTH03H               (*(unsigned char volatile xdata *)0xfb56)
#define   TSTH03L               (*(unsigned char volatile xdata *)0xfb57)
#define   TSTH04                  (*(unsigned intvolatile xdata *)0xfb58)
#define   TSTH04H               (*(unsigned char volatile xdata *)0xfb58)
#define   TSTH04L               (*(unsigned char volatile xdata *)0xfb59)
#define   TSTH05                  (*(unsigned intvolatile xdata *)0xfb5a)
#define   TSTH05H               (*(unsigned char volatile xdata *)0xfb5a)
#define   TSTH05L               (*(unsigned char volatile xdata *)0xfb5b)
#define   TSTH06                  (*(unsigned intvolatile xdata *)0xfb5c)
#define   TSTH06H               (*(unsigned char volatile xdata *)0xfb5c)
#define   TSTH06L               (*(unsigned char volatile xdata *)0xfb5d)
#define   TSTH07                  (*(unsigned intvolatile xdata *)0xfb5e)
#define   TSTH07H               (*(unsigned char volatile xdata *)0xfb5e)
#define   TSTH07L               (*(unsigned char volatile xdata *)0xfb5f)
#define   TSTH08                  (*(unsigned intvolatile xdata *)0xfb60)
#define   TSTH08H               (*(unsigned char volatile xdata *)0xfb60)
#define   TSTH08L               (*(unsigned char volatile xdata *)0xfb61)
#define   TSTH09                  (*(unsigned intvolatile xdata *)0xfb62)
#define   TSTH09H               (*(unsigned char volatile xdata *)0xfb62)
#define   TSTH09L               (*(unsigned char volatile xdata *)0xfb63)
#define   TSTH10                  (*(unsigned intvolatile xdata *)0xfb64)
#define   TSTH10H               (*(unsigned char volatile xdata *)0xfb64)
#define   TSTH10L               (*(unsigned char volatile xdata *)0xfb65)
#define   TSTH11                  (*(unsigned intvolatile xdata *)0xfb66)
#define   TSTH11H               (*(unsigned char volatile xdata *)0xfb66)
#define   TSTH11L               (*(unsigned char volatile xdata *)0xfb67)
#define   TSTH12                  (*(unsigned intvolatile xdata *)0xfb68)
#define   TSTH12H               (*(unsigned char volatile xdata *)0xfb68)
#define   TSTH12L               (*(unsigned char volatile xdata *)0xfb69)
#define   TSTH13                  (*(unsigned intvolatile xdata *)0xfb6a)
#define   TSTH13H               (*(unsigned char volatile xdata *)0xfb6a)
#define   TSTH13L               (*(unsigned char volatile xdata *)0xfb6b)
#define   TSTH14                  (*(unsigned intvolatile xdata *)0xfb6c)
#define   TSTH14H               (*(unsigned char volatile xdata *)0xfb6c)
#define   TSTH14L               (*(unsigned char volatile xdata *)0xfb6d)
#define   TSTH15                  (*(unsigned intvolatile xdata *)0xfb6e)
#define   TSTH15H               (*(unsigned char volatile xdata *)0xfb6e)
#define   TSTH15L               (*(unsigned char volatile xdata *)0xfb6f)

/////////////////////////////////////////////////
//FA00H-FAFFH
/////////////////////////////////////////////////

/////////////////////////////////////////////////
//F900H-F9FFH
/////////////////////////////////////////////////

#define   PWMA_ENO2               (*(unsigned char volatile xdata *)0xf930)
#define   PWMA_IOAUX2             (*(unsigned char volatile xdata *)0xf931)
#define   PWMA_CR3                (*(unsigned char volatile xdata *)0xf932)
#define   PWMA_SR3                (*(unsigned char volatile xdata *)0xf933)
#define   PWMA_CCER3            (*(unsigned char volatile xdata *)0xf934)
#define   PWMA_CCMR1X             (*(unsigned char volatile xdata *)0xf938)
#define   PWMA_CCMR2X             (*(unsigned char volatile xdata *)0xf939)
#define   PWMA_CCMR3X             (*(unsigned char volatile xdata *)0xf93a)
#define   PWMA_CCMR4X             (*(unsigned char volatile xdata *)0xf93b)
#define   PWMA_CCMR5            (*(unsigned char volatile xdata *)0xf93c)
#define   PWMA_CCMR5X             (*(unsigned char volatile xdata *)0xf93d)
#define   PWMA_CCMR6            (*(unsigned char volatile xdata *)0xf93e)
#define   PWMA_CCMR6X             (*(unsigned char volatile xdata *)0xf93f)
#define   PWMA_CCR5H            (*(unsigned char volatile xdata *)0xf940)
#define   PWMA_CCR5L            (*(unsigned char volatile xdata *)0xf941)
#define   PWMA_CCR5X            (*(unsigned char volatile xdata *)0xf942)
#define   PWMA_CCR6H            (*(unsigned char volatile xdata *)0xf943)
#define   PWMA_CCR6L            (*(unsigned char volatile xdata *)0xf944)


/////////////////////////////////////////////////

#endif





yangjq 发表于 2026-1-27 09:29:22

没有显示的 使用 sbit进行定义
下面这种访问何来位寻址?
PCA_PWM1|=0x02;
编译后就是    ORL   PCA_PWM1,#02   这是位寻址么?

大言不惭,信口雌黄

神农鼎 发表于 2026-1-27 09:29:36





;STC8G.INC
;包含本头文件后,不用另外再包含"REG51.INC"

$NOMOD51

$SAVE
$NOLIST

P0          DATA      080H
P00         BIT         P0.0
P01         BIT         P0.1
P02         BIT         P0.2
P03         BIT         P0.3
P04         BIT         P0.4
P05         BIT         P0.5
P06         BIT         P0.6
P07         BIT         P0.7

SP          DATA      081H
DPL         DATA      082H
DPH         DATA      083H
S4CON       DATA      084H
S4BUF       DATA      085H
PCON      DATA      087H

TCON      DATA      088H
TF1         BIT         TCON.7
TR1         BIT         TCON.6
TF0         BIT         TCON.5
TR0         BIT         TCON.4
IE1         BIT         TCON.3
IT1         BIT         TCON.2
IE0         BIT         TCON.1
IT0         BIT         TCON.0

TMOD      DATA      089H
TL0         DATA      08AH
TL1         DATA      08BH
TH0         DATA      08CH
TH1         DATA      08DH
AUXR      DATA      08EH
INTCLKO   DATA      08FH

P1          DATA      090H
P10         BIT         P1.0
P11         BIT         P1.1
P12         BIT         P1.2
P13         BIT         P1.3
P14         BIT         P1.4
P15         BIT         P1.5
P16         BIT         P1.6
P17         BIT         P1.7

P1M1      DATA      091H
P1M0      DATA      092H
P0M1      DATA      093H
P0M0      DATA      094H
P2M1      DATA      095H
P2M0      DATA      096H

SCON      DATA      098H
SM0         BIT         SCON.7
SM1         BIT         SCON.6
SM2         BIT         SCON.5
REN         BIT         SCON.4
TB8         BIT         SCON.3
RB8         BIT         SCON.2
TI          BIT         SCON.1
RI          BIT         SCON.0

SBUF      DATA      099H
S2CON       DATA      09AH
S2BUF       DATA      09BH
IRCBAND   DATA      09DH
LIRTRIM   DATA      09EH
IRTRIM      DATA      09FH

P2          DATA      0A0H
P20         BIT         P2.0
P21         BIT         P2.1
P22         BIT         P2.2
P23         BIT         P2.3
P24         BIT         P2.4
P25         BIT         P2.5
P26         BIT         P2.6
P27         BIT         P2.7

P_SW1       DATA      0A2H

IE          DATA      0A8H
EA          BIT         IE.7
ELVD      BIT         IE.6
EADC      BIT         IE.5
ES          BIT         IE.4
ET1         BIT         IE.3
EX1         BIT         IE.2
ET0         BIT         IE.1
EX0         BIT         IE.0

SADDR       DATA      0A9H
WKTCL       DATA      0AAH
WKTCH       DATA      0ABH
S3CON       DATA      0ACH
S3BUF       DATA      0ADH
TA          DATA      0AEH
IE2         DATA      0AFH

P3          DATA      0B0H
P30         BIT         P3.0
P31         BIT         P3.1
P32         BIT         P3.2
P33         BIT         P3.3
P34         BIT         P3.4
P35         BIT         P3.5
P36         BIT         P3.6
P37         BIT         P3.7

RD          BIT         P3.7
WR          BIT         P3.6
T1          BIT         P3.5
T0          BIT         P3.4
INT1      BIT         P3.3
INT0      BIT         P3.2
TXD         BIT         P3.1
RXD         BIT         P3.0

P3M1      DATA      0B1H
P3M0      DATA      0B2H
P4M1      DATA      0B3H
P4M0      DATA      0B4H
IP2         DATA      0B5H
IP2H      DATA      0B6H
IPH         DATA      0B7H

IP          DATA      0B8H
PPCA      BIT         IP.7
PLVD      BIT         IP.6
PADC      BIT         IP.5
PS          BIT         IP.4
PT1         BIT         IP.3
PX1         BIT         IP.2
PT0         BIT         IP.1
PX0         BIT         IP.0

SADEN       DATA      0B9H
P_SW2       DATA      0BAH
ADC_CONTR   DATA      0BCH
ADC_RES   DATA      0BDH
ADC_RESL    DATA      0BEH

P4          DATA      0C0H
P40         BIT         P4.0
P41         BIT         P4.1
P42         BIT         P4.2
P43         BIT         P4.3
P44         BIT         P4.4
P45         BIT         P4.5
P46         BIT         P4.6
P47         BIT         P4.7

WDT_CONTR   DATA      0C1H
IAP_DATA    DATA      0C2H
IAP_ADDRH   DATA      0C3H
IAP_ADDRL   DATA      0C4H
IAP_CMD   DATA      0C5H
IAP_TRIG    DATA      0C6H
IAP_CONTR   DATA      0C7H

P5          DATA      0C8H
P50         BIT         P5.0
P51         BIT         P5.1
P52         BIT         P5.2
P53         BIT         P5.3
P54         BIT         P5.4
P55         BIT         P5.5
P56         BIT         P5.6
P57         BIT         P5.7

P5M1      DATA      0C9H
P5M0      DATA      0CAH
P6M1      DATA      0cbH
P6M0      DATA      0ccH
SPSTAT      DATA      0CDH
SPCTL       DATA      0CEH
SPDAT       DATA      0CFH

PSW         DATA      0D0H
CY          BIT         PSW.7
AC          BIT         PSW.6
F0          BIT         PSW.5
RS1         BIT         PSW.4
RS0         BIT         PSW.3
OV          BIT         PSW.2
F1          BIT         PSW.1
P         BIT         PSW.0

T4T3M       DATA      0D1H
T4H         DATA      0D2H
T4L         DATA      0D3H
T3H         DATA      0D4H
T3L         DATA      0D5H
T2H         DATA      0D6H
T2L         DATA      0D7H

T3T4M       DATA      0D1H
TH4         DATA      0D2H
TL4         DATA      0D3H
TH3         DATA      0D4H
TL3         DATA      0D5H
TH2         DATA      0D6H
TL2         DATA      0D7H

CCON      DATA      0D8H
CF          BIT         CCON.7
CR          BIT         CCON.6
CCF2      BIT         CCON.2
CCF1      BIT         CCON.1
CCF0      BIT         CCON.0

CMOD      DATA      0D9H
CCAPM0      DATA      0DAH
CCAPM1      DATA      0DBH
CCAPM2      DATA      0DCH
ADCCFG      DATA      0DEH
IP3         DATA      0DFH
ACC         DATA      0E0H
P7M1      DATA      0E1H
P7M0      DATA      0E2H
DPS         DATA      0E3H
DPL1      DATA      0E4H
DPH1      DATA      0E5H
CMPCR1      DATA      0E6H
CMPCR2      DATA      0E7H

P6          DATA      0E8H
P60         BIT         P6.0
P61         BIT         P6.1
P62         BIT         P6.2
P63         BIT         P6.3
P64         BIT         P6.4
P65         BIT         P6.5
P66         BIT         P6.6
P67         BIT         P6.7

CL          DATA      0E9H
CCAP0L      DATA      0EAH
CCAP1L      DATA      0EBH
CCAP2L      DATA      0ECH
IP3H      DATA      0EEH
AUXINTIF    DATA      0EFH
B         DATA      0F0H
PWMSET      DATA      0F1H
PCA_PWM0    DATA      0F2H
PCA_PWM1    DATA      0F3H
PCA_PWM2    DATA      0F4H
IAP_TPS   DATA      0F5H
PWMCFG01    DATA      0F6H
PWMCFG23    DATA      0F7H

P7          DATA      0F8H
P70         BIT         P7.0
P71         BIT         P7.1
P72         BIT         P7.2
P73         BIT         P7.3
P74         BIT         P7.4
P75         BIT         P7.5
P76         BIT         P7.6
P77         BIT         P7.7

CH          DATA      0F9H
CCAP0H      DATA      0FAH
CCAP1H      DATA      0FBH
CCAP2H      DATA      0FCH
PWMCFG45    DATA      0FEH
RSTCFG      DATA      0FFH

;如下特殊功能寄存器位于扩展RAM区域
;访问这些寄存器,需先将P_SW2的BIT7设置为1,才可正常读写

PWM0C         EQU   0FF00H
PWM0CH          EQU   0FF00H
PWM0CL          EQU   0FF01H
PWM0CKS         EQU   0FF02H
PWM0TADC      EQU   0FF03H
PWM0TADCH       EQU   0FF03H
PWM0TADCL       EQU   0FF04H
PWM0IF          EQU   0FF05H
PWM0FDCR      EQU   0FF06H
PWM00T1         EQU   0FF10H
PWM00T1H      EQU   0FF10H
PWM00T1L      EQU   0FF11H
PWM00T2         EQU   0FF12H
PWM00T2H      EQU   0FF12H
PWM00T2L      EQU   0FF13H
PWM00CR         EQU   0FF14H
PWM00HLD      EQU   0FF15H
PWM01T1         EQU   0FF18H
PWM01T1H      EQU   0FF18H
PWM01T1L      EQU   0FF19H
PWM01T2         EQU   0FF1AH
PWM01T2H      EQU   0FF1AH
PWM01T2L      EQU   0FF1BH
PWM01CR         EQU   0FF1CH
PWM01HLD      EQU   0FF1DH
PWM02T1         EQU   0FF20H
PWM02T1H      EQU   0FF20H
PWM02T1L      EQU   0FF21H
PWM02T2         EQU   0FF22H
PWM02T2H      EQU   0FF22H
PWM02T2L      EQU   0FF23H
PWM02CR         EQU   0FF24H
PWM02HLD      EQU   0FF25H
PWM03T1         EQU   0FF28H
PWM03T1H      EQU   0FF28H
PWM03T1L      EQU   0FF29H
PWM03T2         EQU   0FF2AH
PWM03T2H      EQU   0FF2AH
PWM03T2L      EQU   0FF2BH
PWM03CR         EQU   0FF2CH
PWM03HLD      EQU   0FF2DH
PWM04T1         EQU   0FF30H
PWM04T1H      EQU   0FF30H
PWM04T1L      EQU   0FF31H
PWM04T2         EQU   0FF32H
PWM04T2H      EQU   0FF32H
PWM04T2L      EQU   0FF33H
PWM04CR         EQU   0FF34H
PWM04HLD      EQU   0FF35H
PWM05T1         EQU   0FF38H
PWM05T1H      EQU   0FF38H
PWM05T1L      EQU   0FF39H
PWM05T2         EQU   0FF3AH
PWM05T2H      EQU   0FF3AH
PWM05T2L      EQU   0FF3BH
PWM05CR         EQU   0FF3CH
PWM05HLD      EQU   0FF3DH
PWM06T1         EQU   0FF40H
PWM06T1H      EQU   0FF40H
PWM06T1L      EQU   0FF41H
PWM06T2         EQU   0FF42H
PWM06T2H      EQU   0FF42H
PWM06T2L      EQU   0FF43H
PWM06CR         EQU   0FF44H
PWM06HLD      EQU   0FF45H
PWM07T1         EQU   0FF48H
PWM07T1H      EQU   0FF48H
PWM07T1L      EQU   0FF49H
PWM07T2         EQU   0FF4AH
PWM07T2H      EQU   0FF4AH
PWM07T2L      EQU   0FF4BH
PWM07CR         EQU   0FF4CH
PWM07HLD      EQU   0FF4DH
PWM1C         EQU   0FF50H
PWM1CH          EQU   0FF50H
PWM1CL          EQU   0FF51H
PWM1CKS         EQU   0FF52H
PWM1IF          EQU   0FF55H
PWM1FDCR      EQU   0FF56H
PWM10T1         EQU   0FF60H
PWM10T1H      EQU   0FF60H
PWM10T1L      EQU   0FF61H
PWM10T2         EQU   0FF62H
PWM10T2H      EQU   0FF62H
PWM10T2L      EQU   0FF63H
PWM10CR         EQU   0FF64H
PWM10HLD      EQU   0FF65H
PWM11T1         EQU   0FF68H
PWM11T1H      EQU   0FF68H
PWM11T1L      EQU   0FF69H
PWM11T2         EQU   0FF6AH
PWM11T2H      EQU   0FF6AH
PWM11T2L      EQU   0FF6BH
PWM11CR         EQU   0FF6CH
PWM11HLD      EQU   0FF6DH
PWM12T1         EQU   0FF70H
PWM12T1H      EQU   0FF70H
PWM12T1L      EQU   0FF71H
PWM12T2         EQU   0FF72H
PWM12T2H      EQU   0FF72H
PWM12T2L      EQU   0FF73H
PWM12CR         EQU   0FF74H
PWM12HLD      EQU   0FF75H
PWM13T1         EQU   0FF78H
PWM13T1H      EQU   0FF78H
PWM13T1L      EQU   0FF79H
PWM13T2         EQU   0FF7AH
PWM13T2H      EQU   0FF7AH
PWM13T2L      EQU   0FF7BH
PWM13CR         EQU   0FF7CH
PWM13HLD      EQU   0FF7DH
PWM14T1         EQU   0FF80H
PWM14T1H      EQU   0FF80H
PWM14T1L      EQU   0FF81H
PWM14T2         EQU   0FF82H
PWM14T2H      EQU   0FF82H
PWM14T2L      EQU   0FF83H
PWM14CR         EQU   0FF84H
PWM14HLD      EQU   0FF85H
PWM15T1         EQU   0FF88H
PWM15T1H      EQU   0FF88H
PWM15T1L      EQU   0FF89H
PWM15T2         EQU   0FF8AH
PWM15T2H      EQU   0FF8AH
PWM15T2L      EQU   0FF8BH
PWM15CR         EQU   0FF8CH
PWM15HLD      EQU   0FF8DH
PWM16T1         EQU   0FF90H
PWM16T1H      EQU   0FF90H
PWM16T1L      EQU   0FF91H
PWM16T2         EQU   0FF92H
PWM16T2H      EQU   0FF92H
PWM16T2L      EQU   0FF93H
PWM16CR         EQU   0FF94H
PWM16HLD      EQU   0FF95H
PWM17T1         EQU   0FF98H
PWM17T1H      EQU   0FF98H
PWM17T1L      EQU   0FF99H
PWM17T2         EQU   0FF9AH
PWM17T2H      EQU   0FF9AH
PWM17T2L      EQU   0FF9BH
PWM17CR         EQU   0FF9CH
PWM17HLD      EQU   0FF9DH
PWM2C         EQU   0FFA0H
PWM2CH          EQU   0FFA0H
PWM2CL          EQU   0FFA1H
PWM2CKS         EQU   0FFA2H
PWM2TADC      EQU   0FFA3H
PWM2TADCH       EQU   0FFA3H
PWM2TADCL       EQU   0FFA4H
PWM2IF          EQU   0FFA5H
PWM2FDCR      EQU   0FFA6H
PWM20T1         EQU   0FFB0H
PWM20T1H      EQU   0FFB0H
PWM20T1L      EQU   0FFB1H
PWM20T2         EQU   0FFB2H
PWM20T2H      EQU   0FFB2H
PWM20T2L      EQU   0FFB3H
PWM20CR         EQU   0FFB4H
PWM20HLD      EQU   0FFB5H
PWM21T1         EQU   0FFB8H
PWM21T1H      EQU   0FFB8H
PWM21T1L      EQU   0FFB9H
PWM21T2         EQU   0FFBAH
PWM21T2H      EQU   0FFBAH
PWM21T2L      EQU   0FFBBH
PWM21CR         EQU   0FFBCH
PWM21HLD      EQU   0FFBDH
PWM22T1         EQU   0FFC0H
PWM22T1H      EQU   0FFC0H
PWM22T1L      EQU   0FFC1H
PWM22T2         EQU   0FFC2H
PWM22T2H      EQU   0FFC2H
PWM22T2L      EQU   0FFC3H
PWM22CR         EQU   0FFC4H
PWM22HLD      EQU   0FFC5H
PWM23T1         EQU   0FFC8H
PWM23T1H      EQU   0FFC8H
PWM23T1L      EQU   0FFC9H
PWM23T2         EQU   0FFCAH
PWM23T2H      EQU   0FFCAH
PWM23T2L      EQU   0FFCBH
PWM23CR         EQU   0FFCCH
PWM23HLD      EQU   0FFCDH
PWM24T1         EQU   0FFD0H
PWM24T1H      EQU   0FFD0H
PWM24T1L      EQU   0FFD1H
PWM24T2         EQU   0FFD2H
PWM24T2H      EQU   0FFD2H
PWM24T2L      EQU   0FFD3H
PWM24CR         EQU   0FFD4H
PWM24HLD      EQU   0FFD5H
PWM25T1         EQU   0FFD8H
PWM25T1H      EQU   0FFD8H
PWM25T1L      EQU   0FFD9H
PWM25T2         EQU   0FFDAH
PWM25T2H      EQU   0FFDAH
PWM25T2L      EQU   0FFDBH
PWM25CR         EQU   0FFDCH
PWM25HLD      EQU   0FFDDH
PWM26T1         EQU   0FFE0H
PWM26T1H      EQU   0FFE0H
PWM26T1L      EQU   0FFE1H
PWM26T2         EQU   0FFE2H
PWM26T2H      EQU   0FFE2H
PWM26T2L      EQU   0FFE3H
PWM26CR         EQU   0FFE4H
PWM26HLD      EQU   0FFE5H
PWM27T1         EQU   0FFE8H
PWM27T1H      EQU   0FFE8H
PWM27T1L      EQU   0FFE9H
PWM27T2         EQU   0FFEAH
PWM27T2H      EQU   0FFEAH
PWM27T2L      EQU   0FFEBH
PWM27CR         EQU   0FFECH
PWM27HLD      EQU   0FFEDH

CLKSEL          EQU   0FE00H
CLKDIV          EQU   0FE01H
HIRCCR          EQU   0FE02H
XOSCCR          EQU   0FE03H
IRC32KCR      EQU   0FE04H
MCLKOCR         EQU   0FE05H
IRCDB         EQU   0FE06H
X32KCR          EQU   0FE08H

P0PU            EQU   0FE10H
P1PU            EQU   0FE11H
P2PU            EQU   0FE12H
P3PU            EQU   0FE13H
P4PU            EQU   0FE14H
P5PU            EQU   0FE15H
P6PU            EQU   0FE16H
P7PU            EQU   0FE17H
P0NCS         EQU   0FE18H
P1NCS         EQU   0FE19H
P2NCS         EQU   0FE1AH
P3NCS         EQU   0FE1BH
P4NCS         EQU   0FE1CH
P5NCS         EQU   0FE1DH
P6NCS         EQU   0FE1EH
P7NCS         EQU   0FE1FH
P0SR            EQU   0FE20H
P1SR            EQU   0FE21H
P2SR            EQU   0FE22H
P3SR            EQU   0FE23H
P4SR            EQU   0FE24H
P5SR            EQU   0FE25H
P6SR            EQU   0FE26H
P7SR            EQU   0FE27H
P0DR            EQU   0FE28H
P1DR            EQU   0FE29H
P2DR            EQU   0FE2AH
P3DR            EQU   0FE2BH
P4DR            EQU   0FE2CH
P5DR            EQU   0FE2DH
P6DR            EQU   0FE2EH
P7DR            EQU   0FE2FH
P0IE            EQU   0FE30H
P1IE            EQU   0FE31H
P2IE            EQU   0FE32H
P3IE            EQU   0FE33H
P4IE            EQU   0FE34H
P5IE            EQU   0FE35H
P6IE            EQU   0FE36H
P7IE            EQU   0FE37H

RTCCR         EQU   0FE60H
RTCCFG          EQU   0FE61H
RTCIEN          EQU   0FE62H
RTCIF         EQU   0FE63H
ALAHOUR         EQU   0FE64H
ALAMIN          EQU   0FE65H
ALASEC          EQU   0FE66H
ALASSEC         EQU   0FE67H
INIYEAR         EQU   0FE68H
INIMONTH      EQU   0FE69H
INIDAY          EQU   0FE6AH
INIHOUR         EQU   0FE6BH
INIMIN          EQU   0FE6CH
INISEC          EQU   0FE6DH
INISSEC         EQU   0FE6EH
RTCYEAR         EQU   0FE70H
RTCMONTH      EQU   0FE71H
RTCDAY          EQU   0FE72H
RTCHOUR         EQU   0FE73H
RTCMIN          EQU   0FE74H
RTCSEC          EQU   0FE75H
RTCSSEC         EQU   0FE76H

I2CCFG          EQU   0FE80H
I2CMSCR         EQU   0FE81H
I2CMSST         EQU   0FE82H
I2CSLCR         EQU   0FE83H
I2CSLST         EQU   0FE84H
I2CSLADR      EQU   0FE85H
I2CTXD          EQU   0FE86H
I2CRXD          EQU   0FE87H
I2CMSAUX      EQU   0FE88H

TM2PS         EQU   0FEA2H
TM3PS         EQU   0FEA3H
TM4PS         EQU   0FEA4H
ADCTIM          EQU   0FEA8H
T3T4PS          EQU   0FEACH

P0INTE          EQU   0FD00H
P1INTE          EQU   0FD01H
P2INTE          EQU   0FD02H
P3INTE          EQU   0FD03H
P4INTE          EQU   0FD04H
P5INTE          EQU   0FD05H
P6INTE          EQU   0FD06H
P7INTE          EQU   0FD07H
P0INTF          EQU   0FD10H
P1INTF          EQU   0FD11H
P2INTF          EQU   0FD12H
P3INTF          EQU   0FD13H
P4INTF          EQU   0FD14H
P5INTF          EQU   0FD15H
P6INTF          EQU   0FD16H
P7INTF          EQU   0FD17H
P0IM0         EQU   0FD20H
P1IM0         EQU   0FD21H
P2IM0         EQU   0FD22H
P3IM0         EQU   0FD23H
P4IM0         EQU   0FD24H
P5IM0         EQU   0FD25H
P6IM0         EQU   0FD26H
P7IM0         EQU   0FD27H
P0IM1         EQU   0FD30H
P1IM1         EQU   0FD31H
P2IM1         EQU   0FD32H
P3IM1         EQU   0FD33H
P4IM1         EQU   0FD34H
P5IM1         EQU   0FD35H
P6IM1         EQU   0FD36H
P7IM1         EQU   0FD37H
P0WKUE          EQU   0FD40H
P1WKUE          EQU   0FD41H
P2WKUE          EQU   0FD42H
P3WKUE          EQU   0FD43H
P4WKUE          EQU   0FD44H
P5WKUE          EQU   0FD45H
P6WKUE          EQU   0FD46H
P7WKUE          EQU   0FD47H
PINIPL          EQU   0FD60H
PINIPH          EQU   0FD61H

PWM3C         EQU   0FC00H
PWM3CH          EQU   0FC00H
PWM3CL          EQU   0FC01H
PWM3CKS         EQU   0FC02H
PWM3IF          EQU   0FC05H
PWM3FDCR      EQU   0FC06H
PWM30T1         EQU   0FC10H
PWM30T1H      EQU   0FC10H
PWM30T1L      EQU   0FC11H
PWM30T2         EQU   0FC12H
PWM30T2H      EQU   0FC12H
PWM30T2L      EQU   0FC13H
PWM30CR         EQU   0FC14H
PWM30HLD      EQU   0FC15H
PWM31T1         EQU   0FC18H
PWM31T1H      EQU   0FC18H
PWM31T1L      EQU   0FC19H
PWM31T2         EQU   0FC1AH
PWM31T2H      EQU   0FC1AH
PWM31T2L      EQU   0FC1BH
PWM31CR         EQU   0FC1CH
PWM31HLD      EQU   0FC1DH
PWM32T1         EQU   0FC20H
PWM32T1H      EQU   0FC20H
PWM32T1L      EQU   0FC21H
PWM32T2         EQU   0FC22H
PWM32T2H      EQU   0FC22H
PWM32T2L      EQU   0FC23H
PWM32CR         EQU   0FC24H
PWM32HLD      EQU   0FC25H
PWM33T1         EQU   0FC28H
PWM33T1H      EQU   0FC28H
PWM33T1L      EQU   0FC29H
PWM33T2         EQU   0FC2AH
PWM33T2H      EQU   0FC2AH
PWM33T2L      EQU   0FC2BH
PWM33CR         EQU   0FC2CH
PWM33HLD      EQU   0FC2DH
PWM34T1         EQU   0FC30H
PWM34T1H      EQU   0FC30H
PWM34T1L      EQU   0FC31H
PWM34T2         EQU   0FC32H
PWM34T2H      EQU   0FC32H
PWM34T2L      EQU   0FC33H
PWM34CR         EQU   0FC34H
PWM34HLD      EQU   0FC35H
PWM35T1         EQU   0FC38H
PWM35T1H      EQU   0FC38H
PWM35T1L      EQU   0FC39H
PWM35T2         EQU   0FC3AH
PWM35T2H      EQU   0FC3AH
PWM35T2L      EQU   0FC3BH
PWM35CR         EQU   0FC3CH
PWM35HLD      EQU   0FC3DH
PWM36T1         EQU   0FC40H
PWM36T1H      EQU   0FC40H
PWM36T1L      EQU   0FC41H
PWM36T2         EQU   0FC42H
PWM36T2H      EQU   0FC42H
PWM36T2L      EQU   0FC43H
PWM36CR         EQU   0FC44H
PWM36HLD      EQU   0FC45H
PWM37T1         EQU   0FC48H
PWM37T1H      EQU   0FC48H
PWM37T1L      EQU   0FC49H
PWM37T2         EQU   0FC4AH
PWM37T2H      EQU   0FC4AH
PWM37T2L      EQU   0FC4BH
PWM37CR         EQU   0FC4CH
PWM37HLD      EQU   0FC4DH
PWM4C         EQU   0FC50H
PWM4CH          EQU   0FC50H
PWM4CL          EQU   0FC51H
PWM4CKS         EQU   0FC52H
PWM4TADC      EQU   0FC53H
PWM4TADCH       EQU   0FC53H
PWM4TADCL       EQU   0FC54H
PWM4IF          EQU   0FC55H
PWM4FDCR      EQU   0FC56H
PWM40T1         EQU   0FC60H
PWM40T1H      EQU   0FC60H
PWM40T1L      EQU   0FC61H
PWM40T2         EQU   0FC62H
PWM40T2H      EQU   0FC62H
PWM40T2L      EQU   0FC63H
PWM40CR         EQU   0FC64H
PWM40HLD      EQU   0FC65H
PWM41T1         EQU   0FC68H
PWM41T1H      EQU   0FC68H
PWM41T1L      EQU   0FC69H
PWM41T2         EQU   0FC6AH
PWM41T2H      EQU   0FC6AH
PWM41T2L      EQU   0FC6BH
PWM41CR         EQU   0FC6CH
PWM41HLD      EQU   0FC6DH
PWM42T1         EQU   0FC70H
PWM42T1H      EQU   0FC70H
PWM42T1L      EQU   0FC71H
PWM42T2         EQU   0FC72H
PWM42T2H      EQU   0FC72H
PWM42T2L      EQU   0FC73H
PWM42CR         EQU   0FC74H
PWM42HLD      EQU   0FC75H
PWM43T1         EQU   0FC78H
PWM43T1H      EQU   0FC78H
PWM43T1L      EQU   0FC79H
PWM43T2         EQU   0FC7AH
PWM43T2H      EQU   0FC7AH
PWM43T2L      EQU   0FC7BH
PWM43CR         EQU   0FC7CH
PWM43HLD      EQU   0FC7DH
PWM44T1         EQU   0FC80H
PWM44T1H      EQU   0FC80H
PWM44T1L      EQU   0FC81H
PWM44T2         EQU   0FC82H
PWM44T2H      EQU   0FC82H
PWM44T2L      EQU   0FC83H
PWM44CR         EQU   0FC84H
PWM44HLD      EQU   0FC85H
PWM45T1         EQU   0FC88H
PWM45T1H      EQU   0FC88H
PWM45T1L      EQU   0FC89H
PWM45T2         EQU   0FC8AH
PWM45T2H      EQU   0FC8AH
PWM45T2L      EQU   0FC8BH
PWM45CR         EQU   0FC8CH
PWM45HLD      EQU   0FC8DH
PWM46T1         EQU   0FC90H
PWM46T1H      EQU   0FC90H
PWM46T1L      EQU   0FC91H
PWM46T2         EQU   0FC92H
PWM46T2H      EQU   0FC92H
PWM46T2L      EQU   0FC93H
PWM46CR         EQU   0FC94H
PWM46HLD      EQU   0FC95H
PWM47T1         EQU   0FC98H
PWM47T1H      EQU   0FC98H
PWM47T1L      EQU   0FC99H
PWM47T2         EQU   0FC9AH
PWM47T2H      EQU   0FC9AH
PWM47T2L      EQU   0FC9BH
PWM47CR         EQU   0FC9CH
PWM47HLD      EQU   0FC9DH
PWM5C         EQU   0FCA0H
PWM5CH          EQU   0FCA0H
PWM5CL          EQU   0FCA1H
PWM5CKS         EQU   0FCA2H
PWM5IF          EQU   0FCA5H
PWM5FDCR      EQU   0FCA6H
PWM50T1         EQU   0FCB0H
PWM50T1H      EQU   0FCB0H
PWM50T1L      EQU   0FCB1H
PWM50T2         EQU   0FCB2H
PWM50T2H      EQU   0FCB2H
PWM50T2L      EQU   0FCB3H
PWM50CR         EQU   0FCB4H
PWM50HLD      EQU   0FCB5H
PWM51T1         EQU   0FCB8H
PWM51T1H      EQU   0FCB8H
PWM51T1L      EQU   0FCB9H
PWM51T2         EQU   0FCBAH
PWM51T2H      EQU   0FCBAH
PWM51T2L      EQU   0FCBBH
PWM51CR         EQU   0FCBCH
PWM51HLD      EQU   0FCBDH
PWM52T1         EQU   0FCC0H
PWM52T1H      EQU   0FCC0H
PWM52T1L      EQU   0FCC1H
PWM52T2         EQU   0FCC2H
PWM52T2H      EQU   0FCC2H
PWM52T2L      EQU   0FCC3H
PWM52CR         EQU   0FCC4H
PWM52HLD      EQU   0FCC5H
PWM53T1         EQU   0FCC8H
PWM53T1H      EQU   0FCC8H
PWM53T1L      EQU   0FCC9H
PWM53T2         EQU   0FCCAH
PWM53T2H      EQU   0FCCAH
PWM53T2L      EQU   0FCCBH
PWM53CR         EQU   0FCCCH
PWM53HLD      EQU   0FCCDH
PWM54T1         EQU   0FCD0H
PWM54T1H      EQU   0FCD0H
PWM54T1L      EQU   0FCD1H
PWM54T2         EQU   0FCD2H
PWM54T2H      EQU   0FCD2H
PWM54T2L      EQU   0FCD3H
PWM54CR         EQU   0FCD4H
PWM54HLD      EQU   0FCD5H
PWM55T1         EQU   0FCD8H
PWM55T1H      EQU   0FCD8H
PWM55T1L      EQU   0FCD9H
PWM55T2         EQU   0FCDAH
PWM55T2H      EQU   0FCDAH
PWM55T2L      EQU   0FCDBH
PWM55CR         EQU   0FCDCH
PWM55HLD      EQU   0FCDDH
PWM56T1         EQU   0FCE0H
PWM56T1H      EQU   0FCE0H
PWM56T1L      EQU   0FCE1H
PWM56T2         EQU   0FCE2H
PWM56T2H      EQU   0FCE2H
PWM56T2L      EQU   0FCE3H
PWM56CR         EQU   0FCE4H
PWM56HLD      EQU   0FCE5H
PWM57T1         EQU   0FCE8H
PWM57T1H      EQU   0FCE8H
PWM57T1L      EQU   0FCE9H
PWM57T2         EQU   0FCEAH
PWM57T2H      EQU   0FCEAH
PWM57T2L      EQU   0FCEBH
PWM57CR         EQU   0FCECH
PWM57HLD      EQU   0FCEDH

MD3             EQU   0FCF0H
MD2             EQU   0FCF1H
MD1             EQU   0FCF2H
MD0             EQU   0FCF3H
MD5             EQU   0FCF4H
MD4             EQU   0FCF5H
ARCON         EQU   0FCF6H
OPCON         EQU   0FCF7H

COMEN         EQU   0FB00H
SEGENL          EQU   0FB01H
SEGENH          EQU   0FB02H
LEDCTRL         EQU   0FB03H
LEDCKS          EQU   0FB04H
COM0_DA_L       EQU   0FB10H
COM1_DA_L       EQU   0FB11H
COM2_DA_L       EQU   0FB12H
COM3_DA_L       EQU   0FB13H
COM4_DA_L       EQU   0FB14H
COM5_DA_L       EQU   0FB15H
COM6_DA_L       EQU   0FB16H
COM7_DA_L       EQU   0FB17H
COM0_DA_H       EQU   0FB18H
COM1_DA_H       EQU   0FB19H
COM2_DA_H       EQU   0FB1AH
COM3_DA_H       EQU   0FB1BH
COM4_DA_H       EQU   0FB1CH
COM5_DA_H       EQU   0FB1DH
COM6_DA_H       EQU   0FB1EH
COM7_DA_H       EQU   0FB1FH
COM0_DC_L       EQU   0FB20H
COM1_DC_L       EQU   0FB21H
COM2_DC_L       EQU   0FB22H
COM3_DC_L       EQU   0FB23H
COM4_DC_L       EQU   0FB24H
COM5_DC_L       EQU   0FB25H
COM6_DC_L       EQU   0FB26H
COM7_DC_L       EQU   0FB27H
COM0_DC_H       EQU   0FB28H
COM1_DC_H       EQU   0FB29H
COM2_DC_H       EQU   0FB2AH
COM3_DC_H       EQU   0FB2BH
COM4_DC_H       EQU   0FB2CH
COM5_DC_H       EQU   0FB2DH
COM6_DC_H       EQU   0FB2EH
COM7_DC_H       EQU   0FB2FH

TSCHEN1         EQU   0FB40H
TSCHEN2         EQU   0FB41H
TSCFG1          EQU   0FB42H
TSCFG2          EQU   0FB43H
TSWUTC          EQU   0FB44H
TSCTRL          EQU   0FB45H
TSSTA1          EQU   0FB46H
TSSTA2          EQU   0FB47H
TSRT            EQU   0FB48H
TSDAT         EQU   0FB49H
TSDATH          EQU   0FB49H
TSDATL          EQU   0FB4AH
TSTH00          EQU   0FB50H
TSTH00H         EQU   0FB50H
TSTH00L         EQU   0FB51H
TSTH01          EQU   0FB52H
TSTH01H         EQU   0FB52H
TSTH01L         EQU   0FB53H
TSTH02          EQU   0FB54H
TSTH02H         EQU   0FB54H
TSTH02L         EQU   0FB55H
TSTH03          EQU   0FB56H
TSTH03H         EQU   0FB56H
TSTH03L         EQU   0FB57H
TSTH04          EQU   0FB58H
TSTH04H         EQU   0FB58H
TSTH04L         EQU   0FB59H
TSTH05          EQU   0FB5AH
TSTH05H         EQU   0FB5AH
TSTH05L         EQU   0FB5BH
TSTH06          EQU   0FB5CH
TSTH06H         EQU   0FB5CH
TSTH06L         EQU   0FB5DH
TSTH07          EQU   0FB5EH
TSTH07H         EQU   0FB5EH
TSTH07L         EQU   0FB5FH
TSTH08          EQU   0FB60H
TSTH08H         EQU   0FB60H
TSTH08L         EQU   0FB61H
TSTH09          EQU   0FB62H
TSTH09H         EQU   0FB62H
TSTH09L         EQU   0FB63H
TSTH10          EQU   0FB64H
TSTH10H         EQU   0FB64H
TSTH10L         EQU   0FB65H
TSTH11          EQU   0FB66H
TSTH11H         EQU   0FB66H
TSTH11L         EQU   0FB67H
TSTH12          EQU   0FB68H
TSTH12H         EQU   0FB68H
TSTH12L         EQU   0FB69H
TSTH13          EQU   0FB6AH
TSTH13H         EQU   0FB6AH
TSTH13L         EQU   0FB6BH
TSTH14          EQU   0FB6CH
TSTH14H         EQU   0FB6CH
TSTH14L         EQU   0FB6DH
TSTH15          EQU   0FB6EH
TSTH15H         EQU   0FB6EH
TSTH15L         EQU   0FB6FH

PWMA_ENO2       EQU   0F930H
PWMA_IOAUX2   EQU   0F931H
PWMA_CR3      EQU   0F932H
PWMA_SR3      EQU   0F933H
PWMA_CCER3      EQU   0F934H
PWMA_CCMR1X   EQU   0F938H
PWMA_CCMR2X   EQU   0F939H
PWMA_CCMR3X   EQU   0F93aH
PWMA_CCMR4X   EQU   0F93bH
PWMA_CCMR5      EQU   0F93cH
PWMA_CCMR5X   EQU   0F93dH
PWMA_CCMR6      EQU   0F93eH
PWMA_CCMR6X   EQU   0F93fH
PWMA_CCR5H      EQU   0F940H
PWMA_CCR5L      EQU   0F941H
PWMA_CCR5X      EQU   0F942H
PWMA_CCR6H      EQU   0F943H
PWMA_CCR6L      EQU   0F944H

$RESTORE


乘风飞扬 发表于 2026-1-27 10:03:07

能否简化下程序,提供完整的可以复现问题的PCA测试项目程序?
以及说明你预期想实现的功能。


否则不知你错在哪

Ayb_ice 发表于 2026-1-27 10:25:37

是否有中断在操作那个寄存器
页: [1] 2 3
查看完整版本: 手册写不清,调试搞昏头 !都是坑! STC8G单片机SFR地址的寄存器