+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Full Member level 3
    Points: 1,465, Level: 8

    Join Date
    Jul 2014
    Posts
    183
    Helped
    13 / 13
    Points
    1,465
    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 Click image for larger version. 

Name:	Capturefromsignal.JPG 
Views:	8 
Size:	95.8 KB 
ID:	141175

    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

    •   Alt12th September 2017, 13:19

      advertising

        
       

  2. #2
    Super Moderator
    Points: 51,881, Level: 55
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster

    Join Date
    Apr 2014
    Posts
    10,431
    Helped
    2478 / 2478
    Points
    51,881
    Level
    55

    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.

    •   Alt12th September 2017, 13:58

      advertising

        
       

  3. #3
    Member level 3
    Points: 429, Level: 4

    Join Date
    Apr 2017
    Posts
    67
    Helped
    12 / 12
    Points
    429
    Level
    4

    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.



    •   Alt12th September 2017, 16:06

      advertising

        
       

  4. #4
    Full Member level 3
    Points: 1,465, Level: 8

    Join Date
    Jul 2014
    Posts
    183
    Helped
    13 / 13
    Points
    1,465
    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
    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



  5. #5
    Super Moderator
    Points: 51,881, Level: 55
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster

    Join Date
    Apr 2014
    Posts
    10,431
    Helped
    2478 / 2478
    Points
    51,881
    Level
    55

    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 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


    1 members found this post helpful.

    •   Alt13th September 2017, 08:29

      advertising

        
       

  6. #6
    Super Moderator
    Points: 236,290, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    40,859
    Helped
    12488 / 12488
    Points
    236,290
    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.



--[[ ]]--