Ok, this is half EE, half PIC. I'm designing a circuit that uses a 4 bit data bus (plus a few flow control lines) to transfer some values between a 16f877 and a Scenix SX28 chip. I'd like to put these chips close together to avoid long PCB traces. I don't have to use specific pics to transfer the data, but ideally it I could get 4 pins to line up between the two chips ie, RA0-RA0, RA1-RA1, RA2-RA2, RA3-RA3. That way all the data I transfer is correct LSB-MSB without having to do some sort of software translation on it. However, all is not going quite so easily. Both chips use a similar numbering convention, so pins on the left of the chip increase in value as they go down, and pins on the right increase as they go up. For example: RA0 |\/| RB7 RA0 |\/| RB7 RA1 | | RB6 RA1 | | RB6 (these are just for RA2 | | RB5 RA2 | | RB5 illustration only) RA3 | | RB4 RA3 | | RB4 etc So things don't line up nice. I'd like to avoid a huge copper trace spider's web trying to fix that. I'd even thought about rotating one chip 180degrees, but the problem remains. So my questions. Short of putting one chip on top of the board and one on the bottom, can anyone think of an easy solution? Secondly, does anyone have a routine for reversing the order of bits in a byte? If I transfer data and it ends up MSB-LSB order swapped, what is a good way to swap it back? I could just use a bunch of btfsc's I suppose. Thanks, Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body