【文章內(nèi)容簡(jiǎn)介】
來(lái)去除噪聲 OR OR 16位保持寄存器 應(yīng)用 : ABS 剎車 . 雷達(dá)測(cè)距,發(fā)動(dòng)機(jī) 引腳 ? 共有 8個(gè)輸入捕捉通道 ? 每個(gè)通道有自己的向量表和控制寄存器 TM Freescale Semiconductor Confidential and Proprietary Information. Freescale? and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 169。 Freescale Semiconductor, Inc. 2022. Slide 14 輸入捕捉 , IC7IC0 (2 of 3) B2 B1 B0 EDGxB 輸入捕捉沿控制 (IC7–IC0) EDGxA ICx EDGE 0 1 0 1 無(wú)邊沿 – ICx 禁止 上升沿 下降沿 任何沿 4. TCTL3 C7F C6F C5F C4F C3F C2F C1F C0F C7I C6I C5I C4I C3I C2I C1I C0I 2. TFLG1 3. TMSK1 1. TC7 – TC0 EDG7B EDG7A EDG6B EDG6A EDG5B EDG5A EDG4B EDG4A 5. TCTL4 EDG3B EDG3A EDG2B EDG2A EDG1B EDG1A EDG0B EDG0A B6 B5 B4 B3 B7 B2 B1 B0 RST: 0 0 0 0 0 0 0 0 RST: 0 0 0 0 0 0 0 0 RST: 0 0 0 0 0 0 0 0 RST: 0 0 0 0 0 0 0 0 B6 B5 B4 B3 B7 B2 B1 B0 B6 B5 B4 B3 B7 B2 B1 B0 B6 B5 B4 B3 B7 B2 B1 B0 $000E $000C $000A $000B Address Offset $0010 $0011 $001E $001F 16 位捕捉 /比較寄存器 (TC7) 16 位捕捉比較寄存器 (TC0) 比較 /捕捉標(biāo)志位 寫 ‘ 1’清除中斷狀態(tài)標(biāo)志位 比較 /捕捉屏蔽位 0 = 屏蔽中斷請(qǐng)求 1 = 中斷請(qǐng)求允許 0 0 1 1 TM Freescale Semiconductor Confidential and Proprietary Information. Freescale? and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 169。 Freescale Semiconductor, Inc. 2022. Slide 15 輸入捕捉 /輸出比較選擇 IOS7 IOS6 IOS5 IOS4 IOS3 IOS2 IOS1 IOS0 TIOS – 定時(shí)器輸入捕捉 /輸出比較選擇寄存器 IOSx = 1 輸出比較功能 = 0 輸入捕捉功能 RST: 0 0 0 0 0 0 0 0 $0000 B6 B5 B4 B3 B7 B2 B1 B0 TIMER 定時(shí)器使能 1 – 計(jì)數(shù)器使能 0 – 計(jì)數(shù)器禁止 TSCR – 定時(shí)器系統(tǒng)控制寄存器 RST: 0……………………………………………………………………………0 $0006 TEN TSWAI TSFRZ TFFCA Reserved TSWAI – 在 WAIT模式時(shí),定時(shí)器停止 0 = 不停止 1 = 停止 TSBCK – 在 DEBUG模式時(shí), 定時(shí)器停止 0 = 不停止 1 = 停止 TFFCA – 定時(shí)器快速標(biāo)志位清除使能 0 = 定時(shí)器標(biāo)志位正常清零 1 = 輸入捕捉時(shí)讀取寄存器 , 輸出比較時(shí)寫寄存器,可以對(duì)相應(yīng)通道標(biāo)志位清零 TM Freescale Semiconductor Confidential and Proprietary Information. Freescale? and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 169。 Freescale Semiconductor, Inc. 2022. Slide 16 脈沖累加模式 8 – 位計(jì)數(shù)器 PA7/PAI 脈沖累加器輸入引腳 事件計(jì)數(shù)模式 引腳作為計(jì)數(shù)器時(shí)鐘 軟件選擇以什么沿來(lái)計(jì)數(shù) 計(jì)數(shù)器溢出時(shí),產(chǎn)生中斷(可選) 在 PAI引腳每個(gè)主動(dòng)電平將產(chǎn)生中斷 8 位計(jì)數(shù)器 PA7/PAI 脈沖累加器輸入引腳 時(shí)間累加模式 引腳作為計(jì)數(shù)器 軟件選擇主動(dòng)電平作為門的輸入 當(dāng)計(jì)數(shù)器溢出時(shí)產(chǎn)生中斷 在使能的引腳上后面的邊緣時(shí)產(chǎn)生中斷 自由運(yùn)行E/64時(shí)鐘 對(duì)事件計(jì)數(shù)模式, PEDGE 選擇哪個(gè) PAI的沿用來(lái)增加 PACNT寄存器 對(duì)門累加模式, PEDGE選擇哪個(gè) PAI 狀態(tài)用來(lái)禁止計(jì)數(shù) (比如 . PEDGE = 1 ? 禁止計(jì)數(shù) 當(dāng) PAI = HI). TM Freescale Semiconductor Confidential and Proprietary Information. Freescale? and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 169。 Freescale Semiconductor, Inc. 2022. Slide 17 脈沖累加結(jié)構(gòu) PIN TCx PIN Logic DIV by 64 Control Reg. + 8/16 BIT CNTR Holding Register POLARITY CONTROL PTx IRQ D A T A B U S 注 1: PTx 可以被用作脈沖累加, 輸入捕捉或輸出比較 這里 PTx = PT0 PT3 SELECTED CLOCK Delay Counter Edge Detector 0 0 0 0 0 0 DLY1 DLY0 Bit 7 6 5 4 3 2 1 0 DLYCT Delay Counter Control Register DLY[1:0] Delay Counter Values 00 = Disabled 01 = 256 M Clocks 10 = 512 M Clocks 11 = 1024 M Clocks Address Offset $0029 注 : 如果輸入信號(hào)電平和跳變之前的電平相反時(shí), 延時(shí)計(jì)數(shù)器在當(dāng)前時(shí)鐘計(jì)數(shù)時(shí)刻產(chǎn)生一個(gè)脈沖, 它用來(lái)去除噪聲 TM Freescale Semiconductor Confidential and Proprietary Information. Freescale? and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 169。 Freescale Semiconductor, Inc. 2022. Slide 18 增強(qiáng)型捕捉 ECT比標(biāo)準(zhǔn)的 TIM增強(qiáng)的特點(diǎn) ? 4個(gè)輸入捕捉通道有 16位緩沖寄存器 ? 4個(gè) 8位 / 2個(gè) 16位脈沖累加器 ? 16位帶 4位預(yù)分頻的模數(shù)向下計(jì)數(shù)器 ? 4個(gè)用戶選擇的延時(shí)計(jì)數(shù)器用來(lái)消除噪聲 ? 主定時(shí)器預(yù)分頻擴(kuò)展至 7位 ? 隊(duì)列和鎖定模式 主定時(shí)器 輸入捕捉寄存器 保持寄存器 外部事件 拷貝 拷貝拷貝 讀取數(shù)據(jù) 讀取數(shù)據(jù) TM Freescale Semiconductor Confidential and Proprietary Information. Freescale? and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 169。 Freescale Semiconductor, Inc. 2022. Slide 19 模向下計(jì)數(shù)器 ? 二進(jìn)制向下計(jì)數(shù)器 . 可以完全控制計(jì)數(shù)起始值 ? 應(yīng)用于精確事件計(jì)時(shí) 用于產(chǎn)生周期性的標(biāo)志位和中斷 ? 主定時(shí)器單獨(dú)運(yùn)行。時(shí)鐘來(lái)自總線時(shí)鐘,并經(jīng)過(guò)預(yù)分頻。 ? 可以被設(shè)置為定時(shí)中斷或產(chǎn)生標(biāo)志位?;蜓b載初始值后向下計(jì)數(shù)到 $0000。 P a r a m e t e r V a l u e U n i t sC r y s t a l F r e q u e n c y 16 M H zB u s F r e q u e n c y 8 M H zB u s T i c k T i m e 1 2 5 . 0 0 0 0 nSP e r i o d i c I n t e r r u p t T i m e 191 uSB u s T i c k s R e q u i r e d 1 5 2 8 . 0 0 T i c k sM o d u l u s C o u n t e r P r e s c a l e r 4M o d u l u s C o u n t e r S t a r t V a l u e 382裝載 向下計(jì)數(shù)至 0 執(zhí)行動(dòng)作 TM Freescale Semiconductor Confidential and Proprietary Information. Freescale? and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 169。 Freescale Semiconductor, Inc. 2022. Slide 20 ABS 應(yīng)用舉例