John De Villiers wrote: > I need help with MPLAB. > > Im busy with a cicuit design and at the same time im writing the code for > it. With some of the i/o lines i havent decided on what ports they should go > yet. > > At the moment my code looks something to the effect of > > bsf porta,0 > bcf porta,1 > > Is there a way i can define names for porta,0 and porta,1 so that in the > code i can use the names, instead of the pin names? Sure! Declare constants for the pin numbers. Plug1 EQU 0 Plug2 EQU 1 Plug3 EQU 2 etc.... Then you code can be: BSF PORTA,Plug1 BCF PORTA,Plug2 > Then if i move something > around, all i need to do is change the name -> pin assignment and recompile, > instead of searching all the code for porta,0 etc. > > Regards > John > > PS - does anyone know off-hand what the length (time) of a spark is in a > vehicle with electronic ignition ? -- Thomas C. Sefranek WA1RHP ARRL Instructor, Technical Specialist, VE Contact. http://www.harvardrepeater.org http://hamradio.cmcorp.com/inventory/Inventory.html