简单程序,12f675仿真不正确,请各位大虾指教,程序如下:
list p=12f675
include <P12F675.INC>
org 0x00 reset movwf OSCCAL goto start
org 0x04 start bsf STATUS,RP0 movlw 0x00 movwf OPTION_REG clrf ANSEL movlw 0x18 movwf TRISIO bcf STATUS,RP0 clrf INTCON clrf GPIO comf GPIO movlw 0x07 movwf CMCON ; loop goto loop end
期望: TRISIO : 0x18 GPIO : 0xff 结果: TRISIO : 0x08 GPIO : 0x14 仿真工具为MPLAB7.60,请各位大虾指点迷津,谢谢! |