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

shift right and left
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
andrewg



Joined: 17 Aug 2005
Posts: 316
Location: Perth, Western Australia

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

PostPosted: Wed Aug 19, 2009 7:06 am     Reply with quote

Ttelmah wrote:
What is annoying in the CCS _shift_ functions, is that they don't allow direct access to the bit shifted out.

It's the returned value!? And perfect for implementing an LFSR Smile
_________________
Andrew
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Wed Aug 19, 2009 7:55 am     Reply with quote

I'm inclined to say, if you understood the code I posted yesterday, you can easily figure out a 4-bit rotation. Generally people here are ready to help, but we want the help to be in the form of increasing your understanding, not doing all the work for you.

But if you need a hint:
You must test a different bit. And you also need to add one line, in order to leave the correct value in the register.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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