I have started working with the ESP8266 using the Arduino interface. I am writing a driver for the SSD1322 OLED which is 256x64 pixels wide. Something strange is happening and it seems like something around speed of writing across SPI and timing.....
Let me explain....
I have the following code which will write 8k data across SPI to the OLED. Example code that shows the problem is attached.
If I comment out the delay(0), the chip will reset./crash with the delay(0) in place it all works great. My guess is the small timing delay is allowing something to work/continue.
for (int m = 0; m < 128; m++)
{
display();
delay(0);
}
Is there something in contention with the SPI interface that needs to periodically execute. I know that if I reduce down the size of the data (8k) at a certain point it does not crash...but that could be because the time spent doing the SPI is also reduced.
Any ideas anyone.
Thanks
Mark