I cannot receive data using the SIGNAL with ATmega8, below are part of my code.
/* UART received handler signal */
SIGNAL(USART_RXC_vect)
{
unsigned char data;
unsigned char temphead;
data = "">
temphead = (WriteBufPos+1) & UART_RX_BUFFER_MASK;
WriteBufPos = temphead;
RECEIVE_BUFFER[WriteBufPos]=data;
}
main(void)
{
disable_global_interrupt();
Init_uart();
enable_global_interrupt();
WriteBufPos=0;
for(;;)
{
//process receive buffer.
if(WriteBufPos > 5)
LED_ON();
}
}
The LED is never ON.
Can anyone help? Thanks in advance.
I am using avr-lib-1.4.4. |