Cannot get SSD1309z display to work... - Page 1
Forum section: electronics / projects

author: Boscoe
author_rank: Frequent Contributor
timestamp: April 18, 2024, 07:42:46 pm
content: I'm working on a new design however imported some known working design from a previous project - this is the connector and circuitry for an SSD1309z based OLED. I'm also using the same code as the working example.My issues are:1. The display does nothing.2. I have no VCOM.3. I see no voltage on the IREF pin (should be around 10V).I have:- Tripled check the wiring. I have done this on paper and by physically measuring the signals on pins.- Made use the FFC connector is working. I scratched off some of the soldermask on the FFC and can get continuity and the signals on the FFC.- Verified the PSUs, all good.- Verified the data on the SPI, reset and DC lines is all correct with correct timing, values and connections.My code is below and schematic attached. The pins are inverted in order but this is just due to the way the display is mounted, they are correct on the PCB.This is the controller:https://www.hpinfotech.ro/SSD1309.pdfand this is the display:https://www.tme.eu/en/details/dep128064s-w/graphical-oled-displays/display-elektronik/dep-128064s-w/Has anyone come across any issues like this before?ThanksCode:void ssd_init(){// Turn the screen PSU onssd_pwr_cont(true);// Wait for it to settlessd_delay_ms(250);// Reset the screenssd_reset();// Space for the commandsuint8_t cmd = {0};// Turn the display offcmd = SSD_CMD_SET_OFF;ssd_write_cmd(cmd, 1);// Set the clockcmd = SSD_CMD_CLK_DIV;cmd = 0xA0;ssd_write_cmd(cmd, 2);// Set multiplexer ratiocmd = SSD_CMD_MULT_RATIO;cmd = 0x40;// ssd_write_cmd(cmd, 2);// Set start linecmd = SSD_CMD_START_LINE | 0x00;ssd_write_cmd(cmd, 1);// Set page addressing modecmd = SSD_CMD_MEM_ADDR_MD;cmd = 0x00;ssd_write_cmd(cmd, 2);// Set segment mappingcmd = SSD_CMD_SEG_REMAP + 1;ssd_write_cmd(cmd, 1);// Set the column mappingcmd = SSD_CMD_COM_DIR + 8;ssd_write_cmd(cmd, 1);// Set the com pinscmd = SSD_CMD_COM_PIN_HW;cmd = 0x12;ssd_write_cmd(cmd, 2);// Set the contrastcmd = SSD_CMD_SET_CONTRAST;cmd = 0xFF;ssd_write_cmd(cmd, 2);// Set the pre charge periodcmd = SSD_CMD_PRE_PER;cmd = 0xD3;ssd_write_cmd(cmd, 2);// Set the pre charge periodcmd = SSD_CMD_COMH_DESEL;cmd = 0x20;ssd_write_cmd(cmd, 2);// Set multiplexer ratiocmd = SSD_CMD_STOP_SCROLL;ssd_write_cmd(cmd, 1);// Set the entire display oncmd = SSD_CMD_DISP_ON;ssd_write_cmd(cmd, 1);// Normal display output, no inversionscmd = SSD_CMD_INVERT;ssd_write_cmd(cmd, 1);// Set multiplexer ratiocmd = SSD_CMD_STOP_SCROLL;ssd_write_cmd(cmd, 1);// Set the entire display oncmd = SSD_CMD_DISP_ON;ssd_write_cmd(cmd, 1);}

author: Retirednerd2020
author_rank: Regular Contributor
timestamp: April 18, 2024, 09:24:43 pm
content: There are several SPI set-up options. How is your SPI set up? Eg. Data on rising clock/falling clock, MSB/LSB first etc. You have ensured that your SPI setup matches the requirement of the display?

author: Boscoe
author_rank: Frequent Contributor
timestamp: April 19, 2024, 06:51:01 am
content: Thanks for the reply but unfortunately, this is all good. It's MSB first and SPI mode 0 which I've verified on the logic analyser. The bus is running at 5MHz which is half the upper limit of the driver.