| Electronic Components Datasheet Search |
|
HT56RB688 Datasheet(PDF) 52 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT56RB688 Datasheet(HTML) 52 Page - Holtek Semiconductor Inc |
|
52 / 164 page ![]() Timer Control Registers - TMR0C, TMR1C, TMR2C, TMR3C 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 respective control register. It is the Timer Control Register together with its corresponding timer registers that control the full operation of the Timer/Event Counters. Before the timers can be used, it is essential that the appropriate 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 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 corresponding Timer Control Register, which are known as the bit pair TnM1/TnM0, must be set to the required logic levels. The timer-on bit, which is bit 4 of the Timer Control Register and known as TnON, depending upon which timer is used, provides the basic on/off control of the respective timer. Setting the bit high allows the counter to run, clearing the bit stops the counter. For timers that have prescalers, 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 is in the event count or pulse width measurement mode, the active transition edge level type is selected by the logic level of bit 3 of the Timer Control Register which is known as TnE. An additional TnS bit in the 16-bit Timer/Event Counter control register is used to determine the clock source for the Timer/Event Counter. Timer/Event Counter Control Register - TMRnC (n=0, 2, 3) Bit 76543210 Name TnM1 TnM0 ¾ TnON TnE TnPSC2 TnPSC1 TnPSC0 R/W R/W R/W ¾ R/W R/W R/W R/W R/W POR 0 0 ¾ 01000 Bit 7~6 TnM1~TnM0: Timer/Event Counter Operating mode selection bit 00: no mode available 01: Event Counter mode 10: Timer mode 11: Pulse width measurement mode Bit 5 Unimplemented, read as ²0² Bit 4 TnON: Timer/Event Counter counting enable control 0: disable 1: enable Bit 3 TnE: Timer/Event Counter active edge selection bits For Event counter mode: 0: count on rising edge 1: count on falling edge For Pulse width measurement mode: 0: start counting on falling edge 1: start counting on rising edge Bit 2~0 TnPSC2~TnPSC0: Timer/Event Counter prescaler rate selection bits 000: 1/1 001: 1/2 010: 1/4 011: 1/8 100: 1/16 101: 1/32 110: 1/64 111: 1/128 Rev. 1.00 52 December 2, 2011 HT56RB688 TinyPowerTM A/D type Smart Card OTP MCU with LCD, DAC, ISO 7816 and USB Interfaces |
|
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 |