1 00:00:02,730 --> 00:00:09,310 Talent will come to this and you listen and watch I will show you how you can easily read in books that 2 00:00:09,310 --> 00:00:11,970 are using pick it up. 3 00:00:13,420 --> 00:00:20,880 Now as you can see this is the first example that we discussed earlier in order to turn the flash off. 4 00:00:21,110 --> 00:00:30,470 When I said even let's say that we added a push button on port see. 5 00:00:30,550 --> 00:00:36,400 First we need to define party output. 6 00:00:36,960 --> 00:00:38,890 C equals zero. 7 00:00:38,920 --> 00:00:50,640 X x f with a dimension that using F F and hexadecimal because Scoby this the tears as you can see it 8 00:00:50,640 --> 00:01:02,970 means that all because of Part B of wafty are not about the same thing must be done which is had the 9 00:01:02,970 --> 00:01:09,750 initial value of zero for all of this pain or this port pins pt. s.. 10 00:01:09,750 --> 00:01:11,080 Burns. 11 00:01:11,190 --> 00:01:21,290 Now if you want to read let's say that we have a brush but all connected to board t of zero. 12 00:01:22,750 --> 00:01:35,810 Clearly the set of brackets here and in the tears here we need to ask if Paul's seed of zero equals 13 00:01:35,820 --> 00:01:37,290 one. 14 00:01:37,290 --> 00:01:48,020 Now if that is the value all party equals one this means that the switch is blessed and if the switch 15 00:01:48,020 --> 00:01:59,420 is placed do execute this code which will flash for the ones to turn but the wait for a second to turn 16 00:01:59,420 --> 00:02:01,920 it off and wait for half a second. 17 00:02:02,510 --> 00:02:03,600 Now let's combine it 18 00:02:09,740 --> 00:02:11,810 as you can see everything is done. 19 00:02:11,810 --> 00:02:15,230 Now let me explain what happened here. 20 00:02:17,650 --> 00:02:26,580 As you can see in this area we have it was just used for reading in both values. 21 00:02:27,980 --> 00:02:35,050 And we have lotteries start to sending out what values now form to do the very same code. 22 00:02:35,050 --> 00:02:44,410 This code in let's say pick 16 of we want to use language just we would like the very same lines. 23 00:02:44,410 --> 00:02:50,280 Let me just go with this code to show you the difference. 24 00:02:50,330 --> 00:02:59,630 And we will write port D for the. 25 00:02:59,800 --> 00:03:07,140 So this code will be for pick 16 and this code will be for pick it up. 26 00:03:07,210 --> 00:03:14,860 The main difference here is that port here is used for input for reading input and sending output while 27 00:03:14,860 --> 00:03:21,940 here port is only used for reading about why if you want to send output we need to use. 28 00:03:22,210 --> 00:03:28,720 I know that this means extra programming in Forth but it will solve the problem that we already mentioned 29 00:03:28,870 --> 00:03:31,280 in a separate section. 30 00:03:31,330 --> 00:03:33,960 Read modify write problem. 31 00:03:34,030 --> 00:03:44,050 You should check it out to know what's this problem and using Pythian gives you a lot of modules from 32 00:03:45,400 --> 00:03:49,230 other Rubaiyat is that pick 16 doesn't have. 33 00:03:49,630 --> 00:03:55,190 So you need to make sure that you take nauts again. 34 00:03:55,240 --> 00:04:02,770 Port is used to read unbought lad is used to read out to send output and pick it up while in pick 16 35 00:04:02,770 --> 00:04:09,120 of port is used to read input and output. 36 00:04:09,130 --> 00:04:10,590 That's it for this lesson. 37 00:04:10,930 --> 00:04:13,470 I will show you a simulation in the next lecture. 38 00:04:13,750 --> 00:04:14,650 Thanks for watching. 39 00:04:14,650 --> 00:04:17,940 If you have any questions please ask and the full on table. 40 00:04:18,190 --> 00:04:20,750 This is educational engineering to you.