Calibrate dc offset, measure offset and maintain fixed level