[Tinyos-help] Digital output and Interrupt problem

Michael Schippling schip at santafe.edu
Thu Sep 1 00:05:29 PDT 2005

sorry for the probably stupid comments....but.
Can't you post a task, or even, better togggle the motor control bits,
from the interrupt routine? I mean interrupts are INTerrupts, not real
time but at least realish time...
And...I've easily used 1ms timer 'loops' on mica2, didn't look at doc,
but is the dot that much slower?

jaeyun at seas.upenn.edu wrote:
> Hi everyone,
> We are using mica2dot for our project. 
> We are using one photo-transistor(connected to INT0, i.e. input) to sense 
> light and two DC-motors(connected to PC0 and PC1, i.e., digital output).
> We have interrupt either falling or rising edge.
> We chose this configuration because we want to turn on one of the motor when 
> the photo-transistor senses light.
> Our problem is that when the transition is too fast (about 2ms) the output 
> doesn't follow the input.
> Possible approaches that we applied in order to solve this problem:
> 1. Write minimum number of code lines in the definition of interrupt code.
>    In this code(TOS_SIGNAL(SIG_INTERRUPT0){...}) we only toggle a boolean
>    variable in order to indicate that there was an interrupt and 
>    using a timer with 3 binary milliseconds (3 because you can not use 2. It   
> is too short according to the documentation)we check if there was an interrupt 
> or not. Depending on this activate digital output or not.
>    Results: not good. The timer did not fire.
> Our questions are...
> 1. Is there any way to listen two close consecutive interrupts, say signals of 
> 500Hz or 2ms? What about 1kHz?
> 2. Can we get a timer with higher precision?
> 3. How can we solve this problem? By software, by hardware(filters?)
> Thanks in advance,
> Sincerely,
> Jaeyun
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

More information about the Tinyos-help mailing list