Interfacing a Siemens DL2416T

Got some time today to finally give interfacing a DL2416T a go. Spent half an hour debugging the code and all the connections before realising i forgot to tie 74HC595’s master reset pin to HIGH…

The problem, of course, lying in the fact master reset is active when low. Anyways, got it to work and wrote some quicky functions for controlling the display. Here’s the result:

Here’s how it works. There are 2 address bus lines (A0-A1) that are used to select the digit you want to change. There are 7 data bus lines (D0-D6) that are used to select a character you’ll be writing. You set the address, then the data bus, then flash the write (WR) pin high for a bit (millisecond seems to work just fine) and the display takes care of everything else.

There are some other pins worth discussing. Chip enable pins (CE1-CE2) are used to address the right unit in multi-display configurations (you can hook up up to 4 DL2416Ts and control them with a single address and data buses). We’re only using one here, so i’ve got both hardwired LOW. The clear pin (CLR) clears the display’s RAM and, obviously, the text currently displayed. Hardwired HIGH because i don’t need it. BTW, all three (CE1, CE2 and CLR) are inverted, so they’re active LOW. The following two pins are for cursor control, which – again – i’m not using, so they’re hardwired LOW (cursor enable) and HIGH (cursor select, inverted). Finally, there’s the display blank (BL) pin, which simply blanks the display when HIGH, but doesn’t clear the RAM. If you PWM pulse it, you can also use it to control the display brightness. Curiously, it’s marked as active LOW, but actually blanks when pulsed HIGH. Yeah, i know, makes no sense to me either.

I’ve hooked the data bus lines to a shift register to reduce the number of pins used on the Arduino. The address bus and write pin are controlled directly. Character codes are actually ASCII-compliant, as long as you don’t go below 0x20 and above 0x5F. So i wrote a simple if-then that shifts the lowercase characters downrange to uppercase.

Here’s my writeChar function:

void writeChar(int character, int pos)
{
PORTD &= B11111100; // Mask the address pins A1 and A0
PORTD |= 3-pos; // Select digit
digitalWrite(latchPin, LOW);
if (character<0x60) shiftOut(dataPin, clockPin, MSBFIRST, character); // Select character else shiftOut(dataPin, clockPin, MSBFIRST, character-0x20); // If uppercase, proceed, if lowercase, transform into uppercase digitalWrite(latchPin, HIGH); digitalWrite(pinWR, LOW); // Write delay(1); digitalWrite(pinWR, HIGH); }

I've set up a global variable four-character "buffer" that all the functions write to and a refreshScreen() function that pushes the buffer contents to the display. You can find the complete (ugly) code here.

Tags: , , , , , , , , , , , , , , , ,

6 Responses to “Interfacing a Siemens DL2416T”

  1. NoPinky 28/05/2013 at 14:24 #

    hello,
    I also have some of these and tried for hours to get them working with a attiny45 and a shift register. I have the feeling that some of my DL2416s are faulty or I fried them, the later is unlikely because I only work with 5V, which should be perfectly fine. I followed the your descriptions and also from another source online.
    The firmware I use to test is essentially a loop that sends out data to the datapins of the DL2416 and then ingrement the data and send again (I just wanted to see it flicker the characters first). At first it worked, the characters were displayed. So I was happy and went on to change the code and a bit of wiring… it stopped working somehow. Even after I ripped everything apart and started over again with led on the pins to verify the output. Sometimes the segments flicker randomly when I pull the DL2416 from my breadboard.
    I even tried to hard wire the whole thing to display a static character (yes I toggled the WRTpin from high to low to simulate the write signal)… but nothing. the damn thing stayed dark…
    Do you have any idea how I can verify if my DL2416s are ok, or broken. Or any idea where the problem could be?

    Thanks in advance!

    • jz 27/11/2013 at 01:56 #

      If you just want to test a unit out, tie pins 1, 2, 4,5 low.
      Connect +5 and ground.
      Data input D0 is high.
      A0 and A1 can be high or low it will just set which digit will light.
      Leave all other pins unconnected.
      This will put the cursor character in one of the digits depending on A0 A1

  2. jz 27/11/2013 at 02:00 #

    Sorry pins 1, 2, 5, 6 are tied low not pin 4

    • HUck 30/11/2013 at 19:32 #

      So, if I connect them like you suggest for testing and they don’t light up, they are most likely shot, right? I assume the side with the writing on it is the bottom? How likely is it that they die when you reverse polarity?

  3. scruss 17/11/2016 at 17:22 #

    Were you running your Arduino from an external power supply, or from USB only? I’m thinking that the reason my 2416s aren’t lighting is that they draw ~100 mA, which is the total maximum USB current draw requested by the Uno

    • orcinus 17/11/2016 at 20:15 #

      I honestly don’t remember, but that sound at the beginning of the video sounds like plugging in a barrel jack. So i’d say it’s entirely likely this was with external power supply.

Leave a Reply