各位老师,刚学PIC,自己编了第一个程序,就出现了问题,请帮忙,谢谢/。 list p=16f877A #include <p16F877A.inc> cblock 0x20 count1 count2 endc org 00 nop goto main org 10 main: banksel trisa bcf trisa,1 movlw b'11111111' banksel porta movwf porta call delay movlw 0x00 movwf porta call delay goto main delay: movlw 0x4 movwf count1 movwf count2
loop: decfsz count2,f GOTO loop loop1: decfsz count1,f goto loop1 return end 我把PORTA的第2个PIN RA1高为输出,可再对PORTA整体写入11111111,可PORTA为0,不是00000001,,,奇怪了。。谢谢 |