i2c_master_slave_pic
代码说明:
This I2C library contains the following functionalities: - master/slave communication - timeout in case of bus failure - self recovery after timeout - possibility to write one of 32 bytes slave registers In the archive you can find the hardware schematic, some photos of the working platform, the required libraries and an working example. In the example the master MCU writes 2 bytes to the slave MCU which then sums them together. Then the MCU read the result and print it on the LCD. In case of I2C failure, either a TIMEOUT or FAILURE message will be printed on the LCD depending of which line was break. The MCU uses for both master and slave was PIC16F887. It use internal clock at 8Mhz so no cristal is required.
下载说明:请别用迅雷下载,失败请重下,重下不扣分!