I wrote a programme for a 16F84 PIC to operate a relay for 1 hour as in Figure 1. But the results depend upon what signal is input to RA4.
If a sinewave of 50Hz is input, as in Figure 1, it works sometimes but not always.
If a slope limited squarewave signal is input, as in Figure 2, it works everytime.
If a pure squarewave signal is input, as in Figure 3, it works but the delay is 2 hours 1.5 minutes - obviously slightly more than half the pulses input to RA4 are missed.
Does anyone know why?
According to the PIC data sheet, RA4 has a Schmitt Trigger input, so the input wave shape should not be relevant - provided it is large enough in amplitude to cross the upper and lower thresholds.
Len
If a sinewave of 50Hz is input, as in Figure 1, it works sometimes but not always.
If a slope limited squarewave signal is input, as in Figure 2, it works everytime.
If a pure squarewave signal is input, as in Figure 3, it works but the delay is 2 hours 1.5 minutes - obviously slightly more than half the pulses input to RA4 are missed.
Does anyone know why?
According to the PIC data sheet, RA4 has a Schmitt Trigger input, so the input wave shape should not be relevant - provided it is large enough in amplitude to cross the upper and lower thresholds.
Len