diff --git a/T&I.md b/T&I.md new file mode 100644 index 0000000..e121499 --- /dev/null +++ b/T&I.md @@ -0,0 +1,27 @@ +# Timers and Interrupts +In this guide we will board **Timers** and **Interrupts**, what are they and how they are used. + +## Timers + +Timers are simple counters at some frequency, they are used to keep a record of time for different events occurring and are usually an 8-bit register (Figure (b) +that can count the number of digital pulses applied to its input, whose values start from 0 and +goes all up to 255, and when it reaches its maximum it returns to 0 and repeats the process +all over again, unless an interrupt is used. + + +![Timers](https://user-images.githubusercontent.com/70351137/136104394-70303848-497d-470b-a02d-509f4138139a.png) + +- In Figure (a), each stage outputs one pulse for every two pulses which are input, +so the output pulse frequency is half the input frequency for each stage. Therefore the timer can +be viewed as a binary counter of frequency divider, depending on the application. + + +## Interrupts + +Interrupts cause a break in a continuing process which are generated by an internal or external asynchronous +event and the interrupt signal can be received at any time during the execution of the mein process. When this +happens the processor stops, handles the interrupt and then it resumes to its normal work, this is also called +‘interrupt service routine (ISR). +- For example, when you press a key from your keyboard or move the mouse on a PC, +an interrupt signal is sent to the processor from the keyboard interface to request that the key be read in, or +the mouse movement transferred to the screen. \ No newline at end of file diff --git a/Timers&Interrupts.md b/Timers&Interrupts.md new file mode 100644 index 0000000..65a43df --- /dev/null +++ b/Timers&Interrupts.md @@ -0,0 +1 @@ +#Timers and Interrupts