picnoir / ultimate-writer

Open Digital Typewriter
GNU General Public License v3.0
295 stars 16 forks source link

Lookup Tables from ROM, it might be possible to extract it? #4

Closed prashnts closed 1 year ago

prashnts commented 4 years ago

Hey! Your project showed up on HN and I read the build log. I noticed the specific part in your log, about LUTs in ROM.

I did some work earlier (I made that repo public here: prashnts/betty-epd). I had an eInk “Hulk” dev board which I got my hands on thanks to @kevinlhoste (since it’s quite expensive).

Anyway, I had same issue with the dev board, because eInk makes getting LUTs very difficult. I captured SPI commands and the values through a logic analyzer and made a Python code to extract LUTs. To make sure I was getting the correct data, I also tried to decode the framebuffer.

It’s in this ipython notebook here. https://github.com/prashnts/betty-epd/blob/master/notebooks/15-17--logic-analysis-spi.ipynb

Now the point is, maybe it is also possible to use the LUTs from your GoodDisplay panel, as well?

za3k commented 2 years ago

That's a great idea, but I think it may be missing an even easier solution. Copying Ben Krasnow's process, we're only using the LUT to generate a simpler one-step LUT. The one-step LUT has a fixed operation with a single time in frames. It seems likely that you can skip learning the LUT, and just guess a reasonable number of frames. I would start by trying the 4.5" operation on the 7.5" screen. Of course if you guess wildly wrong, you could degrade long-term performance or break the screen, but that might be true of the "working" version too. I'll give it a try if I have time, since I am not terribly worried about breaking mine. Edit: Oh, and this assumes the serial format of the LUT is also the same between the two products. That could break it too.

The bigger problem is whether we can even send a custom LUT for refresh on the 7.5" waveshare screen. My wild, uneducated guess is no on V1 (which @NinjaTrappeur had) and maybe on V2 (which I have today).

prashnts commented 2 years ago

Yeah I mostly agree, although I kind of started wondering about the effort vs. material benefits there. Unless we could auto calibrate the LUTs, differences via manufacturing process likely guarantees any LUT would harm :p

I noticed the link was broken -- the repo was private, should be good now!

za3k commented 2 years ago

Oh, well here's a much easier answer. The V2 values are in the code, although they may be incorrect: https://github.com/waveshare/e-Paper/blob/master/Arduino/epd7in5_V2/epd7in5_V2.cpp

za3k commented 1 year ago

Solved in 8f71cf7f54b5d56086c0d1a98bc366eb1ebc9d07