/*---------------------------------------------------------------- * File: TEMP.HEX * * Downloaded from www.hamradioindia.org * * Microprocessor PIC16F877A * * Purpose: To display Temperature between 2 to 100 Degree C * * Inputs: LM35 * * Outputs: Two seven segment common Cathod LED Display * * LM35 gives 10mv for a 1 degree temperature change * * Author: C.V. Niras, vu3cns@yahoo.com *-----------------------------------------------------------------*/ PORTA - pin 2 to 7 ------------------ pin 2 (input 1) connected to out put of LM 35 pin 3 (input 2) connected to out put of another LM 35 ( if required ) pin 4, 5 unused pin 6 conneted to VDD via 10 k resistor and connected to ground by a switch ( to select the two input ) pin 7 unused PORTB - pin 33 to pin 40 ------------------------ The two 7 segment LED's anodes are connected in parellel pin 40 unused and all other pins connected to 7 segment LED(common cathode) display's 7 anodes via 470 Ohm resistors 7Nos ( pin 33 to segment a , pin 34 segment b,... pin 39 segment g ) PORTC ----- This posrt is used for to ON/OFF something for the following set temperatures temperature > 39 RC 0 (pin15) ON temperature > 40 RC1 (pin 16) ON temperature > 42 RC2 (pin 17) ON temperature > 50 RC3 (pin 18) On temperature < 35 RC4 (pin 23 ) ON temperature < 32 RC5 (pin 24) On temperature < 30 RC6 (pin 25) ON temperature < 25 RC7 (pin 26) ON PORT E - pin 8 to 10 --------------------- pin 8 unused pin 9 to the first 7 segment LED's cathode ( ie the digit 10 ) pin 10 to the second 7 segment LED's cathode ( ie the digit 1 ) Other connetctions ------------------ 4 Mhz crystal connected between pin 13 and 14, these pins conneced to ground via two 22 pf pin 1 (MCLR) conneted to VDD with a 10 K resistor to ground by a 10 uF LM 35 ----- pin 1 GND pin 2 output pin 3 VDD Notes ----- The VDD must be a well regulated 5.0 V The programmer circuit is in http://www.hamradioindia.org?name=Circuits&file=feng