LIST P=16F84 RADIX HEX START clrf PORTA STATUS equ 03 PORTA equ 05 TRISA equ 85 PORTB equ 06 TRISB equ 86 X equ 0C ; INICIALIZO REGISTROS START clrf PORTA clrf PORTB clrf X ; ; CONFIGURO PUERTOS SAVE bsf STATUS,5 MOVLW B’01111’ MOVWF TRISA MOVLW B’00001111’ MOVWF TRISB bcf STATUS,5 MOVF PORTA,W MOVWF X BTFCS X,0 GOTO MUESTRA01 GOTO MUESTRA00 MUESTRA01 MUESTRA00 BITT1 MUESTRA10 MUESTRA11 BITT2 MUESTRA20 MOVLW B’00010000’ MOVWF PORTB GOTO BITT1 MOVLW B’00000000’ MOVWF PORTB GOTO BITT1 BTFCS X,1 GOTO MUESTRA11 GOTO MUESTRA10 MOVLW B’00000000’ MOVWF PORTB GOTO BITT2 MOVLW B’00100000’ MOVWF PORTB GOTO BITT2 BTFCS X,2 GOTO MUESTRA21 GOTO MUESTRA20 MOVLW B’00000000’ MUESTRA21 BITT3 MUESTRA30 MUESTRA31 SUMA MOVWF PORTB GOTO BITT3 MOVLW B’01000000’ MOVWF PORTB GOTO BITT3 BTFCS X,3 GOTO MUESTRA11 GOTO MUESTRA10 MOVLW B’00000000’ MOVWF PORTB GOTO SAVE MOVLW B’10000000’ MOVWF PORTB GOTO SAVE MOVF PORTA,W MOVWF X INCF X INCF X GOTO SAVE