yazdığım program preuteusta calışıyor fakat uygulamada kesme yapıyor.program aşağıda ilgilenirseniz çok sevinirim.
#include <18f2455.h>
#fuses XT,NOWDT,NOPROTECT,NOBROWNOUT,NOLVP,NOPUT,NOWRT,NODEBUG,NOCPD
#use delay (clock=4000000)
#use rs232 (baud=9600, xmit=pin_C6, rcv=pin_c7, parity=N, stop=1)
#use fast_io(b)
#use fast_io(a)
#define zaman 1000
char klavye[1];
int i;
#int_rda
void serihaberlesme_kesmesi ()
{
disable_interrupts(int_rda);
output_high(pin_a0);
gets(klavye);
i=0;
switch(klavye){
case 'a':
output_b(0xf0);
delay_ms(3000);
output_b(0x00);
break;
}
output_low(pin_a0);
delay_ms(zaman);
}
void main ( )
{
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_CCP1(CCP_OFF);
setup_CCP2(CCP_OFF);
set_tris_a(0xf0);
set_tris_b(0x00);
output_b(0x00);
output_low(pin_a0);
while(true){
enable_interrupts(GLOBAL);
enable_interrupts(int_rda);
output_b(0xff);
delay_ms(zaman);
output_b(0x00);
delay_ms(zaman);
output_high(pin_a1);
delay_ms(zaman);
output_low(pin_a1);
delay_ms(zaman);
output_high(pin_a2);
delay_ms(zaman);
output_low(pin_a2);
delay_ms(zaman);
}
}