Skip to content

GavSun/oled_ssd1306

Repository files navigation

Interfacing SSD1306 module with RPi PICO2 (RP2350)

The display module used in this project is 128 x 64 pixels mono color OLED display module. It has I2C interface through 4 pin connector. The pins available on the connector are : Gnd, Vcc, SCL, SDA.

The core idea is to maintain a memory buffer equal to the number of pixels (128 x 64) inside the RP2350. The TEXT or Graphics or Image etc. to display on the OLED display is first created in this buffer (i.e. bit map image or pixel image). Then at appropriate time this entire image, or part of it, is transferred to the OLED module. There onwards the OLED module shows the image as transferred through the bit map.

The complete display functionality is achieved through following 4 files:

1. fonts.h and fonts.c :

These files have only the bit maps for textual fonts of different sizes.

2. ssd1306.h and ssd1306.c :

These file have API like functions, allowing the main() to interact with the display module. These functions helps :

  • to initiliaze the display module,
  • to send commands to display module,
  • to send display image data to the module,
  • to create text information using different font sizes,
  • to cretae different graphical patterns such as line, rectangle
  • to scroll the image patten on display in desired direction
  • etc.

The main.c file is only for testing the various display functions and/or implementing various features using the display.


Important:

The I2C peripheral must be selected and initialised by the main() function. Similarly the suitable GPIO pins for I2C SDA & SCL connection must be selected and defined inside the main() function. Then during powerON initialization, a pointer to selected I2C instance shall be sent to OLED initialization function.


About

Connecting the OLED display Module SSD1306 with RP2350 (i.e. RPi PICO2 board)

Topics

Resources

Stars

Watchers

Forks