I don't have enough time to code it, but you can use a set of macros to redefine ports. The macro can mask the 6-bit value and apply the appropriate bit value to the port pin (GPIO). You can also use a subroutine to save some code space. Hedge Smith wrote: > > I would like to remap the port pins on a 16F84 and sort of define a pair of ne w ports. > > I have a project that requires two 6 bit ports, which means that PortB must be split between > one port and another, in addition to that I need PB0 as an external INT. > > Is it possible to equate a new name to a list of port pins like > > outport1 equ {a0,a1,a2,a3,a4,b7} > outport2 equ {b1,b2,b3,b4,b5,b6} > > That's obviously not correct syntax, but you get the gist of what I want to do . > > I am trying to use C2C, if that makes it easier, and I would ultimatly like t o be able to do > something like > > outport1_out( 110110b ); //send some output to outport1. > (I would obviously have to write thi s function as well) > > Is this possible, easy, advisable? Is there a better way. > > Many thanks for your help and ideas. > > Jon > > ______________________________________________________________ > Get Your Free E-mail and Homepage at http://www.prontomail.com -- Jason ======================================== E-Mail: milsumai@execpc.com ICQ # : 12978762 ======================================== .:::. ,,, _(- -)_ / ( ) \ \_/ : \_/ |_/ \_| | | | -TRY PRAYER-