Re: 請問 I2C 和 SPI 的 DATA 和 CLOCK 腳可以並聯嗎?
|
||||
---|---|---|---|---|
資深會員
|
最近測試的結果,I2C 和 SPI 連 CLOCK 腳都不要共用比較好,
因為原本測試 SPI 時沒什麼問題, 但換到 I2C 時,存取個幾次之後就沒有反應了, 我看還是乖乖的將 DATA 和 CLOCK 分開好了。
發表於: 2009/3/24 13:58
|
|||
|
Re: 請問 I2C 和 SPI 的 DATA 和 CLOCK 腳可以並聯嗎?
|
||||
---|---|---|---|---|
資深會員
|
補充說明一下
共用CLK腳,是在SPI跟I2C都不是用Hardware的情況下,也就是用程式寫的Master SPI及I2C。 我的看法說明如下 使用SPI時 I2C的SDA固定為Hi,所以不會有start stop條件發生。 使用I2C時 SPI的CS固定為Hi,SPI不會動作。
發表於: 2009/3/20 10:01
|
|||
|
Re: 請問 I2C 和 SPI 的 DATA 和 CLOCK 腳可以並聯嗎?
|
||||
---|---|---|---|---|
版主
|
我認為 SPI 的 CLock 干擾 SCL 腳造成 I2C Slave Device 的誤判。
發表於: 2009/3/20 9:37
|
|||
|
Re: 請問 I2C 和 SPI 的 DATA 和 CLOCK 腳可以並聯嗎?
|
||||
---|---|---|---|---|
資深會員
|
單獨並聯CLOCK腳應該是可以的,DATA腳不可以並聯,雖然沒試過,但理論上應該可行
發表於: 2009/3/19 15:11
|
|||
|
Re: 請問 I2C 和 SPI 的 DATA 和 CLOCK 腳可以並聯嗎?
|
||||
---|---|---|---|---|
版主
|
I2C 和 I2C 之間彼此是可以並在一塊的,因為是用 Slave Address 來區別。 SPI 與 SPI 也是可以並在一起但要用CS腳來區隔。
I2C 與 SPI 應該不能並在一起,主要是I2C 在 SCL 為 Hi 時不允許有 SDA 的變動,不然 I2C 將視為 Start or Restart or Stop Condiction 的狀態而啟動內部的 Step Mechine 的動作造成 I2C 卡死的現象。
發表於: 2009/3/19 11:39
|
|||
|
請問 I2C 和 SPI 的 DATA 和 CLOCK 腳可以並聯嗎?
|
||||
---|---|---|---|---|
資深會員
|
大家好:
例如我現在有一顆 24LC08 是 I2C 介面, 另一顆 MCP3201 是 SPI 介面, 我想要節省 CPU 的 IO 腳, 如果兩顆 IC 的 DATA 和 CLOCK 可以並聯的話, 這樣我只需要 3 支 IO 就可以控制兩顆 IC, 不知道可不可以這樣做?是否有人試過? 謝謝。
發表於: 2009/3/18 15:15
|
|||
|