1
00:00:00,180 --> 00:00:06,630
Let us try to modify this school says that we are able to bring the values that we have in account the

2
00:00:06,640 --> 00:00:11,670
right to, we already know that there do exist an EPA which could be used to bring the current value

3
00:00:11,670 --> 00:00:12,240
of attainment.

4
00:00:12,800 --> 00:00:19,350
To what we will do is since to understand an auto loan to facility outside wildland.

5
00:00:19,350 --> 00:00:23,190
So this will keep our zinc processing system running.

6
00:00:23,460 --> 00:00:23,790
OK.

7
00:00:24,240 --> 00:00:30,870
And then we know that the previous logic that we build is we are checking where the timer is expired

8
00:00:30,870 --> 00:00:31,260
or not.

9
00:00:31,620 --> 00:00:35,430
And then we are pretending that we will teach you a delay of five second rate.

10
00:00:35,460 --> 00:00:41,350
So let me just go ahead and modify the logic of it, Rachel here.

11
00:00:41,880 --> 00:00:48,420
When our timer is not expired, so whatever we write in this curly braces says this belongs to a while

12
00:00:48,430 --> 00:00:51,090
Duke will be executing right?

13
00:00:51,270 --> 00:00:53,760
So go ahead and add some delay first.

14
00:00:53,760 --> 00:00:59,220
So usually basically allow us to generate the delay microsecond, Rachel.

15
00:00:59,430 --> 00:01:05,100
Let me just add value says that we are able to get the deed in a millisecond, right?

16
00:01:05,100 --> 00:01:08,240
So to get the millisecond, we need to add a thousand to three zero.

17
00:01:08,580 --> 00:01:14,670
And it is do we bring the values at an interval of one hundred millisecond rate, so just died at 100?

18
00:01:15,060 --> 00:01:17,910
This will give us a delay of hundred milliseconds.

19
00:01:18,030 --> 00:01:25,500
So each new value that will be printing from a counter will be after an interval of 100 millisecond

20
00:01:25,500 --> 00:01:28,710
because we are generating a five second rate.

21
00:01:28,710 --> 00:01:29,010
So.

22
00:01:30,020 --> 00:01:37,180
We'll go ahead and try to first look for a function that gives us our readiness to counter current Valerie.

23
00:01:38,370 --> 00:01:44,550
So here we have a function to get the count value right, and this basically returns, you did right,

24
00:01:44,550 --> 00:01:46,840
so here you could see it returns a new 32.

25
00:01:47,100 --> 00:01:48,360
So we copy this.

26
00:01:48,460 --> 00:01:57,740
We go ahead and let us just add you 32 and and they just leave this as a counter value, right?

27
00:01:58,080 --> 00:01:59,970
And initialize it to unseat.

28
00:02:01,280 --> 00:02:08,240
So while we are waiting for a timer to expire, we'll just be updating Counter-rally that.

29
00:02:09,550 --> 00:02:13,690
The value that has been written by this function, right, so this required.

30
00:02:15,190 --> 00:02:17,110
Instill structure as an argument, right?

31
00:02:17,500 --> 00:02:21,310
So we add and Daimler here.

32
00:02:21,340 --> 00:02:25,030
Right, so this what this will do is this will return the current counter-rally.

33
00:02:26,370 --> 00:02:34,540
Which we will be storing in account available, and then we'll also be printing this value on a console.

34
00:02:34,590 --> 00:02:34,830
Right.

35
00:02:34,830 --> 00:02:43,020
So the current account value of the religious printed in a decimal format, do not forget to add a new

36
00:02:43,020 --> 00:02:48,890
line character, and the variable that is holding the current account value is counter-rally.

37
00:02:48,990 --> 00:02:49,270
Right?

38
00:02:49,770 --> 00:02:56,540
So we'll just be adding this logic right now till the time our timer expires at an interval of hundred

39
00:02:56,550 --> 00:02:57,470
millisecond rate.

40
00:02:57,480 --> 00:03:04,260
So we'll just be adding a comment here just gives us a delay of a millisecond at an interval of a millisecond

41
00:03:04,260 --> 00:03:06,690
will be printing the counter value, right?

42
00:03:06,690 --> 00:03:10,290
So this will also give us an idea about the operation of our timer.

43
00:03:10,290 --> 00:03:12,180
So whether it is going up or down.

44
00:03:12,510 --> 00:03:15,600
So right now, we won't be adding any logic, right?

45
00:03:15,810 --> 00:03:23,640
So here as we are too violent so far, five-second will be waiting over here in this wild loop and as

46
00:03:23,640 --> 00:03:27,040
soon as our timer is expired will be coming out of a wildcard.

47
00:03:27,330 --> 00:03:32,550
If you do not really deliver here, what will happen is this will be executed continuously.

48
00:03:32,550 --> 00:03:34,710
Right outside also will be adding some.

49
00:03:35,010 --> 00:03:38,190
So let's just call this muesli OK.

