mchobby / esp8266-upy

MicroPython Cross-platform Drivers - collection of code, wiring and sample for various breakout boards - Works with ESP8266, Pyboard, PYB405, Wemos, etc))
53 stars 30 forks source link

MCP23S17 too slow #4

Open robertspil opened 3 years ago

robertspil commented 3 years ago

Before and after each change of the pin_cs ( Chip Select pin ) there is a sleep_ms(1) The SPI specifications for the MCP23S17 have some time delays for the CS signal, no more than 100 ns. I use this code with a Raspberry Pico, WITHOUT any sleep, with a big performance increase . Maybe a sleep of one microsecond may be safe for a very fast processor.

NicolasJVelez commented 2 years ago

Hi @robertspil, I am working with an ESP32 in micropython and it has a very slow screen update. How can I do to increase the speed? I have commented the function def delay_us( self ):

mchobby commented 2 years ago

Hi, didn't take the time to update the library.... will do it right now.

mchobby commented 2 years ago

Replaced the milli-second delay by micro-second delay. Will already be better waiting for advanced testing

NicolasJVelez commented 2 years ago

Replaced the milli-second delay by micro-second delay. Will already be better waiting for advanced testing

I can't see any changes in the ST7687 library. I already commented on the delays, and the screen refresh is still slow, any advice?

mchobby commented 2 years ago

How sorry, you did record it into the MCP23S17 issue Please open a new issue... I will have a look