• slider image 442
  • slider image 492
  • slider image 493
  • slider image 494
  • slider image 495
  • slider image 496
:::


Browsing this Thread:   1 Anonymous Users






Re: PIC18F4620 使用SMbus問題
#4
版主
版主


查看用戶資訊
SMbus 的準位與標準的 I2C 不一樣,SMBus 是 3.3V 所以 Schmitt Trigger 的準位與使用5V的I2C觸發準位不一樣。如果 PIC16F4620 使用在 3.3V 也是 O.K.

發表於: 2008/3/17 9:47
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC18F4620 使用SMbus問題
#3
版主
版主


查看用戶資訊
如果使使用 putsI2C( ):
Return Value:
Master I2C mode:

0 if the null character was reached in the data string

-2 if the slave I2C device responded with a NOT ACK

-3 if a write collision occurred

Slave I2C mode:

0 if the null character was reached in the data string

-2 if the master I2C device responded with a NOT ACK which terminated the data transfer

若是使用 EEBytewrite( ) 的話其結果又不一樣,所以要看 PIC18 Peripheral Libraries 才知道詳情: C:\mcc18\doc\periph-lib\I2C.htm

EEBytewrite( ) ; Return Value:
0 if there were no errors

-1 if there was a bus collision error

-2 if there was a NOT ACK error

-3 if there was a write collision error


發表於: 2008/3/17 9:44
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: PIC18F4620 使用SMbus問題
#2
新會員
新會員


查看用戶資訊
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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


PIC18F4620 使用SMbus問題
#1
新會員
新會員


查看用戶資訊
想請問一下如果想要用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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







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.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------