50
00:03:38,700 --> 00:03:42,720
Outside the loop, OK, and here let it just died.

51
00:03:42,780 --> 00:03:44,830
A delay of 500 millisecond.

52
00:03:44,830 --> 00:03:45,060
Great.

53
00:03:45,060 --> 00:03:45,630
So this will.

54
00:03:47,580 --> 00:03:55,690
Do not overflow our system, right, so you'll get in enough time between operating of this stream,

55
00:03:55,740 --> 00:03:55,940
right?

56
00:03:55,980 --> 00:04:01,110
So we know that till our timer expired, this will be continuous, reprinting the account value and

57
00:04:01,110 --> 00:04:06,150
as soon as our timer expired will be reaching over here and in an interval of five millisecond, we'll

58
00:04:06,150 --> 00:04:08,080
be printing this stream, right?

59
00:04:08,080 --> 00:04:16,290
So right now, we haven't been able to let it just go ahead and try to first execute this call just

60
00:04:16,290 --> 00:04:19,860
to understand whether counter value stays at zero.

61
00:04:20,080 --> 00:04:20,270
OK.

62
00:04:20,610 --> 00:04:27,060
So again, copy this to statement and then add them after the deal.

63
00:04:27,150 --> 00:04:27,780
Right to work.

64
00:04:27,790 --> 00:04:29,100
This will do is.

65
00:04:30,520 --> 00:04:38,350
This will be printing value of a timer, OK, after our timer expiring, since we disable an hour two

66
00:04:38,560 --> 00:04:38,940
or more.

67
00:04:39,130 --> 00:04:42,910
You'll be noticing it stays at a value of zero, right?

68
00:04:42,910 --> 00:04:45,640
So let it just build our entire application project.

69
00:04:46,780 --> 00:04:47,920
So our bill is finished.

70
00:04:47,970 --> 00:04:55,510
Now we go ahead and again select the timer as the Blue Application Project, debug US launch on hardware.

71
00:04:55,520 --> 00:04:59,590
So this will change our perspective from design to debug, right?

72
00:04:59,590 --> 00:05:05,140
So we already have connected our serial terminal to call for may just be clearing up our console.

73
00:05:05,200 --> 00:05:05,560
OK.

74
00:05:06,830 --> 00:05:08,090
So that we get the data.

75
00:05:09,610 --> 00:05:14,830
From our current execution, right, so we just need to click on this resume button.

76
00:05:16,530 --> 00:05:23,310
Now, since we are not receiving anything, the good idea will be that we first met is just disconnect

77
00:05:23,320 --> 00:05:29,760
our close to a minute, OK, and then again, try to connect a great deal first, let it just go ahead

78
00:05:29,760 --> 00:05:33,660
and select our diva configuration and click relaunch.

79
00:05:34,890 --> 00:05:40,730
So now go to a lady's terminal, click on this plus button again, connect to a serial terminal and

80
00:05:40,950 --> 00:05:42,180
click on Resume button.

81
00:05:42,180 --> 00:05:49,230
Right now, you could see that it is showing us the number right, so allow the timer to expire right

82
00:05:49,230 --> 00:05:51,510
now if you just observe, right?

83
00:05:51,690 --> 00:06:01,470
So let me just try to click on the reset button so that we able to stop an execution of a cool right.

84
00:06:01,650 --> 00:06:06,960
This is the first thing that I'm doing over here, so we won't be getting any new data on the serial

85
00:06:06,960 --> 00:06:10,080
console since I forcefully apply a reset.

86
00:06:10,110 --> 00:06:12,630
Now, let me just try to analyze the lead, right?

87
00:06:13,170 --> 00:06:16,680
So first timer and need a successful self-test is also successful.

88
00:06:16,740 --> 00:06:23,850
OK, so here we have first value after an interval of 100 millisecond and you could clearly see our

89
00:06:24,120 --> 00:06:31,710
value is going down with an interval of two hundred millisecond rate to eat since we are upgrading the

90
00:06:31,710 --> 00:06:34,030
value at an interval of 100 millisecond.

91
00:06:34,050 --> 00:06:34,290
Right.

92
00:06:34,290 --> 00:06:40,740
So with each iteration, you could actually see that our counter-rally will stick.

93
00:06:41,310 --> 00:06:46,550
So this confirms that our counter operates in another mode and as soon as it reaches to zero.

94
00:06:46,830 --> 00:06:51,090
OK, you could see that we get the message the delay of five second issue, right?

95
00:06:51,390 --> 00:06:54,630
And after that, it stays at zero.

96
00:06:54,870 --> 00:06:56,730
So this could be confirmed from here.

97
00:06:56,730 --> 00:07:04,320
Also that as soon as we reach this two value of zero, this would automatically reload our timer to

98
00:07:04,320 --> 00:07:05,680
value that we want to.

99
00:07:05,680 --> 00:07:11,800
So two that zero and this is what we refer to as a non auto reload mode or a normal mode of a timer,

100
00:07:11,800 --> 00:07:12,020
right?
