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

How to change addressing mode? #136

Closed
nebelgrau77 opened this issue Oct 20, 2020 · 2 comments
Closed

How to change addressing mode? #136

nebelgrau77 opened this issue Oct 20, 2020 · 2 comments

Comments

@nebelgrau77
Copy link

nebelgrau77 commented Oct 20, 2020

  • Version of ssd1306 in use: 0.4
  • MCU/other hardware in use: nRF52840
  • Display resolution and interface: I2C, 128x64

How to use addressing mode?

I'm experimenting with sending images over serial to the board. I'm using the .draw method like in the white noise example,
sending the serial RX buffer to the display. I noticed that the bits of the bytes are written top to bottom, but then the bytes are in horizontal order. So basically for each byte I get 8 vertical pixels until the end of the row, and so on. Which is different from what I imagined :) I understand this is the the default page mode? How can I change it to Horizontal, or in other words, how do I use init_with_mode or change_mode?

@jamwaffles
Copy link
Collaborator

I understand this is the the default page mode?

That's correct. It's been a while since I looked at the datasheet but IIRC there's no way to change this behaviour - the display only works with 8 pixel high pages. What order are the pixels from the serial buffer in? You'll probably have to do some transformations to turn them into the correct format to write to the raw display.

@nebelgrau77
Copy link
Author

Ok gotcha. At the moment they're in simple line-after-line order: 8 pixels, another 8 pixels, etc. until the end of the row, then anothe row and so on. I will need to change my code to make my bytes be in the expected order, then. No problem :) Thanks!

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