avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Problem on receive interrupt with Atmega8.


From: frankie
Subject: [avr-gcc-list] Problem on receive interrupt with Atmega8.
Date: Mon, 7 Aug 2006 15:11:52 +0800

 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.
FREE emoticons for your email! click Here!


>>The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error.<<

reply via email to

[Prev in Thread] Current Thread [Next in Thread]