Rotary encoder as frequency selector with AD9833

This thread may help.