EasyManuals Logo

STMicroelectronics STM8 User Manual

STMicroelectronics STM8
126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #85 background imageLoading...
Page #85 background image
To change PWM duty, we need to call the following function:
TIM2_SetCompareX(pwm_duty); // where X represents channel ID (1, 2 or 3)
Note that in STM8 micros, there is a trade-off between duty cycle and PWM frequency. If the PWM
resolution, i.e. duty cycle is big then PWM frequency is small and vice-versa. This is true for all timers.
Demo
Video link: https://www.youtube.com/watch?v=BPS5unUHDz4

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the STMicroelectronics STM8 and is the answer not in the manual?

STMicroelectronics STM8 Specifications

General IconGeneral
BrandSTMicroelectronics
ModelSTM8
CategoryMicrocontrollers
LanguageEnglish

Related product manuals