Communicating with the 1.12" Mono OLED (128x128, white/black) Breakout – I2C

Hello everyone.

I have recently bought the “1.12” Mono OLED (128x128, white/black) Breakout – I2C".

The project i am working on is a snake game on this display using node.js on my Raspberry Pi 4b.
I just have one small problem. There seem to be no (or no working) libraries on the internet for the sh1107 driver on the display. This means i need to create the bits to send to the device myself. (I use the built-in i2c-bus library to handle the communications). I understand how to send some bits to the display, but i have no idea in which order or even what bits to send.

From what i have read in the datasheet, i need to send 16 bits (2 bytes) for a single command.
This is what the datasheet provides (page 13):

image
link to the datasheet: datasheet](https://www.displayfuture.com/Display/datasheet/controller/SH1107.pdf)

The image tells me that i need to send the following bits to the display via the i2c protocol:
IM0, IM1, IM2, Type, CS, A0, RD, WR, D0, D1, D2, D3, D4, D5, D6, D7.
These are 16 bits, so it seems to be correct.

I understand that when using i2c-communication, the IM’s are 0 1 0.
I also understand that when using i2c-communication, the CS = 0.
I also understand that A0, RD and WR differ per command.

My questions are:
Is this the correct order to send the bits?
What should the type bit be?
And why does the sheet say “(Hz)” at D2 to D7 on page 13? I thought D0 to D7 were part of the command address. (page 41 in the datasheet)

Thanks alot for any answers! i have been struggling for a few days now.

Which programming language do you use?

The programming language i am using is node.js

Oh sorry, it was already in your first post. Have a look at this: SH1107 OLED driver - Espruino