This means I'll count incoming pulses to my pin15 of pic16f877a for~200ms.. But right now I need to vary the time because it depends on other factors.. I guess I cant use delay_ms() anymore right? How to do it then?
Please help... TQ soo much
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
Posted: Mon Mar 03, 2008 5:51 am
Quote:
But right now I need to vary the time because it depends on other factors.. I guess I cant use delay_ms() anymore right?
Do you know ahead how long the delay needs to be? If yes, you can vary the time by passing delay_ms() a variable instead of a fixed constant.
For a more detailed help you will have to explain to us what the 'other factors' consist of.
ChickymEAL Guest
Posted: Mon Mar 03, 2008 6:41 pm
The 'other' factor is actually an input from sensor.
I need to count incoming pulse from sensor for certain period of time, then based on the number of pulse I'll need to adjust the time period to count the next incoming pulse..
The time period is adjusted by using bisection method (but thats a different story).. The important part is i need to vary the time to count the incoming pulse...
Any idea? I'm quite at dead end here.. Please advice..
Guest
Posted: Mon Mar 03, 2008 8:34 pm
ckielstra wrote:
Do you know ahead how long the delay needs to be? If yes, you can vary the time by passing delay_ms() a variable instead of a fixed constant.
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