CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

miror byte

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tophe59



Joined: 13 Oct 2005
Posts: 32
Location: France

View user's profile Send private message

miror byte
PostPosted: Sat Oct 15, 2005 12:26 pm     Reply with quote

hi,

is search simply methode to mirored a byte ex:

0b 0011 1011 ---> 0b 1101 1100

Thank's Very Happy
pirev



Joined: 19 Mar 2005
Posts: 13
Location: Bulgaria

View user's profile Send private message Visit poster's website ICQ Number

PostPosted: Sat Oct 15, 2005 12:54 pm     Reply with quote

Code:

/*
   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

View user's profile Send private message

PostPosted: Sat Oct 15, 2005 2:39 pm     Reply with quote

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".

Here are some typical results. If you use the search engine
you can easily find the answers.
http://www.ccsinfo.com/forum/viewtopic.php?t=23356&highlight=reverse+bits
http://www.ccsinfo.com/forum/viewtopic.php?t=8375&highlight=reverse+bits
http://www.ccsinfo.com/forum/viewtopic.php?t=23364&highlight=reverse+bits
tophe59



Joined: 13 Oct 2005
Posts: 32
Location: France

View user's profile Send private message

PostPosted: Sun Oct 16, 2005 1:27 am     Reply with quote

Thank Pirev and PCM.

Next time i'll search before Wink
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group