Yahoo Groups archive

AVR-Chat

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

Message

External Interrupts 6 and 7

2006-02-18 by eccamacho

I'm trying to enable External Interrupts 6 and 7, but I can't seem to
get them working. 

Here's my init code:

    DDRD  = 0x00;                // set port D for input
    PORTD = 0xff;                // activate internal pull-up

    cbi(EICRB,ISC61);            // set sense control for any edge
    cbi(EICRB,ISC71);
    sbi(EICRB,ISC60);
    sbi(EICRB,ISC70);
    EIMSK = (1<<INT6) | (1<<INT7); // enable interrupts 6 and 7
    sei();    

My main program is just a tight loop.  The interrupt just toggles
an LED.

SIGNAL(SIG_INTERRUPT6)
{
    LED_OFF(RED);
    if (ledOn == 1)
    {
       LED_OFF(BLUE);
       ledOn = 0;
    }else{
       LED_ON(BLUE);
       ledOn = 1;
    }
}


I don't have any indication that the interrupt is firing though.  I
believe I'm hooked up to the right pins on my board (atmega128 btw).

Anything I'm missing to enable these interrupts?

Thanks, 
Ed

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.