Motor de Búsqueda de Datasheet de Componentes Electrónicos |
|
HT37B90 Datasheet(PDF) 27 Page - Holtek Semiconductor Inc |
|
HT37B90 Datasheet(HTML) 27 Page - Holtek Semiconductor Inc |
27 / 80 page HT37B90/HT37B70/HT37B50/HT37B30 Rev.1.00 27 June22,2017 ConfiguringthePulseWidthMeasurementMode In this mode, the width of external pulses applied to the pin-shared external pin PA6/TMR0 or PA7/TMR1 can be measured. In the Pulse Width Measurement Mode, the timer clock source is supplied by the internal clock. For the timer to operate in this mode, bits TM0 and TM1 must both be set high. If the TE bit is low, once a high to low transition has been received on the PA6/TMR0 or PA7/TMR1 pin, the timer will start counting until the PA6/TMR0 or PA7/TMR1 pin returns to its original high level. At this point the TON bit will be automatically reset to zero and the timer will stop counting. If the TE bit is high, the timer will begin counting once a low to high transition has been received on the PA6/TMR0 or PA7/TMR1 pin and stop counting when the PA6/TMR0 or PA7/TMR1 pin returns to its original low level. As be- fore, the TON bit will be automatically reset to zero and the timer will stop counting. It is important to note that in the Pulse Width Measurement Mode, the TON bit is au- tomatically reset to zero when the external control signal on the external timer pin returns to its original level, whereas in the other two modes the TON bit can only be reset to zero under program control. The residual value in the timer, which can now be read by the program, therefore represents the length of the pulse received on pin PA6/TMR0 or PA7/TMR1. As the TON bit has now been reset any further transitions on the PA6/TMR0 or PA7/TMR1 pin will be ignored. Not until the TON bit is again set high by the program can the timer begin fur- ther pulse width measurements. In this way single shot pulse measurements can be easily made. It should be noted that in this mode the counter is controlled by logi- cal transitions on the PA6/TMR0 or PA7/TMR1 pin and notbythelogiclevel. Prescaler Bits PSC0~PSC2 of the TMRC1~ TMRC2 registers can be used to define the pre-scaling stages of the internal clocksourcesoftheTimer/EventCounter. Note: Because the two timers are used by MIDI the ex- ternaltimerpinfunctionsaredisabled. I/OInterfacing The Timer/Event Counter, when configured to run in the event counter or pulse width measurement mode, re- quire the use of the external PA6/TMR0 or PA7/TMR1 pin for correct operation. As this pin is a shared pin it must be configured correctly to ensure it is setup for use as a Timer/Event Counter input and not as a normal I/O pin. This is implemented by ensuring that the mode se- lect bits in the Timer/Event Counter control register, se- l e c t e i t h e r t h e e v e n t c o u n t e r o r p u l s e w i d t h measurement mode. Additionally the PA share pin op- tion must be selected to ensure that the pin is setup as anTMR0andTMR1input. ProgrammingConsiderations When configured to run in the timer mode, the internal system clock fOSC/8 is used as the timer clock source and is therefore synchronized with the overall operation of the microcontroller. In this mode when the appropriate timer register is full, the microcontroller will generate an internal interrupt signal directing the program flow to the respective internal interrupt vector. For the pulse width measurement mode, the internal system clock is also used as the timer clock source but the timer will only run when the correct logic condition appears on the external timer input pin. As this is an external event and not syn- c h r o n i z e d w i t h t h e i n t e r n a l t i m e r c l o c k , t h e microcontroller will only see this external event when the next timer clock pulse arrives. As a result, there may be + 1 + 2 + 3 + 4 T i m e r E x t e r n a l T i m e r P i n I n p u t T O N ( w i t h T E = 0 ) P r e s c a l e r O u t p u t I n c r e m e n t T i m e r C o u n t e r P r e s c a l e r O u t p u t i s s a m p l e d a t e v e r y f a l l i n g e d g e o f f O S C / 8 o r R C 1 2 K . PulseWidthMeasureModeTimingDiagram T i m e r + 2 E x t e r n a l T i m e r P i n I n p u t T 0 E o r T 1 E = 1 I n c r e m e n t T i m e r C o u n t e r T i m e r + 3 T i m e r + 1 EventCounterModeTimingDiagram |
Número de pieza similar - HT37B90 |
|
|
Enlace URL |
Política de Privacidad |
ALLDATASHEET.ES |
¿ALLDATASHEET es útil para Ud.? [ DONATE ] |
Todo acerca de Alldatasheet | Publicidad | Contáctenos | Política de Privacidad | 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 |