Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] input capture in arm7

Status
Not open for further replies.

lalit_sharma

Newbie level 1
Joined
Feb 4, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
5
hi I'm using LPC2148 and trying to capture input.
echo signal of hc-sr04 needs to be calculated can anyone guide me...
 

I am still learning LPC2148 hence can't give you code.

Process is.

make trig pin high
then a delay of 10 us
then make trig pin low

clear 16 bit timer

wait till echo pin goes high

when echo pin goes high start timer

wait till echo pin goes low

when echo pin goes low stop timer

use timer value and do the calculation to get distance

additional:

if timer overflows before echo goes low then increment a counter.

if counter is 1 add 65535 to timer value before calculating distance
if counter is 2 add 65535 * 2 to timer value before calculating the distance.

additionally use US-020 module which can measure 700 cms.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top