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.

96038186-062a9e80-0e24-11eb-8299-f5e8fcb03460.png


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

Comments

  • JonnyMacJonnyMac Posts: 6,997
    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:
    http://www.rayslogic.com/propeller/Programming/AdafruitRGB/AdafruitRGB.htm

    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: 6,997
    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(control)
    
      pinl(CLK)                                                     ' initialize sreg pins
      pinl(LAT)
      pinh(OE)
    
      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
      repeat
        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
            pinl(CLK)
          pinh(LAT)                                                 ' latch new data
          waitct(t += hz1)                                          ' hold while off
          pinl(OE)                                                  ' enable leds
          pinl(LAT)
          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:

    96498745-b4aa5700-1209-11eb-996d-6e3b6089b578.jpg

    @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!
Sign In or Register to comment.