THERM_C This logic has the following hierarchy: THERM.ABL | +- DISP3.abl | LED_AC.alb | HEX27SEG.alb +- HEX2BCD.abl | DIV8.abl | MULT8.abl | SHIFT16 | SHIFT8 | SHIFT8 +- CLOCKB +- IIC What the logic Does: ==================== This logic is in essence a LM75 controller. LM75 is a thermal sensor which interfaces to a microprocessor via inter-intergrated chip bus (IIC). This sensor provides a real time temperature which is updated once a second. This logic, completes a digital thermometer based around the LM75. The controller samples the LM75, formats the raw data and diplays the temperature data into a multiplexed 3 digit display. Temperature displayed can be in celcius or fahrenheit. Design Features: ================ o Supports Celcius and Fahrenheit temperature modes o Hex to BCD converter o Uses any LM75 compatible thermal sensors (TCN75, etc) o Multipliexed 3 digit 7-segment LED display driver o Bidirectional IIC serial port o Fixed point unsigned divider of the form 16/8 o Supports upto 2 LM75 devices for dual temperature monitoring Design Environment: =================== The logic was written using ABEL v5.0 Design Notes: ============= Fahrenheit/Celcius ------------------ The fahrenheit conversion uses fixed point integer math. Recall that the deg C to fahrenheit relationship is defined as: F = 9/5 * C + 32 This equation is implemented as: F =(230 * C)>>7 + 32 That is, the deg C data is multiplied by a fixed constant of 230, then divided by 128 (right shift by 7) and a constant of 32 added to it. Fixed unsigned Divider ---------------------- The fixed unsigned divider is implemented as a succesive approximation logic. Fixed 8bit unsigned Multiplier ------------------------- The fixed unsigned multiplier is implemented using the pen-paper algorithm. That is, shift add. Hex to BCD conversion --------------------- Hex to binary coded decimal conversion is implemented using the pen-paper algorithm. That is, the Hex data is successively divided by a constant of 10. Tje Result is then divided by 10 again.