| Electronic Components Datasheet Search |
|
SH79F166AP/044PR Datasheet(PDF) 50 Page - SINOWEALTH Electronic Ltd |
|
|
|||||||||||||||||||||||||||||
SH79F166AP/044PR Datasheet(HTML) 50 Page - SINOWEALTH Electronic Ltd |
|
50 / 113 page ![]() SH79F166A 50 7.8.5 Timer5 Timer5 is a 16-bit auto-reload timer. It is accessed as two cascaded data registers: TH5 and TL5. It is controlled by the T5CON register. The interrupt can be enabled by setting ET5 bit in IEN0 register (Refer to interrupt Section for details). When writing to TH5 and TL5, they are used as timer load register. When reading from TH5 and TL5, they are used as timer counter register. Setting the TR5 bit enables Timer5 to count up. The timer will overflow from 0xFFFF to 0x0000 and set the TF5 bit. This overflow also causes the 16-bit value written in timer load register to be reloaded into the timer counter register. Writing to TH4 also can cause the 16-bit value written in timer load register to be reloaded into the timer counter register. Read or write operation to TH5 and TL5 should follow these steps: Write operation:Low nibble first,High nibble to update the counter. Read operation:High nibble first,Low nibble followed. Timer5 Modes Timer5 has one operating modes: 16-bit auto-reload counter/timer. Mode0: 16 bit Auto-Reload Counter/Timer Timer5 operates as 16-bit counter/timer in Mode 0. The TH5 register holds the high eight bits of the 16-bit counter/timer, TL5 holds the low eight bits. As the 16-bit timer register increments and overflows from 0xFFFF to 0x0000, the timer overflow flag TF5 (T5CON.7) is set and the 16-bit value in timer load register are reloaded into timer counter register, and an interrupt will occur if Timer 5 interrupts is enabled. The T4CLKS bit (T4CON.0) selects the counter/timer's clock source. Setting the TR5 bit (T5CON.1) enables the timer. Setting TR5 does not force the timer to reset. The timer load register should be loaded with the desired initial value before the timer is enabled. TF5 The Block Diagram of Mode 0 of Timer 5 TL5 TH5 Increment Mode 0:Switch Off 1:Switch On 16 bit Counter Interrupt Request Overflow Flag TR5 System Clock Prescaler 1,8,64,256 T5PS[1:0] |
|
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 |