Professional Documents
Culture Documents
Btacendeled
Btacendeled
c
/*==============================================================================
===================================
PROGRAMA DESENVOLVIDO "Gerson Soares de Souza N9 4L Noite "
DATA 24/10/2013
PROGRAMA BOTAO ACENDE 1 LED " linguagem C"
Prof " Alexandre - Microcontroladores "
================================================================================
=================================*/
#include<16f877a.h>
#fuses xt,nowdt,put,nolvp,nobrownout
#use delay(clock=4000000)
void main(){
while (TRUE){
if (input(PIN_A0)){
delay_ms (75);
output_high (PIN_B1);
output_high (PIN_B1);
}
else{
output_low (PIN_B1);
output_low (PIN_B1);
}
}
}
Pgina 1