>> This leads to problems when >> mistakes are made when associating a particular bit to the wrong >> register. Don't laugh - I've spent a lot of time helping to troubleshoot >> programs written by others and that has been a surprisingly common >> mistake. ...... >By the way, we very rarely need to look into a Microchip PIC inlude file. >These are just included and otherwise not thought about much. I usually >program special function register bits while looking at the register >description in the manual. The bit names in the include files are >deliberately the same as the ones in the manual. I've had to peek into the >PIC include files in rare cases to see what they called something when the >name in the manual is the same as an instruction or other keyword. For >example the OPTION register is really called OPTION_REG. Sometimes you also >get an assembly error because you've accidentally chosen the same symbol >name as something in the include file you weren't using. I would agree with this method. My bench gets littered with printouts of the register pages so I can get the bit names correct, but I never go looking in the include files to find them. very occasionally there is a spelling error somewhere, and it is necessary to check the include file for that particular bit, but this is extremely rare. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads