Forum Discussion
Altera_Forum
Honored Contributor
14 years agoI've been sending in a square wave and sine wave of varying amplitude (0 V up to 6.2 V). Clipping doesn't occur until 6.2 V so this must be the max input range (I appear to have been making a stupid mistake and taking the chip supply voltage as the input signal voltage). Multiplying the samples by Q = (6.2 - 0V)/2^16 = 0.0946 now gives me the proper results (I hope!).
2 Vpp, 1Khz, square wave input signal gives me ADC samples of approximately +/- 1000, which I assume is +/- 1V. Varying the input amplitude to 3 Vpp gives ADC samples of +/- 1500 which also appears correct. However, a secondary problem has shown up: DC input signals don't work. The ADC samples remain approximately 0 even with a varying DC input. I configured the WM8731 codec to disable the ADC high pass filter but it still appears to be removing the DC signal... --- Quote Start --- From the datasheet: When the high-pass filter is enabled the dc offset is continuously calculated and subtracted from the input signal. By setting HPOR the last calculated dc offset value is stored when the high-pass filter is disable and will continue to be subtracted from the input signal --- Quote End ---