Question about the use of RCTIME versus PULSIN
deno
Posts: 242
I find that I can quite successfully measure a pulse duration using RCTIME with no capacitor involved.· Is this the same as PULSIN?· Basiclly, I am measuring the time of a· pulse from transmission to return from an ultrasonic device (not a PING device) using RCTIME instead of PULSIN.· I really just discovered this when I was rewritting my code to accomodate the use of a BS2sx mentioned in a previous post and there it was stareing me in the face.·
Deno·
Deno·
Comments
PULSIN on the other hand, measure the time that a pin is in a given state from START edge to END edge.
Generally, if you have a real "pulse" PULSIN will return more accurate results, because RCTIME may or may not catch the beginning of the pulse. Of course, the logic of the program and the nature of the actual circuit being used may make it workable anyway (esp. if the pin is in known state prior to RCTIME). A good example is some of the IR Remote for the Boe-bot experiments where RCTIME is used in place of PULSIN because the Stamp will not be fast enough to "catch" the starting (falling) edge of the IR detector's pulses.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Thanks again...
Deno
Post Edited (deno) : 6/7/2009 2:58:49 PM GMT