Quote Originally Posted by HenrikOlsson View Post
I recommend you take a look at the 18F2431 series PIC. It has a motion feedback module built in that can be set up to keep track of an incremental encoder. It also has a lot of other goodies specifically targeted at motor control applications.

/Henrik.
I was buy today 18F4431 and will move to it.
At moment I looking for examples for it.
Thanks and regards Robert