| 数据搜索系统,热门电子元器件搜索 |
|
EM6812F2TP24B 数据表(PDF) 57 Page - EM Microelectronic - MARIN SA |
|
|
|||||||||||||||||||||||||||||
EM6812F2TP24B 数据表(HTML) 57 Page - EM Microelectronic - MARIN SA |
|
57 / 81 page ![]() R EM6812 Copyright © 2005, EM Microelectronic-Marin SA 57 www.emmicroelectronic.com 13.2.4 Stopping the timer The timer stops always at the next clock following a valid stop condition. These are: • Reaching hex 00 in Zero-Stop mode. • In software start control if SWStart is cleared. • In external start control, on input state if the selected input value becomes 0. • In external start control, on input pulse, the timer stops at the 2 nd pulse. Refer also to previous timing diagrams and hints for restart. 13.2.5 Clock selection There are 8 different clock sources for each timer. Some of them come from external sources. The others are from the prescaler1 or prescaler2. The selection is done with ClkXSel[2:0] in RegTimXCfg. Table 49. Input clock selection Timer1 Timer2 Timer3 Timer4 ClkXSel[2:0] value Selection with Clk1Sel[2:0] Selection with Clk2Sel[2:0] Selection with Clk3Sel[2:0] Selection with Clk4Sel[2:0] 000 PA0 PA1 PA2 PA3 001 PA4 PA5 PA6 PA7 010 Pr2CkSource Pr2CkSource Pr2CkSource Pr2ClkSource 011 Pr2Ck[8] Pr1CkSource Pr2Ck[8] Pr1ClkSource 100 Pr2Ck[6] Pr1Ck[14] Pr2Ck[4] Pr1Ck[13] 101 Pr1CkSource Pr1Ck[12] Pr1CkSource Pr1Ck[11] 110 Pr1Ck[13] Pr1Ck[10] Pr1Ck[13] Pr1Ck[9] 111 Pr1Ck[11] Pr1Ck[8] Pr1Ck[9] Pr1Ck[7] Clock selection should only be changed while the timer is stopped to avoid timer clock glitches, which may influence the actual counter value. 13.2.6 PWM and Frequency generation With the pulse width modulation function, is possible to generate signals of a defined frequency and duty cycle. These signals can be output on the port B as frequencies or PWM. The function of the PWM is based on the comparison of the actual timer value and a compare value. PWM = ‘0’ when the timer starts counting until it reaches the comparison value, then PWM=’1’ until the end of the loop when the timer reaches the value 0. See figure below for more details. The PWM function is enabled with bit EnPWMX in RegTimXCfg. This bit enables the comparator and also routes the PWM signal to the port B. Compare match interrupt can be generated in PWM mode. The bit TimEqX allows to select between timer compare match IRQ or timer zero detect IRQ (default value). Also refer to chapter 13.2.8 Interrupts. Figure 34. PWM or Frequency generation in Auto-Reload mode. ClkIn SwStartX TimXLoad TimXComp XX XX 07 03 PWMX TimXStatus XX 07 06 05 04 03 02 01 00 07 X 06 05 04 03 02 01 |
|
链接网址 |
| 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 |