<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 嵌入式系統 > 設計應用 > DEI1016功能和原理簡(jiǎn)介及其與單片機的接口設計

DEI1016功能和原理簡(jiǎn)介及其與單片機的接口設計

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

本文引用地址:http://dyxdggzs.com/article/171365.htm

mov a,#d2h ;取字2的高8位

movx @dptr,a ;把字2的高8位鎖入U3

clr p3.4 ;打開(kāi)U3、U4的輸出

nop

clr p1.4 ;字2數據裝入DEI1016

nop

setb p3.4

setb p1.4

用U1接收數據,應將DR1、DR2及TXR經(jīng)與門(mén)U13接至U1的INT0,在INT0口產(chǎn)生中斷后,U1便執行讀操作,并通過(guò)RD和Y5控制U14、U15以讀入DR1、DR2及TXR的狀態(tài)。U2接收到數據或發(fā)送數據完畢后,即向U1的INT0口申請中斷,并在中斷程序中判斷DR1、DR2及TXR的狀態(tài)。TXR為低表明發(fā)送完畢,而DR1或DR2為低則表明已收到數據。此時(shí)可置P1.2(SEL)為低電平,同時(shí)也置P1.0(接DEI1016的OE1)或P1.1 ?接DEI1016的OE2?為低電平,以使字1的數據出現在數據總線(xiàn)上,而使P1.0、P1.1經(jīng)U11異或后輸出以使U5、U6的G端為高電平,從而把數據鎖入U5、U6。由于RD分別與Y7、Y6相或后的輸出是與U5、U6的OE門(mén)相連接的,因此,U1 執行讀操作時(shí),應先后打開(kāi)U5、U6的OE門(mén)來(lái)把數據讀入。其接收程序如下:(以接收器1為例)。 DEI1016的兩路接收可能產(chǎn)生同時(shí)接收的現象。即在上述兩路共用一個(gè)中斷源時(shí),如果某一路申請中斷已進(jìn)入接收程序,那么另一路同時(shí)接收的數據就可能被屏蔽。解決方法是:進(jìn)入中斷程序后,在接收數據過(guò)程中再查詢(xún)另一路DR的狀態(tài)。當然,如果每路單獨使用一個(gè)中斷源,效果將會(huì )更好。

clr p1.2 ;置DEI1016的SEL=0,讀字1

clr p1.0 ;置DEI1016的/OE1=0

setb p1.1 ;置DEI1016的/OE2=1

nop

mov dptr,#e000h

movx a,@dptr ;把字1的低8位讀入

mov 10h,a

mov dptr,#c000h

movx a,@dptr ;把字1的高8位讀入

mov 11h,a

setb p1.2 ;置DEI1016的SEL=1,讀字2

nop

mov dptr,#e000h

movx a,@dptr ;把字2的低8位讀入

mov 12h,a

mov dptr,#c000h

movx a,@dptr ;把字2的高8位讀入

mov 13h,a

setb p1.0 ;置DEI1016的/OE1=1

setb p1.1 ;置DEI1016的/OE2=1

setb p1.2 ;置DEI1016的SEL=1

4 結束語(yǔ)

實(shí)際上,上述AT89C52與DEI1016的電路經(jīng)改進(jìn)也可以應用到其它16位數據總線(xiàn)的電路中,而如果用ISP器件替代鎖存器門(mén)電路,還可大大減小電路板的面積。


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

評論


相關(guān)推薦

技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>