⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p30f6010.h

📁 dsPIC数字信号控制器对于交流感应电机矢量控制的应用笔记的源代码及详细说明资料(中文)
💻 H
📖 第 1 页 / 共 5 页
字号:
        unsigned INDOUT :1;
        unsigned QECK   :3;
        unsigned QEOUT  :1;
        unsigned        :8;
} DFLTCONBITS;
extern volatile DFLTCONBITS DFLTCONbits __attribute__((__near__));

/* POSCNT: Position Counter Register */
extern volatile unsigned int POSCNT __attribute__((__near__));

/* MAXCNT: Maximum Count Register */
extern volatile unsigned int MAXCNT __attribute__((__near__));


/* ---------------------------------- */
/* Input Capture register definitions */
/* ---------------------------------- */

/* Generic structure of entire SFR area for each Input Capture module */
typedef struct tagIC {
        unsigned int icxbuf;
        unsigned int icxcon;
} IC, *PIC;

/* SFR blocks for each Input Capture module */
extern volatile IC IC1 __attribute__((__near__));
extern volatile IC IC2 __attribute__((__near__));
extern volatile IC IC3 __attribute__((__near__));
extern volatile IC IC4 __attribute__((__near__));
extern volatile IC IC5 __attribute__((__near__));
extern volatile IC IC6 __attribute__((__near__));
extern volatile IC IC7 __attribute__((__near__));
extern volatile IC IC8 __attribute__((__near__));

/* Generic structure for Input Capture Control Registers */
typedef struct tagICxCONBITS {
        unsigned ICM    :3;
        unsigned ICBNE  :1;
        unsigned ICOV   :1;
        unsigned ICI    :2;
        unsigned ICTMR  :1;
        unsigned        :5;
        unsigned ICSIDL :1;
        unsigned        :2;
} ICxCONBITS;

/* IC1BUF: Input Capture 1 Buffer */
extern volatile unsigned int IC1BUF __attribute__((__near__));

/* IC1CON: Input Capture 1 Control Register */
extern volatile unsigned int IC1CON __attribute__((__near__));
extern volatile ICxCONBITS IC1CONbits __attribute__((__near__));

/* IC2BUF: Input Capture 2 Buffer */
extern volatile unsigned int IC2BUF __attribute__((__near__));

/* IC2CON: Input Capture 2 Control Register */
extern volatile unsigned int IC2CON __attribute__((__near__));
extern volatile ICxCONBITS IC2CONbits __attribute__((__near__));

/* IC3BUF: Input Capture 3 Buffer */
extern volatile unsigned int IC3BUF __attribute__((__near__));

/* IC3CON: Input Capture 3 Control Register */
extern volatile unsigned int IC3CON __attribute__((__near__));
extern volatile ICxCONBITS IC3CONbits __attribute__((__near__));

/* IC4BUF: Input Capture 4 Buffer */
extern volatile unsigned int IC4BUF __attribute__((__near__));

/* IC4CON: Input Capture 4 Control Register */
extern volatile unsigned int IC4CON __attribute__((__near__));
extern volatile ICxCONBITS IC4CONbits __attribute__((__near__));

/* IC5BUF: Input Capture 5 Buffer */
extern volatile unsigned int IC5BUF __attribute__((__near__));

/* IC5CON: Input Capture 5 Control Register */
extern volatile unsigned int IC5CON __attribute__((__near__));
extern volatile ICxCONBITS IC5CONbits __attribute__((__near__));

/* IC6BUF: Input Capture 6 Buffer */
extern volatile unsigned int IC6BUF __attribute__((__near__));

/* IC6CON: Input Capture 6 Control Register */
extern volatile unsigned int IC6CON __attribute__((__near__));
extern volatile ICxCONBITS IC6CONbits __attribute__((__near__));

/* IC7BUF: Input Capture 7 Buffer */
extern volatile unsigned int IC7BUF __attribute__((__near__));

