1
00:00:03,860 --> 00:00:11,270
So now let's create the file to contain our assembly code and we do that by clicking here to create

2
00:00:11,270 --> 00:00:12,010
a new file.

3
00:00:13,500 --> 00:00:21,360
And let's say that the Save the file you can just press control s and then you save it in the same folder.

4
00:00:21,380 --> 00:00:23,620
I'm going to call it name dot s..

5
00:00:23,780 --> 00:00:30,850
Remember dot as is the extension for assembly code and dot c is the extension for C code.

6
00:00:30,890 --> 00:00:34,340
This father's main dot s you save it.

7
00:00:34,790 --> 00:00:40,360
And after you've saved the file to spend the folder but it's not yet in your project.

8
00:00:40,520 --> 00:00:45,440
So you have to bring it into your project to make it usable in the project and to do that.

9
00:00:45,440 --> 00:00:53,150
You can come here to source group 1 and DoubleClick and it brings you here and you locate your file

10
00:00:53,180 --> 00:00:55,970
costs your file is a dot as far.

11
00:00:56,180 --> 00:00:58,200
Obviously it's not displayed here.

12
00:00:58,250 --> 00:01:04,340
You can come here and choose display assembly or display of files which is much more convenient.

13
00:01:04,340 --> 00:01:06,710
And now you can see your main dot s file here.

14
00:01:06,720 --> 00:01:11,180
You double click to add it and it's added and it closed.

15
00:01:11,590 --> 00:01:15,290
Now you can see your file here.

16
00:01:15,290 --> 00:01:22,350
But before we stop typing let's examine our board our TVC board again.

17
00:01:22,940 --> 00:01:30,050
If you take a closer look at your board I'm sure you would notice there are 10 pairs of pins sticking

18
00:01:30,110 --> 00:01:31,520
out at the left and right.

19
00:01:31,520 --> 00:01:40,130
And so off the board you would also notice that these pins have labels like P 3 p.m. for PD 6 and so

20
00:01:40,160 --> 00:01:41,380
on and so forth.

21
00:01:41,570 --> 00:01:45,530
These labels are really important through these labels.

22
00:01:45,560 --> 00:01:53,840
We are able to know where to connect our input and output devices to match the code we write.

23
00:01:53,840 --> 00:02:02,210
What happens is that if we want to connect a sensor or switch or maybe an LCD to say P F three we will

24
00:02:02,210 --> 00:02:06,150
have to enable P F three programmatically.

25
00:02:06,200 --> 00:02:12,770
What this means is we will have to write code to tell the microcontroller to enable P if three to set

26
00:02:12,770 --> 00:02:20,000
P F three to either an input or an output depending on what we are connecting to p 3 or even we would

27
00:02:20,000 --> 00:02:24,770
have to tell it in microcontroller to set it up for an alternate function.

28
00:02:24,770 --> 00:02:31,880
So it is very relevant to read the labels carefully and to connect the wires or the input and output

29
00:02:31,880 --> 00:02:34,590
devices to the right pins.

30
00:02:34,880 --> 00:02:42,920
Since we are going to use the red LCD for this project let's dive into the user guide document and see

31
00:02:42,920 --> 00:02:49,850
how the Red LCD is connected to the board and I'm sure you might have downloaded a document by now.

32
00:02:50,300 --> 00:02:53,510
If not this is the link here.

33
00:02:54,800 --> 00:02:59,710
Yes you can just copy and paste this link in your address bar and hit enter.

34
00:02:59,720 --> 00:03:04,090
It will take you directly to the documents where you can download.

35
00:03:05,120 --> 00:03:06,290
You should certainly have it.

36
00:03:06,290 --> 00:03:16,420
Now I have mine here so I'll just maximize it to 150 percent to make it very clear.

37
00:03:16,910 --> 00:03:21,120
And let's scroll down to page 20.

38
00:03:22,330 --> 00:03:24,070
Yeah I hope pages are written.

39
00:03:24,110 --> 00:03:30,730
If the pages aren't written at the bottom you can just hit 20 here and jump straight there.

40
00:03:30,740 --> 00:03:35,220
And what we are looking for is the schematic diagram of the microcontroller.

41
00:03:35,240 --> 00:03:37,400
This is disconnected Matic diagram.

42
00:03:37,400 --> 00:03:47,530
This the microcontroller and if you take a look at P F 1 p F2 P F 3 and create the outlines you will

43
00:03:47,530 --> 00:03:53,450
realize that they are connected to red blue and green LCD respectively.

44
00:03:53,450 --> 00:03:57,790
This is P F 1 p 2 is down here p of 3.

45
00:03:57,800 --> 00:04:04,440
If you create the airlines you'd realize they come through this r twelve R eleven are two resistors

46
00:04:04,850 --> 00:04:11,270
and go to the LCD R and the DP Any DG distance for LCD red blue and green.

47
00:04:12,290 --> 00:04:19,370
So in order to use red I'm sure you can tell you realize that we would have to enable P if one to use

48
00:04:19,370 --> 00:04:20,640
the red LCD.

49
00:04:20,660 --> 00:04:21,470
Here it is.
