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

Misc. questions on brightness-related commands #148

Open
alvinhochun opened this issue Feb 14, 2021 · 1 comment
Open

Misc. questions on brightness-related commands #148

alvinhochun opened this issue Feb 14, 2021 · 1 comment

Comments

@alvinhochun
Copy link
Contributor

  • Version of ssd1306 in use (if applicable): Unknown
  • MCU/other hardware in use: GD32VF103 (PINE64 Pinecil), QUG 9616TSWCG02
  • Display resolution and interface: I2C, 96x16

Description of the problem/feature request/other

  1. Brightness::custom is not exposed as pub, is this by design? I would like to be able to set custom values.
  2. The precharge value is set to either 0x01 or 0x02 in this crate. However, from the SSD1306 datasheet I can find (https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf), the value consists of two nibbles and it is stated that "clocks 0 is invalid entry", which would make both 0x01 and 0x02 invalid. The display datasheet I have (https://files.pine64.org/doc/datasheet/pinecil/1810010328_UG-Univision-Semicon-UG-9616TSWCG02_C88335.pdf) uses 0xF1 as an example.
  3. Can the VCOMH Deselect Level be exposed?
  4. The SSD1306 datasheet only lists 0x00, 0x20 and 0x30 which doesn't seem to match the values used in this crate.
@bugadani
Copy link
Contributor

Not exactly a timely response, but:

Brightness::custom is not exposed as pub, is this by design?

This was done because Brightness::custom couldn't be made const previously and I didn't want to expose the option of setting precharge phase 2 values that are above 15.

#183 resolves this

The precharge value is set to either 0x01 or 0x02 in this crate

I had to figure this out myself, too, but we set a 0x11 or 0x12 precharge value, both of which should be valid. We use the value in Brightness as the phase 2 value. https://github.com/jamwaffles/ssd1306/blob/cafc5a112b02d4ff61d23865ad48bd65a61dfe79/src/lib.rs#LL348C18-L348C27

Can the VCOMH Deselect Level be exposed?
The SSD1306 datasheet only lists 0x00, 0x20 and 0x30 which doesn't seem to match the values used in this crate.

Probably? The observation is good, and I don't know where 0b100 comes from as the source repository no longer exists.

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