• 0
Sign in to follow this  
Followers 0
yogeshnand

how interface ultrasonic sensor with msp430g2553

Question

hi sir/mam,

 i want interface ultrasonic sensor with msp430g2553, i have tried in many ways but  i  am not getting output .i checked the output on cro when object in front of it and i got the output, but i want to calculate the time  elapsed between in transmission and reception on echo pulse . so that i can calculte the dostance , but the main problem how to calculate the time . how to use the TAR and TACCTL0 for distance calculation , please help me i am sticking at this point , please help me .

 i have attached my program .

thanks

n3.vsm

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

i tried some other way but still i do not get output. when the there is echo i start  reading the timer . and stop when the echo is on falling edge.

 below i attached the program

n3.vsm

Share this post


Link to post
Share on other sites
  • 0

Yogesh, what distances are you trying to measure? It affects the data rate of the timer as it can only hold 16 bits.

The attached should measure up to 34 meters with .5 mm accuracy. I assume pin functions as follows:

Pin Functions
P1.1 - send usonic pulse out
P1.2 - read return pulse
P1.0 - set high when distance > 40cm

Pete

pulseMeasurement.vsm

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0