In this paper, the mechanical properties and temperature characteristics of a temperature sensor are presented for effective temperature compensation of a pressure sensor with a silicon strain gauge. A p-type diffused resistor of direction on the (001) plane acts as a temperature sensor because its resistance varies with temperature. Unlike typical temperature sensors, the sensor's resistance is not affected by the stress on the diaphragm caused by its deformation under pressure. Thus, the temperature sensor is able to provide the correct resistance value corresponding to the temperature, regardless of the position of the diaphragm. Only 0.0062% of the resistance change of the temperature sensor is attributable to the mechanical stress of the diaphragm's deformation.