The latest TWI example I can find is from 4 SDK revisions ago and uses old libraries. Is there a sample using the nrf_drv_twi library that is recommended for current development?
The latest TWI example I can find is from 4 SDK revisions ago and uses old libraries. Is there a sample using the nrf_drv_twi library that is recommended for current development?
Yes, the SDK 9 driver only has a minor bug fix.
Does this require pull-ups? The SDA line looks like its being pulled up but the SCL isnt
The driver in SDK 9 configures the SDA and SCL pins with internal pullups. However, the pull ups are 13 kOhm, which is quite high, so I would recommend a couple of external ones as well. Especially if you are going to use clock speeds above 100 kHz.
I've been using your example with 8.1 for a while now and everything seems to be working well, so thank you very much for sample. Do you know if this library would work with SDK 7.2? I know the TWI library that came with that SDK had some issues.
SDK 8 introduced some pretty big changes in the way drivers and libraries are structured so this will require some work (maybe a lot). The main thing to remember, though, is that the SDK 8+ drivers are made for 3rd revision nRF51s and will not work on earlier revisions. If you have a 3rd revision IC and want to use SDK 7.2 I can't see any reasons why it wouldn't work if you are willing to do the work.