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

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

Re: [avr-gcc-list] lack of interruption


From: Julius Luukko
Subject: Re: [avr-gcc-list] lack of interruption
Date: Tue, 23 Nov 2004 08:28:58 +0200
User-agent: KMail/1.6.2

On Monday 22 November 2004 20:34, jeffrey traer bernstein wrote:
> #include <avr/io.h>
> #include <avr/interrupt.h>
>
> void SIGNAL( SIG_OVERFLOW0 )
> {
>     PORTA = 0x00;
> }
>
>
> int main()
> {
>   DDRA = 0xff;
>   PORTA = 0x01;  
>
>   TIMSK = _BV(TOIE0);
>   TCCR0 = 0x05;
>   TCNT0 = 0;
>
>   sei();
>
>   while ( 1 );
>
>   return 0;
> }

Hello,

Your code lacks

#include <avr/signal.h>

and additionally the ISR should be defined as

SIGNAL( SIG_OVERFLOW0 )
{
     PORTA = 0x00;
}

Your version did not put anything into the interrupt vector table.

-- 
Julius Luukko


reply via email to

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