Hi,Is there any library for RA2L1MCU's SSD1306 OLED using I2C interface,If yes please provide the link, Thanks.
Hlo i tried but screen will showing like this
And when i debug step by step then it is show if i didn't debug the code the no s reen will be visible. Pls give me some idea what i do wrong.
Try to add some delay (about 1 s ) after MCU reset before accessing to the display
Kind regards,
Sergey
If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
Renesas Engineering Community Moderatorhttps://community.renesas.com/https://academy.renesas.com/https://en-support.renesas.com/knowledgeBase/
Ok but what about the values it is showing only one page
Maybe wrong initialization. Have you changed the display dimensions in the Adafruit_SSD1306.h file?
You need to uncomment "#define SSD1306_128_64" and comment the "#define SSD1306_64_32".
I changed
Can you send me your project so I could check it?
i2c_oled.zip
Here is my test project. i am using R7FA2L1A93CFL MCU.
thanks
Nikhil kumar
OK, seems like I've found it.
In your project in the oled_display function you use this code:
And in the library I used this code looks different
So in your code it sends only one line while in my code it sends the whole display
Dear sergey,
i still facing same problem which is mention below:
1. I changed the code according to you but agein it will showing same.
2. If i use debugger and debug the code step by step then it will run only one page is run and if i run the code without debug step by step then the screen is showing only random pixels. no value will be display
3. why only one page is showing did i need to use different library or something or their is another methiod to initialize the code.
Hello Nikhil Kumar,
You need to assign the value I2C_MASTER_EVENT_ABORTED to the i2cMaster_event variable before the transmission because otherwise it keeps I2C_MASTER_EVENT_TX_COMPLETE and the loop finishes instantly.
Please check my function i2c_write from the above C++ library I provided.
void Adafruit_SSD1306::i2c_write(uint8_t* buf, uint16_t len) { fsp_err_t err; uint32_t timeout_ms = I2C_TRANSACTION_BUSY_DELAY; /* Send data to I2C slave */ g_i2c_callback_event = I2C_MASTER_EVENT_ABORTED; err = R_IIC_MASTER_Write(&g_i2c_master0_ctrl, buf, len, false); if (err == FSP_SUCCESS) { /* Since there is nothing else to do, block until Callback triggers*/ while ((I2C_MASTER_EVENT_TX_COMPLETE != g_i2c_callback_event) && timeout_ms) { R_BSP_SoftwareDelay(1U, BSP_DELAY_UNITS_MILLISECONDS); timeout_ms--;; } if (I2C_MASTER_EVENT_ABORTED == g_i2c_callback_event) { __BKPT(0); } } }