[Tinyos-help] Atm128 External Interrupt on any change
Mark Kranz
mkranz at gmail.com
Sun Jul 8 19:49:46 PDT 2007
I'm trying to generate an interrupt on any logical change on the
atmega 128, (Port E, Pin 6 - INT6). According to the ATmega128
datasheet (pg 90):
ISCn1 ISCn0 Description
0 0 The low level of INTn generates an interrupt request.
0 1 Any logical change on INTn generates an interrupt request
1 0 The falling edge between two samples of INTn generates an
interrupt request.
1 1 The rising edge between two samples of INTn generates an
interrupt request.
Thus, we need something like:
EICRB |= (1 << ISC60);
EICRB &= ~(1 << ISC61);
Currently, the GpioInterrupt interface (and the underlying
HplAtm128InterruptPinP implementation) is only capable of handling the
00, 10, and 11 cases. I assume this is because interrupt pins 0..3
only support high-low and low-high transitions - so the interface is
kept general to handle *all* interrupt pins.
Are there any plans to introduce support for multiple transition types
at the GpioInterrupt level? Or shall I just stick with directly
writing to the register (messy)?
cheers
-Mark
More information about the Tinyos-help
mailing list