| 数据搜索系统,热门电子元器件搜索 |
|
STM8S 数据表(PDF) 173 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
STM8S 数据表(HTML) 173 Page - STMicroelectronics |
|
173 / 467 page ![]() DocID14587 Rev 14 173/467 RM0016 16-bit advanced control timer (TIM1) 261 The output compare mode is defined by the OCiM bits in the TIM1_CCMRi registers. The active or inactive level polarity is defined by the CCiP bits in the TIM1_CCERi registers. The TIM1_CCRi registers can be programmed with or without preload registers using the OCiPE bits in the TIM1_CCMRi registers. In output compare mode, the UEV has no effect on the OCiREF and OCi output. The timing resolution is one count of the counter. Output compare mode can also be used to output a single pulse. Procedure 1. Select the counter clock (internal, external, or prescaler). 2. Write the desired data in the TIM1_ARR and TIM1_CCRi registers. 3. Set the CCiIE bits if an interrupt request is to be generated. 4. Select the output mode as follows: – Write OCiM = 011 to toggle the OCi output pin when CNT matches CCRi – Write OCiPE = 0 to disable the preload register – Write CCiP = 0 to select active high polarity – Write CCiE = 1 to enable the output 5. Enable the counter by setting the CEN bit in the TIMx_CR1 register The TIM1_CCRi registers can be updated at any time by software to control the output waveform, provided that the preload registers are not enabled (OCiPE = 0). Otherwise, the TIMx_CCRi shadow registers are updated only at the next UEV (see example in Figure 69. Figure 69. Output compare mode, toggle on OC1 |
|
链接网址 |
| 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 |