Protocol

The Protocol interface uses the device Digital Pattern Generator and Logic Analyzer resources to transfer data using UART, SPI and I2C protocols.

Having the Debug option enabled the Logic Analyzer can be used to investigate the signals and in this case the Protocol instrument can't receive only to send data.

 

1. UART

The UART settings contain the following:

The TX field contains a text box to type the characters to send. With Auto option the typed characters are immediately sent, or by pressing the Send send button. File content can also be sent using the button below the text box.

The RX field contains the enable button to receive data, option to print the sent TX data too. The received data is printer with blue, the sent with green and eventual errors with red. The unprintable characters codes are displayed between braces.

 

2. SPI

The SPI interface implements a protocol master controller. It allows sending and receiving data in single, dual and quad modes. The select signal is activate from software therefore it does not have exact timing with the bit serialization. The larger transfers with more bits that the custom Patters or Logic Analyzer device buffer are split to separate transfers.
On Analog Discovery the Patterns buffer size is 1k or 16k bits, the Logic is 4k or 16k bits.

The SPI settings contain the following:

The Simple mode lets you create simple transmissions and contains the following options:


The Custom mode lets you write communication script with the following functions:

Under the examples menu you can find scripts for some PMods/ICs.


The Sensor mode lets you write communication script which will be executed at precise timing with the following functions:

When the Sensor executed, first the loop function is called to build the transmission bit sequence without performing it on the device now. The bit sequence length is limited by the device Pattern or Logic buffer size. After the initialize function, the loop transmission sequence is performed for the given number of iterations, then the loop function is called to decode the received data, finally the finish function is called.

 

3. I2C

The I2C interface implements a protocol master controller. The transfer length is limited the custom Patters or Logic Analyzer device buffer size. The read operations with sub-address use restart and is transfer length limited to less than half of the device buffer size. The write operations are not sopped on not acknowledge but appropriate error shown in software.

The I2C settings contain the following:

The Simple mode lets you create simple transmissions and contains the following options:


The Custom mode lets you write communication script with the following functions:

Under the examples menu you can find scripts for some PMods/ICs.


The Sensor mode lets you write communication script which will be executed at precise timing with the following functions:

When the Sensor executed, first the loop function is called to build the transmission bit sequence without performing it on the device now. The bit sequence length is limited by the device Pattern or Logic buffer size. After the initialize function, the loop transmission sequence is performed for the given number of iterations, then the loop function is called to decode the received data, finally the finish function is called.