My first impression was to use capture and TMR1. Then just poll the TMR1IF without enabling the interrupt (assuming you are set on not using an interrupt). That would be similar to the common way of measuring duty cycle or frequency.
I've already got stuff happening in interrupts and I was thinking of using one of the Timers for this.
However, since you also need to detect direction, it gets a little more complicated, but I believe is still easily doable.
The polling routine already handles this, so should be OK.
The problem I see with your flow chart is how to stop an action. Let's say a rapid move to the right starts incrementian in MHz. Does one have to move at the same velocity to the left to stop it? Does is stay incrementing at a high rate until it is stopped or is it a one-shot burst? Spinning a knob could get tedious when making big changes.
It's a bit simpler than it looks - when the routine in the flow chart exits at the end of the time period, the count variable will hold a number.
This number is then compared to set points eg 10, 20 & 30 in another routine.
If the number is under 10, then step size = 10Hz
If the number is between 10 and 20, step size is = 1000Hz
If the number is over 20, then step size = 10kHz
Thus it 'auto-resets' to 10Hz until the next time it does a compare - the range of frequency is 5MHz to 5.5MHz so there isn't much spinning to do to get from one end to the other - think old school VFO's.
You did not mention whether your encoder was absolute or incremental.
Incremental quadrature like this (this one is 100 ppr)
Re the 1mS timer value, yes that is just a number to fill in the hole until I actually get some code written and have a play.
The two conflicting problems here are not slowing down the DDS update rate while getting a reasonable turn rate count.
Thanks Ian & Dana - point noted about the inconsistent turn rate - I'll start with a simple routine and modify if needed to check that.