/*
Mirror byte for PIC12/14/16
For PIC18 will not work
*/
#bit _C=STATUS.0
#define _RLF_F(data) #asm rlf data,F #endasm
#define _RRF_F(data) #asm rrf data,F #endasm
int8 MirroByte(int8 value) {
int8 i,mirror;
i = 8; mirror = 0;
do {
_RLF_F(value);
_RRF_F(mirror);
} while( --i );
return mirror;
}
/*
For PIC18 change _RLF_F & _RRF_F to
#define _RLCF_F(data) #asm rlcf data,F #endasm
#define _RRCF_F(data) #asm rrcf data,F #endasm
*/
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sat Oct 15, 2005 2:39 pm
Quote:
is search simply methode to mirored a byte ex:
This is almost certainly a student-type question, which has been
answered before. So you can find it with the forum's search engine.
Just don't search for a word like "mirrored". Use more common
words in the search string, such as: Reverse bits
Then set it to "Search for all terms".
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum