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.

TPS92518: TPS92518: Output Current Control

Part Number: TPS92518

Hi Engineer,

We use TPS92518,and we want to output 0A current :

Could we set the value : 0  to the  LEDx_PKTH_DAC Register ?

If  LEDx_PKTH_DAC Register has limit mininum ?

Thank you!

  • The idea of writing 0 to LEDx_PKTH_DAC and having the part be disabled did come up during development, but to give the absolute maximum analog dimming range 0 was left in as an operating point. The internal DAC is outputting an analog zero at that point, but because of small amounts offset in the off-time circuitry, a few mV of analog output are still present. This can cause the part to switch at its lowest possible level.

    What most users do who want LEDx_PKTH_DAC = 0 to disable the output is to implement this in software. Write a subroutine in the micro controller; when LEDx_PKTH_DAC = 0, then write the CONTROL register, bit position 0 or 1 depending on which channel it is, to '0' to disable the channel.  Then you can freely use LEDx_PKTH_DAC = 0 to disable the part if you wish. This is an example for disabling Channel 1:

    if (LED1_PKTH_DAC = 0) then

       CONTROL = 0h

    else if (LED1_PKTH_DAC > 0) then

       CONTROL = 1h

    note: additional logic may be required to handle how you want to enable the channel. It is simplest if you use the psuedo code above and make LEDx_PKTH_DAC your only way to control the channel enable and use that everywhere in your code.  This is just one idea of how to control the enable and CHxPKTH_DAC register. This is just a high-level pseudo-code example to give you an idea of how to allow LEDx_PKTH_DAC to control the register. Many other solutions exist and will vary depending on your exact implementation. Bit masking will also be required to mask the other bits in the CONTROL register.