-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[FR] [ST7920_Simulator.c] Add a character generator in order to use klipper #290
Comments
I'd like to expicitely agree to the post before. Please, add a character generator! |
I use Klipper, and an currently unable to use my TFT24 with it. I looks like the emulation of the reprap display needs a character generator. If you could add a character generator that would be really nice, as I'd like to use the TFT24 with the printer I am building. |
For anyone looking to do this, the ST7920 datasheet is a good resource:
|
yes please add it |
+1 |
The original font-ROM of the ST7920 is about 130 kByte. |
The ASCII half-height HCGROM is just 16K-bits, which is 2kB. The rest is for chinese characters, which I would assume are rarely needed with 3D printers. |
BTT's touch screen has an external flash(W25Qxx) storage bitmap fonts, so don't worry about this. This function should be easy to implement, but I'm busy recently, so I don't have time to test this. After a new version is released this week, I will start to implement this function |
I would like to register another request to get this implemented. Thanks! |
I'm very much looking forward to a solution to this problem. The printer is without screen :( |
no news ? |
This would be great. |
I would also love to see the TFT35 E3 implemented. |
Brilliant, just switched to klipper, would love to use my tft35 |
+1 |
the font will depend on the klipper or is it hard to set in the screen firmware? |
It's set by the screen, this whole thing is because Klipper uses the internal text generator on the display driver for the text, which was missing from this simulator. And as it is a simulator, it needs to include that character rom data as well which means it should be rather easy to swap it for a different font - if one exists or can be easily created, that is. |
@bigtreetech thank you for working on this, I know a lot of people are excited to have some high quality display options! |
@bigtreetech any updates on this issue? |
I'll add a +1 of interest for this feature also! Thanks for prioritizing the development of this, it will be very much appreciated. |
+1 very interested on it. |
@bigtreetech, when the printer starts with the latest master branch version, I have to switch to touchmode and back to marlin mode before something is displayed on the screen else it stays black. EDIT: |
And I would like to use the BTT screen again, beacuse I'm not ditching Klipper because of a stupid screen. If they don't fix it I'll never buy BTT stuff again! |
BTT just lost another sale of a TFT35 because this is not fixed |
@bigtreetech Could you pls. look at this feature and make the last work to make it work as intended? Thanks.... |
After digging through the code and the ST7920 datasheet I think I found the solution to make the TFT35 and likely other BTT screens work with klipper. I fixed the issue in my fork and can confirm that it works for the TFT35v3: https://github.com/teeminus/BIGTREETECH-TouchScreenFirmware I am not sure if I should create a MR for that as I hardcoded SPI mode 1 as suggested somewhere else. I also created a stripped down version of the firmware that has only the ST7920 emulator left as I don't use the touch functionality at all. Feel free to check it out as well: https://github.com/teeminus/NoTouchScreenFirmware |
@teeminus Great work... Is there support for touch in Klipper? Else the "Stripped" down menu should mabye be an Env to define when compiling, mabye called "Klipper Mode"? |
@ETE-Design I don't know if klipper has touch support, but I would guess there isn't as "real" ST7920 based screens just have a rotary knob. Technically one could create klipper build targets for the different screen models. But it seems that the spi mode auto detection is not working correctly, so that needs to be disabled in that mode as well. |
@teeminus thank you very much for your work on this. I would be more than happy simply having a text only ST7920 firmware, as I only use Klipper now and I personally prefer to have no touchscreen functionality on a 3d printer as I'm clumsy and have sometimes accidentally cancelled long prints in the past! I only have the TFT24 however, I'll try building it and see how it goes, right now the screen has been gathering dust for almost 1 year so it would be great to use it for something. 👍 |
@DeviousPenguin As not all BTT screens have the required "ST7920_SPI" define set, I updated the readme of the minimalistic firmware so one can easily see if the screen is currently supported. I also uploaded precompiled binaries, which came out as byproducts of the compile test. |
The touchscreen firmware is gone. Anyone knows where I can find it? I currently use the notouchfirmware. |
That was just my fork to investigate the issue. I deleted that fork as it turns out the "fix" I found was no real fix for the issue. |
Is there any way to increase the resolution of the notouchscreenfirmware? |
What do you mean by resolution? The firmware uses the biggest pixel size possible. There is no fullscreen mode because this produces fractional pixel sizes. |
The TFT35 has a resolution of 480x320, but the emulation utilizes 128x64, so it is quite blocky. Not sure if this can be scaled up somehow or if this is technically impossible. |
The firmware uses a pixel size of 3x3 (which is the biggest pixel size if you want square and non fractional pixel dimensions when upscaling) for the TFT35. The image will always be blocky because there is no edge smoothing or something like that. |
whats the status right now of this?? i'm testing klipper currently, and with BTT Firmware i did have ah "working" screen sometimes, sometimes after i turn the decoder wheel, and sometimes its only displaying rubish... as far as i understand there happens same bit mismatch, does this also happen on the noscreenfirmware ? @teeminus (i gonna test this in a seconds on my B1 TFT35) |
It depends on your printer mainboard. On some mainboards, the display is not reset when Klipper is restarted which causes the bit shifts. This problem is independent from the TFT firmware. However, for Klipper there is a "emulated_st7920" display driver which has been developed to fix this problem with the NoTouchFW. This might fix the communication problems for the BTT firmware as well. |
@teeminus i've tested the notouchFW... looks like it works better with klipper as the current-normal BTT TFT... as i didn't get any character gitter anymore.... BUT i can't touch the wheel.... ah couple of times i had klipper to "shutdown", looks like i fixed this too now... as something odd with PI + picam v2 goes on... i even had this before with marlin and octoprint, but fixed it with wifi firmware downgrade... did now an update with kiauh and looks like i updated the firmware again, but can't revert it back to the old state now... idk... but anyway when webcam is running pi's cpu usage gets high and wifi starts dropping packages... and i think i had some random shutdowns from klipper because of this... so not sure if this was ah coincidence when i pressed the encoder, but for sure i can't get into the menu... also tried so set the klipper config allready to the emulated_st9720 but i'd might try to reflash the btt firmware... because i had the encoder wheel working there... |
@DaStivi The encoder wheel and button is handled by Klipper, not by the TFT firmware. |
Thx for explanation, indeed it worked once yesterday... So sometimes the screen still looks like to freeze, aber had also ah garbeled screen yesterday again.. I'd might install your debug Version... But maybe also try again btt FW with the emulated screen Config again... |
@teeminus flashed the debug today as i got random freezes of the tft.... started another calibration print, and noticed the new debug ui... allready noticed some lag of the display... but after that it resumed... look at the printer 10min later and just welcomed with following garbage... as you may can see the debug counter still counts as expected i guess... edit, again after 5minutes... some paramters show values again... |
@DaStivi Could you please create a new issue at the NoTouchFW repo? I think it's better to discuss you problem there as it is not related to this firmware. |
+1 |
Good news for all Klipper users. User teeminus was able to solve an outstanding issue together with BTT and now a PR is available. Happy testing |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Many users of your skr boards use klipper (https://github.com/KevinOConnor/klipper).
Please add a character generator to TFT / src / User / API / UI / ST7920_Simulator.c to make your tft24 screen and similiar usable.
Further information can be found in the Klipper issue at Klipper3d/klipper#2231
Your community will appreciate it very much
Thank you very much
The text was updated successfully, but these errors were encountered: