Re: PIC processor interrupt for delayed output




"Bill Bowden" <wrongaddress@xxxxxxx> wrote in message
news:77a2a704-f080-4e01-897d-cee2c1f2eb28@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
What is the best approach to generate a delayed output from a trigger
input to a PIC microcontroller? The idea is to have a constant known
time from trigger input to output, so I don't want to poll the logic
level on some pin due to the jitter that would occur. Thought about
using the comparator module to generate an interrupt, but it seems
complicated setting and clearing all the various bits and reference
levels.


Use a timer?

Use a delay circuit that triggers another inteterrupt. Essentially use a cap
and res with the appropriate delay. A pic pin supplies the voltage charging
up the capacitor. Once the cap has reached the appropriate level it triggers
an interrupt pin(needs to be schmitt triggered and the pin that charges the
cap needs to be reset). Probably not the best way but would work well for
very long delays(> s)

Just don't see why you don't use a timer interrupt as it is probably the
most natural method.


.