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
ABDELAZIZ, Can you explain what you want to do? What do you mean by i want know how can i choose the swatch time swatch(????) ?
HELLO
I WANT TO SIMULATE TWO INPUT SIGNAL (SINUSOIDALE) ALTERNATIF VOLTAGE
SO WHEN I SIMULTE THE FIRST AND I TAKE SWATCH(0.000001) I RECEIVE THE JUST VALUE BUT WHEN I ADD THE NEXT SIGNAL WITH THE SAME SWATCH LIKE THIS
VOID SIGNAL MAIN() { MONO(); TRI(); SWATCH(0.000001) }
I RECEIVE THE GOOD VALUE OF MONO AND NO JUST VALUE FOR TRI AND WHEN I TAKE SWATCH(0.005) I RECEIVE THE JUST VALUE
IT'S FOR THIS REASON I WANT KNOW HOW CAN I FIXED EXACTLY THE SWATCH TIME THAT MEANS I DELAY BY WICH NUMBER OF SECOND TO OBTAIN THE GOOD VALUE OF TWO SIGNAL
first: please turn off your CAPS lock. second: please define "JUST VALUE" vs. "NOT JUST VALUE".
ok i am sorry for caps look
my question is
what is the difference when i write swatch(0.000001) and swatch(0.005)
and what is the impact for the target program thank you
swatch is a delay function, so swatch(0.005) waits for 5 milliseconds while swatch(0.000001) waits for 1 microsecond.
THANK YOU
YES I AGREE WITH YOU BUT WHEN I TAKE SWATCH(0.005) to delay 5ms so why i need take swatch
and what's the probleme when i not write it
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? :-)