afiskon / stm32-ssd1306

STM32 library for working with OLEDs based on SSD1306, SH1106, SH1107 and SSD1309, supports I2C and SPI
https://eax.me/stm32-ssd1306/
MIT License
771 stars 213 forks source link

Horizontal = Page #91

Open NedEisele opened 4 months ago

NedEisele commented 4 months ago

Hello, I have a ssd1309 and I try using your library. However, it doesn't really works for me. When I do the function Fill(White) i have only a Line on the left and when I do TestCircle() I only have half of circles. They are uncomplete. After multiples test I've figured something is wrong with the Init().

I tried doing my own version do just show a pixel as bellow: uint8_t tab [16]={0}; //Initialisation tableau /for (int i=0;i<16;i++){ tab[i]=0xFF; }/ tab[4]=2; //après test 1= rien,0= rien,3=glitch vsiblement 2 marche

ssd1306_WriteCommand(0xB0); //adresse de la page
ssd1306_WriteCommand(0x00); // valeur byte bas
ssd1306_WriteCommand(0x10); //byte haut
ssd1306_WriteData(tab,128); //

/*ssd1306_WriteCommand(0x8D); // Charge Pump Setting
ssd1306_WriteCommand(0x14); // Enable charge pump
ssd1306_WriteCommand(0xC8);*/
ssd1306_WriteCommand(0x20); //Set Memory Addressing Mode
ssd1306_WriteCommand(0x00); //0x00=Horizontal,0x01=Vertical,0x02=Page

ssd1306_WriteCommand(0xA4); // Lecture Ram

ssd1306_WriteCommand(0xAF); //

SSD1306.CurrentX = 0;
SSD1306.CurrentY = 0;

SSD1306.Initialized = 1;

and when i do x00 for Horizontal after the memory x20 it give me the same result as x02, which is a page. Only x01 work as it should. This is I think where my problem is