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
1/8 Scan Panel support - 64 x 32 panel horizontal lines doubled #154
Comments
Can you draw a single diagonal line as well? Looks like some address line issue, check the A,B,C,D pin mapping - perhaps the pins may have moved? Who knows. There seems to be a few of these issues being raised recently. |
I Checked the pins on the display and all is "standard" except the LAT pin is called STB.
|
Closing this issue as it's superseded by #164 |
I have the exact same problem. Have you finally solved it? |
Do you have a picture of the back of the PCB? Connectors and driver ICs? |
I didnt solve it. It turned out to be a 1/8 scan panel which is not supported by the library. We should be able to change the libary because it is al telated to the way the data is sorted bitwise before sending it to the panel but my knowledge of this lib is limited |
My simple code with the git version of the library:
|
Looks like a pretty simple issue to fix with your own custom code, looks like 2 X 1/4th of the panel rows chained together, for both the top and bottom halves of the display. Change the width of the display of the library to double the physical width and play around? |
|
Eureka... very strange settings... but work :D My code:
|
Good work on figuring that out. As expected, it's actually a chain of panels, with some weird chaining going on there between the 1/4ths of the panel, with the 2nd 1/4th being chained to the first (top) 1/4th of the panel. What happens when you set: Because if you do the math, 8 pixels of each 'half' of the panel don't actually get used given this library is designed for 1/2 scan panels, and these panels actually chain the 2nd 1/4th with the 1st 1/4. |
All you need to do is make your own wrapper to this library, like the 'Virtual Display' cpp file, which will override the operation of the drawPixel() function based on the value of the x-coord - then you have yourself a working library for these 1/4 scan panels. Feel free to contribute then :-) |
Result with your settings and corrected the math a bit:
After researching in various Chinese retailers and factories, i found some more information on the panel:
|
Hi @AlfioSaitta - thanks again for the great work with trying this out, really helps me understand what's going on here! I did notice one thing with you photo, what's the go on the top left? Looks to be a row of missing pixels? Or is the pixels broken in that area? |
I think it's a power problem. I'm using the raspberry power supply to power the panel 👯 VID_20211010_125932.mp4 |
Good work. I've created a 'VirtualDisplay' like class that does co-ordinate re-mapping, like it seems you have coded manually. I don't have one of these 1/8 scan panels - can you try this out? |
Yes, of course |
Generate error here: rows and cols are not defined |
Whoops. I've fixed that. |
Something went wrong!!!
|
I've made another change. Problem is I don't know if I should have the Please test and find out :-) |
Some tests with lines before your last changes:
|
I have never made such a thing or ever looked a frame rates. |
With your last changes:
|
After several tests, i still don't understand how the chain works and i haven't been able to solve the problem.
Some times for a 2048px Image:
|
Made another change, not sure if it fixes the issue. Experiment with lines 158-164 of 'OneEighthScanMatrixPanel.h' to see what works. |
This code on your brand ?? patch-1 or legacy-1.2.4 ?? thanks |
Thank you @mrfaptastic but I try example "One_Eighth_1_8_ScanPanel" and change GPIO define ` // Panel configuration #define NUM_ROWS 1 // Number of rows of chained INDIVIDUAL PANELS // Change this to your needs, for details on VirtualPanel pls read the PDF! // GPIO Configuration #define A_PIN 23 #define LAT_PIN 4 #include "OneEighthScanMatrixPanel.h" // Virtual Display to re-map co-ordinates such that they draw correctly on a32x16 1/4 Scan panel // placeholder for the matrix object // placeholder for the virtual display object /******************************************************************************
// virtualDisp->setTextColor(virtualDisp->color565(0, 0, 255));
// virtualDisp->drawRect(1,1, virtualDisp->width()-2, virtualDisp->height()-2, virtualDisp->color565(255,0,0));
// virtualDisp->drawLine(0,0, virtualDisp->width()-1, virtualDisp->height()-1, virtualDisp->color565(255,255,255)); void loop() { } // end loop` --> There's something incorrect here ????? |
Unfortunately the 1/8 Scan panel workaround was never completed. I do not have one of these panels either so I cannot test. Can you try drawing a line from pixel 0,0 to 32,63 without the use of the virtualDisp library and tell me what it looks like? |
Since i have one of those panels and without working lib its useless to me.., might as well put a stamp on it and ship it to someone @mrfaptastic pm me if your interested |
If you are happy to donate then I certainly won't say no. Mark is kindly sending a 1/8 which I can use to get those panels working properly (and that will help you as well with your 3 x 1/8 scan panel display). Feel free to send what you think is of value to get supported and is most used. Can start continue expanding support in the library. |
I have a 64x32 RGB Panel that worked with a setting for 1/8 scan with another library so i guess it is an 1/8 scan display. I couldn't get it to run with current master branch of mrfaptastic but with the patch-1 branch of Alfio. But there were a some errors in the displayed image. After a lot of trial and error i found some changes to the if( ( _s_chain_party && !_chain_top_down && (row % 2 == 0) ) // serpentine vertically stacked chain starting from bottom row (i.e. ESP closest to ground), upwards
||
( _s_chain_party && _chain_top_down && (row % 2 != 0) ) // serpentine vertically stacked chain starting from the sky downwards
)
{
// First portion gets you to the correct offset for the row you need
// Second portion inverts the x on the row
coords.x = ((y / panelResY) * (virtualResX)) + (virtualResX - x) - 1;
// inverts the y the row
coords.y = panelResY - 1 - (y % panelResY);
}
else
{
// Normal chain pixel co-ordinate
coords.x = x + ((y / panelResY) * (virtualResX)) +1 ;
coords.y = y % panelResY;
}
/* *******
* START: 1/8 Scan Panel Pixel Re-Mapping
*
* We have calculated the x, y co-ordinates as if we have a chain of standard panels this library is designed
* for, this being 1/8 or 1/16 scan panels. We have to do some further hacking to convert co-ords to the
* double length and 1/2 physical dma output length that is required for these panels to work electronically.
*/
if ( (coords.y /8) % 4 == 0) { // 1st 8 rows
coords.x += 64;
}
if ( (coords.y /8) % 4 == 1) { // 2nd 8 rows
coords.y -= 8;
}
if ( (coords.y /8) % 4 == 2) { // returns true/1 for the 1st and 3rd 8-pixel 1/4th of a 32px high panel
coords.x += 64;
coords.y -= 8;
}
if ( (coords.y /8) % 4 == 3) { // returns true/1 for the 1st and 3rd 8-pixel 1/4th of a 32px high panel
coords.y -= 16;
}
/*
* END: 1/8 Scan Panel Pixel Re-Mapping
* *******
*/ Any ideas why it behaves this way? What is needed to make this run with the aurora demo or with displaying images? |
Hi @dickshaydle. I am working on a fix for 1/8 scan panels as @donnersm has kindly provided me a 1/8 scan panel to test with. I hope to have something that works with chaining as well, soon. |
You can't use the Aurora demo as is, it uses the underlying library which is 1/16 only. You will need to merge the Aurora demo code with the new '1_8_ScanPanel.h' example and call this object instead of the underlying dma_display object which is designed electrically for 1/16 panels only. |
Hello @mrfaptastic, The video of the two panels follows. WhatsApp.Video.2021-11-22.at.14.36.21.mp4WhatsApp.Video.2021-11-22.at.14.36.19.mp4I'm grateful if you can help me. Thanks for your work! Att. |
Wow. Sorry to say that is yet another 1/8 panel variant with some super weird addressing scheme. They are different panels it seems. Can't help you as I don't have one of these I'm afraid. It's almost like these Chinese manufacturers try and make a new variant every week. |
You need a kind of reverse engineering to determine scan. |
can help with setting the coordinates, still confused |
try this
|
sorry, just typo.
|
Hi |
Please show your ESP32-HUB75-VirtualMatrixPanel-I2S-DMA.h file |
As I see, you use a ESP32-HUB75-VirtualMatrixPanel-I2S-DMA.h file from a quite old library version. This file does not include a standard coordinate transformations for connecting multiple panels. Try adding this part of the code from the latest version. @mrfaptastic Why is getCoords() method specified as private in new versions of the library? This make it difficult to inherit from a VirtualMatrixPanel class and will not allow user to create your own variants of the method... |
Feel free to raise a pull request to fix that. You are right, it does not make sense to have it private. |
I just tested a panel i just received today. Its a 64 x 32 panel.
It looks like the horizontal is not working, lines are doubled in an array of 8
Anyone recognise this or is this a defective panel?
(Beside from the defective pixel near one corner)
IMG_4341.mp4
The text was updated successfully, but these errors were encountered: