hello can we interface multiple i2c device with nrf51822? how??
hello can we interface multiple i2c device with nrf51822? how??
You can have multiple i2c (twi) slaves on the same bus. The address is used to communicate to the different devices (so the devices need to have different addresses). Connect them like this (no need for external pullup as internal is used in the driver).
thanks. i understand it
Basically, I2C is a Software Addressable protocol. Address is of 2 types. 7-bit and 10-bit. You can connect 128 devices ( for 7-bit address) on the same bus. Based on address, respective slave will respond to the master (here our MCU).
I understood how to use it but can you please tell me whether the nrf51 board will support for two i2c's I mean two pair of SCL and SCK pins?
You can have two TWI instances as seen in the instance table in the Product Specification page 37. With two TWI instances you can not have any SPI or SPIS instance as they use the same ID or address (see the same table).