> I need a routine that returns a random number to implement something similar > to CSDMA/CD. I need it to make a random wait time after a collision, i've > seem some routines but how do i get different seeds to inicialize the > routine ? Hmm... depending upon the number of nodes in your system and how they're powered you /may/ have a problem. While using a timer to seed your RNG is a nice concept, it won't do much good if several PICs happened to choose the same seed (as would be quite possible if all the machines were powered on simultaneously). If the seeds happen to match, it doesn't matter how many times you cycle the RNG; all the "random" numbers are going to match as well. In many network topologies, a node's address is used to seed the random-delay routine (or else simply sets a fixed delay duration). Would such an approach be feasible for you? If every node has a unique address, that would provide a good way of producing the "random" delays without the "bad" cases you could get with a timer-seeded RNG.