+ Post New Thread
Results 1 to 6 of 6

12th September 2017, 13:19 #1
 Join Date
 Jul 2014
 Posts
 180
 Helped
 13 / 13
 Points
 1,423
 Level
 8
adc daughter card unsigned output
hi,
i am using a thdb ada daughter card for converting a analog signal to digital which is 14 bit . it is giving a unsigned output. i need to multiply it with another sin wave which will have the same frequency. i got few quires
above figure i cached form signal tap logic analyzer, here first siganl (ADC_DA) is multplaying with x_out and y out which is sin and cosine signal and middle two are the outputs. my problems are
1:: i need to use signed calculations here, but the sin signal at 800 khz (ADC_DA)from the adc card is showing like attached image above. how can i
covert that unsigned output to a signed output which will looks like a sin wave?. if i apply unsigned line chart in signaltap for adc_da , then it
exactly looks like a sin wave, so it will create a problem in signed calculation right? can anyone got a solution for this? else its ok to multiply .
2:: what will happen when two sine waves multiply digitally what will be the expected output. say if i multiply 800khz *800khz sine waves (both are in
binary values ) in an fpga, what will be the possible output?
any help is really appreciated.
thanks and regards

12th September 2017, 13:19

12th September 2017, 13:58 #2
 Join Date
 Apr 2014
 Posts
 9,721
 Helped
 2344 / 2344
 Points
 47,600
 Level
 53
Re: adc daughter card unsigned output
Hi,
I assume this is a problem of definition.
You say the ADC is giving unsigned output, but your chart shows signed (negative) values.
It seems you just need to define it as unsigned, too.
Then the signal should show DC offset. About half ADC_range.
***
It seems you are doing a DFT analysis.
Then the DC offset won´t harm the result. It is cancelled out automatically.
But it is not nice. I recommend to
* read the values as unsigned
* the subtract half_adc_range into a signed value
Maybe more "standard" is to use 16 bit values.
You can´t use that "distorted" signal. The result is nonsense.
Klaus
1 members found this post helpful.

12th September 2017, 13:58

12th September 2017, 16:06 #3
 Join Date
 Apr 2017
 Posts
 37
 Helped
 8 / 8
 Points
 272
 Level
 3
Re: adc daughter card unsigned output
It seems that data from ADC are in 2'c complement format. Check ADC datasheet to be sure what is a data format.

12th September 2017, 16:06

13th September 2017, 07:56 #4
 Join Date
 Jul 2014
 Posts
 180
 Helped
 13 / 13
 Points
 1,423
 Level
 8
Re: adc daughter card unsigned output
HI,
thanks for the replay KlausST.
My adc output is 14 bit only, (its an thdb daughter card connected to fpga which my design is running).so i cat change it :(
now i am reading adc output as unsigned only. but how can i convert it into a signed value?
* the subtract half_adc_range into a signed value
i had no idea what to do?
one more thing is like how exactly the multiplied sine wave looks like(fpga) ?
any help is really appreciated :)
when i select the
thanks

13th September 2017, 08:29 #5
 Join Date
 Apr 2014
 Posts
 9,721
 Helped
 2344 / 2344
 Points
 47,600
 Level
 53
Re: adc daughter card unsigned output
Hi,
no need to change the ADC. I never thought of that.
***
* the subtract half_adc_range into a signed valuecan you please tell me how to do that ?
ADC_value = 14 bit unsigend
Result = 14 bit signed (Maybe 16 bit signed)
Half ADC_range: ADC range = 2^14 = 16384, half of it = 8192
result = ADC_value  8192
****
one more thing is like how exactly the multiplied sine wave looks like(fpga) ?
It is very easy to calculate/simulate this with any spreadsheet like excel.
Klaus
1 members found this post helpful.

13th September 2017, 08:29

13th September 2017, 09:56 #6
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 40,361
 Helped
 12332 / 12332
 Points
 233,653
 Level
 100
Re: adc daughter card unsigned output
Conversion between 2's complement and offset binary format is simple, just invert the most significant bit.
+ Post New Thread
Please login