what is need of the pull up resistor in sda and scl ?in i2c logic ....
what is need of the pull up resistor in sda and scl ?in i2c logic ....
If you mean to use I2C make sure you read the spec:
http://www.nxp.com/documents/user_manual/UM10204.pdf
I2C is a wire ored bus structure where any device (slave or master) can pull SDA or SCL low but all devices must release the bus wires to allow them to go high. The protocol defines which devies are allowed to what. This kind of bus has the advantage that many devices can share signal lines and won't damage each other if tow drive the bus together. This disadvanatge is that the pull up resistors are required (otherwise the lines would not go high when all the devices' drivers are off). This kind of bus is, for any given power consumption and technology, much slower than a undirectional driven bus like SPI but doesn't need tristate drives and chip select logic for every device.
MK