主权项 |
1. A communication system comprising:
an I2C device having an SDA terminal at which a first data signal is transmitted or received and an SCL terminal at which an SCL signal is transmitted when the I2C device functions as a master of I2C communication, wherein the SCL signal is a clock signal that latches the first data signal, and the I2C device stops functioning as the master of the I2C communication when a stop signal is transmitted to the SCL terminal; an SPI device having a CS terminal at which a CS signal indicating that the SPI device functions as a master of SPI communication is transmitted, an SPI data terminal at which a second data signal is transmitted or received, and a CLK terminal at which a CLK signal is transmitted when the SPI device functions as the master of the SPI communication, wherein the CLK signal is a clock signal that latches the second data signal; a selection circuit that selects the first data signal from among the first data signal and the second data signal when the CS signal is not received, and generates a signal corresponding to the CS signal and transmit the CS signal to the SCL terminal as the stop signal and at the same time, selects the second data signal from among the first data signal and the first data signal when the CS signal is received; and an electronic circuit having an SPICK terminal at which the CLK signal is received, a CS/SCL terminal at which one of the CSL signal and the signal corresponding to the CS signal, which is generated by the selection circuit, is received, and a data terminal at which one of the first data signal and the second data signal, which is selected by the selection circuit, is transmitted or received, wherein the electronic circuit functions as a slave of the SPI communication in a case where the CLK signal has made a transition, and functions as a slave of the I2C communication in a case where the CLK signal has not make a transition and a signal indicating a condition under which the I2C communication is started is transmitted to the CS/SCL terminal and the data terminal. |