Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] still no working interrupt )-:

2007-01-09 by Thomas Keller

>  
    OK.  Here is my main loop:

MAIN:

    sleep
    rjmp    MAIN                           ; go back to sleep until next 
interrupt
                                                    ; in other words, 
loop forever

    .exit
   

   now, when i am simulating this, the instruction pointer simply 
oscillates rapidly between the line with "sleep" and the line with "rjmp 
MAIN" on it.  This doesn't seem quite right to me.  If there is no 
interrupt happening, should it just go to sleep and sit there?  Maybe 
the suggestion about a debugging code to tell me which interrupt is 
actually happening isn't such a bad idea after all.  SOMETHING must be 
interrupting, or the pointer woudl just sit at the sleep instruction 
once executed, unless I misunderstand how "sleep" is supposed to work?

tom

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.