Digital control using microprocessors