| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
SH89F52P/044PR bảng dữ liệu(PDF) 44 Page - SINOWEALTH Electronic Ltd |
|
|
|||||||||||||||||||||||||||||
SH89F52P/044PR bảng dữ liệu(HTML) 44 Page - SINOWEALTH Electronic Ltd |
|
44 / 105 page ![]() SH88F516(SH88F54/SH89F52) 44 8.8.3 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) The operating modes of Timer2 is similar with Timer0/1. C/T2 ——— selects system clock (Timer) or external pin T2 (Counter) as the timer clock input. Setting TR2 allows Timer 2/Counter 2 Data Register to increment by the selected input. Timer2 Modes Timer 2 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. 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 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 EXEN2 bit in T2CON. If EXEN2 = 0, Timer 2 is a 16-bit timer or counter which will set TF2 on overflow to generate an interrupt if ET2 is enabled. If EXEN2 = 1, Timer 2 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 |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |