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.
Brightness control
- Default contrast value:
0x7F(50%). - Menu option allows dimming down to
0x20for dark environments. - After 60 seconds of inactivity the firmware sends
DISPLAY OFFwhile keeping data in RAM. - Any touch input or USB activity turns the screen back on instantly.
Troubleshooting
If the OLED ever needs replacement, any SSD1306 I²C module with the same pin order can be swapped in without firmware changes.