Do I have to use external pullup resitor?
Does call to [call IO.makeInput()] enables internal pullup so i do not
have to use external resistor?
PortE4 is the same as Int4 pin?
What do you think - is this code correct for making interrupt?
I try external pullup tomorrow.
There is code with portE4 made as input:
------------TestAppNodeC.nc------------------------------
-----------------------------------------------------------
configuration TestAppNodeC {}
implementation {
components TestNodeC, MainC, LedsC;
components HplAtm128InterruptC; //iris doesn't have GpioInterruptC
components HplAtm128GeneralIOC;
TestNodeC.Boot -> MainC;
TestNodeC.Leds -> LedsC;
TestNodeC.Interrupt -> HplAtm128InterruptC.Int4;
TestNodeC.IO -> HplAtm128GeneralIOC.PortE4;
}
------------TestNodeC.nc------------------------------
-----------------------------------------------------------
module TestNodeC {
uses interface Boot;
uses interface Leds;
uses interface HplAtm128Interrupt as Interrupt;
uses interface GeneralIO as IO;
}
implementation {
event void Boot.booted() {
call IO.makeInput();
call Interrupt.edge(FALSE);
call Interrupt.enable();
}
async event void Interrupt.fired(){
call Leds.led0Toggle();
}
.....................
On 22.07.2009, at 21:48, Michael Schippling wrote:
Are you sure it's _always_ on rather than toggling very fast?
I presume you are touching a wire from int0 to ground to do
your test? Do you have a pullup resistor on int0? And there
will be noise so you will get multiple ints (if it's working
at all) which could leave you in either toggle state each time.
a small capacitor across the int0-gnd junction could help that.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help