Baixe o app para aproveitar ainda mais
Prévia do material em texto
Led L1 pisque a cada 3 segundos Led L2 pisque a cada 5 segundos TDELAY1 = 1,5µ.255.255.x=3 TDELAY1 = x=31 31 / 16 0x1F 15 1 TDELAY2 = 1,5.µ.255.255y=5 TDELAY2 = 51 51 / 16 0x33 3 3 BSF STATUS, RP0 MOVLW 0x00 MOVWF TRISA MOVLW 0x00 MOVWF TRISB BCF STATUS, RP0 INICIO BSF PORTB, 3 CALL DELAY1 BCF PORTB, 3 CALL DELAY1 GOTO INICIO BSF PORTB, 6 CALL DELAY2 BCF PORTB, 6 CALL DELAY2 GOTO INICIO DELAY1 MOVLW 0xFF MOVWF 0x20 VSET1 MOVLW 0xFF MOVWF 0x21 VSET2 MOVLW 0x1F MOVWF 0x22 LOOP1 DECFSZ 0x22 GOTO LOOP1 DECFSZ 0x21 GOTO VSET2 DECFSZ 0x20 GOTO VSET1 RETURN DELAY2 MOVLW 0xFF MOVWF 0x23 VSET3 MOVLW 0xFF MOVWF 0x24 VSET4 MOVLW 0x33 MOVWF 0x25 LOOP2 DECFSZ 0x25 GOTO LOOP2 DECFSZ 0x24 GOTO VSET4 DECFSZ 0x23 GOTO VSET3 RETURN END
Compartilhar