Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Logic Level shifter for 12864 display on Duet 2 Wifi

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    11
    200
    16.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • oliofundefined
      oliof
      last edited by

      @bearer by the way, there is a 3.3v source on CONN_SD as well (Pin #8), so no need to head over to the z probe for that.

      <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

      1 Reply Last reply Reply Quote 0
      • A Former User?
        A Former User
        last edited by

        yeah, noticed when i finished up the wirng, but now i finally need to get on with setting up rrf3

        1 Reply Last reply Reply Quote 1
        • Schmartundefined
          Schmart @oliof
          last edited by Schmart

          @oliof I'm pretty sure the CR-20 minipanel is based on the ST7565. The first clue was that I haven't been able to find any display modules of that (small) size with an ST7920 on it, they all come equipped with a ST7565. Also, I put a logic analyzer on the display pins of the Creality mainboard, and I'm seeing A0 being actively used as data/command line (4-wire SPI) and the decoded commands correspond to the ST7565 datasheet. Here's a screenshot from a saved capture:

          899ae61f-183f-41f9-80ac-152e57b60975-image.png

          Edit: improved wording.

          Creality CR-20 Pro with a Duet 2 Maestro, 3Dfused X+Z-axis rail kit, HIWIN-based DIY solution for the Y-axis, E3D Hemera, working ST7565 MiniPanel and various other small hardware improvements.

          A Former User? 1 Reply Last reply Reply Quote 0
          • A Former User?
            A Former User @Schmart
            last edited by

            @Schmart fyi oliof is "gone fishing" for a bit; https://forum.duet3d.com/topic/15792/taking-a-break

            Schmartundefined 1 Reply Last reply Reply Quote 0
            • Schmartundefined
              Schmart @A Former User
              last edited by

              @bearer Thanks for the heads-up! Then please consider my message as general information for the forum 😉

              Creality CR-20 Pro with a Duet 2 Maestro, 3Dfused X+Z-axis rail kit, HIWIN-based DIY solution for the Y-axis, E3D Hemera, working ST7565 MiniPanel and various other small hardware improvements.

              1 Reply Last reply Reply Quote 0
              • oliofundefined
                oliof
                last edited by

                Just a little peek to report that I got it almost working with a cloned RepRap Smart Graphics Controller with very low SPI speed (100kHz) and somewhat malfunctioning buttons (stray button presses registered) using a txs0108 -- most likely due to shoddy cabling work.

                @Schmart thanks for the headsup. That's a bummer as I lack the time and skill to implement full ST7565 support.

                <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators
                  last edited by dc42

                  After a bit more research I discovered that the mini 12864 displays that use the ST7567 chip should already be 3.3V-compatible. That includes this one https://github.com/FYSETC/Mini-12864-Panel and clones, including the Viki 2 and MKS Mini I think. These displays need one more pin that the ST7920-based displays and a modification (probably small) to the driver, but that shouldn't be difficult.

                  What's stopping me adding this support to the Duet WiFi/Ethernet firmware as standard is that there isn't enough room in flash memory. Recent improvements in RRF 3.01RC and switching to a more recent C++ compiler and library have increased the binary size to 493kb, leaving just 19kb free against 24kb needed.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  1 Reply Last reply Reply Quote 0
                  • oliofundefined
                    oliof
                    last edited by

                    ISTR that extra pin is for digital contrast control (the smart full graphics controller has a potentiometer for that) so it might need another option for M918 to set contrast ... likely adding some more memory requirements.

                    But as long as there's no space in RAM that's likely moot anyways.

                    <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                    dc42undefined 1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators @oliof
                      last edited by

                      @oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:

                      ISTR that extra pin is for digital contrast control (the smart full graphics controller has a potentiometer for that) so it might need another option for M918 to set contrast ... likely adding some more memory requirements.

                      It's not for contrast control, it's just that the ST7567 controller chip needs a command/data input pin as well as data, clock and CS.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 1
                      • oliofundefined
                        oliof
                        last edited by oliof

                        Today I learned.
                        That said, I'd be willing to carry a patch removing unnecessary kinematics for an unofficial unsupported build with ST7567 support to make space -- I already know how to do that. I should be able to keep the patch going in case it needs changes ...

                        @dc42 I want to thank you a lot for even putting forward the consideration of including it; I also understand other features would be prioritized indefinitely.

                        <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                        1 Reply Last reply Reply Quote 0
                        • antlobundefined
                          antlob
                          last edited by

                          @oliof @dc42 @bearer

                          First of all congratulations for the great job, I'm new to Duet 2 Wifi and have an LCD 12864 that came with my 3d printer (secKit Go) I also have the Paneldue 4,3". My first question is: Could I have both displays working at the same time? If I loose the SD card on the LCD 12864 would be fine since I have it on the Paneldue 4,3". What I would really like is to have the encoder operational on the LCD 12864. Is this doable? Many thanks in advance for your support.

                          1 Reply Last reply Reply Quote 0
                          • oliofundefined
                            oliof
                            last edited by

                            emerges from time spent away from 3d printing

                            If the SecKit go panel is driven by an ST7920 it will work with the level shifter and a custom Duet2 Wifi firmware that makes space for the LCD12864 support today by cutting something else (for example a motion system you don't need on your printer like Hangprinter).

                            AFAICS using an LCD12864 and PanelDue in parallel works. But then v3 PanelDues have the pins for an encoder and there will be support for it in a future release so maybe it's better to wait for that.

                            submerges again

                            <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                            1 Reply Last reply Reply Quote 0
                            • antlobundefined
                              antlob
                              last edited by

                              @oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:

                              v3 PanelDues

                              Thanks @oliof for the reply. It does have the ST7920 so I I would need to connect the LCD to the CONN LCD on the Duet and add a level shifter following the schematics on the forum above skipping the SD Connector, rigth?. That does not seem hard but, my struggle is with the firmware, following Markus Scheck blog and the comments above in the fourm there are some libraries to be included and minor changes to be made to them. I've found this instructions for building https://github.com/Duet3D/RepRapFirmware/blob/dev/BuildInstructions.md of the @dc42 fork but ... I know it is a stupid question and sorry in advance, Where can I find the source libraries to make the bin file? My current version on the Duet 2 Wifi is 2.05.

                              Thanks again for your time.

                              A Former User? 1 Reply Last reply Reply Quote 0
                              • A Former User?
                                A Former User @antlob
                                last edited by

                                @antlob Looks like they've started migrating to https://github.com/Duet3D/

                                btw, you need the gate function of the 7408 as well as its level shifting. (I used the TXS0108 as the enable pin mimicked the AND gate function.

                                antlobundefined 1 Reply Last reply Reply Quote 0
                                • antlobundefined
                                  antlob @A Former User
                                  last edited by antlob

                                  Thanks for the tip @bearer, found them finally, is huge but I'll definitely try it. Just one question, if I only connect ENC_SW, ENC_A, ENC_B, BEEP on the Duet 2 CON_LCD to the EXP 1 and EXP 2 on the LCD 12864. Will it work? The CON_SD is used right know to support the SD on the PanelDue.

                                  A Former User? 1 Reply Last reply Reply Quote 0
                                  • A Former User?
                                    A Former User @antlob
                                    last edited by

                                    @antlob said in Logic Level shifter for 12864 display on Duet 2 Wifi:

                                    Will it work? The CON_SD is used right know to support the SD on the PanelDue.

                                    CON_SD is also needed to drive the display, it uses the SPI bus for both, which is why I opted to change things around so I could connect only CON_SD and have a functional display sans the encoder.

                                    antlobundefined 1 Reply Last reply Reply Quote 0
                                    • antlobundefined
                                      antlob @A Former User
                                      last edited by antlob

                                      OK! So for what you say it is impossible to connect this LCD only from CON_LCD. I do not have the required knowledge to swap the SPI pins to CON_LCD, or maybe it is not even possible. Thank you, you saved me a lot of time!

                                      A Former User? 1 Reply Last reply Reply Quote 0
                                      • A Former User?
                                        A Former User @antlob
                                        last edited by A Former User

                                        @antlob said in Logic Level shifter for 12864 display on Duet 2 Wifi:

                                        me the modified libraries to make the build?

                                        I didn't modify any libraries, and the patch against RRF is up there somewhere, and I believe we included it on the easyeda page for the board as well.

                                        I don't have access to the computer I built the firmware atm, but i found these locally, if you're prepared to recover by usb/bossa you could give it a try.

                                        https://www.dropbox.com/s/g42b7gye964sd5e/Duet2CombinedFirmware_2.0.51_LCD8.bin?dl=1
                                        https://www.dropbox.com/s/f7fjuu7f0wcf7dc/Duet2CombinedFirmware-rrf3-lcd.bin?dl=1

                                        antlobundefined 1 Reply Last reply Reply Quote 0
                                        • dc42undefined
                                          dc42 administrators
                                          last edited by dc42

                                          The RRF v3.02-dev branch now includes the changes needed to support ST7920 and ST7567 displays in the source code. Unfortunately the generated binary is too large if you enable SUPPORT_12864_LCD in the standard Duet2CombinedFirmware build. So something else will need to be done, perhaps one of the following:

                                          • Strip out unused functionality
                                          • Use separate builds for Duet Wifi and Duet Ethernet, so that only one set of network code is needed
                                          • Remove the large font
                                          • Change the optimisation options to optimise for space instead of speed, and use function-specific attributes on those functions where optimisation for speed is desirable

                                          Duet WiFi hardware designer and firmware engineer
                                          Please do not ask me for Duet support via PM or email, use the forum
                                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                                          antlobundefined 1 Reply Last reply Reply Quote 0
                                          • antlobundefined
                                            antlob @A Former User
                                            last edited by

                                            @bearer Many thanks! I'll make the circuit on a breadboard just to see if I can turn on the display.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA