 In this video we are going to describe the block diagram of the ABR architecture. The first element we are going to draw from this architecture and perhaps one of the most important is a continuous line to which most of the blocks will be connected, which is called a data bus. And in this architecture, this data bus has 8 bits. Now the next important element from this architecture is a block called the program memory, that of course is going to be that type of memory that is going to store the programs executing in this architecture. By the way, this memory is of type flash. Now the size of this memory changes from model to model, but we are going to assume that it has 32 kilobytes, but perhaps the most important is that the words or the addressable unit in this memory are 16 bits. In other words, for every address in this system, in this circuit, we are pointing to 16 bits of information. This block of course is connected to the data bus and can exchange data with the rest of the modules that we are going to be seeing briefly. After that, from this program memory, what we are going is to obtain the instructions to be executed by the rest of the architecture. Once we get an instruction, this instruction is stored in a special register called the instruction register, which of course it's going to have also 16 bits to load the data that comes from that memory. One of the most important tasks that the microcontroller has to do with this instruction is to decode it. So this information enters in another block here, which we call the instruction decoder, and this instruction decoder is going to provide numerous, let's just denote it like this, by N, numerous control signals that will be distributed all along the architecture controlling the different blocks that are going to appear here. Another very important module of this architecture is perhaps the register that is used more often is called the program counter. This program counter is a register, which is also connected to the bus, but most importantly is connected to the program memory. This program counter contains the address of the next instruction that is going to be executed by the microcontroller. Therefore, this connection is because the number that is stored in this register is used as an address to go to the program memory and read the instruction that is then going to be loaded in the instruction register and then decode it. Most of the instructions are going to store temporary operands in what we call the register files. The register file is composed of 32 registers and each one of them has 8 bits. Now this is where most of the temporary results of the instructions executed by this microcontroller are stored. This block of course has a connection to the 8-bit data bus, but the most important connections of this is to see exactly where are the data that are stored here going for the execution of different instructions. One special connection is between the register file and the program memory. In some cases what we want to do is to get some data from the register file and use it also as an address to access the program memory. Another important functionality from the register file is to load certain value in the register file in the program counter and this is typically done in instructions that change the value of the program counter, namely the jumps. And then two additional outputs of this block are entering another very important block which is the ALU or Arithmetic Logic Unit. This block is going to receive two operands. One of them comes directly from the register file, however the other, the architecture offers a choice, this is a multiplexer, a choice for this second operand to either a value coming from the register file or a value, and this is very important coming from the instruction register. And this is the case in which the instruction that is obtained from the program memory contains as part of its bits a certain number that needs to be used by the ALU which is not stored in the register file. This is a very important connection that this architecture offers a lot of flexibility for. The ALU as I mentioned before is the block in charge of performing the arithmetic logic and bit operations and it also has the possibility of writing its value on the data bus. Here we have two more blocks in this side of the data path. One is the data memory. This data memory which by the way is of type SRAM is implemented so that the program manipulates certain data that is stored in this chip over here. It has also a connection to the data bus as everything else and the two connections that this block receives is one from the register file. In other words from the register file we can obtain a memory address or data that is going to be written in memory and the other which is also very important is an extension of this immediate line coming from the instruction register that goes all the way to the data memory. Now this line over here is used to perform the following. From the register file we are going to obtain a memory address and this memory address is going to be used to access data on this memory. This is what is called indirect addressing for this connection. These are the connections though. The one coming from the instruction register is used when the instruction itself contains the address of some data and this is what is called direct addressing. So as we can see the chip offers some flexibility or some variety on the way we access the data on this memory. One more important block that is also connected to the data bus is the status register. Status register is in charge of remembering certain events that occur while the instructions are executed in this data path namely if the last operation has been zero, if it has been negative, if there has been some overflow, etc. All those conditions are stored here. This is an 8-bit register and they are all stored as a zero or a one condition. So out of the blocks that I've drawn so far, the ones inside this limit are the ones contained in the CPU. Additionally, this microcontroller is highly specialized for input-output operations. So it has numerous modules which I'm going to just draw here as a lump, numerous modules that are in charge of performing different input-output operations and all of them are individually connected to the bus and all of them can be controlled also with machine instructions executed within the CPU. And the other two blocks that are worth mentioning, we have another one here which performs certain tasks related to timers, which is also connected to the bus. In other words, the CPU can program and detect events produced by this timer. And last module, very important one, another one which is in charge of handling the interruptions of the microcontroller. And these are the blocks that contain the AVR architecture.