/* IC7CON: Input Capture 7 Control Register */
extern volatile unsigned int IC7CON __attribute__((__near__));
extern volatile ICxCONBITS IC7CONbits __attribute__((__near__));

/* IC8BUF: Input Capture 8 Buffer */
extern volatile unsigned int IC8BUF __attribute__((__near__));

/* IC8CON: Input Capture 8 Control Register */
extern volatile unsigned int IC8CON __attribute__((__near__));
extern volatile ICxCONBITS IC8CONbits __attribute__((__near__));


/* --------------------------------------- */
/* Output Compare/PWM register definitions */
/* --------------------------------------- */

/* Generic structure of entire SFR area for each Output Compare module */
typedef struct tagOC {
        unsigned int ocxrs;
        unsigned int ocxr;
        unsigned int ocxcon;
} OC, *POC;

/* SFR blocks for each Output Compare module */
extern volatile OC OC1 __attribute__((__near__));
extern volatile OC OC2 __attribute__((__near__));
extern volatile OC OC3 __attribute__((__near__));
extern volatile OC OC4 __attribute__((__near__));
extern volatile OC OC5 __attribute__((__near__));
extern volatile OC OC6 __attribute__((__near__));
extern volatile OC OC7 __attribute__((__near__));
extern volatile OC OC8 __attribute__((__near__));

/* Generic structure for Output Compare Control Registers */
typedef struct tagOCxCONBITS {
        unsigned OCM    :3;
        unsigned OCTSEL :1;
        unsigned OCFLT  :1;
        unsigned        :8;
        unsigned OCSIDL :1;
        unsigned        :2;
} OCxCONBITS;

/* OC1RS: Output Compare 1 Secondary Register */
extern volatile unsigned int OC1RS __attribute__((__near__));

/* OC1R: Output Compare 1 Main Register */
extern volatile unsigned int OC1R __attribute__((__near__));

/* OC1CON: Output Compare 1 Control Register */
extern volatile unsigned int OC1CON __attribute__((__near__));
extern volatile OCxCONBITS OC1CONbits __attribute__((__near__));

/* OC2RS: Output Compare 2 Secondary Register */
extern volatile unsigned int OC2RS __attribute__((__near__));

/* OC2R: Output Compare 2 Main Register */
extern volatile unsigned int OC2R __attribute__((__near__));

/* OC2CON: Output Compare 2 Control Register */
extern volatile unsigned int OC2CON __attribute__((__near__));
extern volatile OCxCONBITS OC2CONbits __attribute__((__near__));

/* OC3RS: Output Compare 3 Secondary Register */
extern volatile unsigned int OC3RS __attribute__((__near__));

/* OC3R: Output Compare 3 Main Register */
extern volatile unsigned int OC3R __attribute__((__near__));

/* OC3CON: Output Compare 3 Control Register */
extern volatile unsigned int OC3CON __attribute__((__near__));
extern volatile OCxCONBITS OC3CONbits __attribute__((__near__));

/* OC4RS: Output Compare 4 Secondary Register */
extern volatile unsigned int OC4RS __attribute__((__near__));

/* OC4R: Output Compare 4 Main Register */
extern volatile unsigned int OC4R __attribute__((__near__));

/* OC4CON: Output Compare 4 Control Register */
extern volatile unsigned int OC4CON __attribute__((__near__));
extern volatile OCxCONBITS OC4CONbits __attribute__((__near__));

/* OC5RS: Output Compare 5 Secondary Register */
extern volatile unsigned int OC5RS __attribute__((__near__));

/* OC5R: Output Compare 5 Main Register */
extern volatile unsigned int OC5R __attribute__((__near__));

/* OC5CON: Output Compare 5 Control Register */
extern volatile unsigned int OC5CON __attribute__((__near__));
extern volatile OCxCONBITS OC5CONbits __attribute__((__near__));

