Why do we need communication protocol and what is the difference between UART and i2c other than clock?
There are many differences, but to name a few:
- Transmission speed for I2C is selectable from a few predefined values, serial can be any speed, from very low to very high
- UART is typically for a point to point connection, I2C is a bus protocol
- UART is not a protocol (see also remark of Justme below), I2C is a protocol
- UART is (can be) full duplex, I2C is not
- UART does not have a master/slave principle (no protocol), I2C has
- UART can be used for transmission over distance, I2C is not meant for that.
So, there are a lot of differences. First find out what you need, than search the best protocol and hardware peripheral (UART, I2C, SPI, GPIO) for it.