| Electronic Components Datasheet Search |
|
HTG2190 Datasheet(PDF) 22 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HTG2190 Datasheet(HTML) 22 Page - Holtek Semiconductor Inc |
|
22 / 50 page ![]() HTG2190 Rev. 1.20 22 July 5, 2002 Timer/Event Counter 0/1 Two timer/event counters are implemented in the HTG2190. The Timer/Event Counter 0 and 1 contain 16-bit programmable count-up counters whose clock may come from an external source or the system clock divided by 4. It should be noted that, if the Timer/Event Counter 0 is selected, the TMR0 pin should be enabled by mask option. The pull-high resistor can be disabled or enabled by software instruction. Using the internal instruction clock, there is only one ref- erence time-base. The external clock input allows the user to count external events, measure time intervals or pulse width, or to generate an accurate time base. There are three registers related to Timer/Event Coun- ter 0; TMR0H (0CH), TMR0L (0DH), TMR0C (0EH). Writing to TMR0L only writes the data into a low byte buffer. Writing to TMR0H will write the data and the con- tents of the low byte buffer into the Timer/Event Counter 0 preload register (16-bit) simultaneously. The Timer/Event Counter 0 preload register is changed only by a write to TMR0H operation. Writing to TMR0L will keep the Timer/Event Counter 0 preload register un- changed. Reading TMR0H will also latch the TMR0L into the low byte buffer to avoid false timing problems. Reading the TMR0L only returns the value from the low byte buffer which may be a previously loaded value. In other words, the low byte of Timer/Event Counter 0 cannot be read di- S y s t e m C l o c k / 4 T M 1 T M 0 T M R 0 T M R 1 T E T M 1 T M 0 T O N P u l s e W i d t h M e a s u r e m e n t M o d e C o n t r o l T i m e r / E v e n t C o u n t e r 0 / 1 P r e l o a d R e g i s t e r T i m e r / E v e n t C o u n t e r 0 / 1 L o w B y t e B u f f e r D a t a B u s R e l o a d O v e r f l o w t o I n t e r r u p t Timer/Event Counter 0/1 Label Bits Function ¾ 0~2 Unused bit, read as ²0² TE 3 Defines the TMR0/TMR1 active edge of timer/event counter (0=active on low to high; 1=active on high to low) TON 4 Enable/disable timer counting (0=disabled; 1=enabled) ¾ 5 Unused bit, read as ²0² TM1, TM0 7, 6 Define the operating mode (TM1, TM0) 01=Event count mode (external clock) 10=Timer mode (internal clock) 11=Unused 00=Unused TMR0C/TMR1C register Label Bits Function FAST 0 0=speed-up 32K x'tal (default) 1=Non-speed-up 32K x'tal RTF 1 Select the R-to-F function 0=disable R-to-F (default), 1=enable R-to-F RTMR0 2 Select the TMR0 pull-high resistor (1=with pull-high; 0=without pull-high) RTMR1 3 Select the TMR1 pull-high resistor (1=with pull-high; 0=without pull-high) VDET 4 Supply voltage detection circuit (1=enable VDET, 0=disable VDET) ¾ 5~7 Unused bit, read as ²0² X'TALC register |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |