can any body help me how to write a digital multimeter functioning code for PIC16F788 which can able to measure and show both positive and negetive values as fractionals like 5.02v or -3.13v.
ADC output is not a voltage, but a relation between input and reference voltage.
Let's say you have: 10bit ADC and 5V ref voltage.
Max value on 10 bits is 1023 so if you have 5V on ADC input, you will get 1023 as ADC result, when you have 2.5V on input you will get 511 as ADC result etc.
This is just some basic arithmetics, take a piece of paper and a pen and you will find the right formula in few ticks
Re: pic microcontroller based digital multimeterdesign
pic adc module is 10bit. if you select pic voltage source 5V and adc refence voltage is 5V then, 5V/1023 is your voltage value of per bit. if you select pic VDD voltage is +2.5Volt, and pic vss voltage is -2.5Volt, you can measure beetween +2.5Volt and -2.5Volt. and you can calculate fraction of analog voltage if you use float type data.
... but, beware of the limitations of the ADC, for example, with a full 5V reference and 10-bit ADC, each increment is only about 4.8mV so you can't measure more accurately than that. Dropping the reference will increase the resolution but also decrease the noise immunity. You may be better off using an external ADC IC or a different type of converter, then using the PIC to process it's results.