Page 1 of 1

SSD1306 INFO SENT JUST APPEARS FOR A SEC

Posted: Mon Jul 16, 2018 9:32 am
by Trönfstar
Hey everyone!

I set up an ssd1306 on my pyboard and everything (initializing, commands) works fine, except one thing:
if I send data into the GDDRAM, it just appers for a moment and than disappears. So I can see the text for example, but if
I want it to stay there, I have to refresh my function fastly. The strangest thing is that sometimes it works well. it is total random.

I use the builtin FRAMEBUF module, and I2C module from the MACHINE libary.

Re: SSD1306 INFO SENT JUST APPEARS FOR A SEC

Posted: Mon Jul 16, 2018 9:59 am
by pythoncoder
Are you using the official driver?

Re: SSD1306 INFO SENT JUST APPEARS FOR A SEC

Posted: Mon Jul 16, 2018 10:33 am
by Trönfstar
No, It is my own, but mainly the same. Anyway the i2c.write() and i2c.stop() method doesnt work with the pyboard.
I'm using i2c.writeto(). What I realized as a real difference: 'addr << 1'.
I'm going to try it and feedback!

Re: SSD1306 INFO SENT JUST APPEARS FOR A SEC

Posted: Mon Jul 16, 2018 10:36 am
by Trönfstar
ENODEV error by the modified address.. It is fixed mechanically on the PCB by the producer company! :o
Just so tiny - hard to realize. :D So if I remove the solder it must work well, doesn't it? Actually the display is not mine but my friend asks me to solve his trouble. I use a ssd1327 with SPI and it works so as it is writtened.

Re: SSD1306 INFO SENT JUST APPEARS FOR A SEC

Posted: Tue Jul 17, 2018 9:22 pm
by mcauser
Unrelated but worth mentioning. Some SSD1306 modules are sold as SPI interface but are actually I2C and vice versa. Look for a CS pin to be sure it’s SPI. Four pin modules are almost certainly I2C.

Re: SSD1306 INFO SENT JUST APPEARS FOR A SEC

Posted: Wed Jul 18, 2018 9:59 am
by Trönfstar
It is solved.

First: using 0x3D as address is not necessary.

Second: I had put the D/C bitpattern into the buffer, when write data, and increased the bytearray size.
It was look like: bytearray(1 + (width * height)) >>or pages instead of height<<
buffer[0] = 0x40 (reserved)
Now it has just the right size, but the first element is the same D/C selector yet.

Re: SSD1306 INFO SENT JUST APPEARS FOR A SEC

Posted: Wed Jul 18, 2018 10:08 am
by Trönfstar
Actually it is a really cheap copy: there is no brand name, false serial addresses writtened on PCB, but at least it has only four pins. :D