Lim and Michael,
 
    This advice looks like just what I need to get started.  Thank you.
 
-Mat


From: Lima GANSE Kenneth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 29, 2005 5:01 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [email protected]
Subject: Re: [Tinyos-help] Adding new interrupt and event to TinyOS

Hi Mat ,

If you want to use the low level interrupts, you will have to init the following registers:

sbi(EICRB,ISCn1); sbi(EICRB,ISCn0);     -- Triger on rising edge     

or   

sbi(EICRB,ISCn1); cbi(EICRB,ISCn0);     -- Triger on falling edge        

sbi(EIMSK , INTn); -- Enable Interrupt

 

TOSH_SIGNAL(SIG_INTERRUPTn){  //Interrupt routine

//call your event

}

On Micaz your n should be from 4 to 7 as you mentioned in your mail.

Greetings



From:  Michael Schippling <[EMAIL PROTECTED]>
To:  Mat Kotowsky <[EMAIL PROTECTED]>
CC:  [email protected]
Subject:  Re: [Tinyos-help] Adding new interrupt and event to TinyOS
Date:  Mon, 28 Nov 2005 17:33:46 -0700
>Wish I could help more, but if you have to start digging:
> tos/platform/mica2/{HPLADCM.nc,HPLUART0M.nc}
>have examples of TOSH_SIGNAL and TOSH_INTERRUPT use.
>MS
>
>
>Mat Kotowsky wrote:
>>I have prototype for a new add-on board to a mica2 that is a
>>low-power
>>voltage comparator that will (hopefully) wake up a sleeping mote in
>>order for it to take data based on an arbitrary external condition.
>>  It
>>is my understanding that the only way to wake up a mote if it is
>>sleeping (like, say, while running an Xmesh appliaction in LPL mode
>>...)
>>is by way of a hardware interrupt that causes a .fired() event to
>>be
>>called.    So I have this board that will generate an interrupt
>>signal
>>that can be fed into INT 4, 5, 6, or 7 on the AVR, but what I do
>>not
>>have is any low-level knowledge of how to add a new interrupt
>>handler,
>>and then cause this interrupt handler to generate a .fired() event
>>of
>>some sort.  Rather than just poring through code, I'd hoped to get
>>some
>>advice from you all as to where to start on this adventure.
>>
>>Thank you for any tips you can offer,
>>-Mat
>>
>>_______________________________________________
>>Tinyos-help mailing list
>>[email protected]
>>https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>_______________________________________________
>Tinyos-help mailing list
>[email protected]
>https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to