Program:
#include P18F452.INC
R1 EQU 0X07
R2 EQU 0X08
ORG 0
CLRF TRISB
L3 MOVLW 0X3F
MOVWF PORTB
CALL QDELAY
MOVLW 0X06
MOVWF PORTB
CALL QDELAY
MOVLW 0X5B
MOVWF PORTB
CALL QDELAY
MOVLW 0X4F
MOVWF PORTB
CALL QDELAY
MOVLW 0X66
MOVWF PORTB
CALL QDELAY
MOVLW 0X6D
MOVWF PORTB
CALL QDELAY
MOVLW 0X7D
MOVWF PORTB
CALL QDELAY
MOVLW 0X07
MOVWF PORTB
CALL QDELAY
MOVLW 0X7F
MOVWF PORTB
CALL QDELAY
MOVLW 0X6F
MOVWF PORTB
CALL QDELAY
GOTO L3
QDELAY MOVLW D'200'
MOVWF R1
D1 MOVLW D'250'
MOVWF R2
D2 NOP
NOP
DECF R2,F
BNZ D2
DECF R1,F
BNZ D1
RETURN
END
#include P18F452.INC
R1 EQU 0X07
R2 EQU 0X08
ORG 0
CLRF TRISB
L3 MOVLW 0X3F
MOVWF PORTB
CALL QDELAY
MOVLW 0X06
MOVWF PORTB
CALL QDELAY
MOVLW 0X5B
MOVWF PORTB
CALL QDELAY
MOVLW 0X4F
MOVWF PORTB
CALL QDELAY
MOVLW 0X66
MOVWF PORTB
CALL QDELAY
MOVLW 0X6D
MOVWF PORTB
CALL QDELAY
MOVLW 0X7D
MOVWF PORTB
CALL QDELAY
MOVLW 0X07
MOVWF PORTB
CALL QDELAY
MOVLW 0X7F
MOVWF PORTB
CALL QDELAY
MOVLW 0X6F
MOVWF PORTB
CALL QDELAY
GOTO L3
QDELAY MOVLW D'200'
MOVWF R1
D1 MOVLW D'250'
MOVWF R2
D2 NOP
NOP
DECF R2,F
BNZ D2
DECF R1,F
BNZ D1
RETURN
END
Comments
Post a Comment