PDA

View Full Version : Pulsin versus While Wend



Toley00
- 7th March 2006, 00:23
Is someone can tell me if there's a difference between these two way of mesuring a pulse width.

First simply by using PULSIN

PULSIN PIN_IN,0,PULSE_WIDTH

Or by using WHILE WEND like this

WHILE PIN_IN = 0
PULSE_WIDTH = PULSE_WIDTH + 1
WEND

I know PULSIN increment by 10us step using a 4MHz Xtall. Do the While wend way can be more accurate ? Is there a way to know how many cycles required by this code ?

Thank you

Darrel Taylor
- 7th March 2006, 20:08
instruction execution time
http://www.picbasic.co.uk/forum/showthread.php?t=365
<br>