| Electronic Components Datasheet Search |
|
HTG2190 Datasheet(PDF) 23 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HTG2190 Datasheet(HTML) 23 Page - Holtek Semiconductor Inc |
|
23 / 50 page ![]() HTG2190 Rev. 1.20 23 July 5, 2002 rectly. It must read the TMR0H first to ensure that the low byte contents of Timer/Event Counter 0 are latched into the buffer. There are three registers related to the Timer/Event Counter 1; TMR1H (0FH), TMR1L (10H), TMR1C (11H). The Timer/Event Counter 1 operates in the same manner as Timer/Event Counter 0. The TMR0C is the Timer/Event Counter 0 control regis- ter, which defines the Timer/Event Counter 0 options. The Timer/Event Counter 1 has the same options as the Timer/Event Counter 0 and is defined by TMR1C. The timer/event counter control registers define the op- erating mode, counting enable or disable and active edge. The TM0, TM1 bits define the operating mode. The event count mode is used to count external events, which implies that the clock source comes from an ex- ternal (TMR0/TMR1) pin. The timer mode functions as a normal timer with the clock source coming from the in- struction clock. The pulse width measurement mode can be used to count the high or low level duration of an external signal (TMR0/TMR1). The counting method is based on the instruction clock. In the event count or timer mode, once the timer/event counter starts counting, it will count from the current contents in the timer/event counter to FFFFH. Once overflow occurs, the counter is reloaded from the timer/event counter preload register and generates a corresponding interrupt request flag (T0F/T1F; bit 5/6 of INTC) at the same time. To enable the counting operation, the Timer ON bit (TON; bit 4 of TMR0C/TMR1C) should be set to 1. In the pulse width measurement mode, TON will be cleared automatically after the measurement cycle is complete. But in the other two modes TON can only be reset by in- struction. The overflow of the timer/event counter is one of the wake-up sources. No matter what the operation mode is, writinga0to ET0I/ET1I can disable the corre- sponding interrupt service. In the case of a timer/event counter OFF condition, writ- ing data to the timer/event counter preload register will also reload that data to the timer/event counter. But if the timer/event counter is turned on, data written to the timer/event counter will only be kept in the timer/event counter preload register. The timer/event counter will continue to operate until an overflow oc- curs. When the timer/event counter (reading TMR0H/ TMR1H) is read, the clock will be blocked to avoid er- rors. As this may result in a counting error, this must be taken into consideration by the programmer. Low voltage detect function (LVD) The HTG2190 provides low voltage detect to monitor the supply voltage of devices. The user can use the x ¢talc.4 to enable/disable (1/0) the LVD function and read the LVD detect status (0/1) from x ¢talc.4 otherwise, the LVD function is disabled. If the x ¢talc.4 is ²1², means low battery otherwise if still work (VD=(V22+150mV) ± 100mV, VD means voltage detect value). R to F function The HTG2190 provides an ²RtoF² (Resistor to Fre- quency) function for temperature measurement and so on. The application circuit is shown below. R1 is a fixed resistor about 10k W for reference, while R2 is a thermistor whose resistance is variable according to the temperature. C is a capacitance about 2200pF for charge and discharge purposes. It should be noted that, if the R to F function is selected, the pull-high resistors of TMR1. The TMR1 pull-high resistor can be disabled by software instruction. The related frequency of R1 is measured by setting PB3 to be an output pin and PB2 to be an input pin. Then set the PB3 to be a source current to charge the capacitance C. If the charged voltage ar- H T G 2 1 9 0 P B 2 P B 3 T M R 1 R 1 R 2 C R to F application circuit M a x T o T i m e r 1 S 1 1 0 R T M R 1 ( X ' T A L C . 3 ) T M R 1 R - . ( X ' T A L C . 1 ) V D D R to F structure |
|
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 |