Re: w401第六章的EX6-1
|
||||
---|---|---|---|---|
高級會員
|
WriteI2C(addr_hi); // Write Control to EEPROM
的 addr_hi 沒有宣告呀 不然你改成 WriteI2C(0); // Write Control to EEPROM 在試試看,
發表於: 2006/7/12 9:39
|
|||
|
Re: w401第六章的EX6-1
|
||||
---|---|---|---|---|
高級會員
|
細節參考下列討論
http://www.microchip.com.tw/modules/n ... 318&forum=4#forumpost1288 方法可以在 W401 workshop 教材裡的練習 6-2 ,修改一下 APP001 舊版(worskop使用) 上的EE是24C04A 4K bit APP001 新版(一般代理商販售)上的EE是24LC32A 32K bit 使用上 address byte 需要有hi btye和 low byte EEPROM_Write() EE_READ() 修改內容: 多加入hi btye address WriteI2C(addr_hi); // Write Control to EEPROM while(SSPCON2bits.ACKSTAT); // test for ACK condition, if received I2C_Done(); // Clear SSPIF flag WriteI2C(addr_low); // Write Address to EEPROM while(SSPCON2bits.ACKSTAT); // test for ACK condition, if received I2C_Done(); 再注意一下頻率應該就沒問題的 OpenI2C(MASTER, SLEW_ON);// Initialize I2C module SSPADD = 9; //400kHz Baud clock(9) @16MHz //100kHz Baud clock(39) @16MHz 希望有幫助
發表於: 2006/7/10 11:34
|
|||
|
Re: w401第六章的EX6-1
|
||||
---|---|---|---|---|
版主
|
檢查一下讀取部份是否工作正常?
發表於: 2006/6/5 16:04
|
|||
|
Re: w401第六章的EX6-1
|
||||
---|---|---|---|---|
初級會員
|
就是沒有數字的畫面
空空的 我寫數字1.2.3.4.5進去 獨取出來......Lcd顯示應該有1.2.3.4.5 但是沒有
發表於: 2006/6/2 20:27
|
|||
|
Re: w401第六章的EX6-1
|
||||
---|---|---|---|---|
版主
|
不知道你所講的"只有一格格的"是指何意?
發表於: 2006/6/2 9:58
|
|||
|
Re: w401第六章的EX6-1
|
||||
---|---|---|---|---|
初級會員
|
Please Enter your Number :
EEPROM WRITE is completed! EEPROM WRITE is completed! EEPROM WRITE is completed! EEPROM WRITE is completed! EEPROM WRITE is completed! EEPROM WRITE is completed! EEPROM WRITE is completed! EEPROM WRITE is completed! EEPROM WRITE is completed! Completed to save your Number! 可以寫入但 LCD的畫面只有全部(16*2)只有一格格的 這樣對嗎....
發表於: 2006/5/31 1:55
|
|||
|
Re: w401第六章的EX6-1
|
||||
---|---|---|---|---|
版主
|
利用 C18 所提供的 EEPROM 函數庫,EX6-1 應該寫的很詳細啊!
j=0;
EE_Read_Data.l = EERandomRead(0xA0,j) 就是讀 24LC02 EEPROM 的部份,讀出來的值到一個UNION裡: union { int l; char i[2]; } near EE_Read_Data;
發表於: 2006/5/30 10:16
|
|||
|
w401第六章的EX6-1
|
||||
---|---|---|---|---|
初級會員
|
w401第六章的EX6-1
所要的結果 數字輸入完畢後自EEPROM讀取剛存入的字串並顯示在LCD上 要怎麼做才能讀取EEPROM內的資料呢
發表於: 2006/5/29 23:14
|
|||
|