| Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
RM0312 Datasheet(PDF) 141 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
RM0312 Datasheet(HTML) 141 Page - STMicroelectronics |
|
141 / 275 page ![]() DocID022352 Rev 3 141/275 RM0312 16-bit general purpose timer (TIM2/TIM3) 170 Encoder interface mode acts simply as an external clock with direction selection. This means that the counter just counts continuously between 0 and the auto-reload value in the TIMx_ARR register (0 to ARR or ARR down to 0 depending on the direction). So you must configure TIMx_ARR before starting. In the same way, the capture, compare, prescaler, trigger output features continue to work as normal. Encoder mode and External clock mode 2 are not compatible and must not be selected together. In this mode, the counter is modified automatically following the speed and the direction of the incremental encoder and its content, therefore, always represents the encoder’s position. The count direction correspond to the rotation direction of the connected sensor. The table summarizes the possible combinations, assuming TI1 and TI2 don’t switch at the same time. An external incremental encoder can be connected directly to the MCU without external interface logic. However, comparators will normally be used to convert the encoder’s differential outputs to digital signals. This greatly increases noise immunity. The third encoder output which indicate the mechanical zero position, may be connected to an external interrupt input and trigger a counter reset. The Figure 62 gives an example of counter operation, showing count signal generation and direction control. It also shows how input jitter is compensated where both edges are selected. This might occur if the sensor is positioned near to one of the switching points. For this example we assume that the configuration is the following: • CC1S = 0b01 (TIMx_CCMR1 register, IC1 mapped on TI1). • CC2S = 0b01 (TIMx_CCMR2 register, IC2 mapped on TI2). • CC1P = 0 (TIMx_CCER1 register, IC1 non-inverted, IC1=TI1). • CC2P = 0 (TIMx_CCER2 register, IC2 non-inverted, IC2=TI2). • SMS = 0b011 (TIMx_SMCR register, both inputs are active on both rising and falling edges). • CEN = 1 (TIMx_CR1 register, Counter is enabled). Table 34. Counting direction versus encoder signals Active edge Level on opposite signal (TI1FP1 for TI2, TI2FP2 for TI1) TI1FP1 signal TI2FP2 signal Rising Falling Rising Falling Counting on TI1 only High Down Up No count No count Low Up Down No count No count Counting on TI2 only High No count No count Up Down Low No count No count Down Up Counting on TI1 and TI2 High DownUp UpDown Low Up Down Down Up |
|
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 |