rpi-rgb-led-matrix icon indicating copy to clipboard operation
rpi-rgb-led-matrix copied to clipboard

Control matrix 64x32 with mbi5153 (icn2053) led driver ic

Open kbateam opened this issue 7 years ago • 143 comments

Does anybody sucessfull make control led matrix 64x32 with mbi5153 (icn2053) led driver ic New matrix P5 64x32 comes with new IC led driver (Same as P2.5 matrix) P5 Matrix with mbi5038 (icn2038) ic led driver works fine on this project (only transform passed) Any idea ? Thanks.

kbateam avatar Jan 08 '18 20:01 kbateam

I have not seen such panels yet. Do you have a link to a source ?

hzeller avatar Jan 08 '18 21:01 hzeller

I can make photo pcb of this matrix. So. i parsed some datatsheet of mbi IC Signal OE is not use. It's replaced by GCLK, this ic led driver has hardware 14bit (or 13bit) PWM GrayCycle on each other output (0..15) As I understand chip need to be preload configuration every time as power up. (load some parameters such scan rate 1/4, 1/8 e.t.c) also every time after load data on SDI cycle, need load PWM data for each output(0..15) and after that need send vsync command to latch data to output pins. P.S Can upload some datasheet which i found on internet.

kbateam avatar Jan 08 '18 21:01 kbateam

Photo of new P5 64x32 module Photo of old P5 64x32 module Photo both old and new P5 64x32 module

Here is some datasheets MBI5038.pdf icn2038s.pdf ICN2053.pdf MBI5153.pdf mbi5152.pdf mbi5152_appnote.pdf

Comments mbi5153 same as mbi5152 difference mbi5153 support 1/32 scan and has 16Kbits SRAM mbi5152_appnote is common algorithm to initialize chip mbi5038 and icn2038 led drivers used on old led matrix and they works fine with this project

Updated this post (upload datasheet ICN2053 led driver chip)

kbateam avatar Jan 09 '18 12:01 kbateam

Hi @kbateam this is off topic but I would like to know if the old p5 display you bought was this one or an equivalent? This is because I want to buy this one. The drivers are the same so I think they are the same but I am not sure.

Also, what does only "transform passed" mean in your first post?

I am sorry this is off topic but I could not find your email or any other way of contacting you :|

Thank you for your help in advance

raphaelfacredyn avatar Jan 10 '18 06:01 raphaelfacredyn

To @raphy1234 Follow by your link is different hardware P5 outdor matrix module that i have. With china production is difficult to buy right matrix module. (Be shure , and ask your seller to send real photos of pcb matrix module) On offical site macroblock owner MBI tm is not present MBI5154 ic chip. It seems to be MBI5153 ic chip.

Also, what does only "transform passed" mean in your first post?

It means for right working this led matrix module on project which wrote hzeller need wrtie logical transofrmation procedure, cause matrix module splited on logical submodules (for expample 2x(32x32), 4x(16x32) e.t.c)

Here is my transform for modules that i have P5 64x32 1/8scan outdoor based on icn2038 ic led driver (MBI5038) transformer.cc led-matrix.cc

kbateam avatar Jan 10 '18 08:01 kbateam

Countinue for my theme If someone have any idea, will very grateful.

kbateam avatar Jan 10 '18 18:01 kbateam

Interestingly, on this document http://pmod86499.pic35.websiteonline.cn/upload/Q4F32V1.pdf there is a CS mentioned on pin 16. It doesn't say if it is high or low logic. According to Google translate, the 消隐信号 label next to it mean "Blanking Signal".

Can someone who has such a panel try to pull 16 high, by connecting that pin with 5V ?

hzeller avatar Feb 27 '18 04:02 hzeller

@birdtechstep can you try if changing the logic level on Pin 16 changes anything ?

hzeller avatar Feb 27 '18 16:02 hzeller

@hzeller chip select (cs pin) active low

birdtechstep avatar Mar 02 '18 07:03 birdtechstep

@hzeller My friend dev. on stm32 said SetBits strobe hi on columns_-4 (led_width-4)

birdtechstep avatar Mar 02 '18 11:03 birdtechstep

can you elaborate? The only place where things are strobed is already high logic.

hzeller avatar Mar 02 '18 18:03 hzeller

add lib/framebuffer.cc (line 587 ) work.

582      for (int col = 0; col < columns_; ++col) {
583        const gpio_bits_t &out = *row_data++;
584        io->WriteMaskedBits(out, color_clk_mask);  // col + reset clock
585        io->SetBits(h.clock);               // Rising edge: clock color in.
586
587        if (col == columns_-4) io->SetBits(h.strobe); // ICN2038S : Bird Techstep
588      }
589      io->ClearBits(color_clk_mask);    // clock back to normal.

birdtechstep avatar Mar 05 '18 01:03 birdtechstep

Interesting. This looks like it requires further digging in the datasheet what they actually need there because it looks like if it works that it is by accident. If we have decoded the full thing we can recreate it by making a new RowAddressSetter for this kind of panel.

Can others confirm that this improves the situation ?

hzeller avatar Mar 06 '18 17:03 hzeller

Is there a place where I an buy a panel with that chip, so that I can look into supporting it with the library ?

hzeller avatar Mar 07 '18 02:03 hzeller

Great! @hzeller and @birdtechstep : i did a quick check and above patch seems to work with mine (same 2038s led driver).

shall perform more test and let you know the result!

hoangphan avatar Mar 07 '18 02:03 hoangphan

