ssd1306 might need to send SET_IREF_SELECT(0xad) <-- 0x30 during init_display.
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- embedded-iot
Research direction
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.
Written by the indexing model from the issue text.
Description
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()
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.1k
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micropython/micropython-lib
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
micropython/micropython-lib#1074 ·
-
needs-info
Difficulty 1/5 Under an hour Newbie friendliness 72/100
micropython/micropython-lib#943 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
micropython/micropython-lib#931 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
micropython/micropython-lib#795 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
micropython/micropython-lib#762 ·
All issues in micropython/micropython-lib
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·