Open steve6375 opened 1 year ago
Columns are addressed by pixel and rows are addressed by 8 pixels. The reason is that a single byte maps to eight vertical pixels.
The SSD1306 Memory is write only for I2C and SPI so the only way to implement a library without an buffer of the display in host memory is to use this hardware feature.
The only exception is the mapping of SSD1306 memory to the OLED display is by pixel address. This allows efficient scrolling.
The datasheet uses (column, segment) for locations on the display. Most SSD1306 libraries refer to display memory with row (page number) for vertical position and column used for horizontal position.
Ok, but the documentation does not make this clear at all, it says row and column with no distinction in units?
I defined the terms in a few place like here but not for every function. Here is the key place in the documentation where height in pixels verses rows matters. Fonts height is in pixels. Vertical address is in 8-pixel units. Horizontal address and widths is always in pixels. Functions with row arguments are in units of 8-pixels.
Here is a place where that is defined.
One other measure is scrolling is in terms of lines. Lines are the height of the current font in rows.
So height can be in pixels for characters in a font, rows for addresses or lines for scrolling.
First many thanks for this code!!! It is really lightweight which was what I needed to get an SD card working with a display because the AdafruitGFX library uses up all resources of the poor little Arduino Uno!
I have been playing with some code and find that the documentation does not seem to match my experiments. The doc seems to imply that some commands need a row or column number, but I can only get it to work by using pixel numbers in some command parameters.
Please see code below (which appears to work) and especially these lines
Am I doing something wrong? Some parameters seem to need pixel values and others character row/column values?