熟女俱乐部五十路二区av,又爽又黄禁片视频1000免费,国产卡一卡二卡三无线乱码新区,中文无码一区二区不卡αv,中文在线中文a

新聞中心

EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > TMS320F206的中斷技術(shù)及其實(shí)現(xiàn)

TMS320F206的中斷技術(shù)及其實(shí)現(xiàn)

作者: 時(shí)間:2009-01-02 來(lái)源:網(wǎng)絡(luò) 收藏

  中斷INT2/3服務(wù)程序(intp2)流程圖如圖5所示。

  中斷INT2/3服務(wù)程序(intp2)如下:

Intp2: setc intm ;進(jìn)入INT2,INT3中斷服務(wù)程序。
…… ;根據(jù)控制字判斷是進(jìn)入頻率測(cè)試子程序還是進(jìn)入相位測(cè)試子程序
bond intp23,tc
b intp 21
intp23: in 60h,0fffech ;讀控制字ICR
bit 60h,13
sst #1h,62h
bit 62h,4 ;判斷是INT2還是INT3
  
b intp31
intp22:splk #0002h,60h ;INT2服務(wù)程序
out 60h,0ffech ;開INT3中斷
splk #0c29h,63h
out 63h,0fff8h ;啟動(dòng)定時(shí)器
splk #0002h,ifr ;清INT2/INT3的標(biāo)志位
clrc intm ;開中斷
ret
intp31:setc intm ;INT3服務(wù)程序
splk #0412h,64h
out 64h,0fff8h ;停止定時(shí)器
splk #0002h,ifr ;清INT2/INT3的標(biāo)志位
clrc intm
ret
in 65h,0fffah ;讀定時(shí)器的時(shí)間
…… ;計(jì)算相位
intp21:setc intm ;判斷中斷次數(shù),第一次開
…… ;定時(shí)器,第二次關(guān)定時(shí)器
bchd stoptimerl,ntc
out 63h,0fff8h ;啟動(dòng)定時(shí)器
splk #0002h,ifr ;清除INT2/3標(biāo)志
clrc intm ;開中斷
ret
stoptimer1:splk #0412h,64h
out 64h,0fff8h ;關(guān)定時(shí)器
…… ;計(jì)算頻率
b $ ;等待

  定時(shí)器中斷服務(wù)程序(timer)流程圖如圖6所示。TMS320F206的中斷技術(shù)及其實(shí)現(xiàn)

timer: lacl 73h ;定時(shí)器中斷服務(wù)程序
…… ;據(jù)控制字判斷是進(jìn)入頻率測(cè)試子程序還是進(jìn)入相位測(cè)試子程序。
cmpr 0
bcnd timer2,tc
b timer1
timer1:lacl 69h ;頻率定時(shí)器服務(wù)子程序
add #1h
sacl 69h
splk #4h,ifr ;清除定時(shí)器標(biāo)志
clrc intm
ret
timer2:lacl 69h ;相位定時(shí)器服務(wù)子程序
add #1h
sacl 69h
splk #4h,ifr ;清定時(shí)器的標(biāo)志位
clrc intm


上一頁(yè) 1 2 3 4 下一頁(yè)

關(guān)鍵詞: DSP公司 dsp開發(fā)板 dsp教程 工業(yè)控制 網(wǎng)絡(luò)通信 多媒體處理 數(shù)字信號(hào)處理 DSP

評(píng)論


相關(guān)推薦

技術(shù)專區(qū)

關(guān)閉