• 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: 請問各位先進一個程式判斷的問題
#4
版主
版主


查看用戶資訊
這裡有PIC18Fxxxx的中文版的指令說明。
http://www.microchip.com.tw/files/PIC18_Instruction.doc

發表於: 2007/9/17 14:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問各位先進一個程式判斷的問題
#3
新會員
新會員


查看用戶資訊
謝謝這位先進~~
請問有沒有合適的方法呢~??
請問可以教我嗎??~~~謝謝

發表於: 2007/9/14 17:57
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問各位先進一個程式判斷的問題
#2
資深會員
資深會員


查看用戶資訊
你沒弄清楚 cpfseq 這個指令的用報

cpfseq f, [a]

f: 表示 8-bit register file address (0x00 to 0xFF).
a: 表示 RAM access bit

你弄錯指令功能了

發表於: 2007/9/14 17:24
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問各位先進一個程式判斷的問題
#1
新會員
新會員


查看用戶資訊
我有寫了一段程式如下:
step0_1

movlw b'00000000' <----------這為一個變數
cpfseq b'00000000'
bra step1_1
btfss HALL_OPEN,0
return
incf BEMFD_ERROR
sublw 0x05
btfss STATUS,Z
bra BEMF
call TIMER1_INT
return

step1_1

cpfseq b'00000010'
bra step2_1
btfsc LOCK_STEP,1
bra BEMF
call complete
bra BEMF

step2_1

cpfseq b'00000011'
bra step3_1
btfsc LOCK_STEP,2
bra BEMF
call complete
bra BEMF

step3_1

cpfseq b'00000001'
bra step4_1
btfsc LOCK_STEP,3
bra BEMF
call complete
bra BEMF

step4_1

cpfseq b'00000101'
bra step5_1
btfsc LOCK_STEP,4
bra BEMF
call complete
bra BEMF

step5_1

cpfseq b'00000100'
bra step6_1
btfsc LOCK_STEP,5
bra BEMF
call complete
bra BEMF

step6_1

cpfseq b'00000110'
bra step7_1
btfsc LOCK_STEP,6
bra BEMF
call complete
bra BEMF

step7_1

cpfseq b'00000111'
bra step0_1
btfss HALL_OPEN,0
return
incf BEMFD_ERROR
sublw 0x05
btfss STATUS,Z
bra BEMF
call TIMER1_INT
return

在上面那個變數用上面的數,程式可以正去判別該跑的位置.可是我如果將它改變為其他,如:b'00000010';b'00000011';b'00000001'.........等.就會無法判斷該在哪個step裡面動作~~請問我這個程式的問題有可能為何~~我試了很多方式都沒用~~麻煩摟~~~謝謝

發表於: 2007/9/14 16:21
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... ]

教育訓練中心

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