Introduction

As embedded systems grow smaller, it is imperative to minimize I/O required for communication between devices to accommodate lower pin counts and smaller board real estate. Microchip Technology Inc.’s UNI/O bus provides a low-cost, easy-to-implement solution requiring only a single I/O signal for communication. UNI/O bus-compatible devices can enhance any application facing restrictions on available I/O. Teledyne LeCroy oscilloscopes can be equipped to decode a large number of industry standard serial data protocols. Like many standard interfaces, UNI/O is based on the fundamental building blocks of the Manchester line-encoding scheme. The following describes using Teledyne LeCroy’s Manchester protocol decode software for decoding UNI/O signals.

About the UNI/O Specification

Before examining the decoding of the specific signal used for this document, it may be instructive to cover some of the basic information regarding the UNI/O specification, found at: www.microchip.com.

There is only a single I/O signal, SCIO, required for communication between devices on the UNI/O bus. The asynchronous bus uses a master/slave configuration. The bus’s idle state is high; a pull-up resistor may be necessary to maintain the idle state when the master is not driving the bus. Both clock and data are embedded into the I/O stream by way of Manchester encoding. The bus is controlled by the master which determines the clock period, controls the bus access and initiates all operations, while all other devices act as slaves. Both master and slave devices can operate as transmitter or receiver, but the master determines which mode is active. The UNI/O bus supports operation from 10 kb/s to 100 kb/s.

Before initiating communication, a standby pulse from the master device alerts all slave devices on the bus to enter standby mode. At bit level, edge transitions occur at the middle of the bit period TE, where a rising edge indicates a 1 value and a falling edge indicates a 0 value. Communication is formatted using 8-bit bytes. An Acknowledge routine occurs after each byte is transmitted, including the start header. The routine includes two bits, one from the master and one from the slave, to ensure that devices are ready and to avoid bus collisions.

After the device address, a command byte must be sent by the master. Additional command and/or data bytes may be sent. All commands are terminated through a NoMAK bit from the master (Figure 1).

Figure 1:

Shown is an example of an EEPROM read operation

Embarking on a Decode

Start by acquiring a signal. For purposes of this document, the displayed signal is a status register read command at a bus speed of 100 kb/s and VCC of 5 V.

Figure 2:

A UNI/O status register read command at 100 kHz and VCC of 5 V

After acquiring a signal, use the Analysis drop-down menu at the top of the screen to access the Serial Decode dialog box, as shown in Figure 3.

Figure 3:

The Serial Decode dialog box

Pressing the Protocol button in the Decode 1 row brings up a popup menu of different protocols (what appears in the menu is determined by which serial-decode software options are installed in the oscilloscope). The decode options are shown in Figure 4:

Figure 4:

The Protocol popup menu in the Serial Decode dialog box

Select Manchester in the Protocol popup menu. Next, designate the source of the on-screen trace; in this case, the trace is stored in Memory 1 or M1. The decoder works on all channels, math traces, and memory traces.

In the Serial Decode dialog box, assign the on-screen trace to Decode 1 by turning Decode 1 ON. Then press the Setup button for Decode 1, which opens the Decode Setup tab in the dialog box.

The Three Tabs: Basic, Decode, and Levels

Upon entering the Decode Setup tab, note its layout as shown in Figure 5:

Figure 5:

The Decode Setup dialog box

Be sure to check the View Decode box. Note that Source 1 (Data) is set to M1 and the Protocol to Manchester.

The Basic tab will be open on the right by default. Try switching between the Basic, Decode, and Levels tabs. Then return to the Basic tab for the next section of the tutorial.

The Basic Tab

The Basic tab, shown in Figure 5, provides all of the fundamental controls required to allow proper bit-level decoding. In the Physical Layer section of the tab, the Bitrate button permits selection of the signal’s data rate. In this case, it is set at 100 kbits/s (UNI/O bit rates may range from 10 kb/s to 100 kb/s). The IdleState button offers choices of IdleHigh, IdleLow, and Don’t Care. Because the UNI/O bus uses a high idle state, IdleHigh is selected. Incidentally, pull-up resistors are recommended on the UNI/O bus to ensure bus idle during power up/down sequences, as well as any other time in which no device is driving the bus.

