Forverse – Reverse Control For CSS Compiler
#include <16F877.h> #device adc=8 #FUSES NOWDT ,XT #use delay(clock=4000000) void main() { setup_adc_ports(NO_ANALOGS); setup_adc(ADC_OFF); set_tris_a(0xff); set_tris_b(0x00); output_b(0x00); while(true){ if(!input(pin_a0)){ output_high(pin_b0); output_low(pin_b1); delay_ms(100); while(!input(pin_a0));} else if(!input(pin_a1)){ output_low(pin_b0); output_high(pin_b1); delay_ms(100); while(!input(pin_a1));} else if(!input(pin_a2)){ output_low(pin_b0); output_low(pin_b1); delay_ms(100); while(!input(pin_a2));} else{ } } }
Forverse – Reverse Control For CSS Compiler Read More Β»