Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

EXO3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

LIST P=16F877A

#include<p16F877A.inc>

CNT EQU H'20'

BSF STATUS,RP0

BCF STATUS,RP1

CLRF TRISD

BCF STATUS,RP0

L1

MOVLW b'10000001'

MOVWF PORTD

CALL TEMPO

CALL TEMPO

MOVLW b'11000011'

MOVWF PORTD

CALL TEMPO

CALL TEMPO

MOVLW b'11100111'

MOVWF PORTD

CALL TEMPO

CALL TEMPO

MOVLW h'FF'

MOVWF PORTD

CALL TEMPO

CALL TEMPO

CLRF PORTD

CALL TEMPO

CALL TEMPO

MOVLW D'2'

MOVWF CNT
L2

MOVLW h'FF'

MOVWF PORTD

CALL TEMPO

MOVLW h'00'

MOVWF PORTD

CALL TEMPO

DECFSZ CNT

GOTO L2

MOVLW b'11000000'

MOVWF PORTD

CALL TEMPO

CALL TEMPO

MOVLW b'11110000'

MOVWF PORTD

CALL TEMPO

CALL TEMPO

MOVLW b'11111100'

MOVWF PORTD

CALL TEMPO

CALL TEMPO

MOVLW h'FF'

MOVWF PORTD

CALL TEMPO

CALL TEMPO

GOTO L1

TEMPO

MOVLW h'31'

MOVWF T1CON
MOVLW H'7E'

MOVWF TMR1H

MOVLW H'96'

MOVWF TMR1L

BCF PIR1,TMR1IF

L200

BTFSS PIR1,TMR1IF

GOTO L200

RETURN

END

You might also like