This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ssd1306 i2c not working with nrf51822

Hi, i am using oled ssd1306 i2c with nrf51822. I am using peripheral mode and SDK v10.0. i choose this sdk version because of length i want to sent at one go that is 1024. I have connected oled to pin 18 and pin 20 for SDA and SCL respectively.

I took twi_sensor code for reference and i merged oled code in that. first i tried led blinking and it working without problem. But oled is not at all working.

I checked on logic analyser, i found nrf chip is not communicating over i2c. i didn't see any signal changes on those pins. i have attached logic analyser screen shot. image description

i have updated code on github. github.com/.../olednrf51

Parents Reply
  • That unfortunately seems to be correct. I'm not sure what has happened and I can't find the info I relied on 7 months ago.

    Anyway, the MAXCNT registers (maximum number of bytes in the transmit buffers) in the TWI is only 8 bit wide, so the HW will actually never be able to transmit more than 255 bytes at a time. However, you can use the EasyDMA list function and chain multiple transfers. You can use PPI and/or shortcuts to make the transfers completely autonomous and independent of the CPU and interrupts. This allows you to transfer buffers that are a lot longer than just 255 bytes. You are basically just limited by the amount of RAM available for your buffer.

Children
No Data
Related