Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizontal Addressing Mode #1

Open
sdwood68 opened this issue Feb 11, 2024 · 2 comments
Open

Horizontal Addressing Mode #1

sdwood68 opened this issue Feb 11, 2024 · 2 comments

Comments

@sdwood68
Copy link

sdwood68 commented Feb 11, 2024

Hello, I've been playing around with your driver for a few days and was very happy to get it working quickly.
I see you set up the device for Horizontal Addressing Mode.
27 this->sendCommand(SSD1309_setMemoryAddressingMode);
28 this->sendCommand(0x00);
But when you actually send the data you're using Page mode.
161 void SSD1309::display(unsigned char data)
162 {
163 if(data == nullptr) data = this->buffer;
164 for(uint8_t i = 0; i < this->height/8; i++) {
165 this->sendCommand(0xB0 + i);
166 this->sendCommand(0x00);
167 this->sendCommand(0x10);
168 this->sendData(&data[this->width
i], this->width);
169 }
170 }
Were you ever able to get horizontal addressing mode working where you write the entire buffer to the display in one go?
I really need this so I can implement the display refresh via a DMA transfer to the I2C hardware to free up processing time.

Thanks,

Stuart

@mbober1
Copy link
Owner

mbober1 commented Feb 11, 2024

Hi, I'm glad to hear that my old work may still be useful to someone. Unfortunately I don't have time to read the SSD1309 datasheet again. I'm pretty sure my SSD1306 library has a better implementation because it was prepared for DMA (it was never finished).

https://github.com/mbober1/RPi-Pico-SSD1306-library/blob/16c2e233bdddae7016b144ab3a3366e0e815545c/SSD1306.cpp#L177

They should be very similar.

@sdwood68
Copy link
Author

sdwood68 commented Feb 11, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants