Hi, i was interfacing oled with nrf52 board. I got some example and modified bit to use it with GCC. But it is now working. Oled not at all starting. oled is 0.96 inch, I2C based 128x64. Vdd = 5v sda = p0.26 scl = p0.27
Here is code github.com/.../
Hi, i was interfacing oled with nrf52 board. I got some example and modified bit to use it with GCC. But it is now working. Oled not at all starting. oled is 0.96 inch, I2C based 128x64. Vdd = 5v sda = p0.26 scl = p0.27
Here is code github.com/.../
Thanks jorgen. I tried 0x3C address and partially oled works means backlight and some dots are coming. But it stucks at dots only. I am calling function to draw some bitmaps as well but no effect. obrazki.elektroda.pl/2093360400_1492801072.jpg is it same result you got or you got text on oled?
Yes, I get the same dots. Most likely there is something wrong with the initialization commands or the functions for writing to the OLED.
Ok. I don't think there is any Initialization failed, because i compare 3-4 kinda code of different controller for the same oled. Init sequence is exact replica. I think there might be issue with i2c communication. Or May be because of blocking or non-blocking issue. I don't have working LA now.
I see one more issue in the code. In function ssd1306_display()
, the buffer is sent to the display in a single transfer. From the API documentation of nrf_drv_twi_tx()
, you can see that the input length
is of type uint8_t
, meaning the maximum length of the transfer can be 255 bytes. This is due to the limited EasyDMA buffer in the nRF52 series. You have to split the buffer into multiple transfers of 255 bytes or less. With a resolution of 128x64 pixels, the transfer size will be 128*64/8=1024 bytes. When giving this number to the 8-bit length parameter, the variable will overflow and a lengt of 0 will be used, leading to no data being transferred. This thread might be of help.
Hi Jorgen,
There seems to be an issue with a repeated start bit between non stop transfers as discussed in this thread:
devzone.nordicsemi.com/questi...
I think splitting the buffer into multiple transfers of 255 bytes will not work too. Did you manage to find another solution?