| Electronic Components Datasheet Search |
|
SH79F166AP/044PR Datasheet(PDF) 39 Page - SINOWEALTH Electronic Ltd |
|
|
|||||||||||||||||||||||||||||
SH79F166AP/044PR Datasheet(HTML) 39 Page - SINOWEALTH Electronic Ltd |
|
39 / 113 page ![]() SH79F166A 39 7.8 Timer 7.8.1 Features The SH79F166A has four timers (Timer2, 3, 4, 5) Timer2 is compatible with the standard 8052 and has up or down counting and programmable clock output function Timer3 is a 16-bit auto-reload timer and can operate even in Power-Down mode Timer4 is a 16-bit auto-reload timer and can be selected as a baud-rate generator Timer5 is a 16-bit auto-reload timer 7.8.2 Timer2 The Timer 2 is implemented as a 16-bit register accessed as two cascaded data registers: TH2 and TL2. It is controlled by the register T2CON and T2MOD. The Timer2 interrupt can be enabled by setting the ET2 bit in the IEN0 register. (Refer to Interrupt Section for details) C/T2 ——— selects system clock (timer operation) or external pin T2 (counter operation) as the timer clock input. Setting TR2 allows Timer 2/Counter 2 Data Register to increment by the selected input. Timer2 Modes Timer2 has 4 operating modes: Capture/Reload, Auto-reload mode with up or down counter, Baud Rate Generator and Programmable clock-output. These modes are selected by the combination of RCLK, TCLK and CP/RL2. Table 7.25 Timer2 Mode select C/T2 ——— T2OE DCEN TR2 CP/RL2 RCLK TCLK Mode X 0 X 1 1 0 0 0 16 bit capture X 0 0 1 0 0 0 1 16 bit auto-reload timer X 0 1 1 0 0 0 X 0 X 1 X 1 X 2 Baud-Rate generator X 1 0 1 X 1 X 0 0 3 Programmable clock-output only 1 X 3 Programmable clock-output, with Baud-rate generator X 1 1 1 X 1 X X X Not recommending X X X 0 X X X X Timer2 stop, the T2EX path still enable Mode0: 16 bit Capture In the capture mode, two options are selected by bit EXEN2 in T2CON. If EXEN2 = 0, Timer2 is a 16-bit timer or counter which will set TF2 on overflow to generate an interrupt if ET2 is enabled. If EXEN2 = 1, Timer2 performs the same operation, but a 1-to-0 transition at external input T2EX also causes the current value in TH2 and TL2 to be captured into RCAP2H and RCAP2L respectively, In addition, a 1-to-0 transition at T2EX causes bit EXF2 in T2CON to be set. The EXF2 bit, like TF2, can also generate an interrupt if ET2 is enabled. 0:Switch Off 1:Switch On Block Diagram of 16 bit Capcture mode (Mode 0) of Timer2 Overflow flag RCAP2H RCAP2L TL2 TH2 TF2 EXF2 + & 0:Switch Off 1:Switch On External falling edge flag Increment Mode C/T2 =0 =1 Interrupt Request System Clock TR2 EXEN2 CP / RL2 T2EX T2 |
|
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 |