/* OC6RS: Output Compare 6 Secondary Register */
extern volatile unsigned int OC6RS __attribute__((__near__));

/* OC6R: Output Compare 6 Main Register */
extern volatile unsigned int OC6R __attribute__((__near__));

/* OC6CON: Output Compare 6 Control Register */
extern volatile unsigned int OC6CON __attribute__((__near__));
extern volatile OCxCONBITS OC6CONbits __attribute__((__near__));

/* OC7RS: Output Compare 7 Secondary Register */
extern volatile unsigned int OC7RS __attribute__((__near__));

/* OC7R: Output Compare 7 Main Register */
extern volatile unsigned int OC7R __attribute__((__near__));

/* OC7CON: Output Compare 7 Control Register */
extern volatile unsigned int OC7CON __attribute__((__near__));
extern volatile OCxCONBITS OC7CONbits __attribute__((__near__));

/* OC8RS: Output Compare 8 Secondary Register */
extern volatile unsigned int OC8RS __attribute__((__near__));

/* OC8R: Output Compare 8 Main Register */
extern volatile unsigned int OC8R __attribute__((__near__));

/* OC8CON: Output Compare 8 Control Register */
extern volatile unsigned int OC8CON __attribute__((__near__));
extern volatile OCxCONBITS OC8CONbits __attribute__((__near__));


/* -------------------------------------- */
/* Motor Control PWM register definitions */
/* -------------------------------------- */

/* PTCON: PWM Timerbase Control Register */
extern volatile unsigned int PTCON __attribute__((__near__));
typedef struct tagPTCONBITS {
        unsigned PTMOD  :2;
        unsigned PTCKPS :2;
        unsigned PTOPS  :4;
        unsigned        :5;
        unsigned PTSIDL :1;
        unsigned        :1;
        unsigned PTEN   :1;
} PTCONBITS;
extern volatile PTCONBITS PTCONbits __attribute__((__near__));

/* PTMR: PWM Timebase Count Register */
extern volatile unsigned int PTMR __attribute__((__near__));
typedef struct tagPTMRBITS {
        unsigned PTMR   :15;
        unsigned PTDIR  :1;
} PTMRBITS;
extern volatile PTMRBITS PTMRbits __attribute__((__near__));

/* PTPER: PWM Timebase Period Register */
extern volatile unsigned int PTPER __attribute__((__near__));
typedef struct tagPTPERBITS {
        unsigned PTPER  :15;
        unsigned        :1;
} PTPERBITS;
extern volatile PTPERBITS PTPERbits __attribute__((__near__));

/* SEVTCMP: Special Event Compare Count Register */
extern volatile unsigned int SEVTCMP __attribute__((__near__));
typedef struct tagSEVTCMPBITS {
        unsigned SEVTCMP:15;
        unsigned SEVTDIR:1;
} SEVTCMPBITS;
extern volatile SEVTCMPBITS SEVTCMPbits __attribute__((__near__));

/* PWMCON1: PWM Control Register 1 */
extern volatile unsigned int PWMCON1 __attribute__((__near__));
typedef struct tagPWMCON1BITS {
        unsigned PEN1L  :1;
        unsigned PEN2L  :1;
        unsigned PEN3L  :1;
        unsigned PEN4L  :1;
        unsigned PEN1H  :1;
        unsigned PEN2H  :1;
        unsigned PEN3H  :1;
        unsigned PEN4H  :1;
        unsigned PMOD1  :1;
        unsigned PMOD2  :1;
        unsigned PMOD3  :1;
        unsigned PMOD4  :1;
        unsigned        :4;
} PWMCON1BITS;
extern volatile PWMCON1BITS PWMCON1bits __attribute__((__near__));

/* PWMCON2: PWM Control Register 2 */
extern volatile unsigned int PWMCON2 __attribute__((__near__));
typedef struct tagPWMCON2BITS {
        unsigned UDIS   :1;
        unsigned OSYNC  :1;
        unsigned        :6;
        unsigned SEVOPS :4;
        unsigned        :4;
} PWMCON2BITS;
extern volatile PWMCON2BITS PWMCON2bits __attribute__((__near__));

