Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

(analog to digital) adc_read

Status
Not open for further replies.

Rackie

Newbie level 5
Joined
Feb 22, 2012
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,332
I have this code in mikroC, it reads the 1k potentiometer, but when i use 5k potentiometer, it won't read.
Code:
potentiometer_value = ADC_Read(2);// Get 10-bit results of AD conversion
Is there any code to Get Get 16-bit results of AD conversion?
 

If you are using inbuilt ADC module of the micro-controller and mostly it will have 10 bit ADC. If you need 16 bit resolution, you need a module which have the capability of 16 bits resolution. There are many ic's which can do this. one is MCP3421 which has 18 bits of resolution. Connect MCP3421 to your controller using i2c and display the values with 16 bits of resolution.

Best wishes :)

- - - Updated - - -

If you are using inbuilt ADC module of the micro-controller and mostly it will have 10 bit ADC. If you need 16 bit resolution, you need a module which have the capability of 16 bits resolution. There are many ic's which can do this. one is MCP3421 which has 18 bits of resolution. Connect MCP3421 to your controller using i2c and display the values with 16 bits of resolution.

Best wishes :)
 

I have this code in mikroC, it reads the 1k potentiometer, but when i use 5k potentiometer, it won't read.
Code:
potentiometer_value = ADC_Read(2);// Get 10-bit results of AD conversion

What result are you getting? Upload the diagram showing the connection of the potentiometer.

Is there any code to Get Get 16-bit results of AD conversion?

To get a 16-bit result, use an external 16-bit ADC.

You may use the "oversampling" method.
For example, take a look at:
**broken link removed**

Hope this helps.
Tahmid.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top