kbaser
Joined: 26 Jul 2009 Posts: 5
|
int_rda calls forever |
Posted: Sun Mar 21, 2010 9:32 am |
|
|
Please help,
I wrote a simple Rx counter code.
I expected to see each RX activity, but unfortunately this call executes every cycle of CPU and counts forver!
What can I do to call this isr when RX comes ?
Code: |
#include <16F688.H>
#fuses INTRC_IO, NOWDT, NOPROTECT, PUT,NOMCLR
#use delay(clock = 8000000)
#use rs232 (baud=19200, rcv=pin_c5, xmit=pin_c4, parity=N, stop=1,Errors)
#include "flex_lcd420_688.c"
#include "stdlib.h"
int counter;
#int_rda
void comm_test ()
{
counter= counter +1;
lcd_gotoxy(1,1);
printf(lcd_putc,"int_rda : %d ",counter);
}
void main() {
lcd_init();
enable_interrupts(int_rda);
enable_interrupts(GLOBAL);
while(true) {}
}
|
please help |
|