In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote: Your thinking is spot on. And 500 cycles between interrupts is plenty, presuming no long division or some such in the ISR. So I don't think that's it, given what you have there. Post the most recent (running) version of your program. Debug should work OK at 50mhz -- make sure to pull your resonator or crystal. If you do a simple PULSOUT then PULSIN app as a test for the Ping (like the official Ping demos) do you get the same data bouncing around? Also, given that most recent version of your app does not process the returned Ping pulse length (by dividing by 2 to remove the return trip and doing a fractional multiply to convert to centimeters) if you are looking at the raw word data returned, a jump of +/- 10 is not highly significant. The Ping can return a maximum pulse of ~18ms = 18000us = 1800 ticks --- so a bounce there of 10 would equal ~0.55 % error or ~1.65 cm when converted and after removing round trip. Not too bad really. What are you using as test surface? Try a nice stiff flat piece of something about 30-40cm and see if you get stable readings. Of course, if the jumps you are seeing are after correct conversion to cm., that's odd. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=394074#m401256 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)