• 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: 初學者請教組譯問題
#3
初級會員
初級會員


查看用戶資訊
Message[305] E:\MY DOCUMENTS\PICEX\4-8_SPK.ASM 28 : Using default destination of 1 (file).
假設指令是 DECF COUNT,F
上面你可以決定COUNT減一後要放到本身暫存器,或者是W暫存器。你的程式可能沒有指定他會使用預設,F;就是減一的值會放回本身如果我沒有記錯的話.你可以在該訊息連點滑鼠兩下
他會告訴你出錯的地方。

發表於: 2005/4/22 23:37
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 初學者請教組譯問題
#2
版主
版主


查看用戶資訊
Microchip的組合語言有兩種語法;

1. 獨立式語法,單獨一個程式組成,用 ORG 定程式執行位址,用 equ 或 cblock 定 RAM的位址。
你用 ORG 定 RAM 位址當然會產生錯誤。

2. 可重新定位語法,這種寫法比較難,不適合初學著使用。

P=16F54
        
#INCLUDE <P16F5X.INC>
        
cblock    0x06
        SPK_PORT
,DEL1,DEL2         
        PITCH
,INDEX 
        COUNT 
        COUNT2 
        endc
;
        
ORG     0x1FF
EQUET
:         GOTO     START
;
        
ORG     0x000
START
:         MOVLW     0x02
        OPTION
        MOVLW 0
        TRIS SPK_PORT

發表於: 2005/4/12 17:10
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


初學者請教組譯問題
#1
新會員
新會員


查看用戶資訊
下列程式使用RES會出現
Error - section '.org_2' can not fit the absolute section. Section '.org_2' start=0x00000000, length=0x00000070
原程式如下:
P=16F54
#INCLUDE <P16F5X.INC>
SPK_PORT EQU 06H
ORG 08H
DEL1 RES 1
DEL2 RES 1
PITCH RES 1
INDEX RES 1
COUNT RES 1
COUNT2 RES 1
ORG 1FFH
EQUET: GOTO START
ORG 0X000
START: MOVLW 0X02
OPTION
MOVLW 0
TRIS SPK_PORT
但是將RES改用EQU就沒問題....Why?

另,組譯時出現下列訊息是什麼?
Message[305] E:\MY DOCUMENTS\PICEX\4-8_SPK.ASM 28 : Using default destination of 1 (file).

發表於: 2005/4/12 14:56
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... ]

教育訓練中心

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