i have set the launch pad on 1MHZ , divide by 1 , aclk . set the TACTL at 12C and TACCTL0 on capture on rising edge ,CCIS0 , CAP enable , interrupt enable . when the Echo on rising edge measure the value of timer TA0R TA0R*(1/58)= distance if distance is greater than 30 cm green Led will glow if ECHO on falling edge reset TA0R is this right way to set the register or anything other i have to do. thanks in advance yogesh
↧