View Full Version : Devantech SRF04 Ultrasonic Range Finder
dkid456h
05-03-07, 02:58 AM
Does the echo or the pulse go into TMRC0? What does the input look like?
Thanx in advance!
The specification for the SRF04 sonar sensor at the Devantech SRF04 Datasheet page (http://www.robot-electronics.co.uk/htm/srf04tech.htm) shows that trigger pulse is needed on the middle pin, while the echo pulse is output next to it. The IsoMax SRF04 example (http://www.newmicros.com/isopod/appnotes/SR04.txt) shows a trigger pulse being generated on TC0 and the TC1 pin set up to wait and time an echo. So TC0 should be connected to the middle trigger pin, and TC1 to the echo pin.
If you then type in RANGE, a single range value will be displayed in NMITerm :
38 in.
If Z is typed in, then a continuous stream of RANGEs occur until a key is pressed.
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.