Continue to Site

# [SOLVED]how to get output volt from DAC0808 of our required?

Status
Not open for further replies.

#### Zohaibmaroof

##### Member level 2
what binary code should i give to DAC0808 input pins so that i can get 0 volt , 1 volt , 2 volt , 3 volt , 4 volt ,5 volt.

basically i want to drive a vibrating motor from DAC0808 , & by using 89C51 uC . i want to vibrate it variably

but how to get the variable voltage from DAC0808

Suppose you are operating at 5V. So these will the inputs

0000 0000 >> 0V
0011 0011 >> 1V
0110 0110 >> 2V
1001 1001 >> 3V
1100 1100 >> 4V
1111 1111 >> 5V

hey man thanks its working i have found some more binary codes by my self
i have checked these codes practically which are written bello i have also convert these binay codes in HEXA and DECIMAl values

Dec HEXA A1 A2 A3 A4 A5 A6 A7 A8 Output Voltage
255 FF 1 1 1 1 1 1 1 1 4.98
230 E6 1 1 1 0 0 1 1 0 4.49
205 CD 1 1 0 0 1 1 0 1 4
180 B4 1 0 1 1 0 1 0 0 3.51
155 9B 1 0 0 1 1 0 1 1 3.01
128 80 1 0 0 0 0 0 0 0 2.5
103 67 0 1 1 0 0 1 1 1 2.01
77 4D 0 1 0 0 1 1 0 1 1.5
52 34 0 0 1 1 0 1 0 0 1.01
26 1A 0 0 0 1 1 0 1 0 0.5
0 0 0 0 0 0 0 0 0 0 0

---------- Post added at 00:42 ---------- Previous post was at 00:27 ----------

is this possible to give 89C51 a condition in which 89C51 compare to values and then take an action
The main thing which i want to do that 89C51 check a any pin for e.g. pin P 1.1 for how long its HIGH and then the time its high is then will have some sort of particular value like 100 then this value is compared by 2 values or we can say that from a range like 0 to 100 , so when values between 0 to 100 comes then 89C51 gives the code of 0 0 0 1 1 0 1 0 which is equal to 0.5 volt and there will be other ranges also lik from 101 to 200 then when value between 101 -200 comes then 89C51 gives the code of 0 0 1 1 0 1 0 0 which is equal to 1.01 Volt

if u got my concept so can u tell me the source code of that idea in ASSEMBLY language

Status
Not open for further replies.