5/2/2023 0 Comments 8051 timer calculation![]() That means for an 8051 running at 12MHz, the timer clock input will be 1MHz. In 8051, the oscillator output is divided by 12 using a divide by 12 network and then fed to the Timer as the clock signal. When the counter is running on an external clock source (may be a periodic or aperiodic external signal) it is called a “Counter” itself and it can be used for counting external events. ![]() When the counter is running on the processor’s clock, it is called a “Timer”, which counts a predefined number of processor clock pulses and generates a programmable delay. Delay using timer is the most accurate and surely the best method.Ī timer can be generalized as a multi-bit counter which increments/decrements itself on receiving a clock signal and produces an interrupt signal up on roll over. Generating delay using pure software loops have been already discussed here but such delays are poor in accuracy and cannot be used in sensitive applications. The 8051 microcontroller has two independent 16 bit up counting timers named Timer 0 and Timer 1 and this article is about generating time delays using the 8051 timers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |