 so the transactions using dna are peripheral to memory as i explained memory to peripheral it could be that processor wants some data to be written into the peripheral so that can also be given off to the dna and dna can initiate so processor will keep some data into memory and then maybe ask the dna to take care of writing into the peripheral or it could happen from memory to memory because that could be a wrong one part of the memory which is know where the wrong is each wrong or wrong flash and then that needs to be copied into RAM before the data is before the code is running or maybe the data portion has to be written from the code image as i explained in the previous lecture so data has to come to the RAM from the flash initialized data so those kind of things can be done by memory to memory copy so this will be mapped to some physical memory and this will be in a different memory area physical memory area and the copying happens from memory to memory so this all these transactions can happen data can be quickly moved to by dna without any cp resources free of other operations dual AHP master birth architecture one dedicated to memory accesses and one dedicated to peripheral accesses so there are some you know these dual master architecture where one is dedicated to peripheral birth and then other one is dedicated to the memory so because mostly what you see in the system is a data transfer but it means memory to peripheral okay so that can be happen you know performed using dna AHP slave programming interface supporting only 32 bit accesses so for the dna we need to consider it right as I mentioned that we have to give a start at there and then what is the length of the transfer these those kind of information written into the dna okay into some registers using a wave programming interface supporting 32 bit accesses so during that time while configuring the dna programming in the dna the dna behaves like a slave from the ARM perspective so ARM is a master may be a ARM or any other processor who is initiating a dna transfer will be a master and dna will be a slave so it is writing into it saying that this is the starting address and this is the length of the data and then what happens once this is done when the dna when it starts off interacting between memory and peripheral and then performing a transfer the peripheral data comes to the dna and then goes there okay it could be you know cannot be written directly there may be a you know transaction happening between the initiated by dna between memory and the peripheral so that kind in doing this time dna behaves like a master because that is what is controlling the first transaction so so dna takes a dual role one is it behaves like a slave when it gets programmed and then it behaves like a master when it has to perform the job done by the processor by writing into its own register okay and eight streams for each dna controller so there could be a multiple dna controller okay and there can be multiple stream and within each stream there can be multiple channels okay so it is whatever I explained is for only one transaction but there can be multiple transaction program and then they can all be in a happening in parallel because the bus ASC bus is very an high performance bus and the devices that it is normally interacting with are all lower devices in this case even slower devices like may take some time for making the data ready in that you know it both means the same but the they I know the flow devices means the data rate expected from the device may be you know less whereas there may be some memory to memory transfer where it may not be slow but the time taken to set up the things may take little more time so during that time what happens the bus can be multiplied it could be used by some other transaction so the dna can be programmed for eight streams and then within eight streams each channels could be programmed okay so this is a generic block diagram of the dna okay so there is so within the dna there is an orbiter this orbiter is different from the orbiter that we saw at the ASC bus level okay ASC bus level there is an orbiter which decides who is the master for a particular transaction okay so choosing that is done by an orbiter on ASC bus within the dna because there are multiple channels and multiple streams are there we need an orbiter inside so there may be so many request from each channel coming in and one of the channel selection is occurring and then that request goes and then the transaction happens so the memory port one master ASC port is connected to memory and the other one is connected to the periphery so what does it mean actually this particular port could be a master on the ASC bus that is what I am saying master one master two so the dna controller excel gives the two masters on the ASC bus gives the two masters so that means they can each of them can compete for the bus access independently though it is from the same controller so it could be for a much different stream the transaction may be happening it remains memory to peripheral or memory to memory so it could behave like a two masters and then while programming it behaves like a slave when it gets programmed it behaves like a slave so there could be some already programmed and the transaction is happening through this port and then another dna channel gets programmed through the slave port so all this can happen in parallel so this I have taken it from an ASC micro as a reference control this is one of the implementation of the dna block on the on the ASC bus okay so as I told you the data has to flow through the dna so when periphery device is giving some data it has to be copied to the memory it comes into the dna okay and then goes to the memory this is the memory so this is the port taken by the data flowing from peripheral to memory so that is the dna has a P4 it normally is a core word that core word of P4 so it gets written into this and then a bus transfer happens to the other side so this transaction can happen in parallel so the data could be written by either any of the streams it could be read by any of the streams so it comes into the P4 for the data it reads as a block of data and or it accumulates the data here in the P4 so as then there are some peripheral devices like you saw you saw you are no serial device may give a byte-wise data so it has to to this way in the case if a value a nibble is A suppose what happens is it will be converted in the BCC form okay occupying two nibbles this will be 0 and this will be 1 so effectively A will become the 1 0 so this A segment display can show this information no not an issue suppose we have a C which will be occupying the nibble value of 8 plus 4 right C so this is the equivalent binary representation of C but this will be shown as 12 so it will be in a BCC representation this will be actually 12 so it will have 0 0 1 0 and then this will be 0 0 0 1 and then okay it will be transferred to the display so that kind of BCC numbers are required because the time when it is displayed on the screen we want to state as you know 10 10 hours and 10 minutes we want to show the time in this format not on not like A that nobody will be able to comprehend it so that is the human readable form so what is the time of the day to talk or a calendar two programmable alarm interrupts and a periodic program of wake up flag so it can be multiple but it can be alarm interrupts that means what you can set up an alarm say that you wake up or given interrupts after this time period or after this time is alert suppose when it is time time is 5 o'clock in the morning generated an interrupt so that it will in ISR will be called and then that will take an alarm and then you will wake up at 5 in the morning I do not know where you want to really set it up at 5 but it will be good for you to review or read up architecture at this time okay it will be good auspicious time may be you can try for 4 AM after being successful at 5 so you can set up a programmable alarm interrupts periodic program of wake up flag with the interrupt ability so it can be an enable interrupt so what is also includes an automatic wake up unit to manage low power mode so as I told you the ARM processor SOC ARM based SOC are meant for embedded system what happens when there is no activity from the end on okay there is no signal or nothing is happening it is like you may have noticed when the laptop is you know you go out for 10 minutes to come back may be based on the configuration you would have seen that the display is blank and then after sometime may be it would have shut off the processor also and then it will be sleeping so how does it happen how does it know that you are not sitting in front of the computer because there is no keyboard entry there is no mouse movement keyboard is not tap tap tap and then there is no mouse moment okay so once it does not see that any of these few things are not happening there is no scrolling of the display and then the display first display dies and then later on then may be whatever is there in the DRAM will be copied into the disk and then the whole processor shuts off so all these events are happening how know it will be counting the seconds or know how much of time has elapsed since last input was received from the keyboard or a mouse so these kind of things can be programmed using this kind of a RTC wake up unit so once we set up and then it goes to sleep it has to come back when you come back to the PC and then move the mouse then what happens that initially the mouse driver might be active so it may it may wake up the rest of the software there is other OS and then know there will be resident OS some part of the code will be running and then the may be the power to the some of the other modules or peripherals will be shut off so that the other peripherals does not consume power may be monitor will be stopped in the sense this won't be powering the monitor but the data which is going to be shown on the screen may be in the graphics processor software and it will be stored so this is a kind of a PC environment I am talking about but in embedded world also we can do that by shutting off the modules as the time progresses the activities are no signals coming from external world then you can go to sleep mode so that it stays power especially your mobile or tablet if they need to do this to save power so so we have provisions in RTC to plus wake up on different so 2 tiny bit registers contain the power expressed in DCD format so I am showing some example but it may not be only 2 it could be anything so it could be for showing this format and then day of the week day of the month and then year so sub seconds value is also available in binary format so these are all in DCD format because we want to show it in this outside world but other data could be in binary format so this is what is happening in the real time clock now compensation for even the sleep year is implemented in the hardware daily saving so in the US or in Europe you always see that the clock gets shifted by 1 hour or shifted back by 1 hour based on whether it is summer or winter so these kind of changes happens on a particular message now some time within a particular time in the calendar now day of the calendar so once the calendar shows that this is the time then that 12 midnight happens it can automatically do this because it is very important for embedded system to be aware of this daylight period because the system may be in a flight okay so it could be in a flight so it needs to be aware of the changes otherwise you will have dangerous you know if the time is not adjusted accordingly okay so additional 32-bit registers contain the programmable along sub seconds and second minutes per day a digital calibration feature may be available to compensate for any deviation in crystal outside the field so that is another thing because of the temperature or because of the material the no degeneration the crystal oscillator may oscillate so because of the accuracy of the basic time plastic measured by the processor will be adopted so that can be compensation for that built into the system so as long as the supply voltage remains in the operating range the RTC never stops regardless of the device that is very important so if you have seen in the motherboard also there is a button battery will be there to make the RTC run never PC so even if the battery is down laptop battery is down and your power is you are not connected to the power and it is down for a long time still the RTC will be running because of a small battery that is there in the motherboard so the clock the basic clock has to be running because we have to keep track of the date and time of the calendar the device has been down so when you bring up the OS again you have never seen that the time and the calendar because of the RTC running continuously so it could be in a run mode or power mode or 100 reset there are no different device status and what are the other features daylight saving compensation actually already two programs alarms can be triggered by any combination of the calendar speed or if it is a holiday may be if you are scheduling you are scheduling an event or particular time then it has to pop up a window to say that alert message alert has to come saying that A you are supposed to meet at this time it is already 4 o'clock so please so this kind of how does it wake up because based on the calendar event so what is the current time or calendar date and time and then the event even what you have mentioned it will compare these two and then set up a any alarm or alert message alert so that the pop up window comes upon your screen to alert you automatic wake up unit generating periodic flag that triggers an automatic wake up input so you may want to set up an alarm or you want to set up a periodic input so those kind of things can be there you can connect to it timestamp functions for event saving so sometimes when you are know may be you have heard about the data recorder in the flight what you see at the black box so it has to record the information about all the flight details periodically so it has to log that information what are the different sensors engine temperature and their rpm and their speed and their inside temperature, outside temperature whatever you know or pressure padding pressure, tire pressure whatever it is you know whatever it is needed and then you know cockpit dialogue there is so much of information needs to be saved and those functions and some events have to be timestamped so when particular event has happened suppose if any anomaly is found or any particular event has happened engine speed has crossed on threshold or some break liquid hydraulic braking system as a liquid pressure may be a leakage then if the pressure in the hydraulic braking system as you know some below a threshold then what time it has happened what event has happened so all the timestamping of those events need to be done so that is possible then even for debugging purpose you may have to timestamp from event so that all is possible in the object what are the applications it could be done in a system of server because whatever I have shown you gave you as all embedded systems but even the router when it know there is a big network traffic because of network traffic there is a path may be a particular path is completely you know stamped with lots of in that case what happens is may be the router has to find another route for a based on the traffic condition it has to find another route and it has to register the event also when the condition has happened in a particular route so that it can know the network management this know management can get the job of all the information then they can take active action may be introduce another highly high speed link so that this congestion can be removed or then you will see that the particular time when this condition happens then they can consider the network accordingly so all this can be done with a RTC is supported there so handle know all these devices have know RTC support setup box and this is recording may be you may say that I want to record a particular program at 7 pm and it should record for 1 hour so this you can set it up in the setup box and it records it know it opens you know it connects to the home network attached storage you know NAS and then it copies you know TV program whatever is coming into the that can be copied into the NAS so it generates a file at a particular time and it can come home and watch the playtime so for this we need a RTC otherwise we cannot do this so it could be printers they also need RTC support and especially very very important these kind of medicine distances will be programmed for a particular delivery of medicine so that needs to be programmed so there are so many devices like this which need to be aware of RTC so whenever you take photos you will see that on the down photo date whenever it was taken with it around the time so you want to know the time when, date and time when you took a particular snap so all this is possible because of this RTC support okay in the system now let us get into another world of period of digital converter you may be aware of all this it goes too fast the signals in the real world are analog all of you know and real world signals converted into digital form before they can be manipulated so who does that analog to digital converter does it so what are the examples scanning a picture using a scanner recording and using or voice using a PC even the lecture that you are hearing now is done by an ADC by whatever I see is getting converted into digital information and then say along with this is getting converted into digital form and then say for that to be reproduced later so voice call now you may have used type and you know whatever you speak and if you have a video call then your image everything is converted into digital and you know sent over the IP packet so it is all done in digital hearing your audio CD on a PC app playing a BBC 0 TV viewing a PC chat app playing by audio with the help of ADC so basically the input are the signals are generated in the audio world and then that just the microphone whatever it converts your speech or the music it actually generates a a pressure difference and then on the microphone it generates an audio signal like this but finally when it gets converted into or audio file some other format they need to be stored in a digital form so this analog signal is converted into digital world for that to be represented in a different format and compressed and then stored or sent over the network so that is done by the component ADC so considering analog audio signal above let us assume that it is an audio signal Y axis represents a voltage so this could be a pressure sensor but generally the signals are generated in terms of voltage or current that amplitude of that it may not be only voltage it could be a current and then that is the electron is converted into we voltage and current can be changed from one form to the other and then it is sampled at a particular instant and then the value is converted into some digital form for you know it could get all these words and then it is stored at a digital number so the voltages are in Y axis and time is in F axis so ADC takes samples from analog signal periodicity it has to be periodicity you cannot take one here and the one there and then you cannot reproduce the signal so you should take it that you get not all the changes most of the changes so that we can easily grab finally plot the signal more or less closer to the signal whatever let us see so the digital information is only stored and then later on it is reconstructed to form this particular analog signal later on when it has to be reproduced at the playing playing this audio so frequency of sampling is called sampling rate each sample is converted in number of voltage levels so you may convert it into 8 bit voltage level or 16 bit level so which one you know this is 8 bit and this is 16 bit then you will know that this has got higher resolution because we can define suppose if we limit this to may be this is plus 2 volts and then this is minus 1 volts normally the dynamic range may be you know you assume that it is plus 5 to minus 5 volts because just later the signal is not stated this is the dynamic range it could be more than that so if this is the dynamic range of the signal then this can be plot mapped on to 002 may be suppose 8 bit it will be ff correct then based on this it could be may be may be mapping to some you know 26 and then this may be mapped on to you know a 0 okay like this you will be converting every value it will decimal value and then storing it in as a 8 bit pattern and it will be done in sequence now if you are taking 10 samples it will be sequence from 0 to 10 all will be generating an 8 bit value coming out so this is what is the sampling this is called the frequency of looking at the audio input or any analog signal is called sampling rate it is also sampling and the field which you do is a sampling rate so this is the dynamic theorem most of you if you have taken communication or even if you background or a signal value you may be aware of this but just for a continuity state I thought I will mention it you have bandwidth limited signal what I mean by bandwidth limited is that the change in the frequency of the signal is limited suppose even in an audio signal human voice then through your high page whatever you try you cannot generate more than that 20 hertz signal so 20 hertz will be more than this and then maybe 1 hertz will be smaller so whatever it is if you need to sample this you need to sample it more than this rate otherwise you will miss out on the data so we should first of all know what is the frequency band of the particular signal that we are sampling so then only we can decide the sampling rate and we can set it exactly if the sample data rate actually is twice the maximum frequency see once I say that our speech can have 0 to 20 kilo hertz you can you will not be at always screaming at this frequency maybe you speak mostly here maybe if you are hearing a song or something or even in most speech song maybe you will have audio instruments coming into play but you know human voice if you are only singing in somebody opinion or you are singing then sometimes it may reach this high pitch ok the high frequency band of the signal so but we need to take cater for the maximum frequency that might be generated in a speech signal so if it has seem to be 20 kilo hertz then we have to sample this at the 40 kilo hertz that means we may have to generate signal 1 by 40 or 1 by 40 into 10 power minus 3 is 1 by 40 so every 1 by 40 millisecond the sampling has to be done because we do not know whether a particular time in point in time whether the signal generated is at this maximum range of at this range of mark we may have to do it twice the maximum frequency this spot is the called you know shannon's microsoft criteria that is the sampling frequency will be atleast it should be greater than or equal to 2 fm fm is the the maximum frequency component of the message ok so I hope what I gave and this theorem you are able to understand it ok so it is the parameter the value of each sample the point is told in a fixed length variable if the variable is of 8 bits then you may have 255 values 0 to 255 values or 0 to 6 65 65 k so ADP divides the OHS into n possible part as I told you 0 to 255 it divides the dynamic range of the signal into this many parts ok this is called dynamic range and then the n is given by the variable type and n is higher n better resolution or quality of the sample output so your output will be more closer to actual value see what type you do feel analog signal will not be stored as a digital form but if you want it to be closer as much as possible then you may have to have a more resolution ok in the case the error will be the preserved minus something will be there ok so but most wise this is nearly but if you increase the width of the sample then you will need more space so if you are one hour recording of mp35 no with a higher quality that is why you will say that whenever you are saving some video it will say high quality or low quality or medium quality so based on the quality you may have to sacrifice on the storage space for storing the value that is after the ADC another digital conversion is done in summary itself sampling gauge corresponds to X axis and resolution and the variable type is represented in this resolution ok so now let us see what is inherent on ADC so ADC takes the voltage input and then generates the digital data the n is the width of the data which is coming out so I have taken I have got this particular link below and you can have a flash ADC that is if we are you know electronics background but still I will explain you I think that there is a voltage source which is called V reference please remember this may not be same as the operating voltage of its IC so normally now we are trying to build ICs which are operating at a lower voltage maybe 2 volts or 1 volts or even it was earlier 5 volts and it has come down drastically because we want the low power devices means the voltage process also is coming down in terms of value but as far as ADC is concerned there is a separate voltage source given and which happens to be a more stable the reference which is called a V reference voltage I will talk about this in the next slide assuming that there is a register ladder like this and then you have maybe a fixed values then a simple example is suppose I have 2 registers this is ground and then I am and assuming that this is 1 K or I will give you for an easy calculation 0.5, 500 ohms this is 500 ohms this is very not practical if we are putting a 500 ohms for a 5 volts better be a high voltage register is put here otherwise it will blow up the circuit so 1 K so what is the current simple current is V by R so 5 by 1 K 500 to 500 so it will be 5 million correct so what I am saying is this is 15 to 2 voltages so 2.5 volts come here another 2.5 volts have to come here because it is an equal resistance and it will divide the voltage equally I have put only 2 loader like this and then I have voltage comparator okay like this this is the comparator and then I am giving an input voltage something like 2, 2 volts then this is closer to this okay it will give an indication that it is better when this 2 and 2.5 volts so any 2 volts are below we will say that this is the output okay it will generate a particular output maybe 1 or 0 and if it is above it will generate 1 so based on the voltage okay if you need to take a sample it is 2 places okay maybe this is only one place I have to give one more resistor so that I will have one more sample taken so that I will have a range of values in that case you may have to divide this further so you can I know basically you can understand that as I put more resistors here and dividing this 10 volts is there and 10 resistors are there dividing it into 1 volts each and then I will give a range of values 0 to 1 volts if it is an input then it will generate from 00 to 111 so it may generate some values okay it will be coded as this and then 1 to 2 may be 001 so like this we can generate based on the value which is coming and then what comparator pire so all of them will not pire so one of them because the voltage given will be matching with one of the values because you are dividing the reference voltage into multiple data points okay samples and then this will be equated equated to one of these values in the ladder here okay I hope it will be easy value will be understood but I hope this explanation is clear enough so basically this is voltage comes earlier and then if sampling needs to be done then the digital output is ready okay this is one way of doing it another what is needed the voltage reference provides an accurate and stable point for ADC and DAC voltage reference can be 50 different levels of voltage accuracy and temperature availability so we can pick different levels of voltage accuracy based on the resistors what security you put normally okay the V reference that we need to put normally a power supply will fluctuate with current drawn okay normally you see that even in our home when we load the no resist on all the no resist on the AC or dB everything then you will see that the light goes down in terms of brightness so as the current drawn increases the voltage will be fluctuating but this V reference is supposed to be no resistivity of the current drawn it will maintain the the ideal voltage so power supplies are usually designed to be plus or minus 5 which is normally but in this case it is plus or minus 1 percent accurate so if you say that the V reference is 5 volts you will never be seeing a voltage which is very beyond this 1 percent range so another implementation is DAC based so it is very simple what is done is which comes here and a compiler is there what is the counter based counter which is starting from 0 to some max value okay so this max value will correspond to the maximum expected voltage from here so V max but it will give out values from 0 to V max okay maybe 0 volts okay to V max in a some particular steps this value so whenever the input voltage is closer to one of them then it will fire this output will be controlling it and it will stop the counter then that is what is the converted value that is the wherever the counter stops is the actual converted value of the voltage source so we are using a DAC inside a diagonal for implementing a ADC this is what is very interesting so we use a DAC we will talk about that how it is implemented but what is done is it is counter is made to run whenever sampling has to be done the counter is made to run from 0 to some upper based on the size of this if it is 8 bit 12 bit maybe we will have no maybe 3 Fs okay so it will go from one to the other and then each of these values will correspond to some voltages from 0 to V max it will be split into equal parts so whichever voltage that comes across which happens to be at that time whatever is the current voltage then the counter is stopped and the counter value will be the converted decimal representation of the input source okay I hope this is clear so we will be starting the counter and ending the counter and there will be a clock to move how fast this particular counter runs the main problem with this activity is that it is very slow because it has to every time whenever it has to stop it has to run the counter from 0 to the maximum value so it would occur 2 power n minus 1 clock because the maximum if you have n bits there will be 0 to 2 power n minus 1 possible values that could counter take and counter takes one clock to no increment from one to the other so that many clocks it will take so to count from 0 count from 0 to 2 power n minus 1 so it is slow converting any given value to a particular voltage okay I hope this is understandable so these are different methods of implementing the ADC this is another successive approximation this is called this is what is normally you know implemented in any of your you know ADC what you see advancements but here what is happening is the values are actually chosen okay it is like a binary search it is trying to instead of randomly going from 0 to ff you know it will put some value which is in the middle okay 180 okay this is the middle value and then it will check whether the value whatever is input given above this or below this if it is above this that means what this is a smaller voltage than this particular voltage what this is a 0 represent a 0 represent in the case what happened it will put it will maybe give a another you know 1 it will be 0 1 that is 4 0 so it will be middle of this and then 2 0 okay like this it will be go on it is all extra business okay you can convert quickly quickly based on this successfully approximating the value what is coming based on the result so suppose if this is more or less than this particular value the count will be this value what is generated the counter will be varying based on the value which is there so this is called successive approximation advantage of this method is speed at worst case it will find the correct business value for example n clock cycle n is the number of bits used so worst case it will be maybe fluctuating because of that you may have a problem it is not exactly a binary search because when you are looking at the voltage source it may be in a border case where you may not be able to exactly find where it is so you may have to do the maximum of n bit n clock cycles if it is 8 bits if you take maximum 8 clock cycles to finally converge on to the value which is closer to the input voltage so this is how it is implemented this method is most used one so it is it is now it could be a 12 bit or 10 bit or 8 bit or 15 bit consecutive calculation that is n and then in turn of generation at the end of conversion single and continuous conversion modes so after the conversion is done after the sampling is done it can generate one more for automatic conversion of channel 0 to n so you may have multiple channel with analog signal will be various sensors for connectors then ADC will have multiple channel so it will be converting this first and then next this next this it can go into a particular order by sampling the values of different input so periodically if you want to know different parameters all the sensor connected to the system we can periodically the ADC can be sampling all of them and then getting the value and generating a digital information about that so data alignment with n in this data coherency it could be a no 8 bit 12 bit means it has to be aligned internally you know you have to 12 bit how are we going to store it within a 32 bit register okay because normally you see that our internal registers in arm are 32 bit so but the ADC output is not even close to 32 it is all you know sub 32 so how do we store it so that is another thing and then alignment channel wise programmability sampling time now maybe you can say that some data is well calculating more then you can sample it at faster rate maybe this is a slower device or not a slower device but the data which is coming out of the device is not fluctuating so much so you and it is not very important also that you can you know sample it at a slower rate so you can decide a sampling rate based on the device and the importance and the kind of changes you expect on the particular device so external trigger option with configurable polarity for both regular and integrated conversion sometimes you may have to look at the data only when some particular event happens okay so sampling is not done always suppose if there is a you know motor speed is 1 okay and then sensing the temperature of the motor is another data suppose speed is exceeding some limit then maybe it is better to look at the temperature to see whether it is exceeding the allowed threshold value okay then you can control the speed or you can cool cool and maybe you can stand more to cool down the motor you know it can be any some action can be taken or you can inform the user that you know you are exceeding the allowed speed limit because the temperature is exceeding a thing and maybe if it goes beyond some point maybe switch off the motor possibly so all these things can be done only when you sample the data based on some event so that can be that is called injected conversion so you have to sample the input based on some event so some more features discontinuous mode so you do not have to sample it periodically but at a in a discontinuous mode you know you do not have to do it in a continuous fashion so dual or triple mode there are multiple ADCs can be there and then they can be sampling the data so that will be dual mode or triple mode and another important thing is DNA storage on the ADC so ADC is a I know is a peripheral like that and I told you also DNA can be connected between peripheral and memory correct so now if the peripheral supports a DNA then we can do that so some of the most of the peripherals normally in the ADC support that so we can do a DNA transfer also we have to delay between conversion that is also possible internally removed so we can you know delay the sampling and then internally sampling of 2 devices between each other also we have to control and status it mostly always any peripheral device will have a control register and the status register and maybe interrupts enable register so you can enable the and there is a device enable so enable it and then no interrupt could be enabled optionally and then interrupt and then we can consider it control register and different modes can be set up so then the device starts off so similar to what we did the peripherals also like this using this and these devices can be accessed using a typical memory map register on the HP pressure okay mostly peripherals because it will be an ADC so that is all on ADC now let us quickly look at that before the control discussion so normally digital to analog conversion is similar to what we saw flash ADC okay what is happening is there is a reference voltage we want to convert a digital output to a something analog okay so the operating of this feature it is based on the bit pattern okay so that is what is controlling the feature you can consider you know 8 bit mean 00 to F at any value if it is 1 maybe you may say that it is close or if it is 0 it is off you know whatever you know once you do that you can close multiple things switches maybe this and this are close so it will sample different voltage values based on which is connected and then we add up to that and then generate an output okay so you can have 2 power length combinations output coming out analog outputs because of voltage levels and then that takes you know converted into a analog output so this digital input is coming into the system and then it operates the features and then analog output goes so it is a dash digital analog so conversion this is a flow of data okay 2 dash and it could be done because this switches are done in one way because so many changes here there will be glitches on the output multi-level switches are there and we can do that using this okay so finally the output that will be a stable output which reflects the values of these data bits okay digital outputs and then this as I told you that 12 bit aligned you know whenever you have a ADC or back output which is 12 bit we have an option to choose the way how it is stored in a 32 bit word it could be no return from 0 to 11 okay this is called right aligned okay in 2 places okay this is another one this is the 16 to 31 and this is 0 to 15 after 32 bit register you can have 2 samples written into it okay both are aligned to the right side of the 15 bit word you know so only 12 bit word in a 32 bit register okay 12 bit word so it takes only this much time 16 this is 16 and then this is another 16 okay another 12 bit is stored so this is right aligned because it is aligned to the right side of the half words of 32 bit okay so this can be configured similarly it could be less aligned so when I show the 32 bit this is 32 bit this is 12 bit this is another 12 bit let me closely this is 16 bit and this is this is LSB and this is MSB MSB this is bit 0 this is 31 see the samples are here and here it is left aligned left style aligned okay both are so these are 2 different ways of storing track converters with one output channel each and then left or right aligned it will be more synchronized update capability so we can update the data which is given by different track outputs in a synchronized way noise phase generation so there are so many you know in the general use case scenarios where you want to generate noise and then test your system and then noise conditions how your serial port is functioning encryption data or you know what kind of you know there are correction port that is implemented how effective it is in the presence of noise if you want to do that you want to inject a noise into the system that could be done in a digital world because you know that no analog signal is converted between no using this to digital world so you can introduce a noise and how the receiver receives it after a receiving end okay so then it is equivalent to introducing a noise in the channel so there are so many ways communication channels are tested using this even a triangular wave generation is possible if you go triangular wave okay and then doing that channel for independent or simultaneous conversion you can do independent simultaneous conversion also and DNA capability similar to what I said in the video there is an error reduction so there could be possibility that the signal goes below the successful value external results for conversion so if some event happens and then you do a DFI input voltage reference could be read okay so this is about that so this small introduction about pulse width modulation because signal is a method for generating an analog signal using a digital source so we want to generate analog signal so it could be a digital signal so you can generate in so many ways okay so this is called a cycle and this is on and this is off so the on time there is a total time percentage is what the duty cycle is percentage of time it is on is called duty cycle so if it is a very good square wave the duty cycle will be 50% okay otherwise if it is a smaller then you will get a 25% and all that are more so this is called a duty cycle and then how frequent the signal is coming what is the time you know you can have a same 50% duty cycle but the time could be smaller it could be smaller size but it is 50% much smaller than this so the frequency decides this time this particular time width and then the duty cycle is how long within that particular time that particular clock is on so this is what is the definition of these values so duty cycle the amount of time the signal is on on state percentage of total time the frequency determine how far the BWM completes the cycle so pulse width modulation is something to generate based on the analog signal then you know you change the duty cycle and the frequency of the signal then there is what is called a pulse width modulation okay the BWM is one of the peripherals that could be there as a part of the system therefore how far it switches between high end wave state it is normally used for powering motors okay if you want to give input signal to the power motors then okay BWM normal algorithm used to you know run the motors you know how to power the motors okay or maybe you can do an LED if you want to brightness if you want to you know control in a linear way you can do it using the BWM so it generates the signal in this way so it is an automation technique confirms the width of the pulse normally the pulse duration based on the modulation signal although this modulation technique can be used for transmission okay it is also possible for transmission inquiry its main use is to allow the control of the power software to the optical devices especially to internal initial use as a matter and then in addition to the algorithm it is one of the two principle algorithms used in photovoltaic solar that which are there main advantage of the algorithm is that power loss in the switching devices is very low that means when you have a switch okay it is in a transistor what happens is either the transistor will be in a or mode or on okay so what happens during this time on is on or off the power drawn by the secretary is a less or a 0 in both the cases okay in the based on the low okay so BWM is at power loss in the switching devices very low because of this on and off mechanism used for the on or off system this is on state and this is off state so the power consumption is minimal in this video means you choose certain communication systems where duty cycle is used to convey information you can even use the duty cycle okay this is one information maybe this is another information okay the frequency is same in both the cases but the duty cycle is different okay so you can even convey some information using this other modules or programs to generate BWM so how we are doing the BWM that we want a particular time this should be on and particular time it should be off so timer can be running with a finer clock and then you want this counter decision then for this duration it will be kept on and then the timer will be running for you know some more time which will be little longer time based on this off time then it will be switched off the kept in the off state for such a long time so on or off where switch can be kept in the flow state or in this state based on the timer running so there might be a timer used inside it to implement the BWM signal connection so I think this session was very useful to you is a just a generic overview the purpose is not to give you a complete information about everything under the sun so the programming is particular in on I am not talking detail but you know it is already we talked about this in using the APB bus how to access the particular peripheral device and then I have also told you that AHB slave configuration is used for configuring the devices mostly if it is your DNA and everything but if it is a peripheral it will be on APB slave but it will be written still if it is an APB also if it is a consider to be an AHB slave so please understand even the peripherals are sitting on APB bus and you want to consider the devices if it will be still be an AHB slave as far as the on is concerned because APB bridge is consider to be an AHB slave and then it is just written into the peripherals so this is how programming is done in on using this peripherals and my intent was to give you a overview of the peripherals so that you understand in your system these peripherals are there and you need to program them or you need to define some of them or you need to integrate a peripheral with the especially that you are configuring it you know what is done by the peripheral and how it has to be integrated I hope this was useful to you talk to you in the next session and have a nice day thank you very much for your attention bye bye