Quote Originally Posted by HenrikOlsson View Post
Hi,
No, POSCNT contains the actual count. MAXCNT controls how "far" POSCNT counts before rolling over. That way you can have it wrap around at 1000 or 2000 or 34567 instead of 65535 if you want.

The interrupt flag gets set whenever it rolls over, going in both directions.

/Henrik.
Ok, I have been looking at your answer for about 3 weeks, and it has taken most of that time to understand what you said, mostly because it addresses my problem, not my question.

I was having "difficulty" getting MCS and PBP tp accept any input into those registers. To summarize what you posted so you know I understand, POSCNT tracks the number of changes and distance from zero counts and MAXCNT "SETS" the number of counts before rollover, almost like preloading a timer, except opposite.

I resolved my difficulties by reinstalling MCS Pro, Oh and using POSCNTH & POSCNTL as there is no actual POSCNT listed in the P18F4431.inc . When I assemble a good working encoder example I will post the code.

And Henrik, Thanks for the nudge !