[MUSIC] This lecture will talk about embedded systems a little bit more. We'll talk in more detail about how they're designed, since that is the point of this course. We're gonna be building IoT devices, which are embedded systems. So we're gonna talk about differences and how you would design an embedded system as compared to a regular computational platform. And some of this we talked about in the last module, but we're gonna talk about how these differences impact the design process. Okay, so application specificity. Embedded devices are generally application specific. Unlike desktop, laptop computers which can run any type of program or pretty good doing any type of program. Embedded systems are made to do one thing or one related set of things. And we already talked about this with IoT devices. So, the phone sort of blurs that line a little bit, all right, cuz a phone can do a heck of a lot. You can run arbitrary apps on a phone, but most devices like the camera in front of me, that thing is made to do camera, right? To record, play back, something like that. And it does all things related to camera activities. So, that's common. That's typically how embedded systems are. And the reason why this is important is because it changes the way you design a device. When you know that the device is gonna do one thing, you design it for the one thing, you don't design it for everything. So the design is focused on the one application, unlike general purpose systems like a laptop, desk top. So those things essentially end up being overpowered for whatever you have to do because they have to be ready to handle any type of computational task. So for instance take a standard machine, say a quad-core, four processors they have, quad-core's not uncommon. So say you get a quad-core i7, something like this, it's running at 4 GHz, right? Generally, there is no way that regular users are using up all the computational potential of that machine. There is no reason why you need four processors to run Word or PowerPoint, or whatever application you're running. You don't need 4 GHz to run these applications. So 99.9% of the time, these laptops and desktops are well under utilized. [LAUGH] Only 1% of the CPU, some tiny fractions of the CPU is actually being used. But then every once in a while, you actually need them to do something. So say, most of the time, like say, cameraman right here, okay. He's using a, he's got a Mac. I bet you he uses Photoshop or other kind of tools to do video processing, right. Now, when he does that, then it's using all the processing power, right, cuz these video operations chain up effects on screen images. Those require a lot of computational complexity. But, 99.9% of the time, when this thing is just running PowerPoint, something like that, that's not using anything. But every once in a while, it's running an application that really uses it. So in some sense, general-purpose processors, most of the time, they are wasted. There's no reason to have all that power except in very rare cases. Maybe I'm playing a video game. Video games are another case where you really use a computational power, because they're doing video operations all the time. Graphics, complicated graphics. So when I'm playing In my video game, okay, I need the processing power, but most of the time I don't need it. So in some sense, general purpose machines are very inefficient in that way, and because of that they cost more than they need to, to do any individual task. So what I mean by that is say you want to play video games, and you want to play the newest, best video games. You can buy a computer, a good computer with a great graphics card and all this, and that might cost you $1,500, right? To get the newest, most up-to-date video card, in the best computer, to run the best games, and run them fast. Or you could say, look, let me just buy an XBox One, or PlayStation 4, which is a lot cheaper, say $500. But it runs that game better, probably better than the best, than that more expensive computer, right? Now, all it does is games, but it does games great. Right? It does games the best. So, in this way, the design is much more efficient. It's being used to its full potential because all you ever do with the XBox 1 is play games with that thing. And most of the time, they're video. So you're using the capacity of that thing, basically all the time you're using it, you're using it to, if not full, but at high capacity. As opposed to a general purpose machine. So, this application specifically lets you change the way you do design, so that you can just put in the things that you need to put in. Spend money on what you need to put in. So, higher design efficiency is possible. So what that means is that, if I know that I'm playing video games, there are certain pieces of hardware that I don't need in my design, right? Why buy that, right? If I know that, take this camera, right, this camera in front of me, I know that this thing is doing some types of video processing. I know it needs to control a lens and stuff like this, right? But, it's never gonna have to do other types of processing. I'm not gonna be doing sorts, or something, right? So I can change the way I do design to just include the software and the hardware that I need for the task that it's made for. And so that makes it cheaper. Now it makes it more limited. It can only do what it's made to do, but what it does, it does cheaply and efficiently. Another big difference in the way you design embedded systems as compared to sort of a regular desktop laptop, is that hardware and software are usually designed together. So again, this is for efficiency reasons. But if, say you want to buy Microsoft Word or something, some typical desktop software. That Microsoft Word, you buy that completely separate from when you buy your computer. Well, actually maybe you buy your computer and it comes with Word but, you can buy your computer and then you can buy Word completely separately, okay? And there are two different companies. Maybe I bought my computer from Dell and I bought Word from Microsoft. Two different companies. One does the hardware, one does the software. Now, more and more, these companies are coming together. And sort of Apple is the epitome of this, right? They make their devices' hardware and software together. They make the phone and the software or whatever the device is in the software, as one. Which means that they work together better, okay? And in fact, the Apple machines traditionally are very reliable because of that. But it also makes them more efficient. So you can say, look, since this is just a phone, I don't need to be able to drive servos or something, right? I can make my hardware just the right hardware to run exactly the software that I need, right? You can match them. Your whole design process gets more efficient. And we are gonna see this later on in the class when we actually build these things. We are only gonna buy the components we need to build the system we want. We're not gonna say, every system. I'm gonna put all this hardware and software together. No, we're gonna buy, we say we need this component. We need an LED. We need this, we need that. We hook them up and we make this one system that we want, and write code that uses only that. As opposed to a general purpose system where you have to have hardware for everything and software for everything just for the one occasion where you actually need it. So you're designing the hardware and software together, and that makes design a lot harder. Because you have to not only be a hardware designer but you also have to be a software designer. So when you're writing the software, you have to think about what the hardware can do. See, normally when you take an application like Word, that thing runs on many different hardware platforms. You generally as a programmer do not have to be aware of this hardware platform that it's running on. You just say look, as long it's running on Windows, I don't care, right? Actually, it doesn't even have to run on Windows. It can run on many applications, and you don't care about that as a programmer. But if you're writing code for an embedded device, like a cell phone, you have to know exactly what the hardware can do. You have to know, I have a screen. It has this size, right? So I'm limited in how I write my software to use up that area, right? I have touch senses, which can sense this and that, right? So I gotta place my buttons so that everything can be touched. So you have to really be aware of the hardware when you're designing the software and vice versa, which changes the design process and makes it frankly, more difficult. Yeah, so more work for designers because you have to understand some of both. Thank you. [MUSIC]