Go Down

Topic: 1.8 TFT SPI 128x160 very slow with Arduino Nano BLE 33 (Read 818 times) previous topic - next topic

ArdLorenzo

Dear all,

I tested the provided example for the 1.8 TFT SPI 128x160 from Adafruit_ST7735 library (graphic test, see attached code) with 3 different boards:

- Arduino UNO
- Arduino NANO
- Arduino NANO BLE 33 SENSE

The test code runs perfectly and the refresh time is very fast with the UNO and the NANO, but is incredibly slow with the new NANO BLE 33 SENSE. Does anybody know why?
Thank you a lot in advance!


One note about the connections:

On both UNO and NANO:
LED > 3V3
SCK > 13
SDA > 11
A0 (DC) > 9
RESET > 8
CS > 10
GND > GND
VCC > 5V

On the new NANO BLE 33 SENSE:
LED > 3V3
SCK > 13
SDA > 11
A0 (DC) > 9
RESET > 8
CS > 10
GND > GND
VCC > 3V3

ArdLorenzo

Hello again,

I kept searching but could not find a solution.
Any idea?

Best,

Lorenzo

ArdLorenzo

Dear all,

I am still fighting with the same problem. Does anybody know why this is happening?

Thank you!

bodmer

The speed is slower because the Nano 33 BLE is running mbed OS in the background and the Arduino interface library probably has to negotiate with the OS before the sketch code can use the SPI port and I/O pins.

For example digitalWrite is about 4x slower on the Nano 33 BLE compared to the classic Nano. You will have to bypass that Arduino environment and write in native mbed calls or use DMA to improve I/O speed. I suspect the Adafruit library could be optimised for that processor but it sounds like it just uses basic Arduino calls.

The Nano 33 BLE processor is more powerful than the Atmega based Nano, so other complex tasks like floating point calculations and Bluetooth messaging will run much faster.

ArdLorenzo

Thanks for the reply,

I guess this is not easily solvable for a newbie like me... :(

bodmer

It depends what you need to do. Do your really need the speed. For example if the display is showing the room temperature, that typically does not change fast and you may only look briefly at the display a couple of times a day.

You could use a Nano to drive the display and the Nano 33 BLE module to do the other stuff you want, the BLE board sending the data to the Nano for display.

ArdLorenzo

This would be one option, but I am building a battery powered device and having a second nano affects the size and the consume.
The problem is that every time the Nano BLE 33 writes on the screen, the code is paused for quite a long time and this affects the reading of buttons inputs, for example. Basically, if I display a menu and wants to switch between screens, I have to wait quite a bit between one press and the other...

duke-lee

Alternately, you could try "Smart LCD Module". Which embeds a MCU in LCD module, so your host MCU is freed from driving LCD and responding to touch event.

ArdLorenzo

Hello, I was wondering if anybody had found a solution at the end. Bodmer suggested that this could be solved by writing native mbed calls for the adafruit library. Could anybody help me with this?

Go Up