PDA

View Full Version : Help please with i/p o/p hold delay



g7jiq
- 17th May 2008, 23:27
Hi all,

I am using a 12F675, running its internal clock.


What I am trying to get my head around some timing loops,
I am trying to do following...

I need an output to trigger as soon as the pic gets an input, (easy)
But it needs to hold latched for about 20 seconds from the time the input is released.

If an input is applyed to the pic within the 20 seconds the timer needs to reset back to 20 seconds until the input is released. (then carry on as before)

I then need to be able to cancel the 20 second delayed latch by applying a second input
to the pic. (clearing the delay and lifting the latched output)


Any ideas or advice would be great,

Cheers
Dave....

skimask
- 18th May 2008, 05:29
What is the minimum duration of these input pulses that will be doing the latching and resetting?

g7jiq
- 18th May 2008, 22:04
Hi,
The input pulses are actualy toggled inputs,
The input can be anything from 1 second to several mins.

The pic circuit is actualy going to be used in a low power radio link,
and its to control the transmit delay to stop it from chattering.


Cheers
Dave..

skimask
- 19th May 2008, 14:06
The input pulses are actualy toggled inputs,
The input can be anything from 1 second to several mins.
The pic circuit is actualy going to be used in a low power radio link,
and its to control the transmit delay to stop it from chattering.
If the input is slow like that, then your program is practically written by the wording in your first post...

g7jiq
- 20th May 2008, 20:45
I have grasped the basics,
but when it comes to timing loops I am beat.

I have only been into pic programming for just over a year,
and are learning fast.

Half the problem is knowing where to start,

If you possibly could draft out a bit of program code,
I would be greatful.



Cheers
Dave....