Re: PIC18F4620 使用SMbus問題
|
||||
---|---|---|---|---|
版主
|
SMbus 的準位與標準的 I2C 不一樣,SMBus 是 3.3V 所以 Schmitt Trigger 的準位與使用5V的I2C觸發準位不一樣。如果 PIC16F4620 使用在 3.3V 也是 O.K.
發表於: 2008/3/17 9:47
|
|||
|
Re: PIC18F4620 使用SMbus問題
|
||||
---|---|---|---|---|
新會員
|
MCC18裡面的I2C函式用法:
OpenI2C(MASTER, SLEW_OFF);// Initialize I2C module StartI2C(); SSPADD = 9; //400kHz Baud clock(9) @16MHz EEByteWrite(Device_ID,Device_Address,Data); EERandomRead(Device_ID,Device_Address) return (-3) :應該是表示return某種錯誤訊息 要看執行到哪一個判斷才知
發表於: 2008/3/15 0:40
|
|||
|
PIC18F4620 使用SMbus問題
|
||||
---|---|---|---|---|
新會員
|
想請問一下如果想要用PIC18F4620話,
可以直接用MCC18裡面的I2C含函式用在SMbus Interface嗎?? 我看PIC18F452裡面的DATA sheet, SSPSTAT Register中的 CKE: SMBus Select bit In Master or Slave mode: 1 = Enable SMBus specific inputs 0 = Disable SMBus specific inputs 可是PIC18F4620裡面的並沒有, 是不是這樣就沒辦法直接使用阿? 麻煩大大們替我解答一下了... 弄好久,好像匯流排都會衝突就跳出來了.. 我有接2顆10K的提升電阻至VCC, 另外想在問一下 return (-3) 這樣打有什麼作用阿?? 看不太懂他函式庫的寫法
發表於: 2008/3/11 9:45
|
|||
|