Basic Toggle Control 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_toggle(pin_b0);
delay_ms(100);
while(!input(pin_a0));
}     
}
}




READ  Forverse - Reverse Control For CSS Compiler

Leave a Comment

*
= 5 + 7

Read previous post:
Interfacing Servo Motor with PIC Microcontroller – MPLAB XC8
Interfacing Servo Motor with PIC Microcontroller – MPLAB XC8

Servo Motor is an ordinary geared dc motor equipped with closed loop servo mechanism which uses position feedback to control...

Close
Scroll to top