Basic input-output For CSS Compiler

 
#include <16F877.h>
#device adc=8
#FUSES NOWDT ,XT                                        
#use delay(clock=4000000)

void main()
{
   set_tris_a(0xff);   
   set_tris_b(0x00);
   setup_adc_ports(NO_ANALOGS);
   setup_adc(ADC_OFF);
   output_b(0x00);

while(true){
  if(!input(pin_a0)){ 
       output_b(0xff);
       delay_ms(100);}
  if(!input(pin_a1)){ 
       output_b(0x00);
       delay_ms(100);}

  }
}

About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.

Follow Us:
LinkedinTwitter