Browsing this Thread:
1 Anonymous Users
|
Re: [I2C 問題]---請問如何一次抓 10bit的值[ADC],目前我只能抓取8 bit的值
|
|
版主
Joined
: 2004/4/30 10:53 最後登入時間
: 2021/11/30 18:11
From CAE, Microchip
Group:
站務管理者 註冊會員
Level : 75 HP : 744 / 1861 MP : 5367 / 111130 EXP : 45
|
I2C 的 Communication Protocal 裡資料的傳送都是以 8-bit 為單位,他無法直接抓 10-bit,如要抓 10-bit data 就要分成兩次讀取或使用 Sequential Read 方式讀取。
發表於: 2008/9/18 12:11
|
|
|
[I2C 問題]---請問如何一次抓 10bit的值[ADC],目前我只能抓取8 bit的值
|
|
新會員
Joined
: 2008/9/2 14:36 最後登入時間
: 2008/11/18 15:06
Group:
註冊會員
Level : 2 HP : 0 / 40 MP : 5 / 1912 EXP : 62
|
[I2C 問題]-- 請問如何一次抓 10bit的值[ADC],目前我只能抓取8 bit的值 ******************************************* int EEPROM_ByteWrite(unsigned char CMD , unsigned char Addr , unsigned char Data )
1.當我將 unsigned char Data>改成 unsigned int Data 編譯時會發生錯誤
2.當連抓2次 data 卻無法成功() MasterWriteI2C(Data>>8) // high byte data MasterWriteI2C(Data) // low byte data
ex:265 high byte data=抓取為0,不是2...?? low byte data=抓取65,OK
****************************************** chip型號--> dspic30f6010A C語言 韌體I2C I2C Master & Slave ************************
發表於: 2008/9/16 11:36
|
|
You can view topic.
你 不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.