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


Browsing this Thread:   1 Anonymous Users






Re: 自行宣告變數如何顯現在 watch 視窗 ?
#10
新會員
新會員


查看用戶資訊
可以正常用了
謝謝

發表於: 2023/3/3 13:26
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 自行宣告變數如何顯現在 watch 視窗 ?
#9
管理員
管理員


查看用戶資訊
fa0013你好,之前提供的程式碼略有錯誤,由於PIC16F1823的RAM記憶體位址由0x20開始編排,記憶體空間的起始位置需指定在範圍內,如下圖:
縮圖

請參考以下程式碼:
OUTPC EQU LATC
udata 0x20
AAA  RES 1
I    RES 3


關於查看 RAM MEMORY 的需求,可以使用 MPLAB X IDE 中的 Windows -> Target Memory Views -> File Registers 工具,可以即時查看目前 RAM MEMORY 的狀態,雙擊欄位亦可即時修改數值。
縮圖

縮圖

Attach file:



jpg  Memory_Map.jpg (382.38 KB)
123092_63f49f67c9518.jpg 1163X750 px

jpg  Target_Memory_Views.jpg (52.71 KB)
123092_63f49f8da8c32.jpg 414X584 px

jpg  File_Registers.jpg (133.08 KB)
123092_63f4a014248c2.jpg 972X985 px

發表於: 2023/2/21 18:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 自行宣告變數如何顯現在 watch 視窗 ?
#8
新會員
新會員


查看用戶資訊
1)將 EQU 改為 RES之後,WATCH 可以看到,但是程式執行時,卻沒有改變,value 還是維持 0x00,請問還要改哪裡?
2)請問 MLAB X IDE,如何操作到可以即時看到 RAM MEMORY 的數值與變化,同時也能看到 CPU 暫存器內的 value 數值。
因為在 debug 程式時,在程式的片段修改以上的數值,可以考慮到未來的狀況而輸入修改數值,讓 debus 功能更完整。
其他家 MCU 的 IDE 都有這種功能,同時將 C Disassembly 時,也可以看到每一行 asm 執行時的暫存器變化,直接學習組合語言與暫存器之間的關係,省卻看 datasheet 的步驟,也是進入不同的 MCU 世界最快速的方法。
謝謝

Attach file:



jpg  asm-Watch_230220.jpg (152.17 KB)
50242_63f2e0777b0ff.jpg 1204X637 px

發表於: 2023/2/20 10:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 自行宣告變數如何顯現在 watch 視窗 ?
#7
管理員
管理員


查看用戶資訊
fa0013你好,請參考以下程式碼宣告變數:
OUTPC EQU LATC
udata 0x20
AAA  RES 1
I    RES 3


EQU指令作用為定義常數至指定標籤,類似於C語言中的 #define,組譯器不會因此建立符號,IDE也就無法找到該符號。

發表於: 2023/2/17 10:22

Edited by KevinLu on 2023年02月21日 18:08:35
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 自行宣告變數如何顯現在 watch 視窗 ?
#6
新會員
新會員


查看用戶資訊
使用 MPLAB X IDE v5.35
自行宣告變數 "AAA", "I", "OUTPC"
其中宣告
OUTPUTC EQU LATC
都無法拉到 watches windows
如何解??

ORG 0
AAA EQU 1
I EQU 3
OUTPC EQU LATC

CODE
ORG 10H
START:
BANKSEL 0

MOVLW 12
MOVWF AAA
MOVLW #0x10 ;bit4 = 1
BANKSEL LATC
MOVWF OUTPC
MOVLW #0x2F ;bit4 = out

BANKSEL TRISC
MOVWF TRISC ; = 0x8E
; MOVWF 0x8E
NOP
NOP
NOP
NOP


GOTO START
END

Attach file:



jpg  WATCH.jpg (107.71 KB)
50242_63edfcce44edd.jpg 851X695 px

發表於: 2023/2/16 17:37

Edited by fa0013 on 2023年02月16日 17:52:56
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 自行宣告變數如何顯現在 watch 視窗 ?
#5
版主
版主


查看用戶資訊
EQU 所宣告的文字可為變數或常數,全看所使用的指令。
如為變數,直接拖到 watch window 就可以顯示其內容值;如果是常數的話因為不是 RAM 所以內容執會顯示 0x00。

校正常顯示 watch window 的數值,先決條件就是編譯一定要成功,刻意用單部執行或設斷點執行停下後觀察 Watch Window。

發表於: 2009/1/16 10:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 自行宣告變數如何顯現在 watch 視窗 ?
#4
中級會員
中級會員


查看用戶資訊
只是簡單宣告......
counter equ 0x20
flag equ 0x21
:
:
:

發表於: 2009/1/15 11:18
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 自行宣告變數如何顯現在 watch 視窗 ?
#3
版主
版主


查看用戶資訊
Watch Window 顯示變數依職都很正常的運作,不知道你是怎樣宣告變數的?
udata, res ?
Cbolok & endc ?
equ or set ? 等虛指令

發表於: 2009/1/14 13:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 自行宣告變數如何顯現在 watch 視窗 ?
#2
中級會員
中級會員


查看用戶資訊
今天 Linker Script 的 16f687.lnk Remove 掉
Add Symbol 即被激活而能正常顯示自行宣告變數
請各位先進指教, 如何修改 16f687.lnk 敘述
才能在有 16f687.lnk 下仍能正常顯示自行宣告變數值

發表於: 2009/1/12 16:13
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


自行宣告變數如何顯現在 watch 視窗 ?
#1
中級會員
中級會員


查看用戶資訊
請問 MPLAB WATCH 視窗中用滑鼠反白拉下之自行宣告變數
在 Value 欄出現 Symbol Not Fount 無法觀察其值變化, 請問
該如何排除才能觀看到變數內容值 ?
系統定義好的 SFR 正常 ......

發表於: 2009/1/9 10:39
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... ]

教育訓練中心

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