Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions T&I.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions Timers&Interrupts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#Timers and Interrupts