Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Graphics Library for generic Dot Matrix Display?

  1. #1

    Graphics Library for generic Dot Matrix Display?

    Greetings!

    I'm curious if there are any graphics libraries out there for a generic dot matrix display. Basically, something that isn't specific to some controller chip. I'm working on a pinball project which will have a 128x32 dot matrix display that is driven by a kind of "old school" video feed (ie, no display buffers). I guess I shouldn't say old school since that's still how HDMI works. Anyways, the part number is Vishay LEE-128G032B-1. This module has Display enable, Row data, Row clock, Column latch, Dot clock, and Serial data for signals. It's a monochrome display.

    What I basically want is the ability to load a bitmap off an SD card for graphics/animations and then overlay text on top of that. So at a minimum, it would be helpful if there was something out there that could insert alpha/numeric characters into a two-dimensional array in RAM and I'd just create my own 'driver' to output that array.

    A more 'advanced' feature would be maybe a pseudo-PWM on the pixels to achieve various brightnesses and get say 8 levels of 'color'. So say have an 80 Hz refresh rate and a pixel could be on for 10, 20, 30 .... or all 80 frames per second to vary how bright it looks (I think that would work anyways).

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,442
    There is a library linked in this article which does almost exactly what you need: https://learn.sparkfun.com/tutorials...w-hookup-guide

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,991
    Adafruit has its Adafruit GFX library that is used by many displays:

  4. #4
    Thanks! I think this will be a good starting point. I actually happen to own an OLED using the SSD1306 controller so I was able to try that SparkFun library really easily. I put up the SPI bus on my scope and it only runs at 1 MHz instead of the 10 MHz it supports. Not that it matters since I won't be using the SPI bus.

    I'll have to play around with manipulating the "PAGE" buffer with my own functions and replace the display function with one that would work on the DMD.

    Once again, appreciate the pointers!

  5. #5
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,991
    Quote Originally Posted by Geomancer View Post
    Thanks! I think this will be a good starting point. I actually happen to own an OLED using the SSD1306 controller so I was able to try that SparkFun library really easily. I put up the SPI bus on my scope and it only runs at 1 MHz instead of the 10 MHz it supports. Not that it matters since I won't be using the SPI bus.

    I'll have to play around with manipulating the "PAGE" buffer with my own functions and replace the display function with one that would work on the DMD.

    Once again, appreciate the pointers!
    I don't believe either of the Sparkfun nor Adafruit drivers for the SSD1306 chips have specific Teensy optimizations. You might want to check out's Paul's version of the ILI9341 driver to see what can be done:


    Basically if you use the right pins for CS and DC (plus the standard MISO/MOSI/SCLK pins), the optimized libraries will use DMA to blit to the screen as fast as possible. I was using a program (uncanny Eyes) that wrote to 2 128x128 displays as fast as possible, and for the SSD1351 OLED displays I was using, I had to slow down the SPI bus speed to 18Mhz (from 24Mhz) because the display could not accept data as fast as a Teensy 3.5/3.6 could deliver it.

    The special pins on the 3.2 are:
    • Pin 2 or Pin 10 (*)
    • Pin 6 or Pin 9 (*)
    • Pin 15/A2
    • Pin 20/A6 or Pin 23/A9 (*)
    • Pin 21/A7 or Pin 22/A8 (*)


    * Note, where 2 pins are listed, you can only use one of those two pins. Paul explains it here:

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •