A method of sensing current comprises providing a current sensor having a
gain resolution; setting the gain resolution of the current sensor to an
initial resolution; sensing current flowing through the current sensor;
evaluating an amplitude of the current; and changing the gain resolution
of the current sensor based on the evaluating.