• slider image 442
  • slider image 477
  • slider image 479
  • slider image 480
  • slider image 481
  • slider image 482
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問MPLABx如何於Debug時可看到EEprom的更新?
#7
版主
版主


查看用戶資訊
在 Simulation 下執行軟體,如果有成功的改變 EEPROM 的資料,在 EEPROM 視窗是可以看到資料的改變的。如果資料沒有變化那有可能是對 EEPROM 的寫入程式有問題。

1. 程式裡定義 EEPROM 的初始資料:
#include     
__EEPROM_DATA(0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07);
__EEPROM_DATA(0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F);


2. 程式裡使用 eeprom_write( ) & eeprom_read( ) 來存取 EEPROM 的資料

#include  

int main ()
{    
    
volatile unsigned char value 0x09;    
    
unsigned char address 0xE5;    
             
// Writing value 0x9 to EEPROM address 0xE5
    
eeprom_write (addressvalue);
             
// Reading the value from address 0xE5
    
value eeprom_read (address);
}


EEPROM 的正確位址是 : F00000-F000FF 放置在 Program Memory 裡。因為 PIC18 指吝是屬於長指令 16-bit 架構,所以只有偶數的位址。所以對 EEPROM 的資料只會占用 16-bit 裡的 Lsb 的 8-bit 區域。於是就會占用兩個 Bytes 的區塊。

發表於: 2021/2/17 11:33
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問MPLABx如何於Debug時可看到EEprom的更新?
#6
新會員
新會員


查看用戶資訊
請問各位先進 MPLAB X IDE 使用內建的 Simulator Debug時,
1. 開啟Eeprom視窗,卻看不到數值變化?
2. 根據資料Eeprom的位置是7000-70FF,可是Eeprom的視窗卻顯示 F000-F0FF
以上不知是什麼原因
我使用PIC16F18324, 組合語言

Attach file:



jpg  2021-02-16_123410.jpg (244.35 KB)
1124_602b4e474d18d.jpg 1248X624 px

jpg  2021-02-16_124848.jpg (97.05 KB)
1124_602b4ebfa647b.jpg 956X630 px

發表於: 2021/2/16 12:32

Edited by clkent on 2021年02月16日 12:47:32
Edited by clkent on 2021年02月16日 12:49:16
Edited by clkent on 2021年02月16日 12:49:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問MPLABx如何於Debug時可看到EEprom的更新?
#5
資深會員
資深會員


查看用戶資訊
Dear Ryang :

了解, 因需像flash一樣也需逐筆資料寫及開機判斷,所以才會需有清除的動作.

謝謝.

發表於: 2021/1/29 16:43
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問MPLABx如何於Debug時可看到EEprom的更新?
#4
版主
版主


查看用戶資訊
EEPROM 的寫入不須先做清除的動作,不像 Flash Memory 要先做清除的動作。

EEPROM 可以用開發工具做 Erase All 的動作時可以清除 EEPROM 的資料成 0xFF。
EEPROM Window 的資料是可以修改的,只要將鼠標移到該資料上蟄居修改或按老鼠的右鍵可將整個 EEPROM 的資料輸出或讀入一個 Hex 檔。

Attach file:



jpg  擷取.JPG (44.63 KB)
16_6013748cba6a4.jpg 441X509 px

發表於: 2021/1/29 10:35
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問MPLABx如何於Debug時可看到EEprom的更新?
#3
資深會員
資深會員


查看用戶資訊
Dear Ryang :

那EEprom有一次全部清除的指令?

謝謝.

發表於: 2021/1/29 9:30
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問MPLABx如何於Debug時可看到EEprom的更新?
#2
版主
版主


查看用戶資訊
先確認一下所使用的元件有內建的 EEPROM。
要在 X IDE 下查看 EEPROM 的資料可以參考底下的圖示:
先到"window" 下,開啟 EEPROM 視窗即可修改資料及讀值。

Attach file:



jpg  擷取.JPG (90.17 KB)
16_60127819b85b1.jpg 704X650 px

發表於: 2021/1/28 16:38
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問MPLABx如何於Debug時可看到EEprom的更新?
#1
資深會員
資深會員


查看用戶資訊
Dear All :

如題,

MPALBx : V5.45
MCU : PIC18F66K40
ICE : ICD4
WRTD : OFF

謝謝.

發表於: 2021/1/26 13:37
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... ]

教育訓練中心

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