Disclosed herein are methods and circuitry for monitoring and adjusting a
compliance voltage in an implantable stimulator devices to an optimal
value that is sufficiently high to allow for proper circuit performance
(i.e., sufficient current output), but low enough that power is not
needlessly wasted via excessive voltage drops across the current output
circuitry. The algorithm measures output voltages across the current
source and sink circuitry during at least periods of actual stimulation
when both the current sources and sinks are operable, and adjusts the
compliance voltage so as to reduce these output voltages to within guard
band values preferably indicative for operation in transistor saturation.
The output voltages can additionally be monitored during periods between
stimulation pulses to improve the accuracy of the measurement, and is
further beneficial in that such additional measurements are not
perceptible to the patient.