Re: 不知如何做位元判斷... 16f877
|
||||
---|---|---|---|---|
版主
|
建議你看一下 W100 的組合語言入門教材,了解他會對你有很大的幫助的。
http://www.microchip.com.tw/modules/w ... nglefile.php?cid=4&lid=24 奇怪總覺得一直叫人家看書!
發表於: 2009/12/21 14:00
|
|||
|
Re: 不知如何做位元判斷... 16f877
|
||||
---|---|---|---|---|
資深會員
|
簡易範例如下,請參考:
LIST P=16F877A,R=DEC #include <p16f877a.inc> var1 equ 0x20 org 0x00 goto main org 0x04 retfie main: banksel var1 movlw 0x01 movwf var1 bit_test: btfss var1,0 goto bit0is0 goto bit0is1 bit0is0: goto $ bit0is1: movlw 0x00 movwf var1 goto bit_test end
發表於: 2009/12/20 8:50
|
|||
不怕苦...苦半輩子;怕苦...苦一輩子
|
||||
|
不知如何做位元判斷... 16f877
|
||||
---|---|---|---|---|
新會員
|
date EQU 0
no EQU 0x21 MOVLW B'11111111' MOVWF no test btfsc no,date . . . incf date goto test 很顯然btfsc no,date是錯的 請問有甚麼方法可以讓btfsc的date 判斷單一位元呢 我下次很大的迴圈回來後需要做0~7的判斷
發表於: 2009/12/20 1:14
|
|||
|