So, we're going to talk about microcontroller characteristics right now. The different characteristics of microcontrollers. Now, the reason why this is important for making IoT systems is because when you make it an IoT systems probably one of the early decisions about how to implement the system is going to be, which microcontroller should you use, right? Now, there are a wide range of choices with microcontrollers, and you're going to have to find one to use. Now, a lot of these decisions are pre-done for you, like, if you work in a company, they use a particular brand, we use Freescale, whatever, that's what you use, right? Even within those constraints, you get, even be stuck with, say, you're only using Freescale. It's a ton of microcontrollers you can use, all with set of different properties and things like this. You got to pick the one that's right for your project because another feature of IoT systems is that they are generally constrained, tightly constrained. So, it's not like a desktop laptop. Right. If you look at a desktop laptop, those things are over engineered, in the sense that you get some quad core processors run in it and I don't know, three gigahertz something like this. Regular user doesn't use that. In fact, it's running, it's sort of two percent capacity 99 percent of the time. So, you start playing a game. Certain games, they will suck up that power, they will use what the computer has, but vast majority of the time that processor is sitting there at two percent basically idling because you don't need four cores, you don't need that clock rate, you don't need everything that it has. IoT based systems, those things are cheap, you want to be cheap. You do not want to buy some big powerful microcontroller that you don't need. You're always saving money trying to say, "Look, what is the cheapest thing that just barely does what I need to do?" So, what you need is, you need to have in mind a set of characteristics that your microcontroller needs, so the bare minimum for your system. Then, you look through the data sheets for the microcontrollers to figure out which one has that, just barely, which is the cheapest one that has that. Now, a data sheet, we're not going to look at a data sheet because those are painful look at. A data sheet is basically the sheet that has all the information about the particular microcontroller. So, if you ever want to look up a micro control, you can look on the top of the chip. You can see the name of the microcontroller, its part number and everything, you type that in, into Google, and you say "data sheet," and you will come up with a data sheet, most likely. As data sheet, you might look at one, they are definitely complicated to read. They have lots of different details about the microcontroller. There are certain information in these, certain things in these we really need to understand in order to make reasonable decisions. So, we don't have to understand everything in there, we will not. Certain high level characteristics of a microcontroller, you should know what they mean, and so when you look at a data sheet, say the front page of the data sheet, you can at least tell superficially, "Yeah, it has this, it has that, has that. That's what I need or I don't need that." So on. So, let's talk about the basic characteristics of microcontrollers that you might look into. Again, also another thing, let me mention is that, in this class, you won't be making this decision. You're not going to be deciding which microcontroller you're going to use. In this course, we use an Arduino, right? Then, next set of course, we can use Raspberry Pi, we're set with that. But I'm saying outside of the course, when you and design your own IoT system, you will need to pick a microcontroller. Okay. Datapath bitwidth. Bitwidth, what that means is, it's a number of bits in each register. A register storage element to store as a number. So, the bitwidth basically tells you the size of most numbers in your system. How many bits? So, every number is represented in binary as a series of bits which are binary digits, either zero or one. The more bits, the better, okay? So, what do I mean by that? If you have more bits, 64 bits let's say, that means you can get more accuracy than you could with 16 bits, something like that. So, you get more accuracy, you get more data throughput. So, basically if you're processing on 64-bit numbers, there's more data processing than you can do then if you processing on 8-bit numbers. I know we're not going to go into architecture, but roughly that's what datapath bitwidth means. Now, there's a limit. I mean you don't need excessive accuracy in your average system, right? So, you know an 8-bit microcontroller, like, the Arduino that we're using, is based on an 8-bit microcontroller. That is sufficient. That is minimal, but that is sufficient for the task that we do in this class, right? We don't need high accuracy. We're just doing simple control operations. We don't need accuracy and numbers. So, it's a bitwidth is something you have to think about depending on the task that you're performing. Input/output pins. Now, this is actually an important thing because it's often a bottleneck. So, you got to your microcontroller. The microcontroller is the center of the system. It's connected to everything, is orchestrating the whole system, right? So, the microcontroller has to be connected to all the different components that you want to put in your system. Now, maybe not all but to a lot of them, okay? It requires pins to connect it to these things. So, maybe you need three pins to connect to one integrated circuit, and five pins to connect another, and so on depending on what the circuit is, you know, how many pins it has on its interface. You can easily chew up all the pins, you can easily use up all the pins on our microcontroller because there are these microcontrollers, generally, they don't have too many pins. So, you have to be careful about how you use the pins. So, that's why very early in the design process, you have to just sketch out your design, figure out what the different components are you going to use, and how many pins each one of them needs to go talk to the microcontroller. So, you can get a number, like say, okay, I need 40 pins. Then you can find a data sheet that reports it has at least 40 pins and so on, right? So, input/output pins are important for that reason. Performance, okay. So, performance is important. It depends on the application, right? So, sometimes it's important, sometimes it's not. Now, one thing to note with performances, many times when you're making an IoT device it is interacting with a human, right. It's a device that's dealing with the human and humans are slow. So, humans, they don't need you to respond too quickly. Now, when I say not too quickly, let's say you're putting images on a screen. These images on a screen, if you put 30 a second on a screen, a human will be very happy with that. Human will see it, say mode, and everything will be smooth, right? Now, 30 frames a second, 30 things a second, operations second is very little for many processes and that depends on the processor. Maybe a processor could do a lot more than that, but it's not necessary because the human is slow. So, you're supposed to get with this with sound, right? With audio, a human can only hear what 22 kilohertz, I think, is a maximum0 frequency. That is not very fast, okay, 22,000 operations a second. That's not a high rate of processor speed, right? So, a processor can process audio data much faster than a human can hear the data, right? So, you can use a pretty slow processor and still produce a satisfactory audio. So, performance is important. You have to consider that depends on your application. Video though, video requires a lot more even those 30 frames a second, each frame might have many millions of pixels and you might have to do lots of processing on that. So, video generally requires a higher rate, but audio you know, if you're just an audio or tactile, maybe if somebody's pressing a button, something like that, very slow clock rate is sufficient. There we go, okay. So, some other features, timers. There are other components inside your microcontroller that are commonly useful to an IoT system like a timer. Now, you need a timer for any type of real-time application and a lot of IoT systems have real time functionality in them. So, say you want something to happen at a certain deadline. I want to sample this sound every one thousandth of a second I want to sample the sound. Then you need a timer to trigger that event to happen at that rate, right? So, or I want to sample a monitor, I want to sample some temperature monitor at some regular period, right? You need a timer to set that, to force it to happen at that rate. So, timer is a really important in microcontrollers. So, you need a few timers. When you considering the timers, there's an accuracy, a timer accuracy issue. You got to think how much accuracy do you need in the timing and then that determines the bitwidth at the timer, right?. So, an 8-bit timer is less accurate than the 16-bit timer. We'll get to that later when we deal with timers. Anyway timers are components that you look for, you always want a few of them in a microcontroller. Analog to digital converters. So, what this is for is to read analog signals. Now, the issue here is that microcontrollers are generally digital devices, okay. When I say digital, all the numbers are zeros and one, off or on, they're discrete values, zero or one, nothing in between. Now, analogue is a continuous set of values. So, the difference between analog and digital is the same as the difference between real numbers and integers, right? They're discrete integers. You can have zero,one, two but you can't have 1.5. While analog is continuous, you can have any number anywhere. Now, controllers microcontrollers in integrated circuits in general they are almost always digital, completely digital because it's much easier to design a digital circuit than it is to design an analog circuit. But they are digital, but the world is analog. So, what I mean by that? Save this light that is in my face while we're recording. This light can be a little brighter, I hope is not a little brighter, little brighter, a little dimmer. Okay. It's not just off or on. They can increase the brightness, decrease it in an analog way. So, phenomena that humans interact with, sound, right. I can talk a little louder. I can talk a little softer and so on. So, that's an analog phenomenon. So, the world is generally analog to the perceptions of a human. These computers are digital. So, if you want a an IoT device to process these analog phenomenon, it has to convert it into a digital number. So, the brightness of this light, say, I want my IoT system to do something when the brightness reaches a certain threshold, it's going to hesitate. it needs to be able to take that analog value of that light brightness, convert it to a digital number that I can use in my code. I can say if brightness is greater than 1,000 or some digital number, right? So, analog to digital converters are important in an IoT devices because you want it generally is very common to take analog phenomenon and convert it to digital values that you can process in your code. So, A to D converter analog to digital, A to D usually want one or more of these in a microcontroller. I'll note right now Raspberry Pi does not actually have an analog digital converter, so that limits it in certain ways, but it is very calm for microcontroller to have at least one analog to digital converter. Low power modes. These are common nowadays, too. When I say nowadays, I'm an old guy, so I remember back in the old days, when nobody cared about power, there's plenty of power. That's because everything was, things weren't battery powered, everything was plugged into a wall. Also microcontrollers were just much slower then, so, they didn't consume much power. Nowadays, things are battery driven, things are fast, right? The clock rate is fast and the faster it runs, the more power it uses. So, power is a very big issue these days, when you're doing integrated circuit design and system design. So, in integrated circuits, it is very common to have low power modes, in microcontrollers you can have different low power modes. So, the chip doesn't have to be just completely off or completely on, it can have these intermediate modes where certain things are turned on, certain things that turned off, or maybe something that's turned on, but it's running at a slower rate, you know things like this. Maybe you can't use the memory, but it doesn't lose what it's storing, right? So, it's got this intermediate state. So, there in low power modes built into these microcontrollers commonly, and we're not going to cover that in this class because that's a little more sophisticated than we're going to touch on this class, but more advanced IoT systems. Yeah, you're considering low power modes. You often these things often run off a battery if you want them to run a long time and that's sucked down the whole battery. So, that you often want them to run in low power mode when is possible. So, you can see this in a data sheet. You can write in the front page probably, you'll say that it has certain low power modes. Communication protocol support. So, what this is and we'll get to this more later, but these microcontrollers they have to communicate with other integrated circuits. Okay. These integrated circuits, the way that they communicate, they use some kind of a communication protocol. Relatively simple communication protocol, the way that they send data to and from each other over a set of pins, it's got to be in a certain order with a certain timing and so on. That's the protocol. We'll get into more detail about these protocols later, but some of them are UART, I2C, SPI, those are some. We'll cover those later in the class, but these are protocols that you can look in the data sheet and say, yes it supports I2C, yes supports SPI, yes supports UART, right? Now, this is important because when you're making your bigger system, say you want your microcontroller to talk to some sram, sram chip, right? This sram chip maybe it talks I2C, but doesn't talk SPI. If your microcontroller doesn't support I2C, then you have trouble. Now generally, these microcontrollers nowadays they mostly support everything and all those I just said and others, too. So generally, you have in most basic microcontrollers, you have a lot of communication protocol support, but you should check, just in case. Thank you.