简单的pic单片机程序 求解析 最好详细一点 LIST P=16f877 #i
简单的pic单片机程序求解析最好详细一点LISTP=16f877#include"p16f877.inc"__CONFIG3F39HSTATUSEQU03HTRISDEQ...
简单的pic单片机程序 求解析 最好详细一点
LIST P=16f877
#include"p16f877.inc"
__CONFIG 3F39H
STATUS EQU 03H
TRISD EQU 88H
PORTD EQU 08H
ORG 0000H
NOP
ST BSF STATUS,5
CLRF TRISD
TTTT BCF STATUS,5
MOVLW B'00001111'
MOVWF PORTD
CALL DELAY1S
MOVLW B'11110000'
MOVWF PORTD
CALL DELAY1S
NOP
GOTO TTTT
DELAY1S MOVLW 06H
MOVWF 20H
LOP0 MOVLW 0EBH
MOVWF 21H
LOP1 MOVLW 0ECH
MOVWF 22H
LOP2 DECFSZ 22H
GOTO LOP2
DECFSZ 21H
GOTO LOP1
DECFSZ 20H
GOTO LOP0
RETURN
END 展开
LIST P=16f877
#include"p16f877.inc"
__CONFIG 3F39H
STATUS EQU 03H
TRISD EQU 88H
PORTD EQU 08H
ORG 0000H
NOP
ST BSF STATUS,5
CLRF TRISD
TTTT BCF STATUS,5
MOVLW B'00001111'
MOVWF PORTD
CALL DELAY1S
MOVLW B'11110000'
MOVWF PORTD
CALL DELAY1S
NOP
GOTO TTTT
DELAY1S MOVLW 06H
MOVWF 20H
LOP0 MOVLW 0EBH
MOVWF 21H
LOP1 MOVLW 0ECH
MOVWF 22H
LOP2 DECFSZ 22H
GOTO LOP2
DECFSZ 21H
GOTO LOP1
DECFSZ 20H
GOTO LOP0
RETURN
END 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询