Results from ADC on SPARTAN 3E board

Status
Not open for further replies.

asraf

Junior Member level 3
Joined
Nov 22, 2010
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,589
hai there,
I have write verilog code to convert analog signal to digital for a sin waveform of 100khz. attached with this message is the output data that i plot on excel file. can you please explain to me the results that i obtained...i cannot understand the results that i get..thank you..


 

Looks like your plotting 2's complement data as if it was unsigned data.

Regards
 

I'm not expert in spartan 3e, but possible too big signal for the adc. Try a smaller signal and post the result.
 

What is the ADC resolution? You are plotting data with a 8 bits resolution and your ADC is probably 10 or 12 bits.
 

As pointed out ads-ee, you are treating the data as if it is unsigned integers where in fact the data you received from the ADC is in 2's complement form. And you are probably transmitting the data back to your PC with a UART. So you are getting your plot like that. (I am sure of it because one of my batchmates did the same thing).
To get the accurate plot, for any received value greater than equal to 128, subtract 256. You will get your sine curve.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…