Channel I/O

The RF chip of your radio hardware determines the number of channels you can use for sending and receiving data.

Radio HardwareRF ChipNumber of ChannelsSupported RF Ports

ZC706 and FMCOMMS5

2 x AD93614

For AD9361 Chip A: TX1A_A, RX1A_A, TX2A_A, RX2A_A

For AD9361 Chip B: TX1A_B, RX1A_B, TX2A_B, RX2A_B

ADI RF SOM

ZC706 and FMCOMMS2 or FMCOMMS3

ZedBoard™ and FMCOMMS2 or FMCOMMS3

ZCU102 and FMCOMMS2 or FMCOMMS3

AD93612

TX1A, RX1A, TX2A, RX2A

ZC706 and FMCOMMS4

ZedBoard and FMCOMMS4

ZCU102 and FMCOMMS4

AD93641

TXA, RXA

Channel I/O Using AD9361

With an AD9361-based radio hardware, you can send or receive data using a single channel or you can use both channels. For sending data, use the comm.SDRTxAD936x System object™ or the AD936x Transmitter block. For receiving data, use the comm.SDRRxAD936x System object or AD936x Receiver block.

The following examples show how to send and receive data with an AD9361-based Zynq® radio hardware using System objects.

Transmit Data on Single Channel Using System Object

  1. Create a transmitter System object for the AD9361-based radio hardware.

    tx = sdrtx('AD936x', ...
               'IPAddress','192.168.3.2', ...
               'CenterFrequency',2.4e9, ...
               'BasebandSampleRate',1e6);
    

  2. Set channel mapping to 1 to signify single channel use on channel 1. Alternatively, to use only channel 2, set the channel mapping to 2.

    tx.ChannelMapping = 1;
  3. Create a DPSK modulator System object to modulate the transmitted signals.

    mod = comm.DPSKModulator('BitInput',true);
    
  4. Transmit data. Because only one channel is in use, the number of columns in modSignal is also 1.

    for counter = 1:20
       data = randi([0 1],30,1);
       modSignal = mod(data);
       tx(modSignal);
    end
  5. Release the System object.

    release(tx);

Receive Data on Single Channel Using System Object

  1. Create a receiver System object for the AD9361-based radio hardware.

    rx = sdrrx('AD936x');
    

  2. Set the channel mapping to indicate that only channel 1 is in use.

    rx.ChannelMapping = 1;
  3. Receive data. Because only one channel is in use, the number of columns returned in data is also 1.

    [data,validData,overflow] = rx();
  4. Release the System object.

    release(rx);

Transmit Data on Multiple Channels Using System Object

  1. Create a transmitter System object for the AD9361-based radio hardware.

    tx = sdrtx('AD936x', ...
               'IPAddress','192.168.3.2', ...
               'CenterFrequency',2.4e9, ...
               'BasebandSampleRate',1e6);
    

  2. Set the channel mapping to [1 2] to indicate that both channels are in use.

    tx.ChannelMapping = [1 2];
  3. Create a DPSK modulator System object to modulate the transmitted signals.

    mod = comm.DPSKModulator('BitInput',true);
    
  4. Transmit data. Because two channels are in use, duplicate modSignal to form a two-column vector.

    for i = 1:5
       data = randi([0 1],30,1);
       modSignal = mod(data);
       tx([modSignal modSignal]);
    end
    
  5. Release the System object.

    release(tx);

Receive Data on Multiple Channels Using System Object

  1. Create a receiver System object for the AD9361-based radio hardware.

    rx = sdrrx('AD936x');
    

  2. Set channel mapping to [1 2] to indicate the number of channels in use.

    rx.ChannelMapping = [1 2];
  3. Receive data. Because multiple channels are being used, the number of columns returned in data is also 2.

    [data,validData,overflow] = rx();
  4. Release the System object.

    release(rx);

Channel I/O Using AD9364

With an AD9364-based radio hardware, you can send or receive data using only a single channel. For sending data, use the comm.SDRTxAD936x System object or the AD936x Transmitter block. For receiving data, use the comm.SDRRxAD936x System object or AD936x Receiver block. When using blocks, set the Channel mapping parameter of the block to 1. When using System objects, set the ChannelMapping property of the receiver or transmitter System object to 1. All other steps for sending and receiving data with a System object are similar to the steps outlined in Transmit Data on Single Channel Using System Object and Receive Data on Single Channel Using System Object.

Channel I/O Using FMCOMMS5

With an FMCOMMS5 Zynq radio hardware, you can send or receive data using a single channel or you can use multiple channels. For sending data, use the comm.SDRTxFMCOMMS5 System object or the FMCOMMS5 Transmitter block. For receiving data, use the comm.SDRRxFMCOMMS5 System object or the FMCOMMS5 Receiver block. You can specify the number of channels in use with the Channel mapping parameter for blocks and with the ChannelMapping property for System objects. Specify the number of channels as one of the following options:

  • Integer from 1 to 4 — The integer value indicates which single channel is in use.

  • [N M], where N and M are distinct integers from 1 to 4 — Channels N and M are in use.

  • [1 2 3 4] — All four channels are in use.

The RF chip of the radio hardware determines the number of channels you can use for sending or receiving data. For the FMCOMMS5, two AD9361 RF chips are used to provide support for four channels. The channels specified by 1 and 2 are situated on the first AD9361 chip. The channels specified by 3 and 4 are situated on the second AD9361 chip. Using multiple channels across the two chips has certain limitations. For more information, see Multiple Channel Synchronization for FMCOMMS5.

The following examples show how to send and receive data on four channels with an FMCOMMS5 radio hardware using System objects. The steps for sending and receiving data with an FMCOMMS5 radio hardware on a single channel or two channels are similar to the steps outlined for the AD9361 radio hardware in Channel I/O Using AD9361.

Transmit Data on Four Channels Using System Object

  1. Create a transmitter System object for the FMCOMMS5 radio hardware.

    tx = sdrtx('FMCOMMS5', ...
               'IPAddress','192.168.3.2', ...
               'CenterFrequency',2.4e9, ...
               'BasebandSampleRate',1e6);
    

  2. Set the channel mapping to [1 2 3 4] to indicate that all four channels are in use.

    tx.ChannelMapping = [1 2 3 4];
  3. Create a DPSK modulator System object to modulate the transmitted signals.

    mod = comm.DPSKModulator('BitInput',true);
    
  4. Transmit data. Because four channels are in use, create a four-column vector using modSignal.

    for i = 1:5
       data = randi([0 1],30,1);
       modSignal = mod(data);
       tx([modSignal modSignal modSignal modSignal]);
    end
    
  5. Release the System object.

    release(tx);

Receive Data on Four Channels Using System Object

  1. Create a receiver System object for the FMCOMMS5 radio hardware.

    rx = sdrrx('FMCOMMS5');
    

  2. Set channel mapping to [1 2 3 4] to indicate that all four channels are in use.

    rx.ChannelMapping = [1 2 3 4];
  3. Receive data. Because multiple channels are being used, the number of columns returned in data is 4.

    [data,validData,overflow] = rx();
  4. Release the System object.

    release(rx);

See Also

Functions

Blocks

Objects

Related Topics