Hello,

I am sorry, but I do not know to change MCLK.

If you are using port27, then you test before the code with the user button on 
telosb.

I hope that someone can help you about MCLK. Also you can read older messages 
at http://www.mail-archive.com/search?q=MCLK&[EMAIL PROTECTED]

A greeting,
Juan Antonio.
  ----- Original Message ----- 
  From: gaurav mathur 
  To: Juan Antonio López Riquelme 
  Sent: Monday, April 21, 2008 12:59 PM
  Subject: Re: [Tinyos-help] Help about using HplMsp430InterruptC


  Hi, Juan
  my code is exectly like yours but it is not working. I think problem is with 
MCLK because rising time of edge must be at least 1.5 times MCLK.
  Please tell me how can I set MCLK ? I am using Tmote Sky hard wade.
  My code is as:

  configuration BlinkToRadioAppC {
  }
  implementation {
    components MainC;
    components LedsC;
    components BlinkToRadioC as App;
    components HplMsp430GeneralIOC;
    components HplMsp430InterruptC;

    App.Boot -> MainC;
    App.Leds -> LedsC;
    App.PIR-> HplMsp430GeneralIOC.Port27;
    App.PIRInput->HplMsp430InterruptC.Port27;
  }


  module BlinkToRadioC {
    uses interface Boot;
    uses interface Leds;
    uses interface HplMsp430GeneralIO as PIR;
    uses interface HplMsp430Interrupt as PIRInput;
  }
  implementation {
      event void Boot.booted() {
              call Leds.led1Toggle();
              call PIR.makeInput();            
              call PIRInput.enable();
              call PIRInput.edge(TRUE);
              
        }

       async event void PIRInput.fired()
       {
          call Leds.led2Toggle();
          call PIRInput.clear();
      }
  }

  Regards,
   

  Gaurav Mathur 
  D-54 Karakoram Hostel
  IIT Delhi
  Ph. 9911809832
  Email : 
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]




  ----- Original Message ----
  From: Juan Antonio López Riquelme <[EMAIL PROTECTED]>
  To: gaurav mathur <[EMAIL PROTECTED]>
  Cc: [email protected]
  Sent: Monday, April 21, 2008 3:18:19 AM
  Subject: Re: [Tinyos-help] Help about using HplMsp430InterruptC


  Hello Gaurav,

  In the configuration file you need two components:

  components HplMsp430GeneralIOC as Pins, HplMsp430InterruptC as IntPins;

  The wiring:

  App.Pin27 -> Pines.Port27;

  App.IntPin27 -> IntPines.Port27;

  The module:

  ...
  uses interface HplMsp430GeneralIO as Pin27;

  uses interface HplMsp430Interrupt as IntPin27;

  ...

  event void Boot.booted()

  {


  call Pin27.makeInput();

  call IntPin27.enable();

  call IntPin27.edge( FALSE );    //You see the interface. Maybe you need to 
change for TRUE

  }

  async event void IntPin27.fired()

  {

  call IntPin27.clear();

  ...

  //Your code for the interruption

  }



  A greeting,

  Juan Antonio.


  ----- Original Message ----- 
  From: gaurav mathur 
  To: [email protected] 
  Sent: Sunday, April 20, 2008 9:50 PM
  Subject: [Tinyos-help] Help about using HplMsp430InterruptC


  Hi,
  I am connecting external digital sensor on Tmote Sky. I want to use 
HplMsp430InterruptC (tinyos-2.x )interface to connect sensor at port 27 of MSP 
430. My code is not generating any interrupt. I need a sample code which uses 
HplMsp430InterruptC interface.
  Thanks


  Gaurav Mathur 
  D-54 Karakoram Hostel
  IIT Delhi
  Ph. 9911809832
  Email : 
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]







  Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.



  _______________________________________________
  Tinyos-help mailing list
  [email protected]
  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help




------------------------------------------------------------------------------
  Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to