Write C code for ADC
Design a power measurement and display system forDesign a power measurement and display system for a solar power panel using PIC-18. Write a C program to perform the following tasks: To convert analog input voltage (0-5 Volts), ANO, and current(0-10 Amperes), AN1, To calculate power = voltage*current To display power (Watts) on the two segment-displays, which are connected to PORT B and PORT D as shown below. PORT D outputs 7 segments, from Segment a (PD6) to Segment g (PDO). PORT B Bit 1 is connected to the common cathode of the ten’s digit, and Bit 0 is connected to the common cathode of one’s digit display. To enable a display, output a low to the common cathode of the display, and output highs to the common cathodes of the other displays. Show transcribed image text