1
00:00:03,950 --> 00:00:10,670
Apart from the information you get from this cause it would be worth taking a look at some reference

2
00:00:10,670 --> 00:00:17,600
documents off the board like the the microcontroller data sheets for instance is fairly standard in

3
00:00:17,600 --> 00:00:23,960
a new hardware you buy you have to take some time to look through the data sheet as we go through this

4
00:00:23,960 --> 00:00:24,320
course.

5
00:00:24,320 --> 00:00:30,800
Yes we're going to go through the data sheets together to extract just what we need to worry that data

6
00:00:30,800 --> 00:00:32,780
sheet is quite large.

7
00:00:32,810 --> 00:00:34,120
You don't need to memorize it.

8
00:00:34,120 --> 00:00:35,780
You don't need to learn at all.

9
00:00:35,780 --> 00:00:40,780
It's just a reference manual like a sort of dictionary if you want to do something.

10
00:00:40,790 --> 00:00:43,270
You go and check in the data sheet.

11
00:00:43,310 --> 00:00:47,170
So it's worth downloading and having it on your computer.

12
00:00:47,180 --> 00:00:51,910
Another one is DTV see Launchpad User's Guide this.

13
00:00:52,010 --> 00:00:54,440
Also worth a read.

14
00:00:54,440 --> 00:00:59,930
And yes finally we are ready to write our first assembly code.

15
00:00:59,930 --> 00:01:01,880
How excited are you.

16
00:01:01,880 --> 00:01:03,320
I'm certainly excited.

17
00:01:03,320 --> 00:01:05,960
I remember the first time I wrote assembly.

18
00:01:05,960 --> 00:01:06,290
Yes.

19
00:01:06,320 --> 00:01:09,440
So our first program is fairly simple.

20
00:01:09,560 --> 00:01:14,590
It's called the read on what this diocese the read LCD.

21
00:01:14,630 --> 00:01:16,620
Remember we have the our GDP.

22
00:01:16,670 --> 00:01:21,000
We have green blue and green LCD already on our board.

23
00:01:21,020 --> 00:01:25,530
What this program would do is keep that red LCD on.

24
00:01:25,550 --> 00:01:26,390
It doesn't blink.

25
00:01:26,390 --> 00:01:31,630
Remember when you buy the board there is a program that makes the lights blink on this first program

26
00:01:31,640 --> 00:01:32,650
we're going to write.

27
00:01:32,690 --> 00:01:36,050
It's going to keep the lights on and we're going to write it in assembly.

28
00:01:36,060 --> 00:01:41,470
Then after that we improve these programs that by step we start adding things to it.

29
00:01:42,380 --> 00:01:47,190
And a well-structured program must begin with a requirements document.

30
00:01:47,210 --> 00:01:51,770
Yes I think it's important to have a requirement documents for every program.

31
00:01:51,770 --> 00:01:58,510
So we'll start this first one by trying to write down some requirements analysis for this program.

32
00:01:58,700 --> 00:02:05,210
And as we go on this a very simple program in fact we wouldn't we don't even need to write such a document

33
00:02:05,240 --> 00:02:05,770
for it.

34
00:02:05,780 --> 00:02:08,830
But I think it's a good practice to do.

35
00:02:08,980 --> 00:02:09,220
Yes.

36
00:02:09,260 --> 00:02:14,960
So we just go through some of the things we write and the requirement documents have the requirement

37
00:02:14,960 --> 00:02:21,230
document enforced determine determine and the needs of the system through asking questions they see

38
00:02:21,230 --> 00:02:25,460
some of the questions we can ask what is the opportunity of this project.

39
00:02:25,460 --> 00:02:32,390
Yes it is to design build and test a system that turns on the red LCD.

40
00:02:32,480 --> 00:02:34,510
How will the project be developed.

41
00:02:34,520 --> 00:02:41,160
The program will be written in color youth vision develop to use an at TVC launch part.

42
00:02:41,210 --> 00:02:43,940
How will it fit into existence systems.

43
00:02:44,170 --> 00:02:49,520
The read on program will be callable from systems having to see microcontroller.

44
00:02:49,520 --> 00:02:50,950
That's good.

45
00:02:50,960 --> 00:02:52,910
What will this system do precisely.

46
00:02:52,940 --> 00:03:01,490
Yes the system will start by setting up the required pieces on the board and then into an infinite loop

47
00:03:01,760 --> 00:03:04,330
that keeps the red LCD turned on.

48
00:03:04,340 --> 00:03:06,190
So this a fairly fair.

49
00:03:06,290 --> 00:03:09,560
Very very short requirement document.

50
00:03:09,560 --> 00:03:16,400
But I know you understand based on this if you write in a big up program you would know the questions

51
00:03:16,400 --> 00:03:17,030
to ask.

52
00:03:17,030 --> 00:03:20,570
This is just to give you what such a requirement document would.

53
00:03:20,870 --> 00:03:28,370
Now let's take a look at the projects set up every call you Vision Project contains two paths that when

54
00:03:28,370 --> 00:03:35,870
you create a new project comes along with it and these files are the same file written in C and then

55
00:03:35,870 --> 00:03:37,030
assembly.

56
00:03:37,060 --> 00:03:41,810
And what this file should do is that this sets up the starting point of the program.

57
00:03:41,900 --> 00:03:50,090
They have what we call a reset handler the block of code that is it's run every time you press the reset

58
00:03:50,270 --> 00:03:51,590
button.

59
00:03:51,620 --> 00:03:56,740
Also this file is outlined a stack size and a heap size.

60
00:03:56,750 --> 00:03:59,380
I know we've not talked about stuck in a heap.

61
00:03:59,390 --> 00:04:01,520
We'll talk about them later.

62
00:04:01,550 --> 00:04:07,490
I just wanted to know the functions of the startup files and without these files you cannot compile

63
00:04:07,490 --> 00:04:10,430
your program you would receive error messages.

64
00:04:10,430 --> 00:04:13,890
So when you create your project you get these files.

65
00:04:13,990 --> 00:04:18,820
They also contain the reset factor and all interrupt vectors.

66
00:04:18,890 --> 00:04:25,550
We'll talk about interrupt later as we mentioned earlier the reset handler runs every time the reset

67
00:04:25,550 --> 00:04:29,180
button is pressed on your microcontroller board.

68
00:04:29,180 --> 00:04:35,990
And what this does is that it jumps straight to the starting point of your program and in C program

69
00:04:36,660 --> 00:04:41,600
in code written and c the start point as to main function.

70
00:04:41,600 --> 00:04:47,450
So what this means is that if we're right in our program entirely in assembly and we want the program

71
00:04:47,960 --> 00:04:54,980
to start from the assembly side we would have to go to the reset handler and change the starting point

72
00:04:55,370 --> 00:04:58,820
to the starting points that we give our program.

73
00:04:58,880 --> 00:05:01,160
We would see this when we create our program.
