AN1905 ST Microelectronics, Inc., AN1905 Datasheet - Page 30
![no-image](/images/no-image-200.jpg)
AN1905
Manufacturer Part Number
AN1905
Description
St7mc Three-phase BLDC Motor Control Software Library
Manufacturer
ST Microelectronics, Inc.
Datasheet
1.AN1905.pdf
(77 pages)
- Current page: 30 of 77
- Download datasheet (2Mb)
ST7MC THREE-PHASE BLDC MOTOR CONTROL SOFTWARE LIBRARY
Set_Duty
Synopsis
Description
Input
Caution
See also
Code example
30/77
#include "mtc.h"
void Set_Duty(u16 duty)
This function is used to refresh the MCPUH/L register contents
(MCPVH/L in current mode).
The ‘duty’ is a u16 variable, and has to be set according to the PWM fre-
quency (MCPOH/L registers) for both voltage or current mode.
Duty = desired duty (0 to 100%) x MCPOH/L (voltage mode’)
Duty = desired current limitation (Amp) x MCPOH/L / 9.7(current mode)
In voltage mode, the ‘duty’ variable is directly linked to the PWM duty
cycle while in current mode, the ‘duty’ variable sets the voltage refer-
ence (MCPVH/L, actually the current limitation) at the input of the MTC
cell comparator (MCCREF pin, via a RC filter on the board).
ST7MC Datasheet: MTC chapter.
Voltage mode:
20 Khz PWM frequency (ratio between 12-bit PWM clock and PWM fre-
quency, MCPOHL = 16 MHz/20kHz = 800), desired duty = 40%:
duty = 40 x MCPOHL/100 = 320
-> Update_Duty(320);
Current mode:
*Fixed 10 Khz PWM frequency (MCPOHL = 1600), desired current lim-
itation = 4 Amp:
duty = 4 x MCPOHL/9.7 = 4 x 1600/9.7 =
-> Update_Duty(660);
* hardware dependant. For other PWM frequencies, please check the
RC filter value at the input of the MTC comparator cell (MCCREF pin).
The desired duty cycle is set using this formula:
Related parts for AN1905
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![AN177](/images/no-image3.png)
Part Number:
Description:
An Overview og the Phase Locked Loop
Manufacturer:
Philips
Datasheet:
![AN1268](/images/manufacturer_photos/0/6/637/stmicroelectronics_tmb.jpg)
Part Number:
Description:
AN OVERVIEW OF THE LPC FLASH INTERFACE
Manufacturer:
STMicroelectronics
![AN1315](/images/no-image3.png)
Part Number:
Description:
An Evaluation System Interfacing the MPX2000 Series Pressure Sensors to a Microprocessor
Manufacturer:
Motorola / Freescale Semiconductor
![AN1998](/images/no-image3.png)
Part Number:
Description:
An FM-IF system for DECT and other high speed GFSK applications
Manufacturer:
Philips Semiconductors / NXP Semiconductors
![AN2124](/images/no-image3.png)
Part Number:
Description:
An 8 x 8 Discrete Cosine Transform on the StarCore SC140/SC1400 Cores
Manufacturer:
Freescale Semiconductor / Motorola
![AN2428](/images/no-image3.png)
Part Number:
Description:
An Overview of the HCS12 ATD Module
Manufacturer:
Freescale Semiconductor / Motorola
![AN2708](/images/no-image3.png)
Part Number:
Description:
An Introduction to the External Bus Interface on the HCS12X
Manufacturer:
Freescale Semiconductor / Motorola
![AN2783](/images/no-image3.png)
Part Number:
Description:
An RF Data Link Using Tango3 and Romeo2 RF Modules
Manufacturer:
Freescale Semiconductor / Motorola
![STP22NE10L](/images/no-image3.png)
Part Number:
Description:
N-channel 55V - 0.07 Ohm - 22A StripFET Power MOSFET
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![STP32N06L](/images/no-image3.png)
Part Number:
Description:
Old PRODUCT: Not Suitable For Design-in
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![2N4014](/images/no-image3.png)
Part Number:
Description:
High-voltage, High Current Switch
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![L6000](/images/no-image3.png)
Part Number:
Description:
Single Chip Read & Write Channel
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![BTA10-400GP](/images/no-image3.png)
Part Number:
Description:
10A Triacs
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![BTA20-600BW](/images/no-image3.png)
Part Number:
Description:
20A Triacs
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
![BTA41-700B](/images/no-image3.png)
Part Number:
Description:
-
Manufacturer:
ST Microelectronics, Inc.
Datasheet: