??? 02/13/06 09:14 Read: times |
#109826 - Re: SW-I2C efficiency Responding to: ???'s previous message |
Erik Malund said:
I can see many cases where "canned code", even if a bit less efficient than custom, can have a place, but bit-bang is a true processor time hog which put it in a totally different class. On all my applications the SW-I2C cost only 1% or less of CPU time. So changing to HW-I2C will give no noticeable speed improvement. I think, this should almost always be the case, that I2C was only a small task beside many others. Maybe, if tons of PCF8574 are connected and you want to do SW-SPI over the PCF8574, then HW-I2C may be needed. But I have never seen such a crazy approach. Efficiency was not an absolute value, it can only be calculated in comparison to all other used resources. Thus in typical applications all functions with 1% or less CPU time consumption are efficient enough. Peter |