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.
hello
i want to simulate many input signal but i want know how can i choose the swatch time swatch(????)
when i want to one or more signal input thank you
not using it will not delay whatever it is that you are doing - for example, it will not change a signal because the generating function is waiting. what you are asking is very specific to what you are doing. sometimes not waiting will be a problem, some other time not.
WHEN I MUST USE SIGNAL FUNCTION AND WHEN I USE USER FUNCTION?
WHAT IS THE DIFFERENCE BETWEEN TWATCH(100) AND SWATCH(0.000005) ? FCPU=20MHZ
what means twatch (clock) it's wait for 1s or wait for 20000000 states (fcpu=20MHZ)
thank you
You like to shout. Please don't, it affects our hearing...
Have you looked at all the documentation Keil has published about how to write signal functions, and the available statements?
hello yes i have look all keil documents but i don't find what i want
can you answer me for my question posted to the forum without documents thank you
If you have looked at "all" Keil documents, does that mean that you have looked at: http://www.keil.com/support/man/docs/uv3/uv3_debug_functions.htm and still not found the information you want?
THANK YOU FOR YOUR REPLY
BUT I M SORRY ?IT'S NOT MY QUESTION
I DONT KNOW WHEN I NEED TO USE TWATCH AND WHEN I MUST USE swatch ?
WHAT IS THE DIFFRENCE between twatch(100) and swatch(0.000005) WITH CLOCK=20MHZ
THANKYOU
Yes, your screaming monster, it does answer your question if you just care to spend a couple of seconds to read.
swatch says: "The swatch debugger function is used in a debugger signal function to delay until the specified number of seconds has elapsed."
twatch says: "The twatch debugger function is used in a debugger signal function to delay until the specified number of CPU states has elapsed."
Now, between your shouts, try to ponder the following: What happens if you specify your timing in states or in seconds, if you have a processor that changes its clock speed (for example to reduce the power consumption from a battery, while it is waiting for something to do)?
Would it matter then if you count time, or count number of CPU cycles until generating the next external event?
i want know that if i use cycle cpu time or time in second is the same method
i work with clock=20MHZ
so 1 states=50ns
if i take twatwh(100) 100 cyles time -->100*50ns=5000ns
5000ns=0.000005000s
so if i write twatch(100)is the same when i write swatch(0.000005000) ?
dear ABDELAZIZ, that is not the point: the point is that one function is CPU speed dependent, and the other not. in other words - as long as you do not change the operating frequency of your processor the interchanging these function will make not difference. once you do, and want to wait for the same amount of time, you must either use 'swatch' or change the argument for 'twatch'.
shall we that bet his next message will be with CAPS lock on? :-)
please can you tell me if my last question you are agree or not agree for my reflexion
i work with the clock=20MHZ always
thanks
yes you are right.
We don't care about the clock frequency you use.
We expect you to use your brain. If you don't accept - or believe in - our answers, don't repeat your question again and again.
What is the difference between generating an alarm after you have walked one kilometer and generating an alarm after 1000 steps? The difference depends on how long steps you take... Isn't that quite obvious?
What is the difference between generating an alarm after you have walked one kilometer and generating an alarm after nine minutes? That depends on how fast you walk...
What is the difference between generating an alarm after you have walked one kilometer and generating an alarm after you have burned 60 kcal of energy? That depends on how heavy you are and how fast you walk and how well trained you are.
When you go to a gym and decide to run on a band or maybe use a rowing machine, you have multiple choices. Let the machine tell you that you are done after a fixed time, a fixed distance, a fixed number of steps, a fixed amount of energy...
If you still don't understand the difference between counting CPU ticks and measuring time in seconds, we really can't help you.
thanks a lot
i understand this but i have a target program and i take a debugger program to simulate my target program
so i simulate many kind of wave for alternator so when i write my function at the end i need to use swatch or twatch to let my target program execute
so i want know how can i choose my time to be sure that is the good i hope that you understand me because i cant take any time in my twatch or swatch
thanks my freind and i m sorry