500 Hz square-wave input

The following signal from the ADC (right channel) was imported from a Signal Tap output file:

Here is the input signal to the ADC and the output signal from the DAC:

MATLAB code

figure(1)
plot(time,count);
xlabel('sample');
ylabel('counts');

figure(2)
imshow(g);