Paneldue 7" with esp32/raspberry pi
-
Hi. I have a Paneldue 7" display with Atmel ATSAM4S4B with SSD1963 and XPT2046. It has the paneldue firmware already in it. I want to use this display for other purposes, not just as a display for 3D printer. Since it has an SSD1963 and XPT2046, it feels like a TFT display, except it has a processor in it. I want to hookup this display along with esp32/Raspberry pi to upload images or use it for other purposes. Is there any workaround for this? Libraries to connect esp32 with Atmel onboard processor? Methods to flash custom firmware on it? Can I upload code with Tx/Rx or SPi bypassing the processor? Please help me out with this.
-
@Candy This is a clone of the Duet3D PanelDue, which we don't support here. Unfortunately the PanelDue is not Open Source (it was not designed in-house by Duet3D) so we don't have any more information on how the hardware is designed.
That said, it sounds like a lot of work to rewrite the firmware to interface the Atmel with an ESP32, particularly when it will limit the display capability (ie, text only). Probably better to find an ESP32 breakout board to connect the ESP and TFT without the Atmel in the middle. Then you could develop a UI in lvgl.io . Look at similar screens from Elecrow or MakerFabs, they're not that expensive.
Ian
-
@droftarts Thanks for the reply. This is indeed a clone of the Paneldue display. I need help on the connections to the esp32. If I connect the esp32 to the display using a breakout board, can I program it using the Tx/Rx or should I use the 10 pin connection on the top of it?
-
@Candy if it is a PanelDue version 3 clone then you can program it via the Tx/Rx pins. But it is probably easier to program it via the USB port using Bossa running on a PC.
-
@dc42 Thanks for the reply. If I want to program this via the USB port using Bossa, I should work with the firmware of the Atmel right? If I want to use the Arduino ide/PlatformIO, can I use the 10pin connectors and SPi to upload some code, like basic printing of "Hello world" on the display? Is this possible? If so, please help me out in the process
-
@Candy if you use Arduino ide/PlatformIO then you can export the binary file that it generates and use Bossa to upload it via USB. However, you will need to find an Arduino core that supports the ATSAM4S4B processor first.
-
@dc42 Wow, that is nice. If I write a code and generate the bin file with arduino ide/esp32, will just uploading the file through Bossa make the display work? Is there any need for specific firmwares/libraries other than SSD1963 and XPT2046? I came to know about Atmel studio ASF and MPLAB IDE. Can I upload custom code to the display through this?
-
@Candy I haven't tried uploading code directly from those so I don't know whether they contain the equivalent functionality of Bossa.
I build firmware for PanelDue using Eclipse IDE. There is also a CMake script for building it. The project is at https://github.com/Duet3D/PanelDueFirmware.
-
@dc42 I went through the project in Github for PanelDue firmware. It was mentioned that using eclipse ide, the project can be built and uploaded to the display. Can this be customized using eclipse ide to display something else other than the default? Also, I found the binary file for the firmware to be uploaded to the display and uploaded it using Bossa and it worked. If its possible to know how to make a custom binary file like this, it would be really helpful for me. Can this be done using Eclipse ide?
-
@Candy yes, you can use Eclipse IDE to make a custom binary. I suggest you retain the startup code, hardware interface code and libraries from the existing project to save you having to write those parts again.
-
@dc42 Thanks for the reply. I'll give this a try and get back to you
-
@Candy Hey I tried using Eclipse IDE. I followed the steps given in the projects folder in github. I installed arm-none-eabi-gcc 10.3-2021.10, eclipse ide for embedded c/c++, edited the PATH in system and eclipse to look for make and arm-none-eabi-gcc. When I build the project, I get the error which I have attached in the photo. Is this an error due to any different versions installed? Have you got this error?
-
@Candy the gcc version you are using is too old. Try the latest one from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads.
-
@dc42 Wow that worked. Thanks for the help
-
@dc42 That worked great. Right now, I built the project and got the .elf file and converted into .bin file and used Bossa to upload the .bin file. Can you give me a heads up on how to use eclipse for coding the display and where to start as the ide feels totally new to me.
-
@Candy you'll have to do the programming yourself, but I can give you a general guide to what the existing modules do:
- Function main() in file PanelDueFirmware.cpp contains the initialisation, followed by a forever-loop that's similar in concept to the Arduino loop() function. It checks for data received from the serial port, checks for input from the touch panel, and updated the display as needed
- The Hardware folder contains files and functions that interface to the screen, touch panel, piezo buzzer and serial port. You'll probably want to mostly leave those alone, at least to start with. The SerialIO.cpp file parses received characters as JSON objects because that is the format in which Duets send data to PanelDue.
- The UI folder defines the user interface. Within that, Display.cpp defines a number of types of object that can be displayed, for example buttons and text fields. UserInterface.cpp defines how the user interface responds to received data and to presses on the touch panel.
-
@dc42 So, in order to display simple text like "Hello" or display an image, will editing just the main() file work? In case I need custom buttons/graphics, I should be editing the UI folder