Application: This document describes how to set I2C clock source to LIRC and how a Master access Slave.
BSP Version: Mini51DE Series BSP CMSIS V3.02.000
Hardware: NuTiny-EVB-Mini51_V2.1
This example code demonstrates how to set clock source of I2C to LIRC and how a Master access Slave. The system clock source is LIRC. Since clock source of Mini51 I2C is the same as system clock. Hence, the clock source of I2C is also from LIRC. The bus clock of I2C is set to 833Hz. Then, Master accesses Slave with Byte Write and Byte Read operations, and check if the read data is equal to the programmed data.