Announcement

Collapse
No announcement yet.

Gen4-uLCD-24D and the dead Arduino

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gen4-uLCD-24D and the dead Arduino

    I have a Gen4-uLCD-24D which I need to operate via serial comms from custom electronics (which is essentially an Arduino Zero).
    When testing I have good results after loading the SPE environment and connecting via USB with a 4D-UPA adapter. This works well and the display responds to serial commands from the 'Serial Commander' and also from a C# program.

    However, I cannot get a response from the display when connected to an arduino due (or the custom electronics). It is connected via jumper leads with the gen4-IB type connector.
    I confirmed that the serial port is sending out the hex characters. The BigDemo example reports 'TimeOut' errors. I have a reset pin setup like the examples shown.
    I have tested the example code using the Diablo library and also my own code.

    This is problem number one which should be solvable I hope

    The second problem is worse. It appears that when the display is physically connected to the board (due or custom board) when reprogramming, the board fails to be re-programmable (later recovered). Has anyone seen this behaviour before and is there a known solution?
    For my application, physically disconnecting the display is not easy but later reprogramming maybe needed. Designing new boards may be an option.

  • #2
    Hello,

    Welcome to the forum

    There is a fix in the Diablo Serial library, please make sure you have the latest installed https://github.com/4dsystems/Diablo1...rduino-Library

    if you still have a problem it may be related to the selected com port of the Due. If the USB is connected and you are using Serial port 0 then there may be a conflict it would be advisable to use another com port on the Due and change your code to match.

    I hope this helps

    Best regards

    Paul

    Comment


    • #3
      Hello

      I can confirm that I have the latest version (with the fix for the Due.)

      I have tried multiple serial ports on the Due but had no luck. The common factor is the use of the gen4-IB and jumpers.

      For the second problem, it is recommended that the board is physically disconnected before programming?

      Thanks

      Jonathan

      Comment


      • #4
        Hi Jonathon,

        Would it be possible to send me the setup part of your Due code. If you are not going to use Serial 0 then this shouldn't be a problem and you should be able to leave the Due connected whi;e programming.

        Best regards

        Paul

        Comment


        • #5
          Hi Paul,

          I tested this code
          https://github.com/4dsystems/Diablo1...play_print.ino

          but swapped the sign of the reset routine as described. I changed line 3 to #define DisplaySerial Serial2.
          I also tried a cutdown version where I just change the background colour in the loop, followed by the Display.gfx_Cls() command and a 1s delay.

          The custom board is hardwired to Serial0, is this a problem?

          Thanks for your help,

          Jonathan

          Comment


          • #6
            Hi Jonathon,

            How is the custom board / Display and DUE powered. Is it all powered via the USB of the DUE or do you power it via the custom board.

            Best regards

            Paul

            Comment


            • #7
              Hi Paul,
              The Due is connected via the DC connector and the custom board is powered from a similar dc input.

              Cheers

              Jonathan

              Comment


              • #8
                Hi Jonathon,

                Thanks for that. If the power supply is 1Amp or higher then this should be fine so long as the custom board doesn't isn't using a lot of current from your power supply.

                Are you sure the tx & rx are connected the right way. It might be worthwhile swapping them around to test. Could you let me know what is displayed on the screen when you power up.

                Best regards

                Paul

                Comment


                • #9
                  Hi Paul,

                  The DC powersupply is 1000mA max and the custom board has a substantial power supply.
                  I did try swapping the TX and RX about just to make sure.
                  For the custom board the 30pin connector has GND on 1,21,25,30 5V 26,27 TX 23 RX 24.

                  The screen displays the startup mode, with SPE2 rev 1.2, PmmC rev 2.0 Comms 9600 ...

                  I have tested 2 displays so far and the behave in the same way.

                  Cheers

                  Jonathan

                  Comment


                  • #10
                    Hi Jonathon,

                    As the splash screen is displaying on power up and staying on, It is safe to say no comms are getting through. If your comms is set to 9600 on the Due then I would have expected the screen to change. You will have to monitor the serial that is going to the display to make sure you are getting a Tx on the Tx line.

                    Best regards

                    Paul

                    Comment


                    • #11
                      Hi Paul

                      Since my last message I managed to get the Due to talk to the display via serial using the gen4-IB connector. This time I used platformio and the same code as last week.

                      When compiling for the zero, there is an error reported on line 512 of Diablo_Const4D.h 'expected unqualified-id before numeric constant' .

                      On my custom board (an arduino zero), I still have a comms problem and also the problem that the board breaks (the serialusb port vanishes) if I include this one line: Diablo_Serial_4DLib Display(&DisplaySerial); where DisplaySerial is Serial.

                      Any information about testing with the Arduino zero would be useful at this point.

                      Cheers,

                      Jonathan






                      Comment


                      • #12
                        Hello Jonathan,

                        I well source an Arduino Zero today and to some specific testing. Just so I am right, your custom board is routing Serial0 (Serial) of the Zero to the display ?

                        Best regards

                        Paul

                        Comment


                        • #13
                          Hi Paul

                          Using the debug tool I have found that the fix in the constructor for the Arduino Due was the problem causing the my board to stop. Removing the flush() on the port fixed this.

                          I then tested Serial1 and this worked! I think my original notes for this were wrong.

                          Thanks for the tips. I think that I will make my own copy of the Diablo Library and put the edits in there. I'm not sure what define to use in place of the _SAM3XA_ for this board type.

                          Cheers,

                          Jonathan

                          Comment


                          • #14
                            Hi Jonathon,

                            It may be _SAMD21_ for the zero but I am not certain.

                            Paul

                            Comment

                            Working...
                            X