Analyze that Logic!
Hey M5 member, have you ever wanted a more convenient way to look at waveforms than a boring old outdated oscilloscope? Want something you can load into python or excel, and quickly get more information from your signal, check out these logic analyzers!
Logic analyzers plug directly into your computer, and can display simple analog waveforms, and can decode digital signals. This allows more fidelity in understanding signals, and makes it easier to work with them.
the saleae logic analyzer stocked up at M5! just ask a staff member
Logic analyzers also have the ability to decode messages sent over common communication protocols. In this blog post, we used i2c, and we can see how the logic analyzer decodes these signals. Here is our reference circuit, which uses a simple temperature sensor that communicates over i2c. The resistors are to pull the voltage back to 5v, which is the default for communication over i2c.
Our reference circuit
output from the logic analyzer
As you can see, the two signals from the logic analyzer are the clock, which is used to time the signals being sent with the clock. The data being sent is also being recorded, as we can see with the SDA channel. We can see there’s an address message, along with the actual message of 0x98. To understand this better, we can look at the packet structure of i2c.
i2c packet structure
This correlates with our signals captured from our logic analyzer, which is shown above:
As you can see, the logic analyzer can decode the packets being sent to and from the device, and we can use this to ensure the data being transmitted is correct. We can also export this data into excel or python, to do more complex analysis through csv files.