目前找了 Sample Code 是以 I2C_SingleByte_Master 為範例 
 
結果跑出來的如下: 
 
+--------------------------------------------------------+ 
| I2C Driver Sample Code for Single Byte Read/Write Test | 
| Needs to work with I2C_Slave sample code               | 
|   24C02C                                                              | 
| I2C Master (I2C1) <---> I2C Slave(I2C1)                | 
| !! This sample code requires two borads to test !!     | 
+--------------------------------------------------------+ 
 
Configure I2C1 as Master 
The I/O connection to I2C1 
I2C1_SDA(PG.3), I2C1_SCL(PG.2)    <<-----------------------------------我只改這裡  
 
I2C clock 100000 Hz 
 
當機在這地方 !  
 
//================= 
 
 請問我找的 Sample Code 對嗎 ?  可以給我建議去那找類似的 Sample Code ? 
 
PS .M051 我使用24LC64 時測試 Sample Code 是 OK 的! 
 
 |