1
00:00:00,880 --> 00:00:03,590
Before we go on we need to complete this.

2
00:00:03,610 --> 00:00:06,160
We left this because we hadn't written this function.

3
00:00:06,160 --> 00:00:07,630
I'm going to bring this function here

4
00:00:13,490 --> 00:00:17,960
and I wouldn't put the function prototype here.

5
00:00:18,460 --> 00:00:26,070
We are going to have another function called SD 7 7 3 5 in it and this would combine this function it

6
00:00:26,260 --> 00:00:33,170
would combine the SS I in its function which says in things such as set in the background color when

7
00:00:33,170 --> 00:00:36,770
the LCD starts for the first time and other things.

8
00:00:36,830 --> 00:00:48,860
So I'm going to come down here and I'm going to see void SD 7 7 3 5 and a score in it.

9
00:00:50,840 --> 00:00:55,160
And then this function I'm going to call SSI in this here

10
00:01:06,150 --> 00:01:13,980
and I'm going to set the cursor to 0 0 0 so the LCD cursor to the start position if not written this

11
00:01:13,980 --> 00:01:16,500
function yet but will write it next.

12
00:01:16,890 --> 00:01:23,370
So you need not worry about that and I'm going to set the text color to yellow when the LCD starts for

13
00:01:23,370 --> 00:01:28,390
the first time and then I'm going to set the background color to black.

14
00:01:28,620 --> 00:01:32,510
Well we would have a function for full screen as well right.

15
00:01:32,550 --> 00:01:36,090
So this is going to be how we initialize the LCD.

16
00:01:36,090 --> 00:01:39,260
This function here takes care of the hardware initialization.

17
00:01:39,280 --> 00:01:47,100
This is just to setup the screen parameters such as the cursor position and Texaco lined background

18
00:01:47,100 --> 00:01:47,650
color.

19
00:01:47,760 --> 00:01:48,370
Right.

20
00:01:48,400 --> 00:01:53,800
So I'm going to bring the function for four sets in the cursor.

21
00:01:54,330 --> 00:01:56,170
So it's a simple function.

22
00:01:56,520 --> 00:02:06,620
It takes the x position and the y position a simple cluster right.

23
00:02:08,140 --> 00:02:13,090
Actually let's go to the DOT each file and include the prototype of all the functions we're going to

24
00:02:13,180 --> 00:02:22,370
add to this function here is going to be required outside the s t 7 7 3 5 dot c file.

25
00:02:22,380 --> 00:02:27,840
Because of that we've got to put its prototype in a dot each file so that we can access it from the

26
00:02:28,140 --> 00:02:35,900
main dot c file and I'm going to bring the prototypes of all the functions we require here

27
00:02:40,920 --> 00:02:42,320
to all of these functions.

28
00:02:42,390 --> 00:02:48,250
We are going to include in our dot c file and we'll be able to access them in our main file.

29
00:02:48,390 --> 00:02:49,560
You see set cursor.

30
00:02:49,650 --> 00:02:50,650
The one we just wrote.

31
00:02:50,650 --> 00:02:52,130
It's already here.

32
00:02:52,320 --> 00:02:53,260
Right.

33
00:02:53,310 --> 00:02:54,880
So the error disappeared.

34
00:02:54,960 --> 00:02:56,770
It takes two argument.

35
00:02:56,910 --> 00:03:03,410
The first one is the new exposition the second one is the new y position.

36
00:03:03,410 --> 00:03:10,080
Once that is done we're going to have a function for Phil rect to fill a rectangle with a color.

37
00:03:10,660 --> 00:03:11,600
Right.

38
00:03:11,600 --> 00:03:16,490
And we're going to have another function for set an address set address window

39
00:03:20,160 --> 00:03:25,460
but we're going to have one to fulfill the screen feel of the screen

40
00:03:32,140 --> 00:03:35,500
then there's the function for sets sets an address window

41
00:03:40,590 --> 00:03:41,580
once that's done.

42
00:03:41,580 --> 00:03:43,680
We're going to have another function for push color

43
00:03:49,390 --> 00:03:51,790
function for draw pixel

44
00:03:57,640 --> 00:04:02,740
function for drawing a third line call this one crawl vertical line first

