CH438Q 接收數(shù)據(jù)中斷問題 !

各位好:

? ? CH438Q在接收數(shù)據(jù)時(shí),數(shù)據(jù)量大于112字節(jié),在數(shù)據(jù)可用中斷 和超時(shí)中斷都會分別產(chǎn)生中斷嗎 ?產(chǎn)生中斷的順序是先可用中斷 ,后超時(shí)中斷嗎 ?數(shù)據(jù)中只有一部分有用,應(yīng)如何保存有用數(shù)據(jù)!

例:$GNGGA,064754.000,2236.9108,N,11403.2383,E,2,15,0.87,106.5,M,-2.2,M,0000,0000*69 $GPGSA,A,3,14,25,24,22,18,15,21,12,193,,,,1.59,0.87,1.34*34 $BDGSA,A,3,07,06,01,10,04,09,,,,,,,1.59,0.87,1.34*1B $GPGSV,3,1,11,18,78,077,44,22,56,330,46,193,48,160,39,50,46,122,39*4A $GPGSV,3,2,11,25,39,146,41,12,39,095,46,14,36,310,48,21,31,195,37*72 $GPGSV,3,3,11,24,28,036,47,31,18,228,13,15,12,075,40*43 $BDGSV,3,1,11,07,77,323,40,06,72,113,38,09,72,348,36,03,62,189,27*64 $BDGSV,3,2,11,10,59,251,21,01,51,128,37,02,44,241,,04,33,110,34*6D $BDGSV,3,3,11,05,23,255,,14,03,317,34,08,03,172,17*53 $GNRMC,064754.000,A,2236.9108,N,11403.2383,E,0.00,329.66,130214,,,D*74 $GPTXT,01,01,02,ANTSTATUS=OK*3B


其中只有?$GNRMC,064754.000,A,2236.9108,N,11403.2383,E,0.00,329.66,130214,,,D*74 數(shù)據(jù)有用,怎么保存啊 !

不會的。同一數(shù)據(jù)不會既進(jìn)超時(shí)又進(jìn)可用中斷。


? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

各位好:

? ? CH438Q在接收數(shù)據(jù)時(shí),數(shù)據(jù)量大于112字節(jié),在數(shù)據(jù)可用中斷 和超時(shí)中斷都會分別產(chǎn)生中斷嗎 ?產(chǎn)生中斷的順序是先可用中斷 ,后超時(shí)中斷嗎 ?數(shù)據(jù)中只有一部分有用,應(yīng)如何保存有用數(shù)據(jù)!

例:$GNGGA,064754.000,2236.9108,N,11403.2383,E,2,15,0.87,106.5,M,-2.2,M,0000,0000*69 $GPGSA,A,3,14,25,24,22,18,15,21,12,193,,,,1.59,0.87,1.34*34 $BDGSA,A,3,07,06,01,10,04,09,,,,,,,1.59,0.87,1.34*1B $GPGSV,3,1,11,18,78,077,44,22,56,330,46,193,48,160,39,50,46,122,39*4A $GPGSV,3,2,11,25,39,146,41,12,39,095,46,14,36,310,48,21,31,195,37*72 $GPGSV,3,3,11,24,28,036,47,31,18,228,13,15,12,075,40*43 $BDGSV,3,1,11,07,77,323,40,06,72,113,38,09,72,348,36,03,62,189,27*64 $BDGSV,3,2,11,10,59,251,21,01,51,128,37,02,44,241,,04,33,110,34*6D $BDGSV,3,3,11,05,23,255,,14,03,317,34,08,03,172,17*53 $GNRMC,064754.000,A,2236.9108,N,11403.2383,E,0.00,329.66,130214,,,D*74 $GPTXT,01,01,02,ANTSTATUS=OK*3B


其中只有?$GNRMC,064754.000,A,2236.9108,N,11403.2383,E,0.00,329.66,130214,,,D*74 數(shù)據(jù)有用,怎么保存啊 !

? ? ? ? ? ?

數(shù)據(jù)長度達(dá)到FIFO觸發(fā)點(diǎn)則產(chǎn)生可用數(shù)據(jù)中斷,剩余數(shù)據(jù)長度達(dá)不到觸發(fā)點(diǎn)時(shí)產(chǎn)生超時(shí)中斷,當(dāng)單次接收數(shù)據(jù)長度大于112字節(jié)而小于224時(shí),會先產(chǎn)生可用中斷,然后產(chǎn)生超時(shí)中斷。所有數(shù)據(jù)都要從CH438 讀出,然后判斷哪些有用再保存。


"當(dāng)單次接收數(shù)據(jù)長度大于112字節(jié)而小于224時(shí)" ?怎么理解 ? 當(dāng)接收的總數(shù)據(jù)長度為279時(shí),在可用中斷 和超時(shí)中斷如何 處理 ,

才能保存所用數(shù)據(jù) !能寫個(gè)例程嗎 ?謝謝支持!


? ? ? ? ? ? ? ? ? ? ? ? ? ?

"當(dāng)單次接收數(shù)據(jù)長度大于112字節(jié)而小于224時(shí)" ?怎么理解 ? 當(dāng)接收的總數(shù)據(jù)長度為279時(shí),在可用中斷 和超時(shí)中斷如何 處理 ,

才能保存所用數(shù)據(jù) !能寫個(gè)例程嗎 ?謝謝支持!

? ? ? ? ? ? ? ? ? ? ? ?

您好,如果是279,應(yīng)該會產(chǎn)生2次可用數(shù)據(jù)中斷,一次超時(shí)中斷,注意每次產(chǎn)生可用中斷的時(shí)候及時(shí)去讀取數(shù)據(jù),防止FIFO溢出;產(chǎn)生可用數(shù)據(jù)中斷的時(shí)候,可按FIFO觸發(fā)點(diǎn)長度讀取數(shù)據(jù),超時(shí)中斷則每次都判斷是否還有數(shù)據(jù),一直將數(shù)據(jù)讀完。


我測試只要發(fā)送的字節(jié)數(shù)少于設(shè)定的觸發(fā)值,觸發(fā)中斷讀取的IIR表示是超時(shí)中斷


只有登錄才能回復(fù),可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频