Hai,i started to interface hcsr04 with msp430 launchpad...your above code worked almost...But i am new to the msp430 coding. I myself figured out most of the operation, but i didn't understand how did you assigned the values for ultrasonic parameters. #define timer_period 62500 // 4 * 62500 = 250ms ---how did you assign 62500? #define trigger_pulse (timer_period - 10) ---how is this 100us? #define us_per_cm 14.5 // Depends on module ---my hcsr04 datasheet says us/58=centemeters. so can i assign us_per_cm as 58 directly? #define time_to_trigger_us 450 ---what does 450 means? how did you calculated? and from above program i can see that led1 from launch pad is glowing...how to interface with an external led? can you help me in this please?