P2 Driver for HUB75 LED Matrix Panels - Project in the works

I presented a bit of my personal project during our get together today.

This will ultimately become a driver in the P2 Object Exchange after it's working well enough that many of us can use it.

I'm posting this here so anyone can comment.

My git repo ironsheep/p2-LED-Matrix-Driver will be where I publish the status of the project as I make progress.

Once you visit the repo page (which has detailed pictures, project intent, and findings...) you'll see that it also involves a HUB75 hardware adaptor board for our P2 eval board or the new P2 Edge eval board.


No, I'm not sure yet how I'll make these boards available for purchase but it will eventually happen.


  • JonnyMacJonnyMac Posts: 7,008
    edited 2020-10-15 - 04:37:08
    I'm looking forward to getting one of those -- it will make connecting to my display so much easier. Tonight I actually got the 1st cut of a simple 32x16 driver working for a HUB75 panel that I pulled from the infamous pink purse (hence it may need adjusting for other panels). I have work to do before publishing, but I do have a basic driver working, and it's 100% Spin2 (running at 60Hz using 3-bit color).
    4032 x 3024 - 4M
  • This looks similar to the 16x32 panels I got working P1 a long time ago:

    I've been hoping to find time to get this going with P2.
    I'm sure can do a lot better...
  • What are IC chips for?
    I don't think I needed any extra chips for interfacing with P1...
  • Per the pic on the first post, they are level translators.
  • JonnyMacJonnyMac Posts: 7,008
    edited 2020-10-19 - 16:18:25
    This looks similar to the 16x32 panels I got working P1 a long time ago:
    I wasn't aware you'd done that -- could have save a couple hours of research trying to sort out the panel.

    To be clear, my goal is different than yours and Stephen's. I only wanted to create a simple driver for the 32x16 panel that I ripped out of a pink plastic purse to help a friend with her DEF CON 2021 backpack. I have no need to write a sophisticated driver that will work with any configuration of display. What I want to do is write a very simple driver that newcomers (like my friend) can understand and play with to get excited about programming the Propeller.

    This is how simple the Spin2 code is for driving that display (3-bit color) with overall brightness control. Note that I had problems with ghosting until I disabled the output while shifting line bits. Seems odd, but that's what I had to do with my panel.
    pri panel_driver(hz, duty) | control, hz1, hz2, t, idx, row, col, signals
      control := R1 addpins 8                                       ' colors and scan line
      pinl(CLK)                                                     ' initialize sreg pins
      hz  := (clkfreq / hz) >> 3                                    ' divide hz by 8 for rows
      hz2 := hz * gc.gamma(duty) / 255                              ' split for brightness control
      hz1 := hz - hz2
      t := getct()                                                  ' sync loop timing
        idx := 0                                                    ' reset to beginning of buffer
        repeat row from 0 to 7                                      ' 8 rows per top half and bottom half
          pinh(OE)                                                  ' kill leds while updating
          repeat col from 0 to 31                                   ' 32 columns per row
            signals := row << 6                                     ' row #
            signals |= panel[idx+256] << 3                          ' bottom half color for column
            signals |= panel[idx++]                                 ' top half color for column
            pinw(control, signals)
            pinh(CLK)                                               ' clock the colors
          pinh(LAT)                                                 ' latch new data
          waitct(t += hz1)                                          ' hold while off
          pinl(OE)                                                  ' enable leds
          waitct(t += hz2)                                          ' hold while on
    Note that this is still an early WIP and I will most certainly change it before releasing an object for the panel.
  • I've had a good week:


    @Rayman yes I know! I was looking for a project I could use to dig deep into the P2 language, I saw my stack of panels in my "stuff" that will make future projects pile and when I started researching how to drive them I found your code at the AdaFruit site. Thank you!
  • Well done, Stephen!
  • Stephen MoracoStephen Moraco Posts: 82
    edited 2020-10-25 - 04:17:23
    Here's my latest progress:

    (1) Emulation of Mechanical Seven-Segment displays

    The graphics are being generated in 24-bit color frame by frame. There's an additional 20ms wait between frames so the timing looks reasonably correct. (Could always be better)
    In the end, I'm getting pretty good rates for PWM'd screens.

    And (2) just the basic start on a highly animated binary clock:

    These are just stops along the way to getting to full video frame-rate playback.
  • Thats really impressive Stephen. I like the way you progressively animate each flap, its very effective

  • I like the transitions in the 7-seg display. Don't think I've seen that before...
  • More progress, my HUB75 P2 Eval adapter PCBs - first run for mechanical and electrical check - are currently scheduled to arrive this coming Tue. Maybe (fingers crossed) I'll know if my first turn works by our next zoom call.
  • That looks pretty good, Stephen.
  • A status up has been posted to the Project Github Repo

    Meanwhile, there was excitement yesterday, the adapter PCBs arrived! (everything else kinda stopped...):


    The Logic Analyzer shows all the signals looking much, much better than my flying leads...

  • Looks good!
  • Very nice.
    I'll have to take a look at your code.

Sign In or Register to comment.