• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 18F4550
#3
初級會員
初級會員


查看用戶資訊
小弟已經可以驗證寫入 EEPROM 的資料是否正確了,
因為原範例程式的 RAM variable Declaration -> EE_Read_Buffer 區域變數並不會自動 REFRESH(因為Watch 視窗總是顯示錯的),所以我在外部加了一個整體字串變數
EE_Read_Real_Buf,並將 EE_Read_Buffer 內的資料指定至 EE_Read_Real_Buf 中,再由 Watch 視窗檢視確定為之前所寫入 EEPROM 的資料,在此感謝版主熱情的指導,謝謝 !!

程式片段:

// ***** RAM variable Declaration *****
#pragma udata access EE_Array
near unsigned char EE_Read_Buffer[64];
#pragma udata


//for debug only..
unsigned char EE_Read_Real_Buf[32];
unsigned char tmp;


void main (void)
{
.....

// Read 32 bytes from EEPROM with start address 0x20
for (i=0x20; i<0x40;i++)
{
tmp = EE_Read(i); // Read a byte form EEPROM
EE_Read_Buffer1[i-0x20] = tmp;
}

// Make sure data had been refreshed from EEPROM..
for (i=0x0; i<0x20;i++)
{
EE_Read_Real_Buf[i] = EE_Read_Buffer1[i];
^^^^^^^^^^^^^^
(顯示真實的資料...)
}

while(1);
}
.....

發表於: 2007/4/18 11:28
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 18F4550
#2
版主
版主


查看用戶資訊
先用 VIEW 打開 EEPROM 視窗,再寫完 EEPROM 後,在 Debugger 下點選 Read EEPROM 進來看看先確定是否EEPROM Data 有寫入,Remove Power 再讀一次看看。

發表於: 2007/4/18 9:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


18F4550
#1
初級會員
初級會員


查看用戶資訊
Dear All,

各位先進大家好,小弟在 APP013(18F4550 USB)板上,載入 "如何讀寫 PIC18FXXX 內部 EEPROM 的範例的範例" 程式, 讀寫動作皆正常(由 watch 中觀察到 EE_Read_Buffer= "abcdefghijklmnopqrstuvwxyz..."),
但是將連續寫入共 32 bytes的程式段 REMARK 起來,然後只留下剩餘的 EE_Read (共讀入 64 Bytes)的動作,卻發現之前寫入的資料不見了(電源及 ICD2 皆移除 -> EE_Read_Buffer = ""), 奇怪寫入至 EEPROM 的資料不是會保存到斷電後,再上電即可將之前寫入的資料再讀出來嗎?請問各位先進是否需要再設定什麼Configuration Bit 值,或是程式中還需要再加入其他的程式來驗證資料的讀寫是否正常呢?(即使在 Debugging->Settings->Program->"Preserve EEPROM on Program" 的設定已打勾)

謝謝各位大大的指教..

發表於: 2007/4/17 18:27
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... ]

教育訓練中心

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