adc, measuring digital output from analog input

Status
Not open for further replies.

spartekus

Member level 5
Joined
May 27, 2010
Messages
81
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Duisburg, Germany
Visit site
Activity points
1,918
adc, measuring digital input(voltage and current) from digital output

Hi,

I need to measure analog input value of MCP3221, and show it on display. (with microcontroller)
but i dont know how i will know the analog input from its digital output.
maybe anyone has experience with it, page 13 of at datasheet should be related with this question.
thanks
 

Attachments

  • MCP3221.pdf
    445.5 KB · Views: 107
Last edited:

It's very simple:

\[V_{in} = \frac{VDD}{4095}\cdot \,N \]

where N is the digital converted value (in base 10) that you get from MCP3221, VDD the operating voltage, 4095 come from \[2^{bit}-1 = 2^{12}-1 = 4095\]


Example, VDD=5V, N is, for that moment, 3045, which is the input voltage?

\[V_{in} = \frac{5}{4095}\cdot 3045 \approx 3.72\,V\]

So Vin can range only between 0V (0 digital) and VDD (4095 digital).
 
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…