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

📄 pwm12.h

📁 Mplab C30编译器
💻 H
📖 第 1 页 / 共 4 页
字号:
#define PWM1_DTA44               0xFFEC  /*Dead time Unit A PreScale select value */
#define PWM1_DTA45               0xFFED  /*Dead time Unit A PreScale select value */
#define PWM1_DTA46               0xFFEE  /*Dead time Unit A PreScale select value */
#define PWM1_DTA47               0xFFEF  /*Dead time Unit A PreScale select value */
#define PWM1_DTA48               0xFFF0  /*Dead time Unit A PreScale select value */
#define PWM1_DTA49               0xFFF1  /*Dead time Unit A PreScale select value */
#define PWM1_DTA50               0xFFF2  /*Dead time Unit A PreScale select value */
#define PWM1_DTA51               0xFFF3  /*Dead time Unit A PreScale select value */
#define PWM1_DTA52               0xFFF4  /*Dead time Unit A PreScale select value */
#define PWM1_DTA53               0xFFF5  /*Dead time Unit A PreScale select value */
#define PWM1_DTA54               0xFFF6  /*Dead time Unit A PreScale select value */
#define PWM1_DTA55               0xFFF7  /*Dead time Unit A PreScale select value */
#define PWM1_DTA56               0xFFF8  /*Dead time Unit A PreScale select value */
#define PWM1_DTA57               0xFFF9  /*Dead time Unit A PreScale select value */
#define PWM1_DTA58               0xFFFA  /*Dead time Unit A PreScale select value */
#define PWM1_DTA59               0xFFFB  /*Dead time Unit A PreScale select value */
#define PWM1_DTA60               0xFFFC  /*Dead time Unit A PreScale select value */
#define PWM1_DTA61               0xFFFD  /*Dead time Unit A PreScale select value */
#define PWM1_DTA62               0xFFFE  /*Dead time Unit A PreScale select value */
#define PWM1_DTA63               0xFFFF  /*Dead time Unit A PreScale select value */

#define PWM1_DTB0                0xC0FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB1                0xC1FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB2                0xC2FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB3                0xC3FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB4                0xC4FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB5                0xC5FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB6                0xC6FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB7                0xC7FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB8                0xC8FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB9                0xC9FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB10               0xCAFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB11               0xCBFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB12               0xCCFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB13               0xCDFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB14               0xCEFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB15               0xCFFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB16               0xD0FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB17               0xD1FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB18               0xD2FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB19               0xD3FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB20               0xD4FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB21               0xD5FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB22               0xD6FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB23               0xD7FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB24               0xD8FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB25               0xD9FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB26               0xDAFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB27               0xDBFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB28               0xDCFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB29               0xDDFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB30               0xDEFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB31               0xDFFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB32               0xE0FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB33               0xE1FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB34               0xE2FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB35               0xE3FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB36               0xE4FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB37               0xE5FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB38               0xE6FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB39               0xE7FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB40               0xE8FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB41               0xE9FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB42               0xEAFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB43               0xEBFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB44               0xECFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB45               0xEDFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB46               0xEEFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB47               0xEFFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB48               0xF0FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB49               0xF1FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB50               0xF2FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB51               0xF3FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB52               0xF4FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB53               0xF5FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB54               0xF6FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB55               0xF7FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB56               0xF8FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB57               0xF9FF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB58               0xFAFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB59               0xFBFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB60               0xFCFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB61               0xFDFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB62               0xFEFF  /*Dead time Unit B PreScale select value */
#define PWM1_DTB63               0xFFFF  /*Dead time Unit B PreScale select value */

/* P1DTCON2 Configuration Bit Definitions */
#define PWM1_DTS3A_UA            0x00DF  /*Dead time for channel 3 to get Active controlled by unit A*/
#define PWM1_DTS3I_UA            0x00EF  /*Dead time for channel 3 to get Inactive controlled by unit A*/                                              
#define PWM1_DTS2A_UA            0x00F7  /*Dead time for channel 2 to get Active controlled by unit A*/                                                  
#define PWM1_DTS2I_UA            0x00FB  /*Dead time for channel 2 to get Inactive controlled by unit A*/
#define PWM1_DTS1A_UA            0x00FD  /*Dead time for channel 1 to get Active controlled by unit A*/
#define PWM1_DTS1I_UA            0x00FE  /*Dead time for channel 1 to get Inactive controlled by unit A*/
#define PWM1_DTS3A_UB            0x00FF  /*Dead time for channel 3 to get Active controlled by unit B*/
#define PWM1_DTS3I_UB            0x00FF  /*Dead time for channel 3 to get Inactive controlled by unit B*/
#define PWM1_DTS2A_UB            0x00FF  /*Dead time for channel 2 to get Active controlled by unit B*/
#define PWM1_DTS2I_UB            0x00FF  /*Dead time for channel 2 to get Inactive controlled by unit B*/
#define PWM1_DTS1A_UB            0x00FF  /*Dead time for channel 1 to get Active controlled by unit B*/
#define PWM1_DTS1I_UB            0x00FF  /*Dead time for channel 1 to get Inactive controlled by unit B*/

