Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
learn:instrumentation:tutorials:analog-discovery-studio-protocol-analyzer:start [2019/11/20 00:00] – Arthur Brown | learn:instrumentation:tutorials:analog-discovery-studio-protocol-analyzer:start [2020/10/02 20:59] – Arthur Brown | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Using the Protocol Analyzer | + | ====== Using the Protocol Analyzer (REDIRECT) ====== |
- | + | ~~REDIRECT>https://reference.digilentinc.com/ | |
- | {{: | + | ~~NOSEMANTIC~~ |
- | + | {{tag>redirect}} | |
- | ===== Introduction ===== | + | |
- | This guide explains the use of the // | + | |
- | ---- | + | |
- | ===== Prerequisites ===== | + | |
- | * A Digilent Test & Measurement Device with Digital Input/ | + | |
- | * A Computer with WaveForms Software Installed | + | |
- | + | ||
- | ---- | + | |
- | ===== Guide ===== | + | |
- | ==== 1. Opening the Protocol Analyzer ==== | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 1.1 === | + | |
- | Plug in the Test & Measurement Device, then start WaveForms and make sure the device is connected. | + | |
- | + | ||
- | If no device is connected to the host computer when WaveForms launches, the **Device Manager** will be launched. Make sure that the device is plugged in and turned on, at which point it will appear in the Device Manager' | + | |
- | + | ||
- | **Note:** //" | + | |
- | + | ||
- | **Note:** //The Device Manager can be opened by clicking on the " | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 1.2 === | + | |
- | Once the Welcome page loads, in the instrument panel at the left side of the window, click on the **Protocol** button to open the //Protocol Analyzer// instrument. | + | |
- | + | ||
- | </WRAP> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{ :learn: | + | |
- | + | ||
- | </WRAP> | + | |
- | </WRAP> | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 1.3 === | + | |
- | Once the //Protocol Analyzer// instrument opens, the window contains the spy panel (1.) showing captured data, the configuration panel (2.) above the spy panel, and the control toolbar (3.) at the top of the window. | + | |
- | + | ||
- | </WRAP> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ==== 2. Using the Protocol Analyzer ==== | + | |
- | + | ||
- | //The //Protocol Analyzer// can be used to spy on protocol communications to validate data flow. It may also be used to drive protocol communication to verify peripheral functionality. This section explains how to spy and then drive communication.// | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 2.1 Hardware Setup === | + | |
- | + | ||
- | To demonstrate the capabilities of the //Protocol Analyzer// instrument, this guide uses a [[:reference: | + | |
- | + | ||
- | ^ Test & Measurement Device | + | |
- | | DIO 0 and DIO 1 | N/A | N/A | | + | |
- | | Ground (down arrow) | + | |
- | | N/A | 5V | VCC | | + | |
- | | N/A | Digital Pin 10 | CS | | + | |
- | | N/A | Digital Pin 11 | MOSI | | + | |
- | | DIO 3 | Digital Pin 12 | MISO | | + | |
- | | N/A | Digital Pin 13 | SCK | | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{:learn:instrumentation: | + | |
- | + | ||
- | </WRAP> | + | |
- | </WRAP> | + | |
- | ---- | + | |
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 2.2 Arduino Setup === | + | |
- | Note: //This guide assumes the Arduino 1.8.9 toolset is already installed// | + | |
- | + | ||
- | Click Sketch> | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | ---- | + | |
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 2.3 Software Setup === | + | |
- | + | ||
- | Back in WaveForms, click the SPI tab below the menu bar. | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | When the SPI tab is opened, it is initially set to spy on the data sent on MISO and MOSI, however it must be configured to match the PmodAD5 SPI communication properties. In the configuration panel, set the frequency to 1 MHz, the clock polarity to 1 and the clock phase to 1 (SPI Mode 3). | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | ---- | + | |
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 2.4 Protocol Spying === | + | |
- | + | ||
- | Click Receive ({{: | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | ---- | + | |
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 2.5 Logic Analyzer === | + | |
- | + | ||
- | The //Logic Analyzer// can be used alongside the //Protocol Analyzer// to visualize the timing of the data being sent. In the //Protocol Analyzer// click the **Logic Analyzer** button in the top right corner, which opens the //Logic Analyzer// instrument. | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | In order to show both the //Protocol Analyzer// and the //Logic Analyzer// instruments on the screen at once, click on the Docking Windows button ({{learn: | + | |
- | + | ||
- | **Note:** //To return to the default tabbed view later, click on the “Tabbed Windows” button ({{learn: | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | Click the **Protocol** button near the right side of the control the control bar, then SPI MOSI to set a trigger on the MOSI pin. A trigger configuration popup window will open. Change the //Value// setting to " | + | |
- | + | ||
- | **Note:** //The //Protocol Analyzer// can't be used for spying if the //Logic Analyzer// is enabled.// | + | |
- | + | ||
- | Close the //Logic Analyzer// by clicking the **X** in the top right corner of the instrument. | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | ---- | + | |
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 2.6 Driving Communications === | + | |
- | + | ||
- | The //Protocol Analyzer// may also be used to drive peripheral communications. To begin, remove the 4 data connections between the Arduino and PmodAD5, keeping the 5V and GND pins connected. Next, click open the Master tab. | + | |
- | + | ||
- | Set mode to Read Write. Next, in the Write (DQ0) text box, enter the sequence of bytes below: < | + | |
- | Clicking the **Execute** button will execute the SPI transmission, | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | ---- | + | |
- | ==== 3. Protocol Analyzer User Interface Overview ==== | + | |
- | //This section describes the various controls present in the //Protocol Analyzer// instrument.// | + | |
- | + | ||
- | The //Protocol Analyzer// interface is separated into a settings panel and a communication panel. The settings panel is used to configure which pins will be used for a protocol’s transmission and the protocol’s properties. The communication panel is where data may be inputted for transmission and incoming data is displayed. Each protocol has different settings and communication panels which will be discussed in the following sections. | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 3.1 UART Interface === | + | |
- | + | ||
- | The // | + | |
- | + | ||
- | </ | + | |
- | {{: | + | |
- | </ | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | The communications panel contains a TX field and a RX field. | + | |
- | + | ||
- | The TX field has a text box where characters to be sent may be typed in. With the //Auto// option checked, characters are sent as they are typed. Otherwise, characters may be sent by clicking //Send// or by hitting the Enter key. When //Escape// is checked, escaped characters (\t, \n, \0, etc.) will be accepted. Clicking the //Send File// button, to the right of the Escape box, will transmit the contents of a chosen file. | + | |
- | + | ||
- | In the RX field, controls and configuration are as follows: | + | |
- | + | ||
- | * Clicking //Receive// ({{: | + | |
- | * Clicking //Stop// ({{: | + | |
- | * Clicking //Receive to File// ({{: | + | |
- | * Clicking //Cancel// stops this process. | + | |
- | * Checking //TX Echo// causes any data transmitted using the TX field with also be displayed within the RX field. | + | |
- | + | ||
- | The size of the text in the RX field may be adjusted with ({{: | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | {{: | + | |
- | </ | + | |
- | </ | + | |
- | ---- | + | |
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 3.2 SPI Interface === | + | |
- | + | ||
- | The // | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | {{: | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | The communications panel exposes four different modes of functionality, | + | |
- | + | ||
- | **Spy** mode simply configures the instrument to listen for incoming data on the MISO pin. The //Mode// dropdown allows selection between Three-wire, Standard, Dual and Quad modes. Checking the //Command// box tells the instrument to interpret the first N bits of a transaction as a command. The //Data Bits// field specifies the expected length of a SPI transaction. | + | |
- | + | ||
- | **Master** mode allows the instrument to act as a SPI master. | + | |
- | + | ||
- | * //Mode// allows selection of transmission mode. | + | |
- | * //Command bits// specifies command word length. | + | |
- | * //Command// specifies the command word which is sent before the read and/or write operation. | + | |
- | * //Word bits// specifies the word length. Words is the number of words for the next transmission. | + | |
- | * //Write// specifies the words to send and Read shows the read words. | + | |
- | + | ||
- | When writing, data can be represented in binary, decimal or hexadecimal format, and may be imported from a binary or text file using the //Open// button. Likewise, data can be saved to a binary or text file using //Save// or //Append// when reading. | + | |
- | + | ||
- | **Custom** mode allows a communication script to be written. Please see the Protocol page within WaveForms' | + | |
- | + | ||
- | **Sensor** mode also allows for a communication script to be written. It allows for more precise timing of repeated transactions than in Custom mode. The // | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | {{: | + | |
- | </ | + | |
- | </ | + | |
- | ---- | + | |
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | + | ||
- | === 3.3 I2C Interface === | + | |
- | + | ||
- | The // | + | |
- | + | ||
- | </ | + | |
- | <WRAP column half> | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | </ | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | **Spy** mode configures the instrument to listen for incoming data. Clicking Receive ({{: | + | |
- | + | ||
- | **Master** mode allows the instrument to act as an I2C master. The //Address// and // | + | |
- | + | ||
- | **Custom** mode allows a communication script to be written. Please see the Protocol page within WaveForms' | + | |
- | + | ||
- | **Sensor** mode also allows for a communication script to be written. It allows for more precise timing of repeated transactions than in Custom mode. The // | + | |
- | </ | + | |
- | <WRAP column half> | + | |
- | {{: | + | |
- | </ | + | |
- | </ | + | |
- | ---- | + | |
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | === 3.4 CAN Interface === | + | |
- | The // | + | |
- | </ | + | |
- | <WRAP column half> | + | |
- | {{: | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | <WRAP group> | + | |
- | <WRAP column half> | + | |
- | The communication panel contains a TX and an RX field. The TX field has a text box where the data to be transmitted can be entered. Clicking the //Execute// button sends the data. The TX field also has an //ID// input for the device identifier. Checking the // | + | |
- | </ | + | |
- | <WRAP column half> | + | |
- | {{: | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | ---- | + | |
- | ==== Next Steps ==== | + | |
- | + | ||
- | For more guides on how to use the Digilent Test & Measurement Device, return to the device' | + | |
- | + | ||
- | For more information on WaveForms visit the [[reference: | + | |
- | + | ||
- | For technical support, please visit the [[https:// | + | |
- | + | ||
- | {{tag>analog-discovery-studio tutorial}} | + |