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 ____?


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:
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:

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

ahh, got it

Thanks for your help