A device, having temperature compensation, includes a constant voltage
provider for providing a constant voltage; and a compensating load
coupled to the constant voltage provider for providing a resistive load
to transform the constant voltage into a substantially constant current.
The compensating load contains a resistor, having a negative temperature
coefficient and coupled to the constant voltage; and a compensating unit,
having a positive temperature coefficient and coupled in series to the
resistor, for compensating a resistance variation of the resistor for a
temperature variation.