sumotoy / OLED_SSD1351

A fast library for OLED drived by SSD1351
6 stars 0 forks source link

OLED_SSD1351.cpp needs to be changed for 96px high displays #1

Open cosmikwolf opened 8 years ago

cosmikwolf commented 8 years ago

The startup sequence should be changed starting around line 250:

    writeCommand(_CMD_SETCOLUMN); 
    writeData(0x00);
    if (OLED_HEIGHT == 96) {
        writeData(0x7F);//127
    } else {
        writeData(0x60);
    }
    writeCommand(_CMD_SETROW);
    writeData(0x00);
    writeData(0x7F);
    setRegister(_CMD_STARTLINE,0x00);

otherwise the top part of the display is cut off.

sumotoy commented 8 years ago

Oh, thanks! I0m gonna rebuild completely this library using the TFT_ILI9163C scheme soon so I will check this in the weekend.

cosmikwolf commented 8 years ago

Sweet, I would be happy to test for you. Looking at this code again, I am not certain I made the correct recommendation on what to change, the main point that fixed it was not to have a conditional on setRegister(_CMD_STARTLINE,0x00); as both 127 and 96 need to start at 0x00 i think

sumotoy commented 8 years ago

Will see. I'm really busy finish TFT_ILI9163C that it's really popular and work well. For the 1.0p7 I have used a scheme that I can adapt to SSD, ILI and other display chip, only initialization and some minor changes needed.

cosmikwolf commented 8 years ago

I look forward to your future work with these libraries! Thank you, they have been a big help

sumotoy commented 8 years ago

It takes time, I first have to complete the ILI9163c as scheme for all upcoming libraries. I already coded to use as skeleton, tomorrow I think to close it, then should be easy to adapt to other ones (at list for me).

yunus-emre-utus commented 3 years ago

I am getting a compile error for arduino board in test.ino in the library.