nikens
Junior Member level 2
I would like to read digital signal from hall efect speed sensor and I was thinking of making two interrup routines. In first I'll be generating Timer0 interrupt that will increase counter on timer overflow.
Second interrupt will occur on sensor signal change connected to PIC input and will increase variable X.
In my main program I'll be watching the counter (counting 100 mili sec time interval) and X (counting sensor latch) and compare how many times signal changed its state over 100 mili sec interval.
Now do I need to use 18F family PIC or is there a solution to use 16F instead and use only one interrupt at the time?
I was thinking if it is possible to switch between interrupts in the program and thus using more than one intterupt (but not at the same time).
Second interrupt will occur on sensor signal change connected to PIC input and will increase variable X.
In my main program I'll be watching the counter (counting 100 mili sec time interval) and X (counting sensor latch) and compare how many times signal changed its state over 100 mili sec interval.
Now do I need to use 18F family PIC or is there a solution to use 16F instead and use only one interrupt at the time?
I was thinking if it is possible to switch between interrupts in the program and thus using more than one intterupt (but not at the same time).