ssd1306 might need to send SET_IREF_SELECT(0xad) <-- 0x30 during init_display.

オープン
#1,025 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
embedded-iot

調査の方向性

Locate the SSD1306 driver’s init_display() entry point and compare its command sequence with the Sunfounder and Adafruit drivers cited in the issue. Verify SET_IREF_SELECT and 0x30 against reliable SSD1306 documentation and available hardware evidence. Done means establishing whether the command is required and documenting a clear decision, with validation on compatible displays if a change is justified.

索引モデルが issue の本文から書いたものです。

説明

G'day, All.

I have been trying to find some solid evidence of this but have not managed to find a data sheet with the command. Given that I haven't found any solid evidence I'm not sure if this is a real issue or not.

I recently downloaded a ssd1306 micropython from the Sunfounder website and then I looked at Peter Hinch's micro python-nano-gui and saw a difference between the two drivers.

Specifically their init_display() method has one extra command, the SET_IREF_SELECT, 0x30. As I said this new command is NOT mentioned in the 2008 Solomon ssd1306 chip data sheet and I have been unable to find any other reference in any newer data sheet. But both the Sunfounder and Adafruit drivers do set this. I did find one discussion while googling around that this field clears up a flicker problem for atleast one person.

I'm happy to create a pull request for this myself. if you feel it is a good idea to pick up the change. My issue is I only have a few cheap knockoff ssd1306 so I'm not sure how thoroughly I can test the change.

SET_IREF_SELECT = const(0xAD)
...
    def init_display(self):
        for cmd in (
            SET_DISP,  # display off
            # address setting
            SET_MEM_ADDR,
            0x00,  # horizontal
            # resolution and layout
            SET_DISP_START_LINE,  # start at line 0
            SET_SEG_REMAP | 0x01,  # column addr 127 mapped to SEG0
            SET_MUX_RATIO,
            self.height - 1,
            SET_COM_OUT_DIR | 0x08,  # scan from COM[N] to COM0
            SET_DISP_OFFSET,
            0x00,
            SET_COM_PIN_CFG,
            0x02 if self.width > 2 * self.height else 0x12,
            # timing and driving scheme
            SET_DISP_CLK_DIV,
            0x80,
            SET_PRECHARGE,
            0x22 if self.external_vcc else 0xF1,
            SET_VCOM_DESEL,
            0x30,  # 0.83*Vcc
            # display
            SET_CONTRAST,
            0xFF,  # maximum
            SET_ENTIRE_ON,  # output follows RAM contents
            SET_NORM_INV,  # not inverted
            SET_IREF_SELECT,
            0x30,  # enable internal IREF during display on
            # charge pump
            SET_CHARGE_PUMP,
            0x10 if self.external_vcc else 0x14,
            SET_DISP | 0x01,  # display on
        ):  # on
            self.write_cmd(cmd)
        self.fill(0)
        self.show()
主要言語
Python
スター
2.9k
フォーク
1.1k
平均マージ
7日 6時間
マージ済み PR(30日)
3

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

micropython/micropython-lib のほかの issue

micropython/micropython-lib の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。