7.7fps still seems a bit slow. When running I2C at 400Khz, it should be closer to 30fps. Would you mind testing my SSD1306 library? It has a simpler API:
** Update **
I was curious, so I wrote a little test program to run on my ATMega32u4 (Pro Micro) running at 8Mhz and 3.3v Vcc. The test first fills the display with 0xff followed by 0x00 (20 fills). Then it draws 8x8 characters of the numbers 0 to 9 (20 times). The results are consistently 23.5 FPS. Here's the video of it in action:
Here's the code:
#include <oled_96.h>
void setup() {
// put your setup code here, to run once:
oledInit(0x3c, 0, 0);
}
void loop() {
// put your main code here, to run repeatedly:
int i, j, iRate;
unsigned long ulTime;
char szTemp[32];
oledFill(0);
oledWriteString(0,0,"About to run",0,0);
oledWriteString(0,1,"OLED Perf test",0,0);
oledWriteString(0,2,"1-Erase display",0,0);
oledWriteString(0,3,"2-Draw 8x8 chars",0,0);
delay(4000);
ulTime = millis();
for (i=0; i<10; i++)
{
oledFill(0xff);
oledFill(0x00);
}
ulTime = millis() - ulTime;
iRate = 200000UL / ulTime; // 10x # of frames to show 1/10 of a FPS precision
sprintf(szTemp, "Rate = %d.%d FPS", iRate/10, iRate % 10);
oledWriteString(0,0,szTemp, 0,0);
delay(4000);
szTemp[16] = 0; // string terminator
ulTime = millis();
for (i=0; i<20; i++)
{
memset(szTemp, '0' + (i % 10), 16);
for (j=0; j<8; j++)
oledWriteString(0,j,szTemp,0,0);
}
ulTime = millis() - ulTime;
iRate = 200000UL / ulTime;
oledFill(0x00);
sprintf(szTemp, "Rate = %d.%d FPS", iRate/10, iRate % 10);
oledWriteString(0,0,szTemp, 0,0);
delay(4000);
}