Is there a place where I an buy a panel with that chip, so that I can look into supporting it with the library ?

@hzeller : you can find the P3 that has ICN2038s led driver as following link, https://www.alibaba.com/product-detail/GKGD-small-pitch-indoor-P3-RGB_60445963111.html

hoangphan avatar Mar 07 '18 05:03 hoangphan

@hzeller : I have just quicked check all demo example from your library, and it seems working well with my board mentioned in #539. color display as expected, no flickering (i using gpio slow = 1)

what i'm curious is some body on the top comment of this topic, said with P5 64x32 the same code works with the same chip (2038s), however some others with 64x64 says its not.

apart from that, what is the meaning of the patch as @birdtechstep shared? (sorry i'm still on the way to study your library).

hoangphan avatar Mar 08 '18 01:03 hoangphan

Yes it's works without any modification

what i'm curious is some body on the top comment of this topic, said with P5 64x32 the same code works with the same chip (2038s)

kbateam avatar Mar 08 '18 10:03 kbateam

Without further datasheets that explain the protocol to the displays it is hart to tell, maybe what is happening underneath is that the strobe pulse actually is negative logic, not positive logic, so pulling up the signal before the strobe will create that situation.

hzeller avatar Mar 10 '18 18:03 hzeller

In that case, swapping the lines in https://github.com/hzeller/rpi-rgb-led-matrix/blob/master/lib/framebuffer.cc#L595

from

   io->SetBits(h.strobe);
   io->ClearBits(h.strobe);

to

   io->CleartBits(h.strobe);
   io->SetBits(h.strobe);

would help as well. Can someone who has such a display try if this works as well ? (without the if (col == columns_-4) io->SetBits(h.strobe); patch)

I need to get to the bottom of this so that we can support this in the standard library; the columns-specific thing looks very specific and probably not necessary.

Also, I still would like to know where to buy such a panel to do experiments with.

@hoangphan the ali-express shop you mentioned: their minimum order is 40 items which I don't have the money for.

hzeller avatar Mar 10 '18 18:03 hzeller

@hzeller : i checked your mentioned patch but unfortunately the panel is not lighted up. stay dark without the line if (col == columns_-4) io->SetBits(h.strobe);

from the datasheet as link http://www.xlix.ru/datasheet/icn2038s.pdf I'm trying to map it with the way you programmed software.

hoangphan avatar Mar 11 '18 09:03 hoangphan

@kbateam : how did you get the datasheet for these led drivers? i looked into the icn2038s datasheet, but it seems too many typo and confusion. is it possible to get the official datasheet from the Chinese company (i.e. Chipone)?

hoangphan avatar Mar 11 '18 17:03 hoangphan

@hzeller : i think i know the reason why if (col == columns_-4) io->SetBits(h.strobe); patch works.

with the attached snapshot of datasheet, the STROBE pin of panel (that has ICN2038s led driver) - is not simply a STROBE pin, it serves as a command parser, which also cover the LATCH data in.

as you can see, in order to latch a data out, we need to pulse the strobe pin high in the 3rd clk pulse OR the 12th pulse.

that's why the patch above works.

let me know if you agree with this. and if yes, kindly share your thought about how to make this patch generic into your standard library.

screen shot 2018-03-12 at 12 53 02 am

hoangphan avatar Mar 11 '18 18:03 hoangphan

@hzeller, here are some panels that have icn2038 make sure to pick the icn2038 option though https://m.aliexpress.com/item/32784851966.html?trace=wwwdetail2mobilesitedetail&productId=32784851966&productSubject=P5-led-video-panel-nationstar-rgb-full-color-320mm-160mm-1-8-scan-outdoor-SMD-3in1&spm=a2g0s.9042311.0.0.ZfkLbb

raphaelfacredyn avatar Mar 11 '18 18:03 raphaelfacredyn

I got it form china reseller Look MBI5038.pdf , ICN2038 hard copy from original driver

how did you get the datasheet for these led drivers

kbateam avatar Mar 11 '18 19:03 kbateam

I see there is a key of similarity between the icn2038s (pay attention to the S) and icn2053: they have LE pin functions as a command parser, as below snapshot.

If LE is raised after 12 CLK pulse, it means enable all output channels.

The same for icn2038S, if LE is raised after 12 CLK pulses, data is copy to reg2 - which relevant to the dual latch feature of the ASIC

7f16fd03-2308-4925-9eb9-894c4c1ce9f2

hoangphan avatar Mar 12 '18 02:03 hoangphan

Attached the snapshot for dual latch feature on icn2038s. By accident, the value 12 is the key to functional of both ASICs f30b82a6-c0cc-40c6-ab6d-79d74c2b069d

hoangphan avatar Mar 12 '18 02:03 hoangphan

@kbateam : are you able to make your board (with ICN2053) working with the provided patch ?if (col == columns_-4) io->SetBits(h.strobe);

if not, would you check if (col == columns_-2) io->SetBits(h.strobe); instead?

hoangphan avatar Mar 13 '18 08:03 hoangphan

@hoangphan Tested both variants, result negative :(

kbateam avatar Mar 14 '18 11:03 kbateam

@kbateam : would you try to tweak around the number of CLK rising edge when STROBE pin is high? because from the datasheet of ICN2053, it looks like if you want to deliver the data to buffer of the IC, this number should be 2 or 12.

can you just tweak this around from 1 to 15 and to just see if the panel lights up?

hoangphan avatar Mar 15 '18 02:03 hoangphan