Olimex Support Forum

Others => UEXT => Topic started by: philmacu on October 06, 2023, 04:22:35 PM

Title: Problem using UEXTx5 with LCD2.8RTP
Post by: philmacu on October 06, 2023, 04:22:35 PM
I currently have code that drives the LCD2.8 from an ESP32-POE-ISO.
However I also need to connect a second device to the UEXT. So I purchased an UEXTx5. I have the LCD connected to the extender board and then connected the ESP32.
Nothing else is connected to the extender. Unfortunately the Display no longer works - I get a backlight so it is getting power.
The UEXTx5 is working - I have tried different code and connected a MOD-RS-485 to the ESP via the extender and it works as expected.
The only thing I can think of is the cable lengths. When using the LCD directly connected I am running it via a standard UEXT cable of approx 15cm. However this is effectively doubled when I insert the Extender board in the middle.
Any thoughts would be appreciated.
Phil
Title: Re: Problem using UEXTx5 with LCD2.8RTP
Post by: mihaiadrian on October 06, 2023, 06:23:34 PM
Is it not working when connecting second device to 5xUEXT ?  or just by inserting 5xUEXT in the middle results in not working ? What communication protocol is using the second device ?

maybe the 2 devices both use SPI ? Although from my tests if I connect 2 LCD2.8RTP to UEXT, results in same content displayed on both.

If you instead want to connect 2 display's and control them independently, that's a different story, is possible but in different approach. I;ve managed to connect 3 x  2.8RTP's to a esp32-poe-iso and control them independently.
Title: Re: Problem using UEXTx5 with LCD2.8RTP
Post by: philmacu on October 08, 2023, 05:36:51 PM
Thank you for your reply just by inserting 5xUEXT in the middle results in not working Nothing else is connected to the UEXTx5, the UEXTx5 is in the middle between the ESP32 and the LCD.
The UEXTx5 is electrically OK - I may try using a shorter cable - but I will have to make one so may take a bit of time.
Title: Re: Problem using UEXTx5 with LCD2.8RTP
Post by: mihaiadrian on October 09, 2023, 02:25:40 AM
I would double check the uext cables.  Also I would try to reduce cpu freq , something like:  setCpuFrequencyMhz(10) .  Anyway, maybe Olimex moderator from here as a better ideea 

For me, 2.8 Olimex display works very well with UEXTx5, the cable length is approx 20cm ( 10+10 ) - standard cables from Olimes.
Title: Re: Problem using UEXTx5 with LCD2.8RTP
Post by: LubOlimex on October 09, 2023, 09:37:58 AM
40Mhz SPI is too high for that kind of wire, use lower, 30Mhz or 20Mhz should be fine.
Title: Re: Problem using UEXTx5 with LCD2.8RTP
Post by: Stanimir5F on October 09, 2023, 09:43:30 AM
Hello, philmacu!

I tested it here and I can confirm the problem is exactly as you describe! It is for a fact problem caused by the length of the cable. Since the example was tested with direct connection between the board and the LCD no further changes were needed, but with the setup you described a decrease of the SPI frequency might be needed.
Check the file main sketch file, the setup section (line 212):
  tft.begin();
Add as a parameter the desired SPI frequency. The default value is 40 MHz (as shown in the Adafruit_ILI9341.cpp, line 153).

I have tested it and it worked with frequency 35 MHz although I would advice you try with a little bit lower unless the high frequency is very important for you.
So change the already mentioned initialize code to something like this:

  tft.begin(30000000);
That should solve the issue you have.
Title: Re: Problem using UEXTx5 with LCD2.8RTP
Post by: philmacu on October 09, 2023, 12:02:57 PM
Thank you all, I reduced the frequency of the LCD object using the constructor overload
tft.begin(30000000);And I can confirm it was my cable lengths.

Again many thanks to all of you that have replied :)

Phil,
Cork, Ireland