2008-07-23 11:05 AM
2008-07-23 11:05 AM
Hi,
there are some libraries for generate random integer? Now I have used srand() and rand() of Hiware. srand() setting start value. rand() generate random integer binded of start value. star value = ADC1 + ADC2 ADC1= humidity sensor ADC2= temperature sensor This not very good algorithm :-[ Other solution? Thanks I use ST325K6. Bye2013-12-15 09:14 PM
I posted this to another thread about random numbers but since you're looking:
This code uses hardware on the stm32f103 to generate true random numbers without having to add any new hardware: http://www.gniibe.org/memo/development/gnuk/rng/pqrng You probably can't use this directly but should be pretty easy to modify for your needs.