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

Connect ADXL345 with nRF52832

I want to connect Connect ADXL345 with nRF52832 to read movement of ADXL345. I am using example code ADXL375_I2C.zip 

1. Please let me know the wired connection diagram between ADXL345 and nRF52832.

2. In this code I am seeing

#define TWI_SCL_M 3 //!< Master SCL pin

#define TWI_SDA_M 4 //!< Master SDA pin

I hope TWI_SCL_M & TWI_SDA are referring to nRF52832 pins. Can I use the same pin numbers if no please let me know which pin number I need to assign for TWI_SCL_M & TWI_SDA_M from nRF52832.

const nrf_drv_twi_config_t config =
    {
       .scl                = TWI_SCL_M,
       .sda                = TWI_SDA_M,
       .frequency          = NRF_TWI_FREQ_400K,
       .interrupt_priority = APP_IRQ_PRIORITY_HIGH
    };

Parents
  • Please let me know the wired connection diagram between ADXL345 and nRF52832.

    That's up to you to do - that is part of your design!

    The ADXL345 datasheet will tell you what connections it requires. You then need to study the nRF52832 documentation, and choose suitable pins to meet those requirements.

    It's the same process for any project: http://www.8052mcu.com/forum/read/160143 

    Are you using a Nordic Development Kit, or 3rd party board/module? If so, you will have to study its documentation to see what pins it makes available (and what pins are used by other functions).

  • Awneil,

    My question is in nRF52832 Data sheet pins P0.26 & P0.27  for SDA and SCL respectively but int the above example ADXL375_I2C.zip  for  the same nRF52832 Pin P0.3 and P0.4 are used for SDA and SCL.

    in the above Example ....

    #define TWI_SCL_M 3 //!< Master SCL pin

    #define TWI_SDA_M 4 //!< Master SDA pin

    I am confusing here, need your help for exact wired connection.

    FYI, I am using Nordic Development Kit, BT832(nFR52832) and ADXL345. I am not using any Arduino. I hope e BT832 as master. 

    Regards,

    Ashiq Mohammed.

Reply
  • Awneil,

    My question is in nRF52832 Data sheet pins P0.26 & P0.27  for SDA and SCL respectively but int the above example ADXL375_I2C.zip  for  the same nRF52832 Pin P0.3 and P0.4 are used for SDA and SCL.

    in the above Example ....

    #define TWI_SCL_M 3 //!< Master SCL pin

    #define TWI_SDA_M 4 //!< Master SDA pin

    I am confusing here, need your help for exact wired connection.

    FYI, I am using Nordic Development Kit, BT832(nFR52832) and ADXL345. I am not using any Arduino. I hope e BT832 as master. 

    Regards,

    Ashiq Mohammed.

Children
Related