![Sino Wealth SH61F83 Скачать руководство пользователя страница 35](http://html1.mh-extra.com/html/sino-wealth/sh61f83/sh61f83_manual_1283060035.webp)
SH61F83
35
9. Time Capture 0
The SH61F83 provide one set of Time Capture I/O pins, TC0, the Time Capture input provides both rising and falling edge 8
bits time register. A PreScaler allows TCAP0 to select 8 types of time capture tick size (From 2us to 16us).
PreScaler
Free-Run_Counter0
500KHz Clock Source
TCAP 0
Rising-edge Buffer
TCAP 0
Falling-edge Buffer
Rising-
edge
detector
Falling-
edge
detector
TC0 input pin
ETC0
TCAP0 Interrupt Request
Edge Requset
TC_CLREN
TC0TS[2:0]
TC0F_INT/TC0R_INT
TC0F_FULL/TC0R_FULL
TC0_OVL
TC_OVLEN
Figure 9-1. Function Block Diagram of Time Capture Function TCAP0
00CBH
TCAP0R Initial Value
Time Capture 0 Rising-edge Register
Bit[7:0] TCAP0R[7:0]
00h
R
Time Capture 0 Rising-edge data register.
Reset Source: Hardware reset or USB reset
00CCH
TCAP0F
Initial Value
Time Capture 0 Falling-edge Register
Bit[7:0] TCAP0F[7:0]
00h
R
Time Capture 0 Falling-edge data register.
Reset Source: Hardware reset or USB reset
00C8H
TCSTU
Initial Value
Time Capture Status register
Bit[7:5]
-
000b
-
Reserved
Bit4
TC0_OVL
0b
R/W
Time Capture 0 (TCAP0) Over Flow flag.
TC0_OVL event will active If TC_CLREN = 1 & TC_OVLEN = 1 and the data
width on TC0 pad is longer then TCAP0 free-run counter.
TCAP0 free-run counter will count continuously. Write ‘0’ to clear TC0_OVL
flag, write ‘1’ no effect.
Reset Source: Hardware reset or USB reset
Bit[3:2]
-
00b
-
Reserved
Bit1
TC0F_FULL
0b
R
Time Capture 0 Falling Edge Register (TCAP0F) Full flag.
When TC0 pin get a falling-edge, TCAP0 free-run counter value will be load
into TCAP0F and TC0F_FULL bit will be set to “1” also.
This bit will be clear by hardware when firmware read a byte from TCAP0F.
Reset Source: Hardware reset or USB reset
Bit0
TC0R_FULL
0b
R
Time Capture 0 Rising Edge Register (TCAP0R) Full flag.
When TC0 pin get a rising-edge, TCAP0 free-run counter value will be load
into TCAP0R and TC0R_FULL bit will be set to “1” also.
This bit will be clear by hardware when firmware read a byte from TCAP0R.
Reset Source: Hardware reset or USB reset