if we see in arduino we have crystal oscillator in its board.it produce square wave of frequency about 16 mhz or something else.My question is how it would be related to input.explain me basically with some examples.thank you in advance
this is what i exactly mean if we write a code to off some thing after 5 seconds.it will calculate time from oscillator.it off after16mhz*5 cycles am i right.please someone come forward.i am in little choas
Those generic questions are better served reading the basics of digital techniques. While a datasheet is not going to mention all the basics, google for it and then read a datasheet to complement.
As an example, when you tell the Arduino by code to delay(1000);, the compiler lets the guts of the chip know to count 16 million clock cycles while doing nothing else.
Typically, there are some numbers of clock cycles per delay. So, for example, if you want to delay 5ms, your clock is 16mhz and there are 4 clock periods per delay count:
delay = count*clock_per_count*clock_period
substituting some numbers:
5ms = count*4*(1/16e6) or count = 5ms*16e6/4 = 20,000.