Jump to content

Pic 18 Rand Function

Recommended Posts

boostC compiler and linker 2.0.1 beta (for PIC 18)


Using sample randtest.c code with the rand.pic.18 library.


rand function returns the same value each time. The pic.16 version works fine, it appears.


Sample code provided with the distribution produce 0xA5A5 every time rand is

called in the sample program (seed unchanged and is initialized to 0x1234)


Changing the seed produces a different result from the call to rand, but it is still the same each time rand is called.





Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...