45
00:04:05,710 --> 00:04:08,110
function for growing horizontal lines

46
00:04:12,390 --> 00:04:13,860
function to draw a bitmap

47
00:04:19,520 --> 00:04:25,480
and you need not follow I'm going to upload the project to the video so you can download it and just

48
00:04:26,110 --> 00:04:34,600
yeah just use it after draw bitmap green chose the function for drawing character string

49
00:04:52,670 --> 00:04:54,610
a function for drawing characters

50
00:05:08,460 --> 00:05:09,780
function to search color

51
00:05:16,670 --> 00:05:20,890
a function for Claire in the plot when we plot something we would want to clear it

52
00:05:29,400 --> 00:05:31,470
a function for having a simple plot

53
00:05:37,380 --> 00:05:43,880
function for plotting a point so let's say you read a value from the ATC you want to plot that points

54
00:05:44,830 --> 00:05:47,220
and then a function for going to the next position.

55
00:05:47,240 --> 00:05:53,030
After you've plotted a point in order to have a complete graph you've got a move to the next position

56
00:05:53,030 --> 00:05:55,930
plot and then move to the next position plot.

57
00:05:56,210 --> 00:06:00,410
And because of that we're going to have a function for plot increment

58
00:06:10,750 --> 00:06:12,170
this function.

59
00:06:12,620 --> 00:06:20,390
Make sure when we reach the end of the day the time when we reach the end of the x axis we return back

60
00:06:20,390 --> 00:06:21,670
to zero.

61
00:06:22,220 --> 00:06:28,290
Right it's basically rich and the end of this screen and starting from the beginning.

62
00:06:29,230 --> 00:06:31,110
Went over function for plot in line

63
00:06:39,010 --> 00:06:40,480
function for plot bar

64
00:06:45,310 --> 00:06:47,010
function to plot the next point.

65
00:06:47,020 --> 00:06:51,430
That's the one I was talking about that when you plots the first point you've got to move and plot the

66
00:06:51,430 --> 00:06:58,040
next point and then we're going to put a number of the functions we've written together.

67
00:06:58,040 --> 00:07:05,450
We're going to put a number of the functions we've written together to plot axes so the plot the axes

68
00:07:05,480 --> 00:07:11,750
will need to use the draw horizontal line and then to draw vertical line as well as fill a rectangle

69
00:07:11,750 --> 00:07:17,660
for the background color and other things we're going to put all of this together into one function

70
00:07:17,690 --> 00:07:19,790
so that we can simply call this function.

71
00:07:19,790 --> 00:07:25,010
Draw axes and half the axes drawn this function.

72
00:07:25,010 --> 00:07:25,680
Right.

73
00:07:25,700 --> 00:07:28,820
So you can spend some time trying to understand these functions.

74
00:07:28,820 --> 00:07:35,140
They're very simple C code they've got nothing to do with you know bare metal or microcontroller design.

75
00:07:35,150 --> 00:07:39,530
These are simple zip codes for displaying graphics.

76
00:07:39,530 --> 00:07:43,190
So if you have any questions regarding them you can send me a message as well.

77
00:07:43,470 --> 00:07:46,730
So here are the functions we have one error somewhere

78
00:07:51,160 --> 00:07:52,990
is the set address window.

79
00:07:52,990 --> 00:07:59,430
This is because the code is not reachable and we've got to put its prototype here

80
00:08:07,140 --> 00:08:11,630
right okay we're looking good so far.

81
00:08:12,020 --> 00:08:19,310
So the next thing that we're going to do is this initialize an ADC so to make this a bit more interest

82
00:08:19,310 --> 00:08:25,190
and we're going to initialize one of the ADT pairs connect to a potential meter to the microcontroller

83
00:08:25,550 --> 00:08:33,020
and plot the data as we move the potential meter to see that it works and to give you an idea of how

84
00:08:33,080 --> 00:08:36,140
this could work in the real world in the same way.

85
00:08:36,410 --> 00:08:42,800
You can make it more interesting by plotting the data from the temperature sensor in that microcontroller

86
00:08:42,830 --> 00:08:43,610
on the graph.

87
00:08:43,610 --> 00:08:48,520
After I've shown you how to plot the ATC data so that's what we're going to do now.
