I have a T1 timer interrupt impl in:
     http://www.etantdonnes.com/Motes/AVR128timers.zip

MS

Suresh Mathew wrote:
> Hi,
> 
> Thank you so much! The code was very helpful. I have one more question - 
> can I do the same thing in TinyOS 1.x? Is the approach the same? Could 
> anyone provide some related documentation on this for TinyOS 1.x?
> 
> Thanks,
> Suresh
>>
>> Andres Vahter wrote:
>>> Hi,
>>>
>>> I attached interrupt "driver" - maybe you get some ideas from that. 
>>> It uses two interrupt pins. You can use just one if you want.
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>>
>>>
>>> Ccomponent wiring:
>>>
>>> /components IntrC;
>>> App.Int4 -> IntrC.Int4;
>>> App.Int5 -> IntrC.Int5;/
>>>
>>>
>>>
>>> And use it like this:
>>>
>>>
>>> uses interface Notify<bool> as Int4;
>>> uses interface Notify<bool> as Int5;
>>>
>>> *event void Boot.booted()*/ {
>>> // //
>>> // // //call Int4.enable();
>>> // // //call Int5.enable();
>>> // // //........
>>> }
>>>
>>> /*event void Int4.notify*/(bool state){
>>> // // //call Leds.led0Toggle();
>>> // // Do your INT4 interrupt stuff here//
>>> //}
>>> // //
>>>
>>> /*event void Int5.notify*/(bool state){
>>> // //
>>> // // //call Leds.led1Toggle();/
>>> / // Do your INT5 interrupt stuff here
>>>
>>> //}/
>>>
>>> Check int pins for mica2, maybe they don't match.
>>> Andres
>>>
>>>
>>> On 24.10.2009, at 1:28, Suresh Mathew wrote:
>>>
>>>> Hi,
>>>>
>>>> I am a beginner in TinyOS and NesC. I am using a Mica2 mote with the
>>>> Atmega128 micro-controller and TinyOS 2.x.
>>>>
>>>> My requirement is quite simple - On the arrival of external hardware
>>>> interrupt, the micro-controller and the radio must switch on, do some
>>>> work and then the system should go back to sleep ( the lowest power 
>>>> mode
>>>> possible).
>>>> The external interrupt is a rising edge generated by an circuit that I
>>>> have designed. The external interrupt is a DC signal. If necessary, the
>>>> output of my circuit can be viewed as a digital signal as well. I have
>>>> no clue which of the pins of the mica2 mote should be used as for
>>>> external hardware interrupts. Should I be using the GPIO pins?
>>>>
>>>> So far, I have understood that that there is a power management module
>>>> in TinyOS 2.x. But I am not sure how to use it. Moreover, I am not too
>>>> sure how to write a program which responds to external hardware
>>>> interrupts.  All the literature that I have seen so far states that
>>>> peripherals can wake up the processor, but unfortunately never show 
>>>> how!
>>>> A bare minimum skeleton code would be very helpful...
>>>>
>>>> Please help!
>>>>
>>>> - Suresh
>>>> _______________________________________________
>>>> Tinyos-help mailing list
>>>> [email protected] 
>>>> <mailto:[email protected]>
>>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help 
>>>>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to