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.

TLC5917: Reading Error codes

Other Parts Discussed in Thread: TLC5917

I am a little confused by the manual for the 5917. I need to read the OPEN and SHORT status from the device. I see how to put the unit into 'special' mode but I am not sure how to read both OPEN and SHORT status.

I assume we shift 8 bits out of the 5917 which will contain either open or short status for the relevant LEDS? But how to select either open or short detection? O

Can someone elaborate on this a little?

Thanks

  • Phil,

    The TLC5917 does not save OPEN and SHORT information separately.  The Error Status Code is an OR of OPEN, SHORT and over-temperature errors.

    Regards,

    Dick

  • OH. That's not good. I guess I missed that in the manual? Is it aptly described?

    So then it is just a single byte shifted out of the device.

    Thank you for your answer.

  • Phil,

    There is a note in Table 2 (Diagnostic Features) that states "The device has one single error register for all these conditions (one error bit per channel)."

    That is the only place I find an explicit statement.  I will request an update to make is more clear.  I understand this does not help you at this point.

    All active errors are in the single byte transferred out.  Note that for an error to be registered, that output must be on.

    Regards,

    Dick

  • Dick

    First of all, thank you for your responses. Yes I just found the subscript that details that point. My bad. Though it would be helpful to make it a little clearer in the section that describes the procedure for reading the error status.

    best!

    P

  • Still having some difficulty reading the error bits from this.

    I am setting special mode correctly because I can change the current drive.

    I have a matrix of LEDs connected to the 5917.

    I select an LED in the matrix.

    I set Special mode.
    Then, I generate the four pulses of the error detection mode with OE going low after the first pulse.sequence
    I wait 5uS, and set OE high again during the first clock HI of the 8 bit error read

    then attempt to shift the data out of the 5917.

    When I view this on my scope I sometimes see the SDO output of the 5917 going high early in that sequence but never during the last 8 clocks of the error read sequence.

    Do I have to switch to special mode for every error detection read?
    Can I leave it in special mode and do numerous error reads as I go through the matrix?

    Just looking for some hints here as I need to get this working soon. As far as I can tell my sequence is that of the manual.

  • OK.. I've been hacking away at it and I noticed another anomaly .

    I have been able to get some response from the 5917 when I turn all LED enables on.
    Turning on a single channel, the error codes always come back as zero.

    However, reading the error status appears to change the current settings? It shouldn't I know.. but I was hoping this might help decipher the problem.

  • Phil,

    Thanks for the information.  Changing the current settings means you're writing to the Configuration Register.  The Configuration Register (page 24) will change the current from the maximum value set by the external resistor to as low as 8% of the programmed value.  It is written during special mode.

    One item to be careful about is that the output must be ON to register an error.  So, when an error is checked, if that output is OFF, then it will show as no error.  All errors are checked at the same time.  If you are running a matrix of LEDs you must check and verify each set individually - those are are not ORed into a single read.

    Regards,

    Dick

  • Thank you Dick.

    I am able to see what I believe is error data on the SDO line, where I had assumed it would show up.

    Though I seem to have to have more than one channel on to get  valid data. When selecting a single channel I never see proper error status.
    I have a separate routine to set special mode. And one for current setting in the config reg. The detection routine sets special mode right before reading status and is called every time I update the matrix and set the 5916 channel enables to a value.

    When the error detection completes, the current settings have deviated. I must be writing to the config reg but my waveforms are exactly what are in the doc.

    As a test, I have shorted one of the LEDs. THe first time I read the error register for that LED it reports a 0. Which is correct. Subsequent reads for that same LED yield a 1.

    What I had wanted to do was

    Set normal mode
    Set a single LED on
    Enable it's drive in the matrix
    Set special mode
    Read that LED's Error bit. (there's only one right? )

    Do I have to leave special mode to select another LED channel? Or is it proper to set special mode, then, in a loop,  select LEDs, check status?

  • Dick. I think I have it working I must have been writing to the config reg AND getting error data. So I made sure I set Normal Mode prior to setting the LED I want to test and then setting special mode right before the 12 pulses of the error detection routine.

    thank you for your patience. I know that on your side it is often hard to help us when we're flailing!

  • I do have another question if I may.

    During the setup of Special Mode,  During the last two clocks of the switch to special mode, I see a transition on the SDO output. Either on CLOCK 4 or clock 5

    Also, during the first four clocks of the error read, I see transitions on SDO.

    Do you know what those are?

  • Phil,

    My first reaction is that this might be the previous data simply being shifted out. Does the data correspond to what was written previously?

    By transition, do you mean the data changes or that there is a glitch or a brief change is state?

    Regards,

    Dick

  • They're transitions during the preamble for the error read mode. Just curious what they are.

  • Dear Dick,

    I' have a problem to red the error code of the TLC5917. I use a microcontroller to comunicate with the device. I've made few routines like:

    -switching between normal mode and special

    -switching to special mode to normal mode

    -setting the current (in special mode)

    -setting the LED (in normal mode)

    In my application, only one led is on at the same time

    All the routines work fine, but i have some issues with the read of Error Status. Indeed each bit i read,( when i follow the datasheet) is '0', which signifies I have all the errors possible. The datasheet is not very clear for me. So could you help me to resolve the problem?

    First could you told me what is the good sequence to retrieve the Error Status register?, is there anything to writeon SDI line during the reading of the error code?

    I try the following sequence:

    - Switching to special mode

    -Set the current

    -switching to normal mode

    -select the led I want to light

    -switching to special mode

    -read the error status

    -switching to normal mode

    - Turn ON the LED with OE=0

    I thank you in advance for your help

    Marc HUBERT