Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include p18f87k22.inc
- init:
- bcf INTCON2, RBPU ;rezystory ustawiane indywidualnie
- clrf PORTE
- clrf PORTA
- clrf PORTB
- bsf TRISB, RB0 ; rezystor podciagajacy dla przycisku - PB0 jako wejscie
- bcf TRISB, RB5 ;gaszenie nieuzywanych LED
- bcf TRISB, RB4
- bcf PORTB, RB5
- bcf PORTB, RB4
- bcf TRISE, RE4 ; porte re7 wyjscie
- bcf TRISE, RE5 ;
- bcf TRISE, RE6 ;
- bcf TRISE, RE7 ;
- bcf TRISA, RA5 ;
- bcf TRISB, RB4 ;
- bcf TRISB, RB5 ;
- initwcis:
- btfsc PORTB,RB0
- goto et
- goto initwcis
- et: btfss PORTB, RB0
- goto et1
- goto et
- et1:
- btg PORTE,RE4
- et1wcis:
- btfsc PORTB,RB0
- goto et11
- goto et1wcis
- et11:
- btfss PORTB, RB0
- goto et2
- goto et11
- et2:
- btg PORTE,RE5
- et2wcis:
- btfsc PORTB,RB0
- goto et22
- goto et2wcis
- et22:
- btfss PORTB, RB0
- goto et3
- goto et22
- et3:
- btg PORTE,RE6
- et3wcis:
- btfsc PORTB,RB0
- goto et33
- goto et3wcis
- et33:
- btfss PORTB, RB0
- goto et4
- goto et33
- et4:
- btg PORTE,RE7
- et4wcis:
- btfsc PORTB,RB0
- goto et44
- goto et4wcis
- et44:
- btfss PORTB, RB0
- goto et5
- goto et44
- et5:
- btg PORTA,RA5
- et5wcis:
- btfsc PORTB,RB0
- goto et55
- goto et5wcis
- et55:
- btfss PORTB, RB0
- goto et6
- goto et55
- et6:
- btg PORTB,RB4
- et6wcis:
- btfsc PORTB,RB0
- goto et66
- goto et6wcis
- et66:
- btfss PORTB, RB0
- goto et7
- goto et66
- et7:
- btg PORTB,RB5
- et7wcis:
- btfsc PORTB,RB0
- goto et77
- goto et7wcis
- et77:
- btfss PORTB, RB0
- goto init
- goto et77
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement