| 전자부품 데이터시트 검색엔진 |
|
STM8S 데이터시트(PDF) 174 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
STM8S 데이터시트(HTML) 174 Page - STMicroelectronics |
|
174 / 467 page ![]() 16-bit advanced control timer (TIM1) RM0016 174/467 DocID14587 Rev 14 17.5.7 PWM mode Pulse width modulation mode allows you to generate a signal with a frequency determined by the value of the TIM1_ARR register and a duty cycle determined by the value of the TIM1_CCRi registers. The PWM mode can be selected independently on each channel (one PWM per OCi output) by writing 110 (PWM mode 1) or 111 (PWM mode 2) in the OCiM bits in the TIM1_CCMRi registers. The corresponding preload register must be enabled by setting the OCiPE bits in the TIM1_CCMRi registers. The auto-reload preload register (in up-counting or center- aligned modes) may be optionally enabled by setting the ARPE bit in the TIM1_CR1 register. As the preload registers are transferred to the shadow registers only when an UEV occurs, all registers have to be initialized by setting the UG bit in the TIM1_EGR register before starting the counter. OCi polarity is software programmable using the CCiP bits in the TIM1_CCERi registers. It can be programmed as active high or active low. The OCi output is enabled by a combination of CCiE, MOE, OISi, OSSR and OSSI bits (TIM1_CCERi and TIM1_BKR registers). Refer to the TIM1_CCERi register descriptions for more details. In PWM mode (1 or 2), TIM1_CNT and TIM1_CCRi are always compared to determine whether TIM1_CCRi ≤ TIM1_CNT or TIM1_CNT≤ TIM1_CCRi (depending on the direction of the counter). The timer is able to generate PWM in edge-aligned mode or center-aligned mode depending on the CMS bits in the TIM1_CR1 register. PWM edge-aligned mode Up-counting configuration Up-counting is active when the DIR bit in the TIM1_CR1 register is low. Example This example uses PWM mode 1. The reference PWM signal, OCiREF, is high as long as TIM1_CNT < TIM1_CCRi. Otherwise, it becomes low. If the compare value in TIM1_CCRi is greater than the auto-reload value (in TIM1_ARR) then OCiREF is held at 1. If the compare value is 0, OCiREF is held at 0. Figure 70 shows some edge-aligned PWM waveforms in an example where TIM1_ARR = 8. |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |