3 ms·
The pull-up resistor allows I2C to have multiple masters on the same bus. A master take control of the bus by pulling either sck or sda low (can't remember whic
by magicsmoke 6y ago
The pull-up resistor allows I2C to have multiple masters on the same bus. A master take control of the bus by pulling either sck or sda low (can't remember which) and if other masters detect a low voltage when it expects a high it knows the bus is currently taken. SPI only has one active master on the bus at a time, so there's no need for pullup resistors to implement this arbitration mechanism. SPI masters just drive their bus lines using push-pull outputs.
- el_isma 6y agoIt's even cooler than that: it has collision avoidance. To start a transfer you drive the clock low. If both masters drive the clock low at the same time. Then they start driving SDA with the address. If at any point in time, the address you are trying to put in the bus is not there, you stop. This could happen if you try to drive a 1 and the other master does a 0 (since it's open collector, the 0 will win), and you know you couldn't put your '1' in the bus, so you shut up and let the other master carry on.