PWM on UP xtreme

stevenjameson
New Member Posts: 9 ✭
Hi
Setting the PWM Value without using windows.devices.pwm
Upbridge and eapi.dll have this function
EApiPwmSetValue(pin, PWMBaseint, PWMFraction, PWMDuty)
All I need to speed everything up in terms on development is the equation for converting a frequency into the PWMBaseint and PWMFraction
Can you help?
Thanks
Steven
Answers
-
@stevenjameson
UP Xtreme PWM frequency is 128 ~ 16000 , PWM formula as following
PWMBaseint = Frequency * 256 / 32000
PWMFraction =((Frequency % 125)/125) * 16384
PWMDuty is 0~255 levelsNotice: not any frequency in the range is supported.
Categories
- 292 All Categories
- 104 Announcements & News
- 48 Product News - New Product/Product Change Notice/ End-of-life
- 181 Welcome Developers!
- 49 Unboxing & Project Sharing
- 20 Tech Updates
- 412 UP Products
- UP 4000
- 12 UP Xtreme i11
- 21 UP Squared 6000
- 40 UP Squared Pro
- 132 UP Xtreme
- 797 UP Squared
- 1.4K UP Board
- 86 UP Core Plus
- 217 UP Core
- 3 UP Xtreme Lite
- 41 UP AI Edge
- 213 Starter Kits & Peripheral