Added write DAC function and Sin wave data