[Tinyos-help] TinyOS MICAz GpioInterrupt
Michael Schippling
schip at santafe.edu
Wed Jul 22 11:48:33 PDT 2009
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.
MS
Andres Vahter wrote:
> I'm also playng with interrupts on Iris and micaz. I checked /tests/
> telosb UserButton example and http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/doc/html/tep109.html
> I just need to register an interrupt on the pin Int0 - so UserButton
> example seems to be overkill for that job.
> I came up with that:
>
> ------------TestAppNodeC.nc------------------------------
> -----------------------------------------------------------
> configuration TestAppNodeC {}
> implementation {
> components TestNodeC, MainC, LedsC;
> components HplAtm128InterruptC; //iris doesn't have GpioInterruptC
>
> TestNodeC.Boot -> MainC;
> TestNodeC.Leds -> LedsC;
>
> TestNodeC.Interrupt -> HplAtm128InterruptC.Int0;
> }
>
>
> ------------TestNodeC.nc------------------------------
> -----------------------------------------------------------
> module TestNodeC {
> uses interface Boot;
> uses interface Leds;
> uses interface HplAtm128Interrupt as Interrupt;
>
> }
> implementation {
>
> event void Boot.booted() {
> call Interrupt.edge(FALSE);
> call Interrupt.enable();
> }
>
> async event void Interrupt.fired(){
> call Leds.led0Toggle();
> }
> .....................
>
> There seems to be something wrong because, led0 is always on. (I'm
> connecting gnd and Int0 pin on mda100 to make interrupt)
> Could someone take a look and point out what should I change in order
> to get it work on Iris and micaz.
>
> Andres Vahter
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
More information about the Tinyos-help
mailing list