Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include p18f87k22.inc
- bcf INTCON2, RBPU ;rezystory ustawiane indywidualnie
- ;bcf TRISB, RB5 ;gaszenie nieuzywanych LED
- ;bcf TRISB, RB4
- ;bcf PORTB, RB5
- ;bcf PORTB, RB4
- bsf TRISB, RB0 ; rezystor podciagajacy dla przycisku - PB0 jako wejscie
- clrf PORTB
- clrf PORTE
- clrf PORTA
- bcf TRISB, RB5; porte rb5 wyjscie
- bcf TRISB, RB4 ; porte rb4 wyjscie
- bcf TRISA, RA5 ; porte ra5 wyjscie
- bcf TRISE, RE7 ; porte re7 wyjscie
- bcf TRISE, RE6 ; porte re6 wyjscie
- bcf TRISE, RE5 ; porte re5 wyjscie
- bcf TRISE, RE4 ; porte re4 wyjscie
- et: btfss PORTB, RB0
- goto etz
- goto et
- etz:
- btg PORTB, RB5
- ett:
- btfss PORTB, RB0
- goto ett
- goto et1
- et1: btfss PORTB, RB0
- goto etz1
- goto et1
- etz1:
- btg PORTB, RB4
- ett1:
- btfss PORTB, RB0
- goto ett1
- goto et2
- et2: btfss PORTB, RB0
- goto etz2
- goto et2
- etz2:
- btg PORTA, RA5
- ett2:
- btfss PORTB, RB0
- goto ett2
- goto et3
- et3: btfss PORTB, RB0
- goto etz3
- goto et3
- etz3:
- btg PORTE, RE7
- ett3:
- btfss PORTB, RB0
- goto ett3
- goto et4
- et4: btfss PORTB, RB0
- goto etz4
- goto et4
- etz4:
- btg PORTE, RE6
- ett4:
- btfss PORTB, RB0
- goto ett4
- goto et5
- et5: btfss PORTB, RB0
- goto etz5
- goto et5
- etz5:
- btg PORTE, RE5
- ett5:
- btfss PORTB, RB0
- goto ett5
- goto et6
- et6 btfss PORTB, RB0
- goto etz6
- goto et6
- etz6:
- btg PORTE, RE4
- ett6:
- btfss PORTB, RB0
- goto ett6
- goto gasswiat
- gasswiat:
- btg PORTB, RB5
- btg PORTB, RB4
- clrf PORTA
- btg PORTE, RE7
- btg PORTE, RE6
- btg PORTE, RE5
- btg PORTE, RE4
- goto et
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement