Skip to main content
ZeroKeyUSB uses a 0.91” SSD1306-based OLED module to present menus, credentials, and status icons. The display is bright, low-power, and readable from multiple angles — ideal for a quick glance during logins.

Electrical characteristics

The module connects directly to the SAMD21’s SERCOM3 I²C bus, shared with the external EEPROM. Pull-up resistors (4.7 kΩ) are located on the PCB, so the breakout resistors should be disabled when assembling.

Pin assignments

The firmware toggles the RES line during startup to ensure a clean boot sequence even if power is unstable.

Frame buffer strategy

  • The SSD1306 expects data in pages of 8 vertical pixels.
  • Firmware maintains a 512-byte buffer in SRAM (128 × 32 / 8).
  • Updates use partial writes to minimize I²C traffic when only a few characters change.
  • A simple double-buffer diff tracks dirty regions so the screen refresh stays under 5 ms.
Animations such as smooth scrolling for long passwords rely on timer interrupts that shift the buffer between refreshes.

Brightness control

  • Default contrast value: 0x7F (50%).
  • Menu option allows dimming down to 0x20 for dark environments.
  • After 60 seconds of inactivity the firmware sends DISPLAY OFF while keeping data in RAM.
  • Any touch input or USB activity turns the screen back on instantly.
This approach balances legibility and OLED lifespan.

Troubleshooting

If the OLED ever needs replacement, any SSD1306 I²C module with the same pin order can be swapped in without firmware changes.