Hello all,
I've some problems with the FillRandom function on the Xmega256A3U.
It is always given the same random bytes...
I added following to my program:
from System import Processes, Tasks, Pipes, Longint, Float, Random;
type tCode = array[0..5]of byte;
var Code : tCode;
FillRandom(@Code,SizeOf(Code));
If I look with the simulator (but also in the project with the xmega) the results of 'Code' are 6 random bytes. So far so good. But every time I run the program, it are the same 6 bytes.
I also tried to add the function RandomSeed($1234) before it. This will give 6 other random bytes but also this time they never change when I re-run the program.
I would expect to have every time other bytes? What is it I do wrong :dontknow:
Thanks a lot for some helping;)
I've some problems with the FillRandom function on the Xmega256A3U.
It is always given the same random bytes...
I added following to my program:
from System import Processes, Tasks, Pipes, Longint, Float, Random;
type tCode = array[0..5]of byte;
var Code : tCode;
FillRandom(@Code,SizeOf(Code));
If I look with the simulator (but also in the project with the xmega) the results of 'Code' are 6 random bytes. So far so good. But every time I run the program, it are the same 6 bytes.
I also tried to add the function RandomSeed($1234) before it. This will give 6 other random bytes but also this time they never change when I re-run the program.
I would expect to have every time other bytes? What is it I do wrong :dontknow:
Thanks a lot for some helping;)