Dış Kesme RB0 ccs comiler pic programlama
#include<16f877a.h>
#fuses xt,nowdt,noprotect,nobrownout,nolvp,noput,nodebug
#use delay(clock=4m)
#use fast_io(b)
int i;
#int_ext
void diskesme()
{
output_high(pin_b1);
delay_ms(200);
output_low(pin_b1);
delay_ms(200);
for(i=0;i<5;i++)
{
output_high(pin_b1);
delay_ms(200);
output_low(pin_b1);
delay_ms(200);
}
}
void main()
{
setup_timer_0(rtcc_internal | rtcc_div_1);
set_tris_b(0x01);
output_b(0x00);
ext_int_edge(h_to_l);
enable_interrupts(int_ext);
enable_interrupts(global);
while(true)
{
}
}
Hiç yorum yok:
Yorum Gönder
Her yorum bilgidir. Araştırmaya devam...