Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] adc daughter card unsigned output

Status
Not open for further replies.

dipin

Full Member level 4
Joined
Jul 16, 2014
Messages
223
Helped
14
Reputation
28
Reaction score
14
Trophy points
18
Activity points
1,731
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 Capturefromsignal.JPG

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
 

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
 
  • Like
Reactions: dipin

    dipin

    Points: 2
    Helpful Answer Positive Rating
It seems that data from ADC are in 2'c complement format. Check ADC datasheet to be sure what is a data format.
 

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
can you please tell me how to do that ?

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
 

Hi,

no need to change the ADC. I never thought of that.

***
* the subtract half_adc_range into a signed value
can you please tell me how to do that ?
Where is the problem?
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) ?
A sine multiplied with a sine (both same frequency) gives a sine with doubled frequency and an DC offset as result.

It is very easy to calculate/simulate this with any spreadsheet like excel.

Klaus
 
  • Like
Reactions: dipin

    dipin

    Points: 2
    Helpful Answer Positive Rating
Conversion between 2's complement and offset binary format is simple, just invert the most significant bit.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top