There are seventy eight-bit numbers with exactly four 1's which means that you can send 6 bits per byte. This may require a larger table though (e.g. 64 entries for encode table and 256 entries for decode table). If you are sending only 4 bits per byte, you may have more evenly spaced combinations such as Olin's 4 complement bits idea but interleaving the data and the complement bits. Tal > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Olin Lathrop > Sent: Friday, September 12, 2003 4:17 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]:Manchester Lookup table > > ... Assuming the above is correct, you then decided to use > manchester encoding on the 8 data bits because this is known > to produce an equal number of 1s and 0s over short intervals. > This is the part that doesn't make sense. There are lots of > ways to encode 4 bits into 8 so that there are always 4 0s > and 4 1s. I doubt the RF receiver will have a problem if the > signal averages to 1/2 over an 8 bit interval instead of a 2 > bit interval. Why not just send the 4 bits in the low nibble > and the complement of the bits in the high nibble? This > makes both encoding and decoding trivial. I have done > exactly this with RF communication, and it worked fine. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body