With the Polarity button, users may choose between a falling edge indicating a 0 or 1 value. This determines whether an edge falling through a threshold level is decoded as a logical 0 or a logical 1, respectively. The UNI/O bus specification dictates that a falling edge equates to a logical 0. Thus, Falling = 0 is the appropriate Polarity setting.

Within the Basic tab, users also will find the Timeout Definition section, where timeout units may be selected in units of Bits or Seconds. In the former case, users must specify the number of bits, while in the latter a specific time interval is indicated. In the case of the UNI/O bus protocol, a standby pulse must be sent to all slave devices on the bus before a command can be initiated. The standby pulse consists of holding SCIO high for a minimum of TSTBY. The UNI/O bus specification dictates that TSTBY has a minimum duration of 600 μs. With a bit period ranging from 10 to 100 μs, setting the Timeout Definition to 8 bits should, in most cases, serve the purpose of delineating TSTBY.

It is worth noting that according to the UNI/O specification, a standby pulse is required to be generated under certain conditions:

  • Before initiating a command when selecting a new device,
  • If a command is completed without error, a new command to the same devicecan be initiated without generating a standby pulse, and
  • After an error is detected.

The Decode Tab provides a number of configurable parameters that determine how the decoding will be interpreted (Figure 6). Data may be viewed in Bits or Words modes through toggling the Data Mode button. If the signal is viewed in Words mode, further options are provided for Viewing (Hex, ASCII, or Decimal) and Bit Order (LSB or MSB). In Bits mode, the Viewing and Bit Order buttons are greyed out.

Figure 6:

The Decode tab

The First Transition Used (FTU) parameter accounts for items that may precede the actual data payload. These might include such elements as a preamble or a synchronization sequence. The default setting for FTU is zero; it can range in increments of one to a maximum of 400. The Bit Stretch Tolerance parameter comes into play in Manchester decoding, where transitions typically occur at mid-bit. Due to hardware or signal-propagation issues, these mid-bits may not be perfectly equidistant. This parameter is adjusted to better decode jittery signals. After setting the Bit Rate on the Basic tab, the Bit Stretch Tolerance may require adjustment from its default setting of 20% to achieve stable decoding.

At the bottom of the Decode tab is a number of parameters for Grouping of Bits into Words. Figure 7 shows the status register read command signal shown above decoded and grouped into its constituent parts.

Figure 7:

The status register read command as decoded and grouped into its various segments

The first step in the process is to set the Data Mode to Words. The Manchester decoder provides the ability to group bits into Sync Bits, PrePad, Data Bits, and PostPad. PrePad bits (from zero to 32) might comprise addresses, preambles, subaddresses, or other content. In Figure 7, they are the portions of the bit stream seen with a purple overlay. In the UNI/O bus protocol, the first byte transmitted for any given command comprises an 8-bit start header, which is a combination of a short low pulse followed by a header byte of the value ‘01010101’ (Figure 1, again).

Data bits, in numbers from 1 to 32, comprise single words. They are seen with a blue overlay. Between a start header and the device address, a UNI/O burst contains an Acknowledge sequence, which is the first block of Data bits seen in Figure 7. The sequence indicates continuation or termination of an operation, as well as to confirm reception of a byte.

PostPad bits serve to group information following the data bits. Numbering from zero to 32, PostPad bits can represent a CRC, a checksum, or other protocol constructs. PostPad bits are displayed with a yellow overlay. The UNI/O bus specification does not call for any PostPad bit content.

The Levels tab

The last of the three tabs in the Decode Setup dialog box is the Level tab, shown in Figure 8.

Figure 8:

The Levels tab

Levels can be set using either percentage or absolute voltage values as determined by the Level Type setting. The Level setting itself determines the threshold that transitions must cross to be counted as transitions. The default value is 50% or 1.5 V for percentage and absolute level types, respectively.

Hysteresis settings are used to account for noisy signals with spikes that may create false transitions if they cross the Level threshold. It appears as a blue-shaded band centered vertically on the Level setting. The default Hysteresis value is 15%, but it may be varied from zero to 50%.

Conclusion

Teledyne LeCroy’s configurable Manchester decoder is an extremely capable tool, enabling users to explore the intricacies of UNI/O signals as well as others encoded with the Manchester scheme. Armed with a bit of foreknowledge of the signal under test, users may exploit the decoder’s nearly unlimited flexibility with respect to signal parameters to cleanly decode and display signals and extract data relative to their physical characteristics.