Simple Clarification on Change Detect Setting (IC)

So I’m a big time newbie but I’m slowly getting it. I need to enable change detect on one of my lines but I’m having trouble getting my head around the setting.

From the knowledge base

“To enable Change Detect set IC to the Bit mask of the corresponding DIO lines, where DIO0 is the LSB and DIO7 is the MSB.”

Ok great but what does this mean. What is the Bit mask (like I said I’m a newbie). For example if I want to enable change detect on Digital line 1. What would it look like? ATIC ____?

Thanks
Kevin

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://www.digi.com/support/kbase/kbaseresultdetl.jsp?id=2188
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

Sidenote: Along with the IC parameter, bitfields are also used for parameters A1, A2, PR, and SC.

ahh, got it

Thanks for your help