Im testing a circuit that involves a rotary encoder, I have copied the schematic from the data sheet of the rotary encoder eblock, I checked it whit my scoop and its the signals are nice and clean.
However when I try to count pulses its not what I suspected. first of all the controller I'm using:
* PIC18F8722
* 25Mhz
I have made a one second flasher and its spot on scoop says 0.998 seconds.
First thing I've done was enabling the encoder. after that a interrupt that responds on a falling edge of RB0/INT0 Why not PORT interrupt, because it was even worse Im getting no result when using port interrupt, any-way in the interrupt I have macro that detects any changes. In the main program I have a loop and two macros one that counts the encoder and the second that displays the result.
The problem here is, Im not getting that smooth counting it jumps from 3 to 8 back to -4 and the back to 9 I don't know what going on.
Can I use a timer interrupt instead of interrupt on Port B0.
Please let me know,
Regards Jordy
PS. if you need the program just say
