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

Random Number Generator for PICs?

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



Joined: 29 Nov 2004
Posts: 4
Location: PA

View user's profile Send private message Send e-mail Visit poster's website

Random Number Generator for PICs?
PostPosted: Thu Dec 02, 2004 8:54 am     Reply with quote

Anybody Know anything about, or where I can find pseudo-random number generator function(s) for a pic? Thanks

Chris
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Dec 02, 2004 8:59 am     Reply with quote

Check the manual:
Quote:
RAND()


Syntax:
re=rand()



Parameters:
None



Returns:
A pseudo-random integer.



Function:
The rand function returns a sequence of pseudo-random integers in the range of 0 to RAND_MAX.



Availability:
All devices



Requires
#include <STDLIB.H>



Examples:
int I;

I=rand();



Example Files:
None



Also See:
srand()


Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Thu Dec 02, 2004 4:55 pm     Reply with quote

Check out this post for pseudo random binary stream:

http://www.ccsinfo.com/forum/viewtopic.php?t=17267
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