I am working on a 16f887 project in Hitec C which will use many output=20 pins. I #define LINE1 RA0 #define LINE2 RA1 etc which gives me a readable code. The program is basically if ... LINE1 =3D ON; if ... LINE2 =3D ON; With the few output connections that I am starting with I just repeat=20 the code for each output line, but I am amplifying to 24 lines, which=20 makes for a rather massive code. Also, the "if" part will grow with time=20 as I add more sensors Is there a way to handle the RA0 RA1... bits in C with a loop? This=20 would simplify the code for me. Goran Canary Islands --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .