added DAC code with offset clock