Electronic – Problems driving leds with the MM5450


First what is my final goal: to drive 24 RGB LEDS using a microcontroller connected serially to a Micrel MM5450 LED driver. It would be nice to be able to drive all of them individually (72 LEDs), but I'll settle (as I did) for multiplexing and only driving one color at time. In the case of the MM5450, I'm using 3 outputs to drive 3 transistors, one for each color.

Now here's the problem I'm having.

I'm using the PLCC44 package, which seems to show some differences from the standard text in the datasheet. For example, the datasheet refers to 35 bits of data, but the PLCC only has 34 output pins instead of 35 in the DIP.

Just to get my feet wet, I've wired 4 LEDs to output pins 1 to 4 and left the rest disconnected. I've wired VDD and VSS (no decoupling capacitors), put a 100K pot on pin 21 (brightness control) and a 1nF on that same pin as the datasheet suggests.

I tried wiring DATAENABLE to GND, to VCC and to a pulldown resistor, but it didn't work as well.

The symptoms are that after I send data using the timing as indicated in the datasheet, I get weird results. For example, if I send all bits zero, at power on, only leds 1 3 and 4 will light up. Reset the uc and then led 2 3 and 4 light up.
If I send just bit one high, then led 1 and 4 light up, and then when I reset the uc leds 3 and 4 light up.
Just to clarify, when I say reset, it means that I assert the reset line of the microcontroller, which starts my program again (and sent a bitstream to the led driver).

I can't see a clear pattern of what's happening here. Anybody with more experience on this chip (or a suggestion of a completely different chip that will achieve my goals) to help me?



Ok, did some more tests and hooked a storage scope to data and clock. Here are my findings:

Clock and data are doing exactly what I'm telling them to do. As suggested, I placed clock and data on my PORTB and the data enable on my PORTC, if that matters.

My data sequence looks like this:
data: starts low
data enable: starts high
data sequence: 0 – [data enable low] – 1 – 34 bits of data – 0 – 0 – [data enable high]

Right now I'm working in the 10ms pulses. Since I'm using a breadboard connected to my devboard via long clip wires, I've analyzed the shape of the clock and data signals for any ringing and signal was pretty good.

From the symptoms, it seems that my bitstream is out of sync with the chip… I'm out of ideas

Best Answer

I suspect the problem is that you need to control the data enable line with the microcontroller. Set it high at reset. Then, set it low right before (more than 100 ns) you start transmitting data. After the 35 bits, bring it high again.

Also, the datasheet explains the missing 35th pin you were wondering about in Note 1 on page 1. In the MM5450, it is replaced by the data enable line.