Whenever multiple devices got connected to a microcontroller, the adress and data lines from each device got connected individually by default. This stole useful pins from the microcontroller, which resulted in several tracks in the PCB and required more components to be connected. At the same time, this made the systems to become more expensive and vulnerable to interference and noise.
To solve this problem, Phillips developed Inter-IC or I2C in the 80s. I2C is a short distance, low bandwidth protocol. All of the devices connect to the network by 2 cables. We already mentioned that we will be using the SRF08 ultrasonic sensor, which is designed to communicate through this protocol.
The following are some of the most important characteristics of this protocol:
•It needs only two lines, the serial data and serial clock (SDA and SCL)
•Each device connected to the bus has an address code that you can choose by software. There is permanently a Master/Slave relationship between the microcontroller and the devices connected to the network
•The bus allows the connection of several masters, since it includes a collision detector.
•The data and address transference protocol allows us to design systems completely defined by software
•Data and address are transmited in 8bit words.
The lines SDA and SCL transport information between the devices connected to the bus. Every device is recognized by its own code or address and it can operate as a transmitter or receive data. Besides, every device can be considered as master or slave. The master is the device that starts the transference in the bus and generates the clock signal. The slave is the addressed device.
The lines SDA(serial Data) and SCL (serial Clock) are bidirectional, connected to the positive voltage through the pull-up resistors. When the bus is free, both lines are on logical high level.
The serial bidirectional data transmission (8-bits)can be done at 100Kbits/s in the standard mode or at 400 Kbits/s in the fast mode.
The quantity of devices that can be connected to the bus is limited, only, by the maximum capacitance allowed: 400pF.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment