Laurence Evans wrote > > I am trying to develop a programme the takes packetized data from > the inbuilt UART of the 16F877 which can be anything up to 100 > bytes long and then re-packetize it to be sent using a four bit > nibble to another PIC but these packets can be up to 27 bytes long. > I have to re-assemble the origonal packets at the other end of the > link as well. > > Does anyone know the easiest way to re-format packetized data?? > The approach I would take is to not bother re-format the data but to wrap the packetised data in another packet (or in your case several packets). Reassemble the original packet at the end of the link and then disassemble that packet which will then reveal the data. Of course it's not the most efficient use of bandwidth but then bandwidth is cheap and virtually unlimited these days. Two things. You fail to define the characteristics of your Physical Layer and the minimum end-to-end performance expected from the system. This of course has more than a slight bearing on the best approach. Secondly, why are you breaking up your byte formatted packets into nibbles to put them into byte formatted packets ? It seems an unnecessary overhead I can understand you breaking them up to put them into nibble orientated packets. Regards Chris Carr -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics