Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHey gj_leeson,
I have been writing the VHDL file that calculates the temperature from the sensor's signal and I am facing a problem. The output of the TMP04 is a square wave which has a high period T1 and a low period T2 The temperature is given by: t=235-(400*T1/T2) which can be rewrited as: t=235-(400*cntT1/cntT2) where cntT1 and cntT2 are the values given by two counters. While there doesn't seem to be any problem to write the code. The simple operation which consist to calculate (400*cntT1)/cntT2 seems to require too many LEs. With a clock frequency at 90kHz (as suggested in the datasheet) I already need 537 LEs just to calculate the temperature. And I only have 160 LEs in the chip. I tried to lower the clock frequency but it doesn't help much. Do you have any suggestion? Best, Boris