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 Channels

USRP® E310

USRP® E312

AD93612

Channel I/O Using AD9361

You can send or receive data using a single channel or you can use both channels. The following examples show how to send and receive data using System objects.

Transmit Data on Single Channel Using System Object

  1. Create a transmitter System object™ for the USRP®[1] E3xx embedded series radio hardware.

    tx = sdrtx('E3xx', ...
               '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 USRP® E3xx embedded series radio hardware.

    rx = sdrrx('E3xx');
    

  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 USRP® E3xx embedded series radio hardware.

    tx = sdrtx('E3xx', ...
               '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 USRP® E3xx embedded series radio hardware.

    rx = sdrrx('E3xx');
    

  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);

See Also

Functions

Blocks

Objects

Related Topics


[1] USRP, USRP2, UHD, and Ettus Research are trademarks of National Instruments Corp.