@ ;__config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRT_ON & _MCLR_OFF & _LVP_OFF & _PROTECT_ON & _BOD_OFF TRISB=%11111111 TRISA=%00011100 PORTA=0 CMCON=7 OPTION_REG.7=0 R var PORTA.2 '3 FAZ KONTROL S var PORTA.3 '3 FAZ KONTROL T var PORTA.4 '3 FAZ KONTROL SW0 var PORTB.0 'KAT 0 SWİCH SW1 var PORTB.1 'KAT 1 SWİCH SW2 var PORTB.2 'KAT 2 SWİCH SW3 var PORTB.3 'KAT 3 SWİCH KT0 var PORTB.7 'KAT 0 BUTON KT1 var PORTB.6 'KAT 1 BUTON KT2 var PORTB.5 'KAT 2 BUTON KT3 var PORTB.4 'KAT 3 BUTON IN VAR PORTA.0 'MOTOR İNİŞ CIK VAR PORTA.1 'MOTOR ÇIKIŞ PAUSE 200 BUTON: IN=0 CIK=0 IF KT0=1 THEN KAT0 IF KT1=1 THEN KAT1 IF KT2=1 THEN KAT2 IF KT3=1 THEN KAT3 GOTO BUTON KAT0: IF SW0=1 AND R=1 AND S=1 AND T=1 THEN IN=1 ENDIF IF SW0=0 THEN BUTON GOTO KAT0 KAT1: IF SW0=1 THEN SVC1 IF SW2=1 OR SW3=1 THEN SWIN1 GOTO BUTON KAT2: IF SW0=1 OR SW1=1 THEN SVC2 IF SW3=1 THEN SWIN2 GOTO BUTON KAT3: IF SW3=1 AND R=1 AND S=1 AND T=1 THEN CIK=1 ENDIF IF SW3=0 THEN BUTON GOTO KAT3 SVC1: IF R=1 AND S=1 AND T=1 THEN CIK=1 ENDIF IF SW1=0 THEN BUTON GOTO SVC1 SVC2: IF R=1 AND S=1 AND T=1 THEN CIK=1 ENDIF IF SW2=0 THEN BUTON GOTO SVC2 SWIN1: IF R=1 AND S=1 AND T=1 THEN IN=1 ENDIF IF SW1=0 THEN BUTON GOTO SWIN1 SWIN2: IF R=1 AND S=1 AND T=1 THEN IN=1 ENDIF IF SW2=0 THEN BUTON GOTO SWIN2 END