How to write on DAC 0808 the perfect way?

This needs to be moved to "Interfacing" ask a mod to move it so you'll get more responses.

That substitution will require a large rewrite of the arduino code from that page. It will also require some different hookups.

The reference design here calls for +5, +10V and -15V and an op-amp that needs + and - 18V and it's been discontinued.

http://www.national.com/ds/DA/DAC0808.pdf

The part in that other schematic yeilds 0-5v and is trivial to use.

You could use a resistor ladder dac. The example on the scope shows that the output will vary in steps but ones working you can design a filter to smooth that out

http://blog.makezine.com/archive/2008/05/makeit_protodac_shield_fo.html?CMP=OTC-0D6B48984890