Modify code for 64*64 pixel, HUB75E, 1/32 Scan led panels


#22

For the flickering problem, try setting the refresh rate.

matrix.setRefreshRate (120); // Modify the refresh value

The other problem seems to be more related to the management of the input data, and how it feeds with this data the output matrix of Smartmatrix.


#23

@pinballsp is correct, the ADDX pins all have to be in the same port. When you changed to the Teensy 3.6, did you use pin 37, or stick with pin 16?

SmartLED Shield V4 has a solution to the shortage of pins, actually not requiring any dedicated pins for ADDX, and using an external flip flop to store the ADDX signals instead. It’s out of stock right now but you can check the hardware design files in github and wire up the circuit yourself. 1/32 using the V4 circuit isn’t there yet, with @pinballsp’s help I hope to get this in the next release.


#24

Thanks to both of you!

@pinballsp Ah hah, the PORTC makes sense, I’ll try going back to Teensy 3.2 and try pin 15 instead. I’ll also try the refresh rate, thanks!

@Louis Correct, I adjusted to pin 37 when using Teensy 3.6. Great, I assume the 74245 & 74374 are the only necessary components needed for that. I’ll order those and give it a shot.


#25

Besides the ADDX signals on the 74374, there are 9 signals that need to be buffered, so you’ll need two 74245s, or one 74245 and one single gate buffer.


#26

So I’ve tried setRefreshRate(120) and still getting some flickering, but I think that may just be due to the jumper wires. I’ll try milling a board with short traces and see how that works.

However, when using Teensy 3.2, half the screen doesn’t work (two separate quarters), even though I’m using pin 15 now (PORTC). Switching to Teensy 3.6 and port 37, it does work properly. (I am changing ADDX_TEENSY_PIN_4 when testing between them).

Any thoughts?


#27

You need to also change ADDX_PIN_4 in addition to ADDX_TEENSY_PIN_4. Teensy pin 15 is C0, ADDX_PIN_4 is 0.

There are other PORTC GPIO on the underside of Teensy 3.2 if you want to keep pin 15 free for something else:

30 C11
29 C10
28 C8
27 C9


#28

Oh, I see the internal port numbers need specified. Got it, thank you!


#29

I hooked up the supposedly 1/32 scan panel I have and started adding @pinballsp’s changes to the code, but quickly found that my panel is actually 1/16 scan. I placed an order for this panel on Aliexpress and hope to have it within the next month so I can make these changes and test.

https://www.aliexpress.com/item/p2-5-led-display-module-2-5mm-pixel-indoor-rgb-full-color-led-display-1-16/32533038333.html


#30

@Louis ,

Have there been any updates on the new version of the library that would support 1/32 panels on the V4 shield? I plan to use a set of panels like @pinballsp, but I’m using your latest shield and I’m not sure if his code changes are compatible with the external flipflops (or did you use a counter?) that the V4 shield uses to drive the address pins on the panels. I just thought I’d ask before I start trying to implement 1/32 changes myself.


#31

I just pushed changes to support 64-row /32 panels to GitHub. It’s not packaged up into a release yet, but you can download the code. I tested it on the 64x64/32 panel I received yesterday.

@samy commented on poor refresh rate when driving with the Teensy 3.2: that’s to be expected, it’s a lot of work for the Teensy 3.2 to refresh a 64x64 panel, and it’s even more work when it’s /32 scan and not two 64x32/16 panels strung together. The Teensy 3.5/3.6 should do better.

I didn’t add @pinballsp’s changes to support V1-V3 shields as there are more changes needed. I don’t want to break support for any existing users by driving a new pin unexpectedly. I don’t have the time to wire up a 5th pin on my Teensy, so I wouldn’t be able to test the changes myself. If someone really wants /32 panel support added to the library, and you can’t make the changes yourself following @pinballsp’s code above, please ask. There are other SmartMatrix Library features I feel are more important, like adding APA102 support, and getting the library ported to a platform with WiFi capabilities.


64x64 LED Matrix?
#32

Thanks Louis. I started having a look at the code and although I’m quite well versed in C, I know very little about the DMA on the Teensy, so it was going to be a big job for me to try to get it working.


#33

@Louis one last question. Do any code or circuit precautions need to be taken to make sure that the SmartLED V4 doesn’t drive the E address line high on a panel that is /16 and may have that pin tied to ground in the HUB75 port?


#34

To be safe, don’t use set panelType to MOD32SCAN when connected to a MOD16 panel. I should probably put a current limiting resistor between the level shifter and the panel on the next rev of the shield, to prevent accidentally burning out that driver if accidentally driving that pin high when connected to ground.


#35

I hooked up a SmartMatrix Shield V4 and Teensy 3.2 to a /16 panel that had the E line grounded, and had it run a sketch with panelType=SMARTMATRIX_HUB75_64ROW_MOD32SCAN for 8 hours. I switched back to a /32 panel after, and the shield was able to drive all the rows, so no critical damage to the driver after 8 hours.

Still probably a good idea not to use MOD32 paneltype on a /16 panel


#36

I just received my matrices from China this week and I couldn’t resist adding one more reply to this thread. I now have a panel that is 256x64 functioning on the teensy. Gif playback is a little slower and I could only do 24 bit color refresh, but it works and looks better than I thought it would.

Now to find a clean way to mount these. :slight_smile:


#37

Looks great! Thanks for posting