| Electronic Components Datasheet Search |
|
HT48F06E Datasheet(PDF) 27 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT48F06E Datasheet(HTML) 27 Page - Holtek Semiconductor Inc |
|
27 / 69 page ![]() HT48F06E/HT48F10E/HT48F30E Rev. 1.00 27 September 10, 2007 Timer Register - TMR The timer register is a special function register located in the Special Purpose RAM Data Memory and is the place where the actual timer value is stored. This register is known as TMR. The value in the timer register increases by one each time an internal clock pulse is received or an external transition occurs on the external timer pin. The timer will count from the initial value loaded by the preload register to the full count of FFH at which point the timer overflows and an internal interrupt signal is generated. The timer value will then be reset with the ini- tial preload register value and continue counting. To achieve a maximum full range count of FFH the preload register must first be cleared to all zeros. It should be noted that after power-on, the preload register will be in an unknown condition. Note that if the Timer/Event Counter is switched off and data is written to its preload register, this data will be immediately writ- ten into the actual timer register. However, if the Timer/Event Counter is enabled and counting, any new data written into the preload data register during this pe- riod will remain in the preload register and will only be written into the timer register the next time an overflow occurs. Timer Control Register - TMRC The flexible features of the Holtek microcontroller Timer/Event Counters enable them to operate in three different modes, the options of which are determined by the contents of their control register, which has the name TMRC. It is the Timer Control Register together with its corresponding timer register that control the full operation of the Timer/Event Counter. Before the Timer/Event Counter can be used, it is essential that the Timer Control Register is fully programmed with the right data to ensure its correct operation, a process that is normally carried out during program initialisation. To choose which of the three modes the Timer/Event Counter is to operate in, either in the timer mode, the event counting mode or the pulse width measurement mode, bits 7 and 6 of the Timer Control Register, which are known as the bit pair TM1/TM0, must be set to the required logic levels. The Timer/Event Counter on/off bit, which is bit 4 of the Timer Control Register and known as TON, provides the basic on/off control of the Timer/Event Counter. Setting the bit high allows the Timer/Event Counter to run, clearing the bit stops it run- ning. Bits 0~2 of the Timer Control Register determine the division ratio of the input clock prescaler. The prescaler bit settings have no effect if an external clock source is used. If the Timer/Event Counter is in the event count or pulse width measurement mode, the ac- tive transition edge level type is selected by the logic level of bit 3 of the Timer Control Register which is known as TE. N o t i m p l e m e n t e d , r e a d a s " 0 " b 7 E v e n t C o u n t e r A c t i v e E d g e S e l e c t 1 : c o u n t o n f a l l i n g e d g e 0 : c o u n t o n r i s i n g e d g e T E T O N T M 0 T M 1 T i m e r P r e s c a l e r R a t e S e l e c t P S C 2 0 0 0 0 1 1 1 1 b 0 P S C 2 P S C 1 P S C 0 P S C 1 0 0 1 1 0 0 1 1 P S C 0 0 1 0 1 0 1 0 1 T i m e r R a t e 1 : 2 1 : 4 1 : 8 1 : 1 6 1 : 3 2 1 : 6 4 1 : 1 2 8 1 : 2 5 6 T i m e r / E v e n t C o u n t e r C o u n t i n g E n a b l e 1 : e n a b l e 0 : d i s a b l e O p e r a t i n g M o d e S e l e c t T M 1 0 0 1 1 T M 0 0 1 0 1 n o m o d e a v a i l a b l e e v e n t c o u n t e r m o d e t i m e r m o d e 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 P u l s e W i d t h M e a s u r e m e n t A c t i v e E d g e S e l e c t 1 : s t a r t c o u n t i n g o n r i s i n g e d g e , s t o p o n f a l l i n g e d g e 0 : s t a r t c o u n t i n g o n f a l l i n g e d g e , s t o p o n r i s i n g e d g e T M R C R e g i s t e r Timer/Event Counter Control 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 |