The Moku:Go Logic Analyzer incorporates its own Protocol Analyzer, which contains three protocols: SPI, I2C, and UART.
Moku:Go combines 10+ lab instruments in one high-performance device, with two analog inputs, two analog outputs, 16 digital I/O pins, and optional integrated power supplies.
Updates to the Moku:Go Logic Analyzer
The Protocol Analyzer is available through the Logic Analyzer instrument in the Windows and macOS desktop apps. The Logic Analyzer also features several other functions such as:
- Protocols: UART, SPI, I2C
- Sampling rate at 125 MSa/s for all 16 digital input/output (DIO)
- Time cursors
- Advanced triggering options
- Trigger on multiple pins using AND/OR logic
- Trigger if the signal is high, low, or on rising/falling edges
Let’s look at some of these features in action and see how you can use them in your next digital logic project.
Decoding UART from an Arduino
Universal Asynchronous Receiver/Transmitter (UART) is a common protocol to transmit and receive serial data. For example, UARTs are frequently used in Arduino projects to control various peripherals, such as a parallel-based LCD with serial I/O. Let’s test out the UART bus before connecting it to the LCD to make sure the Arduino code is working properly.
Setting up the protocol analyzer is straightforward: first, add a new protocol decoder (max of two); then, select which pin to route the data to. Figure 1 shows how to add a protocol decoder channel in the Moku:Go desktop app.
Figure 1: Setting up the protocol decoder
After adding a protocol decoder, configure the protocol specific settings that fit the data transmitter and receiver specifications. In Figure 2, there are options for configuring the UART protocol including data width, parity, baud rate, and more.
Figure 2: UART decoder settings
For this project, the UART protocol decoder is using the same settings from Figure 2, such as a baud rate of 9,600 bps, which is common for a 5 V Transistor-to-Transistor Logic (TTL) serial interface. Let’s make sure the “Hello” text on the LCD screen is also shown here in the Protocol Analyzer. The last step is to connect the Arduino’s transmitter pin to the Moku:Go receiver pin (Pin 1). Figure 4 displays the pinout diagram of the Moku:Go DIO header that corresponds with the DIO cable included with Moku:Go. The Protocol Analyzer reports values in hexadecimal, so converting the 5 data packets in Figure 3 using ASCII characters confirms that the LCD screen will display “Hello” once connected.
Figure 3: Protocol Analyzer example
Converting hexadecimal to ASCII characters is straightforward and is done using a table or any number of online conversion tools. A truncated hexadecimal to ASCII characters table for this project looks like Table 1.
Table 1: Hexadecimal to ASCII character conversion
When using the Moku:Go Protocol Analyzer, you can trigger the input pins and display the values on-screen next to the protocol decoder pin. This allows for quick debugging, revealing timing errors like mismatched baud rates or incorrect parity bits.
Figure 4: Moku:Go DIO header pinout
The Moku:Go Protocol Analyzer gives flexible tools for your next digital logic project. The available protocols are UART, I2C, and SPI with more coming in future updates. For more practice using the Moku:Go Logic Analyzer, explore the 4-bit Adder project. If you have suggestions for what protocols you would like to see next, let us know on our forum.
Moku:Go demo mode
You can download the Moku app for macOS and Windows here. The demo mode operates without any hardware and provides an introduction to using Moku:Go.
Questions or comments?
Contact us at [email protected].