LCD 16×2 have around 16 pins which needs to be connected to microcontroller in order to make it work. But by using an I2C extender, we only needs to connect 2 pins (SDA and SCL) to the microcontroller.
RTC can be used for chronometers, alarm clocks, watches, small electronic agendas, and many other devices and today we are going to learn HOW to access internal RTC in STM32.
SPI is not very different from I2C. To enable a slave device, we need to pull the CS pin low and after our read or write is complete, just pull the pin high again. This will disable the slave device.
The writing procedure is same as mentioned in the beginning of the post i.e. START -> WRITE SLAVE ADDRESS -> WRITE REGISTER ADDRESS -> WRITE DATA -> STOP