tech_vaibhav_eee
New Member
i am confused over when to use interfaces like i2c..so i am giving you a small example ..please explain it to me on the basis of it..
suppose i am making a line follower(a bot which is programmed to follow a black line) . i m using 4 sensors whose output would be connected to 4 comparators giving digital 0s and 1s depending on input voltage. now these 4 comparators are connected to the microcontroller which works according to the combination of these digital inputs.
1) do we require i2c between sensor and comparator.
2) do we require i2c between comparators and microcontroller.(and how do we make sure that all the 4 output data of comparators reach microcontroller at the same time)
if none of these require the use of i2c than please explain when it is used...
suppose i am making a line follower(a bot which is programmed to follow a black line) . i m using 4 sensors whose output would be connected to 4 comparators giving digital 0s and 1s depending on input voltage. now these 4 comparators are connected to the microcontroller which works according to the combination of these digital inputs.
1) do we require i2c between sensor and comparator.
2) do we require i2c between comparators and microcontroller.(and how do we make sure that all the 4 output data of comparators reach microcontroller at the same time)
if none of these require the use of i2c than please explain when it is used...