Kevin Olalde wrote: > Andrew, thanks for the shorter version. Obvious now that one sees > it. Got in my head I wanted to roll carry, duh. You're welcome, Kevin. I'll bet that if you search the piclist archives for the phrase "obvious now", you'll get hundreds (if not thousands) of hits. Nothing to feel bad about. > Being completely green here, what else is needed in a decode routine > before it qualifies as Manchester decoder? Well... Depends on why you're doing Manchester in the first place. For starters, you'd want to check the even-numbered bits to make sure that they were valid (i.e., complements of the odd-numbered bits). One way would be: RADIX = DEC RRF TEMP,W ;Copy temp's odd-numbered bits to W's ;even-numbered bit positions. XORWF TEMP,W ;Each even-numbered bit of W holds "1" ;if temp's odd bits are complements of ;temp's even bits. XORLW 11111111B ;Now, each even-numbered bit of W holds ;"0" if temp's odd bits are complements ;of temp's even bits. ANDLW 01010101B ;Mask off all but W's even bits. BNZ INVALID ;If any of them are non-zero, the word in ;temp was not valid. Jump. > Again, this is close to my first time out (not my field, just > playing). I included the conversion of my transmitted data to > this Manchester scheme to help with transmission errors I was > seeing using some Liapac 433Mhz modules. The encoding certainly > seemed to help reduce errors. Are you using a standard UART to transmit and receive your data? If so, my guess is that errors were reduced because your receiver's frequency response (for whatever reason) isn't wide enough to reliably decode a long string of 0's. Manchester encoding ensures that your transmitted pulses are no longer than two bit-times wide. By the way... If your transmitter was designed to use a "real" (i.e., short duty-cycle) one-meter-band encoding scheme, and if you ARE using a UART to encode your data, your average transmit power is probably WAY too high to be FCC-legal. -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu