Perform non-blocking communication on I2C bus
Keywords:non-blocking? communication? bus? MCU? CPU?
The blocking communication means that the MCU stalls until the byte is transferred from the data register. In the code, this is usually implemented as checking of the status bit in the "while" loop. However, this approach might not be applicable for some time-critical applications. Assuming anI2C speed of 100kHz, transmission of 1B will stall the CPU for 9?s. The total time while the CPU is waiting for data transmitting or receiving is much higher because the I2C message consists of at least three bytes.
View the PDF document for more information.
Originally published by Freescale Semiconductor at www.freescale.com as "I2C Non-Blocking Communication".
Visit Asia Webinars to learn about the latest in technology and get practical design tips.