Simple question, arduino has a 16.000hrz oscillator.
I got that is used to take time quite precisely.
Since i''m making a project that needs time precision(not that much really).
Is the crystal activated or read trough some command or is allways used even with delay mills and micros?
Thank you for the answer!!Sorry for noob question.
The answer for us noobs: every microcontroller (every computer) needs an oscillator.
By default it's simply working (at 16 MHz on an Arduino UNO).
It's always used, especially for delays and millis and micros and such functions.
There are a couple of internal timers, triggered by that external oscillator, controlling those and other internal timing functions.
There are incredible tricks possible, not to use a crystal but create oscillations differently, use a different fequency, or change how the internal timers work.
There's an important difference in terminology: It doesn't give you "The Time", it's for timing.
If you're looking for calendar functions (date and/or time), you need a real-time clock (RTC). This is not included in most of the Arduino and clone boards out there.
The crystal (or resonator) is responsible for providing the frequency at which the CPU runs. It ticks 16 million times a second, and with each, the CPU performs an instruction. Without the crystal the CPU does nothing at all, so it's always running. (You can use the low-speed internal oscillator, so there may not be a visible crystal on the board anywhere -- but it's still there, inside the chip.)
Some people implement a clock without a crystal, by counting the number of CPU ticks required for a second, and then the number of seconds in a minute, and minute in an hour (and so on). This works, but it doesn't remember the time when the board is powered off or reset (an RTC does), nor does it continue to run.
Furthermore, since crystals are affected by temperature, you have to somehow compensate for that if you want the time to remain precise. The better RTCs out there do this as well.