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
    17.0k
    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.
    • antlobundefined
      antlob @A Former User
      last edited by

      @bearer OK, so I just upload them and that's it?

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

        @bearer Did a little reading on the links you sent me, used this one https://github.com/jadonmmiller/UltimateDuetMenuSystem/releases follow the instructions and a funny thing happened. When uploading the Zip file from the display menu in DWC and rebooted everything stopped working. I took out the SD card and it turns out that all the /sys directory was written with the menu files it erased the existing files and on the /menu directory was nothing. Luckily had a backup so arranged everything and put the menu files in their corresponding directory but still can't make the LCD12684 to work. Have even rewired everything just in case and the result the same. Maybe is the firmware I'm using is the one you gave me the link https://www.dropbox.com/s/f7fjuu7f0wcf7dc/Duet2CombinedFirmware-rrf3-lcd.bin?dl=1. Don't know what else to do.

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

          @antlob i never had any success with uploading macros or menu files through dwc, but erasing existing files is new, sounds like an issue with dwc.

          i didn't do anything but M918 P1 E2, put the files in /menu, wired according to the schematic and the firmware with the patch. seems to work for me and others before me so odds are you've missed a step or your display has a different pinout to the reprap smart grpahics controller.

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

            @antlob even without menu files, if you do a firmware upgrade from DWC, a message "Upgrading firmware..." should be shown on the display (providing the firmware was compiled with the correct font set).

            If no text appears during a firmware upgrade, other than pinout, it could be one of the issues from this post as well, mentioning the contrast trimpot and such.

            I didn't read back this entire thread, but have you seen the display working correctly before?

            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
            • antlobundefined
              antlob
              last edited by

              @bearer @Schmart First of all sorry for not replying until today, yesterday couldn't find time to continue. I know I say it everytime I write but I'm really grateful for all the help you've given me so far, without you gys I counldn't by any change connect the display.

              I think that I've read in diagonal all the posts about this LCD 🙂 and all the suggested help you adviced, even a guide to connect the Ender 3 to Duet Maestro. Since I was running RRF 3.1.1 and then installed @bearer RRF 3.0 I thought that maybe I needed to wipe and do a clean install. What I did was:

              • Erase the Duet
              • Using BOSSA uploaded the @bearer firmware version 2.05
              • Downloaded this menu https://github.com/mudcruzr/Duet-Maestro-12864-Menu-Files
              • Copy again all the sys and rest of menus

              What happened?

              • The same issue but in a thread of another post @dc42 suggested to another person put in the terminal M918 P1 and then voilà the display worked. The funny thing is that in my config file at the end was the M918 P1 E-4 F2000000. What I did was take out the frequency parameter and the display worked.
              • On DWC the menu tab was not displayed.
              • The encoder works but cannot select anything, the press doesn't do anything.

              Then I erased the Duet again and did a clean install of @bearer RRF 3.0. And have the following issues:

              • On reboot the display is blank (is lighted but with no text on the matrix).
              • I have to manually type M918 P1 E-4 and then the display works
              • The encoder works but can't select anything, nothing happens when I press the encoder button.
              • The display show correctly the temps, coordinates.
              • In DWC now I have the menu tab

              IMG_20200607_161746.jpg

              My thoughts about my issues are the following:

              • The encoder press must have a command or something that I'm missing in the menus since they were made for a Duet Maestro. I know I have to dig in every menu file to adapt it to my Duet 2 Wifi.
              • I can't understand why in my config.g the M918 doesn't work

              What I haven't find yet is if there's a guide to create menus and the usage of encoder. Could you give me a little assistance please?

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

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

                Then I erased the Duet again and did a clean install of @bearer RRF 3.0. And have the following issues:

                On reboot the display is blank (is lighted but with no text on the matrix).
                I have to manually type M918 P1 E-4 and then the display works
                The encoder works but can't select anything, nothing happens when I press the encoder button.
                The display show correctly the temps, coordinates.
                In DWC now I have the menu tab

                would suggest one of us messed up the enc_sw connection and/or code. i didn't explicitly test the encoder as i won't use it, however its a simple normally open switch to ground, just like enc_a/b. starting to look like i won't revisit this for a couple of weeks (one handed bandit for a while)

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

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

                  one handed bandit for a while

                  Sorry @bearer, since I'm from Spain and not a native English speaker don't understand the "one handad bandit for a while". Do you have, by any chance, the master of your fork so maybe I can dig a little bit and try to find out why the encoder's push button does not work?

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

                    (temporarily disabled hand, so only one working hand left for a while)

                    anyways its all in the thread, i haven't forked the code
                    https://forum.duet3d.com/post/147841
                    https://forum.duet3d.com/post/147937

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

                      @bearer OK, hope you get better!

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

                        @antlob the encoder button is also something I had trouble with -- but other than with your issue, I got "ghost" clicks with the 12864 I tried. I blamed that on bad wiring at the time since I know that everything works fine on the Duet Maestro.

                        Considering the manual entry of M918 P1 -- I had a similar issue with the 12864 on Maestro where the first command would enable the screen but the graphics would be corrupted. I solved this by doing

                        M918 P1
                        G4 P1000
                        M918 P1
                        

                        I.e., initializing twice with a one second pause in between.

                        (coincidentally, I tried my Creality Minipanel this afternoon and while I didn't get the display to show anything, I got Encoder wheel and button working -- tested with a very simple main menu that just calls Macros running various M291 commands, i.e. creating disimissable popups I can observe in DWC).

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

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

                          for what its worth i had no issues on the Maestro, beyond the polarity on the geeetech display headers being wrong and the encoder skipping two entries which was solved by E2 in M918 as such I didn't bother testing on the Wifi board.

                          I'm guessing dc42 wil be done with his 756x stuff by the time I get the cast* off and will poke it some more then

                          *) give the kids alcohol before the sports get them!

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

                            @oliof Thanks! Yesterday came to the same conclusion as you did the same, initializing twice and it works. About the button I dig in some Arduino forums and tested the encoder, when I press it closes a circuit to ground so the hardware is fine. In my case, the rotary works just fine is only the switch button.
                            When I donwloaded @bearer's patch, in it is clearly defined that the pin used for the encoder switch is number 8 and that it connects to CONN_LCD 10.

                            +// 12864 LCD
                            +// The ST7920 datasheet specifies minimum clock cycle time 400ns @ Vdd=4.5V, min. clock width 200ns high and 20ns low.
                            +// This assumes that the Vih specification is met, which is 0.7 * Vcc = 3.5V @ Vcc=5V
                            +// The Duet Maestro level shifts all 3 LCD signals to 5V, so we meet the Vih specification and can reliably run at 2MHz.
                            +// For other electronics, there are reports that operation with 3.3V LCD signals may work if you reduce the clock frequency.
                            +// ST7920 doesn't allow SCK/MISO signals when CS is not asserted, therefore the AND gate on the Maestro
                            +constexpr uint32_t LcdSpiClockFrequency = 2000000; // 2.0MHz -- Top View --
                            +constexpr Pin LcdCSPin = 7; //connsd.7 --> gate -> exp1.4
                            +constexpr Pin LcdBeepPin = 60; //connlcd.4 -> exp1.1
                            +constexpr Pin EncoderPinA = 85; //connlcd.8 -> exp2.5
                            +constexpr Pin EncoderPinB = 25; //connlcd.6 -> exp2.3
                            +constexpr Pin EncoderPinSw = 8; //connlcd.10 -> exp1.2

                            Seeing other diagrams in this post and also Schenk's tried out to connect the ENC_SW to the original CONN_SD.7 and it worked! But now I had an important issue, the 3.3v that should go to the LCD_CS were in an open circuit, but, nevertheless the LCD worked, maybe my model was one of the ones that can operate with 3.3 v signals. Now, since LCD_CS was always on 3.3 v, and it needed to be for the AND gates to work, I connected it directly to a 3.3 v of the expansion and now the display starts just fine and have even taken the delay in the config.g. I assume that on power up, the M918 preceeds the initialization sequence in the Duet and therefore we had to make a delay in order of it to work. I bet that if you take the first M918 and just use a delay of 2 seconds it will work just fine.

                            So, my wiring is as of @bearer's patch and schematics but connecting EXP1.1 to CONN_SD.7 and the SN74HCT08DR 2A or pin4 to a 3.3 v source.

                            Now I have to test the SD card, need to find another one and see if I can read it.

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

                              @bearer I solved, not in a fancy way but it works. Many thanks!

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

                                Not sure I quite followed you there, but sounds like the rrf3 binary may have been built before i swapped the two pins

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

                                  @bearer I think so and it makes sense since the patch says v2.05. The funny thing is that when I uploaded v2.05 the encoder switch didn't work also, maybe was bad wiring from my part, since I'm on a breadboard.

                                  Just tested the SD card and works perfect, remembered I had another in an old phone.

                                  I will solder now and make the wires. Again, many thanks guys. @bearer or @oliof if in the future you want my schematic (the change I made from @bearer's) I'll post it.

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

                                    Please post what you have (-;

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

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

                                      @oliof Sorry for taking so long to reply. Couldn't make some time until today to return to this personal project. The change I made from @bearer schematic is ENC_SW and LCD_CS pins, below the image with the changes. I think this could only work for @bearer's RRF3 https://www.dropbox.com/s/f7fjuu7f0wcf7dc/Duet2CombinedFirmware-rrf3-lcd.bin?dl=1.
                                      SCHEMATIC_CLD1864_DUET_2.png
                                      The only issue I find is that when accesing the SD card on the LCD12864 some lines appear on the display and have to clean them by manually entering M918 P1, even make a macro to just run it.
                                      I'll be looking regurlarly at this posts in case anyone needs help or when @dc42 uploads his 3.2 version. See you guys around and again many thanks to everyone!

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

                                        If you get artifacts when accessing the SD card slot, it's likely noise on the SPI connection. Try shielded it at least twisted cables.

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

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

                                          @oliof OK, thanks for the tip! Surely is that now that you mention it. I did the circuit soldering wire graps and the rest is ribbon cable unshielded.

                                          seraserundefined 1 Reply Last reply Reply Quote 0
                                          • seraserundefined
                                            seraser @antlob
                                            last edited by seraser

                                            Tested 12864 fysetc mini in beta 3.2.2 duetwifi and dont work @dc42 connected as you sugested in previous post, M122 dont report error.

                                            Try P1 and P2 with M918 and dont work.

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