Use the ADC of the PIC 16F887 microcontroller and the LM35 sensor to measure the temperature and display it on 3 led 7 segments common anode
Requirements: Use the ADC of the PIC16F887 microcontroller and the LM35 sensor to measure the temperature displayed on 3 led 7 segments common anode using 3 ports, only displaying units, tens and hundreds. Use a reference voltage source VREF+ connected to VDD with 5V and VREF- connected to a VSS source of 0V Circuit diagram on Proteus simulation software Figure 1. Circuit diagram for measuring temperature using PIC16F887 displayed on 3 leds directly Main program : File: main.c ___________________ #INCLUDE<TV_16F887.C> UNSIGNED INT16 KQADC; UNSIGNED INT J,MATRAM; VOID HIEN_THI() { MATRAM = MA7DOAN[KQADC/100]; IF (MATRAM == 0XC0) MATRAM=0XFF; OUTPUT_B(MA7DOAN[KQADC%10]); OUTPUT_D(MA7DOAN[KQADC/10%10]); OUTPUT_C(MATRAM); } VOID MAIN() { SET_TRIS_B(0x00); SET_TRIS_D(0x00); SET_TRIS_C(0x00); SET_TRIS_A(0xFF); SETUP_ADC(ADC_CLOCK_DIV_2); SETUP_ADC_PORTS(SAN0); ...