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

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

      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.

      Please post your exact config line for the M918 command.

      1. I'm not sure of the Duet Wifi situation and what display support it currently includes. Did you build the firmware yourself?
      2. P2 is definitely the display type you want.
      3. If you are sure of the electrical connections, logical levels and voltage levels, then trying R6 for the resistor ratio and playing around with the C parameter (contrast 0-100) could work.
      4. Perhaps starting with a slow SPI frequency (F parameter) also helps.

      So something like M918 P2 R6 C60 F200000 may just work.

      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 thank you for your response.

        Changelog of 3.2 beta 2 says:

        Supports ST7567-based 12864 displays on Duet Maestro and Duet WiFi (thanks to SchmartMaker for writing the ST7567 driver code)

        So Im testing with 2.1 and 1.2 versión of fysetc mini 12864 with the pin asignement by @dc42, exp1 of mini to LCD exp in duet and exp2 mini to sd exp of duet, direct conection.

        But something is not good, not work with your M918 line and if I rotate the encoder duet restart, maybe shorcut, with two LCDs.

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

          If the encoder turning causes a reset, the wires might be turned 180 degrees.

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

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

            @oliof I used dc42 pin asignement.

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

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

              If the encoder turning causes a reset, the wires might be turned 180 degrees.

              Oliof might be right. Just to rule out a wiring problem, can you provide a photo of the connections you made between the display and the mainboard so we can check?

              You may have done so already, but for troubleshooting purposes, I would also suggest to only connect the wires that are absolutely necessary for a working display.

              Just checked the source code and the pin mapping that David mentioned hasn't changed. You compiled the firmware yourself with #define SUPPORT_12864_LCD?

              The only change made to the source code recently was to the default contrast (changed to C30) for a ST7565 display. I believe David has used the Fysetc Mini12864 display to test the code with, so the default settings for the P2 display type should be already optimized for that model.

              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 seraser

                @Schmart Firmware is 3.2beta2, public, not compiled for me.

                Wiring is simple, exp1 of lcd to explcd on duet and exp2 of lcd to expsd on duet, checked pin asignement but maybe I miss some thing.

                With fysetc mini v1.2 backlight and leds light but with fysetc v2.1 nothing light and with both displays rotate the encoder result restart.

                duet_fysetc.jpg

                From github sources:

                pins_define.JPG

                Pinout fysetc:

                fysetc_pinout.JPG

                Edit:

                My bad, checked under board pinout and my wiring is bad for bad initial comprension, I will redo the wiring with board pinout, sorry my bad english Im spanish.

                board.jpg

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

                  @seraser, yes, I think the one-to-one pin mapping of standard ribbon cables will not cut it in this case. For this purpose, I made a custom cable using Dupont connectors and twisted wires from a UTP cable (not solid core but the stranded kind).

                  Pinouts for your board are also here BTW.

                  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

                    @Schmart doesn't work, conected from connlcd2 to connlcd10 and supply 5v and only light with 1.2 version and no lights with 2.1 version tested with many M918 P2 configs.

                    I will test both LCD with ramps and if work ok I will stop because best choice is wait other guy trying.

                    Best regards.

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

                      The version 2.1 Fysetc display won't work on the Duet WiFi (yet) because RRF for Duet 2 doesn't support the Neopixel backlight.

                      I will investigate the other problem with ST7567-based 12864 display and Duet 2.

                      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

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

                        @dc42 Ok, thank you very much.

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

                          I am trying to get the Mini 12864 working with my maestro, but it seems like I may have gotten the pinout wrong - the display lights up, but does not show anything... - is the final pinout somewhere documented?

                          I tried to follow the Maestro side identically to this post from Schmart i.e. Exp0 -> A0, Exp1 ->CS, remaining SPI pins from the EXP1 connector. For the display I followed the pinout from github. My config.g contains "M918 P2 E2". Issuing M112 yields "RepRapFirmware for Duet 2 Maestro version 3.2-beta2 running on Duet Maestro 1.0"

                          Did I miss anything?

                          IMG_7934.jpg

                          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? 1 Reply 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:

                            , but does not show anything...

                            you have added menu files to the sd card?

                            is the final pinout somewhere documented?

                            best source will always be the source on github / Pins_DuetNG.h for the version in question

                            pixelpieperundefined 1 Reply Last reply Reply Quote 0
                            • 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
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA