Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Problem with LED Driver (STP16C596)

Status
Not open for further replies.

brian1234

New Member
Hi all,

I am trying to use the STP16C596 16-bit constant-current LED sink Driver

https://pdf1.alldatasheet.com/datasheet-pdf/view/85761/STMICROELECTRONICS/STP16C596.html

I have two of them (DIP samples) and I have about convinced myself either:
1.) Both samples sent were faulty
2.) The protoboard I have been using is messed up in some way.
3.) Their chip itself is terribly designed and doesn't work
4.) I'm an idiot/there is something I am missing after hours and hours of checking and looking over connections and data sheet.

If anyone has used these and gotten them to work I'd be very grateful if you would tell me a bit of how you did it.

below is the description of my problem (*be warned it is a long description):

I am working on trying to interface it with a PIC microcontroller. However, it has come down to just getting it to work at all, not even with the PIC.

I have checked and rechecked my connections and the voltages and currents with multimeter to make sure everything is correct, as welll as studied the data sheet thoroughly.

Here is my problem:

I am working on trying to interface it with a PIC microcontroller. However, it has come down to just getting it to work at all, not even with the PIC, I've tried it both using the PIC and by making the clock and load transitions by hand and can't get it to work.

I keep the serial data input high, I set output enabled (/OE to ground) I set up 16 low-current LEDs to each of the outputs, and connect the proper resistor to give them the right amount of current. Then I test shifting data in, then latching it, and this does not work properly.

Sometimes if I go for a few clock cycles and then switch the /LE from high to low and back to high, it will latch the values stored in the shift register properly. However, if I run more clock cycles (sometimes >=10 or >=14 ) And then switch the latch enable in the same way, with the input still fixed to the VDD voltage (high) source, the LEDs are all turned off, i.e., it's as if it stores low values in all the latch flip-flops. I don't even know how this could be possible according to the data sheet, since the clock only allows more values to be shifted into the shift register, and since the input is tied to high, this should always be full of 1's. Then the latch enable only allows the latch flip-flops to hold the new output values of the register, so since the register should be fixed at having only high values, latching or not the output should never be cleared in this way.

I have checked to make sure wires aren't touching and output enable is fixed on without touching other wires, and that the input and source voltages are within the proper ranges, I cannot figure out how to get this to work or what the problem is. (Also you may think I put the LEDs in backwards. but shifting in 0s causes nothing to light up, and for the small shifts, shifting in 1s does cause them to light up properly as I do it one by one, so besides the fact that I follow the data sheet, it seems that they have to be correctly connected).

Also, I was not sure how exactly the LE is triggered (i.e. rising edge, falling, both, since the data sheet is not very clear on this), but this should not matter as I described above if the steps are separated, according to the block diagram on the datasheet.

Also, it seems like the chips will selectively work, I moved one to another spot on the protoboard with same configuration, to see if that was the problem, it stopped working at all, replaced it with the other chip, and it semi-worked.

Any help would be greatly appreciated.
thanks in advance
 
What PIC are you using? I don't have a STP16C596; however, the datasheet looks like you might be able to use the SPI module of a PIC processor. From reading the data sheet, I get the the OE line when low will turn on the LEDs according the data shifted in, and when it is high all LEDs are off ... therefore you should only change OE at the end when transmitting is completed. From reading above, I'm not sure if you are doing this.
 
Thanks for trying to help.

I've used both 18f452 and 18f620 with the picdem demo board, and without, and with and without using the in-circuit debugger ICD2.

I am pretty sure the output enable is not the problem, I fix it to low, so that the output is alway enabled; in their block diagram, you can see that the output of the latches is ANDed with the opposite of the OE pin, so when i set it to low, that is high, and whatver is stored in the latches should be displayed. (Just in case, I have tried switching it before and after and fixing it to high, this doesn't fix anything).

I thought of another possibility:
Do you think it's possible wires could be touching underneath the protoboard where they are connecting and hitting pins on the chip they shouldn't be?
 
brian1234 said:
I thought of another possibility:
Do you think it's possible wires could be touching underneath the protoboard where they are connecting and hitting pins on the chip they shouldn't be?

Hi Brian,

Perhaps you should qualify your hardware first, then let us see your code if you're still havin' a problem?

Kind regards, Mike
 
You could use a DMM to test for problems with the protoboard. I'm more familiar with 16F devices, particually 16F505, 684, and 818. The 18F452 has a MSSP which you can configure for SPI communications ... is that what you are using? I have used master SPI on the 16F818 to communicate with a MC14489 (5 Digit 7 Sement Driver IC).
 
Sorry for the late reply and thanks for your help.

I have found the problem and it is kind of odd, I figure I should post it in case this happens to anyone.

I had my LEDs (HLMP 1719) all right next to each other on the protoboard and directly connecting to the chip (their pins going to the same protoboard row as the chip's pins for each one), I think that somehow, maybe because of the long unshielded wires, they were making connections underneath the protoboard, or perhaps it had something to do with them being so close together with the wires not having any covering on them, i don't know.

But moving all the LEDs to another place on the protoboard and giving each plenty of room from the next, and just connecting wires from the driver chips to the more distant LEDs completely fixed the problem.

To me this is a strage thing.

The protoboard was just Global Specialties PB-105 Proto-Board.

And yes I had previously measured everythign with a DMM.

Yes now I will try and use the built-in serial of the PIC; I didnt' before since I was trying to get it to work I wanted to generate the specific clock transitions and such myself first so that I could slow it down and stop it in between to help determine the problem.
 
You mean for the power source right (VDD input)? Well I am using a power supply fixed at 5V, and at one point I did put a cap in there, but it didn't fix anything (I don't remember what capacitance it had though).

Though I have never used a capacitor before with digital ICs and they worked fine, I think you are right, this is a good idea to do, and I will from now on. Thanks for the advice.
 
Hello,

My major problem with this chip is that it 'blows' output pins, and needs regularly replacing. This is very frustrating. It only blows about one per chip at random. I think this is because I haven't put a capacitor between +Vled and GND. Although I can find no mention of this in the docs, there is a diagram showing it (C=22uF) on page 15 at:

https://www.st.com/stonline/books/pdf/docs/10154.pdf#search="STP16C596"

Has anyone else found this issue????

Also, page 12 says:

"Note: 1 To prevent current overshoot, during the Outputs switching, the overhead output voltage must
be less than 1V"

although I'm not entirely sure what this means.

Do not try to manually input the levels as pressing the 'clock switch' will flicker through >16 clocks and loose your input. To test, you could try using the parrallel port as this can drive the inputs (for me at least - remember to connect both grounds together).

I had some issues with latching, but I can't remeber exactly what it was. I think it may have been that when I latched it to output, it outputted correctly, but forgot what had been serially input. Anyway, it didn't seem to work quite as the functional diagram suggested. I think this is described in the note on page 6:

"Note: When the LE terminal is at High level, latch circuit doesn’t hold the data it passes from the input
to the output."
 
Last edited:
brian1234 said:
You mean for the power source right (VDD input)? Well I am using a power supply fixed at 5V, and at one point I did put a cap in there, but it didn't fix anything (I don't remember what capacitance it had though).

Though I have never used a capacitor before with digital ICs and they worked fine, I think you are right, this is a good idea to do, and I will from now on. Thanks for the advice.
You need a 0.1uF cap from vcc to GND at every chip. It might work without some of them, but it's cheap insurance. Digital chips create current impulses on the supply rails. The inductance of the supply distribution network can be high enough to cause these current spikes to create significant voltage spkies, which can lead to logic errors.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top