数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

ST9 数据表(PDF) 85 Page - STMicroelectronics

部件名 ST9
功能描述  USER GUIDE
PDF  146 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

ST9 数据表(HTML) 85 Page - STMicroelectronics

Back Button ST9 Datasheet HTML 81Page - STMicroelectronics ST9 Datasheet HTML 82Page - STMicroelectronics ST9 Datasheet HTML 83Page - STMicroelectronics ST9 Datasheet HTML 84Page - STMicroelectronics ST9 Datasheet HTML 85Page - STMicroelectronics ST9 Datasheet HTML 86Page - STMicroelectronics ST9 Datasheet HTML 87Page - STMicroelectronics ST9 Datasheet HTML 88Page - STMicroelectronics ST9 Datasheet HTML 89Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 85 / 146 page
background image
85/146
ST9 USER GUIDE
as the Load register. The solution is to initialise the MFT with REG0R in capture mode by set-
ting the RM0 bit of the TCR register to ensure Free-Running Mode. When we need to load a
value in the counter, we temporarily clear the RM0 bit. Then we set REG0R to the value that
must be written in the counter. The CP0 bit in the FLAGR register is pulsed high to write the
contents of REG0R into the counter. Then we set bit RM0 again.
4.4.3.2 Initialisation
The code for initializing the MFT is given below.
Note:
The ICR register sets the input to Autodiscrimination mode. In this mode, the lower four bits are
irrelevant.
void ConfigTimer1 ( void )
{
SelectPage (T1D_PG) ;
T_REG0R = 0 ;/* This register is used to preload the counter */
T_REG1R = 0 ;/* This register is used to read the counter */
/* T_CMP0R and T_CMP1R are not used */
T_TCR = Tm_cen ;/* enable counter */
/* The counter will not start until the Global Counter Enable is set in
register CICR */
T_TMR = Tm_rm0 ;/* capture using REG0R and monitor using REG1R */
/* This mode is not desired, but is implies free-running, which we need
*/
T_ICR = Tm_ab_aa ;/* inputs used in autodiscriminating mode */
/* For so, the port 3 must be set to input on pins P3.4 and P3.6 */
T_PRSR = 0 ;/* prescaler rate = 1 */
T_OACR = 0 ;/* output A not used */
T_OBCR = 0 ;/* output B not used */
T_FLAGR = 0 ;/* not used */
T_IDMR = 0 ;/* not used */
}
4.4.3.3 Reading
To read the value of the counter, you need to capture it in one of the registers, since the
counter itself does not have an address and cannot be read directly. There are two ways of
reading the counter:
Set one of the registers REG0R or REG1R to Capture mode. A pulse on bit CP0 or CP1, re-
spectively, transfers the contents of the counter to the corresponding register.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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