A digital self-calibration circuit for absolute rotary encoder microsystems