This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPIC8101: Advanced mode SPI value to analog value conversion

Part Number: TPIC8101

Tool/software:

Our team is currently using TPIC8101 for measuring knocking in one of our engine model. 

In the implementation, we are using the TPIC8101 advanced mode SPI communication to get the knocking value.

But we are currently getting trouble with the conversion formula of the SPI data.

We know from the Data sheet that the SPI return 10 bit representation of the integrated knock value.

From those 10 bit data, can you provide us with the formula to convert those 10 bit data back to the integrated knock value?

  • Vieri, 

    What do you mean by "getting trouble with the conversion formula of the SPI data"?
    Can you give an example?

    Regards,
    John

  • Hi John,

    There are 2 common formula to convert digital value to analog value.

    1st: AnalogVal = DigitalVal / (2^TotalBit) * RefVolt

    2nd: AnalogVal = DigitalVal / (2^TotalBit - 1) * RefVolt

    From those 2 options, I am confused of the following things:

    1. What is the Reference Voltage value that I should use, is it the VDD of TPIC8101?

    2. What is the correct formula for the ADC, is it the one with (2^TotalBit) or (2^TotalBit - 1)

    Regards,

    Vieri

  • Vieir,

    All great questions. 
    This is an older part, so I will need to dig into the archives to find the answers you are looking for and will update this thread by COB on Friday.

    Regards,
    John

  • Vieir,

    I have not been able to find any docs in our archives that directly answer your questions.
    Just to confirm: are you looking for an equation that it is equivalent to the 10-bit DAC in the lower left of the diagram below?

    Regards,
    John

  • John,

    Sure, that will work too.

    Regards,

    Vieri

  • Vieri,

    I think we can find a useful approximation for the DAC based on the data sheet parameters and a few assumptions.

    Since the OUT buffer is unity gain with output voltage rails of  VOL=120mV and VOH=VDD-0.15, you should be able to express
    the DAC output range as VOH-VOL = VDD-0.27 = 5.0 - 0.27 = 4.73V.
    This assumes the unity-gain buffer faithfully follows the actual output of the DAC without any added noise, clipping or distortion.

    The LSB voltage would be VLSB = 4.73/(2^TotalBit - 1) = 4.73/1023 = 4.624mV

    The DAC output voltage would then be V_DAC = N • VLSB  where 0 ≤ N ≤ 1023 is the decimal value of the digital input.

    I hope this helps. Please let me know if you have any questions.

    Regards,
    John

  • John,

    Since the OUT buffer is unity gain with output voltage rails of  VOL=120mV and VOH=VDD-0.15, you should be able to express
    the DAC output range as VOH-VOL = VDD-0.27 = 5.0 - 0.27 = 4.73V.

    When I tested the TPIC8101, the SPI value for the Integrator Output seems to have a minimum value of 24 (digital value, convert to Volt by 4.6mV/LSB => 110mV).

    Therefore, it seems like TPIC8101 ADC has already put the VOL specification (Low-level output voltage) to their DAC output. It makes me think whether the 4.73V range you mention is correct or not. Since if we use 5V as range of the DAC, conversion factor will be 4.88mV/LSB which will convert 24 (digital value) to 118mV (closer to the VOL).

    Can you confirm whether the range of this DAC is 4.73V as you mentioned, or 5V?

    Best regards,

    Vieri

  • Vieri,

    I assumed the DAC (internal) output had the same swing as the output buffer, but your numbers prove that isn't true.

    Your numbers are more consistent with actual operation, so those are the better approach.

    Regards,
    John

  • John,

    I see, so I suppose that there is no official formula to convert the ADC value. Can you confirm if that's correct? Then I will close this ticket.

    Regards,
    Vieri

  • Vieri,
    Apologies, but I lost my way as we worked the the questions.
    For some reason, I thought you wee asking about the DAC, not the ADC.

    I have looked thru internal documents and have not seen any dedicated ADC/DAC equations.
    The system equation shown in the data sheet is the only equation that is referenced.

    Regards,
    John