Are there any I2C examples for the nRF51822 ( write/ read functions) ? If not, can anyone suggest a good starting point for I2C? I am using Eclipse kepler for development. Thank you for all suggests.
Are there any I2C examples for the nRF51822 ( write/ read functions) ? If not, can anyone suggest a good starting point for I2C? I am using Eclipse kepler for development. Thank you for all suggests.
Hi,
There is an example project using I2C on the nRF51822 - they refer to it as a "Two Wire Interface" (TWI) in the PS and RM, please see Section 27 of the RM 2.1 for a complete description.
The example program of an I2C master can be found in the stack example path below:
\Nordic Semiconductor\nRF51 SDK_v5.1.0.36092\Nordic\nrf51822\Board\nrf6310\twi_sw_master_example
Cheers, Steve
Hi,
There is an example project using I2C on the nRF51822 - they refer to it as a "Two Wire Interface" (TWI) in the PS and RM, please see Section 27 of the RM 2.1 for a complete description.
The example program of an I2C master can be found in the stack example path below:
\Nordic Semiconductor\nRF51 SDK_v5.1.0.36092\Nordic\nrf51822\Board\nrf6310\twi_sw_master_example
Cheers, Steve
Hi, Thank you for you Answering. I've seen the example of Nordic, but for me it does not explain very well for me how it implemnts the read/write frame.
Hello,
I am trying to find the I2C example and I can't. It doesn't appear here:
developer.nordicsemi.com/.../a00038.html
And it doesn't either in my PC folder. It is possible that it was available in SDK v5.1.0 version but it's not anymore?
Thank you.
Hi Mario,
Have you tried this link here?
I'm not sure why you can't find the example in your SDK's file path - it looks like the latest SDK still has the example under the nrf6310 folder. Are you looking in the correct folder?
-Steve
Hi Steve, I saw that link. It appears under "drivers". I do have the "twi_master.h", "twi_hw_master.c" and "twi_sw_master.c" within drivers folder, but in examples folder I can't find anything related with TWI or I2C. I don't know what is wrong but I'm getting a headache with this.
If I create a project and write #include "twi_master.h" it says it can't find that file. It doesn't happen with "simple_uart.h" for example and I don't understand why because both of them are within the same folder "drivers" (where the uvision is supossed to find header files)
The path of my examples folder is this
C:\Keil_v5\ARM\Pack\NordicSemiconductor\nRF_Examples\7.2.0\peripheral
copy these files (.c,.h) to near Project main.c file and after that import to your project in Keil.