There is disclosed a microprocessor-controlled peristaltic pump for use in a portable continuous insulin infusion device. The peristaltic pump is configured with a removable cover comprising a part of the pump housing surrounding a pump rotor, and holding a delivery tube between the cover and the rotor. The removable cover combines with a reservoir and the delivery tube to constitute a pre-filled disposable package facilitating installation and removal of the insulin in the device. A microprocessor controls the number of times the rotor turns during a cycle. This operation allows the microprocessor to automatically compensate for different diameter delivery tubes, as well as to allow the physician to vary the on/off time of the pump to administer different dosages.