/* P1OVDCON Configuration Bit Definitions */

#define PWM1_GEN_3H              0xFFFF  /*controlled by the PWM generator.*/
#define PWM1_GEN_2H              0xFFFF  /*controlled by the PWM generator.*/
#define PWM1_GEN_1H              0xFFFF  /*controlled by the PWM generator.*/
#define PWM1_GEN_3L              0xFFFF  /*controlled by the PWM generator.*/
#define PWM1_GEN_2L              0xFFFF  /*controlled by the PWM generator.*/
#define PWM1_GEN_1L              0xFFFF  /*controlled by the PWM generator.*/

#define PWM1_POUT_3H             0xDFFF  /*controlled by the value in the corresponding POUT bit.*/
#define PWM1_POUT_3L             0xEFFF  /*controlled by the value in the corresponding POUT bit.*/
#define PWM1_POUT_2H             0xF7FF  /*controlled by the value in the corresponding POUT bit.*/
#define PWM1_POUT_2L             0xFBFF  /*controlled by the value in the corresponding POUT bit.*/
#define PWM1_POUT_1H             0xFDFF  /*controlled by the value in the corresponding POUT bit.*/
#define PWM1_POUT_1L             0xFEFF  /*controlled by the value in the corresponding POUT bit.*/
 
#define PWM1_POUT3H_ACT          0xFFFF  /*I/O pin is driven ACTIVE when the corresponding POVDxx bit is cleared.*/
#define PWM1_POUT3H_INACT        0xFFDF  /*I/O pin is driven INACTIVE when the corresponding POVDxx bit is cleared.*/
#define PWM1_POUT3L_ACT          0xFFFF  /*I/O pin is driven ACTIVE when the corresponding POVDxx bit is cleared.*/
#define PWM1_POUT3L_INACT        0xFFEF  /*I/O pin is driven INACTIVE when the corresponding POVDxx bit is cleared.*/

#define PWM1_POUT2H_ACT          0xFFFF  /*I/O pin is driven ACTIVE when the corresponding POVDxx bit is cleared.*/
#define PWM1_POUT2H_INACT        0xFFF7  /*I/O pin is driven INACTIVE when the corresponding POVDxx bit is cleared.*/
#define PWM1_POUT2L_ACT          0xFFFF   /*I/O pin is driven ACTIVE when the corresponding POVDxx bit is cleared.*/
#define PWM1_POUT2L_INACT        0xFFFB  /*I/O pin is driven INACTIVE when corresponding POVDxx bit is cleared.*/

#define PWM1_POUT1H_ACT          0xFFFF  /*I/O pin is driven ACTIVE when the corresponding POVDxx bit is cleared.*/
#define PWM1_POUT1H_INACT        0xFFFD  /*I/O pin is driven INACTIVE when the corresponding POVDxx bit is cleared.*/
#define PWM1_POUT1L_ACT          0xFFFF   /*I/O pin is driven ACTIVE when the corresponding POVDxx bit is cleared.*/
#define PWM1_POUT1L_INACT        0xFFFE  /*I/O pin is driven INACTIVE when corresponding POVDxx bit is cleared.*/

/* Enable/Disable PWM Interrupt */

#define PWM1_INT_EN              0xFFFF  /*Enable PWM interrupt*/
#define PWM1_INT_DIS             0xFFF7  /*Disable  PWM interrupt*/

/* Enable/Disable FaultA Interrupt */
#define PWM1_FLTA_EN_INT         0xFFFF  /*Enable Fault A Interrupt */
#define PWM1_FLTA_DIS_INT        0xFF7F  /*Disable Fault A Interrupt */

/* Setting the priority of PWM interrupt */
  
#define PWM1_INT_PR0             0xFFF8  /*period interrupt priority 0*/
#define PWM1_INT_PR1             0xFFF9  /*period interrupt priority 1*/
#define PWM1_INT_PR2             0xFFFA  /*period interrupt priority 2*/
#define PWM1_INT_PR3             0xFFFB  /*period interrupt priority 3*/
#define PWM1_INT_PR4             0xFFFC  /*period interrupt priority 4*/
#define PWM1_INT_PR5             0xFFFD  /*period interrupt priority 5*/
#define PWM1_INT_PR6             0xFFFE  /*period interrupt priority 6*/
#define PWM1_INT_PR7             0xFFFF  /*period interrupt priority 7*/

