[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: [avr-gcc-list] Timer Interrupt Problem on ATmega 103L
From: |
Peter Hierholzer |
Subject: |
AW: [avr-gcc-list] Timer Interrupt Problem on ATmega 103L |
Date: |
Fri, 28 May 2004 21:00:09 +0200 |
Hi Andrew,
> -----Ursprüngliche Nachricht-----
> Von: 'Andrew McNabb' [mailto:address@hidden
> Gesendet: Donnerstag, 27. Mai 2004 23:55
> An: Rune Christensen
> Cc: Peter Hierholzer; address@hidden
> Betreff: Re: [avr-gcc-list] Timer Interrupt Problem on ATmega 103L
>
> I've been playing around with everything I can think of or have been
> recommended on the list. I've finally noticed that under certain
> circumstances I can get _something_ to happen when I enable interrupts.
> I just don't know what it means. Let me try to explain:
>
> When my main loop just outputs TCNT0, it doesn't make any difference
> whether interrupts are on or off. Either way the lights are counting
> from 0 to 0xff over and over.
>
> However when I add something to my while loop that polls TCNT0 to check
> "manually" whether there's been an overflow, the behavior depends on
> whether or not I've set TOIE0 in TIMSK. If TOIE0 is not set, everything
> works properly and the lights flip on and off every second. However if
> TOIE0 is set, the lights on PORTB all turn on and stay on. But if the
> while loop is empty, the lights stay off.
>
> I can't quite put a finger on what's going on. Does anyone have any
> ideas?
>
> Here's my code in its current form. Thanks.
>
Can you post a mixed source assembler listing of the code
Peter
Re: [avr-gcc-list] Timer Interrupt Problem on ATmega 103L, 'Andrew McNabb', 2004/05/27
Re: [avr-gcc-list] Timer Interrupt Problem on ATmega 103L, Andrew McNabb, 2004/05/28