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)   1 F F E
Bit-Mask (binary)   0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0
Channel (hex)   1A 19 18 17 16 15 14 13 12 11 10 F E D C B


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)
Bitmap XBee ZNet
2.5/ZB
XBee ZNet
2.5/ZB PRO
B 1 2.405 0000 0000 0000 0001 x  
C 2 2.410 0000 0000 0000 0010 x x
D 4 2.415 0000 0000 0000 0100 x x
E 8 2.420 0000 0000 0000 1000 x x
F 10 2.425 0000 0000 0001 0000 x x
10 20 2.430 0000 0000 0010 0000 x x
11 40 2.435 0000 0000 0100 0000 x x
12 80 2.440 0000 0000 1000 0000 x x
13 100 2.445 0000 0001 0000 0000 x x
14 200 2.450 0000 0010 0000 0000 x x
15 400 2.455 0000 0100 0000 0000 x x
16 800 2.460 0000 1000 0000 0000 x x
17 1000 2.465 0001 0000 0000 0000 x x
18 2000 2.470 0010 0000 0000 0000 x x
19 4000 2.475 0100 0000 0000 0000 x  
1A 8000 2.480 1000 0000 0000 0000 x  


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: Oct 16, 2025

Filed Under

GatewaysRFRF Dev kits

Recently Viewed

No recently viewed articles

Did you find this article helpful?