{"id":3749,"date":"2025-09-11T12:57:09","date_gmt":"2025-09-11T12:57:09","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=3749"},"modified":"2025-09-11T13:04:24","modified_gmt":"2025-09-11T13:04:24","slug":"ssd1331-color-oled-with-stm32-part-1-introduction-and-environment-setup","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=3749","title":{"rendered":"SSD1331 Color OLED with STM32 Part 1: Introduction and Environment Setup"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/IMG_8021-1024x683.png\" alt=\"\" class=\"wp-image-3759\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/IMG_8021-1024x683.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/IMG_8021-300x200.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/IMG_8021-768x512.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/IMG_8021-1150x767.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/IMG_8021-750x500.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/IMG_8021-400x267.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/IMG_8021-250x167.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/IMG_8021.png 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This guide walks you through working with the SSD1336 SPI color OLED display using STM32 MCUs. In part one, we\u2019ll cover the SSD1331 controller basics, environment setup, and hardware connections to get started.<\/p>\n\n\n\n<p>In this guide, we shall cover the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Introduction.<\/li>\n\n\n\n<li>SSD1331 controller.<\/li>\n\n\n\n<li>Hardware Connection.<\/li>\n\n\n\n<li>STM32CubeIDE setup.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">1. Introduction:<\/h2>\n\n\n\n<p>Organic Light Emitting Diode (OLED) displays have become an essential part of modern embedded systems due to their high contrast ratio, wide viewing angles, vibrant colors, and relatively low power consumption compared to traditional LCDs. Among the many OLED driver ICs available, the&nbsp;<strong>SSD133<\/strong>1&nbsp;is a popular controller designed for color OLED panels with SPI and parallel interface options. It provides efficient control over pixel rendering, brightness, contrast, and display memory organization, making it well-suited for compact embedded applications such as handheld devices, IoT modules, instrumentation panels, and wearable electronics.<\/p>\n\n\n\n<p>In this guide, we will focus on using the&nbsp;<strong>SSD1331 with an STM32 microcontroller over the SPI interface<\/strong>. The SSD1331 controller manages the communication between the microcontroller and the OLED panel by handling pixel data, color encoding, command sets, and display memory addressing. It supports essential features like display on\/off control, sleep modes, horizontal and vertical addressing, and partial updates, which make it versatile for both static images and dynamic graphical interfaces. Understanding the SSD1331 command set and initialization sequence is a crucial first step toward achieving reliable display operation.<\/p>\n\n\n\n<p>To follow along with this guide, we will prepare a suitable&nbsp;<strong>development environment<\/strong>&nbsp;based on the STM32 ecosystem. The STM32 family, built on Arm Cortex-M cores, is widely used for display-based applications due to its performance, peripheral availability, and extensive software support. We will set up the environment using&nbsp;<strong>STM32CubeIDE<\/strong>&nbsp;(an all-in-one development platform from STMicroelectronics) along with the&nbsp;<strong>HAL drivers<\/strong>&nbsp;for SPI and GPIO peripherals. This setup will allow us to efficiently manage communication with the SSD1331 controller, send commands, and later extend functionality to graphics libraries.<\/p>\n\n\n\n<p>Alongside the software environment, the&nbsp;<strong>hardware setup<\/strong>&nbsp;must also be clearly understood before diving into display programming. The SSD1331 OLED module typically exposes an SPI interface with pins for&nbsp;<strong>MOSI (data), SCK (clock), CS (chip select), DC (data\/command), RST (reset)<\/strong>, and power supply lines. On the STM32 side, we will configure one of its hardware SPI peripherals along with GPIOs for control signals. Special attention must be given to voltage levels (3.3V operation is typical for both STM32 and SSD1331 modules), power sequencing, and reset handling to ensure stable operation. Proper wiring and grounding are essential to avoid noise-related artifacts on the display.<\/p>\n\n\n\n<p>In this first part of the guide, we will therefore cover three key areas:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>The SSD1331 Controller<\/strong>&nbsp;\u2013 Overview of features, internal architecture, memory organization, and command system.<\/li>\n\n\n\n<li><strong>Environment Setup<\/strong>&nbsp;\u2013 Installing and configuring STM32CubeIDE, initializing SPI with HAL, and preparing the project workspace.<\/li>\n\n\n\n<li><strong>Hardware Setup<\/strong>&nbsp;\u2013 Wiring the SSD1331 OLED to STM32, understanding pin functions, power requirements, and recommended connections for stable display operation.<\/li>\n<\/ol>\n\n\n\n<p>By the end of this section, you will have both the theoretical foundation and the hardware environment ready, so that in the next dedicated section we can focus on developing the&nbsp;<strong>firmware<\/strong>&nbsp;to initialize the display, send commands, and render test patterns.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. SSD1331 Controller:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">The SSD1331 Controller<\/h3>\n\n\n\n<p>The&nbsp;<strong>SSD1331<\/strong>&nbsp;is a high-performance OLED driver IC from Solomon Systech, designed to control small-sized full-color OLED panels. Unlike monochrome OLED controllers, the SSD1331 is tailored for RGB displays and includes built-in&nbsp;<strong>graphic acceleration functions<\/strong>, making it easier and faster to render shapes, fill areas, and display images. This makes it especially useful for embedded systems that need a compact but visually rich interface.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. Key Features<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Resolution Support<\/strong>: Optimized for 96 \u00d7 64 pixel color OLED panels.<\/li>\n\n\n\n<li><strong>Color Depth<\/strong>: Supports up to&nbsp;<strong>65,536 colors (16-bit RGB565 format)<\/strong>&nbsp;and&nbsp;<strong>262,144 colors (18-bit RGB666 format)<\/strong>.<\/li>\n\n\n\n<li><strong>Interface<\/strong>: 8-\/9-bit parallel or 4-wire SPI, suitable for both high-speed and low-pin-count applications.<\/li>\n\n\n\n<li><strong>Graphic Acceleration<\/strong>: Hardware support for line drawing, rectangle filling, copy\/scrolling, and other geometric operations, reducing MCU workload.<\/li>\n\n\n\n<li><strong>GDDRAM<\/strong>: Built-in display RAM stores pixel data for the full screen, eliminating the need for continuous MCU refresh.<\/li>\n\n\n\n<li><strong>Display Control<\/strong>: Functions for inversion, partial display, power save modes, and programmable contrast\/brightness.<\/li>\n\n\n\n<li><strong>Integrated Timing Generator<\/strong>: Handles scanning and refresh cycles for stable display output.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">2. Internal Architecture<\/h4>\n\n\n\n<p>The SSD1331 integrates the following major blocks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Command Decoder<\/strong>&nbsp;\u2013 Interprets instructions from the host MCU.<\/li>\n\n\n\n<li><strong>Graphic Display Data RAM (GDDRAM)<\/strong>&nbsp;\u2013 Stores the full-screen pixel data in RGB format.<\/li>\n\n\n\n<li><strong>Graphic Acceleration Engine<\/strong>&nbsp;\u2013 Executes drawing commands like line, rectangle, or fill directly in hardware.<\/li>\n\n\n\n<li><strong>Timing Controller (TCON)<\/strong>&nbsp;\u2013 Generates the scan signals for the OLED panel.<\/li>\n\n\n\n<li><strong>Common\/Segment Drivers<\/strong>&nbsp;\u2013 Drive the OLED matrix rows and columns.<\/li>\n\n\n\n<li><strong>Power Circuits &amp; Oscillator<\/strong>&nbsp;\u2013 Provide regulated voltages and timing for stable operation.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">3. Memory Organization<\/h4>\n\n\n\n<p>For a&nbsp;<strong>96 \u00d7 64 display<\/strong>, the GDDRAM is organized as a 96 (columns) \u00d7 64 (rows) matrix of pixels, with each pixel requiring:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>16-bit (2 bytes) in RGB565 format<\/strong>, or<\/li>\n\n\n\n<li><strong>18-bit (3 bytes) in RGB666 format<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p>In practice, most applications use&nbsp;<strong>RGB565<\/strong>&nbsp;due to reduced data transfer overhead and wide library support.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4. Command Set Overview<\/h4>\n\n\n\n<p>The SSD1331 supports both standard OLED control commands and enhanced graphic instructions. Some important commands include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Display ON\/OFF<\/strong>&nbsp;\u2013 Enable or disable the screen.<\/li>\n\n\n\n<li><strong>Set Column\/Row Address<\/strong>&nbsp;\u2013 Define the drawing window.<\/li>\n\n\n\n<li><strong>Write RAM<\/strong>&nbsp;\u2013 Transfer pixel data into GDDRAM.<\/li>\n\n\n\n<li><strong>Set Contrast (per RGB channel)<\/strong>&nbsp;\u2013 Adjust brightness individually for red, green, and blue.<\/li>\n\n\n\n<li><strong>Set Display Mode<\/strong>&nbsp;\u2013 Normal, inverted, or sleep modes.<\/li>\n\n\n\n<li><strong>Graphic Commands<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Draw Line (start X,Y \u2192 end X,Y)<\/li>\n\n\n\n<li>Draw Rectangle (with optional fill color)<\/li>\n\n\n\n<li>Copy \/ Move block of pixels<\/li>\n\n\n\n<li>Fill rectangle area with color<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>These hardware-accelerated functions can dramatically improve rendering speed compared to sending pixel data one by one.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Hardware Setup:<\/h2>\n\n\n\n<p>The connection as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"688\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-1024x688.jpg\" alt=\"\" class=\"wp-image-3751\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-1024x688.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-300x202.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-768x516.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-1536x1033.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-2048x1377.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-1150x773.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-750x504.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-400x269.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-1-250x168.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>SSD1331 OLED Display<\/td><td>STM32F411 Nucleo-64<\/td><\/tr><tr><td>GND<\/td><td>GND<\/td><\/tr><tr><td>Vcc<\/td><td>5V<\/td><\/tr><tr><td>SCK<\/td><td>PA5 (D13 Arduino pin)<\/td><\/tr><tr><td>SDA<\/td><td>PA7 (D11 Arduino Pin)<\/td><\/tr><tr><td>RES<\/td><td>PA0 (A0 Arduino Pin)<\/td><\/tr><tr><td>DC<\/td><td>PA1 (A1 Arduino Pin)<\/td><\/tr><tr><td>CS<\/td><td>PA4 (A2 Arduino Pin)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">4. STM32CubeIDE Setup:<\/h2>\n\n\n\n<p>Open STM32CubeIDE after selecting the workspace and create new project as following:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"355\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-1024x355.jpg\" alt=\"\" class=\"wp-image-2940\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-1024x355.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-300x104.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-768x266.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-1536x532.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-2048x709.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-1150x398.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-750x260.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-400x139.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-26-00-250x87.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Select the MCU:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"832\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-1024x832.jpg\" alt=\"\" class=\"wp-image-2941\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-1024x832.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-300x244.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-768x624.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-1536x1248.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-2048x1664.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-1150x934.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-750x609.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-400x325.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/10\/2024-10-26_16-27-14-250x203.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Give the project a name:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"813\" height=\"1024\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-813x1024.jpg\" alt=\"\" class=\"wp-image-3752\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-813x1024.jpg 813w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-238x300.jpg 238w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-768x968.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-750x945.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-400x504.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02-250x315.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-21-02.jpg 984w\" sizes=\"(max-width: 813px) 100vw, 813px\" \/><\/figure>\n\n\n\n<p>Make sure the Targeted Project Type is STM32Cube, Language is C and binary type is Executable.<\/p>\n\n\n\n<p>Next, head to connectivity, SPI1 and enable it in Transmit Only Master mode.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"1024\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58-793x1024.jpg\" alt=\"\" class=\"wp-image-3753\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58-793x1024.jpg 793w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58-232x300.jpg 232w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58-768x992.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58-1189x1536.jpg 1189w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58-1150x1485.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58-750x968.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58-400x517.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58-250x323.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-45-58.jpg 1428w\" sizes=\"(max-width: 793px) 100vw, 793px\" \/><\/figure>\n\n\n\n<p>Keep the parameters as is. Just make sure the data size is 8-bit and maximum speed is 8 to 10MHz.<\/p>\n\n\n\n<p>Next, enable the DMA for SPI as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"862\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-49-21-1024x862.jpg\" alt=\"\" class=\"wp-image-3754\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-49-21-1024x862.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-49-21-300x252.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-49-21-768x646.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-49-21-1150x968.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-49-21-750x631.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-49-21-400x337.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-49-21-250x210.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-49-21.jpg 1426w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Set the mode to Normal, data width to byte for both memory and peripheral.<\/p>\n\n\n\n<p>Set PA0, PA1 and PA4 as GPIO output and give them a name as mentioned in the hardware setup as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"565\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04-1024x565.jpg\" alt=\"\" class=\"wp-image-3755\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04-1024x565.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04-300x166.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04-768x424.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04-1536x848.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04-1150x635.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04-750x414.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04-400x221.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04-250x138.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-52-04.jpg 2014w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Next, head to GPIO, select CS pin and set GPIO output level to High as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"983\" height=\"1024\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33-983x1024.jpg\" alt=\"\" class=\"wp-image-3756\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33-983x1024.jpg 983w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33-288x300.jpg 288w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33-768x800.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33-1475x1536.jpg 1475w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33-1150x1198.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33-750x781.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33-400x417.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33-250x260.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-53-33.jpg 1734w\" sizes=\"(max-width: 983px) 100vw, 983px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Last step, head to Project Manager, Code Generator then generate peripheral initialization as pair of .c\/.h as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"351\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-1024x351.jpg\" alt=\"\" class=\"wp-image-3757\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-1024x351.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-300x103.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-768x263.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-1536x526.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-2048x702.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-1150x394.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-750x257.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-400x137.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/09\/2025-09-11_15-54-50-250x86.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Save the project and this will generate the project.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In part 2, we shall start developing the library and write to the lcd.<\/p>\n\n\n\n<p>Stay tuned.<\/p>\n\n\n\n<p>Happy coding \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide walks you through working with the SSD1336 SPI color OLED display using STM32 MCUs. In part one, we\u2019ll cover the SSD1331 controller basics, environment setup, and hardware connections to get started. In this guide, we shall cover the following: 1. Introduction: Organic Light Emitting Diode (OLED) displays have become an essential part of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,19,11,12],"tags":[],"class_list":["post-3749","post","type-post","status-publish","format-standard","hentry","category-embedded-systems","category-lcd","category-peripheral-drivers","category-stm32"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/3749"}],"collection":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3749"}],"version-history":[{"count":2,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/3749\/revisions"}],"predecessor-version":[{"id":3760,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/3749\/revisions\/3760"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}