HJY
HJY
HJY
#include<p16F877A.inc>
BSF STATUS,RP0
MOVWF PORTD
BCF STATUS,RP1
L3
MOVLW b'11111111'
CALL TEMPO1
MOVWF TRISB
RLF PORTD
CLRF TRISD
GOTO L3
BCF STATUS,RP0
TEMPO1
BCF STATUS,RP1
MOVLW h'31'
CLRF PORTD
MOVWF T1CON
BTFSS PORTB,1
MOVLW H'0B'
GOTO L1
MOVWF TMR1H
MOVLW b'00000001'
MOVLW H'DC'
MOVWF PORTD
MOVWF TMR1L
L2
BCF PIR1,TMR1IF
CALL TEMPO
L201
RRF PORTD
BTFSS PIR1,TMR1IF
GOTO L2
GOTO L201
TEMPO
RETURN
MOVLW h'31'
END
MOVWF T1CON
MOVLW H'0B'
MOVWF TMR1H
MOVLW H'DC'
MOVWF TMR1L
BCF PIR1,TMR1IF
L200
BTFSS PIR1,TMR1IF
GOTO L200
RETURN
L1
MOVLW b'10000000'