- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i'm trying to program an I2C OLED display 128x64 SSD1306 on PSOC5 but nothing appear on the screen. I'm using 4,7k pull-up resistors for SCL and SDA pins.
Can someone tell if there is something i'm doing wrong please ?
Thank you for your help in advance !
Solved! Go to Solution.
- Labels:
-
PSOC5 LP MCU
- Tags:
- i2c
- OLED display
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Coincidently I wrote a sample program of SSD1306 for PSoC 4 last week.
Today, I ported it for PSoC 5LP (CY8CKIT-059).
https://community.infineon.com/t5/Code-Examples/SSD1306-I2C-OLED-128x64-PSoC-5LP-CY8CKIT-059/m-p/390...
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You needed to add charge pump setting 0x8D, 0x14
So I modified your display_init() as follows
// call before first use of other functions
void display_init( uint8 i2caddr ){
_i2caddr = i2caddr;
gfx_init( DISPLAYWIDTH, DISPLAYHEIGHT );
uint8 cmdbuf[] = {
0x00,
SSD1306_DISPLAYOFF,
SSD1306_SETDISPLAYCLOCKDIV,
0x80,
SSD1306_SETMULTIPLEX,
0x3f,
SSD1306_SETDISPLAYOFFSET,
0x00,
SSD1306_SETSTARTLINE | 0x0,
SSD1306_CHARGEPUMP,
0x14,
SSD1306_MEMORYMODE,
0x00,
SSD1306_SEGREMAP | 0x1,
SSD1306_COMSCANDEC,
SSD1306_SETCOMPINS,
0x12,
SSD1306_SETCONTRAST,
0xcf,
SSD1306_SETPRECHARGE,
0xf1,
SSD1306_SETVCOMDETECT,
0x40,
0x8D, 0x14, // Set Charge Pump Setting (0x14: Enable Charge Pump)
SSD1306_DISPLAYALLON_RESUME,
SSD1306_NORMALDISPLAY,
SSD1306_DISPLAYON
};
display_write_buf( cmdbuf, sizeof(cmdbuf) );
}
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Coincidently I wrote a sample program of SSD1306 for PSoC 4 last week.
Today, I ported it for PSoC 5LP (CY8CKIT-059).
https://community.infineon.com/t5/Code-Examples/SSD1306-I2C-OLED-128x64-PSoC-5LP-CY8CKIT-059/m-p/390...
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I tried adding this line and it works perfectly fine now ! Thank you for your answer.