write_dac function