/* DTCON1: PWM Dead Time Control Register 1 */
extern volatile unsigned int DTCON1 __attribute__((__near__));
typedef struct tagDTCON1BITS {
        unsigned DTA    :6;
        unsigned DTAPS  :2;
        unsigned DTB    :6;
        unsigned DTBPS  :2;
} DTCON1BITS;
extern volatile DTCON1BITS DTCON1bits __attribute__((__near__));

/* DTCON2: PWM Dead Time Control Register 2 */
extern volatile unsigned int DTCON2 __attribute__((__near__));
typedef struct tagDTCON2BITS {
        unsigned DTS1I  :1;
        unsigned DTS1A  :1;
        unsigned DTS2I  :1;
        unsigned DTS2A  :1;
        unsigned DTS3I  :1;
        unsigned DTS3A  :1;
        unsigned DTS4I  :1;
        unsigned DTS4A  :1;
        unsigned        :8;
} DTCON2BITS;
extern volatile DTCON2BITS DTCON2bits __attribute__((__near__));

/* FLTACON: PWM Fault Input A Control Register */ 
extern volatile unsigned int FLTACON __attribute__((__near__));
typedef struct tagFLTACONBITS {
        unsigned FAEN1  :1;
        unsigned FAEN2  :1;
        unsigned FAEN3  :1;
        unsigned FAEN4  :1;
        unsigned        :3;
        unsigned FLTAM  :1;
        unsigned FAOV1L :1;
        unsigned FAOV1H :1;
        unsigned FAOV2L :1;
        unsigned FAOV2H :1;
        unsigned FAOV3L :1;
        unsigned FAOV3H :1;
        unsigned FAOV4L :1;
        unsigned FAOV4H :1;
} FLTACONBITS;
extern volatile FLTACONBITS FLTACONbits __attribute__((__near__));

/* FLTBCON: PWM Fault Input B Control Register */ 
extern volatile unsigned int FLTBCON __attribute__((__near__));
typedef struct tagFLTBCONBITS {
        unsigned FBEN1  :1;
        unsigned FBEN2  :1;
        unsigned FBEN3  :1;
        unsigned FBEN4  :1;
        unsigned        :3;
        unsigned FLTBM  :1;
        unsigned FBOV1L :1;
        unsigned FBOV1H :1;
        unsigned FBOV2L :1;
        unsigned FBOV2H :1;
        unsigned FBOV3L :1;
        unsigned FBOV3H :1;
        unsigned FBOV4L :1;
        unsigned FBOV4H :1;
} FLTBCONBITS;
extern volatile FLTBCONBITS FLTBCONbits __attribute__((__near__));

/* OVDCON: PWM Override Control Register */
extern volatile unsigned int OVDCON __attribute__((__near__));
typedef struct tagOVDCONBITS {
        unsigned POUT1L :1;
        unsigned POUT1H :1;
        unsigned POUT2L :1;
        unsigned POUT2H :1;
        unsigned POUT3L :1;
        unsigned POUT3H :1;
        unsigned POUT4L :1;
        unsigned POUT4H :1;
        unsigned POVD1L :1;
        unsigned POVD1H :1;
        unsigned POVD2L :1;
        unsigned POVD2H :1;
        unsigned POVD3L :1;
        unsigned POVD3H :1;
        unsigned POVD4L :1;
        unsigned POVD4H :1;
} OVDCONBITS;
extern volatile OVDCONBITS OVDCONbits __attribute__((__near__));

/* PDC1: PWM Duty Cycle Register 1 */
extern volatile unsigned int PDC1 __attribute__((__near__));

/* PDC2: PWM Duty Cycle Register 2 */
extern volatile unsigned int PDC2 __attribute__((__near__));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -