30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Prototype: void SetDCMCPWM(<br />

unsigned int dutycyclereg,<br />

unsigned int dutycycle,<br />

char updatedisable);<br />

Arguments: dutycycleregThis is the pointer to the Duty Cycle register.<br />

dutycycle This is the value to be stored in the Duty Cycle register.<br />

updatedisable This is the value to be loaded into the ‘Update<br />

Disable’ bit of the PWMCON2 register.<br />

Return Value None<br />

Remarks: None<br />

Source File: SetDCMCPWM.c<br />

Code Example: dutycyclereg = 1;<br />

dutycycle = 0xFFF;<br />

updatedisable = 0;<br />

SetDCMCPWM(dutycyclereg, dutycycle,updatedisable);<br />

OverrideMCPWM (Continued)<br />

dsPIC<br />

®<br />

Language Tools Libraries<br />

DS51456B-page 176<br />

SetMCPWMDeadTimeAssignment<br />

2004 Microchip Technology Inc.<br />

Description: This function configures the assignment of dead time units to<br />

PWM<br />

output pairs.<br />

Include: pwm.h<br />

Prototype: void SetMCPWMDeadTimeAssignment (unsigned int<br />

config);<br />

Arguments: config This contains the parameters to be configured in the<br />

DTCON2 register as defined below:<br />

Dead Time Select bits for PWM4 signal<br />

PWM_DTS4A_UA<br />

PWM_DTS4A_UB<br />

PWM_DTS4I_UA<br />

PWM_DTS4I_UB<br />

Bit defines related to PWM4 is available only for certain<br />

devices and the suitable data sheet should be referred to.<br />

Dead Time Select bits for PWM3 signal<br />

PWM_DTS3A_UA<br />

PWM_DTS3A_UB<br />

PWM_OVA2L_ACTIVE<br />

PWM_OVA1L_ACTIVE<br />

PWM_OVA4H_INACTIVE<br />

PWM_OVA3H_INACTIVE<br />

PWM_OVA2H_INACTIVE<br />

PWM_OVA1H_INACTIVE<br />

PWM_OVA4L_INACTIVE<br />

PWM_OVA3L_INACTIVE<br />

PWM_OVA2L_INACTIVE<br />

PWM_OVA1L_INACTIVE<br />

Bit xác định liên quan đến PWM4 chỉ có sẵn cho một số<br />

thiết bị và các bảng dữ liệu phù hợp nên được chuyển đến.<br />

Lỗi Một chút chế độ<br />

PWM_FLTA_MODE_CYCLE<br />

PWM_FLTA_MODE_LATCH<br />

Một lỗi đầu vào Enable bit.<br />

PWM_FLTA4_EN<br />

PWM_FLTA4_DIS<br />

PWM_FLTA3_EN<br />

PWM_FLTA3_DIS<br />

PWM_FLTA2_EN<br />

PWM_FLTA2_DIS<br />

PWM_FLTA1_EN<br />

PWM_FLTA1_DIS<br />

Bit xác định liên quan đến PWM4 chỉ có sẵn cho một số<br />

thiết bị và các bảng dữ liệu phù hợp nên được chuyển đến.<br />

Trở lại giá trị Không<br />

Bình luận: Không có<br />

Source File: SetMCPWMFaultA.c<br />

Mã số Ví dụ: SetMCPWMFaultA (PWM_OVA3L_INACTIVE &<br />

PWM_FLTA_MODE_LATCH &<br />

PWM_FLTA1_DIS);<br />

dsPIC Thư viện ngoại vi<br />

2004 Microchip Technology Inc DS51456B trang 179<br />

SetMCPWMFaultB<br />

Mô tả: Chức năng này cấu hình bit Override lỗi B, chế độ lỗi bit và B<br />

Lỗi InputB Enable bit PWM.<br />

Bao gồm: pwm.h<br />

Prototype: void SetMCPWMFaultB (int config);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!