Hi, I have this low-level code for telosb (msp430):
>WDTCTL = WDTPW + WDTHOLD; // Watchdog canceled >P2DIR |= BIT4; // P2.4 is output >P2SEL |= BIT4; // P2.4 is TA2 function output > >TACCR0 = 24; // If timer incremented at 500khz, then period is 24 to >get 40khz >TACCR2 = 12; // Half of period 1, half 0 > >TACCTL2 = OUTMOD_3; // OUT=1 when counting to TACCR1 value. OUT=0 when >counting to TACCR0 value. > >TACTL = TASSEL_2 + ID_3 + MC_1; // SMCLK=(4mhz), DIV_8=(4mhz/8=500khz), >UP_MODE=(counts to TACCR0) > I pretend to generate 40khz square wave on Port 2.4. Am I correct? Thanks
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
