Bit Masks and the SC Parameter

For the SC parameter:
The selection of channels is set by use of the SC (Scan Channels) parameter.  This is a bitmask. 
By setting the bitmask, you can force a choice of either a range of channels, or select just one
of the bits in the mask to force the channel to one particular setting.  
Below is an example of
the SC parameter default setting, and how the bitmap is displayed across the channel. 
The channels are listed across the bottom, the binary bitmask determines which channel is
included in the bitmask.  The SC setting is then the hex representation of the binary channel
bitmask.

 
SC Setting (Hex) 1FFE
Bit-Mask (binary) 0001111111111110
Channel (hex) 1A19181716151413121110FEDCB

So, following the bitmask, if it was desired to force the channel to a particular channel, say channel x17,
the x17 bitmask would be enabled, and all others would be set to zeros, giving the final
SC Setting to: x1000.


Note:  Any change to the SC setting, will cause the node to leave the previous network and attempt to
join a new network on the newly established channel.  
For a single channel, set the SC parameter
accordingly using the chart below.

 
Channel*
(hex)
SC
(hex)
Frequency
(GHz)
BitmapXBee ZNet
2.5/ZB
XBee ZNet
2.5/ZB PRO
B12.4050000 0000 0000 0001x 
C22.4100000 0000 0000 0010xx
D42.4150000 0000 0000 0100xx
E82.4200000 0000 0000 1000xx
F102.4250000 0000 0001 0000xx
10202.4300000 0000 0010 0000xx
11402.4350000 0000 0100 0000xx
12802.4400000 0000 1000 0000xx
131002.4450000 0001 0000 0000xx
142002.4500000 0010 0000 0000xx
154002.4550000 0100 0000 0000xx
168002.4600000 1000 0000 0000xx
1710002.4650001 0000 0000 0000xx
1820002.4700010 0000 0000 0000xx
1940002.4750100 0000 0000 0000x 
1A80002.4801000 0000 0000 0000x 

You can also specify multiple channels for the module to choose from. For example, if you wanted
to use only channels 12, 13, and 14, you would add all the corresponding bitmaps together.


0000 0000 1000 0000 + 0000 0001 0000 0000 + 0000 0010 0000 0000 = 0000 0011 1000 0000 =
0x0380


Thus, setting the SC parameter to the value x380 would specify to the radios to only join
channel x12, x13, or x14.
Along with the IC and SC parameter, bit masks are used for parameters
A1, A2, PR,  the XBee 802.15.4 module.


For the IC parameter:
If you wanted to enable change detect on DIO1 then you would set IC to 0x2 (hex value of 2).
This is equivalent to binary 0000010.  In the binary bit field the second position from the right
represents the DIO1 (the farthest right being DIO0).
If you look over this example:


http://knowledge.digi.com/articles/Knowledge_Base_Article/Digital-and-analog-sampling-using-XBee-radios/?q=DIO&l=en_US&fs=Search&pn=1

you will notice that IC is set to 0x18 whose binary equivalent is 00011000.  This corresponds to
DIO lines DIO3 and DIO4 (parameters D3 and D4).

Mapped out it would look like this:
0    0     0    1    1     0     0     0
D7 D6 D5  D4  D3  D2  D1  D0
Last updated: Aug 23, 2018

Filed Under

GatewaysRFRF Dev kits

Recently Viewed

No recently viewed articles

Did you find this article helpful?