David Meiklejohn gooligum.com.au> writes: > So I've ended up with a compromise. I define macros for individual pins > like this, and/or for the shadow equivalents of them, but not TRIS - or > others such as enabling pull-ups or interrupt on change (it can go on and > on). Instead I keep all port configuration in a single initialisation > routine. So, if a pin assignment changes later, I only need to make two > changes - a macro at the start of the program, and in the initialisation > code - which could be much more than changing one TRIS expression. Maybe > the new pin has an analog input that has to be disabled, while the old on= e > didn't. It's good to know how other people do it. I have come to exactly the same practice (although I do not have to teach others PIC programming). I also = put all pin definitions in an include file, and provide description of pin functions, so that even without looking at the schematics, it is clear what= a pin does.=20 Regards,=20 Sergey Dryga http://beaglerobotics.com --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .