本發(fa)明涉及通信設備技術領域,特別(bie)是涉及一種(zhong)iic總線(xian)解鎖方法及基(ji)于iic總線(xian)的通信系統(tong)。
背景技術:
iic總(zong)線(xian)主要用于短距離(li)、多設(she)(she)備(bei)的(de)數(shu)據(ju)交換系(xi)統(tong)中。由于其(qi)僅需兩根(gen)信號(hao)線(xian)(數(shu)據(ju)線(xian)sda,時鐘(zhong)線(xian)scl)即可(ke)完成雙工(gong)(gong)同步數(shu)據(ju)傳輸,因(yin)而能(neng)方便的(de)實現多機系(xi)統(tong)和外圍擴展(zhan)系(xi)統(tong),并(bing)且其(qi)通信時采用硬件(jian)設(she)(she)置總(zong)線(xian)設(she)(she)備(bei)地址(zhi)的(de)方式(shi),避免了(le)選線(xian)尋址(zhi)的(de)弊(bi)端,提高了(le)硬件(jian)系(xi)統(tong)的(de)工(gong)(gong)作可(ke)靠(kao)性(xing)。但(dan)是iic總(zong)線(xian)的(de)抗干擾能(neng)力較差,例如(ru),如(ru)果總(zong)線(xian)上存在干擾信號(hao)或信號(hao)線(xian)(數(shu)據(ju)線(xian)sda,時鐘(zhong)線(xian)scl)的(de)電(dian)平被某(mou)些特(te)定的(de)因(yin)素(su)拉低,則(ze)總(zong)線(xian)上的(de)主機設(she)(she)備(bei)將無法正(zheng)常進(jin)行下一輪的(de)數(shu)據(ju)傳送,即此時主機設(she)(she)備(bei)檢測(ce)到iic總(zong)線(xian)被鎖(suo)死。
當發(fa)生iic總(zong)(zong)線(xian)被鎖(suo)死時(shi),一般采用(yong)(yong)如下(xia)解決方式:(1)主機(ji)設(she)備發(fa)出脈沖信號進行(xing)iic總(zong)(zong)線(xian)的(de)(de)軟件(jian)復位;(2)采用(yong)(yong)帶有iic總(zong)(zong)線(xian)鎖(suo)定保護的(de)(de)iic器(qi)件(jian);(3)采用(yong)(yong)內部集(ji)成有iic總(zong)(zong)線(xian)控制功能的(de)(de)處理器(qi)。但在某些情況下(xia),上(shang)述三(san)種(zhong)方式并不(bu)完全(quan)可(ke)靠。
技術實現要素:
鑒于上述針對iic總(zong)線(xian)鎖死時的(de)解(jie)(jie)決方式可(ke)靠性差的(de)問題,本(ben)發明的(de)目(mu)的(de)在于提供一種iic總(zong)線(xian)解(jie)(jie)鎖方法及基于iic總(zong)線(xian)的(de)通(tong)信系(xi)統,能(neng)夠及時地(di)解(jie)(jie)決iic總(zong)線(xian)鎖死的(de)故障,保證通(tong)信系(xi)統的(de)通(tong)訊(xun)可(ke)靠性。
為實現上(shang)述目的,本發明(ming)采用如(ru)下技術(shu)方(fang)案(an):
一種iic總(zong)線的解鎖方法,所述(shu)方法包括(kuo)如下步驟:
從(cong)主機總線監測(ce)接口獲取iic總線上的電(dian)平;
判斷所述iic總線上的電平是否為(wei)低電平;
判斷軟件(jian)復位是否能夠解鎖;
當判定所(suo)述(shu)(shu)iic總線(xian)上的(de)電(dian)平為低(di)電(dian)平且所(suo)述(shu)(shu)軟件復位無法解鎖時,則主機(ji)控制(zhi)接口(kou)輸(shu)出第一控制(zhi)信號,控制(zhi)連接在所(suo)述(shu)(shu)iic總線(xian)上的(de)從機(ji)設備(bei)斷電(dian);
當所(suo)述從機(ji)設備斷電第(di)一預設時間后,通過所(suo)述主機(ji)控(kong)制接口輸出(chu)第(di)二控(kong)制信號,控(kong)制所(suo)述從機(ji)設備上(shang)電,所(suo)述iic總線解鎖(suo)并(bing)恢復(fu)通信。
在其(qi)中(zhong)一個(ge)實施例(li)中(zhong),判斷(duan)所述iic總線上的電平是(shi)否為低(di)電平的步驟(zou)具體(ti)包括(kuo):
當判(pan)(pan)定所述(shu)iic總(zong)(zong)線(xian)的(de)(de)電(dian)(dian)平(ping)為低電(dian)(dian)平(ping)后,延時第二預(yu)設時間,返回繼續(xu)判(pan)(pan)斷所述(shu)iic總(zong)(zong)線(xian)上(shang)的(de)(de)電(dian)(dian)平(ping)是(shi)否為低電(dian)(dian)平(ping),當所述(shu)iic總(zong)(zong)線(xian)的(de)(de)電(dian)(dian)平(ping)始終為低電(dian)(dian)平(ping)時,則判(pan)(pan)定所述(shu)iic總(zong)(zong)線(xian)上(shang)的(de)(de)電(dian)(dian)平(ping)為低電(dian)(dian)平(ping)。
在(zai)一個實施例(li)中,每當判定所述iic總線上的電平為低電平時,檢測次(ci)(ci)數累加一次(ci)(ci),獲得檢測總次(ci)(ci)數;
判斷所述檢測總次數是否(fou)大于或(huo)等于第一預設閾值;
當所(suo)述檢(jian)測總(zong)次數大于(yu)或等于(yu)第一預設(she)閾值且每次所(suo)述iic總(zong)線上(shang)的(de)電平均為(wei)低(di)電平時,則判定所(suo)述iic總(zong)線上(shang)的(de)電平為(wei)低(di)電平。
在其中一個實施例中,判斷軟件復位是否能夠(gou)解鎖的步驟包括:
每當判定所述iic總線上的電(dian)平為低電(dian)平時,檢(jian)測次數累(lei)加一(yi)次,獲得檢(jian)測總次數;
判斷所述檢測總次數是否大于(yu)(yu)或等(deng)于(yu)(yu)第二預設閾值(zhi);
當所述檢測總(zong)次(ci)數大于(yu)或(huo)等于(yu)第二預設閾值時(shi),則(ze)判定軟件復位無法解鎖。
在其中(zhong)一個實施例中(zhong),所述(shu)(shu)iic總線(xian)包(bao)括(kuo)(kuo)數據(ju)總線(xian)和時鐘(zhong)總線(xian),判斷所述(shu)(shu)iic總線(xian)上(shang)的電(dian)平是否為低電(dian)平的步驟具體包(bao)括(kuo)(kuo):
判斷所述數據總(zong)線上的電平(ping)是否為(wei)低電平(ping);
判斷所述時鐘總(zong)線上(shang)的電平(ping)是否(fou)為低電平(ping);
當所(suo)述(shu)數據總(zong)線(xian)(xian)上(shang)的(de)電(dian)(dian)平(ping)為(wei)(wei)低電(dian)(dian)平(ping)和/或所(suo)述(shu)時(shi)(shi)鐘總(zong)線(xian)(xian)上(shang)的(de)電(dian)(dian)平(ping)為(wei)(wei)低電(dian)(dian)平(ping)時(shi)(shi),則判(pan)定所(suo)述(shu)iic總(zong)線(xian)(xian)上(shang)的(de)電(dian)(dian)平(ping)為(wei)(wei)低電(dian)(dian)平(ping)。
本發明(ming)還提供(gong)了一(yi)種基于iic總(zong)線的通(tong)信系統(tong),包括iic總(zong)線、主機(ji)設(she)備和從機(ji)設(she)備;
所述(shu)(shu)(shu)主(zhu)(zhu)(zhu)機(ji)(ji)設(she)備包括主(zhu)(zhu)(zhu)機(ji)(ji)總(zong)(zong)(zong)線(xian)(xian)接(jie)口(kou)、主(zhu)(zhu)(zhu)機(ji)(ji)總(zong)(zong)(zong)線(xian)(xian)監(jian)測接(jie)口(kou)和(he)主(zhu)(zhu)(zhu)機(ji)(ji)控制接(jie)口(kou),所述(shu)(shu)(shu)主(zhu)(zhu)(zhu)機(ji)(ji)總(zong)(zong)(zong)線(xian)(xian)接(jie)口(kou)和(he)所述(shu)(shu)(shu)主(zhu)(zhu)(zhu)機(ji)(ji)總(zong)(zong)(zong)線(xian)(xian)監(jian)測接(jie)口(kou)均連接(jie)至(zhi)所述(shu)(shu)(shu)iic總(zong)(zong)(zong)線(xian)(xian),所述(shu)(shu)(shu)主(zhu)(zhu)(zhu)機(ji)(ji)總(zong)(zong)(zong)線(xian)(xian)監(jian)測接(jie)口(kou)用于獲取所述(shu)(shu)(shu)iic總(zong)(zong)(zong)線(xian)(xian)上的電平變(bian)化;
所(suo)述從(cong)機(ji)(ji)設備包括從(cong)機(ji)(ji)總(zong)(zong)(zong)線(xian)接(jie)(jie)(jie)口(kou)和從(cong)機(ji)(ji)電源接(jie)(jie)(jie)口(kou),所(suo)述從(cong)機(ji)(ji)總(zong)(zong)(zong)線(xian)接(jie)(jie)(jie)口(kou)連(lian)接(jie)(jie)(jie)至(zhi)所(suo)述iic總(zong)(zong)(zong)線(xian),所(suo)述從(cong)機(ji)(ji)電源接(jie)(jie)(jie)口(kou)連(lian)接(jie)(jie)(jie)至(zhi)所(suo)述主機(ji)(ji)控(kong)制接(jie)(jie)(jie)口(kou);
所(suo)(suo)述主機控(kong)制(zhi)(zhi)(zhi)接口用于當所(suo)(suo)述iic總線上的(de)從機設備鎖死且軟件復位無法解鎖時,輸出用于控(kong)制(zhi)(zhi)(zhi)所(suo)(suo)述從機設備斷(duan)電的(de)第一控(kong)制(zhi)(zhi)(zhi)信(xin)號,以(yi)及輸出控(kong)制(zhi)(zhi)(zhi)所(suo)(suo)述從機設備斷(duan)電后(hou)重(zhong)新上電的(de)第二控(kong)制(zhi)(zhi)(zhi)信(xin)號。
在其中(zhong)一個(ge)實(shi)施例中(zhong),所述(shu)iic總線包(bao)括數(shu)據總線和時鐘總線;
所(suo)(suo)(suo)(suo)(suo)述(shu)主(zhu)(zhu)(zhu)機(ji)總(zong)線接(jie)口(kou)(kou)包括主(zhu)(zhu)(zhu)機(ji)數據接(jie)口(kou)(kou)和(he)主(zhu)(zhu)(zhu)機(ji)時(shi)鐘接(jie)口(kou)(kou),所(suo)(suo)(suo)(suo)(suo)述(shu)主(zhu)(zhu)(zhu)機(ji)數據接(jie)口(kou)(kou)連接(jie)至所(suo)(suo)(suo)(suo)(suo)述(shu)數據總(zong)線,所(suo)(suo)(suo)(suo)(suo)述(shu)主(zhu)(zhu)(zhu)機(ji)時(shi)鐘接(jie)口(kou)(kou)連接(jie)至所(suo)(suo)(suo)(suo)(suo)述(shu)時(shi)鐘總(zong)線,所(suo)(suo)(suo)(suo)(suo)述(shu)主(zhu)(zhu)(zhu)機(ji)總(zong)線監測接(jie)口(kou)(kou)通過監測線連接(jie)至所(suo)(suo)(suo)(suo)(suo)述(shu)數據總(zong)線和(he)/或所(suo)(suo)(suo)(suo)(suo)述(shu)時(shi)鐘總(zong)線;
所述(shu)從(cong)(cong)機(ji)(ji)總(zong)線(xian)接(jie)(jie)(jie)口(kou)包(bao)括從(cong)(cong)機(ji)(ji)數據接(jie)(jie)(jie)口(kou)和從(cong)(cong)機(ji)(ji)時(shi)(shi)(shi)鐘(zhong)接(jie)(jie)(jie)口(kou),所述(shu)從(cong)(cong)機(ji)(ji)數據接(jie)(jie)(jie)口(kou)連接(jie)(jie)(jie)至(zhi)所述(shu)數據總(zong)線(xian),所述(shu)從(cong)(cong)機(ji)(ji)時(shi)(shi)(shi)鐘(zhong)接(jie)(jie)(jie)口(kou)連接(jie)(jie)(jie)至(zhi)所述(shu)時(shi)(shi)(shi)鐘(zhong)總(zong)線(xian)。
在(zai)其中一個實施例中,所(suo)述(shu)主機總線(xian)(xian)監(jian)測接(jie)口包括用于(yu)獲取所(suo)述(shu)數據(ju)總線(xian)(xian)上(shang)的(de)(de)電平變化的(de)(de)數據(ju)總線(xian)(xian)監(jian)測接(jie)口和用于(yu)獲取所(suo)述(shu)時(shi)鐘總線(xian)(xian)上(shang)的(de)(de)電平變化的(de)(de)時(shi)鐘總線(xian)(xian)監(jian)測接(jie)口;
所述數據(ju)總線監測(ce)接(jie)口通過數據(ju)監測(ce)線連接(jie)至(zhi)所述數據(ju)總線,所述時鐘(zhong)總線監測(ce)接(jie)口通過時鐘(zhong)監測(ce)線連接(jie)至(zhi)所述時鐘(zhong)總線。
在其中一個(ge)實施例中,所(suo)(suo)述(shu)(shu)通信系統還包括(kuo)硬(ying)件控制(zhi)電路,所(suo)(suo)述(shu)(shu)硬(ying)件控制(zhi)電路的輸入端連(lian)接所(suo)(suo)述(shu)(shu)主機控制(zhi)接口,所(suo)(suo)述(shu)(shu)硬(ying)件控制(zhi)電路的輸出端連(lian)接所(suo)(suo)述(shu)(shu)從機電源接口。
在其中一個實施例中,所述硬件控制(zhi)電(dian)路包括濾(lv)波電(dian)路和一級(ji)放大電(dian)路;
所述濾波電(dian)路的一(yi)端連接(jie)至所述主(zhu)機(ji)控(kong)制(zhi)接(jie)口,所述濾波電(dian)路的另一(yi)端串聯所述一(yi)級放大電(dian)路連接(jie)至所述從機(ji)電(dian)源接(jie)口。
在(zai)其中一個實(shi)施例中,所述一級放大電(dian)路包括放大器和基準電(dian)壓電(dian)路;
所(suo)述(shu)(shu)(shu)(shu)放(fang)大器的負向輸入(ru)端(duan)連(lian)接(jie)至所(suo)述(shu)(shu)(shu)(shu)基(ji)準電壓(ya)電路(lu)(lu),所(suo)述(shu)(shu)(shu)(shu)放(fang)大器的正向輸入(ru)端(duan)通過(guo)所(suo)述(shu)(shu)(shu)(shu)濾波電路(lu)(lu)連(lian)接(jie)至所(suo)述(shu)(shu)(shu)(shu)主機控(kong)制接(jie)口,所(suo)述(shu)(shu)(shu)(shu)放(fang)大器的輸出端(duan)連(lian)接(jie)至所(suo)述(shu)(shu)(shu)(shu)從機電源接(jie)口。
在其中一(yi)個實(shi)施例中,所述硬件控制電(dian)路(lu)(lu)還包括連接在所述一(yi)級放(fang)(fang)大電(dian)路(lu)(lu)的輸出(chu)端和(he)所述從機電(dian)源(yuan)接口(kou)之間的二級放(fang)(fang)大電(dian)路(lu)(lu);
所(suo)(suo)(suo)述二級放(fang)大電(dian)路包(bao)括三極(ji)管(guan)(guan),所(suo)(suo)(suo)述三極(ji)管(guan)(guan)的基極(ji)連(lian)接至(zhi)所(suo)(suo)(suo)述基準電(dian)壓電(dian)路和(he)所(suo)(suo)(suo)述放(fang)大器的輸出端的相應公共(gong)端,所(suo)(suo)(suo)述三極(ji)管(guan)(guan)的集電(dian)極(ji)連(lian)接至(zhi)電(dian)源(yuan),所(suo)(suo)(suo)述三極(ji)管(guan)(guan)的發射極(ji)連(lian)接至(zhi)所(suo)(suo)(suo)述從機電(dian)源(yuan)接口(kou)。
本(ben)發明的有益效果是:
本發明(ming)的(de)(de)(de)iic總(zong)(zong)線(xian)解(jie)鎖方(fang)法(fa)及(ji)基于iic總(zong)(zong)線(xian)的(de)(de)(de)通(tong)(tong)信(xin)系統,通(tong)(tong)過(guo)(guo)在(zai)主(zhu)機(ji)設(she)(she)(she)備(bei)上(shang)增設(she)(she)(she)主(zhu)機(ji)總(zong)(zong)線(xian)監測接(jie)(jie)口(kou)和主(zhu)機(ji)控(kong)制(zhi)接(jie)(jie)口(kou),通(tong)(tong)過(guo)(guo)主(zhu)機(ji)總(zong)(zong)線(xian)監測接(jie)(jie)口(kou)實(shi)(shi)時監測iic總(zong)(zong)線(xian)上(shang)的(de)(de)(de)電(dian)平變(bian)化,并將主(zhu)機(ji)控(kong)制(zhi)接(jie)(jie)口(kou)連接(jie)(jie)至從(cong)機(ji)設(she)(she)(she)備(bei)的(de)(de)(de)從(cong)機(ji)電(dian)源接(jie)(jie)口(kou),當iic總(zong)(zong)線(xian)上(shang)的(de)(de)(de)從(cong)機(ji)設(she)(she)(she)備(bei)鎖死且(qie)軟件(jian)復位無法(fa)解(jie)鎖時,控(kong)制(zhi)從(cong)機(ji)設(she)(she)(she)備(bei)斷(duan)電(dian),斷(duan)電(dian)后從(cong)機(ji)設(she)(she)(she)備(bei)內部復位;之(zhi)后,可(ke)以通(tong)(tong)過(guo)(guo)主(zhu)機(ji)控(kong)制(zhi)接(jie)(jie)口(kou)控(kong)制(zhi)從(cong)機(ji)設(she)(she)(she)備(bei)再(zai)次上(shang)電(dian),使得iic總(zong)(zong)線(xian)重新恢(hui)復通(tong)(tong)信(xin)。本發明(ming)通(tong)(tong)過(guo)(guo)硬(ying)件(jian)控(kong)制(zhi)的(de)(de)(de)方(fang)式(shi)實(shi)(shi)現從(cong)機(ji)設(she)(she)(she)備(bei)的(de)(de)(de)斷(duan)電(dian)復位,能夠在(zai)軟件(jian)解(jie)鎖失效時及(ji)時地解(jie)決(jue)iic總(zong)(zong)線(xian)上(shang)從(cong)機(ji)設(she)(she)(she)備(bei)鎖死的(de)(de)(de)故障,保證通(tong)(tong)信(xin)系統的(de)(de)(de)通(tong)(tong)訊可(ke)靠性。
附圖說明
圖(tu)1為本(ben)發明的iic總線解鎖方法一實(shi)施例的流程圖(tu);
圖2為本(ben)發(fa)明(ming)的(de)iic總(zong)線解(jie)鎖(suo)方法另一實施(shi)例的(de)流程圖;
圖(tu)3為本發(fa)明的(de)基于iic總線的(de)通(tong)信系統(tong)一實施例的(de)系統(tong)結構圖(tu);
圖(tu)4為(wei)本(ben)發明的通(tong)信系統中硬件控制電路(lu)(lu)一(yi)實施例的電路(lu)(lu)原理圖(tu)。
具體實施方式
為了使本(ben)發(fa)(fa)明(ming)的技術(shu)方案(an)更加清楚,以(yi)下結合(he)附圖(tu),對本(ben)發(fa)(fa)明(ming)的iic總線解(jie)鎖方法及基于iic總線的通信系統作(zuo)進一步(bu)詳細(xi)的說明(ming)。應當理解(jie),此(ci)處所描述(shu)的具體實施(shi)例(li)僅用以(yi)解(jie)釋本(ben)發(fa)(fa)明(ming)并不用于限定本(ben)發(fa)(fa)明(ming)。需(xu)要說明(ming)的是,在不沖突的情況下,本(ben)申(shen)請中的實施(shi)例(li)及實施(shi)例(li)中的特(te)征可以(yi)相互組(zu)合(he)。
如圖3所示,本發明(ming)一(yi)實(shi)施例的基于(yu)iic總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)的通信系統,包(bao)括(kuo)iic總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)100、主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)200和(he)從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)300,主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)200和(he)從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)300均(jun)連接(jie)(jie)(jie)(jie)至(zhi)iic總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)100,從(cong)(cong)(cong)而主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)200和(he)從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)300可(ke)以通過iic總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)100實(shi)現數(shu)據(ju)(ju)通信。其中,可(ke)以將iic總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)100上的主(zhu)(zhu)(zhu)(zhu)控(kong)(kong)設(she)(she)(she)備(bei)(bei)(bei)設(she)(she)(she)置為(wei)主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)200,將被控(kong)(kong)設(she)(she)(she)備(bei)(bei)(bei)設(she)(she)(she)置為(wei)從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)300。具體(ti)地,iic總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)100包(bao)括(kuo)數(shu)據(ju)(ju)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)110和(he)時(shi)鐘(zhong)(zhong)(zhong)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)120。主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)200可(ke)以為(wei)工(gong)控(kong)(kong)機(ji)(ji)(ji)(ji)或單(dan)片(pian)機(ji)(ji)(ji)(ji)等處(chu)理(li)設(she)(she)(she)備(bei)(bei)(bei),主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)200包(bao)括(kuo)主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)接(jie)(jie)(jie)(jie)口(kou),具體(ti)地,主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)接(jie)(jie)(jie)(jie)口(kou)包(bao)括(kuo)主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)數(shu)據(ju)(ju)接(jie)(jie)(jie)(jie)口(kou)a和(he)主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)時(shi)鐘(zhong)(zhong)(zhong)接(jie)(jie)(jie)(jie)口(kou)b,主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)數(shu)據(ju)(ju)接(jie)(jie)(jie)(jie)口(kou)a連接(jie)(jie)(jie)(jie)至(zhi)數(shu)據(ju)(ju)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)110,主(zhu)(zhu)(zhu)(zhu)機(ji)(ji)(ji)(ji)時(shi)鐘(zhong)(zhong)(zhong)接(jie)(jie)(jie)(jie)口(kou)b連接(jie)(jie)(jie)(jie)至(zhi)時(shi)鐘(zhong)(zhong)(zhong)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)120。從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)300可(ke)以為(wei)工(gong)控(kong)(kong)機(ji)(ji)(ji)(ji)或單(dan)片(pian)機(ji)(ji)(ji)(ji)等處(chu)理(li)設(she)(she)(she)備(bei)(bei)(bei),從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)300包(bao)括(kuo)從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)接(jie)(jie)(jie)(jie)口(kou),具體(ti)地,從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)接(jie)(jie)(jie)(jie)口(kou)包(bao)括(kuo)從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)數(shu)據(ju)(ju)接(jie)(jie)(jie)(jie)口(kou)a和(he)從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)時(shi)鐘(zhong)(zhong)(zhong)接(jie)(jie)(jie)(jie)口(kou)b,從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)數(shu)據(ju)(ju)接(jie)(jie)(jie)(jie)口(kou)a連接(jie)(jie)(jie)(jie)至(zhi)數(shu)據(ju)(ju)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)110,從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)時(shi)鐘(zhong)(zhong)(zhong)接(jie)(jie)(jie)(jie)口(kou)b連接(jie)(jie)(jie)(jie)至(zhi)時(shi)鐘(zhong)(zhong)(zhong)總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)120。進一(yi)步(bu)地,從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)300的數(shu)量可(ke)以為(wei)多個(ge),多個(ge)所述從(cong)(cong)(cong)機(ji)(ji)(ji)(ji)設(she)(she)(she)備(bei)(bei)(bei)300均(jun)連接(jie)(jie)(jie)(jie)至(zhi)上述iic總(zong)(zong)(zong)(zong)線(xian)(xian)(xian)(xian)(xian)100。
主(zhu)(zhu)機(ji)設備(bei)200還包括(kuo)主(zhu)(zhu)機(ji)總(zong)(zong)(zong)線(xian)(xian)(xian)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)接(jie)(jie)(jie)(jie)(jie)口(kou)(kou)(kou)(kou)(kou)(kou)和主(zhu)(zhu)機(ji)控制接(jie)(jie)(jie)(jie)(jie)口(kou)(kou)(kou)(kou)(kou)(kou),主(zhu)(zhu)機(ji)總(zong)(zong)(zong)線(xian)(xian)(xian)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)接(jie)(jie)(jie)(jie)(jie)口(kou)(kou)(kou)(kou)(kou)(kou)用(yong)(yong)于(yu)(yu)獲(huo)取iic總(zong)(zong)(zong)線(xian)(xian)(xian)100上(shang)(shang)的(de)電(dian)(dian)平(ping)(ping)變(bian)(bian)化(hua)。具體地(di),主(zhu)(zhu)機(ji)總(zong)(zong)(zong)線(xian)(xian)(xian)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)接(jie)(jie)(jie)(jie)(jie)口(kou)(kou)(kou)(kou)(kou)(kou)連接(jie)(jie)(jie)(jie)(jie)至(zhi)數(shu)(shu)(shu)(shu)據(ju)總(zong)(zong)(zong)線(xian)(xian)(xian)110和/或(huo)時(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)(zong)線(xian)(xian)(xian)120。進一步地(di),主(zhu)(zhu)機(ji)總(zong)(zong)(zong)線(xian)(xian)(xian)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)接(jie)(jie)(jie)(jie)(jie)口(kou)(kou)(kou)(kou)(kou)(kou)包括(kuo)用(yong)(yong)于(yu)(yu)獲(huo)取數(shu)(shu)(shu)(shu)據(ju)總(zong)(zong)(zong)線(xian)(xian)(xian)110上(shang)(shang)的(de)電(dian)(dian)平(ping)(ping)變(bian)(bian)化(hua)的(de)數(shu)(shu)(shu)(shu)據(ju)總(zong)(zong)(zong)線(xian)(xian)(xian)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)接(jie)(jie)(jie)(jie)(jie)口(kou)(kou)(kou)(kou)(kou)(kou)c和用(yong)(yong)于(yu)(yu)獲(huo)取時(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)(zong)線(xian)(xian)(xian)120上(shang)(shang)的(de)電(dian)(dian)平(ping)(ping)變(bian)(bian)化(hua)的(de)時(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)(zong)線(xian)(xian)(xian)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)接(jie)(jie)(jie)(jie)(jie)口(kou)(kou)(kou)(kou)(kou)(kou)d,數(shu)(shu)(shu)(shu)據(ju)總(zong)(zong)(zong)線(xian)(xian)(xian)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)接(jie)(jie)(jie)(jie)(jie)口(kou)(kou)(kou)(kou)(kou)(kou)c通過(guo)數(shu)(shu)(shu)(shu)據(ju)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)線(xian)(xian)(xian)410連接(jie)(jie)(jie)(jie)(jie)至(zhi)數(shu)(shu)(shu)(shu)據(ju)總(zong)(zong)(zong)線(xian)(xian)(xian)110,時(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)(zong)線(xian)(xian)(xian)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)接(jie)(jie)(jie)(jie)(jie)口(kou)(kou)(kou)(kou)(kou)(kou)d通過(guo)時(shi)(shi)鐘(zhong)(zhong)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)線(xian)(xian)(xian)420連接(jie)(jie)(jie)(jie)(jie)至(zhi)時(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)(zong)線(xian)(xian)(xian)120。其中,數(shu)(shu)(shu)(shu)據(ju)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)線(xian)(xian)(xian)410用(yong)(yong)于(yu)(yu)實時(shi)(shi)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)數(shu)(shu)(shu)(shu)據(ju)總(zong)(zong)(zong)線(xian)(xian)(xian)上(shang)(shang)的(de)電(dian)(dian)平(ping)(ping)變(bian)(bian)化(hua),數(shu)(shu)(shu)(shu)據(ju)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)線(xian)(xian)(xian)410上(shang)(shang)可以(yi)串聯設置有電(dian)(dian)壓傳(chuan)感(gan)器。時(shi)(shi)鐘(zhong)(zhong)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)線(xian)(xian)(xian)420用(yong)(yong)于(yu)(yu)實時(shi)(shi)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)時(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)(zong)線(xian)(xian)(xian)上(shang)(shang)的(de)電(dian)(dian)平(ping)(ping)變(bian)(bian)化(hua),時(shi)(shi)鐘(zhong)(zhong)監(jian)(jian)(jian)(jian)(jian)測(ce)(ce)線(xian)(xian)(xian)420上(shang)(shang)可以(yi)串聯設置有電(dian)(dian)壓傳(chuan)感(gan)器。
從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300包括(kuo)還從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)電源(yuan)接口c,從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)電源(yuan)接口c連(lian)接至主(zhu)機(ji)(ji)(ji)(ji)(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)接口e,主(zhu)機(ji)(ji)(ji)(ji)(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)接口e用于當(dang)iic總(zong)線100上的從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300鎖(suo)死且軟(ruan)件復(fu)位(wei)無(wu)法(fa)解(jie)鎖(suo)時(shi),輸出(chu)用于控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300斷電的第(di)(di)(di)一(yi)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)信(xin)(xin)(xin)號(hao),主(zhu)機(ji)(ji)(ji)(ji)(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)接口e還用于輸出(chu)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300斷電后重新上電的第(di)(di)(di)二(er)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)信(xin)(xin)(xin)號(hao)。具體(ti)地(di),當(dang)iic總(zong)線100上的從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300鎖(suo)死且軟(ruan)件復(fu)位(wei)無(wu)法(fa)解(jie)鎖(suo)時(shi),主(zhu)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)200通(tong)(tong)過該(gai)(gai)主(zhu)機(ji)(ji)(ji)(ji)(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)接口e輸出(chu)第(di)(di)(di)一(yi)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)信(xin)(xin)(xin)號(hao),并將該(gai)(gai)第(di)(di)(di)一(yi)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)信(xin)(xin)(xin)號(hao)傳送至從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)電源(yuan)接口c,從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300根(gen)(gen)據該(gai)(gai)第(di)(di)(di)一(yi)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)信(xin)(xin)(xin)號(hao)斷電復(fu)位(wei)。當(dang)iic總(zong)線100上的從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300斷電一(yi)段(duan)時(shi)間(jian)后,主(zhu)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)200通(tong)(tong)過該(gai)(gai)主(zhu)機(ji)(ji)(ji)(ji)(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)接口e輸出(chu)第(di)(di)(di)二(er)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)信(xin)(xin)(xin)號(hao),從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300可(ke)以通(tong)(tong)過從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)電源(yuan)接口c接收該(gai)(gai)第(di)(di)(di)二(er)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)信(xin)(xin)(xin)號(hao),并根(gen)(gen)據該(gai)(gai)第(di)(di)(di)二(er)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)信(xin)(xin)(xin)號(hao)重新上電,從(cong)(cong)(cong)(cong)(cong)而(er)iic總(zong)線100可(ke)以恢復(fu)正(zheng)常通(tong)(tong)信(xin)(xin)(xin)。這樣(yang)過硬件控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)的方(fang)式實現從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300的斷電復(fu)位(wei),能夠(gou)在軟(ruan)件解(jie)鎖(suo)失效(xiao)時(shi)及時(shi)地(di)解(jie)決iic總(zong)線100上從(cong)(cong)(cong)(cong)(cong)機(ji)(ji)(ji)(ji)(ji)設(she)備(bei)(bei)300鎖(suo)死的故障,保證通(tong)(tong)信(xin)(xin)(xin)系統(tong)的通(tong)(tong)訊可(ke)靠性。
應當(dang)清(qing)楚的(de)是,在從(cong)機(ji)(ji)設(she)(she)備(bei)(bei)(bei)(bei)300斷電(dian)后再上(shang)電(dian)時,從(cong)機(ji)(ji)設(she)(she)備(bei)(bei)(bei)(bei)300內部即可完(wan)成自動復位的(de)過程,其由(you)從(cong)機(ji)(ji)設(she)(she)備(bei)(bei)(bei)(bei)300的(de)自身特性確(que)定。因(yin)此,當(dang)iic總(zong)線(xian)100上(shang)的(de)從(cong)機(ji)(ji)設(she)(she)備(bei)(bei)(bei)(bei)300鎖(suo)死(si)時,僅需控制該iic總(zong)線(xian)100上(shang)連接的(de)從(cong)機(ji)(ji)設(she)(she)備(bei)(bei)(bei)(bei)300先(xian)斷電(dian)再上(shang)電(dian),即可解決iic總(zong)線(xian)100上(shang)從(cong)機(ji)(ji)設(she)(she)備(bei)(bei)(bei)(bei)300鎖(suo)死(si)的(de)問(wen)題。
進一步地,從機(ji)(ji)電(dian)(dian)源(yuan)(yuan)接(jie)(jie)(jie)口(kou)c可以包括從機(ji)(ji)電(dian)(dian)源(yuan)(yuan)正(zheng)極(ji)(ji)接(jie)(jie)(jie)口(kou)和從機(ji)(ji)電(dian)(dian)源(yuan)(yuan)負(fu)極(ji)(ji)接(jie)(jie)(jie)口(kou)。該(gai)(gai)主機(ji)(ji)控制接(jie)(jie)(jie)口(kou)e可以連接(jie)(jie)(jie)至從機(ji)(ji)電(dian)(dian)源(yuan)(yuan)正(zheng)極(ji)(ji)接(jie)(jie)(jie)口(kou),該(gai)(gai)從機(ji)(ji)電(dian)(dian)源(yuan)(yuan)負(fu)極(ji)(ji)接(jie)(jie)(jie)口(kou)接(jie)(jie)(jie)地。當然,該(gai)(gai)主機(ji)(ji)控制接(jie)(jie)(jie)口(kou)e還可以連接(jie)(jie)(jie)至從機(ji)(ji)電(dian)(dian)源(yuan)(yuan)負(fu)極(ji)(ji)接(jie)(jie)(jie)口(kou),該(gai)(gai)從機(ji)(ji)電(dian)(dian)源(yuan)(yuan)正(zheng)極(ji)(ji)接(jie)(jie)(jie)口(kou)可以連接(jie)(jie)(jie)至電(dian)(dian)源(yuan)(yuan)電(dian)(dian)路。
更(geng)進一(yi)步(bu)地,主(zhu)(zhu)(zhu)(zhu)機(ji)設備(bei)200的(de)(de)(de)(de)主(zhu)(zhu)(zhu)(zhu)機(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)接(jie)口(kou)e輸(shu)(shu)出(chu)的(de)(de)(de)(de)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)可(ke)(ke)以(yi)為電(dian)(dian)壓(ya)可(ke)(ke)調(diao)的(de)(de)(de)(de)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao),例如(ru),該控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)可(ke)(ke)以(yi)為主(zhu)(zhu)(zhu)(zhu)機(ji)設備(bei)200經pwm控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)輸(shu)(shu)出(chu)的(de)(de)(de)(de)可(ke)(ke)調(diao)電(dian)(dian)壓(ya)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao),電(dian)(dian)壓(ya)調(diao)節范(fan)圍可(ke)(ke)以(yi)為0v~5v。如(ru),當控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)的(de)(de)(de)(de)電(dian)(dian)壓(ya)達到(dao)(dao)第(di)一(yi)預(yu)設電(dian)(dian)壓(ya)值時(shi),可(ke)(ke)以(yi)認為該控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)為第(di)一(yi)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao),當控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)的(de)(de)(de)(de)電(dian)(dian)壓(ya)達到(dao)(dao)第(di)二預(yu)設電(dian)(dian)壓(ya)值時(shi),可(ke)(ke)以(yi)認為該控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)為第(di)二控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)。當然(ran),主(zhu)(zhu)(zhu)(zhu)機(ji)設備(bei)200的(de)(de)(de)(de)主(zhu)(zhu)(zhu)(zhu)機(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)接(jie)口(kou)e輸(shu)(shu)出(chu)的(de)(de)(de)(de)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)還可(ke)(ke)以(yi)為電(dian)(dian)壓(ya)幅值固(gu)定的(de)(de)(de)(de)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)。例如(ru),主(zhu)(zhu)(zhu)(zhu)機(ji)設備(bei)200的(de)(de)(de)(de)主(zhu)(zhu)(zhu)(zhu)機(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)接(jie)口(kou)e輸(shu)(shu)出(chu)的(de)(de)(de)(de)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)為0v或5v。如(ru),當主(zhu)(zhu)(zhu)(zhu)機(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)接(jie)口(kou)e的(de)(de)(de)(de)輸(shu)(shu)出(chu)電(dian)(dian)壓(ya)為0v時(shi),該控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)為第(di)一(yi)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)。當主(zhu)(zhu)(zhu)(zhu)機(ji)控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)接(jie)口(kou)e的(de)(de)(de)(de)輸(shu)(shu)出(chu)電(dian)(dian)壓(ya)為5v時(shi),該控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)為第(di)二控(kong)(kong)(kong)(kong)制(zhi)(zhi)(zhi)(zhi)信(xin)(xin)(xin)(xin)(xin)號(hao)(hao)。
作為進(jin)(jin)一步(bu)地改進(jin)(jin),如(ru)圖3所示,該(gai)通信系統還可以(yi)包括硬件控(kong)制(zhi)電(dian)路500,硬件控(kong)制(zhi)電(dian)路500的輸(shu)入端(duan)連接(jie)(jie)主(zhu)機控(kong)制(zhi)接(jie)(jie)口(kou)e,硬件控(kong)制(zhi)電(dian)路500的輸(shu)出(chu)端(duan)連接(jie)(jie)從(cong)機電(dian)源接(jie)(jie)口(kou)c,具(ju)體地,硬件控(kong)制(zhi)電(dian)路500的輸(shu)出(chu)端(duan)連接(jie)(jie)從(cong)機電(dian)源正極接(jie)(jie)口(kou)。該(gai)硬件控(kong)制(zhi)電(dian)路500用于對(dui)主(zhu)機控(kong)制(zhi)接(jie)(jie)口(kou)e輸(shu)出(chu)的第一控(kong)制(zhi)信號或(huo)第二控(kong)制(zhi)信號進(jin)(jin)行濾波及放大等處理操作。
具體(ti)地,如(ru)圖4所示,該硬件控制(zhi)電(dian)(dian)(dian)路(lu)500包括(kuo)濾(lv)(lv)(lv)波(bo)(bo)(bo)電(dian)(dian)(dian)路(lu)510和一(yi)(yi)(yi)(yi)級(ji)(ji)放(fang)大(da)(da)(da)電(dian)(dian)(dian)路(lu)520。其中,濾(lv)(lv)(lv)波(bo)(bo)(bo)電(dian)(dian)(dian)路(lu)510的一(yi)(yi)(yi)(yi)端連(lian)接至(zhi)主(zhu)機控制(zhi)接口e,濾(lv)(lv)(lv)波(bo)(bo)(bo)電(dian)(dian)(dian)路(lu)510的另一(yi)(yi)(yi)(yi)端串(chuan)聯一(yi)(yi)(yi)(yi)級(ji)(ji)放(fang)大(da)(da)(da)電(dian)(dian)(dian)路(lu)520連(lian)接至(zhi)從機電(dian)(dian)(dian)源接口c。如(ru)圖2所示,濾(lv)(lv)(lv)波(bo)(bo)(bo)電(dian)(dian)(dian)路(lu)510可以(yi)(yi)為第(di)(di)一(yi)(yi)(yi)(yi)電(dian)(dian)(dian)阻r1和第(di)(di)一(yi)(yi)(yi)(yi)電(dian)(dian)(dian)容(rong)c1組成的rc濾(lv)(lv)(lv)波(bo)(bo)(bo)器。該一(yi)(yi)(yi)(yi)級(ji)(ji)放(fang)大(da)(da)(da)電(dian)(dian)(dian)路(lu)520可以(yi)(yi)為同相放(fang)大(da)(da)(da)電(dian)(dian)(dian)路(lu)、反相放(fang)大(da)(da)(da)電(dian)(dian)(dian)路(lu)或(huo)電(dian)(dian)(dian)壓跟隨器等放(fang)大(da)(da)(da)電(dian)(dian)(dian)路(lu)結構(gou),該一(yi)(yi)(yi)(yi)級(ji)(ji)放(fang)大(da)(da)(da)電(dian)(dian)(dian)路(lu)520用于對主(zhu)機控制(zhi)接口e輸(shu)出的控制(zhi)信號進(jin)行(xing)一(yi)(yi)(yi)(yi)級(ji)(ji)放(fang)大(da)(da)(da)。
在(zai)一(yi)個實施例中,一(yi)級放(fang)(fang)(fang)大(da)(da)(da)電(dian)(dian)(dian)(dian)(dian)路(lu)(lu)520可以(yi)包括(kuo)(kuo)放(fang)(fang)(fang)大(da)(da)(da)器(qi)(qi)lm1和(he)(he)基(ji)準電(dian)(dian)(dian)(dian)(dian)壓電(dian)(dian)(dian)(dian)(dian)路(lu)(lu)530。其中,放(fang)(fang)(fang)大(da)(da)(da)器(qi)(qi)lm1的(de)(de)負向輸入端(duan)連(lian)接(jie)至基(ji)準電(dian)(dian)(dian)(dian)(dian)壓電(dian)(dian)(dian)(dian)(dian)路(lu)(lu)530,放(fang)(fang)(fang)大(da)(da)(da)器(qi)(qi)lm1的(de)(de)正(zheng)向輸入端(duan)通過濾波(bo)電(dian)(dian)(dian)(dian)(dian)路(lu)(lu)510連(lian)接(jie)至主機控制接(jie)口(kou)e,放(fang)(fang)(fang)大(da)(da)(da)器(qi)(qi)lm1的(de)(de)輸出端(duan)連(lian)接(jie)至從機電(dian)(dian)(dian)(dian)(dian)源接(jie)口(kou)c,具體地(di)(di),放(fang)(fang)(fang)大(da)(da)(da)器(qi)(qi)lm1的(de)(de)輸出端(duan)連(lian)接(jie)至從機電(dian)(dian)(dian)(dian)(dian)源正(zheng)極接(jie)口(kou)。具體地(di)(di),基(ji)準電(dian)(dian)(dian)(dian)(dian)壓電(dian)(dian)(dian)(dian)(dian)路(lu)(lu)530包括(kuo)(kuo)串(chuan)聯設置的(de)(de)第(di)(di)二電(dian)(dian)(dian)(dian)(dian)阻(zu)r2和(he)(he)第(di)(di)三電(dian)(dian)(dian)(dian)(dian)阻(zu)r3,該第(di)(di)二電(dian)(dian)(dian)(dian)(dian)阻(zu)r2和(he)(he)第(di)(di)三電(dian)(dian)(dian)(dian)(dian)阻(zu)r3串(chuan)聯后連(lian)接(jie)在(zai)電(dian)(dian)(dian)(dian)(dian)源電(dian)(dian)(dian)(dian)(dian)路(lu)(lu)vcc和(he)(he)地(di)(di)gnd之間。放(fang)(fang)(fang)大(da)(da)(da)器(qi)(qi)lm1的(de)(de)負向輸入端(duan)連(lian)接(jie)至第(di)(di)二電(dian)(dian)(dian)(dian)(dian)阻(zu)r2和(he)(he)第(di)(di)三電(dian)(dian)(dian)(dian)(dian)阻(zu)r3的(de)(de)相應公共端(duan)。
進一(yi)(yi)步地,該(gai)放大器lm1的正(zheng)向輸入端(duan)依(yi)次串(chuan)聯第(di)(di)四(si)(si)(si)電(dian)(dian)阻r4和(he)濾波(bo)電(dian)(dian)路(lu)510后連接(jie)(jie)至主機控制接(jie)(jie)口e。具體地,第(di)(di)一(yi)(yi)電(dian)(dian)阻r1和(he)第(di)(di)四(si)(si)(si)電(dian)(dian)阻r4串(chuan)聯設置在主機控制接(jie)(jie)口e和(he)放大器lm1的正(zheng)向輸入端(duan)之間(jian),第(di)(di)一(yi)(yi)電(dian)(dian)容c1連接(jie)(jie)至第(di)(di)一(yi)(yi)電(dian)(dian)阻r1和(he)第(di)(di)四(si)(si)(si)電(dian)(dian)阻r4的相應公共端(duan)。
更進一步地,硬(ying)件控制(zhi)電(dian)(dian)(dian)(dian)路500還包括連(lian)(lian)接(jie)在一級(ji)放(fang)(fang)大電(dian)(dian)(dian)(dian)路520的(de)(de)(de)輸出端(duan)和(he)從(cong)機電(dian)(dian)(dian)(dian)源(yuan)接(jie)口(kou)c之(zhi)間(jian)的(de)(de)(de)二級(ji)放(fang)(fang)大電(dian)(dian)(dian)(dian)路540,該二級(ji)放(fang)(fang)大電(dian)(dian)(dian)(dian)路540用于(yu)對(dui)主機控制(zhi)接(jie)口(kou)e輸出的(de)(de)(de)控制(zhi)信號進行(xing)二級(ji)功率(lv)放(fang)(fang)大。具體地,二級(ji)放(fang)(fang)大電(dian)(dian)(dian)(dian)路包括三(san)(san)極(ji)(ji)(ji)(ji)(ji)(ji)管(guan)q1,三(san)(san)極(ji)(ji)(ji)(ji)(ji)(ji)管(guan)q1的(de)(de)(de)基(ji)(ji)(ji)極(ji)(ji)(ji)(ji)(ji)(ji)連(lian)(lian)接(jie)至(zhi)基(ji)(ji)(ji)準電(dian)(dian)(dian)(dian)壓電(dian)(dian)(dian)(dian)路530和(he)放(fang)(fang)大器(qi)lm1的(de)(de)(de)輸出端(duan)的(de)(de)(de)相應公共(gong)端(duan),三(san)(san)極(ji)(ji)(ji)(ji)(ji)(ji)管(guan)q1的(de)(de)(de)集電(dian)(dian)(dian)(dian)極(ji)(ji)(ji)(ji)(ji)(ji)連(lian)(lian)接(jie)至(zhi)電(dian)(dian)(dian)(dian)源(yuan)vcc,三(san)(san)極(ji)(ji)(ji)(ji)(ji)(ji)管(guan)q1的(de)(de)(de)發射極(ji)(ji)(ji)(ji)(ji)(ji)連(lian)(lian)接(jie)至(zhi)從(cong)機電(dian)(dian)(dian)(dian)源(yuan)接(jie)口(kou)c。如圖2所示,該三(san)(san)極(ji)(ji)(ji)(ji)(ji)(ji)管(guan)q1為(wei)npn型雙極(ji)(ji)(ji)(ji)(ji)(ji)性(xing)三(san)(san)極(ji)(ji)(ji)(ji)(ji)(ji)管(guan),該三(san)(san)極(ji)(ji)(ji)(ji)(ji)(ji)管(guan)q1的(de)(de)(de)基(ji)(ji)(ji)極(ji)(ji)(ji)(ji)(ji)(ji)連(lian)(lian)接(jie)至(zhi)第三(san)(san)電(dian)(dian)(dian)(dian)阻r3和(he)放(fang)(fang)大器(qi)lm1的(de)(de)(de)輸出端(duan),三(san)(san)極(ji)(ji)(ji)(ji)(ji)(ji)管(guan)q1的(de)(de)(de)集電(dian)(dian)(dian)(dian)極(ji)(ji)(ji)(ji)(ji)(ji)連(lian)(lian)接(jie)至(zhi)電(dian)(dian)(dian)(dian)源(yuan)vcc,三(san)(san)極(ji)(ji)(ji)(ji)(ji)(ji)管(guan)q1的(de)(de)(de)發射極(ji)(ji)(ji)(ji)(ji)(ji)連(lian)(lian)接(jie)至(zhi)從(cong)機電(dian)(dian)(dian)(dian)源(yuan)正極(ji)(ji)(ji)(ji)(ji)(ji)接(jie)口(kou)。同時,放(fang)(fang)大器(qi)lm1的(de)(de)(de)輸出端(duan)通過第二電(dian)(dian)(dian)(dian)容(rong)c2連(lian)(lian)接(jie)至(zhi)從(cong)機電(dian)(dian)(dian)(dian)源(yuan)負(fu)極(ji)(ji)(ji)(ji)(ji)(ji)接(jie)口(kou)。
以下(xia)結合附圖(tu)4簡要(yao)說明該硬件控制(zhi)電路500的工(gong)作原理(li):
主機(ji)控(kong)(kong)制接(jie)口(kou)e輸出的(de)控(kong)(kong)制信號(hao)經濾波(bo)電(dian)路(lu)510濾波(bo)后經過(guo)放(fang)(fang)大(da)器lm1進行一(yi)級放(fang)(fang)大(da)。若主機(ji)設備輸出的(de)控(kong)(kong)制信號(hao)(第(di)一(yi)控(kong)(kong)制信號(hao)或第(di)二控(kong)(kong)制信號(hao))的(de)電(dian)壓(ya)為vp,放(fang)(fang)大(da)器的(de)放(fang)(fang)大(da)增益au=1+(第(di)三(san)電(dian)阻r3/第(di)二電(dian)阻r2),則放(fang)(fang)大(da)器的(de)輸出端輸出的(de)信號(hao)電(dian)壓(ya)vb=au*vp=(1+r3/r2)*vp。
由于從(cong)機(ji)設(she)(she)備(bei)300的(de)(de)供電(dian)電(dian)源(yuan)一般(ban)為(wei)5v左右,主機(ji)設(she)(she)備(bei)200輸(shu)出控(kong)制(zhi)信(xin)(xin)(xin)號(hao)(hao)的(de)(de)最(zui)高電(dian)壓也(ye)只有5v,該主機(ji)設(she)(she)備(bei)輸(shu)出的(de)(de)控(kong)制(zhi)信(xin)(xin)(xin)號(hao)(hao)在(zai)經過一系列器件后,實(shi)際輸(shu)入至(zhi)(zhi)從(cong)機(ji)設(she)(she)備(bei)300的(de)(de)電(dian)壓往(wang)往(wang)達不到要(yao)求(qiu)。盡(jin)管(guan)(guan)經過放(fang)大(da)(da)器的(de)(de)一級(ji)(ji)放(fang)大(da)(da),該控(kong)制(zhi)信(xin)(xin)(xin)號(hao)(hao)的(de)(de)電(dian)壓也(ye)不一定能夠驅動從(cong)機(ji)設(she)(she)備(bei)300正常工作,因此,此處(chu)通過二級(ji)(ji)放(fang)大(da)(da)電(dian)路540中的(de)(de)三極(ji)管(guan)(guan)q1實(shi)現對控(kong)制(zhi)信(xin)(xin)(xin)號(hao)(hao)的(de)(de)二級(ji)(ji)放(fang)大(da)(da)。此時,輸(shu)入至(zhi)(zhi)從(cong)機(ji)電(dian)源(yuan)正極(ji)接口的(de)(de)控(kong)制(zhi)信(xin)(xin)(xin)號(hao)(hao)的(de)(de)電(dian)壓v從(cong)=vb-v結(jie),其中,v結(jie)表示三極(ji)管(guan)(guan)的(de)(de)基極(ji)與發射極(ji)之間的(de)(de)pn結(jie)的(de)(de)壓降(jiang),v結(jie)一般(ban)為(wei)0.2v~0.3v。
同(tong)時,如圖1所示,本(ben)發明(ming)一(yi)實施(shi)例還提供了一(yi)種iic總線100的解鎖方法,用于上(shang)述任一(yi)實施(shi)例的通信(xin)(xin)系(xi)統(tong)(tong),以(yi)解決通信(xin)(xin)系(xi)統(tong)(tong)中iic總線100上(shang)的從(cong)機(ji)設備(bei)300鎖死(si)的問題。具體(ti)地,上(shang)述方法應用于該通信(xin)(xin)系(xi)統(tong)(tong)的主(zhu)機(ji)設備(bei)中,上(shang)述方法包括如下(xia)步(bu)驟:
s100、從主機(ji)總(zong)線(xian)(xian)監(jian)測(ce)接(jie)口(kou)獲(huo)取(qu)iic總(zong)線(xian)(xian)100上的(de)(de)電平(ping)(ping);具體地,主機(ji)總(zong)線(xian)(xian)監(jian)測(ce)接(jie)口(kou)通過監(jian)測(ce)線(xian)(xian)連接(jie)至iic總(zong)線(xian)(xian)100上,可(ke)以(yi)實時(shi)獲(huo)取(qu)iic總(zong)線(xian)(xian)100上的(de)(de)電平(ping)(ping)變(bian)化(hua)。進一步(bu)地,上述步(bu)驟(zou)s100可(ke)以(yi)包(bao)括步(bu)驟(zou)s110,從數(shu)據總(zong)線(xian)(xian)監(jian)測(ce)接(jie)口(kou)獲(huo)取(qu)數(shu)據總(zong)線(xian)(xian)上的(de)(de)電平(ping)(ping)。上述步(bu)驟(zou)s100還可(ke)以(yi)包(bao)括步(bu)驟(zou)s120,從時(shi)鐘總(zong)線(xian)(xian)監(jian)測(ce)接(jie)口(kou)獲(huo)取(qu)時(shi)鐘總(zong)線(xian)(xian)上的(de)(de)電平(ping)(ping)。
s200、判斷iic總(zong)線(xian)100上(shang)(shang)的(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)是(shi)否為(wei)(wei)低電(dian)(dian)(dian)(dian)平(ping)(ping);一(yi)般地,當iic總(zong)線(xian)上(shang)(shang)的(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)被拉低時,可能存在iic總(zong)線(xian)上(shang)(shang)的(de)(de)從機設(she)備鎖死的(de)(de)情(qing)況(kuang)。進一(yi)步(bu)地,上(shang)(shang)述步(bu)驟(zou)s200還(huan)可以(yi)包括步(bu)驟(zou)s210,判斷數(shu)據總(zong)線(xian)110上(shang)(shang)的(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)是(shi)否為(wei)(wei)低電(dian)(dian)(dian)(dian)平(ping)(ping)。上(shang)(shang)述步(bu)驟(zou)s200還(huan)可以(yi)包括步(bu)驟(zou)s220,判斷時鐘總(zong)線(xian)120上(shang)(shang)的(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)是(shi)否為(wei)(wei)低電(dian)(dian)(dian)(dian)平(ping)(ping)。
s300、判斷(duan)軟(ruan)件(jian)復位是否能夠解鎖(suo);一般地,當iic總線100上的(de)從機設備300鎖(suo)死時,主機設備200首先通(tong)過軟(ruan)件(jian)控(kong)(kong)制(zhi)方法控(kong)(kong)制(zhi)其上的(de)從機設備300解鎖(suo)。
s400、當(dang)判定iic總線100上的電(dian)(dian)(dian)(dian)平為低電(dian)(dian)(dian)(dian)平且軟件復位無法解鎖時,則(ze)主機控(kong)制接口e輸出第一控(kong)制信(xin)號(hao),第一控(kong)制信(xin)號(hao)控(kong)制從機設(she)備(bei)300斷電(dian)(dian)(dian)(dian);具體地,第一控(kong)制信(xin)號(hao)可以通過硬件控(kong)制電(dian)(dian)(dian)(dian)路進(jin)行濾波放大后再傳送至從機設(she)備(bei)的從機電(dian)(dian)(dian)(dian)源(yuan)接口,從而(er)控(kong)制從機設(she)備(bei)300斷電(dian)(dian)(dian)(dian)。
s500、當從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)300斷(duan)電(dian)(dian)第一預(yu)設(she)(she)(she)時(shi)間后,通(tong)(tong)過(guo)(guo)主機(ji)控(kong)(kong)制(zhi)(zhi)接(jie)口e輸(shu)出第二(er)控(kong)(kong)制(zhi)(zhi)信號,控(kong)(kong)制(zhi)(zhi)從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)300上(shang)(shang)電(dian)(dian),iic總(zong)線(xian)100解(jie)(jie)鎖并恢復(fu)通(tong)(tong)信。具體地,第二(er)控(kong)(kong)制(zhi)(zhi)信號也可以通(tong)(tong)過(guo)(guo)硬件控(kong)(kong)制(zhi)(zhi)電(dian)(dian)路進行濾波(bo)放大后再(zai)傳送至從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)的(de)從(cong)(cong)機(ji)電(dian)(dian)源接(jie)口,從(cong)(cong)而控(kong)(kong)制(zhi)(zhi)從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)300再(zai)次上(shang)(shang)電(dian)(dian)。在(zai)從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)300斷(duan)電(dian)(dian)后再(zai)上(shang)(shang)電(dian)(dian)時(shi),從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)300內部即可完成自(zi)動復(fu)位的(de)過(guo)(guo)程,其由從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)300的(de)自(zi)身特性確定。因(yin)此,當iic總(zong)線(xian)100上(shang)(shang)的(de)從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)300鎖死時(shi),僅需控(kong)(kong)制(zhi)(zhi)該(gai)iic總(zong)線(xian)100上(shang)(shang)連接(jie)的(de)從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)300先斷(duan)電(dian)(dian)再(zai)上(shang)(shang)電(dian)(dian),即可解(jie)(jie)決iic總(zong)線(xian)100上(shang)(shang)從(cong)(cong)機(ji)設(she)(she)(she)備(bei)(bei)(bei)300鎖死的(de)問題。
在一個實(shi)施例中,上述步驟s200進一步包(bao)括:
當(dang)判(pan)定(ding)iic總(zong)(zong)線(xian)100的(de)(de)(de)(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)為(wei)(wei)低(di)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)后(hou)則執行步驟(zou)s230,延時(shi)第二預(yu)設(she)時(shi)間,之(zhi)后(hou),返回步驟(zou)s200,繼續判(pan)斷(duan)iic總(zong)(zong)線(xian)上(shang)的(de)(de)(de)(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)是否為(wei)(wei)低(di)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)。當(dang)iic總(zong)(zong)線(xian)100的(de)(de)(de)(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)始終為(wei)(wei)低(di)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)時(shi),則判(pan)定(ding)iic總(zong)(zong)線(xian)100上(shang)的(de)(de)(de)(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)為(wei)(wei)低(di)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)。由于iic總(zong)(zong)線(xian)100在(zai)進(jin)行數據傳輸時(shi)也有可(ke)(ke)能(neng)出現電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)被拉低(di)的(de)(de)(de)(de)(de)情(qing)況,因此(ci),通過(guo)多(duo)次循環判(pan)斷(duan)可(ke)(ke)以保證判(pan)斷(duan)結果的(de)(de)(de)(de)(de)準確性(xing)及可(ke)(ke)靠性(xing),避免誤判(pan)。具體地,第二預(yu)設(she)時(shi)間可(ke)(ke)以為(wei)(wei)1秒~5秒。即(ji)當(dang)首次判(pan)定(ding)iic總(zong)(zong)線(xian)100上(shang)的(de)(de)(de)(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)為(wei)(wei)低(di)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)時(shi),延時(shi)第二預(yu)設(she)時(shi)間后(hou),再(zai)次判(pan)斷(duan)iic總(zong)(zong)線(xian)100的(de)(de)(de)(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)是否為(wei)(wei)低(di)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping),若是,則主機(ji)設(she)備200判(pan)定(ding)該iic總(zong)(zong)線(xian)100的(de)(de)(de)(de)(de)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping)為(wei)(wei)低(di)電(dian)(dian)(dian)(dian)平(ping)(ping)(ping)(ping),此(ci)時(shi)存在(zai)從機(ji)設(she)備300鎖死的(de)(de)(de)(de)(de)情(qing)況。
進一步地,上述步驟(zou)s200還包括如下(xia)步驟(zou):
每當判定(ding)所述(shu)iic總線上的電平為低(di)電平時,檢(jian)測(ce)(ce)次(ci)(ci)數(shu)(shu)累加一次(ci)(ci),獲(huo)得檢(jian)測(ce)(ce)總次(ci)(ci)數(shu)(shu);具體地,該(gai)檢(jian)測(ce)(ce)總次(ci)(ci)數(shu)(shu)可(ke)以用來計算上述(shu)步(bu)驟s200的循環次(ci)(ci)數(shu)(shu),該(gai)檢(jian)測(ce)(ce)總次(ci)(ci)數(shu)(shu)還(huan)可(ke)以用于判斷何時結(jie)束步(bu)驟s200并(bing)進入(ru)下(xia)一步(bu)驟。
判斷所述檢測總(zong)次(ci)數(shu)是否(fou)大于或等于第一預設(she)閾值(zhi);具體地(di),預設(she)閾值(zhi)可以為3~5次(ci)。即循環執行3~5次(ci)判斷iic總(zong)線100上(shang)的電平的是否(fou)為低電平。
當(dang)所(suo)(suo)述檢測(ce)總次數大于或(huo)等于第一預設閾值且(qie)每次所(suo)(suo)述iic總線上(shang)的電(dian)(dian)平(ping)(ping)均為(wei)低電(dian)(dian)平(ping)(ping)時(shi),則判定所(suo)(suo)述iic總線上(shang)的電(dian)(dian)平(ping)(ping)為(wei)低電(dian)(dian)平(ping)(ping)。此時(shi),可以(yi)結束步驟(zou)s200的循環判斷過程,進入(ru)下一步驟(zou)。
作為(wei)進一步地改進,如(ru)圖2所示,上述步驟s200還包括:
s210、判(pan)(pan)斷(duan)數(shu)據(ju)(ju)總(zong)(zong)線(xian)110上(shang)(shang)的電(dian)(dian)平(ping)(ping)(ping)(ping)是否(fou)(fou)(fou)為(wei)(wei)低(di)(di)電(dian)(dian)平(ping)(ping)(ping)(ping);具(ju)體地(di),可通過(guo)多次循環判(pan)(pan)斷(duan)數(shu)據(ju)(ju)總(zong)(zong)線(xian)110上(shang)(shang)的電(dian)(dian)平(ping)(ping)(ping)(ping)是否(fou)(fou)(fou)為(wei)(wei)低(di)(di)電(dian)(dian)平(ping)(ping)(ping)(ping)。具(ju)體地(di),如圖4所示,首(shou)先(xian)判(pan)(pan)斷(duan)數(shu)據(ju)(ju)總(zong)(zong)線(xian)110上(shang)(shang)的電(dian)(dian)平(ping)(ping)(ping)(ping)是否(fou)(fou)(fou)為(wei)(wei)低(di)(di)電(dian)(dian)平(ping)(ping)(ping)(ping),當判(pan)(pan)定(ding)數(shu)據(ju)(ju)總(zong)(zong)線(xian)110上(shang)(shang)的電(dian)(dian)平(ping)(ping)(ping)(ping)為(wei)(wei)低(di)(di)電(dian)(dian)平(ping)(ping)(ping)(ping)時(shi),則執(zhi)行步(bu)驟s230,延時(shi)第二預設(she)時(shi)間后,返回步(bu)驟s210,繼續判(pan)(pan)斷(duan)數(shu)據(ju)(ju)總(zong)(zong)線(xian)110上(shang)(shang)的電(dian)(dian)平(ping)(ping)(ping)(ping)是否(fou)(fou)(fou)為(wei)(wei)低(di)(di)電(dian)(dian)平(ping)(ping)(ping)(ping)。當數(shu)據(ju)(ju)總(zong)(zong)線(xian)上(shang)(shang)的電(dian)(dian)平(ping)(ping)(ping)(ping)始終(zhong)為(wei)(wei)低(di)(di)電(dian)(dian)平(ping)(ping)(ping)(ping)時(shi),則可以判(pan)(pan)定(ding)該(gai)數(shu)據(ju)(ju)總(zong)(zong)線(xian)上(shang)(shang)的電(dian)(dian)平(ping)(ping)(ping)(ping)為(wei)(wei)低(di)(di)電(dian)(dian)平(ping)(ping)(ping)(ping)。進一(yi)步(bu)地(di),可通過(guo)重復(fu)執(zhi)行步(bu)驟s210和步(bu)驟s230判(pan)(pan)斷(duan)數(shu)據(ju)(ju)總(zong)(zong)線(xian)上(shang)(shang)的電(dian)(dian)平(ping)(ping)(ping)(ping)是否(fou)(fou)(fou)為(wei)(wei)低(di)(di)電(dian)(dian)平(ping)(ping)(ping)(ping),直至檢測總(zong)(zong)次數(shu)達到預設(she)閾(yu)值。
s220、判(pan)斷(duan)時(shi)(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)線(xian)120上(shang)的電(dian)(dian)(dian)平(ping)(ping)(ping)是否為(wei)(wei)(wei)低(di)(di)電(dian)(dian)(dian)平(ping)(ping)(ping);具(ju)體地,可(ke)通過多次(ci)循(xun)環判(pan)斷(duan)時(shi)(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)線(xian)120上(shang)的電(dian)(dian)(dian)平(ping)(ping)(ping)是否為(wei)(wei)(wei)低(di)(di)電(dian)(dian)(dian)平(ping)(ping)(ping)。具(ju)體地,如(ru)圖(tu)4所示(shi),首先(xian)判(pan)斷(duan)時(shi)(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)線(xian)120上(shang)的電(dian)(dian)(dian)平(ping)(ping)(ping)是否為(wei)(wei)(wei)低(di)(di)電(dian)(dian)(dian)平(ping)(ping)(ping),當判(pan)定時(shi)(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)線(xian)120上(shang)的電(dian)(dian)(dian)平(ping)(ping)(ping)為(wei)(wei)(wei)低(di)(di)電(dian)(dian)(dian)平(ping)(ping)(ping)時(shi)(shi)(shi),則(ze)執行(xing)步(bu)驟(zou)s230,延時(shi)(shi)(shi)第二預(yu)設(she)時(shi)(shi)(shi)間后,返回步(bu)驟(zou)s220,繼續判(pan)斷(duan)時(shi)(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)線(xian)120上(shang)的電(dian)(dian)(dian)平(ping)(ping)(ping)是否為(wei)(wei)(wei)低(di)(di)電(dian)(dian)(dian)平(ping)(ping)(ping)。當時(shi)(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)線(xian)120上(shang)的電(dian)(dian)(dian)平(ping)(ping)(ping)始終為(wei)(wei)(wei)低(di)(di)電(dian)(dian)(dian)平(ping)(ping)(ping)時(shi)(shi)(shi),則(ze)可(ke)以判(pan)定該時(shi)(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)線(xian)120上(shang)的電(dian)(dian)(dian)平(ping)(ping)(ping)為(wei)(wei)(wei)低(di)(di)電(dian)(dian)(dian)平(ping)(ping)(ping)。進一步(bu)地,可(ke)通過重復執行(xing)步(bu)驟(zou)s220和步(bu)驟(zou)s230判(pan)斷(duan)時(shi)(shi)(shi)鐘(zhong)(zhong)總(zong)(zong)線(xian)上(shang)的電(dian)(dian)(dian)平(ping)(ping)(ping)是否為(wei)(wei)(wei)低(di)(di)電(dian)(dian)(dian)平(ping)(ping)(ping),直至檢測總(zong)(zong)次(ci)數達到預(yu)設(she)閾(yu)值。
當數據總(zong)(zong)(zong)(zong)線(xian)110上的(de)電(dian)(dian)(dian)(dian)平為低電(dian)(dian)(dian)(dian)平和(he)/或時鐘(zhong)總(zong)(zong)(zong)(zong)線(xian)120上的(de)電(dian)(dian)(dian)(dian)平為低電(dian)(dian)(dian)(dian)平時,則判定iic總(zong)(zong)(zong)(zong)線(xian)100上的(de)電(dian)(dian)(dian)(dian)平為低電(dian)(dian)(dian)(dian)平。即當時鐘(zhong)總(zong)(zong)(zong)(zong)線(xian)120和(he)數據總(zong)(zong)(zong)(zong)線(xian)110的(de)任一電(dian)(dian)(dian)(dian)平為低電(dian)(dian)(dian)(dian)平時,則判定iic總(zong)(zong)(zong)(zong)線(xian)100上的(de)從機設備(bei)300存在(zai)鎖死的(de)情(qing)況。
由于(yu)(yu)數據總線(xian)(xian)110出錯(cuo)導致從(cong)機設備300鎖死的(de)概率大于(yu)(yu)時鐘總線(xian)(xian)120出錯(cuo)的(de)概率,因此在要求不(bu)高的(de)情況(kuang)下,還(huan)可以(yi)只(zhi)(zhi)檢測(ce)數據總線(xian)(xian)110上(shang)(shang)的(de)電平變化(hua),即(ji)只(zhi)(zhi)有(you)一(yi)根總線(xian)(xian)監(jian)測(ce)線(xian)(xian),主(zhu)(zhu)機設備200上(shang)(shang)只(zhi)(zhi)有(you)一(yi)個(ge)主(zhu)(zhu)機總線(xian)(xian)監(jian)測(ce)接口(kou)。當然,主(zhu)(zhu)機設備200還(huan)可以(yi)只(zhi)(zhi)具有(you)一(yi)個(ge)用于(yu)(yu)監(jian)測(ce)數據時鐘總線(xian)(xian)120上(shang)(shang)的(de)電平變化(hua)的(de)主(zhu)(zhu)機總線(xian)(xian)監(jian)測(ce)接口(kou)。
在一個實施例中,上述步驟s300進一步包括:
s310、每(mei)當(dang)判(pan)定iic總(zong)線100上(shang)的(de)電平(ping)為低電平(ping)時,檢測次數(shu)累(lei)加一次,獲(huo)得檢測總(zong)次數(shu);具體地,該檢測總(zong)次數(shu)可以用來計算(suan)上(shang)述(shu)(shu)步(bu)(bu)驟s210或上(shang)述(shu)(shu)步(bu)(bu)驟s220的(de)循環次數(shu),該檢測總(zong)次數(shu)還可以用于(yu)判(pan)斷(duan)軟(ruan)件復位方式是否有效。該檢測總(zong)次數(shu)與(yu)上(shang)述(shu)(shu)步(bu)(bu)驟s200中的(de)檢測總(zong)次數(shu)一致。
s320、判斷檢測總(zong)次(ci)數是(shi)否大于(yu)或(huo)等于(yu)第(di)(di)二預(yu)設(she)(she)閾(yu)值(zhi)(zhi);具(ju)體地,第(di)(di)二預(yu)設(she)(she)閾(yu)值(zhi)(zhi)可以(yi)為3~5次(ci)。即循(xun)環執行3~5次(ci)判斷iic總(zong)線100上的電(dian)平(ping)的是(shi)否為低電(dian)平(ping)。進一步地,該第(di)(di)二預(yu)設(she)(she)閾(yu)值(zhi)(zhi)可以(yi)等于(yu)上述第(di)(di)一預(yu)設(she)(she)閾(yu)值(zhi)(zhi),如圖2所示。
當(dang)檢(jian)測總次(ci)數大于(yu)(yu)或等于(yu)(yu)第二預設(she)(she)閾值(zhi)時(shi),則(ze)判定軟件復(fu)位無(wu)法解鎖。例如(ru),當(dang)檢(jian)測總次(ci)數大于(yu)(yu)或等于(yu)(yu)3次(ci)時(shi),則(ze)主(zhu)機設(she)(she)備(bei)判定該軟件復(fu)位方式無(wu)法完成解鎖,此時(shi),可以通(tong)過啟動硬件解鎖方式實現iic總線的通(tong)信順暢(chang)。
本發明(ming)的(de)iic總(zong)(zong)(zong)線解(jie)鎖方(fang)法及基于iic總(zong)(zong)(zong)線的(de)通(tong)信(xin)(xin)系(xi)統,在(zai)主(zhu)機(ji)(ji)(ji)設(she)(she)備(bei)(bei)上增(zeng)設(she)(she)主(zhu)機(ji)(ji)(ji)總(zong)(zong)(zong)線監(jian)(jian)測接(jie)(jie)口(kou)(kou)和主(zhu)機(ji)(ji)(ji)控制(zhi)(zhi)接(jie)(jie)口(kou)(kou),通(tong)過(guo)主(zhu)機(ji)(ji)(ji)總(zong)(zong)(zong)線監(jian)(jian)測接(jie)(jie)口(kou)(kou)實(shi)時監(jian)(jian)測iic總(zong)(zong)(zong)線上的(de)電平變化,并將主(zhu)機(ji)(ji)(ji)控制(zhi)(zhi)接(jie)(jie)口(kou)(kou)連接(jie)(jie)至從(cong)(cong)機(ji)(ji)(ji)設(she)(she)備(bei)(bei)的(de)從(cong)(cong)機(ji)(ji)(ji)電源(yuan)接(jie)(jie)口(kou)(kou)c,當iic總(zong)(zong)(zong)線上的(de)從(cong)(cong)機(ji)(ji)(ji)設(she)(she)備(bei)(bei)鎖死且軟(ruan)(ruan)件復(fu)位無(wu)法解(jie)鎖時,控制(zhi)(zhi)從(cong)(cong)機(ji)(ji)(ji)設(she)(she)備(bei)(bei)斷電,斷電后(hou)從(cong)(cong)機(ji)(ji)(ji)設(she)(she)備(bei)(bei)內部復(fu)位;之后(hou),可(ke)以(yi)通(tong)過(guo)主(zhu)機(ji)(ji)(ji)控制(zhi)(zhi)接(jie)(jie)口(kou)(kou)控制(zhi)(zhi)從(cong)(cong)機(ji)(ji)(ji)設(she)(she)備(bei)(bei)再次上電,使得iic總(zong)(zong)(zong)線重新(xin)恢復(fu)通(tong)信(xin)(xin)。本發明(ming)通(tong)過(guo)硬件控制(zhi)(zhi)的(de)方(fang)式實(shi)現從(cong)(cong)機(ji)(ji)(ji)設(she)(she)備(bei)(bei)的(de)斷電復(fu)位,能(neng)夠(gou)在(zai)軟(ruan)(ruan)件解(jie)鎖失效時及時地解(jie)決iic總(zong)(zong)(zong)線上從(cong)(cong)機(ji)(ji)(ji)設(she)(she)備(bei)(bei)鎖死的(de)故障,保證通(tong)信(xin)(xin)系(xi)統的(de)通(tong)訊可(ke)靠性(xing)。
以(yi)上所述實施(shi)例僅表達了本(ben)發明(ming)(ming)的(de)幾種實施(shi)方式(shi),其描述較為(wei)具(ju)體和(he)詳細(xi),但并不能因(yin)此而理解為(wei)對本(ben)發明(ming)(ming)專(zhuan)(zhuan)利(li)(li)范(fan)(fan)圍的(de)限制。應當指出的(de)是,對于本(ben)領域的(de)普(pu)通技(ji)術人員來(lai)說,在不脫離本(ben)發明(ming)(ming)構(gou)思(si)的(de)前提下,還可以(yi)做(zuo)出若(ruo)干變形和(he)改進,這(zhe)些都屬(shu)于本(ben)發明(ming)(ming)的(de)保護范(fan)(fan)圍。因(yin)此,本(ben)發明(ming)(ming)專(zhuan)(zhuan)利(li)(li)的(de)保護范(fan)(fan)圍應以(yi)所附權利(li)(li)要求(qiu)為(wei)準。