srand() % 10
I have been trying to produce a random number between 0 and 9 by using srand() function. However; when I watch it on MPLAB, I see that it produces the same number each time. What may be the problem?
Do you have any idea on how to generate random numbers using C? By the way, the device is 12F675.
Any comment would be greatly appreciated. Thanks in advance.