how to increase ADC resolution

Post your requests and ideas on the future development of mikroC PRO for PIC.
Post Reply
Author
Message
ali genidy
Posts: 54
Joined: 03 Apr 2017 09:17

how to increase ADC resolution

#1 Post by ali genidy » 04 Oct 2017 15:13

hello everybody
i' m beginner i' m using MCU PIC16f877A with 8MHz crystal and mikroc compiler Ver. 7.1.0
i want to increase ADC resolution can you tell me how can i do it with a sample code to understand
note:
(i have a Graphite column it' s dimension 10mm diameter. 30 cm length i' ll connect it with 5V DC and i want read voltage from 0V to 5V , this read will translate a distance by 0.1mm , can you tell me how can i do it ? )
thank you

User avatar
dusan.poluga
mikroElektronika team
Posts: 780
Joined: 02 Feb 2017 14:21

Re: how to increase ADC resolution

#2 Post by dusan.poluga » 08 Oct 2017 14:14

Hi,

We have a ADC example in our compiler.
You can access it by clicking on Project>Open Examples Folder.
Then you go to Development Systems>EASYPIC7>ADC on LEDs.

From that example you can extract infromation on how to configure your adc and how to get the conversion resoult.

After that you would have to create a formula that will convert the voltage to the desired distance that you are trying to mesure.

Converting the adc resoult to voltage formula.
(ADC_Read(channel_number)/2^adc_resolution)*5V=voltage_that_was_mesured

Regards,
Dusan Poluga.

Post Reply

Return to “mikroC PRO for PIC Wish List”