15 Segment ASCII Display Project

With the resurgence of interest in hobby electronics, I thought my readers might enjoy looking at the details of a simple project I did with cheap EBay-acquired parts. This was a fairly straightforward scrolling LED ascii display.


A simple-to-use Simstick display, capable of showing a reasonable subset of ASCII, utilizing cheap 15seg displays.

15 Seg Display

I chose to use LTP588G 15seg display, since it was cheaply available via EBay or surplus.

Segment Lettering

I could not find a “standard” segment-to-letter map for a 15 seg display, so I have

15seg 15 Segment ASCII Display Project

extrapolated from the standard 7 seg layout:

Segment Map

The LTP588G is a 16 pin device in an 18 pin form-factor. It has pins 2 and 8 missing on the

15seg pins 15 Segment ASCII Display Project

left side.

Character Shapes

Drawing all the shapes of the letters and numbers is not terribly difficult. It in somewhat more of a challenge to do this in a way that allows for different shapemaps. I chose to automate the generation of segment display header files from simple Ascii drawings.

Character Shape File

This is a text file, Unix format (no formfeeds), with all the desired shapes drawn in ascii characters. The number 8 from my main shape file looks like:

 [   ]
 [   ]

Header File Generation

The shape file is parsed by a little python program I wrote. Use char_compiler.py to generate a header file suitable for my C compiler (CCS C) to use as an #include. Creating the header: python char_compiler character_defs.raw > 15seg.h To use the generated character shapes, just include the 15seg.h file you just created and pass the ascii character you want to its get_15seg() method. Note that the return value will need to be logically ORed with 0xFFFF if your display is wired to cathodes, as is the one we are using for this project.

First Step: Testing one display

The easiest first test is to make one display show characters typed in via an RS232 connection.


For this test, I used a PIC 16F877a running at 20Mhz wired as follows:

      • PORTB – 0-7 wired to segments A-H
      • PORTD – 0-6 wired to segments I-O
      • RS232 – TX to C7, RX to C6

15seg letters pins 15 Segment ASCII Display Project

Test Program:

Test program: [source] [hex]


Type characters into a terminal session and hopefully see them appear on your 15 segment display.

Second step: Same thing, but using I2C

15 Pins is far too many pins to give up. Especially since my target chip is a 16F84. PCF8574P I2C IO Expander chips are perfect for this purpose. They each yield another 8 pins of IO, and you can put up to 8 of them on the same I2C bus. Using two of these, I drop the pin usage from 15 to 2.


      • PIC16F877 at 20Mhz (PIC)
      • 2 PCF8574P I2C IO expanders (IO1 & IO2)
      • LTP588G 15seg display

Test Program

Test Program: 877_15seg_i2c.c [source] [hex]

Third Step: 2 Displays

Adding more displays complicates things a bit.

Lighting the displays.

To fool the viewer into thinking all the displays are on and updating simultaneously, I’ll just flick the displays on one at a time, real fast. To do that, the V+ line on each display will have to be controlled by the PIC. However, the PIC can’t source enough current, so I’ll have to use a transistor.

Creating a Character Buffer

It is too awkward to manually control each display. It is much more convenient to just append characters to a small buffer and then display them as the controller has time. I wrote a small little ring buffer library which suits my purposes pretty well.


      • PIC16F877 at 20Mhz (PIC)
      • 2 PCF8574P I2C IO expanders (IO1 & IO2)
      • 2 LTP588G 15seg displays (LED1 & LED2)


Follow the schematic [gschem format] [postscript] [pdf]

Test Program

Test Program: 877_15seg_2disp.c [source] [hex]


Type characters into a terminal session. They should appear on the displays, scrolling along as you type more. Feel free to download all the GPL Licensed code from this article: 15seg.zip

Coders Eye - Web Dev Tutorials and How-To Guides for Beginners
Enable registration in settings - general