-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FM6126A chip support #78
Comments
https://github.com/marcmerlin/SmartMatrix/blob/FM6126A/examples/FM6126A_reset/FM6126A_reset.ino |
Here is the teensy code to reset the panels (It may work with other processors by changing pin assignments:)
. |
Thanks @bobdavis321. Diffs work better, but I compared what you pasted with what I was able to get from your webpage:
The problem was not with MaxLed but the version I got from your webpage that had this small bug. Thanks for the updated version https://github.com/marcmerlin/SmartMatrix/blob/FM6126A/examples/FM6126A_reset/FM6126A_reset.ino updated. |
Also sent to @embedded-creations via #79 |
@bobdavis321 ok, my upload has your corrected code now.
Thanks, |
The reset code was in Setup() because the Loop() had code for displaying
text (That is not needed to run the demos).
I do not have the Teensy setup at this time because I am working on some
different projects.
I fixed the code on my blog so it should cut and paste just fine (Blogspot
trashes code with < or > in it).
I will set up a Teensy code page on my github account soon. (Hopefully)
-Bob
…On Thu, Apr 25, 2019 at 1:39 AM Marc MERLIN ***@***.***> wrote:
@bobdavis321 <https://github.com/bobdavis321> ok, my upload has your
correct code now.
However, I'm not too clear about a couple of things:
1.
I read that the reset code had to be run once before running normal
code.
This is what I do with rPi, all I have to run is
https://github.com/hzeller/rpi-rgb-led-matrix/files/3100669/resetmatrix_adafruit.py.txt
and then normal code and it works.
With your teensy version, you put that in loop() instead of setup()
I moved it to setup() because it didn't feel like it needed to be in
loop(), but the corrected version you gave me still does this in loop()
(and doesn't fully work, see 2) below)
Can you please download and test
https://github.com/marcmerlin/SmartMatrix/blob/FM6126A/examples/FM6126A_reset/FM6126A_reset.ino
?
2.
your teensy version even after your fix you just gave me, still
doesn't seem to fully work. The top half of the screen and bottom half (top
16 vs bottom 16 lines) don't look the same.
Are you not having this issue?
Again, can you try the link above and verify if you are seeing this,
or not when doing
a) run the code above
b) run featuredemo from smartmatrix examples.
Thanks,
Marc
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#78 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI4VLATNBV6PRMODFMJYL3TPSE7XPANCNFSM4HGQXOEQ>
.
|
Where'd you guys get these panels? I'd like to order some so I can test compatibility |
@marcmerlin How would you like this to be integrated into SmartMatrix Library? Ideas:
|
I was thinking about this too... |
@marcmerlin @embedded-creations Will this fix be applied to the ESP32 branch as well or are there other changes needed to make it work on the ESP32 chip? If so, any ETA? I just looked at my 64x64 panels late yesterday and 2 of the 3 on the bench have this newer FM6126 chip.... -Rich |
@MotivDev if/when this gets integrated in the SM source code, I'm sure it would, but currently, it is not. You can take the script I posted and modify the pin numbers to match your ESP32 wiring. |
@bobdavis321 Can you send me a link to the eBay panels you bought? I ordered a panel from Aliexpress, same listing that someone else got FM6126A chipset, and I got ICN2037. The Amazon listing Marc posted is now unavailable. I'm unable to easily source a panel to test. |
This is where I purchaed my LED arrays:
https://www.ebay.com/itm/LED-Matrix-P3-RGB-pixel-panel-HD-video-display-64x32-LED-Screen-module-2121SMD/253691968968?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649
…On Fri, May 10, 2019 at 8:55 AM Louis Beaudoin ***@***.***> wrote:
@bobdavis321 <https://github.com/bobdavis321> Can you send me a link to
the eBay panels you bought? I ordered a panel from Aliexpress, same listing
that someone else got FM6126A chipset, and I got ICN2037. The Amazon
listing Marc posted is now unavailable. I'm unable to easily source a panel
to test.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#78 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI4VLAXYN3GEUTYNK6QKI33PUVWFTANCNFSM4HGQXOEQ>
.
|
@embedded-creations damn, sorry to hear that you got the wrong one again, but see below |
Thanks @bobdavis321 and @marcmerlin. I contacted the eBay seller and confirmed that they would ship me a panel with the right chipset. We'll see what I actually get in a few weeks. :-) |
I'm now the proud owner of two panels with FM6126A chips. One is a P3 64x32 from Bob's eBay seller, which I haven't tested yet. The other is a flexible P2.5 128x64 panel, which just happened to have FM6126A chips installed. I used Bob's sketch with some minor modifications and got the panel working from a Teensy 3.6 in a SmartLED Shield V4:
|
Glad you were finally able to get some, when many of us were getting some without trying to :) |
Just an ESP32 update.... I have 4 - 64x64 panels on the bench, all from different batches/vendors and both FM6124A & ICN2037BP panels work correctly. The panel with FM6126A does not work and I have not tried implementing the reset that marcmerlin has provided. I also have seen a ICN2038/S chip referenced on other site forum postings.... I am thinking the FM6126A & ICN2038/S must be very similar and solving the reset issue on one might just fix the reset/setup for the other. Similar to the 6124A & 2037BP parts. I had an ESP32 SMARTLED shield fabricated and built and I am using this for my driver for these panels. So easy to use!! Thanks for releasing that design Louis!
I hope this helps someone else that comes across these driver numbers and using an ESP32. |
@MotivDev FM6126A is known not to work unless you send the reset sequence. Please try it. |
Which version? SMT or THT? Did you notice any issues? I haven't assembled the SMT version myself yet I haven't even had a chance to seriously think about how I want to add FM6126A reset support. Let me think about it briefly now: I think if the timing works I want to add an option where the reset sequence will be loaded up into the data buffer to be sent out to the panel like a normal frame. I don't see any delays in Bob's code so hopefully sending the reset sequence works at the same rate as sending data for refreshing the panels. The library would have a flag you could set that replaces the next frame with a reset sequence (and probably blank pixels for anything else that needs to be shifted out for that frame). I don't see any harm in sending out a blank frame for any panel, so this flag could be automatically set on power up, and also controlled with a method so the user can choose if and when to send a reset sequence after powerup (to handle the case where power to the panel is cycled while the micro is not, for example). |
I apologize for not getting back with you sooner!
I have been using the SMT version. Have not populated the SD card interface, but everything else seems to be working great. No issues and I've been able to run @marcmerlin SmartMatrix_GFX library.
I have been trying to avoid the 6126 issue... I have read on other forums that the vendors are moving away from this chip so I've been working with a vendor to attempt to get 6124 panels to satisfy my needs for the next couple of months. I like the approach you have outlined for reseting the panel. I am using a command line interface and having the ability to send a reset command to the panel would be great. This is much better than a compile flag that would force the panel controller into a special panel reset mode. What might also work would be the ability to set the driver type: ie 6124/2037, 6126, ... then a call to the reset method could call the correct driver reset method. I'm just thinking that they will probably change the chip again and when they do, we will probably need another special reset routine. Thanks for all the great work on SmartMatrix! |
Hi there! Was there any further work/fix update on this? I have been playing with the reset code on my p3 Fm6126A polluted led board and the best I get is half a screen that works and exactly half a screen that is bright green (bottom). I saw Louis said he got it to work quite simply but for me that did not happen. I have parsed through the other forums and have read all the issues with the chip. When I run gifs or the Feature Demo, you can see some of the animation play through the green, but the color is off significantly. Any extra help would be great! Thanks |
@jdot3333 while this sucks, try sending the reset code multiple times. It usually addresses what you describe |
FIGURED it out..... So @marcmerlin, you and @bobdavis321 have defined pin but in the current master of SmartMatrix/src/MatrixHardware_KitV4.h Line 69 in c76d3ef
it is defined as Perhaps the older SmartMatrix that Bob shows on his blog used Pin 7? I am not sure if your code marc was meant for the SmartMatrixV4 or not but if it was give that change a try and it should work flawlessly. Thanks a lot for the hard work you guys did looking into this before I jumped in and @embedded-creations for the awesome library! FYI and anybody else who may stumble across this post troubleshooting, I purchased super cheap from here on 2019-07-04 and it took 2.5 weeks to Canada: |
Thanks for that @jdot3333 |
Hi. In the manual of the FM6126A it says the last thre clock cycles the latch pin needs to be set high. Is this allready implemented in the current SmartMatrix library? Using an esp32 |
No, this isn't implemented in SmartMatrix Library. You can try using the example code from Bob and Marc in your sketch. I haven't tried that code with an ESP32, but have with a Teensy and it worked for my panel. If you're using the ESP32 shield with the latch chip, don't expect it to work, as the CLK signal is blocked while the Latch signal is high. I'm going to have to modify the circuit to handle this. |
Thank you for the answer. I don't use any shield, i soldered on a perf board. See here: https://twitter.com/atc1441/status/1174019294826500096 The Reset code is not working correctly for me, it seems like it is driving the panels and not setting like it should as some LEDs light up if I sent the reset code. After my message yesterday here i tested further and my problem is indeed the Reset and not the latch. Even if it's may needed in the future. I will look further into it and try a few more things. |
Got it, I use 14 pin wiring without latch, so didn't need to worry about that :) |
@marcmerlin I'm actually working on this now! I have it working for my latest ESP32-based boards with external latch, etc, sending the reset sequence when calling Do you have an ESP32 sketch that sends the FM6126A reset sequence successfully that you can share? I tried changing the pins on your |
@marcmerlin Nevermind, I think it's a level shifting issue. I don't actually have an ESP32 wired up with level shifters but not a latch, so I can't test this circuit very well. Guess I need to wire one up on a breadboard, not tonight though... |
I think I got it to work on teensy at the time, but then I moved to rPi given that said panels were too big to reasonably run on ESP32 |
Well, I wired up the level shifters, and there was no improvement. Trying to think through the differences between my circuit with the latch and the direct/level-shifter-only wiring, I think I found the issue. It's not with the FM6126A reset code, it must be after. With the latch, and the new MANUAL_CLK signal, I can precisely control the number of CLK pulses sent while LAT is high. With the direct/level-shifter-only wiring, CLK is pulsed once while LAT is high every time, as the I2S circuit must toggle the CLK signal as part of sending new I2S data. This must be changing some setting on the panel. The datasheet says that >1 CLK pulses sent with LAT high is a soft reset command. Maybe 1 CLK pulse during LAT is enough to do the soft reset. The datasheet says 3 pulses is the "Data Latch" command, which may be an option as the direct/level-shifter-only wiring can support keeping LAT high for a specific number of CLK pulses, just not 0 CLK pulses. This is more work than I want to put into supporting the FM6126A for now. |
…m (only tested on SmartLED Shield V4) #78
I added Bob's FM6126A init routine inside
I don't see a problem with enabling this code by default, but as I only have one panel to test with, I'm being conservative for now. This works on the Teensy platform (SmartLED Shield V4, and earlier shields) in the master and teensylc branches. It works on the ESP32 only in my new un-released board that is able to manually toggle the CLK signal while LAT is high. I'll publish the circuit for this new board eventually, but if anyone is dying to get this working, and has a 74AHCT157 (or another 2:1) MUX and the usual 74AHCT373 Latch chips handy, let me know and I'll share that part of the circuit. I experimented using the ESP32 without latch which seems to be resetting fine at the beginning, but then not displaying anything after. As suspected, the number of clocks during the latch pulse is important:
This makes some sense as the FM6126A datasheet says >1 clocks (maybe this should actually read I made the |
@embedded-creations sorry if I didn't follow everything. Is ESP32_I2S_CLOCK_SPEED set incorrectly in the code and it needs to be changed for things to work with direct wiring, or it's just not expected to work? |
As a side note @embedded-creations the reset does do something. If I take my working panel, plug the ESP32 in while code is running, things work. Then if I reboot the ESP32, it sends an init that breaks the panel, and shows the display above (the offset in the lines is because every other panel is upside down) |
@marcmerlin I get similar results to you when I switched over to a direct wiring setup (
My results (trying to solve this a different way without necessarily lowering clock speed):
I narrowed down the delays needed to just a single delay at the end of init. If this doesn't work for you, can you sprinkle delays into the init code (especially before/after CLK and LAT transitions), and see if you can find the minimum number of delays that make your panel init? I just committed the delay at the end and some notes on setting I2S clock speed. Fingers crossed it works for you as is (with just the Thanks again for testing this! |
Also, I get a clean image with |
woohoo, it works now at 20Mhz, well almost, there is a dimming issue |
upper right corner where the pixels first get pushed is the wrong brightness and sometimes wrong colors: Interesting thing is that I have 5 panels chained but only 3 configured in SmartMatrix (as you may remember, in one setup, I use bits shifted out from the virst panel to the other one). To be honest, I don't expect any panel past #3 to work, but #4 actually has blue background which is almost invisible on the first 3 panels because it's too dark, and while panel #5 has weird squares: Changing the speed to 15Mhz didn't change anything I could see. |
@marcmerlin Thanks for the testing and photos! I'm out of time today, but want to do some more testing on my panel which I thought "worked" but maybe there are some more issues that I didn't see. I'll do my best to get back to you tomorrow with updated code |
I just pushed a change that hopefully helps. Before, it was sending the reset sequence out to 256 LEDs, regardless of how many you have configured in your sketch. Now it should send the right amount. I tried the sketch again on an ESP32 with no level shifters, and another with level shifters, no latch. Both had bad images at 20MHz, worked at 15MHz. |
Mmm, now I just get a black screen with a couple of green bars and a checkered pattern on the 5th chained panel. I did a git reset --hard HEAD^ and still get it, even at 15Mhz. I'm stumped, not sure what broke. |
Can you reverse that commit, bringing back numLeds? First try numLeds set to 256, as it was, then change over to the actual number of LEDs you update per row? KMatrixWidth * the number of panels you have stacked vertically. If you could try a handful of values and see where it breaks that would help. Thanks! |
@embedded-creations sorry, I messed up and the FM6126A was gone from my sketch. It's back and now it works again like it did last ime. But wait, it gets better:
hope this helps. |
@marcmerlin Just to confirm: "upper right corner where the pixels first get pushed" (from your note on Mar 18), this is on the side of the panel closest to the ESP32, correct? "lower right corner" is this a different corner, or same one? Same side of the panel closest to ESP32?
Did you do this multiple times or just once? I could see where unplugging and plugging in could accidentally put the chips in a state where they need an init sequence again. Do you mind trying it a couple more times? (Sorry, I wish I had your panel here to try it myself) The change I just pushed adds more delays to the reset sequence. Can you give that a try to see if that helps? Thanks again |
|
@marcmerlin Thanks for clarifying. LMK if the new delays I added help with the first 16 pixel columns Now that I think about it, the worst parts of my panel when driven at 20MHz (instead of 15MHz) are in the first 16 pixels. Not the same cause of failure, but similar symptoms. |
sorry for the delay. I just tried with the added delays and it didn't really fix that issue for me. |
Hmm, I'm not sure what else to try... |
no problem. I don't really need it myself anyway since I only have FM6126A on panels that are too big for smartmatrix, but if I can provide further help, let me know. |
@daveythacher Do you have more info than is in the publicly available datasheet, which doesn't seem to include the details of the config register? |
Newer panels are shipping with FM6126A, apparently because it's a chip offering faster refresh, which is necessary for bigger displays.
But it indeed does not work with SmartMatrix
https://community.pixelmatix.com/t/pxmatrix-seems-to-support-fm6126a-driver-chips-that-smartmatrix-doesnt-support/421
Discusses the details.
The chip is already supported by http://github.com/2dom/PxMatrix/ but that's only supported on ESP8266
The text was updated successfully, but these errors were encountered: