We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all, i have been trying to use the time elapsed by the microcontroller(P89LPC936) as input for my function i write on keil. But is there any stated built in variable name for the time elapsed by the microcontroller? or if that doesn't exist can anyone suggest me any other way to do this? thanking u in advance
WOOF Tin Tin
use a timer
"is there any stated built in variable name for the time elapsed by the microcontroller"
A variable could only give access to something that already exists. Where do you think this "time elapsed by the microcontroller" value is going to come from?
so you are saying i shouldn't be looking for any variable and start looking for other options right?
ya right but i want the input time to be unpredictable coz i want to use it to generate random numbers
if the device you are trying to program is the p89lpc936 itself, you can start the timer once the mcu goes into the state when you start counting the time. when it goes out of that state, you can stop the timer.
you can also use rtc.
if the device you aree trying to program is another mcu that is communicating with the p89lpc936, you can simply follow the communication protocol.
it is really not clear what you are trying to do.
ya right but i want the input time to be unpredictable coz i want to use it to generate random numbers ya right coz the tmr wll rn 4ever nd the # wll b rdm
Do you see how UDDERLY RIDICULOUS your bovine ABUSE of the language is.
Erik
PS if you can decipher the above there is your answer.
start a timer and wait for an asynchronous even to read the time. generate random numbers? You mean generate pseudo random numbers. You can not generate true random numbers in software.