Sample code for "I2C_FmPlus" library. I2C fast mode plus support library. This library works on mbed-11U24's p28&p27 only.

Dependencies:   I2C_FmPlus mbed

Homepage

0. What is this?

A sample code for I2C Fast mode plus operation.
Recent I2C standard defines "Fast mode plus (Fm+)" for faster and robust I2C data transfer.
It supports 1MHz SCL (bit clock) and 20mAmin sink current capability.

The class library "I2C_FmPlus" enables the I2C port of mbed-LPC11U24 for the Fm+.

Warning!

This code works on mbed-LPC11U24 only.

Import libraryI2C_FmPlus

I2C fast mode plus support library. This library works on mbed-11U24's p28&p27 only.

1. Operation sample

Next waveform was captured while the sample code is running.
I put 270Ω pull-up resisters on SDA and SCL lines to accelerate rise-time.

If you use weak (bigger value) resisters, the rise time will get slow and it makes lower SCL frequency.
Since the I2C interface supports "clock stretching", the slower rise time makes longer LOW time and master detects it as "someone on the bus is pulling the signal LOW to keep me waiting".
Due to this mechanism, user may need to adjust the clock frequency for each bus loading conditions.

/media/uploads/okano/fmp2.png
9 bytes transfer of sample code

/media/uploads/okano/fmp_start2.png
transfer around start-condition. The clock frequency is bit higher than 1MHz. Please adjust if you need more accurate clock.

/media/uploads/okano/fmp_stop2.png
transfer around stop-condition


All wikipages