 Hello and welcome to this video session on peak microcontroller features and architecture. So we will be talking about the peak microcontroller 16F877A. So these are the learning outcomes for this video session. A student after completion of session will be able to enlist the features which will be discussing and then will be able to identify how this particular peak microcontroller will be suitable for various applications. When you are doing some application, whether this peak will be suitable or which chip is to be used and also student will be able to describe the architecture of the peak microcontroller and in detail we will be discussing the block diagram also. So these are the contents of the presentation. We will be talking about the introduction, then high performance features, peripheral features, analog features and some spatial microcontroller features we will be discussing and at the end we will be talking about the architecture of the peak microcontroller. Also we will go through the block diagram for the peak microcontroller 16F877A. Now talking about the high performance features, as I said this microcontroller is having various features with this it starts with the risk CPU. Risk stands for reduced instruction set computer. So this has a risk CPU and hence you will find that only 35 instructions are there. Also almost all the instructions are single cycle instructions and hence we can have the parallelism, parallel pipelining we can have and then there are few instructions where we are using jump or call and these are two machine cycle instructions. When talking about the operating speed it operates on the clock it can operate on the clock of 20 MHz. Also in one machine cycle there are four clock cycles so 20 MHz clock connected will result into 4 MHz machine cycle frequency and hence if it is a 4 MHz machine cycle frequency reciprocal of that will result into 200 nanosecond instruction cycle. It means it will take 200 nanoseconds for execution of a single machine cycle instruction. Then it has got memory so talking about the memory three different types of memories are there. Flash memory it has 8 kilobytes into 14 so 8 kilo address locations are there at every location you can store 14 bit data. And then you have RAM memory data memory which is RAM so 368 bytes of RAM we have again it is divided into four different banks along with the program memory, flash program memory and data memory here we have got the E-square prompt data memory also which is 256 by 8 and this IC is compatible with the 28 pin or 40 or 44 pin peak microcontroller series microcontrollers. Now talking about the peripheral features as we know that the feature of the microcontroller as compared to microprocessor is so many peripheral features peripheral hardware is available inside the chip itself. So let us look at what are the peripheral features this microcontroller has. So it has got timers three timers are there timer 0 timer 1 timer 2 you will find some additional facility here that timer has got something called as pre-scalar or here you will find that this timer has got pre-scalar as well as post-scalar also. So 8 bit timer timer 0 is there 16 bit timer timer 1 is there and timer 2 is also there which has got pre-scalar as well as post-scalar. So the key role played by this pre-scalar and post-scalar facility is you can extend the delay for overflow of the timer you know that the timer size will decide how much time it will take to overflow. So you cannot increase if you want to have higher delays it is not like just go on increasing the size of the timer register instead of that you may go for different pre-scalar and post-scalar options available to this peak microcontroller timer. Along with the timer it has got one feature called as CCP it is capture compare and PWModule. So capture module is 16 bit and compare module is also 16 bit and here basically what happens in capture compare is there is timer register and then capture registers are there then CCP registers are there. So timer register value may get stored in the CCP register when you are using capture. Here some timer register value is compared and then when the result is there that result may be reflected on to the PIN. Here PIN may decide when to capture the contents of timer in case of capture mode in compare mode comparison is done between timer value and CCP register and then when there is a match between these two a signal may be generated on to the PIN also as well it may generate the interrupt and also it has PWModule which may be used for speed control of motor you can generate PWM signal with different duty cycle also. Now continuing with the peripheral feature it supports the communication serial communication as well parallel communication is supported. So synchronous serial port it has got MSSP module master synchronous serial port module which supports two protocols one is SPI and another is I2C. Along with this MSSP it supports USART module USART on universal synchronous or synchronous reception transmission is possible through this peak microcontroller. Not only serial this parallel communication is also possible through this particular microcontroller. Along with this it has got a brownout detection so supply voltage if it is reduced below some threshold value so that is brownout voltage and then that has to be detected and then it should result into the brownout research so this feature is also available in the peak microcontroller. Now talking about the analog features so not only digital features you have for the serial communication parallel communication it has or that CCP module it has got analog features like it has inbuilt ADC. So this microcontroller has got inbuilt ADC it's a 10-bit ADC and 8 channels are there 8 different sensors or analog input can be connected to the microcontroller and its digital conversion can be done one at a time and that conversion can be of 10 bits. So 10-bit conversion 10-bit resolution you can get by using this particular microcontroller it has got a facility of brownout reset then it has got analog comparators also two analog comparators are there and for that you can have you require some reference voltage so that reference voltage is also programmable and then comparator outputs are also accessible externally onto the pins these are some of the analog features. So now let us talk about some spatial features of this microcontroller so it has got around 1 lakh times erase write cycle means you can have flash programming erase and write cycle for 1 lakh times not only that 10 lakh times what you can do is you can have that erase write cycle for the e-square prom electrically erasable programmable read only memory typically then it has got memory retention of the data from the memory this e-square prom retention is more than 40 years then self programming is possible ICT in circuit in circuit serial programming is possible so no need to remove the controller and then move it to the programmer program it again mount it onto the your board no not necessary you can go for that in circuit serial programming feature then it has got one very powerful feature and useful feature called as watchdog timer which may be used to prevent the program going into the infinite loop so you can have code protection also you can have programmable code protection then sleep mode is there for power saving purpose oscillator selection means you there are different oscillator selection options available you can select RC oscillator then external oscillator selection options are available so it is selectable oscillator option and then in circuit debugging via two pins is also possible now this is in brief architecture of the peak microcontroller so what you find in this particular peak microcontroller architecture is you have got a CPU which can work with the 35 instructions then oscillator is required internal oscillator is also available and ADC is there reference voltage for the comparator which is required is available as well CCP module PWM module ports are there five different ports you are finding here port A B C D E and then it suppose interrupt watchdog timer as well the reset circuit is there and talking about the memories these are the different types of memories program memory e-square prom memory RAM let us look at this architecture in somewhat detail so let us talk about the block diagram of peak microcontroller so what you are finding basically what you are finding on this side is these are the port pins of the microcontroller five ports are there and if you see most of the port pins are multifunctional so more than two or three functions are assigned to the same pin this has to do with so many peripherals are there and then if you do multiplexing so number of total number of pins will be reduced if you do the multiplexing so if you find here if you look at here you have got a flash program memory and here you have got the data memory so as I said there are advantages of going for the Harvard architecture so what architecture is there for peak microcontroller you are finding program memory and data memory is separate hence it is nothing but a Harvard architecture as well if you look at this program memory what is the size of the program memory we have seen it has it supports program memory of 8k x 14 so here you have 8k different locations now to access these 8k locations you should specify the address of the instruction so you know that standard register called as program counter register is always pointing to the instruction location so if you have 8k locations to address these 8k locations you will require 13 bit address so you find here 13 bit address is there so that is available always in the program counter register now what interesting thing here you are finding something written is stack memory so in case of peak microcontroller this stack memory is neither part of program memory or data memory it is a 8 level hardware stack fine so now you find that this program memory it has program upcodes are there every upcode will be of 14 bits so that upcode goes to the instruction register now you can find that when it goes to the instruction register either that instruction may be directly given to the instruction decoder when it goes to the instruction decoder what it does is it decides what timings and signals is to be generated and then when you want to execute basically the instructions are getting executed here at ALU level and then for the instruction operands are required so most of the times operands one of the operand is usually available in one register called as W register it's like a accumulator register of microcontroller 8051 so W register is there and then as it supports three addressing modes immediate addressing direct addressing and indirect addressing you'll find that if it is immediate addressing upcode or that instruction upcode itself has the operand available so that will be directly taken and made available for ALU if it is a direct addressing then direct address is available and that seven bit address you're finding here in the instruction itself then remaining two bits are taken from the special function register called as status register for direct addressing and then it can point to any of the memory location inside the data memory and that will be available to you as a operand if it is a direct addressing if it is indirect addressing then FSR is one register used for indirect addressing along with this FSR one more register INDF is used and then through indirect addressing also you can have access to the operand so you can have one or more operands one may be available in working register another way be the instruction itself or directly by using direct addressing it may be made available or through indirect addressing it will be made available to the ALU ALU will run that particular code and whatever is the result may be available in the working register or it can be directly stored into the file register also and then other features are like these are some typing features timers are available watchdog timer then power down mode so powered power down timer is available then this is the reset signal available power supply signals as it has timer timer zero timer one timer two so these timers are shown internal data square prom is there ccp module as we have discussed in the feature ccp module is available it's supposed serial communications usat module as well it's almost parallel communication so psp module is also available here and remaining things are the port pins so this in general architecture of the block diagram of the peak microcontroller well you find that it is having hardware architecture it's supposed direct indirect and immediate addressing as well it has got these very useful peripheral features so these are the references used for this presentation thank you