i want use timer in msp430G2553..
Answers
-
Submitted by Sreeram_Mohan_Altair on Fri, 03/18/2016 - 16:14.
Hi Yogesh,
Could you provide more details of the sensor that you are talking about ?
If you just want to send out an IO pulse high and wait for IO on the other and clock it you should atleast start looking at : 1) Setup a GPIO to be high or any pattern according to the transmitter requirement. 2) Configure the GPIO read to be on an interrupt and this interrupt can be used on a compound and perform any operation needed.
I would recommend you send us more details and may be we can understand better on what is needed !
--sreeram
Sreeram Mohan
0 -
Submitted by yogeshnand on Sat, 03/19/2016 - 11:39.
i am using ultrasonic sensor HC-sr402 for object detection.so i will give 10usec pulse for triggering(input to sensor) if there is object then echo will receive on GPIO(output of sensor) . i want to calculate the time between triggering and Echo(High) received. thanking you...
0 -
Submitted by Sreeram_Mohan_Altair on Sun, 03/20/2016 - 02:26.
Hi yogesh,
A simple way I suggest you could achieve this is through using a cross detect block and a pulse counter. Please find attached a simple diagram that does the same on an input square wave. Please replace the square wave with the input signal and you should be able to count the number of pulses and in turn derive the distance.
Hope this is helpful.
-sreeram
0 -
Altair Forum User said:
Submitted by Sreeram_Mohan_Altair on Fri, 03/18/2016 - 16:14.
Hi Yogesh,
Could you provide more details of the sensor that you are talking about ?
If you just want to send out an IO pulse high and wait for IO on the other and clock it you should atleast start looking at : 1) Setup a GPIO to be high or any pattern according to the transmitter requirement. 2) Configure the GPIO read to be on an interrupt and this interrupt can be used on a compound and perform any operation needed.
I would recommend you send us more details and may be we can understand better on what is needed !
--sreeram
Sreeram Mohan
Altair Forum User said:Submitted by Sreeram_Mohan_Altair on Sun, 03/20/2016 - 02:26.
Hi yogesh,
A simple way I suggest you could achieve this is through using a cross detect block and a pulse counter. Please find attached a simple diagram that does the same on an input square wave. Please replace the square wave with the input signal and you should be able to count the number of pulses and in turn derive the distance.
Hope this is helpful.
-sreeram
HI SIR ,
i want to reset this counter afetrer some interval of time. i tried it . but it reset but again it not start from zero value . please look over the attached program.
thanking you
yogesh
0