ending interrupt

Started by uzay1983 August 20, 2005
Hi everybody;

I've written a code for uart but the problem is that when
SIGNAL(SIG_UART_RECV) interrupt begins, it will never end ,and
microcontroller is remaining in SIGNAL(SIG_UART_RECV). The basic
purpose is sending data and receving data. the key is sent which is
obtained from return_key function. And any data gets but when data is
received , I want to do an interrupt in order to get the data .
Altough interrupt occurs successfully, it never ends and
microcontroller remains in SIGNAL (SIG_UART_RECV). For this reason it
only gets receiving . How can be this inturrupt broken and prog goes
on its way correctly or is anything wrong. The code is below. I'm
waiting your helps. (microcontrolle: AT90s8535)

Thanks....

#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
#include "atmel_uart_drv.h"
#include "key_44_drv.h"//i wrote this lib.for a key board with 44 keys
#include "text_lcd_api.h"
#include "text_lcd_drv.h"
#include "timer.h" SIGNAL (SIG_UART_RECV)
{
unsigned char *got_key, got_data,test1;
got_key=&got_data;
test1=uart_get_data(got_key);
if(test1 == 0)
lcd_WrtStr(got_key,1,0,1); }

int main()
{
unsigned char *sent_key, sent_data, test;
lcd_Init();
lcd_Clear();
sent_key = &sent_data;
uart_set_baudrate(9600);
sei ();
UCR|=0x80;
uart_rx_on ();
uart_tx_on();

while(1)
{

sent_data=1;
return_key(sent_key);
if(sent_data != 1)
{
test=uart_send_data(sent_data);
if (test == 0)
lcd_WrtStr(sent_key,0,0,1);
}
}
return 0;
}