# How to find digital input for given output value of a DAC ?

#### thar07

Joined Jan 3, 2015
71
The n-bit R/2R digital-to-analog converter (DAC) has a reference of 16 V and the analog
output for the input code 1 is 15.625 mV. how to find the digital input value for the output
9.140625 V ??

#### MrChips

Joined Oct 2, 2009
28,153
If 1 count is 15.625mV how many counts in 9.140625V?

#### thar07

Joined Jan 3, 2015
71
If 1 count is 15.625mV how many counts in 9.140625V?
It did not give any other details. If you could please explain the theory behind this.

#### MrChips

Joined Oct 2, 2009
28,153
If one potato weighs 100g how many potatoes in a 1kg bag of potatoes?

#### WBahn

Joined Mar 31, 2012
28,186
What will be the analog output for the input code of 2? Of 3?

See the pattern?

#### thar07

Joined Jan 3, 2015
71
If one potato weighs 100g how many potatoes in a 1kg bag of potatoes?
if that so, why they given the reference voltage ?

#### MrChips

Joined Oct 2, 2009
28,153

#### bertus

Joined Apr 5, 2008
22,133
Hello,

The reference value might be the maximum obtainable voltage.

Bertus

#### MikeML

Joined Oct 2, 2009
5,444
Look up the concept of ratiometric. The output of a DAC is ratiometric with respect to the reference voltage.

#### WBahn

Joined Mar 31, 2012
28,186
if that so, why they given the reference voltage ?
Notice that they don't tell you how many bits the DAC is. Another question probably asks you to find that.

#### thar07

Joined Jan 3, 2015
71
Notice that they don't tell you how many bits the DAC is. Another question probably asks you to find that.
They asked the following two questions and I don't clearly understand what it means.
1) Draw a block diagram to interface an 8 bit ADC with 8051. Clearly show your calculations
and assumptions to use above DAC to set the ADC reference voltage 10 V and display the
result in three seven segment displays.

2)
Draw a flowchart to measure analog voltage 5 V using above ADC and DAC. Display the
result in three seven segment displays. Clearly show your calculations and assumptions.

#### WBahn

Joined Mar 31, 2012
28,186
They asked the following two questions and I don't clearly understand what it means.
What don't you understand?

Still waiting to see some attempt on your part.

#### isurunix

Joined Feb 3, 2015
21
The n-bit R/2R digital-to-analog converter (DAC) has a reference of 16 V and the analog
output for the input code 1 is 15.625 mV. how to find the digital input value for the output
9.140625 V ??

for code 1 : 15.625 mV

1 V : 1000/15.625

9.140625V = (1000*9.140625)/15.625 = 585

in binary : 1001001001

#### thar07

Joined Jan 3, 2015
71
What don't you understand?

Still waiting to see some attempt on your part.
I don't understand the following things related to the question.

1) What is the reference voltage of DAC's (n bit R/2R).
2) How to find the number of bits in this DAC.
3) how to set reference voltage of ADC by using a DAC.

I tired find theories related abouve questions and found nothing. So I could not do anything to solve these.

#### isurunix

Joined Feb 3, 2015
21
@Bertrus

Thanks for pointing it out. Can I post a link to a site containing relevant theories ?
Sorry for my mistake. I was browsing on the same question and most probably for the same home work. So I just hoped to make it easy for him to understand.

#### bertus

Joined Apr 5, 2008
22,133
Hello,

Yes, linking to websites with the theoretical background are fine.

Bertus

#### thar07

Joined Jan 3, 2015
71
for code 1 : 15.625 mV

1 V : 1000/15.625

9.140625V = (1000*9.140625)/15.625 = 585

in binary : 1001001001
Do you have any theory notes related to this ?

#### isurunix

Joined Feb 3, 2015
21
@thar07 You can find the relevant theories here and here

I found them today. These seems to be good. Hope it will help them.

#### WBahn

Joined Mar 31, 2012
28,186
for code 1 : 15.625 mV

1 V : 1000/15.625

9.140625V = (1000*9.140625)/15.625 = 585

in binary : 1001001001
This is the Homework Help forum, not the Homework Done For You forum.

Please do NOT just do the poster's assignment for them -- in most cases it does them little good in terms of learning the material.