Oscilloscope Setup for I2C - Quick Guide
These instructions provide a quick setup for your oscilloscope for I2C monitoring. They will help you get a usable few bytes of transaction on screen. From that starting point you can explore packets, inter-byte delays, read to write turnaround times, signal integrity issues and timing problems.
You need know two parameters about your bus when you are setting up your oscilloscope.
bus speed
operating voltage
You will need at least two channels to see the I2C bus.
To find your signals on the screen you will need the scope to be free running. You will adjust the voltage to bring the signal waveforms on-screen. You might see static levels, square waves, or flat lines with occasional vertical lines as you are setting up. Once you have your signals on-screen you can set up to capture signals, and adjust timing to make them visible.
Channels
The I2C bus has two signals that you need to look at. There may be other signal which interface between the host controller and the target device.
bus only
SDA
Idles high
SCL
Idles High
optional signals
RESET#
Active low
Use for bus hangs and boot timing analysis.
INTERRUPT
Active high
Interrupt latency timing. Peripheral set up analysis.
ENABLE
Active high
Peripheral set up analysis.
POWER
on
Peripheral availability. Brown out analysis.
Remember you must connect to the ground as well as to the signal.
Each channel on your scope has a separate enable control to turn it on and off. Turn on each channel using this enable.
Start the scope running
Trigger - auto/continuous RUN - enable
Voltage
The scope may not be configured for your needs. Use the voltage scale and position controls to bring the active signals on-screen.
Voltage Scale
Initially 2v/div.
The I2C bus will operate at 5v or less. The optional signals may not be at the same voltage level as the I2C bus. Refer to the schematic and datasheets for the actual operating parameters.
A good starting voltage scale is 2v/div to easily accommodate 4 channels on screen at once, with some overlap. 2v/div will make the signals no more than 2.5 divisions tall, and all should be visible after you set the voltage offset. You may choose to reduce the scale for each channel individually after you set the voltage offsets.
Voltage offset
Initially set to 0v. Use vertical position to spread signals evenly over screen.
Initially zero the voltage offset of all channels. You should see SDA and SCL overlapping, and just above the axis. Some oscilloscopes have a zero function for the channels voltage position.
Use the position dial to move SDA signals 0v position above the SCL, this will match most datasheets you are looking at.
Set trigger
source = SDA Type = Falling Edge Level = 0.5v Offset = 0.0 seconds
Source and edge
SDA Falling edge
To find I2C transactions on your scope, you will need to trigger on the SDA channel. The SDA channel will have a falling edge with a valid START condition, the first event in any transaction.
Trigger level
Level = 0.5v
The low should, theoretically reach 0v, but this might not always happen. A logic low is normally below 30% of the maximum voltage for the signal we are monitoring. For any I2C bus implementation, a 0.5v level should work as a rule of thumb. This level is useful if you are moving your scope probe around a segmented bus where you could be either side of a level shifter.
A logic high should be at full voltage, but logic will recognize a high above about 70%.
To catch either a rising or falling edge, we would ideally use a 50% level.
If you do know the bus voltage then use the values in the table below.
bus voltage
either 50%
falling 30%
rising 70%
5.0v
2.5v
1.5v
3.5v
3.3v
1.65v
1v
2v
1.8v
900mv
600mv
1.2v
1.0v
500mv
300mv
700mv
Remember, just because your oscilloscope recognizes a change in state, your hardware may not.
Trigger offset
0.0 seconds
If you do not see the trigger marker on the top of you screen, then you may not be seeing events, even if you catch them. Use the horizontal scale zero function to reset the offset to be visible.
Timing scale
50us/div
Timing is bus speed dependent. With our trigger set up on the START (SDA falling edge), we are capturing from before the first bit time. There may be some latency between the start and the first falling SCL.
speed
bit time
byte time
show one byte
5 bytes
100 kbit/s
10us
90us
9us/div
45us/div
400 kbit/s
2.5us
22.5us
2.25us/div
12us/div
1 Mbit/s
1us
9us
1us/div
5us/div
1.7 Mbit/s
588ns
5.3us
500ns/div
5us/div
3.4 Mbit/s
294ns
2.6us
250ns/div
2us/div
5 Mbit/s
200ns
1.8us
200ns/div
1us/div
Sample rate
Most oscilloscopes have a sampling rate that tracks the timing scale. However you do need to make sure you capture each clock edge on SCL so that you can see all the data. The sample rate should be at least twice that of the edges we are trying to catch.
mode
max speed
sample rate samples/sec
standard
100 kbit/s
400k
fast
400 kbit/s
1.6M
fast+
1 Mbit/s
4M
high-speed
1.7 Mbit/s
8M
high-speed
3.4 Mbit/s
16M
ultra-fast
5 Mbit/s
20M
Last updated