Hi
I need your comments on this code...
Well... I need count time spend of complete signal. On this code i can only resolution in ms... I need resolution in us...but much better precision...
#include <16F84A.h>
#fuses XT, NOWDT, PUT
#use delay(clock=4000000)
while (true)
{
if (!input(PIN_A0))
{
while (!input(PIN_A0));
set_timer0(231);
ms = 0;
while (input(PIN_A0));
while (!input(PIN_A0));
discarrega();
delay_ms(100);
}
}
}
thanks...
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
Re: Resolution on tmr0
Posted: Tue Jan 06, 2004 11:35 am
pitufos wrote:
output_high(PIN_A3);
output_low(PIN_A3);
This will not allow time for the pin to change state you should insert a pause.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum