1
00:00:00,120 --> 00:00:06,960
So let's try to understand how we add the switch or alcohol or how we utilize the switch within a mile.

2
00:00:07,530 --> 00:00:13,260
And then since the data that we have on a switch and then sending that data down to an elderly rate.

3
00:00:13,260 --> 00:00:15,750
So this is what we will be covering in this.

4
00:00:15,750 --> 00:00:16,080
We do.

5
00:00:16,290 --> 00:00:16,620
OK.

6
00:00:16,950 --> 00:00:23,040
So utilizing the diesel script that we have generated, we are able to create a fundamental hardware

7
00:00:23,040 --> 00:00:23,430
design.

8
00:00:23,460 --> 00:00:23,760
OK.

9
00:00:24,270 --> 00:00:28,860
And here you could see by default, all the GPI options are enabled, right?

10
00:00:28,890 --> 00:00:31,470
So when we consider GPI or am I?

11
00:00:32,040 --> 00:00:33,960
So all of them are nebula.

12
00:00:33,960 --> 00:00:40,950
As soon as we select GPI, where my right to all of them are selected, except those which are being

13
00:00:40,950 --> 00:00:42,570
utilized by the very far right.

14
00:00:42,570 --> 00:00:49,740
So we do not need to worry much about this only thing that we need to make sure when we utilize the

15
00:00:50,220 --> 00:00:59,480
push button is now we already know that pin number 50 and 51 have a button been present at that.

16
00:00:59,490 --> 00:01:00,300
Am I open?

17
00:01:00,390 --> 00:01:09,000
OK, so our agenda will be just to disable disable the pull up if we have on this stupid rate.

18
00:01:09,330 --> 00:01:14,970
So here what we did is we will be predominately working on am I 50, where we have button for?

19
00:01:16,050 --> 00:01:20,600
We'll just be disabling the put right.

20
00:01:20,610 --> 00:01:25,770
So this is one thing that will be doing the one modification as compared to our previous case.

21
00:01:26,360 --> 00:01:32,310
But if you keep this enable, we able to just sense always a high on the push button.

22
00:01:32,340 --> 00:01:32,730
OK.

23
00:01:33,090 --> 00:01:34,790
So do you see the changing seat?

24
00:01:34,800 --> 00:01:40,110
We need to disable the pull up and then only we could sense are different values on the switch.

25
00:01:40,380 --> 00:01:41,340
So remember this thing?

26
00:01:41,520 --> 00:01:47,640
You could also give a try on keeping this build up enabled until you will be always receiving one on

27
00:01:47,640 --> 00:01:48,450
a push button, right?

28
00:01:48,460 --> 00:01:53,590
So once you disable now, if you press the button, you will be getting one else will be getting zero.

29
00:01:53,610 --> 00:01:53,850
Right.

30
00:01:53,850 --> 00:01:58,740
So let me just to it this modification and then create and they still happen.

31
00:01:58,740 --> 00:02:02,730
So applauded each individual and they still happen, and it changed a bit.

32
00:02:03,000 --> 00:02:06,510
So we already I have already generated a bitstream.

33
00:02:06,750 --> 00:02:08,640
I just need to launch an SDK, right?

34
00:02:08,640 --> 00:02:12,630
So I already exploded and hardware failing to investigate.

35
00:02:12,690 --> 00:02:19,290
Only thing that we'll be discussing is what will be the differences in the code that we have right now.

36
00:02:19,290 --> 00:02:21,750
The device initialization will remain as it is.

37
00:02:21,810 --> 00:02:27,990
OK, as we have written in the previous case, when we are working with an elite wait, we just need

38
00:02:27,990 --> 00:02:33,750
to specify the device in the lock up config function, then utilize the C of G initialize, right?

39
00:02:33,750 --> 00:02:41,970
So they do think that we'll be doing and then this will allow us to initialize our GPI right now here

40
00:02:41,970 --> 00:02:42,530
too.

41
00:02:42,600 --> 00:02:49,180
Since the state of a switch, it basically returns you with 32, and that could be verified later.

42
00:02:49,200 --> 00:02:59,610
So if you just go ahead and explore the functions that we have in X UPI who aspires to read the data

43
00:02:59,610 --> 00:03:00,310
from a switch?

44
00:03:00,330 --> 00:03:00,690
OK.

45
00:03:00,720 --> 00:03:02,100
When we consider the pin.

46
00:03:03,370 --> 00:03:08,890
So here we have a series of functions which are available in therapy, right?

47
00:03:09,220 --> 00:03:11,300
One of them is Ex Tupaea.

48
00:03:11,320 --> 00:03:12,750
Oh yes, read and write.

49
00:03:12,760 --> 00:03:15,010
So this will basically write a new 32.

50
00:03:15,010 --> 00:03:18,790
So to handle this situation, we declare a temporary variable.

51
00:03:18,820 --> 00:03:25,060
All seem the that issue 30 to me, so we could actually check the indirection also.

52
00:03:25,060 --> 00:03:31,900
So if you want to sense the pain direction because we already know that for setting up an input, we

53
00:03:31,900 --> 00:03:37,240
need to add a zero to said direction, brain function and for setting up an output.

54
00:03:37,240 --> 00:03:41,140
We need to send one that is this we already discussed day two.

55
00:03:41,140 --> 00:03:46,620
We could actually check the direction if we want, but we will not be doing that over here, right?

56
00:03:46,650 --> 00:03:51,520
Two, but indeed will be storing the value that has been written by the read function.

57
00:03:51,600 --> 00:03:53,650
Right now, we need to set the direction.

58
00:03:54,040 --> 00:03:56,750
So a pin number seven where we have our elderly.

59
00:03:58,090 --> 00:04:04,200
Being number seven there, we have an alibi, so we need to set this number as one, right?

60
00:04:04,210 --> 00:04:07,010
So this will consider this thing to be an output.

61
00:04:07,030 --> 00:04:09,400
And similarly, we need to enable an output.

62
00:04:09,400 --> 00:04:12,370
So for that, we also need to apply when right does that.

63
00:04:12,370 --> 00:04:16,280
We think that we need to do to consider pin number.

64
00:04:16,660 --> 00:04:17,680
Am I 007?

65
00:04:17,680 --> 00:04:23,650
As an output book where we have a reality for setting up an input, we just need to apply zero in the

66
00:04:23,650 --> 00:04:25,870
same direction bin function, right?

67
00:04:25,870 --> 00:04:33,010
So for us, the button that will be utilizing is button number four, which is connected to Amil 50.

68
00:04:33,370 --> 00:04:35,710
We'll just be specifying the pin number to be 50.

69
00:04:35,740 --> 00:04:38,650
And here we need to specify zero right to this.

70
00:04:38,650 --> 00:04:44,710
We already discussed if you just explore this function you could clearly know doesn't settle for an

71
00:04:44,710 --> 00:04:47,920
input direction and then run for an open direction.

72
00:04:48,080 --> 00:04:50,800
To this, the last argument is our direction.

73
00:04:51,640 --> 00:04:58,210
OK, now we will be starting a GPIO email and let it stand here.

74
00:04:58,360 --> 00:05:01,060
We could read the data, right?

75
00:05:01,060 --> 00:05:03,460
So we do not want to read the direction.

76
00:05:03,700 --> 00:05:06,350
The other direction is set correctly or not.

77
00:05:06,370 --> 00:05:09,250
We will utilize the function that we have.

78
00:05:09,660 --> 00:05:10,880
Get direction.

79
00:05:10,900 --> 00:05:15,160
OK, so this will this will be giving us an.

80
00:05:16,570 --> 00:05:18,530
So if you just analyze get direction.

81
00:05:18,550 --> 00:05:25,510
OK, so let me just try to explore what it truth to zero for an input direction and one for an open

82
00:05:25,520 --> 00:05:30,640
direction, so if you specifically need to know the direction set for a specific thing?

83
00:05:30,760 --> 00:05:31,090
OK.

84
00:05:31,330 --> 00:05:33,570
You could just utilize this API, right?

85
00:05:33,580 --> 00:05:35,800
But here we will not be doing this.

86
00:05:36,370 --> 00:05:37,230
So but indeed?

87
00:05:37,630 --> 00:05:43,990
OK, which is the variable that we declare, which is to the value that we have on button.

88
00:05:44,260 --> 00:05:44,590
OK?

89
00:05:45,250 --> 00:05:49,850
The function that we have to read, the value on happiness is.

90
00:05:50,680 --> 00:05:53,020
We need to specify the instance, which is.

91
00:05:53,740 --> 00:05:54,840
And then the pin number.

92
00:05:55,030 --> 00:05:57,430
So once we read a reader.

93
00:05:57,460 --> 00:06:01,010
Now what we want to do is we'll be writing the same day down to any leads.

94
00:06:01,030 --> 00:06:06,700
So as we press, the push button will be to anyone else.

95
00:06:07,760 --> 00:06:09,670
Will just be keeping energy off, right?

96
00:06:10,540 --> 00:06:12,580
So to do that, we have the right brain function.

97
00:06:13,180 --> 00:06:18,490
Here, we need to again specify an instance, which is the pin number seven where we have our reality

98
00:06:18,730 --> 00:06:19,390
and the button.

99
00:06:19,690 --> 00:06:26,530
So the data that will be reading OK from the push button will be sending the same data to an elite,

100
00:06:26,630 --> 00:06:26,890
right?

101
00:06:27,160 --> 00:06:30,520
We are also branding the value that helps us to debug an entire thing.

102
00:06:30,520 --> 00:06:36,790
So as we dynamically change the speed of the switch, we'll be seeing or observing the changes of pattern

103
00:06:36,790 --> 00:06:37,150
data.

104
00:06:37,600 --> 00:06:43,810
And then we could analyze whether we see the respective changes on a console also, right?

105
00:06:44,170 --> 00:06:48,730
We are reading the value of pushbutton and an interval of two second rate and that.

106
00:06:49,850 --> 00:06:56,690
So let me just go ahead and try to program, and if you rate so we already exported our hardware file,

107
00:06:56,690 --> 00:07:00,740
we just need to go ahead and try to program and FPGA straight.

108
00:07:00,770 --> 00:07:02,270
So this is the first thing that we do.

109
00:07:02,630 --> 00:07:06,800
Then we will be connecting and it's sticky terminal.

110
00:07:07,070 --> 00:07:09,080
We'll get to come board for right.

111
00:07:09,770 --> 00:07:10,790
They just go away.

112
00:07:10,850 --> 00:07:18,920
And now we will be performing execution of this application on to and hardware to run its launch on

113
00:07:18,920 --> 00:07:22,340
hardware run as launch on Hottovy.

114
00:07:22,460 --> 00:07:22,760
Right.

115
00:07:23,330 --> 00:07:24,770
So now if you analyze.

116
00:07:26,100 --> 00:07:32,460
We successfully initialize our device and then we are starting and model, so like, no, I haven't

117
00:07:32,460 --> 00:07:37,020
pressed the button, so we could clearly see that we are getting a value of zero now as soon as I press

118
00:07:37,020 --> 00:07:37,650
the switch.

119
00:07:38,070 --> 00:07:38,430
OK.

120
00:07:38,790 --> 00:07:45,600
So you could now see that we are reading the value of one right down, in fact, as I change the stick.

121
00:07:45,660 --> 00:07:46,000
OK.

122
00:07:46,020 --> 00:07:49,260
You could see that we are reading and see you right now.

123
00:07:49,260 --> 00:07:56,850
We could dynamically change the speed of a pushbutton, so we able to read the reader from the periphery,

124
00:07:57,180 --> 00:07:58,770
OK through an email.

125
00:07:58,920 --> 00:08:02,490
And then we are also sending the data to anelli, right?

126
00:08:02,500 --> 00:08:09,360
So this is how you could interface or you could utilize the push button and the switches within a Miyu

127
00:08:09,360 --> 00:08:09,840
interface.
