| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
STM8S Datasheet(PDF) 162 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
STM8S Datasheet(HTML) 162 Page - STMicroelectronics |
|
162 / 467 page ![]() 16-bit advanced control timer (TIM1) RM0016 162/467 DocID14587 Rev 14 Using one timer to enable another timer Example 1 The enable of timer B is controlled with the output compare 1 of timer A (refer to Figure 56 for connections). Timer B counts on the divided internal clock only when OC1REF of timer A is high. Both counter clock frequencies are divided by four by the prescaler compared to f MASTER (f CK_CNT = fMASTER/4). 1. Configure timer A master mode to send its output compare 1 reference (OC1REF) signal as trigger output (MMS = 100 in the TIMx_CR2 register). 2. Configure the timer A OC1REF waveform (TIMx_CCMR1 register) 3. Configure timer B to get the input trigger from timer A (see TS[2:0] bit definitions in TIMx_SMCR register). 4. Configure timer B in trigger gated mode (SMS = 101 in TIMx_SMCR register) 5. Enable timer B by writing 1 in the CEN bit (TIMx_CR1 register) 6. Start timer A by writing 1 in the CEN bit (TIMx_CR1 register) Note: The counter 2 clock is not synchronized with counter 1. This mode only affects the timer B counter enable signal. Figure 56. Gating timer B with OC1REF of timer A In Figure 56, the timer B counter and prescaler are not initialized before being started. Therefore, they start counting from their current value. It is possible to start from a given value by resetting both timers before starting timer A. In this case, any value can be written in the timer counters. The timers can easily be reset by software using the UG bit in the TIMx_EGR registers. |
|
Enlace URL |
| ¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | Enlace a la hoja de datos | Intercambio de Enlaces | Lista de Fabricantes 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 |