1) have I missed anything as far as configuration goes?, I've just got a handle on reading and configuring things from the microchip datasheets, still have a ways to go.. so probably missed something stupid.

2) When entering/exiting the asm interrupt I am saving and restoring the processor context, but is there any other things I should be saving/restoring? also should I disable the interrupt once first entered? can an interrupt be triggered while within the interrupt itself?


3) The routine executes everytime a condition changes on the interrupt pins, yet there is no provision in the code to exit if the values didn't change... um ok leme explain that one better. every "indent click" of the encoder the routine gets triggered 4 times (twice for each phase), each time the routine needs to exit with an Up/Down result.. shouldn't there be a exit if nothing changed? this is where i'm a bit fuzzy, I am including a few screenshots bellow of a logic analyzer capture to illustrate this better I hope. basically I get increments of 4 on the counter every click of the encoder.

4) I've added some debounce asm to the routine which seems to work. just want to double
check it is ok way to do it.


5) now my biggest issue which is really confusing. every few turns of the encoder, about a second after, the pic freaks out and triggers the interrupt routine what looks like 100-1000 times. scrambling the counter, and sometimes causing some corruption on the lcd. I've included the logic analyzer capture bellow. What could be causing this??

oh, forgot to mention I am using "Panasonic EVQ-WTEF2515B" rotary encoder.
here is what I managed to find as far as a datasheet.

I have used a led on/off to be able to capture when the interrupt is tiggered by my
logic analyzer.

Screen Shot of Logic Analyzer for Multiple Interrupts per indent


Screen Shot of Logic Analyzer for Pic freakout..


Screen Shot of Logic Analyzer Closeup of Pic freakout..


Thanks again for any help, and looking forward to be able to contribute to the community.