1
00:00:03,460 --> 00:00:03,880
Hello.

2
00:00:04,090 --> 00:00:11,140
So in this final section we are going to talk about how to create interrupt without timers.

3
00:00:11,320 --> 00:00:20,280
So I should point out we are creating an entirely new cookbook series for interrupt on the call text.

4
00:00:20,320 --> 00:00:27,630
And with that cookbook series we are going to give a detailed explanation tutorial for interrupt to

5
00:00:27,640 --> 00:00:35,170
what we are going to do here and this cause is a very very short summary of interrupt.

6
00:00:35,190 --> 00:00:42,790
What time is I don't by any means expect you two to understand the intricacies of interrupt from this

7
00:00:42,790 --> 00:00:50,100
lesson but it's just a short course a short tutorial to show you how to create timer interrupt.

8
00:00:50,140 --> 00:00:55,710
So before we start I'll just give you an overview of interrupts for people who don't know what interrupt.

9
00:00:56,590 --> 00:01:01,740
So over here we have a picture of a person waiting for the phone to ring.

10
00:01:01,990 --> 00:01:03,000
Right.

11
00:01:03,070 --> 00:01:09,300
Interrupt versus pull in so a single microprocessor can save several devices.

12
00:01:09,300 --> 00:01:12,790
As we know that and yet two ways to do that.

13
00:01:12,790 --> 00:01:20,680
You can use interrupt or you can use pull in in the interrupt method whenever any a device needs a service

14
00:01:21,090 --> 00:01:28,540
that device notifies the CPA you by sending it an interrupt signal upon receiving an interrupt signal

15
00:01:28,580 --> 00:01:36,730
to see you interrupt whatever it is doing says the device the program associated with it interrupt is

16
00:01:36,740 --> 00:01:42,200
called the interrupt service routine or the interrupt handler in Poland.

17
00:01:42,250 --> 00:01:49,350
The CPSU continuously monitors the stages of a given device when the status condition is met.

18
00:01:49,360 --> 00:01:51,700
It performs the service.

19
00:01:51,730 --> 00:01:57,230
After that it moves on to monitor the next device until each one is serviced.

20
00:01:58,180 --> 00:02:02,640
So look at this bunch here waiting for the phone to ring.

21
00:02:02,770 --> 00:02:06,830
You can take this man as the CPSU right.

22
00:02:06,850 --> 00:02:09,490
How do we operate in our daily lives.

23
00:02:09,520 --> 00:02:17,260
We go about our lives read a book watch a movie or do whatever you doing when the phone rings.

24
00:02:17,320 --> 00:02:22,630
Then you pick up the phone to ring tone of the phone is the interrupt signal.

25
00:02:22,630 --> 00:02:23,200
Right.

26
00:02:23,230 --> 00:02:28,360
But in this picture we have a person sitting and waiting for the phone.

27
00:02:28,380 --> 00:02:31,040
A person looking at a phone to ring.

28
00:02:31,150 --> 00:02:32,880
This is Poland right.

29
00:02:33,400 --> 00:02:39,770
This man is practically pulling the phone to ring rather than going about his daily life.

30
00:02:39,820 --> 00:02:43,450
Wait until he had to rent one and then pick up the phone.

31
00:02:43,540 --> 00:02:43,810
Right.

32
00:02:43,810 --> 00:02:51,970
So that is the difference between interrupt and pull in and which polling a lot of CPSU is wasted because

33
00:02:51,970 --> 00:02:57,810
the CPE would always have to check and monitor the status of a given device.

34
00:02:57,880 --> 00:03:04,930
And if you have many devices the CBI has to monitor each and every one of them and see what the condition

35
00:03:04,930 --> 00:03:12,670
is met or not met whereas Yeah the resources that particular CPE resources could be put to better use.

36
00:03:12,760 --> 00:03:15,370
So this is where interrupt comes in.

37
00:03:15,370 --> 00:03:23,770
And often we implement polling by using if statement like if a is less than beat and do this if it is

38
00:03:23,770 --> 00:03:33,100
greater than this if pin B is high or if this or if that's often performed poorly in this way.

39
00:03:33,520 --> 00:03:42,340
So we'll go ahead and go to you vision and write our interrupt program and create to interrupt service

40
00:03:42,340 --> 00:03:49,220
routines and let the let the program run automatically whenever they interrupt Cass.
