2camjohn
Member
I noticed on my PIC16F628a circuits, the timer slows down and speeds up depending on the status of an input which is connected to the comparator.
The timer is done using interrupts and timer0.
So I added a switch and wired it up so it causes interrupts.
It seems that some interrupts are not being triggered(roughly 6 out of every 10) when the input to the comparator reads low.
When it reads high eveything is fine, timer is fine and every time i push the switch it responds.
I have been through my code with a fine tooth comb, I have reduced the code to 1 very simple timer routine, the comparator and the switch triggered interrupts and I get the same problem.
So I guess its a hardware problem, can anyone suggest anything???
The circuit used is also extremely simple.
Thanks
John
The timer is done using interrupts and timer0.
So I added a switch and wired it up so it causes interrupts.
It seems that some interrupts are not being triggered(roughly 6 out of every 10) when the input to the comparator reads low.
When it reads high eveything is fine, timer is fine and every time i push the switch it responds.
I have been through my code with a fine tooth comb, I have reduced the code to 1 very simple timer routine, the comparator and the switch triggered interrupts and I get the same problem.
So I guess its a hardware problem, can anyone suggest anything???
The circuit used is also extremely simple.
Thanks
John