/* Setting the priority of PWM FaultA interrupt */

#define PWM1_FLTA_INT_PR0        0xFF8F  /* FaultA interrupt priority 0*/
#define PWM1_FLTA_INT_PR1        0xFF9F  /* FaultA interrupt priority 1*/
#define PWM1_FLTA_INT_PR2        0xFFAF  /* FaultA interrupt priority 2*/
#define PWM1_FLTA_INT_PR3        0xFFBF  /* FaultA interrupt priority 3*/
#define PWM1_FLTA_INT_PR4        0xFFCF  /* FaultA interrupt priority 4*/
#define PWM1_FLTA_INT_PR5        0xFFDF  /* FaultA interrupt priority 5*/
#define PWM1_FLTA_INT_PR6        0xFFEF  /* FaultA interrupt priority 6*/
#define PWM1_FLTA_INT_PR7        0xFFFF  /* FaultA interrupt priority 7*/

/* P1FLTACON Register */

#define PWM1_OVA3H_ACTIVE        0xFFFF  /*The PWM output pin is driven ACTIVE on an external fault input event.*/
#define PWM1_OVA2H_ACTIVE        0xFFFF  /*The PWM output pin is driven ACTIVE on an external fault input event.*/
#define PWM1_OVA1H_ACTIVE        0xFFFF  /*The PWM output pin is driven ACTIVE on an external fault input event.*/
#define PWM1_OVA3L_ACTIVE        0xFFFF  /*The PWM output pin is driven ACTIVE on an external fault input event.*/
#define PWM1_OVA2L_ACTIVE        0xFFFF  /*The PWM output pin is driven ACTIVE on an external fault input event.*/
#define PWM1_OVA1L_ACTIVE        0xFFFF  /*The PWM output pin is driven ACTIVE on an external fault input event.*/
#define PWM1_OVA3H_INACTIVE      0xDFFF  /*The PWM output pin is driven INACTIVE on an external fault input event.*/
#define PWM1_OVA2H_INACTIVE      0xF7FF  /*The PWM output pin is driven INACTIVE on an external fault input event.*/
#define PWM1_OVA1H_INACTIVE      0xFDFF  /*The PWM output pin is driven INACTIVE on an external fault input event.*/
#define PWM1_OVA3L_INACTIVE      0xEFFF  /*The PWM output pin is driven INACTIVE on an external fault input event.*/
#define PWM1_OVA2L_INACTIVE      0xFBFF  /*The PWM output pin is driven INACTIVE on an external fault input event.*/
#define PWM1_OVA1L_INACTIVE      0xFEFF  /*The PWM output pin is driven INACTIVE on an external fault input event.*/

#define PWM1_FLTA_MODE_CYCLE     0xFFFF  /* The Fault A input pin functions in the cycle-by-cycle limit mode.*/
#define PWM1_FLTA_MODE_LATCH     0xFF7F  /* The Fault A input pin latches all control pins to the programmed states.*/
#define PWM1_FLTA3_EN            0xFFFF  /* PWM1H3/PWM1L3 pin pair is controlled by Fault Input A.*/
#define PWM1_FLTA2_EN            0xFFFF  /* PWM1H2/PWM1L2 pin pair is controlled by Fault Input A.*/
#define PWM1_FLTA1_EN            0xFFFF  /* PWM1H1/PWM1L1 pin pair is controlled by Fault Input A.*/
#define PWM1_FLTA3_DIS           0xFFFB  /* PWM1H3/PWM1L3 pin pair is not controlled by Fault Input A.*/
#define PWM1_FLTA2_DIS           0xFFFD  /* PWM1H2/PWM1L2 pin pair is not controlled by Fault Input A.*/
#define PWM1_FLTA1_DIS           0xFFFE  /* PWM1H1/PWM1L1 pin pair is not controlled by Fault Input A.*/

/* Macros to  Enable/Disable interrupts and set Interrupt priority of PWM */

#define EnableIntMCPWM1                    _PWMIE = 1
#define DisableIntMCPWM1                   _PWMIE = 0
#define SetPriorityIntMCPWM1(priority)     _PWMIP = priority

#define EnableMCPWM1IntFLTA                     _FLTAIE = 1
#define DisableMCPWM1IntFLTA                    _FLTAIE = 0
#define SetPriorityMCPWM1IntFLTA(priority)      _FLTAIP = priority

void CloseMCPWM1(void) __attribute__ ((section (".libperi")));

⌨️ 快捷键说明

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