A temperature compensation device for an optical communication device or the
like
is constructed so that an error value, which is the difference between the current
temperature and a reference temperature, is subjected to digital processing in
a temperature comparison unit. A digital error voltage value is calculated and
digital PID control is performed instead of analog PID which requires electric
components such as a power op-amp, a resistor (R), and a capacitor (C). According
to this construction it is possible to reduce the number of electric parts. It
is also possible to accept various types of temperature sensors while using only
one PCB regardless of the types of temperature sensors utilized.