Need help with DM13A 16 bit Shift register IC

Hi,

I have a very basic setup of the DM13A IC with one 16 segment alphanumeric led display.
I want to control the segments with the driver, however it does nothing. previously I have already managed to drive this led with two MAX7219 and works perfectly but if possible would like to reduce the device count.

Here is the code, I use the same approach as with the max7219. Pull up the LAT, send the 16 bit FFFF to enable all segments for testing, and then pull LAT down.

#include <SPI.h>

#define DM13A_CLK 9
#define DM13A_LAT 7
#define DM13A_DAI 8

void setup() {
  // put your setup code here, to run once:

  pinMode(DM13A_LAT, OUTPUT);
  pinMode(DM13A_CLK, OUTPUT);
  pinMode(DM13A_DAI, OUTPUT);
  
  
  digitalWrite(DM13A_LAT, LOW);
  digitalWrite(DM13A_DAI, LOW);
}

void loop() {
  // put your main code here, to run repeatedly:


digitalWrite(DM13A_LAT,HIGH);
shiftOut(DM13A_DAI,DM13A_CLK,MSBFIRST,0xFF);
shiftOut(DM13A_DAI,DM13A_CLK,MSBFIRST,0xFF);
digitalWrite(DM13A_LAT,LOW);

}

On the attached picture the wiring can be seen. The led is Common Cathode so the common pin is connected to the ground.
Any ideas on why it is not working would be appreciated.

On the photo it cannot be seen but I have put a 2Kohm resistor to the REXT pin of the ic as described in the datasheet.

Thanks!

The dm13a is a constant current sink driver. When an output is switched on, it can sink current to ground through the chip. When an output is switched off, it will not sink current. The outputs can not source current. With a common cathode display, you need a driver that can source current. You need to swap to a common anode display to use this chip. If you must use this display, I would suggest using an ht16k33 chip.

Okay, thank you. I have anode version of this display so definetely will give it a shot.

PaulRB:

The dm13a is a constant current sink driver. When an output is switched on, it can sink current to ground through the chip. When an output is switched off, it will not sink current. The outputs can not source current. With a common cathode display, you need a driver that can source current. You need to swap to a common anode display to use this chip. If you must use this display, I would suggest using an ht16k33 chip.

Thanks a lot!! With common anode it lights up like a christmas tree!
And with your explanation now I get a better overview of current sink and current source ICs. We can close this topic.

No problem.

Have a look at that hc16k33 chip. You can get cheap on breadboard friendly modules from eBay. One chip can drive 8 x 16-seg displays (common cathode), multiple chips can be connected to same two Arduino pins (i2c bus) and chips can scan button matrix also.

Sure thing thanks for the tip! I see it comes smd pre-soldered, and quite cheap. Putting pins on it is not a problem.

What i experienced with i2c is that it is quite slow comparing to spi. if i send data to an address on i2c every loop, it creates a general lag on the arduino. I have to wait 20 millisec (using millis) at least to call again so parallel SPI communication can go without distruption. Even if I set the i2c speed to 400000.

Yes, i2c is slow compared to SPI. But i2c is fast compared to human eye. Its not necessary to update more often than 20ms because the eye will not see the difference. Unless you need to multiplex. But ht16k33 does the multiplexing for you, so you only need to update when the display data changes.