Messages - Morne

First of all I want to send out huge thanks to Pasquale for providing these examples, they made it very easy for me to get started with the 20x4 character OLED. However I noticed that the SPI example used bit banged software SPI, which is rather slow and filling the screen with characters take about 40 ms.

Not completely statsfiende by this I decided change the implementation to use HW SPI. And after a few hours of struggling I finally got it working! It is also super fast. Filling the screen now takes slightly less than 1 ms, which is even faster then using the 4 bit 6800 interface (11 ms to fil the screen).

for (r = 0; r < ROW_N; r++) // One row at a time, { command(new_line[r]); // moves the cursor to the first column of that line for (c = 0; c < COLUMN_N; c++) // One character at a time, { data(TEXT[r][c]); // displays the correspondig string } }

for (r = 0; r < ROW_N; r++) // One row at a time, { command(new_line[r]); // moves the cursor to the first column of that line for (c = 0; c < COLUMN_N; c++) // One character at a time, { data(0xDB); // displays the character 0xDB (block) delay(50); // Waits, only for visual effect purpose } delay(500); // Waits, only for visual effect purpose }}// _______________________________________________________________________________________