> = > The thing is PB1 is a constant indicating pin number, and it was shifting > the 1 PB1 times to the left and then ANDing it to PINB. > = > Just a missreading > = > THANKS!! > = Which proves the fact that in order to write maintainable code it is very = important to choose a meaningful name for variables and constants. The original author actually did manage half way since he in fact provided = a = way to easily change both the port and pin for a function in one place - th= e = header file. I would have used macros, though. /Ruben =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124, 200 39 Malm=F6, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist