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.
    • pixelpieperundefined
      pixelpieper @A Former User
      last edited by pixelpieper

      @bearer yes, I did. Just checked the maestro header file:

      constexpr Pin LcdCSPin = PortCPin(9);
      constexpr Pin LcdA0Pin = PortAPin(21);    // EXP_0
      constexpr Pin LcdCSAltPin = PortAPin(22); // EXP_1
      

      The chip select is defined twice, do I need to enable something else for the “alt” pin to work?

      Voron V2.434 / Duet 3 Mini5+, Duet 3 Expansion Mini 2+, Duet 1LC V1.1 Toolboard
      Voron V0.250 / Duet 2 Maestro

      A Former User? Schmartundefined 3 Replies Last reply Reply Quote 0
      • A Former User?
        A Former User @pixelpieper
        last edited by

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

        The chip select is defined twice,

        once for lcd and once for sd card presumably?

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

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

          @bearer yes, I did. Just checked the maestro header file:

          constexpr Pin LcdCSPin = PortCPin(9);
          constexpr Pin LcdA0Pin = PortAPin(21);    // EXP_0
          constexpr Pin LcdCSAltPin = PortAPin(22); // EXP_1
          

          The chip select is defined twice, do I need to enable something else for the “alt” pin to work?

          Using an alternative pin for CS instead of the original CS pin is unfortunately necessary on a Duet 2 Maestro when using a ST7567. Here's some background. The electronics on the Maestro were originally designed with a ST7920-based display in mind. That display requires an active high CS. On the Maestro, the CS, clock (SCK) and data output (MOSI) signals are buffered by a 74HCT08 chip (from 3.3V to 5V) . Additionally, the SCK and MOSI are passed through (gated) only when CS is high. Now, the ST7567 display has an active low CS. Which means that if CS is low, SCK and MOSI will be blocked and useless. So therefore, the original CS is set high permanently, and the alternative pin EXP_1 (unbuffered 3.3V) is used for the active low CS to the ST7567.

          The ST7567 also requires an additional pin to indicate if data sent to the display should be considered a command or display data. That is called the A0 and on the Maestro, EXP_0 is used for that.

          Getting a ST7567 display to work successfully is based on the right wiring, configuration (display type, display contrast and resistor ratio), and a compatible display that accepts 3.3V levels, so there are quite some variables to get right. At least, the schema in my post that you mention is correct on the Maestro side, I'm using that right now.

          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
          • Schmartundefined
            Schmart @pixelpieper
            last edited by

            @pixelpieper I've taken a look at the picture you provided, and as far as I can tell the wiring seems in order (based on the Fystec Wiki article).

            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.

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

              @pixelpieper in the Wiki for this display I do see mentioned that dynamic contrast may not be supported. Did you play with the contrast parameter (e.g. try C100) already?

              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.

              pixelpieperundefined 1 Reply Last reply Reply Quote 0
              • pixelpieperundefined
                pixelpieper @Schmart
                last edited by pixelpieper

                @Schmart Yes, I did, however there was no difference :(. Did pull out my scope for a change, there is traffic on A0 and CS as well as on MOSI/SCK. Will try to do a little bit more debugging later the week.

                Voron V2.434 / Duet 3 Mini5+, Duet 3 Expansion Mini 2+, Duet 1LC V1.1 Toolboard
                Voron V0.250 / Duet 2 Maestro

                1 Reply Last reply Reply Quote 0
                • pixelpieperundefined
                  pixelpieper
                  last edited by pixelpieper

                  Well, it is alive. Turns out the display likes a nonactive reset to work - go figure.

                  IMG_7936.jpg

                  Seems we can use the high active ST7920 chip select for this purpose.

                  Voron V2.434 / Duet 3 Mini5+, Duet 3 Expansion Mini 2+, Duet 1LC V1.1 Toolboard
                  Voron V0.250 / Duet 2 Maestro

                  seraserundefined Schmartundefined 2 Replies Last reply Reply Quote 0
                  • seraserundefined
                    seraser @pixelpieper
                    last edited by

                    @pixelpieper can this solution be applied to duetwifi?

                    pixelpieperundefined 1 Reply Last reply Reply Quote 0
                    • pixelpieperundefined
                      pixelpieper @seraser
                      last edited by

                      @seraser this is not maestro specific - the lcd reset pin of the mini 12864 has to be somehow pulled high in order to have the display leave its reset.

                      @dc42 from the firmware side: when configured as M918 P2, are we guaranteed that the then not functional active high chip select on the maestro display connector stays always high? I.e. is it safe to use as the reset pin?

                      Voron V2.434 / Duet 3 Mini5+, Duet 3 Expansion Mini 2+, Duet 1LC V1.1 Toolboard
                      Voron V0.250 / Duet 2 Maestro

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

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

                        nonactive reset

                        Congratulations, great find! It's nice to see you also have the right tooling at hand to do the troubleshooting 👍 Apologies that I couldn't help you with this one, I don't have any Fysetc displays, and the Creality display I tested with doesn't need a reset.

                        As for your question to use the CS as RESET; does your display also work correctly when the reset pin is permanently tied to Vcc or does the reset signal need a delay?

                        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
                        • seraserundefined
                          seraser
                          last edited by seraser

                          @dc42 finally working duetwifi, after all pins connected without any modification.

                          duetwifi_lcdfysetc.JPG

                          Edit: enter key pushing encoder dont work![0_1602444104968_IMG_20201011_204711.jpg](Uploading 100%)

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

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

                            @seraser this is not maestro specific - the lcd reset pin of the mini 12864 has to be somehow pulled high in order to have the display leave its reset.

                            @dc42 from the firmware side: when configured as M918 P2, are we guaranteed that the then not functional active high chip select on the maestro display connector stays always high? I.e. is it safe to use as the reset pin?

                            Yes, it should be.

                            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
                            • seraserundefined
                              seraser
                              last edited by

                              @Schmart now is working fine but no enter key detected when press encoder, what can I check?

                              Rotate work.

                              Thank you.

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

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

                                no enter key detected

                                thats just a switch wired to EncoderPinSw so check the wiring and or voltage on the signal with the key pressed and not pressed?

                                seraserundefined 1 Reply Last reply Reply Quote 0
                                • seraserundefined
                                  seraser @A Former User
                                  last edited by

                                  @bearer will check this night, thank you.

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

                                    @bearer thank you swaped beep with enc_sw and now LCD work fine but no sd card detected, checked and checked and checked wires and all are fine for sure and m122 only reports sdcard0.

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

                                      Cs, miso, mosi and csk are fine connected and with 3v3 volts, tomorrow I will check trafic with my oscilloscope.

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

                                        @pixelpieper your LCD detect sdcard?

                                        Maybe the problem is related to CD(card detect) pin 2.4 exp2 in LCD with no way to duet.

                                        Schmartundefined pixelpieperundefined 2 Replies Last reply Reply Quote 0
                                        • Schmartundefined
                                          Schmart @seraser
                                          last edited by Schmart

                                          @seraser I don't think the card detect is the problem. From the Fysetc schematic, it's just a simple switch without other connections and the Duet doesn't need a card detect signal.

                                          If you have SPI traffic correctly coming out the Duet, maybe try a high quality SD card or use shorter or twisted cables for the connection to the display.

                                          Also, you mention using 3.3V as supply voltage? I think you need to use 5V. There should be a voltage regulator on the display PCB that converts the 5V supply voltage to 3.3V. There's even a 74HC4050 buffer that protects the SD card's inputs.

                                          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.

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

                                            @Schmart power supply is 5v.

                                            Tested three sdcards.

                                            Short dupont connections, checked fine.

                                            Maybe with initial bad connections 74HC4050 is damaged.

                                            I will replace with donor board to test.Screenshot_20201013-082528210.jpg

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