ON and Off are reserved words so change them, I added another letter to their ends, no NIB var type, so change to BYTE variable, Now In12,13 14 . . . must be aliases for ports, your choice, I tried portB pins and it all compiles.