Deep Dive into embedded systems with in-depth understanding of 8051 micro controller with embedded C | Amit Rana | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Deep Dive into embedded systems with in-depth understanding of 8051 micro controller with embedded C

teacher avatar Amit Rana, Engineer, Programmer and Trainer

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

33 Lessons (4h 41m)
    • 1. Introduction to the Course

    • 2. Introduction to Embedded Systems

    • 3. Introduction to 8051 Controller

    • 4. Program for 8051

    • 5. Installation of Keil IDE

    • 6. First Project creation on Keil

    • 7. Concepts on LED

    • 8. Project based on Led Alternate on off

    • 9. Using For Loop

    • 10. Switch Interfacing with 8051

    • 11. Relay Interfacing

    • 12. Relay Interfacing Part 2

    • 13. Introduction To DC Motor

    • 14. DC Motor Interfacing Part 2

    • 15. Introduction To LCD

    • 16. Creating Schematics for LCD

    • 17. First Program On LCD

    • 18. LCD Interfacing_4

    • 19. Serial_1

    • 20. Serial_2

    • 21. Serial_3

    • 22. Serial_4

    • 23. Timer_1

    • 24. Timer_2

    • 25. Timer_3

    • 26. Timer as Counter

    • 27. Analog to Digital Converter with 8051 - Part 1

    • 28. Analog to Digital Converter with 8051 - Part 2

    • 29. Analog to Digital Converter with 8051 - Part 3

    • 30. Analog to Digital Converter with 8051 use LM35 Temperature Sensor

    • 31. Concepts around Stepper Motor

    • 32. Program Downloading Using Nuvoton ICSP Programmer

    • 33. Conclusion

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Learn Embedded Systems with one of the most influential and basic micro controllers in the history, 8051

I believe that any one can learn and experiment with technology.

All that is needed is desire to learn and right guidance.  That’s the reason, this course is focused to both

  • absolute beginners and

  • intermediate developers in embedded systems.

We’re going to study about embedded systems with 8051 microcontroller in this course.

8051 is by far one of the oldest micro controllers which is still used today. With over 70+ different manufacturers, 8051 is available in a variety of flavours. What makes it special is the simplicity it offers to the programmers and developers. Being one of the first micro controllers, the architecture of 8051 is quite simple with very few basic features. And those very basic features make 8051 the winner in terms of simplicity in usage.

In this course, we’ll study 8051 with embedded C programming. We’re going to study about the 8051 microcontrollers with Keil 8051 IDE. Keil microvision is a very old and very popular IDE used for microcontroller programming.

This is a hands-on driven course where we’ll be writing a lot of codes and trying out its outputs. We’re going to study 8051 microcontroller and its interfacing with number of peripheral devices like

  • LEDS

  • Switches

  • Relay

  • LCD

  • ADC

  • Temperature Sensor

  • Stepper Motor

  • DC Motor

  • PC Interfacing

  • Device Control

And while doing so, we’ll be doing number of different experiments to evaluate the skills we have been learning. The course outcome is to enable everyone to be able to use 8051 microcontroller and start creating projects on it.

Even if you do not know any C programming before, do not worry, there’s a brief introduction on C programming also.

This course comes from a developer

From past 10 years, I've developed more than 150 projects on 8051 micro controllers alone. This course doesn't come from a trainer following a set syllabus, this comes from a real developer who's involved in real projects for better part of his career. So there are many practical considerations mentioned time to time in this course.

Bare-bone Controller Coding

Programming and using a microcontroller is not like using Arduino’s where you just write C code and download into IC. This is a barebone coding experience where we’re going to learn the insights of 8051 microcontroller and understand at the core how to write program for each of its feature. This single quality separates the hobbyists and professionals apart. If you’ve once understood how to go into the microcontrollers features, look into registers and configure them to use, then you’ve understood the holy grail of embedded systems development. We’re going to do exactly this in this course. We’ll be using each feature of 8051 by completely studying the internal registers. Once you’ve understood it, you can take any microcontroller and start writing program for it just by looking into the datasheet. The input / output pins, timers, counters, serial port, are discussed at length to understand the theory better and then we’ve done some quick experiments with it on the go.


Many of you may or may not have 8051 development board with you, hence, I’ve included simulation models of every single exercise that we’re going to do in this course. And I’ve also shown the downloading procedure for one of the simplest microcontrollers that I use on daily basis.

Be Assured

Believe it or not, am doing embedded systems development and training from past 10 years. I’ve developed more than 500 different products / mini projects and trained more than 10000 students from over 65 countries. You can be assured that whatever I’ve included in this course comes not only from book but also from my experiences in developing systems.

Enroll now and start experimenting!!!

Meet Your Teacher

Teacher Profile Image

Amit Rana

Engineer, Programmer and Trainer


Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Introduction to the Course: even mandamus. I'm an engineer, a programmer developer, and I firmly believe that anyone can learn and experiment with technology if he has the right amount of desire to learn and proper guidance. And that is why all my courses are targeted to everyone. So we to complete fresher or Nubian technology, or even if you are a citizen, tillable. My course is for everyone. In this course, we're going to study about one off the most influential microcontrollers in the history off electron ICS that it's it's little fiber. There's a woman was one off those first microcontrollers who started the era off embedded computing. And still, today, with over more than 70 manufacturers, it survival is used everywhere, including consumer electronics stream and space ships, and it is also part off economics. In a large part off. In this course we will just reading about the incident violence, architecture, the inferno put poor pains, the timer serial port and how we can write down programs for its five to create a number of different projects. So even if you had a student are a college student are working professionals are very tied . Person was looking to do some hard projects. This course is perfectly suitable for everyone. We went to study ancient via one with a number of different, harder enter fists, which includes elevates switches. El Sirri, really for switching the physical devices on and off on a lot. Prodigiously converter will also see the programming for timers, counters and serial porch for those who do not have a hardware with you, don't worry. We have included the simulation models for every project that we do on protests, which is a very popular simulation. Software for microcontrollers in this course will be doing a lot of experiments with protests so that even if you do not have any hide very with you, it's still perfectly fine. We will also show how we can down or the program how weaken Town Lord The X Files onto the microcontroller is in the computers serial port. I am doing this things. I'm developing number of different products on training students for Masten IUs. More than 10,000 students have been changed from over 65 countries in past genius, so be sure we're going to have a lot of fun doing a lot of exercises and hands on with microcontroller and run now and start experimenting with 2. Introduction to Embedded Systems: Theo in this session relegate a clear and the size idea off what is an embedded system? Because Indian, if we're starting the microcontrollers the basic purpose of studying days, it's to study about the embedded system on were also heard about it a lot. So let's see what an embedded system is, actually. OK, so in this session, our basic object to is to understand what is an embedded system to just drop it down to some general s block diagram. How it works. What are the components of this embedded system? What are the harder components where the software components and what kind of processes are used in the orbited system? So to get a complete generalized idea off the embedded system, that's the overall agenda off decision. So let's get started if they have to define the embedded system. Actually, I don't like definitions that search, but if I have to define the embedded system, there can be a lot of difficulty, ways and a lot of different weeds to define the embedded systems. So here it goes. It's a system that has embedded software and computer hardware. Which Mexico system dedicated for an application are specific part of an application are a complete product are part off largest system. In short, what I mean to see my embedded system is its any system which has a preventable element or programmable. So kage inside it on we just created or which is developed to perform one particular dedicated task. For example, if you take the comparison off laptop and MP three player, a laptop is a computer system. It's a complete computer use for a number of different applications. A number of different works. But an embedded system which is MP three player is dedicated toe only play in patriots. Yes, of course, some related tasks can be. I'd like recording some audios and playing FM radio, but the major part or the dedicated application is play back off MP three files. So that's the basic difference. The MP three player gives us the same precision, the same reliably to the same quality as that off a computer. But in the smaller sides, as well as in a smaller brides, that sort embedded systems are for this is a very generalized, blah monogram off embedded system, and it can be applied toe innocents to in particular so the core of this embedded system is a sippy or central processing unit. It can be anything it can be a microprocessor controller. F. G s appeal The or any kindof processing elements can be used definitely then, to this appeal there it's some input and some output. The output maybe from some actuators, some indicators. A lot of things out there. Input can be coming from human interface like the switches or keepers, or some sensors which can be directly connected to CPU. Or there can be some way to reconversion. This particular programmable element does has a softer inside it, and it also had some memory associated with it. Where the software is deciding. Look, every single blond that it's shown here. Did waken murder it truly converted Human interface diagnostic ancillary. All these blocks are optional. Remember the basic martyred Cebu with some input, some output and some software processing associated with it. Then, based upon the application, the input output blocks will change. The interfaces will change. So that's a generalized embedded systems blood. Bagram. We're talking about here as computers and embedded system has a CPU inside it, as you can see. So what? It is basically is a computer, but the normal computer or PC's or laptops are generally used as a application of a system to perform number of different things there as a merit system is there to perform only one dedicated task. Often in this kind of embedded system, Reliably day is very critical. The resources that his memory processor and capacity, our own celebrity and often real time response is essential, not give you an example for it. Consider if your laptop gets hanged sometimes. Okay, what do you do? We generally wait for some time. We do something like control, all to delete on weight. Do those kind of things and leave it for the computer to response. Now tell me a normal, cheaper mobile phone that is in your hands. If it gets hang, what do we do? We immediately start tapping it on our hands, isn't it? Nothing. The price off, well, phone is less. We know that the processing power of that mobile phone is less. But what we want is it should act as real damos possible on a little bit of hand. In mobile is not a lower in laptop or computer. It's allowed we will restart it. We will go grab some coffee, come back after some time and then will be resuming our work. But the mobile phone is not expected to hang on. The same thing goes for all the embedded system. And that is why descending embedded system is a challenging task. What are the obligations of embedded system and better system? It's everywhere. You just lives down or you just think off. Any industry embedded system is applicable into that name off you hear on some application criterias are deflation is that we have communications. We all know that in sack lights and telephone systems and Internet to an optical fibre communications Angela everywhere there are tiny bits of embedded systems used for a number of different applications autumn or do being one of the most important application on something where we can say embedded system originated. Today's automotive has a number of different sensors and micro buses in l image, which are used and are working in conjuction with teacher to generate some really, really Time efecto as a less critical application, like it may be the headlight turning on and off automatically, or the eventual operating off the center locking system or the remote locking the stream or the what began say that for the speed controls, there are many such applications. There is an engine control unit itself inside of the car, which controls all the senses we all know about the consumer electronic appliances, which are the examples of embedded systems like literally cameras, washing machine gaming, consoles, clocks, games and toys Micro often this kind of applications In medical there are many applications , like starting from a very small heartbeat meter to the complicated messages esteem on the man I system menace IT systems, which are part off which themselves are embedded system or their consisting off a number of different, smaller embedded systems. Innocent applications are very vibrating off embedded systems. What do you see here is a programmable logic controller, which is a very classic on very vital used, embedded applications used in industry. Then there are variable frequency drives, radio remote control in AIDS for most arts traffic controls, a stream robotic systems barcode reader and so on. The list will go on and on, and in the same way, the applications off embedded assistance can be found in the defense system again. The embarrass systems are combined with a number of different mechanical systems to create the in application. So as listeners before the responsibility off, embedded system design is often that it should be real time. It should give a very reactive operation. It should have at small sides and as less weight as possible. It should be safe and reliable. It should be easily use even in Harsh and Norman, for example, mobile phone. If we talk about works for 24 hours a day, we hardly switch it off. And if sometime our phone get switched off, when we can panic and we find the charger and we powered it on that so it's possible. So the harsh and Mormon application 24 hour application is expected from an embedded system on off course. It's needed that it should be a cost in city instrument. The design requirements of embedded systems basically are the choice or selection off silicosis and manage the selection off embedded operating system. Or we can say embedded software on the selection off. Very filling the selection off peripheral will always depend upon the application, but we can definitely study this and abuses and you're rich on the software systems, which are used in embedded systems. The most important, the CPU or the processing lemon tin. An embedded system is a micro controllers now. It's often compared with microprocessor, and it's very interesting to understand how my purposes operates and have a micro controller operates. Now everyone off us have seen might have seen a mother board least we're using at least a laptop or death stop for a number of different applications. We all know that there is a big board inside that computer, which we call us Mother boat on onto the mother board. There are a number of different smaller items, like ham or rahm on iReport or serial device on hard disk connector, Serial Port connector. And on the center off that mother board somewhere the processor is installed or mountain. Can you understand that microprocessor on its own does not do anything, But in order to function this microprocessor, we need a big Mother board with a number of different ships onto the board. The classic example starts from Intel xxx to today's Intel Pentium processors as well as they go right. Three. I favor sisters and that sort of things. This is a generalized or general purpose microprocessors. The stream block Bagram, which we using computers. The micro buses are doesn't work, wandered soon, and it requires a big model board to a bridge, which, and done increases the size of the hardware as the less they concept the hardware. On the other hand, the microcontroller is a single chip system, which has a processing unit on ship, some little amount of ransom, little amount off Rahm input output, ports timer, serial port and many such peripherals are embedded onto a single chip. And because many things are embedded on single chip, there are two problems with it. First, there are not problems with two things associated with it. First is the resources would be limited inside, so the Ram Rome cannot be increased there by the fourth present. Inside of the icy second thing being on a single day for the price off, the overall system is drastically reduced, so that is the reason. In smaller and barrier systems, microcontroller is the most preferred choice for development. Choosing a microcontroller is definitely a very trivial task because there are many microcontrollers out there in the market there are a number of different dollars or 30 associated with H like eight bit controllers seem with controller toe to toe with controller this much megahertz off spear this much of Ram ram and it's much a pie opens what we have to do whenever we're starting a project EADS. Sit down on look for all the futures that we expect in a particular controller. Common features are spewed grade, which is specified in my guards, Then the task at hand. Is it possible to be done by eight bit controller or sustain, which are tattooed a bit controller? Depending upon the task at hand, we can judge how much amount of RAM and wrong the image. Depending upon the number off peripherals we have to interface. We have to decide how many number off input output pills are we going to new then. Lastly, it should be easy to upgrade the system for a year performance processor. For example, if we have a PCB created for a particular system that it should be easily upgradable, the process on that recipe should be just removed. The 1st 1 insert the 2nd 1 with some additional features, then the packaging should be available, like the process of your choosing should be available in both through whole as well as assembly sizes. Depending on application you will use through whole or to save the size will use assembly and last but most important, its power consumption. If you are creating a battery powered application that power consumption is a very crucial thing to consider off course. If you are creating an application vigilance on a Siemens, I don't in some power consumption is that big issue for us? So we have to select or we have to look for these technical things while choosing a microcontroller off course. There are some commercial aspects also well chosen. The microcontroller like what should be the cost for unit, how easily it is available across the world. For example, if I'm creating a system here in India on, if I'm shipping that and it has to work in France, then definitely the repairs on the maintenance or the chip upgrades should be available equally in India as the less France are for that man to any country in the world, then availability of software development tunes. No one will want to use a micro controller, for which a software tool is not available at all. So we want a softer developmental available on as much as possible. It should be cheaper. Are much better if three off cost. Same goes for the harder development tools such as device programmer or D bugger. This harder tools first for fall should be available. Second, if possible, they should be available later. Cheaper prides. Tired if possible. They should be sewing. See that we can download the program a troll or by this connecting it to computer. So these are some commercial aspects. We need toe study, and we need to take care about when you're choosing a microcontroller for a particular system. These are some top 10 my criminal of manufacturers. Now this is just a formulated list, which often few years ago there are no such criteria ers off defining who is the top manufacturer. But of course, Renaissance remains the top most because off their sale indie automotive Domon. Yes, there are many names in the semiconductor manufacturing which are into the microcontroller creation. No, let's see what is exactly eggs. It'll favour, which is the heart, which is the court off this entire study. It's a violence. The microcontroller poor, which WAAS created by until it was introduced in 1981 select. See what is exactly this incident five that we're talking about, which is the core of this study agent of feminism? Michael Mental Architecture with Salt, which was introduced by Intel, referred to us and see us five and family in 1980 even, and become very popular because off its simple architecture, it was available very cheap and the development tools that really available. So from the development of reserve Ivan itself, it became very, very popular across the world, so popular that until was unable to fulfill the entire requirement what Intel there than is until license the architecture on because of the licensed architecture. What happened? It's today. There are many manufacturers off 05 in fact, until no more manufactures their survival. But there are many other lessons. Manufacturers which developed the exit of heaven Best controller like analog devices. Altera, Atmel, which is not taken by microchip Texas Instruments, Cypress Semiconductor, Maxim integrated and there are such more than 70 different Yes, 70 70 different manufacturers would have loved it. 05 so definitely makes sense to study about their deserve heaven architecture, every manufacturer add some off his own features, for example, and lobby less. This is famous in a two recon murder, so they added to reconvert tweets little fiver at well relied some wireless, thanks to its total 51 and so on. Embedded software means the softer, which will. I don't for the chosen microcontroller generally AIDS one off this two types. Either it's an assembly language score or so higher language or high level language programming or coding assembly language. According It's Something which is return in the genetic assembly instructions off the microcontroller. Every microcontroller manufacturer gives it some instruction. Six for use with that microcontroller, and what we have to do is we have to write down a logic or a sequence or job or task using that instructions. This program return using instructions is called Listen MP more assembly language programming. Violet is the most efficient coding technique because the cordage and Red Raiders, for the exact purpose as well as free assemblers are provided by the manufacturer. The issue is it takes a whole lot of time to study the entire assembly instruction set off a particular controller. Secondly, there is no portability at all. So if I'm developing, accord for 805 on microcontroller in Assam Lee for several years now. And if I immediately shift my job and if I go to some other company, which doesn't use it 05 then my entire assembly language programming knowledge is zero. I have to again start with new processor, study its architecture and learned the instruction. That is why, in principle, our usage of assembly language programming is very, very the Scripture, because it's not for table. That debugging is difficult. Alex usually considered good for on Lady Small Level projects. Now what is the other girl writing? Don't program Adorable writing program is usage off? Ah, higher language like C Jaguar, C++ or Paschal? Well, there are many such a better languages available. C is the most popular off them all. The court generating leads and C language is definitely bulky because there is a software which is converting a C program into the respective assembly program. But the C programming it's portable. You can easily shift a particular chord. Return for one microcontroller to the other microcontroller. The efficiency is nice you can create a C program for a particular project and really, really less time, and it's suitable for small, larger projects. For every microcontroller that are generated, there are definitely some C compilers available for them, either. From the manufacturer itself are from the tarp are two devices or third party providers, so generally see language is preferred and draw the scores. Also, we're going to youth see language for programming the itself. Ivan Microcontroller. So that's it for decision. We have taken a tear idea often, and village system. What we're going to do is we're going to study the angel of Ivan based embedded system by connecting some peripherals as input and output sewage and write unknown some software program for it in this embedded C language. Thanks for watching this video. 3. Introduction to 8051 Controller: Hello, everyone in the station, we will be starting about the microcontroller it 05 What, exactly? Against the stuff on moderates. Been structures. So consider this as your first session for a giraffe Ivan controller. So let's get started. There are some bins labeled even 0.1 point 11.2 to 1.7. Then there is a pin artistry that I couldn't be 3.0 to 3.7. Still extra Yale two X Trail one pins ground they do 0.217 010 to 0.7 some control pins and basis. So this is the full dip in icy. Remember, one thing whenever we compulsion is a microcontroller rising from market on. If you install it in any kind of system, it will do absolutely nothing. Okay, so why does Nothing is because the microcontroller has just some plain pins open. We have to give some input or puts to them as the less they have to write down a software inside that microcontroller, which can process that is. Boots are so blank. Controller is useless, It has no value. And what we're going to study now is How are these? Are the two measuring aspect off a microcontroller study The hardware and the software will see them boot. The elements of microcontroller generally are. See peel that symbol. Persistent village Are you are the elements of my Gorontalo generally are. See peel that simple, persistent village i o R Input output buses address in the tub us the memory elements present insanity microcontroller our land and Rome Wrong is usually replaced by flash memory disease, which is a non volatile memory Timers interrupts serial port and parallel port. This panel report is nothing but the same. I uphold our input output port every microcontroller has those aspects. Are those different elements we have seen in last session about the comparison between microcontroller and micro persists of Let's Eat in a detailed version, Microsystems Strand alone and everything. It's a bridge controller inside a controller CPU, as well as Ram Roman. Other peripheral sir present onto the single chip the processor in completely designed for expand ability so Ron Roman Ireports can be extended with controller. Those can be extended, magazine said, is definitely expensive. What's that? I can be used for general burbles on many different applications whereas microcontroller is cheaper, but it's so single purpose. And for applications in which cost power and space, everything is very much critical. This is the blood Bagram off its 05 on microcontroller on. This is what makes the survival very, very simple to understand why, if you look at the blood dagenham, there are so few blocks there are very less number of blocks present and sailors 05 in, which makes it very easy to Australian understand and get heels to immediately see a classic. A vision of heaven does consist off an internal bus to connect four ireports I omens, input output, ports, the label or the name of this four ireports R P zero even B two and Petri, which are sharp forms off towards airport. One port, 12 40. Then there is a serial port, which of school ends PSG in a extreme. There are two timers. Both of them can be users timers, as villas counters the name of them are time bourbon and time are zero. Then they did some on Chip Ram in classic Original five. On the on chip represent was 1 28 bytes. Nowadays, depending upon which processor or which controller exactly you are using the on chip ran as the less on chip Rome will vary. The flesh on Gibran for program storage in instead of heaven was four k B now in different microcontrollers. So we find different sizes that there is this appeal along with an interrupt controller image and an on ship oscillator. Remember, Although the facilities on ship will it to connect and crystal externally and what you see here, all these are the blocks present inside the ice. It's not external. Okay, so that is the block diagram or architecture off 805 And this is also called our collection of original favor. In addition, we will find a detailed architecture like this, but that's a nothing different than this, and it can be followed for clear understanding. So this is the pain out off eggs, a loaf, Ivan, and now will study the pin out in detail here itself. You can see pin number 40 and number 20 our power plants, the number for divorce to Mississippi and 20 goes to ground. The number nine is a discipline extremely to extremely. When our prince, where we have to connect crystal along with the number 40. The number 31 is needed to be connected to the sissy e m. P s and can be left alone. The microcontroller works on plus five old. So a plus 500 basis supply has to be given to pin number 40 which is very sissy. But number 20 is to be connected to the ground or negative off the bases supply and you have to connect. A conservative ex trailed to an extra one exactly like this. See, there is a capacitor which is mandated to be used with crystal. Remember all those symbolic chewing like this began. It was a ceramic capacitor over here from a value which is between 20 pick off added to four. Typical ferret, usually 20 to pick off entered or 33 pickle. Federal easily availability market so you can use those to crystals. Then there isn't insipid. There is have been needs a signal, a positive signal. Whenever the microcontroller gets powered on their survey, need a power andre safe circuit. The recent pin, whenever microcontrollers power on should be high for at least two machine cycles, and that is why the research circuit created will have a capacity inside it. So this is the reset circuit. First we had this block circuit connected. Now we have this research circuit connected. You can see a 10 micro Ferretti capacity along with it went OK. Resistor goes to ground the middle point of visible story sit. So whenever the system starts off or powers on, what happens is the babysitter axes a short circuit with the sick. It's completely connected touring. Sit on. The controller will go into the reset state that through this register, this capacity eventually charge. And once it's completely charged, once it attains the Favell, signal the connection from this point offices. See, it's completely lost. And now this were disconnected ground. Through this register, we get a very short pulse, offerings it whenever we're partnering on this microcontroller system, and that's what exactly we want. So this is the bomb around research circuit off a little favor E happen is an external pin number 31. It was only when absolutely 132 were used, so it is not used anymore, so you can just skip this BSE in is also program store. Anabel is used when you're downloading the program using some external hardware. So we generally don't use this Spence, which happen Number 29 number 30 Ailey He ended story connected to the sissy. Then the number 30 29 entered even are gone then these are been number crystal pins. Number line is recent 40 and 20 years Power plants. What remains are before ireports 40 which is divided from pin number 39 to 32. Put one or two and 43 each. Fold hands eight minutes so you can see. All in all, we have a total off 32 input output prints available for interface In the real world peripheral, sit 805 Out of these, each bolt can be used as a digital input or digital output, which is a bi directional operation. Hydro structure off This I o p. In is very interesting to understand because when we're done, logic one onto a particular pin plus five old or decency appears on to that. And whenever you're done, logic zero onto a particular pin zero hold Our ground potential appears on that particular pin and how it happens. There is a deal edge associated with every single bitten off deport. So you can see if this is the pin out. Then there is a deal Edge with every port. Been so there are a total Toby latches. President, sir, they're sort of heaven with port. How do they work? Let's see. This is the village of typical village where whatever is then put appear side the output whenever a clock pulses given on whatever it is they put appears in murder on the other or put whenever the clock pulses. Given the operation off a cold is exactly like this. There is a the latch woods Cuba output is connected to a transistor. There is a pullup resistor connected to this transistor. If you don't give anything to the input of this transistor, what happens is the transistor will remain in off condition and the vincey civil, as it is appear on to the no. How were known logic one onto this particular pin? Let's see whenever the right Logic one where I teach through the internal bus to the being put off this village. Ultimately what happens is you output will be one and Cuba are part of a bigger zero since Cubano put it zero. This transistor remain offstage. And since it is an off street, there is no conduction. And the same visit see, exactly appears as it is on the port. So when we give one from the software onto the village, Cuba become zero. And because of the zero and because of this pullup resistor we get this is your five old voltage onto this pin at the same time? No, when they don't see Roto depend, see what happens whenever I don't see though the being latch and put get zero and ultimately Cuba will become zero and Cuba may become one because Cuba is one. Now they're transistor may be conducting the transistors forward mass, and it's conducting. So the current flows from the sissy lured towards the ground insanity, transistor insanity, trying to store off poor pin and therefore what we get at the spin, its ground on zero potential. That's how we're gonna logic one and logic zero on Portman when it comes to reading a particle airport when it was exactly electives. But remember wanting always whenever we're reading from a political report, we have to give Logic one today input off village so that we have the geologic one today put off village so that the Cuba or Put becomes zero and Atlantis, today's indie off state. So whatever input comes from external world to this spin is directly related by this ledge and given to the internal data bus. So it appears like that whenever we were living in port, never make the poor pin go zero when you intend to read it as input pin. Same thing goes when logic zeros predictor no change at all. Got it? So that's how Portman said operator. And we can see here we saw that there is a transistor and then there is a pullup resistor associated with this transistor which board one toe entry. This pullup resistors are present internally, but with 40 the pullup resistor is not available internally. And that's why the 40 pins looks like this. Even if I give one or zero to the spin, whatever comes at Cuba, zero or one, there is nothing going to happen. The transits Trevor not turn on. It will not also turn off and you experience literally no protein shell onto this particular pin. And that's why, with poor zero for everything we need a pullup resistor to be connected with poor zero. Externally, you can see this kind of celebrate sisters are connected externally to port zero on advance if Ivan based system and for increasing the current output. The other ports are sometimes also given with such kindof external pull ups. Again, in the block diagram we had seen, that means zero P one and P two are the two or three ports available for usage. Poor treatments is multiplex with some different functions, like triple 3.1 with serial port. That is our exit easy 3.23 point resigned. Dizzy Ryan. Even that are entrapments timer pins and bus right and weapons. So those are the ultimate functions off Port three. So that said about the pin out of the ages of five and microcontroller, I hope you haven't understood how we started about how one is connected or how one is applied at the output enough controller and how zero is given to the enough controller from the next session on. What we'll do is we'll start right unknown a software for instead of 51 and start observing IDs upwards. I hope you enjoyed decision. Thank you very much. 4. Program for 8051: every man indecision will take a short tour on How do we write down C program for microcontroller? How would be first Rama simply languish programming and very, very shocked build off what it secret living also, or is the software that is needed to be used for instant ramen programming on so that began in Italy? Get started with programming for eggs. Little thing. That's it. Something it is better, as I have told you before, starting the scores there. Do you have some little bit information about ceiling? Which although if you're not expert, it's completely fine, although if you know just one program off, see, there are certain completely fine. C C. Programming language is a programming language of the four units operating system by Dennis Ritchie in 1971. Pretty much everyone off us most. This if you have any idea about C language, what we don't know and what we must want to know, it's see is a middle level computer language. It means it has an efficient, situated applications as the less motion 1,000,000 programs. Now what is the meaning of this limited? You see, it's such a language which has all the futures off high level language, high level, been sort. High level doesn't mean a difficult language are instead any complex language. No. Ah, high level programming language means a programming language, which makes seals off the real life. Examples. Are your life keywords input as much as possible? That makes it high level, so high level languages basically off very easy to understand, very easy to write down from them at the same time. Java, for example, is a high level language, but she has a benefit of being high level language. At the same time, it can Children program directly forwarding machine, and that's why it is. Also orders are really level language. One of the best features off several, ma'am, is it ones without any specific changes on practically on the missions now that plays to the computer programming C for a second pilot, that mental approach very compare the C language with a similar language or itself. Ivan based programming. It's something Zaveri appearance, and that is very important for us to understand, see differently is much less efficient than assembly language. With them, you have to move this. There is no doubt, see produces ah larger port than assembly. But see is also easy to understand. We have a very strong liberal support to create programs in C language with the language. In imminent programming. We can incidents which on any other possessor or controller, definitely has suffered to see a semblance difficult to learn and remember, And one cannot change the platform easy. This is the standard Be off writing on C program. It's rio dot ages, the standard input output library. And this is a small sequel. If you know about which better, if you don't know about it, Just excited to see there is intra active inclusion. If we're using inning and a function, for example, we're using primitive over here. Let me do a little bit changes switch. What we are doing here is we're trying to understand how any normal C language program is ricin. So for this, for them, what I mean is the starting point officer. For them, this is a very big declaration. Is going to four on that. This is the usage off print function from this passion. Clearly studio British celebrity. If you don't use friend, if we don't need to use a studio dotage, the output of this is utilities were reprinted in an alley off A as well as they location A . It's store. So I suppose you're aware of this much ceiling with anyone. If this much is known to you, it's pretty much everything that I need about from that. This is how we can create if statements in the C programming language whenever we want toe . So some conditional operation we want to use. If so, if and the conditions return like this and some program, it's here in the thing that if in condition is there and these are examples. So if you have to know a person, if you have to find out the which model is greater and which smaller we use. This if it is a rather than B, then bridge is little. If beings, rather than the imprint bees it at the same time. This 100 it is, rather than be else this condition in the same way, there is a highly and there is a form when we do programs for file. When we do programs for four, then we learn about you didn't detail in some time itself. These are the examples of violent for if you know about which better if you don't know district with me when we start with a microcontroller harmony, literalness and all of this easily we went in. My infinite loop is very important to eliminate programming and that can be done with this vile one usually financial, been sport whatever. But I don't. In this 51 look will be exuded infinity because the condition is not even. It's sort of conditioned giving it up. Constance concern about any murder programming application. You know, for example, Anderson Emitter, we don't want the inner submitted to stop at all. What we want is it should run continuously on infinitely all the time come the energy credited Age friendly time Boo. It's wiser things and stop no! Should I come to the energy? I'm imprint date springtime and everything now applies to any system. Let there be invert early that we're project early that any kind of system it needs to the UK in financially and that's driving near kiss. Why even look for embedded applications? And this is how mute switch gifts were Rarely it's rich with microcontrollers because we don't need to. But if needed, you can use it in this way. No programming for microcontroller typically on. Let's see how it actually happens whenever we use any kind of compiler, which very been I don't program for microcontroller. It produces a hex file. Textile is a standard or a type of file, which has been down in order to the wrong off my Grogan for the romance. Typically, the flash memory off This is the process off embedded programming creator has filed and then down, or that the microcontroller the size off X fine is the main concern for for us because most microcontrollers have very limited on chip Rome. See what we talked about it instead of having heads for keeping your flash indigenous in the stand for baby. When we talk about the computer, even we talk about the Mumbai. We have the memory of a level in terms off Gibb. It's with controls we have maybe available in a few kids. Several bombings apparently list Africans having body gender so larger expel states and my breakdown prevention. See, there isn't some some arranged once more. It is easier and less time consuming, much more inserted, modifying a which we can use the available functions and its poor devil and for doing the programming with itself. Ivan. We need to understand some very basic important things. These are the seeded at rips off zero fireman, which are going to be needed when we create programming. So in normalcy you can randomly scare Oregon animal use in cheer. We don't do that. We use typically unsigned care or typically insane inch, because along with less wrong, we also have less lamb and there, So we have to use it very variously. Just ticket me when we start examples. Well, pretty much understand Egx. These are some important date, and it's to be understood. More subordinates can on san care, which is the natural choice off creating any valuable in C language one of the most revolutionary lives for Israel. Five. For counter values, plastic characters and for member of different applications. Remember, you can go additional litigation on car as well as inch. There is no such labour. Delimit is our lives now. Size of that particular didn't let's see what others after compulsories refer. These are some of the most popular softer compilers available for use with extra fame, and you can use anyone off them kill microfiche in its commercial microcircuits color shell and I are substances cover. Share this to our fee. Definitely. There will be warden more softness than this list, but this is just a negative list because there's our most popular elements out of those killed. Micro Vision is the most popular commercial software that is available for writing programs for 805 Along with that is Justin sees also used by many people for throughout our courses . Whatever we're going to do, order extremists, they're going to do very abusing, killing micro vision for our project fork in the next video, we'll also going to see how down or kill micro vision and how to install it on your computer. Why do you ask a micro vision? Because the free where is available Ecstasy juice. It provides the time simulation. Is it really bug? And it definitely supports external libraries. This is how an ID ve off killed. Micro vision looks. This is where the text or the program will look like. This is there. The project files will look on. This is very we can see the little output window. And this is how a normalcy program in Kill Micro vision for 805 looks like in sort of its to the I. R. Not age. Here we have ology $5 each, which includes everything related to 05 in your program. Like a loan program in in very programming, the high level program is a little drinking program. It means so much. We have a microcontroller. They have interrupted pours. All we need to do is the on a particular port on off, on off with some dealing and make it happen in financial. This program is an indicator program off the scene. We haven't really been declared with s, which which is a kills. All better pipe a is it will go. Petri camp 08 minutes is assigned to the number zero off port three. Then this is the main program in this is the 100 which is the advantage of them. Infinite loop. What is it you do? Here is a sequel to one. Then delay off 100 units equal to zero and then really off her regulars. We have returns really function over here, which will generate some significant amount of dealing. They never some pellets. Bostridge So this is our normal and simplest singledom. Looks like what we're going to do next is we're going to write down different programs after installing the K micro vision on our computer. Also remember, by doing engine off, haven't programming. There are some additional generates to remember, So fasting is fine. Any upward port pay, the poor can be used as output port. If you're using it as our initial, is it by sending zero, which the deal also supports Big price on by placements. Here we have given data to a single pin off port three. Instead, we can also give data to the entire poor tree. At one instance to do a single bit operation unit is good variable to do about this operation. We needed this if are really but and to use any pork win as input. First wicket workers Logic one or first biologic Oneto that and they're only giving put to depend on the residual damage it This last instruction is very important. Do you use any Portman has important Make it one first and given put off zero are making zero first and then you have been put off. What we'll see that when we are experimenting with the logic in push. So that's a compensation. Let's get started with the stylish off pill and creating our force program forage. I hope you injured decision. Thanks for 5. Installation of Keil IDE: Hello, everyone In decision, we will see how we can download and install the kill C five in Compiler, which we want to use for is a fireman missed projects. So let's search on Google for kill C five. That's the only time we need to search Team C 51 The very first link. It's from kill dot com slash c 51 This is the language we're interested in. This is the product overview page off the kill C five. If you want. You can read all of this. Details are just like me. You can just directly go to the download section and did Arlo section again. You have to select. Which do you want to download? Remember, we're downloading it for C five. So let's go to protect downloads. And here it it's C 51 Okay, just click on C five. It will give us with a farm that needs to be printed. You just print it with your details. Say no. I'm printing it with my details. Um, it Donna, it is my a melody. Here is my company name. It's not needed to put all the details, but I'm just filling. It inhibits what devices were using 89 c five. OK, just click on submit. Once you click on, submit the evaluation version or the demo version off. Kill C 51 will start downloading. Okay. It seems everything is necessary. Click on submit. So here we have a link for downloading the kill C five and compilers, so let it get completely downloaded. Once the compile it is downloaded, we need to double click the set of file and we can start with the installation. Where do you get downloaded? It was a non learning is completed. We'll get a fine leg. This which is set up fine. This click on it either double click or click on press enter. It will start installing the software the C five in compiler onto our computer. Click on Next. Next, some students and then next it'll take about a minute for it. Toe completely. Get installed base depending upon the computer speed, the processor and amount of ram that you have. So once the killings downloaded on installed completely, you can start creating projects with kill. You can just skipped, it's and you can finish. Now the killer is installed. Just search for it killing micro vision. Fife, this is the old version. Which ahead? And this is something which you have just in Start. Just open came Mike. Revision. Fife. So this is what baggage? Very clean. On nice interface for creating our project, the very first thing we need to do is close any existing project. Remember that steps are very, very important forcing its close project. No. Whenever you want to start, a new project will go to the project section and three Kanda New project dessert. That's it for this video in the next video. What we'll be doing is we create will create. Our first project was included Micro vision, okay? 6. First Project creation on Keil: welcome to Decision in this section. What we're going to do is we're going to create our first program with killed micro vision . The steps are very important on I would very much appreciate if you noted down somewhere with you. First thing is close Any existing project. Second stage beads click on new projects, then say which, you know, new folder. Then select your device. Alex, come pill that point project New Micro Vision project. Let's save it to, say documents on click on new folder. Let's call it my 51 Then I'll give it some name. Let's see. Hello. Let's tepid selection off the device that we're using. So let's select 88 9 c five that such to select your device and the project was created. Now click on new file. Save it as hello dot c file here. Hello is not important. Doxy is important. Next right, click on project on Click Add files to the source out of the newly created fight. Then last things goto that a good options chick on clear tax file put their desired clock frequency and click OK, and next thing is Beach. So let's see. First of all, you have to create a new file. So let's take a new file. I'll just write down some. According to it. Hash include I Did you five on dotage. Would men B one or via one 4 to 1 is equal to 000? The left Portman musical told cigarettes FF bill l expanded scored to you in a short while . Just stay with me. What dealer for I are just simply I for icicle 20 I just list them 50,000. I bless bliss and do nothing just to give a cynical. Now you can see this court has no see like court highlighting or syntax highlighting so control s and save it as some final name dot c Now it got a decent semdex in next year's goto this target options and social one over here, right click and just click on. So delegate, click on add new I turned to the group, So scoop one when you can simply also developed like this and choosers file that you just created ad glutes. Now this file is visible over here. If you click on the Bill Burton, your program will get village. But it will not create your X five to do that, go to this project. Options or option for target. Put the clock frequency here. Like sexual megahertz in target and in the output tab. Check on this. Create. Explain the Hubert. Once we do this, you can go to the documents menu that we have. Ah, my 51. This is their microchip. It's now if I've Bill, it is in this Bill Burton are in project Bill. Targets are F seven on keyboard. Then it shows creating X Fight Aunt and the Objects folder here. We can see that the hex violence with create Now all we have to do is download. The six fell onto the microcontroller and see the output. Whenever you're creating any new project, we will debate the same process about the court explanation and everything regarding this program. We'll see that in the next session. So that's it for the section. Thanks for watching 7. Concepts on LED: Hello, everyone. Now let's get soccer without for six. Remains on edge 05 microcontroller And like every other embedded program, the first program, it's always and a little bling program. In decision, we will see how to write down a program for interfacing a single entity, eight entities with 051 as well as how to created simulation using protests I size. If you're not familiar with protests, protests I size is a very wonderful utility or a very great software which can be used for microcontroller simulation directly. So let's begin. The millions Arkady will need for this particular experiment is our research circuit consisting off, then microphone capacitor and 10-K resistor crystal off 11.592 megahertz, the number 40 and number 31 off controller goes to decency. Like its rivals, number 20 should go to ground on this. Power planes are not needed in protest, Isis, but if you're doing it on hardware, then you must use those pins. This have the basics off led or light emitting dire, which you might be knowing about. That led is a directional, highly directional device. This point are the bigger point off the symbol. It's an order on this point of the symbol. It's cattle. If you look at the lady cross sexually, the longer lead outside is an hour and the shorter ladies cattle. If you look inside the area off Hillary that the bigger substrate inside its cattle and the smaller substrate it's and they never in professing led with any microcontroller. We have to make sure that we connect one pin off the led that is an ode to the controller spin Second, been to register and then the second point of Register to the ground. Now let's see how to create a program for a little interfacing as well as how toe use this simulation software. So first of all, we'll see how to and Professor led by taillights. But before that, I would like you to take a note off this school. This is a calculated daily routine, which, when you're using it 051 with 11.592 regards, Crystal will give you a precise Julie off one millisecond. So whenever you call the boy Billy or delay bracket one, it will give you one millisecond of dealing. So for one second of dealing what you do. It's daily and into bracket. We would bus 1000. We will be using this religion throughout each and every experiment that we're going to do or we're going to perform in this course. So let's begin. This is how will have to interface eight delegates with microcontroller. As you can see, DuPont zero is going to a resistor and then led 2.12 point to 2.3 and so on. This is how you must do it on hardware. As far that simulation is concern in simulation, the ladies cannot get damaged hard hardware or impractical, harder of the it is will get damaged. So for the sake of simulation, even if you don't hire the registers, it's perfectly fine or okay, No, let's begin. I will open to Software's. One is killing Micro Vision five that made in storage on another van. It's the Brutus I s eyes. Now let's close any existing project. If available, then they can. New micro vision project. I will say we want to the best stop. So remember, always create a new folder for every present that you're going to do. I called it a little bling. And here inside that folder, save your questions. They will ask you to select the device. Allred, Select Ataman are simply select 88 9 c five And by typing here, yeah, it has been become microchip. Now then take a new fight. Save the new fighting that not see extension led Dorsey looks like down our profile. Inclusion hash include Identify one dotage. Then let's first copy this religion. They avoid mint, and we're going to connect the leaders to pull to. So we'll take a violin 100 in which will execute infinitely or indefinitely on. We can simplify. Don't be too is equal to zero x 00 The little zin B two is equal to zeal IX ff the live cosom now zero x stands for exotic symbol number So zero xff strands for 1111 111 Whereas this belongs to the seventh bitch and this belongs to the zero bitch. So the sharpest version of mine every data is hex. And that's why Texas more pleasure with microcontrollers. So big physical desire xff 00 daily 1000 ff dilettante. Now let's add this fighting to the souls Group one right Click SOS one so directly the this project or simply typically concerts. Group one. Select the file. A literal C ad growths Now go to the project options Over here. Options for Target Great are right down 11.592 That's crystal frequency and in the output that they can create expert. Leave everything as it is. Do not touch any other thing. OK, so let's just very good friends. No, if there are any EPS, then the hex file will be generated like this. Now let's create assimilation for the scene I'm using for the seven professional to create simulation. If it is the first time you are looking at protests, please pay close attention. It's a very simple, yet very powerful tool for simulations. First of all, I would do the system. So in templates, I will set design difference. I will make the background color go white so that it's more visible to you that I didn't save it onto the desktop. We created a function called Led Blink the same folder, their projected suit. Now here are the different options. You have to go to the company more and pick from libraries here, you just type of particular component, and that component will appear depending upon the competitive spirit. It will be a little bit slow to Lord libraries for the first time only for the first time afterwards. It because faster, simply double. Click this and intensify. One appeals here, then go for selecting led dash wrench are led dash yellow and you will get a yellow led. There is a component that we require. Let's take 88 Nancy five on here as as here for the simulation Virgin. I don't need to connect resistors. I'll simply go on placing eight delegates one to three. Food five, six, seven and eat. I will connect them all to be 2.0 we 2.1 B 2.2 with 2.3 collection is very simple. Just like the mouse once. Then live the mouse, then dragged the wire that every want and click the first click off, most against months there. So it connects two wives. No, I need a ground symbol. Go to the terminals more here and just look on ground. I'll take the ground symbol over here and I will connected to first lady. Then the second bility and then just double click. He if all those little Benson connected No, this is a microcontroller. Then we're doing it on hard. They're off course Requires a crystal here, the sixth circuit here. But in simulation, that's not meeting in simulation. Just double click The microcontroller I see stays this clock frequency to 11.592 megahertz . Active program file. Here. You have to add the hex fell that was generated in the last session. So this was a little bling folder. This is the Objects folder, and this is the expelled originated led blink dot Exe. Now all we have to do is nothing but click on this liberty. It will start playing this demolition. That's it. A very simple yet very effective way to into afis output devices with if this little fight Now this is a bite waits interface. There we are completely controlling deport, too. Instead, what we can do, it's we can switch off all the illiterates and we can also in profess a single led to do that. Let's I don't s which led. One is equal to be to cap zero. And here you can just write down Led one is equal to zero Billy 100 or DeLay 500. Let's make it and it even is going toe one and delay my bill Target files. Now, when you play the simulation, only vanilla will be blinking. We talked faster. Really, This is Ah, You can simply write down instructions for controlling even a single ality or a single pin off your porch as well as the entire port. Remember, they never you write zero. It means logic. Zero appears on toe that pin. It means logic. Zero means zero. Hold on whenever you're right. Logic one into the port pin, it generates plus five. So, except for decision, have this experimentation performed on city output, Happy learning. 8. Project based on Led Alternate on off: Hello, everyone. In last session, we have seen how we can put data bite ways onto a poor off zero final in this station will excavate the projects and the project is you have to make the ladies go on and off in an alternate pattern so they should miss in likeness of once our first time. The lady on P 3.0 is on 3.1 is off. 2.2 is on the country's off. The point for this on and so on. So the alternate pins are high and give some dealing. And then here this 2nd 100 bills are high. There is a program that we want to create it. Now let's see how we can create a logic. Forage again. Let's focus for some time onto this note back. See how the boards are match on the survivor and how we're giving deter to them. That's very important. When did I dunno? By translator. We give data to the pins like this. First spin numbers bit number seven, then six. Then five for three to one and zero. Now, when I wanted to make them all on off, they were all one or zero. So it was easy to make it ff 00 No, what we want is an alternate on us. So at once this is on off on off, on off, on off and after some daily, we want to make it oppose it. So off on off, on off, on off on This is what we want to create and know. What we have to do is where to find out ahead score for it. So it's very simple. This is and this is also a So the heck score will be zero x a on for our intellect. Other pregnant, it will busy lives. Five. Fight got it Isn't that simple? Let's go to here on our program. So patriot zero X E and between zero x 55 Let's build. Remember, building is important before you see the simulation was the building isn't just struck the simulation. Once again, we're going to see this Simple, isn't it? So that's it for the Internet On off. In the same way, we can also make for a lady on and four religions off. How this four on on demanding for off you can get the pattern is very simple. So it would be f zero. And here it would be zero this at zero. I see it left build. Stop this. In the simulation, it started again. Four on for four on four off. Not it. Isn't that simple? Dissidents, Actually. So that's it for decision And next section will try to see how to use a for loop for making their leaders go on and off. 9. Using For Loop: Hello, everyone. Indecision, Lexie. How we can apply for group for a blinking the evidence for it. 05 Remember, we have just made them on and off. But we have not excused any programming structure like for look for ladies. So let's try to do them. The task is very simple. Blink the elevates 10 times and then stop. Stop Means what definitely been late to add some delay here, then blink alternate related strain times and then strong by giving some billing. And you have to do this using following, so the hardware remains the same. For that matter, your simulation remains the same. The program almost remains the same, but we have a very small change over here. Now I want to use it, you know, follow. Let's try to see how it works. First of all, we'll try to make a for loop for some particular number. To do that, I need a variable. You can declare the variable before valve on our even before would mean before White Man. It will be a global variable here. It will be a local variable and its preferred to use unsigned camp because it will comprise less space in the dam. So we haven't sent care I And then what? You can do it. We can just create a four loop by writing for I equal to zero eyes less than 10 I plus plus the meaning off. This follow up is very apparent and clear. I will be initialized with zero as long as eyes less than 10. I will be implemented by one and this program will be executed once. Make sure off proper inundation like this. No, the program is very simple. Will make all the ladies go high. Our delay. Ballistics, 500 milliseconds, Elano And let's make them glue. And then again, a delay off 500 millisecond. Once this is done, we'll take a big Billy off 10,000 seconds or 10,000 millisecond minutes. 10 seconds to get to know the dilemma for Lopez stopped or not. So is it simple? I really coming from zero up to nine less than 10 minutes up tonight. It gives us a total attrition off. 10. Let's build it and lets the output so it should blink 10 times one Saudi export E. So let's make it sport three. And let's see the out so it has to collect intense and then wait for 10 seconds. One, 23 fold. 56 seven, eight, nine and 10. It will stop. How long you can see the simulation time over here. At 10 seconds, the simulation has completed exploration. And then we have a daily off 10 seconds. So it will be up to 20 and therefore Blue Begin started. Simple, isn't it? Now let's see. What is the task? Blink a late. It's 10 times. Then stop and again blink. Ultra regulated strengthens. So we'll have toe put one more for loop. Once this is done, we don't support. This deal will use this trailer, but this time will not make it 10 seconds. We'll just wait for, say, one or two seconds. Everything remains the same. The only changes now. What is being done in what is their problem? Instrument? Alternate a lady. It's so it. It's the pattern off Fifi and E. On. Let's make this really between these 24 looks to be two seconds. Looks like Bennett on Goto the brother section on. Just click on this play button. So this is 23 456 seven it nine 10. Wait or delay off. Two seconds against starts, alternate villages. Three, 4567 89 10 Again. Two seconds stealing. And then it will start blinking them all. Great, isn't it? And simple. Most importantly. So, actually, for decision, I hope you will be able to perform some exercises based on this lady since Fortune 10. Switch Interfacing with 8051: Hello, everyone In this session, we're going to study how to interface a switch with 05 on microcontroller. So let's get started. A switch is basically many Grandal's button. My search is the first, and farm was the only logic device that it will struggle with the microcontroller at first before shifting to other things like sensors. So a switch is something like this are the symbol is also something like this, which has only two conditions. One AIDS. An open condition like both its diagram shown here and the other one is the close condition . A switch is basically a process off connecting two pins together with a button, thereby giving user the control toe. Give the input or not tow presidents, which are not to press. The switch on interfacing switch with microcontroller has plenty many advantages. For example, if you are creating any kind of system which needs to take some controls from the user, then those controls will come from the searches. At Simple Is that for example, if I have a temperature controller that I'm designing so this witches will play a crucial role in putting this set point like I want o intersect point for dealing the senses here. I will need a couple of switches connected to the microcontroller and so on. So now let's see. How did suggest? See, how did such is our on how to interface them? Simply You can see this kind of switch is being used with microcontroller. This is the most popular one, which is also called as a tactile switch. Generally, this kind of switch is mounted onto the PCB. This is a generator on off. Switch on. This is a slave switch. You will also see some there. This kind off magnetic created switch. Basically this which is open. Whenever the magnet is taken close to the switch, the switch gets closed. Symbol for all of them would be seen like this. Now let's see how to interface, which was microcontroller. And how did I don't program for it. So a switch interfacing diagram will look something like this. As you can see, one point of the switch will study microcontroller. Other point of the switch goods either to grounds or do basis e on supply voltage. No. One thing is very important for understanding over here. If you look at this configuration over here. One thing is apparently clear that when this which is pressed this been very able connect. A controller will receive a plus. Five will signal it mints Logic. One signal will build a search on to this pain, but then you release this switch. When the switch is not pressed. It doesn't mean the controller pin is now leading logic zero. Are you getting so when the switch is pressed, it gets logic one to this. This is, but when it is released, it's not getting logic. Zero. One thing is very important to be in disorder when we're doing something digitally on him. Digital electron ICS that absense off one day isn't many presents off zero. Similarly, in this configuration absence off one dessert mint presence off zero. Our absence off zero doesn't mean presents off one. So if the switches pressed, the pin will receive or pin will read Logic zero. But when the switch is released, the pain will automatically not logical to do that or to facilitate this. What we do is we connect either a pullup resistor, hopefully down to this stuff. Now look at this consideration carefully. Let the switch when the switch is pressed. We know for sure that the controller pin wilderness ill logic zero and here because of this switch big connected in this one because of this resistor been corrected in this configuration. Whenever this which is released, the controller is getting logic one through this register from fine forage. So when the switch is not pressed, Controller is receiving Logic one and then this which is pressed Control Residence City Logic zero. Same here. When this which is pressed, the controller pin will really logic one truly sissy. But in the switches released through this resistance, the controller been Mildred Logic zero. This is called Let's pull down the Sun and this is called Let's pull up resistor. Fortunately for us in a jar of Ivan, there are elaborate sisters connected to port one for two and 43 and for port zero to work , we have to connect the external celebrities to eight minutes. We can assume on a ready made aboard on a 05 On. Every port has a bullet register, so connection the switch becomes easier. All you have to do, it's correct a button against ground and then die down. A program for it. Now look at this schematic over here. What we have is they have a switch connected to P 2.7 on a little collected Topi toe points you. Now I want to ride on a program where if I pressed the switch the only development on for one second and then immediately well done off. Now let's create the schematic and let's tryto but I don't program for it. Next, it's stuck. So this is they s committed which we have been using previously for the already best projects. I will eat this and I will connect the switch. So from the company more, I will search for button in produce. As you can see, I got the button. You can choose any one of them next. Correct this button to be 2.7 like this. So when the button is pressed, the controller Mildred Logic zero on the button is released because of the internal pullup resistors. The controller rhetoric Logic one. Now let's see. How did I don't put them for it? I would want you to keep this program as a standard factor or Sanders empty court for any project so anyone will start an empty corner base. This much of a problem, and then you can continue ahead. First thing I would like to do is I would initialize first, as which led is equal to 2.0 be to this evil, and that s a bit as W. Is equal to He took up seven. Although we know that it has an internal pull up, it's better to declare that particular input with ads in put in. But I think it to one. So making it one facility ICS, though reading off input. Now we'll write down over in financial over that is violent. One. What I want to read Non involvement loop. It's if the switches pressed a little mints on for one second on If this, which is released a treatment off, even if the switches press, the led is on for one second and then it should turn off. So let's see when express it will the Sioux Logic zero. So the program return is like this. If SW is equal to equal to zero, what I want this led equal to one, then Billy off one second and then and it's equal to see can understand this if switch is a political do. Zero minutes. If the spill really zero. Which bill? Such means. Which is what 2.752 point seven reads zero. This film will became arm on After one second, it will become off. Let's see, I have been on this program and we have socked in the simulation. Looks like it's an older simulation, so I have to change the hex file. Yes, in this stain, it's from another experiment called SW trips. A little bling cortex. So if it's zero, then led, visible to one and then led equals zero, and we need to also write down that else and it is a photo see built, and then let's strike the city out So the energy is off. No, the search is reading logic one. If I presidents, which the illiterate on on after one second it automatically go turn off. Got it. That's a blessed that. So this is how we can use a single switch with led now if I want, I can also have two switches Inter fist. Let's see how and I could also write the program so that when both off the searchers are pressed finally led is on address. Led is off here. I would change this truce. Which one? Then I will make another declaration for the second switch, which have collected cell college. Switch to disconnected to be 2.6. I'll make it took up. Six. He had a sort of making such money equal to one surgical Mexico Inequality one ends which to equal to one. Now How does it then put, if I do this and build it that it will remain exactly like how it waas before. So when I played, if this such expressed led is on, if I release it immediately eligible, done off program is that it done that way. But what I want is both. The searches should be turned on, then only illegible done on to do that. What will do its its sexual is equal to equal to zero on, and all the but and percent switch to is equal to equal to zero. Then led is on. Else led is off. Let's does this theory. We have didn't accord bill it and running it. So if I presses which already is not turning on, represent a dressage late, it's still not going on. If I keep once which breast And if I keep the others which also then only ladies on. And even if one off the two is released a little become off. Got it? So what? This is just on and then only ladies on. Okay, so that's it for the suggest section will do a number of interesting experiments based on switches. I hope you like and enjoy doing those exercises. Thanks for watching this video. 11. Relay Interfacing: indecision. Let's study about something called It's really So for what we have done with 051 is we have seen how to take a logical input and how to give a logical output to the pence off microcontroller. But we know that this logic and put an output is okay, but the logic output is only find fault from microcontroller like it 05 So this five old can only turn on or turn off a single lady at Max, and nothing else can be really turned on and off. What if we have to turn on or off something easy on something that works on a C current? What if you have a on off something which takes large amount of current, but we want to alter it on and turn it off based on microcontrollers output to do so? What we do need. It's something called EDSA, really, and it is very widely used in industries as well as in lots of different applications. Even at home, that really is are used to switch on and switch off some high power plants is so let's start really is an electrically operated switch on These are used where it's necessary to control a circuit by a very low power signals such that microcontroller signal or even if you have a very small socket or a comparator circuit without put his high. Our law you can use really toe amplify that circuit or toe. Use that particular output for searching on or sitting off something. I really generally looks like this. This is the most common really that we can see. This is called It's a Sugar Cube, Really. This is also a kind of really, this is also one grand off. Really, there are many different types of relays are in use, so these are some commercial drillers. In the electoral control panels, you will see some larger sized relates. So let's see a couple of real. It's for that sick. The real is vary according to their usage is on according to their application areas, So an industrial really is bigger insides. It looks bigger as well as it allows more current to flow through it there as simple really , or Sugar cube really alos less currents to flow through it. So if you just look at the images off relays, you will find that there are many, many different types of real is available. So a simple really would look like this sugar cube as we let someone be industrial bigger ones. So I'm so that's our really looks. Now let's see how it functions and what's its job. This is the keynote offer to become, Really, they're really it's commonly having five different points or five different pins. Out of those five, where there are three pins, the end two points are quite terminals, our Elvin and L two. And then there are three points. One is a movable contact, which is also called That's common. Another one needs, you know, and NC now see how related, actually. So this is an Landis's NC on. This is the common point. What happens is by default. The consider mental it's shorted, are connected with the common terminal by default, and what happens is whenever the relates magnetized or whenever the oil is magnetized. Whenever some supplies given to the elven and L two symbols or the school points, the electromagnet gets charged and because of this charge are because of this charge in the electric coil, it gets magnetize Because of this magnetism, this common point, which is the deciding on NC gets shifted towards. It works against a sprint tension. So if you look at it, it is more so deadly clear by default. Common is connected to NC, and whenever you give a greater supply voltage to the really coil it gets connected to, and if you remove the supply it again that's connected to NC. And if you give supplied to decoy, it gets connected to. And so the connection between Common and Eno can switch on or switch off any kind of device , whether it's a sea or whether it is busy. For example, in this symbol or in the socket, we have the canonization supply, and we have shown our It's the Lord. This can be any kind off lord, and this can be a weekend of supply. On this. 12 volt is the real equivalent pitch. Usually the relays are available, and five all toilet page six fold, 12 old and most popular ones, which are used in industrial 24 poultry leads. So these are the real is which needs. So we turn on in order to make a device go on and off. This circuit is very important. Many people, even after understanding the operation off, really find it difficult to create a circuit which can down on off any particular lord. So this soak it would be useful for your reference. The question still remains the same. If the really quite require stronghold for operation, and if the microcontroller gives only five, will it on its output pin? How do it on the really? Because Container cargo five Holdout 12. To understand this question, will it to understand transistors because what we need to do is after output or output off microcontroller, which is five or 10 0 old, we need to connect to transistor to perform a switching RBC switching toe down on Really and the really in terms, then turns on the device. Transistor is basically a simple trip in device, and there are two types of transistors PNP en can be in transistor, out of which we will currently use only NPL transistor. The duchess was ability to change between these two states, and I built it to have two basic functions which it's switching our amplification. It can either return on or either be turned off. Let's see how it works, Francis is the three terminal debates like this one is collector base and emitter. If you are available, electron is Then try just so much we don't do This is how are switching circuit with transistor can be created So a lord collected toe supply and collector gets turned on When the base is given with a logic i Wantage And when the basis given mythological low voltage the Lord turns off This is the Francis traced searching circuit now here the oven and even constitutes alone but instead off even and carbon There can be any desea lo, for example, Really. Coil can also be used as a D. C lord for the transistor as a lure. So this is the interface in diagram Also could diagram for using really wit it. 051 And but using a transistor is in between them for switching. No. See what happens if you logic high on 10 it will turn on the transit stuff which will, in turn, down on the liquid on because of the liquid. Getting my energize this common terminal deciding on NC terminal they had shifted toe on. If you have some socket like this created at the output off. Really? Then the particular lord will turn on. Remember, one more thing here. Transistor is a current control device, so we have to give a current such that we have to provide current so that it should not be more than 10 million piers going from base to imitate. And that is why connecting a resistor in series is very, very important. Any registrar level go upto one K on that minimum to 30 of them so you can use any redistribution 3 30 to 1 kid. It will give you a safe transistor on and affection. So this is very have to use a single, really along with microcontroller. What if you have use multiple relates are multiple devices stood on it on and off? In that case, we don't use really is. But in that case, or instead of transistor wheels, you Ellen toward 03 So in sort of transistor to switch multiple relays, we use this icy quality will into a facility. It's an integrated circuit with a high will teach current Darlington transistor. It allows us to turn on and off any kind of BC lured from microcontroller signal. And unlike transistor. You will and does not require presence, often external register. Let's see. How do we turn on? Relieve it. You will intuit Zillow. So this is the sandwich. You note off the will and I see Number nine has to be connected to ground. The number 1 to 8 are inputs which can be given to the microcontroller, and the number 18 to 11 are the outputs which can be connected to the lose. How we connect the Lord. It's like this. So the relay one point of the really goes to 12 volt and the second find off the really coil comes to pin number 18. Then what we do is they give the pin input from microcontroller spin. Whenever you make this phone number one go as logic one or logic high. Then the really connected a pin number 18 will turn on similarly really connected with number 17 will tone on Well, pin number two, which is going to pour 2.1, is very high or low in the same configuration or in the same way we can connect upto eight Different really is using you will into exit a tree to the microcontroller in almost every morning peel seats for driving multiple relays inside of the PLC. Our driver eyes Nike well into words. Illustrious used off course. It simpler as well. It's cheaper to use as comfort toe stuff. So that's it for the relay in professing, Let's say how toe actually interface a really and how it works with the microcontroller socket. Thanks for watching this video. 12. Relay Interfacing Part 2: hi there. Now that we have seen the grandest raised elevation theory, let's try to actually commute a solution morning with a transistor, Really? And then let's try to radio program part. So far you might have about the idea that there is nothing special off, nothing different programming. All we have to do in the program is to make that particular up in Ojai, which will turn on the transistor and will turn on the really and make that go No, which is under really off. So let's begin. Yes, I do create that particular experiment. So here is this evolution Morton there I have a single really connector. Andi, Uh, we have this particular kind of start over here and at a distance. So remember, whenever you're isn't translate switching this register is not optional. You have to connect the register to limit the current flowing dooby's. Whenever you logic one under the spin, the transistor will turn on their by turning on the really And whenever you make this pain go low or zero that on the service John off the vomiting, the religion off. So let's see the problem forage. Obviously, there is nothing in the program. It's like anything says Bitch. Really Boyd Man related calls, one really quince to see. That's about there's been this I have given VanSickle of really, for all intents run this evolution. You can see when the release turned on, the common comes to and no terminal this is you know, this is when I turn off the simulation the common goes back to and and we never right on this evolution on we can see this happening over there and the relates the common German in its region. Buongiorno and see Enel and see and so on. So that's about it. If you have ah, hardware model or if you want stupid on this thing with the hardware model, then I would recommend you go father really model which love something like this, which is going down on cheap transistor on all the required. And all you have people, is it? There is even not a document required this stand off. So that's watching this video on 13. Introduction To DC Motor: in this session. Let's study about how to interface are DC Motor using motor driver I. C l 293 with a microcontroller. Now, although that study is for the interfacing off 05 microcontroller, mind that the same socket wish you will be using for the symbol traitor facing is a hell to 93 will be applicable to any other microcontroller. Equally made. Our, you know, be microcontroller are Arm seven best or any other microcontrollers. So let's get started. BC motor is basically a kind off electric machine that converse direct current electrical power into a mechanical power that it's circular motion, so decent whatever comes in various sizes and various shapes, this one or the smallest DC motor that you must see. It's also called as a time with because it's most popularly available in coins. On it works on that's more. Let's three world signals. This is a bigger DC motor with gear box, and it works on a 12 volt in America, for instance, and robotics related experiments. You will see many different types off motors. This is one off the B C motor with external metal gear. This isn't the similar with plastic years. This is a symbol of it metal years. All in all, the function off the sea border is to accept the civil stage on it, Spence and provide a moment or motion. So this is the shaft, which rotates off the DC Motor, and the shaft can brought it in clock ways as well. Let's anti clockwise direction or counterclockwise direction based upon what input we give it to it. So if you give the input to the DC Motor in positive direction, the motor can rotate clockwise. And if we give the recent supply in negative direction, that mortar can rotate and the globe quits next, see what I mean to say. For example, if this is the D C voter there, it will have its own specific plus or positive signal fire on, then negatives. If you connect positive signal of the motor to the positive off battery on negative to the negatives off battery, then the more terrible rooted clock weights. Whereas if you change the polarity, mince positive of the motor is connected to negative of the battery on negative is connected to the positive, then modern medicine and particular question. Rex Lexus Simple them off it. So here we have a motor connected to a 12 volt battery, and this is a switch, which is there to power it on or control on an affection. Let me just president. Switch down and you can see the motor is rotating in a clockwise direction. Now if I stopped the simulation, if I change the polarity off this battery, then the same motor will start smoking. But this time it will be in the negative direction or anti clockwise direction. Okay, so that's how we can control. And we can control the motion off motor. You just have to change. The polarities which are connected to it on the motor direction will change. It's very useful when creating any kind of motor best project like a robot. Now let's see, what is the concept off a bridge. Now, whenever we want this motor to be turned on and off using microcontroller, we have to make use off something called is an H bridge. What is the average? It's a kind of searching circuit employed, which can give the motor either a positive power supply, are negative power supply. It means either supply in one direction or in the other direction. Let's see how so I have symbol or have a simple demonstration off edged bridge over here. As you can see, What is that? An ex off switches on your Lord. It's created, and one part of that experience goes to positive plan under particles through the negative supply. No, Stephen s urgent on. There is no action at all. But if I switch on the switches in cross directions, this too, and this fight, then the more aggregate supply in one direction and it rotates. Glock weights that if I switch it off and if I switch this truce, which is on the more appropriate supply in a negative direction in the motor Rogerson anti clockwise direction here, we don't need to manually remove the buyers and change the connection with back truths. Instead, we have a proper arrangement off switches. Now, when we are interfacing with microcontroller, we need it switches to be automatic or something that can be controlled using microcontroller pins. And for the same reason we Eudes an Etch Bridge driver icy called l 293 d. It does exactly the same concept using building transistors present in 30 I see. So this elementary i d. I. C. Is capable of driving truancy motors at the same time. It takes a very low level signal from microcontroller, either five World on event 3.3 world, and it can support driving off two mortars. Remember driving men's rotating them clock waves as villas and take liquids. Elementary are still supports spirit control as villas Direction. Control of DC Motor. It is based on a Jewish driver circuit, and it's no, it needs no external components at all. Looking at it, it's a simple 16 pin device, which has been number one and number nine, as an Ebola pins make them high on the driver. On that particular side is an average. So if unable to is low, this entire driver on the second side is the savage Annabelle van and unable to. Then there's the number eight, which is V Asus, that is motor power supply. The number 16 is the internal voltage, that is whatever microcontroller there in professing it with, say, if you are interfacing with five microcontroller age 051 then the numbers extension will go Decency. Five. The number 45 12 13 are all ground and they should be connected. Common with the microcontroller scrum Modric Announcement number three and number six, which is output one and output to or output even. And I'll put it to Evan Pins. The same water connected between the number three. M six. It's controlled weapon number two and number seven. What we need to do. It's been number two and number seven. The groupings should be logic zero if both depends on logic. Zero, then motor. It's in off condition if one of the pin is Logic zero and one of the men is Logic one. Motor roads in clockwise direction on this village. One on dispelling zero Motorola atrix in anti clockwise direction. Same thing is there for the working off second side. So this is this simplified diagram off a little entry and connection. Another sexting goes to five. The number 18 goes to the supply holders off motor. If is one being zero, this motor will rotate clockwise. Similarly sees one day zero this water will rotate clockwise if save zero days. One disordered anti clockwise. And if 80 builds on this mortar mill, road rage and the clock ways no off course, remember clock and in love. Direction also depends upon how we connect the motors. So it doesn't matter. What matters only is anyone and into should with different 01 will get one direction. 10 will get other direction. And this is how we will in professed this motor driver I see with exit of heaven control what we need is separate bins for in one into and enable one and I will do in three and and four. The weapons can be connected to either microcontroller or they can directly be collected to fight with. If we need some kind off spirit control, then enable can be connected to microcontroller and we can apply some kind off. People learn signal onto it. So next for DC Motor interfacing Now we'll see how that I don't program for interfacing with BC Motors and try to see the output of the same. So thanks for watching 14. DC Motor Interfacing Part 2: hi there now that we have seen how to use the terrain. Three. And what is that? Which concept with survival. Let's try to create a particular project with l 293 and try to in Profess the C Motors with . So if you do have ah motor ever moral with you than very goods. If you don't have the motive, Revel model, don't worry, we'll just try out assimilation model. So let's begin. So look at this simulation model that I'm going to show you now and rich values in the same configuration which have shown in the presentation here where we connect to the C Motors at the same time with its revival to hell to 90 Eldon entry allowed 600 million years for motor current. So if you motors which are usually like the robotics motor, which we use the motors, which views they consume something around 100 to 200 million years off courage. And so l two entries for victims suitable to use with this kind of motors. What many to roids correct in one into a novel, one in ableto in three in four to microcontroller pins doesn't matter where you connect them. If you're connecting it to Port zero, make sure you're using full of registers. The numbers extension will do five volt or the logic supply Voltage. The microcontrollers logic. It's five hours, and so the number substantially go to five. The number it should work. Devious. That is the supply voltage off motor. And then there are ground prints in protests. All the ground pills won't be visible, so the number 45 and 12 13 this wrong prints will be connected to ground. Make sure that you connect the ground off 12 world supply on your reserve Ivan's five volts of life to give it so that there is no logic level conflict now, as we discussed earlier. Also, the courting forage is very simple. All you need to do is you need to keep the level signals high, then change the state of the logic levels on in Vernon into pill on your motor Will wrote it in according direction. See, for example, Now let's look at the course. What we have done is we have simply took all six variables, so as which in run into in three and four and everyone and able to connected to 2.1234 in men. What we're doing is we have made all the direction birds zero. But we have made the Anabel pins one. So what? The devil Bins are high now. What I will do here is I will simply try to write down something on my own and sort of showing it to you. So let's do in one is equal to one. Incredible does zero. And let's hope nothing else. Let's build it. And then let's put the same explain here. It's my habit. Always check for the duration of the explain so that you understand whether you're doing the right thing or not. So we see motor and turn entry interfacing objects and this means, and then then it. Now you can see one of the two motors is rotating constantly. There is no stopping or there is no reversing of direction because that's what we have given. The signal in one is one and influence you. You can see the aliens one in Louis zero. Now, if I had a bit of deal after doing this, flex the do second, steal it, and then if I stop them in vehicle does zero to equal to sell. Then again, Putin Dealio one second. Let's run program this way and see what happens. So now it will wrote it for two seconds and then wait for one second. I conducted for two seconds and then wait for once. And then all this thing if I have to change the direction of the motive and all. I have good words changed this 120 on the 0 to 1. So we'll change. The polarity is off the input signal. So this is one direction. Two seconds. Stop opposing direction. Two seconds. Stop! That symbol is that Get it now if I want to write it. But the motors at the same time, then in Venezuela, one invisible to zero in three is equal to one and four is equal to zero. Make sure whenever you change the direction off motor, stop the motors at least for ah 100 political if not much but at least 400 milliseconds. That will not show you any physical science off stoppage. And still you will be using the motors and healthy condition. So that's about it. The program what I need to do is repeat the same piece off court. It's changed directions, so this time it will be 010 and that's it. Let's run it, Let's see. So see what? The motors in one direction. Then after two seconds, opposite direction, I get after two seconds the same direction. Now you can create a two wheeler about with this thing. All you have to do is make the connections anywhere you want. After doing all the connections, all you need to do is check which sequence off the imports, generate the particular real movement for you. So whatever is your expectation, you can just reconfigure and experiment with the program, and you can come to that all foot there. All your motors are locating according to your expectations. It doesn't matter how or what way you change the motors you can. I don't anything. 10 01 here, 0110 Here it's simply just doesn't matter. Millets presents. So both of them are waiting in the opposite direction and after two seconds again, their legal moving rotating in opposite directions 15. Introduction To LCD: Hello, everyone. So far, we have seen some interfaces with its refinement. But this one, which we're discussing we're going to discuss now, is the most important interface. Why? Because, unlike computers on reserve file microcontroller, there is no foot device on LCD. Are liquid crystal display can be our first and only most popularly used or for device with microcontroller? So let's get started. Ansari are liquid crystal display can be off. Many types, mainly the most popular type are something called as a textile city. This text cell city can be a professed to the microcontroller on. We can print any kind off text onto it, which can be printed using people so it works, basically only asking characters. Other type of L City is a graphic cell city, which it specified in terms off pixels 1 28 by 64 mins. 1 200 pixels are dots in one drawer, and such there are what would your message? Superman's 64 roads, the other kind of the 1st 2 nights are monochrome displays. They don't display colors, but they're black. Only the daredevil displays pft as well as the last one is the ability the oil it is are also black, and there are some color will. It is also PFP. Insurgents are mostly the color this place. The resolution off the FT's are also specified. That's pixels 1 28 by 64 so 20 by 2 46 40 by 40. And that kind of things with a reserve i one's limited RAM and limited flash memory began in professed of Textual City very easily and properly with it. 05 Select how to use a textile city with 05 next city. The most common type of text else really is a 16 by two LCD or succeed by two liquid crystal display. It simply means that it can displace 16 characters for line. And there are such two lines. Mr Total of 32 characters can different Tirana 16 by 12 City In this character, every character so in this else really very character is displayed by find by seven picks. A matrix. The Century has two resistance to accept commands, as well as data from the user's wonder. Instead, it's command another bonus data that's extreme by to register. It's probably the most widely used. Somebody else is probably the most widely eels and city, which is used with microcontrollers, and it's very popular because of its simplicity. Also, it's a sexting Pinel City weapon Number one. It's this is on the number 16 is this. Let's in the description. But number one is just ground. We need to connect it to the ground off. Negative off the power supply. The number two is a sissy, which goes to the plus five world supply. But number three is ve That is a contrast control pin. What we need to do is very to connect apart or present between ground and sissy and give the variable points to contrast control. This spot move, the more it is towards the ground said will get a greater contrast and of the portals towards VCC side will get a lesser compressed. The number 15 and 16 are for the back late Ellie leads, So if you have a greenback light or yellow back modality, it will look like this. And then you connect led personality miners to Mississippi and ground that back late turns on. If this friends are not connected, it does not affect the regular working awful Siri. But if we give proper connection to the backlight. Then it reads, increases the reliability of the city. Then we can see the number 123456 The number seven to number four pills are the detail lines, baby. Zero toe BB seven. This is the data bus which can be connected directly to any microcontroller. It accepts it with data from a microcontroller. Then you can see there are three control pins. Artists are still sw and an apple. Our this is our adjuster select. Been so. Whatever we give from on to this data bus, whether it is to be executed as a command like clear display ship display towards life should be split. What's right or whatever it is. If it is true, treated as a command, then honest needs to remain a zero. And whatever we give through this Daytop Ways data bus or data pins IFR instrument treated as an asking character than artist needs to be connected. Toe logic one I repeat are zero minutes. Command is given from the data lines are this one minutes data is given. Data is given through the the talents. I'm slash the blue bar pain. There's to be connected always to ground because the ground mints right. We want to the city and with specimens. Really, I usually never really from LCD, so it can be connected to go or if it gets to the microcontroller, then we need to make that pain go permanently. Animal is interesting. Whenever we give any kind of late on to the data lines, we need to make the enable been Go high with a delay on go. So if I have to print ABC Lee, I make other spin. Go one. I will give data like the asking court off over here on the data lanes and then I'll do what I will make enable go high and then make it through. Once I make it high in law, it will be printed here once. If I give a higher law without changing this line, then a second they will be printed and similarly by giving every printable comma data are every executable command every time we need to make this Anabel Pino, go high and blue. This is the pain out as we discussed right now. So the number one ground number two with sissy number 3/4 adjustment. But nobody for selectively commanders stuck in low and select data resistor of in high the number Phi Lota Right at the register so high to read from the register we are always keep it connected to look. The numbers of Sanibel sends a letter to the prince from high to low palaces. Given number 7 to 14 is divisible today with 78 But it happens on for 15 16 rd back latents something. This is how we can profess a textile city with microcontroller with 05 in here. What we have done is corrected all the vigilance from zero to be seven to make sure that the zero fell city should get connected with zero number off the port of microcontroller so it gets connected to 2.0 and the seven x connected to 2.7. We have grounded the art of blueprints for imminently. The IRA spin goes to pay even porn zero and they enable been goes to be 1.1 broadly, there are two different functions which can be created for l City in professing one is to share our transfer the printable data onto the L City On another one. Let's to transfer executable commands to the city. Interesting thing is, there is only one difference in this true functions. And that is our s. So we declared the Addison Anibal sincere. The else Eric cmd function will be giving the data lines on support to giving the waiter to pour two. And then, since its command, we make a spin. Go, Luke. Mega nimble higher and make it flew off readily. There is a different beat onto the L City. It will be we quizzical toe that data whichever way passed to the function. But this I'm arrest will be equal to one, and I will equal to one after a delay. And I believe Quito zero. So these are the two functions. Most important functions require friends it into facing. When will do the program in the next session, we'll see the program for interfacing with L City on there will create some more functions to pass some valuable data or some important data to the city. Thanks for watching 16. Creating Schematics for LCD: Hello Indecision. Let's create a schematic model for interfacing the age 05 microcontroller with us, it seemed, by to hell, seriously So first of all, let's save this blank design in protests. Go to the company more, as always, look on the big devices symbol on live State 89 C five, which is the generated 051 Presenting the pro to slide very just like that on the same icy will get loaded into the device library Over here, this double click this icy and it will appear in the device library as it comes here. Next search far 16 x two and we'll get the succeeded by two alpha numeric l city, and simply double click is also remember in simulation environment, you don't need to connect the crystal here in Ferguson moment. Crystal is not needed. So this is their survival icy, which we will interface with this LCD display. Now let's connect the port to spin number 0 to 0 2.1 toe Beaven and so on. For all the eight pence off port with LCB in our program, we must hands right down for two as our data port for interfacing with the city as discussed in the last session. Go to the terminal small and take the ground symbol. Connect the art of Lupin to the grounds and connect artists toe when born Zito and and able to 1.1. So that's a schematic for itself. Evans interfacing with l silly. Impractical. Then you do it. You must also connect ground Stupid number one via Stupid Number two and the Part two. This is the end grown with the middle point Toby in simulation. Even if you don't connect it, that's fine. Now let's look at the program. This is the quarter for it. Here we declare artists as P 1.0 and a bill SB 1.1. This is our diligence rations. Repeal. Just use the same routine. Always simply copy paste this in every court. A generous emphasized remain milliseconds off. Whatever is the value passed to the school, and then we create two functions. One. It's called El City. Underscore data on a dribble. It's called El City. Underscore Common or CMD. Both incident. An incident command will accept an unsigned care medicine aid with value from the main program, while in the data function what we do. It's since we have to send printable data. We make that it's been one posted. Is it down to the port to then we make an apple. One dealer. Annabelle, Syria. The only difference between L. City, Dayton and City Command functions is the other spin in LCD command. Function is zero. Now let's look at the milk. Or they did some initialization instructions or initialization commands, which are needed to be given to the L City whenever they'll city starts. This have those commands. Zero extra g. 8002001 red Ciroc exited 06 Then we can give an address where we want some later to be printed. And this much is the initialization program. Next comes incident underscored data functions. You can see we have given capital W E L C O M e this Lakers onto the incident of Scott Data function, which will in turn French nothing but a simple welcome onto the L City. Now let's go to the project option check for the clock frequency, and I'll put that check for create explain, click on OK, and just then simply click Billy once the program is built The X Files generated name of the X File it same as out of the project file. That is a silly, basic, no double click the icy. Here you have to specify the clock frequency here and in the program file section, you have to select the same sex find. Now let's take it. Click on OK, and now you can simply play the simulation. Welcome, Sprinted. That's a bill is that Now? If I want to change the position off this welcome instead, off starting it from 80 it is the address off first room onto the L City and Cyrix C zero is the address off second rule. So instead of 80 I can also start from zero X C zero. Make sure you build the program before running the simulation. Now you'll civil. Come on to the second line, and not only the starting position off the line. You can also go down. So some next position say it fine that we were printed onto the middle of the first trough L City. That's it. Similarly, C five will print, or C seven will print slightly inclined to the right sort of Dale City. The address is Rs 08182838088 b Up to it f civilised zero to see if there to make sure if I have to print seven characters, then I must start seven characters before the last service that is F. So this is the simple interfacing program off reserve off I want with it by 16 by 12 City in the next programme. What we'll do is we will expand the functionally beautiful city because now, as you see, even if they have to print a single word, you have to call the LCD and risk operator function seven times. So what needs is a sophisticated library to a professor with 051 and in our next. With them we'll see some additional functions which facilitated the usage of Hell City. So next for decision happy learning. 17. First Program On LCD: Hello, everyone. In our last session, we have seen how to interface. Elsa riveted zero fiber. And how could I? Don't feel it? Simply program for it which prints off. Welcome onto the screen. My indecision will look at a detailed cool using the same incident to school data and l City In the score common function, we have created fume or additional functions in this program. So next begin along with incident daytime ends to be command, as you had seen. We have used LCD command function in the beginning of the program several times to give some initialization commands. So we created a function off it void city in the score in 80 and all the initialization Commons are given here one after the other. Then we also created one function that is l City and score clear because we need to do it much often in our program. The trick to clear the answer is very simple. You just need to pass a command one or simply zero x 01 to the city and l City. It's clear now, along with I'm 80. Unclear. We have three in border and functions created. One is LCD. Underscore cursor, which begs the cursor toward desire. Position off ruin color. So for 16 by Tooele City, the rule can be one or two column can be anything from 1 to 16. So when writing silly underscore concert When come oven, our cars are opposed to the first round. First column. Awful city. This is the core for the same. Then we haven't City underscore out where we have to specify the room position column position and weaken directly. Printer Extreme. The example is like this L City underscore out one comma, one comma Hello, just like that. And then there is a city in the score print function. Remember, the L City under school data can directly only accept asking characters. So if I give you hear one comma, one comma a number to be printed like this, it won't work. What we need to do is we need to convert this number intrinsic well and asking for much. And that's why El CID in school print function is being created over here. Leslie. Let's see how good I don't program with it for so far. Let's declare a variable. Say count is equal to zero. Then Elsa Leander score 90 will initialize the city incident and the score out one comma bond Comma Welcome. It will be simply printing the welcome message. Let's take dealing off one second. And then let's clear the l City with healthy beyond the scope here in the violent, what will do its will Branch LCD Underscore out one comma, one comma seconds and and Cindy and those score bridge here two comma van Common count, comma four. The last digit that is four indicates how many digits are to be printed. For example, if the value and count it's 35 but specific before it will be printed onto the city s 003 fight just like that, then leads to account classless and the delivery one second. So this is nothing but a simple program which will bridge the ongoing number off seconds in our program. On to the second line, it demonstrates else in the i N i t l silly out all silly, clear French every function that we have used in this program. So let's build a target. Files use the same simulation environment were created last time. And just like the play button, if you have changed the location off the project. It would be good toe just real or The X Files once just look on the flavor. First of all, welcome. Then it's clear and seconds. It's sprinting the total number off assimilation. Second, sometimes depending upon the superior or your sleep, you might be running slower, but it is corresponding to the seconds off simulation time. As you see, we specified this number that's full, and hence her sprinting four digits. If I specified as five build, then a total of five digits will be printed now, depending upon the requirement, you have to decide how many digits cell phone number you want to print. For example, I can simply just keep it to which will prevent up to 99 after 1993 become zero exit. So you think these library functions, you can create almost any kind off project with Elsie, you don't need any other functions. What you need to do here in this task is downloaded. The attached file, which contains the kill project as blessed, brought assimilation file started dysfunctions carefully. There is a little bit of technical things. If you're interested, you can civilly functions. Other ways. You just have to master the usage of functions. Try using all the functions in every possible way so that you can create the further projects which are given with L City. And searches like up down counter are a simple menu creation for temperature controller and so on. So that's it for this session. I hope you will enjoy this experience of learning L City. Thank you. 18. LCD Interfacing_4: Hello, everyone. Now that we have seen how we can interface the city with 051 here is the shortest way to and profess. There's off Ivan with the El Sirri and that is using the four day talent Spoonley. In this video, we'll see how we can interface the city using only the four lands before the Fire 86 B seven. Instead, off collecting all age lands. We have only connector for re talents. I don't believe it shorter. This is gonna get to controller and in heavily. It's also an Eclipse city comptroller. Data from microcontroller Clell City passes in terms off nipple are in terms off four bits every time in this scenario, which reduces the total pin count required in microcontroller on also facilitates the usage while doing the harder connections. So that's the somatic you're going to hear off course I have not. An activity is yeses to ground. We needed five old and Ito courthouse control because I am currently doing this civilization. If you are doing it on hardware, then you ought to connect this Spence. Now let's look at the program and before looking the program. Yes, look at this separate file that I could teach it. This is l silly dot c file. Now, instead of keeping all the functions and declarations about L City inside of my main for them what I've done here, it's have creature a separate file called El Sereno Sea. It lists all the pins there the l Syrians to be connected to controller, then all the functions required for L City. So really, I n I t set for which busy common data out cursor incident of store bridge. These are all the functions there every time here on which facilitates the use it offensively in a simplistic week are initial list or declared here. Then there comes the function definitions. So this is the definition for the ladies finishing for i n a t. This is how we set their city to working for Whitmore. This is the very busy function. So instead of all this in the function, you can also have a simple delivery. This is a city command function, and this is a city data function. So this is how you send commander Will city with for a bit more. And this is how you sending that and then this is a functional city. Underscore. Ouch. So with this experience for our function, you will be able to go inside and a score out. One comma, one comma. Hello Like that that gets this finder one column and windy number with l Surrender School cursor even be able to sec nickel, sir. Position to any desired locations like this. I am intensity underscore print function. You will be able to French any variable Lexie in physical took. When did you see? And then you will be able to directly parentage. So incidents corporate function will take care off printing. We're converting the A in goods equivalent us. The last digit, which is four here, will indicate how many digits stupid. Let's set the value off AIDS 20. But if I keep the last digit four, then it will be printed at 003 If I keep three there and it will be pretty, that's a little clue, like that's so These are the four functions I'm using in this library on. Let's help, you can use it. So what you need to do, it's just is this fine into the place where you have military or you kill project. So this is my project, That creature. So just give the folder Eso just keep the fine into this folder incident or C then right under mean program like this. Well, I didn't find still source group Do not r l city. I repeat, do not add else in just our York Maine five Whatever it is that you have, then you can do this like a city under store. I energy will also take off Internet. Even then you can go l city under school. Come on, go in City? Yes. In environment, it's stool and city. So coma, coma a coma? Oh, you can give up the fight in a Okay, let's What's your program? Rating is done with your program after belligerency The incident RC file is automatically added. I needed this literally in my meat quarter also, So I just use it yesterday here after incriminating immobile Louis l already off Year seven seconds. Which there has a Gulen. Go to the track. Adoptions. Selective proper clock frequency. Great expired Check mark and then video publishing projects get this knocks created because of Syrian M s medication. It incident is still missing. I have just pretending here. Still not creator. This function already has a body in L. Sidney Dorsey. Something needed here. So explain this creature in objects will see the explosion. Now to this assimilation model. What I'll do is that people were with six. Fine, actually, have just creature in city orbits. Let's sleeps and you can see a student scored test this winter and then five digits. 00001234 It's incriminating. If I want, I'll just increase this really a bitch So ridiculous that really and increase the printing Spread a bitch and you can see the old this library faceted Reach the usage off and city in both with first with sir completes often elaborately, very clearly to use in any project. So that way it will be easy for you to added in any project. Secondly, it only use this six lines off microcontrollers, thereby saving us from four pressures microcontroller lines so that you can use it in project their most off Your lines are also busy like like one in eighties and many such messes. So do its prevention with this particular file incident or C and see how it can use it. I repeat, I'll also show it one more time. I close this project. Here, take a new project. I'm just demonstrates New underscore. Be older and new projects here. Just look for my cruise ship. And then you'd be it. 95 1? No. Then create a new fighting. Save it as main Dorsey, then copy the Cell city. See file. Do you understand? Look over the text in. I mean, if I have, you know Pittis. Lester Geo. Well, I didn't Fine. Just had a mean in close. And then six my building the Old City Roxy finally be automated. Thank you for watching this video. 19. Serial_1: Hello. Everyone in decision will study about the Syrian communication between 805 and B. C. We all know that exit off Ivan has something or that Syrian port or you art. But let's understand everything conceptually so indecision will study typically about what are the different communications available, their self Ivan model microcontroller. And it's to the PC missing artist to treat on. This is a protocol which supports all the different types of communications, and we will dismiss others in D. J in our next session. Basically, for any kind off digital communication to happen between two parties, we know that dailies are simplex as the lesser duplex transmission. More simples transmission. It's something their one party can transmit and another device can deceive on. The communication can happen only in his direction. There is no communication happening from receiver to the transmitter. The classic and most simplest example off simplex transmission is the television that we see at home. Even the people in your BPH is a form off transmitter receiver communication. Another type of communication is for that's duplex transmission. There, the device one and device would off them can act that's transmitter or, as a receiver in duplex transmission. Both devices can send the chatto each other, but in duplex communication. Also, there are two types. One is for that's half the bricks and another valleys. Full duplex have duplex. It's something they're Both devices can act as transmitter or receiver, but not at the same time. It simply means that the transmitter can act as a trance richer while it is acting as a transmitter. It cannot. Patrons of this evil same goes apply or the same thing. A place with receiving thing falls it can. I didn't see on Transmit the classic example off Half the elixir medication we all know about is the market okay? In which we have to press a button before speaking something we have to release the pigeon in order to listen to the details coming from the other. And that's like to perform civilization. We have to use keywords like over and over, and ouch, we see in the communications another time off. The blitz omnivision this whole duplex, where the transmitter against in data as well as the received later on the same can also happen at the same time. So Simon Day visitor transmission and reception is possible in case off Republics. So these are the simplex have the blacks and full of bliss Communication horse. Then in specific digital communication, there is a serial and parallel data transfer in a communication sender sense. If you try to the receiver only to a single line, so they tried cinch with my bitch or the single line to the receiver. Why didn't transfer all Edwige off a word or a digital board are cinch at the same time. Now we can see in serial a couple percent good pipe, which, and there's therefore the communications room off serial will be much slower as comfort to the communication spirit off transfer because they're all a bit of three nights in a single line or a single instance, there are off course under control lines stored or something of synchronization. But looking at her, we can easily say that the parallel translates faster. But then the question is why we prefer cereal transfer. We also know in computers we have USB ports or even the land works on cereal. Chancellor. Why is that? Even the hardest snow? What it's comes to us are comfortable. It's accolades. A Syrian transfer. Saturday's up Siri entrance, sir. Portable. So why is that? Because in federal transfer in parallel communication, multiple conductor or multiple wire is used. That's comfort to the serial Harold Leave. One or two wires are used and in electron ICS than ever. Harder complexity can be reduced with some some complexity then always offer complexities referred because it has to result only once, and it directly affects the overall costs off the system. So incident communication being nice, transferred from one dimension, the other device by which there are quite a technical needles into this. But visiting is parallel in cereal out shippers that is there with, since one, data bitch on every developments on and serial communication. Also, there are only two types one its synchronous on another minutes, our singleness. This is just achievements in cronyism between Council Today. Deception. One of Vincent's singleness communication eats the transmitter, revives Peter Line on McLachlin, and since the transmitter itself since the plotline, it can send as with the number of bytes as it's really to be at one instance, there is no limit at all. It can send as many bikes as possible between a start and stop it, whereas in a synchronous communication clop, ALS is not shared. So the spirit off center and the spirit of receiver are different. There isn't single owners. The spirits are matched because the locket shared here. Clubs are not sure. And that's why, in US and wireless communication to perform this synchronization every day. That bite is encapsulated in a kissed one start, which and one stop, which. So instead of sending intimate data, the old bits in 10 bucks off, you know, for every single character. So if I have to send welcome there for W Panguitch see and lives and so on for every husky character and with something date store, what about innocent girls communication? We also have to match the ball grips on bricks for seconds at the transmitting in as well. Is that this sitting in? So that's about bridge. All we have seen is about the communication types influence duplex and have the clicks, then serial and parallel, and then the benefits of scenery, communication and the types off silly communication that is no single innocent singleness in Instead of island, we have ah, half duplex. You a party that is in your cell off singleness, receiver transmitter. There is another type also, which is user or USA Authority. Which is there something wrong with This is a chance. But on the inside, if I want, we only have. You aren't so only a single. It's more. It's support. That's it for decision In next session, we'll see in detail. However, 05 months you are can be configured and how it since later to the peace. And then we'll see the program for rituals that's watching this video. 20. Serial_2: Hello there. In this video, we'll see about the actual court, which is required to be returned for the interfacing off. There's a fireman Syrian port with DPC and the last station. We have seen some basics of the serial communication. Now we're going to discuss about the specifics with respect to its 05 So let's begin. So as we have discussed it, 051 has got one serial port or you art, which is 1/2 duplex one, which can transmit and receive data, but not at the same time. So the data comes off the out of the reserve. Haven't been through the pin call. That's TXT, which is multiplex twit in a port number 3.0 and presented in number 10. And the data is the suit through Pin Addicts Tree, which is multiplex twit Port 3.1, which has been number 11. Now we have to understand wanting here that the data transmitted under search onto the exit of Ivan. It's in detail format, so whatever data comes out or goes out of the microcontroller is in either five or zero will form it on the traditional computers. If they have an artist to three to port. Then we need some voltage level converter in between, which is called It's Max Retreat. Well, if that's about the max 232 Letter on and decision, So let's begin. First of all, we have to understand the different about Brits that are available for which we will become figuring they'd survive. Want to work with? These are some of the standard speeds with which it can be transmitted out off a microcontroller artist. I can be the simply the microcontroller. Why do you need the standard about drinks? The reason is very, very simple because we are performing an awesome groaners communication, which makes use off only two lines that it's Tietjen add extra. So if the receiver is specie and the transmit it is agent of Heaven controller, then we see don't know with what speed that five minutes Transmitting data in synchronous communication oclock. It's shared from the controller to the PC, which tells about the spirit of the communication. But in a synchronous communication, there is no clock, and that's why we have to decide on the speed of communication at boot, transmitting in as the lesser Dennis sitting in and these are some Saturdays figures provided by the IBM PC standard. Most popular off these are the most common one off. This is 96 double zero. So will I. Don't accord to send data to the PC from its roof Ivan with this Baldridge and will use a terminal software like Net on or terminal or pretty onto the PC to observe that data boat trips. Image of heaven are a very interesting concept. The serial port of their 051 actually takes X clock derived from the frequency that is generated by the crystal oscillator itself. But here it goes before giving the crystal oscillator directly to the U mart. It is first divided by a trial by the mission cycle frequency off the reserve Ivan. And then it is further divided by 30 to buy you art before giving it to the actual model, which is used for transmission. So this is how the clock frequency goats consider frequency first divided by 12 then for the year ended about 32 then it is given to Time Mervan because Timerman is responsible to generate the about it off. Ages 05 Let's see one level everything 200 about it and transmit data from serial port affairs Revival. We make use off three major resistor s buff s con and taken and apart from this three resistors, we also making us off time of one for about regeneration. So timer ones control that this turbulence abused. Let's see, what is as buffer register as love is the data at the start off 051 which holds the data which is to be transmitter on. It also acts as the receiving register. So whenever someday ties received in s buff, it can be read into a variable like this. So just in a bitter this to use for data storage transmission as well is a deception. Then this is the team or register, which we use for the time out of an operation for the property is off. You are in a reserve, Ivan, we need to make use of time or one in eight bit auto reload board. We'll see how to configure that also. And then there its peak on time or control register out of which values only this bitch Pierre one which nature with said toe one to start the timer now coming to the actual Syrian port related resistor s con is the Syrian port related resistance. As you can see, this is also an eight bit register. Lexie. The description of this register this tube, it's sm zero, and someone are responsible for the more selection off the serial port and censorious. And when it's time to Aryan is a receive anabel bit. If you disable or zero or right zero to this page, then the ages of five and will not be able to receive any data. Usually this escaped at once so that reception is enabled. People will be another two special, which which are used when we're performing a nine bit communication because, as befits a bit register, it can only receiver transmitter eight bit of data, and it gets if you're performing nine with communication, then the 92 protons imitated stored in TV it, as well as an intimate off the same day tied story Arbeit. The I R II are the two flags which indicate or which tells the controller. Whether some data has been transmitted are some data has been to ST or not. So whenever you put some daytime toe is both. It starts transmitting it automated and then the transmission is finished. The P I flag becomes one as long as the eyes one, nothing will happen. We have to manually clear that the Aflac so similarly, our eyes there. Whenever some day ties received, the other flag becomes one on. We have to manually make it feel before the exit of Ivan becomes able to the city. Next data essentially, someone are the two bits with primary leaves we don't generally near. It seemed to fit for configuration. SMC realize someone which said he was in this fashion. So if there's 00 then no operational shift register, we need to keep it to 01 in order to make it act as an eight bit you Ward, whose border it is variable by time 11 Or who's about it? Can we decided by time, but often so This is what we want to use because almost every other peripheral way interfaces of heaven with including PC only supports a bit your operation. So let's see how we can go and figure this further as discussed. Aryan is their toe Anabel the reception you make it one the animals There is referring to the Sudetenland zero. The receiver is disabled as disgusting. Made out of it will store the eight byte. Did I interrupt flag Another Enterp flag to indicate the reception of date are that there has been transmitted now about regeneration. Now this is very interesting and pay very close attention to this concept. We have taken some samples. So crystal frequencies as soon to be 11.592 megahertz here And this is the reason this particular thing, why we use such kind off group frequency like 11.592 megahertz now much discussed this with a note pair open. First of all, as we said, F oscillator is divided by 12 to give a frequency. Then it is further divided about 32 then given toe timer to generate D About which now, if my efforts a little is 12 megahertz by dividing it by tell, I get one megahertz and by debating one megahertz by 32 I get 321.6 killer words as the frequency off my timer. Now, remember the Syrian port vague eight o'clock both for transmitting. Are you receiving then ever time are one over floats, so on every overflow off time Urban will get one clock balls for the transmission or reception toe happen now. For example, if I have two Children about it off 96 double zero pigments, I need 9600 pulses going to the if you want or the serial port every second. Now the Children 900 As about rich, What I need to do is I need toe make my timer. What a flu. Nine since zero times per second. If I have this frequency 3 21.6 kilohertz, then I can divide it by some value to generate 900 as my boat rich. Unfortunately, when I divided 363 20 the 1.6 killers that is 3 to 160 by I wouldn't divided by 93 every liberated Benenson cereals. That's my about. So when I debated Ben instead 00 What I get is 3.35 which is not a complete figure. So what will happen? I will have to divide three toe 160 divided by three, and it will generate some frequency like 10,720 which is not a perfect Baldridge. So to get a perfect about it, if this is 11.592 then by dividing it but rather 12 delegate something like 9 21.6 Let's see. So we get 9 21 0.6 as frequency, and then this is divided by 9 to 1600 I get to it 00 hopes as my time of treatments. And when I divided by 900 I get a perfect figure three, which can generate a complete perfect Baldridge. That's the reason Vibe used 11.59 to my guard says Our time frequents. So when the crystal is 11.59 to the system frequencies, 11.592 directed the ritual that is 9 21.6 kilohertz time. Urban has 9 21 points of Skinner's Surrendered about potato is equal to 28 00 hertz. At source, we keep the value of th one at F B. H means the U. Art will send a bitch every three time or source. So basically what we came up with its treat. It simply means that timer needs to consume three pulses before giving overflow. I re pitch. This is the timer frequency that is going to get in order to generate 9600 hurts our garbage. What? I need AIDS. I need to consume three pulses off this frequency to generate one pulse here. So to do that, what? I'll do it. 2 56th pulse is my over flu. That's where my overflow lockers minus three, which is equal to 2 53 which is nothing but f'd in hex. So what we'll do is we'll or the time of once Ph one register with every itch. So what happens is it is running at two editors resorts, so it increments 51 so it becomes f e. Then it becomes f f. And then it overflows. So three pulses are consumed at this frequency and one pulses given to timer, thereby divide summer frequency by three. And we get 9600 hertz as ever about it for instead of five. So ripping decision if needed. But this is very important for you to understand. In next session, we'll see how we can write down a complete scored four timer and serial poach to send the data that's watching 21. Serial_3: Hi there. In last station we have seen How about regenerate? Alienated 051? Let's see the complete according off, generating the about it and transmitting some data from its survival. Let's begin. So, as an example, we had came up to this point that why we need to sit every, as ever, count in the countries of start time of resistor. So if you want mentions that isn't about it. We need to loaded with empty for 24 servers are about it. We need to load it with effort for 1200 Walter, and we need to load it with e yet and that kind of thing. So accordingly, you can Children different border. It's required for the It's a fireman's you aren't now. This is how we can generally Badr it off. You aren't and how we have to transmit at the suit data. But before writing the court, let's understand what is this serial port? You might have seen this kind of debate and connector onto the PC on a GSM more name or on another Friday leader and many such peripherals. Basically, when there were no computers at all in those times Also, there was a standard for serial communication. It was called its I 8 to 32 According Toa. I ate 23 to Logic. One used to be represented by minus three to minus 30 volts and Logic zero waas, defined by plus three toe plus 30 volts. So this is Logic one, and Logic zero was defined by plus 32 plus 30 forage because there were no transistors. So there was no five or 10 0 world for logic level decisions. So there is very the readings and based upon this logic one and logic zero E. I ate 232 Standard was created, which consisted off such kind of divination connector. With these are the been functions. Later on came the transistors. Later on came the Geologic and five World and Cyril. But this TV nine watts present in many existing computers as well as many existing peripherals, so completely removing the standard from PC was not possible. And still, today, if I never you buy an industrial PC or whenever you buy our desktop PC, you will find other sofrito pork. It's present in toe the PC, if not present, you can add to it. So what? Our logic is here. We cannot send data from its refinement OPC because the world is levels are different. And to convert this world is levels winded voltage level converters. So the 1st 1 popular was Max to 32 Jump of this ice is very simple. PSD data will come to back sofrito npt logic five or 10 0 Vote on the or go inside. It will convert it into others to three to logic which can be given to PC. Same thing Receiving data will come into three to logic on from the PC it will down in order to five or 10 0 would. So it's job is to convert this logic one toe, five volt. On this logic voltage off this logic level two 01 And that's why I mean it. This max toe to toe socket. This is the exact schematic we need to interface with it. Survive on microcontroller. It has about two drivers. You can use the same. I see toe interface to microcontrollers with two different serial ports on any other peripheral if you want to. And this is our sample court, not demare escaped 06 to 0 because we want to make use off time or one in eight bit artery . Lawrimore escorted selects 50 because 01 is the more that we want. And this bit here is the rdn, but which we need to make one in order to receive the data. So 01010000 That's over it. Down in s con to configure it. Then we lowered the ph one n p. L. One with the initial count. We need that zero X every so that it gets to relate every time and the about degeneration becomes automatic and then the other one is loaded with one. So the time where one starts and the boat it starts generating this is a fun shall we have created especially, which is just you. Aren't I a nightie function? So this will just initialize the you work for sending the data. Then we have done a function you want one underscored right. The job of this function is toe except an eight bit variable from the main court loaded into the s valuable. So as I have told U s buff at soon as a would be time to his buff. It starts transmitting that data. So at this moment, what we have to do is they have toe weight. Violet P I bitch, It's zero because he I but will become one vendor. Transmission is finished, so we can also simply write it down like this. Well, t I is equal to equal to zero it there. The court will wait here itself as long as diabetes zero and so nasty Edward becomes one, which means the transmission has been finished. Then the program comes down there manually. Clear the p a bit because Manu in clearing is important. Unless next time do it, I will not be transmitted. So are void main program elements simple like this. What we're doing here, AIDS. I'll just modify the court a little bit and we'll just send Some are between number over here with a deal. So I'll just send a single character onto the serial port, and then you can have some kind off dealing. So that's the court which will be needed to be return in orderto just transmit the data from its through five while receiving the data we need to make use of the archive flag which becomes one whenever the details received. So let's see the quarter for complete structure. So this is I n I t function. This is right function. This is an additional function. We have returned toe send strings over the serial port. This is the real function, what we have to do. Interdimensional Xarelto which until the arrived which is zero aggravated zero, means there is no data to sit on the serial port. Absolute. Some data is received. I will become one. So here What we have done is we have made that I flagged zero on really done the contents off s stuff in the main court. How we write it down is this You weren't one underscore in 80 Then you would wanna risk Alright, underscore text Hello, serial port. We have return another function over here which sends a complete string over the serial port or the you work. It also makes us off the same yard One underscored right function But we have used a string to transplant and involved in what we do is a physical Do you are treatments? We will wait for some detail. Toby received invariable A and answered some details the 17 they where I could back onto the serial port. So that's a complete testing core for the you are. What we're going to do is I'll also give you the complete socket needed to do this, how we can do it in protests and how we can actually do it by connecting the hardware to the PC in our next video. So that's it for the you want pay close attention, toe the video, which bills it about regeneration because that is the most important thing to be understood in the U Arts. Conflagration in digital fiber Thanks for watching. 22. Serial_4: Hello, everyone. Now that we have discussed about everything related to serial port, let's create a program for this particular serial port and lets the state out on the simulation. So let's just start with a K, as all vets closed the existing project, if there is any and create a new project. So let's create a new project in a suitable location for me. Our records miss a table location, so here are created. So serial? Yes, Then search for my good ship. Maybe it Nancy favor is the control of your using ingenue fighting, saving dad's mean Dorsey and just copy paste this entire report from representation over here. So that is having all the functions and everything. So, very first, what we'll do is simply try out with equal program. If you have a hard there, then by connecting your microcontroller board to the PC's serial port, you can see the are put on a terminal software. Anything like a terminal, softer or terminal by bre. I'll show it to you. Otherwise you can see it in this demolition orders Lipsey. In this program, everything is done, but my favorite daily routine is not there, so let's go back to some program like the city program, and let's copy that the little game. So this is what you will be needed to do. They never even experimenting. Copy and reuse your court as much as possible. So that's the motive. The program. Insurgent completely. What we do is we initialize the serial porch and then vibrate Hello, serial port on the terminal. Then we wait for reading a particular text or a particular character from serial port. Then after receiving, we went for one second and then they send back onto the You are. Let's build a score not created. Okay and toe are the C five happens with every one of us, no matter the experience. Now there are some issues, is an identified. So let's declare a cattle e. Let's see. What are the others? Nothing. No. Go to the reject options. Then output that idiot ex. Fine, okay. And just visit. That's a big Denniston. This is the simulation in moment. I have nothing but just plain microcontroller here. Every Giusti clock frequency and I will choose the particular X files here. Now the data is went to come out off the insulin and will be going in through this arrested . It brought us what we have in virtually instruments. It's something called us for Children with virtual terminal in connect. The aren't stepping to kids, your virtual terminal and the extra off controller to against your Children By double clicking it, I can set the boater to answer 00 which is my default present, and then simply turn on. The simulation is a good see hello serial port sprint. Now if I pass a from here after the second, I would be bus capital. Similarly, for fun, I'll get to if I pass for get fight. That simple is that, isn't it? No. If I have an ability connected toe some enough microcontroller any five inch to control that using the serial porch, then the problem is that simplest this again. Remember, I'm not correcting resisted in syriza totality because it is assimilation in hardware. You have to connect it. Let's declare it. It's which led is going to be too Cap Tzeitel, then by default when the program starts, turn off the led and here after receiving it before sending it to PC, you can check it. So what I do is check if a is equal to equal to capital, then what we need to do here. It's turn on the Illini, so led equal one. And if a is equal to equal toe, keep it in be Then I need to turn off the reality exit. So do it and then with the dealer send back exactly what century are just fearful that down you understood I didn't keeper designates just saying Whatever it was it a cinch. Let's build it, Alexa, Run the simulation Every day it's gonna get to be 2.0. So my DeForge, it should be Siegel. They really should be off target is not created The laser missing Stilian spokenness Another doctor. Now let's see the output here. So hello, serial port. If I give a small a Smalley's received small be small bees received nothing is happening here. You can also do equal type character So it will also seal whenever I type something so small I get anyplace Molly small b I get a replay Small No, If I give capital daily, return on almost immediately and I returned with capitally. If I give capital B, the lady turned off immediately and we again got a response off capital. That's how you can save the serially received characters on. You can perform device control based upon it. You can perform the West control on it. You can change the directions off separate motor. You can change the spirit of DC Motor or change the direction of the Simone by connecting simple blue. The device. You can also use the DC Motor interface device and this kind of cereal programming to create us Bluetooth controlled rowboat. There you will receive a character from bloated and accordingly, you will try to change the spirit off motors. So keep experimenting like this. By the end of the course, I will give you some somebody exercises to be done with all off the tasks that we're going to discuss so that that will sharpen your knowledge. Furthermore, thank you for watching this video. 23. Timer_1: indecision will study about the timers presenting. There's little favor. The timer model presenting a jar of heaven can also be used. That's counter on in this lecturer in decision. We're going to see how to use it as timer and how these deaths counter what time or does and what kind of contra Dirt's and let's try to write down a program for each. So let's begin exert by. One has two timers, which are also his discounters. These they're called as or their names are time or zero and Time Mervan. They can be used as a timer. Then the timing is done on the internal crystal frequency of dead 051 and they're called That's counter when they count external input from Given hardware pin. So the concept of timer is nothing, but it counts time that suit. But since the microcontroller doesn't have any clock from which to see the time, what it does is it basically counts. The process given to the timer model and the more off timer adds timer or counter is defined based on from her takes expenses if it is taking the pulses from it. American style oscillator, their school is a time of if it takes the pulse is to be countered from external input. Then it is called us Counter. This lock pulses represent the in case of counter this clock. Pulses can represent a signal coming from a sensor connected in front of a mall or in an industry of her dog just starving, passing by So the same morning can use this time, whereas less counter timer is usually used for the legend ation precise religion nation. So let's see the timing off, the extra five in or the timer off. 051 works in this way it passes. The clock's coming from internal oscillator. What we have to do is we have to sit the register, values off timers and then it counts as register Silas from zero to up the begin of it. The timer frequency or the timer clock is a facilitator divided by 12. So the timer frequency is nothing but oscillator frequency divided by 12. For example, frf oscillator strong megahertz. The timer contact frequency would be one megahertz. It simply means that then counting from 0 to 1, it will take one microsecond for the timer to count up on the walking is very simple. As you can see, these are the registers used for timers and counters in case off time or zero. We have PhD dont l zero register and in case off number one, we have th men and the elephant registers there. The counting is actually done. Seymour is used for more selection off time or zero and take corners. Use for more selection or controlling off timer. Both time. Bergeron Timerman more can be selected by team are and their on off or controlling or order flow can be checked in. This is the team are register, which is divided into two nipples, 14 time or zero and another one for timer. One. It consists off a bit since slash B but which is used to define whether it is to be used as timer are countered. If it is to be used as counter, it needs to be made one if it is to be used. That's timer this betterment zero get we don't use right now because get is used to control the timer from hardware signal M one and M zero. These two birds define the moored off timer and That's why we have stopped discussion. Or we have better for discussing how the timing increases, because there depends upon the more, Let's say, the two most important wars when m. One and zero r 01 it is a 16 with time or more. What happens in this extremely time or AIDS? Let's see. Here, as we discussed, we have two registers pl and the H in 16 mint more or in more one off timer. What happens is the edge and feel Both the register combined acts as one big 16 bit register, so a 16 bit register, then used can do the counting from 0000 etch to F f f f Etch Foreign decimal. It is 0 to 65535 where it completes his counting after 6535 on the next count or on the next, pulse it or lose, and that's another door flows. It generates an overflow bit b f zero r p f. One depending upon the time when we are using this, but it's set to what I said to one so the user program can continuously read his bit and check if the timer has overflown or not in 10 or more to this is an eight bit auto reload timer. So this is walking in this way what we do in a bit more dates. We put the initial Contin pH or high register. The timer counts steel whenever the time, but it started the higher count. It's copied into the lower register. This low register starts counting from that number up to 2 55 ff after FF genders are overflow flag but medically reloads itself the general time deal. It's usually make yourself 16 bit timer more and not a bit or total or more. So let's see how the time it is controlled the martins just to set the more off timer to control the timer. Viewed. Speak on register. So this is to conduct stuff out of this, the last for which start not used for timer. We use this upper for bits. PR zero is a run control, but for time or zero, if you want to run the timer zero we make this bit one. If you don't want to run the timer zero we make this bit zero. Similarly, the airline is for Timerman. Be of zeros, timers, your flu flag and the F when it's time urban overflow flag. So whenever in whatever more you are, if the time where is overflowing or if it has done the counting completely, then the overflow bit becomes one. By checking the overflow bit, we can write down our program accordingly or by checking the TF bit. We get to know what has exactly happened. Is the timer overflown? Or it doesn't so that is the purpose off Overflow flag pl zero for time, but ground zero TF. One for time. Our country one. It is like a car originally zero So very DF bill roll over from 00002 ff ff itch. This is in case of success timer the Kiev what it said to one. So let's try to create a program there. We generate time Dele using timer zero all time of one because whatever we want remember, the Christian frequency is divided by 12 in case off timer. Whatever is the result in frequency is given for time to run. It runs on that frequency and increments. The count's based on each global. So after getting one club pulls dirty Ellis Incremental by one after getting another club post that Yale is incriminated by a given board, so excited decor for the resolution is in time. 24. Timer_2: Hello, everyone. So let's try to create a program which generates one second delay using timer. Now, this is our previous discussions daily routine. I have a project open here, which is in a lady linking project. But instead of creating dealer using our conventional function, what we will do is we will create a deal using time of Let's call it Voight time or ability . Now let's see how to do the calculations required. For now, let's assume that the F oscillator it's 12 megahertz, so the timer frequency or timer clock next college becomes 12 megahertz, divided by trail, which is a quality one megahertz. It simply means that the timer big duration is one. Beware did it by one megahertz, which is nothing but one microsecond. So if we start time or zero in success, image more and if we start from zero and overflow at 65535 then are dealing off total 65535 plus one required for or flu Gordo's of slow fight risks. Microseconds will be generate that will prove out to be a square off some frequency that on time it's 6536 micro or 65.5 miles microsecond, which is also equal to 65 0.5 milliseconds I'm off time is it will go 65.5. Minister. So it did me 65 0.5 plus 65.5 total 1 31 My milliseconds were formally vision later. If we do one divided about 131 between with Somewhere around so important. Six. Hertz Lexi. So let's try to create a program first in the Diamond Dealer. Let's write down team or is equal to We want to build stammer zero in a bit more. So let's see. The deMars function we will use will keep since last. Rebar at zero on M one m zero will make them 01 So that's the steam with timer mode selector. So the team are becomes zero x 01 extents 40000 upper forbids for timer. One don't want to use it at all. And then 0001 The last bit being one makes the timer workings of same with time or more. Then we'll start with pH. Zero is equal to zero pl zero is equal to zero and then what we do, it's they are. Zero is equal to one. It will started the time of zero and we'll wait here. Variety of zero. It's equal to equal to zero. We will wait here so the program breaks here. Still, the F zero bit becomes one. It comes down when he of the zero but becomes one admits time. It has water floor. So at that point will stop the timer. And we also clear the bitch. Let's see what happens. Timers underscore dealing timer Underscore be on the l A dates B took up zero. In this case, let's build it. And Lexie, the simulation output off the scene onto protests in this simulation output says the led is drinking at a very high spirit or with a very low delay, we won't see the already being turned on and off, but instead we can definitely see it on a oscilloscope. It will show us a square well with equal duty cycle. Well, that's not a simulation model. And there's ability. But along with ality or will remove the led and instead go to virtual instruments Here you can connect an oscilloscope today for the sake of this project, we have considered the Concil frequency Toby 12. So let's keep it 12 megahertz only. And let's start this evolution. As you can see, the reality is linking at a very higher lit. We're getting a square with onto the oscilloscope from the virtual instruments. You can also use the frequency counter entertainment. Give the club pulse to it. Double click that counter temer and changed. Operating more toe the Quincy. Let's start that right now. It's not showing anything because the signal is given toe Acela school as well as a lady. Let's them word from here. It's tomorrow from here only. Give it to the count person generator. So our calculation want seven hurts. It is generating approximately 7 to 8 hertz off signal. So that's it for the timer. Indexation will see how to convert the same program for generating over required amount of time. Really, it's regenerating this random, small deal. It's 25. Timer_3: In our last session, we have seen how degenerate a simple dilation daily routine, using time or zero where we started. Zero location. We've ended a water flow so that we generate a delay of 65 point find milliseconds. Rivlin. Can I live with it? But this kind of daily routine is not off much significant. Stewart's We weren't something recites something that can be used for some application. So the simplest option EADS. We started at 00 or we started at zero, and we waited or be finished at 6535 A generator that's 65.5 millisecond off dealing. But what if instead of starting at zero, if we start at 64535 and we were kept 65535 It will generate Tolson microseconds off dealing odd one millisecond soft. And then we can repeat that take a required delivered in out of time. So what we have to do is we have no nor the time of registers with this value 64535 You simply can't. Right down here the H is equal to six for 535 40 elliptical to six for 535 because this have to be a split into 28 bits and then put into the register. So use the programmer more in your calculator. Let's, let's say 64 500 35. The hex. Off this, it's FC 17 so the register will get FC on. The D L Register will get 17 Let's zero X f c is. He looks 17 Now it is going to generate a presents really off one millisecond. Whenever the function is called, it will generate a really often milliseconds. Let's see the frequency generator then now should be on one millisecond off fun milliseconds. A total off to milliseconds signal will be generated, which is nothing but 500 hopes. Let's let's keep everything incidents. It's for 91 or 92. Something close to 100 more besides, can be done in sort off FC 17 if I keep it up, Stephen each because workflow doesn't happen at 6535 it happens. One clock pulse more than 6535 So it happens at 6.536 Let's see, but give us a little more precise aids close to the family. It hurts. So signal. Now we can convert the same programme presented or delay off desired duration. Really simple. Let's stick a bad I'm winter here. The nets stick of variable, and what we'll do is we'll rip it this routine for that many number of times for which militar dealing so fine. 800 milliseconds of delay. What I'll do is I'll pies 100 toe dysfunction. So the bill, a routine for generating one millisecond precisely, will be repeated. Our time times I train is, I think, what the value that we passed to this function. Let's see timer underscore deal in here. Let's make it our 10 milliseconds. Let's make it. And Melissa So 10 millisecond on 10 minutes ago off. It gives us 20 milliseconds reform, which is nothing but 50 Hertz ghost wit. If we don't want this indirect or if you want to generate the reform off the same frequency but off a different duty cycle, let's make it 10 and let's make it. Let's keep it five and let's skip it. 15 Building against it. Output years. No one period being 15 minutes seconds and on period. Been small Furthermore, increase the relays and the same routine can be used for our normal A lady Blinking are any kind of operations that we want to look 500 millisecond on 500 millisecond off on 1500 milliseconds on just as a normal time delivered him. So next it followed. I'm already little in generation. It is a little bit tricky to understand once, but in that case, just look at this notes that we have return and repeat this video to three times. If you still find some questions, you can always contact me about it that's watching this video. 26. Timer as Counter: Hello, everyone. In this video we will see how to perform the program for time. But that's counter. So first of all, I have this incident or C file there. There are L City Declaration on then all the incident related functions which we're going to need. We are using it as a separate library. Elsa did not see and the same is also included in the main course. So this is a city command functional survey data function. All of this functions are return in a four bit more so that you need only four bits or four l City lines to communicate with 05 The schematic and the court will be provided with this particular session itself. So let's begin. So I'll start with the default court off the little tin. And then I have also added the L City into this incident library into this program. Now into the void meant what? I have to do it. I have to use the timer. That's counter. And therefore I need account variable, which I'm using here. Let's initialize it with zero. Then we'll have to initialize the LCD routine by typing L City and the score. I n i t. This will, This will initial is L City and clear the display for the initial use or for the first tools. And then what we have to do is we have to print a summer text onto the L City like what we're going to use the l City for and how it will be utilized. So l city underscore out one Come oven. Will French text on first row and first column? What were pending here is timer. EDS Counter So their sister text, which needs to be printed habit. Really Next. What we have to do is we have to configure the timer and to configure the timer. We use the register called its team, or I know what I'll do here. It's I will use the teamers timer, zeroed, insist timer zero counter and I will configure it. That's counter instead, off timer. So 0000000 So 0101 months time, it will be used as counter and 01 last minutes. It will be used in and 16 bit more. So in 16 bit more, both th NTL will count the values and that's why we have to initialize the higher diamond register that is th zero with zero and the Lord I'm a register that it's still 00 So when both of them are zero, the count will start from zero, and it will be counting upwards. Once you do that, let's run the timer by putting one into the PR zero bit, which will start the timer itself. And then we'll start with the 500 I mistakenly merit in cats. It should be small caps only. So in violent retain what will be there. We'll have to simply wait for sometime. It were the counts and then displayed onto the L City, so let's see how we can do it now. The count recites in two registers pH and deal. Either you can use only pl count and directly printed. Or you can combine that PLN th two for most extreme with number, and then you can print it. So let's see count physical toe. Pl zero will really the counter gist account from the lower register that it's still register, and then we'll simply try toe print it onto the l silly using the LCD underscore print function. El Sirri undergoes underscore print function that we're using here will do the conversion off, converting the decimal number into a suspect to ask a crude challenge. All we have to pass it is the Row column, the variable that discount and then how many places to print? So we wanted to be printed in three places. So even if the count is one, it will have Internet 001 But if the count it's, too, it will be for Internet 002 and then we'll wait for two seconds started. 2,000,200 milliseconds. Build it, and now let's build a simulation model for it. Here we will build the simulation model just like before, but all we have to do is connect Dale City, and then we'll connect us. Switch to the timers input pin that it's T zero pin if it is visible to you properly. This is the teas. European Off Timer portray 00.0 so the sexual be connected against ground. One point of the sexual goto. The zero pin and other point will go to the ground. So that's the switch connection. Now, in sort of this, which it can be anything it should go to t zero pin. As I said, instead of search, it can be a sensor. It can be a signal coming from any external area. Now let's see the collections virile city it's connected. Make the connections accordingly. So only at its inability. 40 for the 67 are used from the 2.62 point seven and up to two point toe country two point for up to 2.7 in the simulation. I'm not needed to give the power connections, but as we have discussed with Hell City while doing any kind of experiment here, you have to make the power connections for sure. So just make all the connections as shown in the court and then and put The X Files. And then you can run this program, - said the options creating Style Chick Month that you create the style. Now what that X file to the microcontroller in program file and no, start the simulation. So if you see if that's which is not pressed it zero. As I pressed the switch, the county's incriminating 12345 like that. If this which is kept pressed for some time, the council income. It would live ins because the timer will only count the pulses coming from external source . It will not come to anything else. So there's the program for using the timer, ATS countered. In sort of that search, you can put any other media and tried on. 27. Analog to Digital Converter with 8051 - Part 1: Let's start studying about the an electorate stricken murder or NBC with a survivor in this video. In this video, what River General is they want to study and understand what exactly eats on an a la pretty stupid and virtual and how we can interface it with its 05 which receiving yards, how to interface it and how trade up program storage along with Definite. Also here, all the concepts which are centered around it really converter. So next week No, you can never up. Drum and love input comes into your mind. The very first thing we see, it's a sign signal like this, which is by far actual and analog signal. So a differentiation, a basic difference situation between and analog signal and original signal as we know about it. It's digital signal hats, either ah, high value or loving pigments at digital signal. It's confined between two voltage levels. Only Gerets analog signal is a country asleep. I'm headed signal, which can have a number of different values all along the way. But that's not doing anything. Whenever I see, if you have used get dizzy, it doesn't need that input should be only in a look. So whenever you want to know T for edge off any unknown signal, you have to use it really good. It is. It doesn't mean that discipline should be on the analog. It can be a purely seasonal also, or it can be a square rebels. Whenever remember, never pull it off and a non signal is to be known. Then the Utes Adri converge. That's why although the name is an electoral district and murder, the input necessarily does not need to be an allowable if some metaphorical name even do it , which creates a Lord of confusion among every engineer designer and have elaborate on. So let's see how we use this and five years, this reconvert, for example, it is understand that we want toe know we want to major the four days off a battery Now that gets about where they should be, something like sit three points of involved for a constant period of time, which is the basis signal. And that's why, in terms off accuracy, as I said, the analog signal could be any of the civil ditch pulls. It would not be only signed with it is his Pakistan can what mortgages? Up to five volts into the respective digital vomit. So anyone age or any signal from 0 to 5 foot can be converted into its digital events and the major voltage. Whenever we measure the voltage, it is written center as a binary world. Now an unlocked through digital means we will major voltage off another signal. But what will be producing our coverage? We were producing some digital open conditional or apartments, some kind off binary combination off zeros and once so microcontroller needs an analog traditional murder. Because many microcontrollers like 805 even don't have an on ship. It is if you go fear advancement rollers like peak or a via our best controller. Or rather, the cities in the are you know, microcontrollers already know bores. They do have an on Tripoli's, but is it a high windows in town? What it meant? C five wind isn't terminology pretty easy. And that's like we need on a local digital converter externally, to translate the analog signals into digital numbers so that microcontroller can read them . Now, having said the foundational pretty easy, actually what exactly needed See it does So it is e X and input like this. It also has an important orders reference or ditch reference for arrangements. The maximum voltage, the greasy. It's supposed to convert a traditional former so it makes a difference for additional example favors and then accept input signal. And then it splits that import signal in equal number off. Or put it, Sorkin H or hundreds. So how it spits that Howard does that It basically does that by completely splitting 0 to 50 to reference voltage level angel. Proof of this is number off equal levels. We have eight or put bits. That's why the minimum or put begin generated. 00000000 maximum when it's 1111 when which stands started. 56. So zero defy World is divided into proof of six equal levels and, depending upon their particular signal, EADS, it is given with the step number number off that particular step. Let's try to understand it in this implement. Consider, you don't have a zero to. Now, let's consider that we don't have an eight week GDC, but we just have a tree. But it isn't. It will make things to understand simpler. Attribute agency will have only three output books, so those three are put. Bits can only Jindrich an hour put from 000 upto one gunman. A total of eight outputs can be generated like this. Typically, an agency does what it converts the entire range from 0 to 5 old in tow. Eight equal number off steps. And so what happens is we get a particular concept or a particular term off Tennessee, which is called That's step sites. No accurately, Strip says, is according to the maximum voltage that we're converting here. Five World, which is also called, is that France Will Cage Divided by 2 56 What is true for physics because our agency is three betrayed to 56 number sorted, not throw for distance. But here in this case, it. So why eight? Because our releases three. But right. That's why we can generate a maximum off eight results, and that sort to fifties were divided by it will give us a step sets In this case, outstrip says, would be fired you edited by eight, which in done would turn out to be five demented about Abe's 6 25 levels looks like it down here. 6 25 million. Consider continuing with the presentation here. So if 6 25 million world is my step size, then any signal between 0 to 6 25 million, which will have a digital representation. Zero. Any signal between sister defy 12. 50 million volt will have a representation. One 12 52 Next voltage point. It will have a representation. 01001110010110 and one like that. So since 25 then 1 to 50 and so on. Those will be the different steps off jealousy. And whenever the signal is between any particular steps, sites are that particular voltage level. It will be assigned with the number off that particular step. That's so and a Tory converter or agency walks. So the first important concept is a resolution off agency. It basically means the number of output bits off idiocy and therefore how many results condition rated out off it. So generally, eight bit agency will have a resolution off to 56 10 but agency will have a resolution off 10 to 4. The reference is the maximum hole is that can be converted into a digital format, and most releases have a selectable feet. If we'll see that later, what is the use of selectable here? And thirdly, we get something called that strip sides, which is very F divided by resolution. So success for an eight bit heresy. It's something around 19.53 levels and steps sites for a bit heresy, which 2.56 fold. As a reference old age, we be exactly 10 levels because the voltage or the reference will selectable. You can change the whole dish level and thereby changing the reference voltage. You can reduce your step sets if needed. Apart from that, what is the digital output that comes such? It is analog in divided West, Epps says. But this is what something that an agency gives us usually, and what we need to find out is really to find out what was the applied on a lark. Input, voltage or borders. Doppler signal voltage so analog in physical toe, this digital out, multiplied by step says So I repeat, this is not put his analog independent best of size and analog in if needs to be computer. It is equal to digital output multiplied back step sides with a deserve island. We usually interferes with it, but any since, like a recent 004 as well as a This is in the word zero. Which on the boat will follow the same Formula five divided by 2 56 19.53 million? Would we be ever step size in darkness? So what we do we are going to use is a decent 0804 Let's say a word. 00 for in detail. Another next session. Thank you. 28. Analog to Digital Converter with 8051 - Part 2: hello everyone Nexus since about the eighties, since he read zero for and How We Can Interface It with itself. 004 It's a very simple single. Channel eight. Which eight? Regan Murder It has a selective, indefensible dish. Been from what I've been on, we have to give you the right to as a reference. I'll tell you about a 20 year dismissing about your neck. That's direct. Zero for ABC gets Panel eight. Which meat output? It is very easy to profess that came it microcontroller, and it can convert any signal between 0 to 5 volts into respective digital. For Midge, this is the keynote off. It is easy read settle for we're interfacing the controller. You need to make sure you have to probably understand has been ouch. And then you can make the decision off. Interfacing it. It requested external block signal, which is corrected between number four on ground as required with its name Later. Then it has got three control signal chip Select read about like, but that it has got implicitly in minus, which is our analog input world age spins Then this is agent represent a LeBron B C and D that is around. And then maybe zero db 78 which are put digital artwork clock are blocked in. There needs to be a blocks up in between them and number doing evil school. This is which is our reference will while interfacing the socket sound off something like this. Number 20 was so five words and there is a capacitor and resistor between clock are and clock ins are Serbian clock are to drop in and register and from clock into ground there next available 50 people better capacity. There's a love circuit, for it is yes, because we always want to keep up in select little chip selector We can work off reconnected skin to ground It is a no depending upon the situation we can't control then this is I think this is though digital So an indifference in Bagram with each survivor will look like this he s kind of brown are in there is a lot circuit between them and just for the sake off simple extra image connect apart between Mississippi ground and gave its variable whole dystopian been you controller work it professes or four pools is all the control signals and idea along with all the violence. So at least whenever you're intra placing 80 004 with its refinement, you're going to new 11 points each for the talents. 9 10 11 these three lights for giving the controls and then you're supposed to give a friend's old age on Do this pain relief be very bad. For example, if I have to keep a defense official five footage, then I can allocate connect if I worked here. But usually there's been expects half off the desired reference shortage. What I meant to say by this is, if I have to do five gold as a reference old age, then I should be 215 words. So 2.5 volts Reference Village. If 15 is given to the reference, all the spill it miss were given. Expect out of here if I do know the reference, it miss out of it if it's Pfeiffer's. Similarly, when you have to give 2.56 World as reprehensible, which then the Knicks won points to eight words v a tive by Okay, we'll see the kiss study as required. First of all, let his experiment by connecting a simple ABC possible porch to the resale put on. Then we'll try to print the portage. That was sense from this floor, when every move depart from ground towards this is your five old off herring voltage between 0 to 5 world will be given to the ABC input. And so we will try toe really those values in digital format by giving control signals on printing it onto the algorithm for according is very simple, but we have to do first is we have to make the right wing go low and then make it high basic elements. First of all, what you do it. You will give a pulse to the right signals that will indicate that the agency should start converting devalue its original form it as soon as you give a lexical toe heresy by giving a low to high poles to right Bob signal. You will monitor the endear signal because now, when you have given the right signal, the agency had started converting the rotation. Traditionally, homage and then you go on monitor in the eye and ear signal continuously. If the eye into your signal becomes slow by default to be higher But if it becomes true, it means that the agency has finished the conversion off the analog input signal and the result is really in the internal registers off this ice. The data is not yet present onto the big balance. This reasons onto the Internet registers off the Now, if you want to hear the data through these lines, what you need to do is you need to bake. Are you need to give a pulse onto the really signal or real personal? What kind of us again make red low. Then from there we support and again make a really personal as soon as a giver look. Heiple, Zara nobles basically onto the real signal that data from Internal Buffers country extend lines, that is result would be seven lines so that the controller can read them and do the process as required. I hope it is clearly understandable if you don't understand it. Just look at this algorithm once more and listen to this video one more time. What next for you? We will create a simulation model on the program to do exactly the same thing to really accuracy and rent. Toronto. The Elsie Thank you for watching this video 29. Analog to Digital Converter with 8051 - Part 3: in this video, let's see how we can actually interface and a recent 00 for I see with any surviving microcontroller and see for the antelope traditionally conversion output and print the results on to the city. In this video, we're going to see how we can connect approach as analog input Potential meter, which can give a whole, gets from 0 to 5 foot to the 80 seats in putting and were converted in traditional format. We'll see the digital or pork as the less well. Also see there are put in real evils. So let's begin. As you can see here, this is the innocents irritable Frese that we have used on interface with Controller. The eight Ellen Street is a totally be seven ghost when in airport off microcontroller make sure that the miserable and should go to the sea not been off any controller that you're any controller pin or any port in there you're using. That would be one thing should go to the first win they would do with the 2nd 1 and so on, up to maybe seven going to the seventh clean off any port Number 20 was too busy in CS goes to ground as you can see DJ Entity, Disney Ground and LeBron also goes through the same thing. Then we have terminals connected to rebar right bar in the RBA. Then verify to and input signal. We'll talk about this in the short. You can see there is a distant off and go home from block our clock in pin and the capacity from clock in Ben to ground off 1 50 Pick off. There's a block circuit require or the work being minus was to ground and be in place was to in Germany as we can see the read, it's gonna get to be 3.5 40.5, right connected to portray 0.6 and India are connected. Report 3.7. We have a point here, which can act as reference voltage current. You have 62 middle points, thereby it will give us five words between one favors. So 2.5 world when given reference, old age will double it internally and grid reference or digits. Five. Village. And as you can see, we have an input porch over here, which can be more from grounds to five lunch, and this is given to the in what the simple off it is here we have three connections. In this case. We're only using the for which interfacing awful Siri. So we need only four lens awful city on, but they're buried. Uses the microcontroller up in usage. You can see for the simulation purpose. I have not given me sissy ground and contrast control pills. But when you're doing it on hardware, you have to give the uses to ground really to five World and the ego under central pin art of loose. Since we're on the right onto the L City, it's longer artists. It's connected to a porch one to enable 2.3 before five p 67 connected to 2.4567 The corrections are not that difficult access typically indeed to see. But don't get afraid by just looking at it. These are very simple connections. If you don't read portals, yes, the program set off this This is the core that we're using here. We are using a completely different file to store all El Sirri later files. We have discussed all the city related functions before also, so we'll not discuss it again. Here we have included the LCT nor see financially program. And we copy the El CID in your see file in Judah Project folder. So this is the project folder. It is the end. Watch an incident or see violence here on in program is just so correct. Hashing urine. Then I think you're not As you 500 outage. We don't need this line. Then we declare the pins connected to read, write, and I am here, Over here. Then we have taken two variables. One to really do this value. And eight which variable and same car value ABC underscore fell. Second variable is M V, which is your stroke store. The computer Medieval Sally. We have created two functions here, and these are the decorations off those two functions. The two functions are convert and reach. And what function? Well given rifles red zero night one so that the conversion begins. And then, while I am here, is equal to equal Well, semicolon, it basically means that will give Rex signal over here. And then we will be rich here. The semicolon means nothing. Got hoping, inclusion off a package. It simply means that the preventable feature as long as I NPR signal, it's high. I am here becomes low or zero when the conversion has finished, so the program will strain the convert function or conceal and the function as long as the emergencies in Providence. Then we have a really function Britain, which is nothing but giving signals. Storyline. So we made real one, and then we were too late. Zero, then very receive help from even. It could be let off some time and again make using little high. So that will give a view, nipples and really values from the prince off Guaracy into the microcontroller through the port one. So the 80 centers for Palace Variable, which raises the AARP even so that we can process it. Look at the court and you'll find it very easy now. The first line is really underscore Emma's. We usually use it for simulations on hardware Hitman orbit at necessary. Then we make our entire people because I am Here is the only pin, which is an input here from ABC to controller, so making it one will make it work as an input pin, the manager less density, and then we print on first row. First column. Idiocy underscore fell on second row. First column. The French voltage Because on the first row we're going to print the royal. It's your porch onto the second round. We're going to create value in voltage. This whole place is nothing but in medieval. It's not involved, but it will be levels and, well, even look or in the in finite. Look what we do. It's converge, Really. Basically, convert will give a right puts on weight conversion finishes. Ready function will really the value from the port into the variable called it is simple school. Then, using Alstory, underscore, pinch the bridge onto the first room 30 and column ABC underscore hell. That means the raw value range from agency, which should be between 0 to 2 55 because it's anybody's. Then we multiplied by 19.5 p. Why? Because we buried by 19.53 because my whole is not defensible. Ridge and my resolution is to 56 so that it's 0.1953 boards on 90 point triple evils, according to the discussion we had before by multiplying it with 19.53 what we get. Its vigour exact a player look in in a variable. Then you bring the envy on PPL City onto the second Rentokil column and different four digit suffrage. And then I really often that milliseconds 100 millisecond. It's really pretty. Let's look at the simulation off this. Just focus on this idea and we look at this now. Eight. Easy at the parties that I just value headed. That's just lovely, Sissy. You can see the whole vigils for 499 words they receive Hello. Port is the maximum it would help put. That is 2 55 and the convertible usually waits for 980 millimeters precisely. Either. Ginger, it's You can see the value changing over here as you change it further down. If I take it people part in the middle level, it gives 2.5 village they received Hell output is 1 27 off 2.2 55 and then the voltages Forex. Just change it anywhere, and you can see and observe the June. According remember, whenever you're using unity, let there be any kind of sensor you're using the very flushed thing to do. It's convert digitally really signal or cover traditional rate value into its respective on a lot input value in village halls so that you can process it that further operations. Whatever the next video, we'll see about how we can use a sensor with 11 35 and see the output of the city. So experiment vintage, either, in this simulation, off on the hardware itself, if you have one and see the opera for years, the chorus provided under the core and read it once again use into this video 17 or probably all the producers really gratuities because ABC it's very important concept on I wish you should understand it everywhere. Thank you for watching this video. 30. Analog to Digital Converter with 8051 use LM35 Temperature Sensor: Hello, everyone. Now that we have seen how we can profess the ABC with itself, Ivan microcontroller on here also see how we can interface apart and perform a world region with microcontroller. Now let's see how we can actually interface off physical temperature sensor to the agency on how you can really special had. So let's begin. No, si, this is 11. 35. You'll find this sensor which is a very popular beverages sensor on its off practicality. Greater precision Centerbridge abridges answer. It basically means that the sensor can criticize you detect changes in individual happening in one degree Celsius and almost so the chimp temperature rises. I wonder yourselves. Yes. The output off this sensor that is according the simplicity off Ellen Fortified lies in the fact that it is only a single three print Joyce the first been then you look at the link is something I will ditch the last millions ground all the dimensional sleep on the 3 to 5.5 were actually operating mortgages. Streeto 15 1 So you can give me any will definitely hold on supplies and go. And the middle bill is an alarm off the islands are different individual sensor can sense temperatures from zero peuple filigree sensitive on the output is very simple. Basically, the portable in 35 is not makes it really easy to use with any kind off Ennis's. So let's see what is the output of it. As the leadership says, if you look into the reduction of yours or even here the upward of an M 35 it's 10 million volt for big licenses. What it means is that if my room temperature is one degree Celsius, the output of Ellen third. If I would be really in the room temperature, it's Lexus offending. This is yes, the output off 11 35 would be then once a thief. If the right now, if my don't temperature it's 29 million or reduces years, then I'll put is 90 really work? And so on? A group 1 50 indignant says Yes, the output will be 1500 1,000,000 which is also 1.5 Would generalised making the teachers don't want Gregory sense? Yes, on back inside, Ln 35 is suitable to be used in a wide variety of applications, including household application as the lesson principal birth complications. Now let's see how we can use the calendar. Different with it is and how could I don't know program for its. So let's see No to write down a program for 7 35 for Let's see what we have to consider possible. In our last instances, we have seen that by connecting Bible reference old age where this is red syrup, which is an Edward, really see, we get a step size, which is close to 20 million. It's 19.8. It's something. Let's say it's well spent. It's 20 million words. Step size even not be able to use the 11 30 because the Ellen part if I will give us changes in multiples off level. So you're idiocies. Step sides must be at least 10 million volts. All listen And therefore, if I have a 20 million volts its size, then all that will happen leads I will get a temperature. Sensors really only appear to bigness is minced. If Rachel changes from 0 to 1 the or put off l m 35 output will be changing by tell minimal , but they will put off her. This is not change because it can only be take the changes then the import has risen by 20 levels. That's the island. Certifies output will rise by 10. We weren't with each degree Celsius race or fall in the average. No to a business problem. What we need to do, or what we can do is begin second step sides off. 10 valuables are. We can do arrangement so that we can get a strip stays up. And if you get 10 will over step size, then the output off really see will be directly in proportion with the temperature. Back is incensed. We'll see that good, so don't do it. What many to do is said that if France were dish took upon advice, it's work. Forget the temporary worship says how? Because you know that the step size is nothing but the friends. Old age ready by resolution. Resolution is stuff of physics. If I said 2.56 that's straight, says the baggage and medieval has less expense. So do said these references additional 45 cents for what you need to do is in interview 1.2 it words. Witnesses, external. The friends will get a woman. Now let's see how all of this decision based on worker George program sort of fluids. I will just have this program that I created for a reason and what, and I'll simply copy the same thing for a limp because there is not what changing bridge a local, the simulation warden as a Let's look on the program. Now let's look at it how to do it. So what we have done here is instead of connecting the porch, where I've done here is I have collected 11 35 a little sensor. Now, in this simulation, we have a plus minus at all, which can increase or decrease the temperature of sensor because living in a cave watch. We also have many world leaders Mitch and displayed it, and Richard Childress Beautiful vigil for operational sensor here. And this is the football really is. Then, for the reference voltage, what we have done AIDS. Instead of panicking this part, we have Medicaid, a small battery, and so this battery, what we do it's gives the one point word heart off to the difference wordage. So let's see how things go on now. For now, what I'll do is I'll just with the collection of battery, and I will give this to input. So this was you. 2.56 words as they approach to reference mill so that the steps says it's it 20 million and let's see how it works. I will not do any changes into this program. So let's see, I would. This is my program. I will just multiply it by 19.53 so that I'll get the on a lovable ditch. And then I'm displayed. So this bill, this program and let's video no si Do we get the current output here? Yes or force close, which But when I change the world, this one, they're different. The target. Six. The sense voltage is completely different. So it became 3 70 even even for 36 degrees Celsius. Correct? A seven day This is It is not so given for us. Why it is happening Because right now the success it said Toby, 19 points three miracles. Now Jesus sits sales and sort of connecting it directly to one point. So by collecting the reference mint one point Woodward, they said, their offense whole dish to develop fish that is supported by six, which in turn will give us the steps Azov and Millet balls. Now listen to it. But here I have to make a change. Now so many once is nothing much a decent living to step says which is no use it when using and them 30 and that I know they're surrendered. Bridge, stop this demolition and started it American See, the it is a value is 37 the world registries own people buffers critics. Besides, now the fun part is you actually don't need to do the conversion so you can do it. You can have an unsigned inch temp here and you can do the conversion. So convert building conversion. What is the conversion formula? Since we will be right back then because they put distended evil Partick. This is so you just divide your universe. My 10 and you will get up in Britain. But it is under the same thing that we're printing already here because other Reference World page it said toe 2.56 folds. What is happening is the open is directly proportional to the temperature since pen or the temperature because the temperature is for video, is out shortly before 20. Available. The difference. Wordage of the sepsis. 10 Valuable. So 4 20 million. 40 feet Sense That's for people on their This evaluates nothing. But so what you gonna go is do not print this night value and you can simply branch barrick you that they receive, which is nothing but the temperature off. So there's this change it and sort of a decent hell. We can simply call it s them And this parentage So, Kevin location or close which and that's it this village and relics That's everything remains the same can work here. So the stride decreasing or increasing the temperature You can see the angel was puma levels as well else. Exactly. Live is being sensible with you. I'll be about the cherry as well as the program behind 11. 34. It's crazy if you do not understand business into deputy of one more on even if you don't understand it, then it should really about 31. Concepts around Stepper Motor: 11 indecision we'll see about how to interface are stepper motor of it a little bit. Several. Morgan is one off. The important aspect in every micro country will study as well as it is being might be used in a lot of industries because it gives us up. Recites control over the angular rotation. Unlike the C motor, safe from what can be controlled on how much angles attend, it can be origin be rotated. So let's begin. Basically stable water is sick and off brush less motor, in which there are primarily four points. Marriage like this. The magnetism off those four coils is varied in such a way out of the sequence off. Energizing those four coils is very in such a very that the shaft roof. It's either in club selection order and people oppressed direction. For example, if you see in this picture we have soon for 3214 points, the magnetism direction or the activation off those four coils, its glow quits and hence the motor shaft. It seemed to be routing profits. If we activate those four coils off stepper motor in a positive direction, then the border direction changes. Moreover, the sphere of the motor is also depending upon how fast with switch between this four coils , they're less have mixed, Thereby. This conception makes it very simple for us to interface a stepper motor a bit microcontroller, they're primarily on the primary. Futures off several mortar. It's the views of the sidestepping and control. There is a bible of simple model as the lesser uni pollution. In a moment of self promoter, there are just four coils in really polar stepper motor. There are oils as well. It's the common points where we want to give supply and therefore you nebulous a promoter are very easy to interface it. It's survival for that sick, any microcontroller. And this is our Gary Pallister promoter. Looks like there a common point. It's taken out from two coins, so quite even going to has one point common oil, three quite forehands. Another point common. My later visits people a simple, more tribute microcontroller. Both the common points should be made shorter, and they should be given to the respect to power supply. For example, if we have a separate motor working on five old, then we should give both this quarry points to five foot, and then this one points to work around. Driver circuit comes to the microcontroller. The most popular current Trevor circuit that we use is transistor, or you will in. We'll see that in some time. Now. If this is the coil points, if or if these are the coin points off general, you nipple separate motor, then this is the stepping more segments. Ah, full more sequence is nothing like exactly this, that we activity to oil sector time. So the separable devoted skin a proper direction, basically technically full. More switching or full more sequence means it allows the separate motor to rotate in one particular stepping angle as being prescribed onto this a promoter direction. For example, if a stepper motors leadership say's, it rotates the 1.5 degree in one sequence that I feel it giving this one segments off activation like making two coils on it, and the next recoils at them the next two calls at the time and the first and last night. Then, after this one sequence, the stepper motor will rotate by 7.5 cigarettes, whereas 1/2 more sequence. It's something which gives a slow sequence to the stepper motor. So if this one sequence rotor some water in 7.5 degrees, the half sequence will rotate it till half off 7.5 degrees or bag of incomplete eight steps . It will Britain one complete full step, so 7.5 degree rotation will be opened after all eight lands. But if you want half off the rotation, you can only get 0 to 3, thereby giving us a precise control over the separate motor tradition. So this is how it it's in full step more. What's happening? It's two coils are activated at your time, in half stepping. What what will happen is one coil will be Acto. Calls will be activated time and then only 1/4. That will give us a little bit cruise control over the stepper motor rotation. Usually they preferred to give up full more sequence like this. So let's see a program for the same as well as a deficit. We use a very popular icy called Yuelin to eggs. 03 Are you Ellen? 2003 to interface with stepper motor. This is basically a current driver whose inputs are given to the microcontroller and to the outputs off which we should connect. The separate or turquoise so they're professing, is very simple. We need to make both the common pins off separate motor tied to the supply whole dish, along with the number nine awf UL In 2003 the number 16 15 goes toe to quite points the number four bill and the number 13 goes toe to another three points. The working off the sea villainize is very simple. Then the number one goes logic I lord connector ramping number 16 will turn on in this case , the coil connected open number 16 will be activated then been number one becomes higher when member to become side the coil until number 15 gets activated. When the number three is higher, oil on number 14 gets activated on the number four is high the oil until number 13 gets activity. Based upon the full more sequence, we have active it two coils at a time. So this sequence becomes C 1100 becomes C so it should not be direct c zero. In fact, it should busy Lex zero. I see. Then zero. Bonnanzio becomes zero x 060011 becomes the Rev 031001 becomes zero x zero night So let's start professing in this way. Here we have the microcontroller on. We have Ah, you Ellen. 2003 Common pin off The Evelyn goes to the five world supply along with the common lands off stepper motors Like this, I'm one ping of the separate. More troubles to 16 2nd win goes to 15 3rd goes toe 14 and fourth Worst road The number talking For those who are not aware of protesters, you can just click on this big symbol in components more and they steep and give you two options and animated by pelo Simple motive are limited You people a separate. This is the one which we have used. This is the one which we have using The number one goes to people 10.0 The number two goes to 2.13 goes to 2.2 and forwards to 2.3. We can give the data port waits to this pins, as Velits invites are by giving a single bitch What the options are available to us. So let's lay down a program for it. This is a blank project with her. The Littleton. This is for men and haven as always, they have been doing so. Let's start giving Ah half more sequence storage in this way with some Delia. So PTO people does. The Brexit will see. Let's take a delay of 100 milliseconds. Let's increase it 300 then beat political 20 x 06 Really, I'll make it 500 so that we can properly understand the signals that come there, then be quizzical. 2003 Deal if I 100 and be traceable to see ref 09 again. DeLay Fan will build this project like we have been doing from our first experiment. DoubleClick. The microcontroller gin is the gotta sell frequency to 11.59 to just browse through the same hicks fight. Click on starch Begin C. The separates. Rotating. This is how the sequence are changing and the separatists or dating. Now, if I increase the dealing in between giving the different angles, then the spirit off rotation will definitely be latest. That's gone missing were gradually moving or were gradually making two coils high at a time , so the stepper motor is rotating in completely 60 degrees. But remember, this is just an animated stepper motor model in practice. What will happen is every stepper motor has some leadership on has a specific set off instructions in which it should be used. Let me show you, when a data sheet or a simple say promoter by giving just this four strips off by just giving this four kind off signals will not rotate in completely accidentally. Let's stick a data shit off. A stepper motor usually, say promoters have a specified angle. Our step angle. Most popular stepping angle. It's 7.5 degrees. So to rotate this stepper motor in a complete 3 60 direction, what we need to do is 3 60 divided but 7.5 40 it. So we need to give this sequence for eight times to rotate that motor in a complete trees extra degree. In simulation, we can see in a single iteration we're getting into the succeeding relocation, but with stepper motors, that's not the case. Every separate water has its own specified stepping angle, and then you give the full step more. The stepper model, rooted in the stepping angle or one stepping angle. So in that case, if you have to go 40 x a quinces than what they will do it simply repeat this entire thing for eight times using a photo. And if you want to change the direction of the separate motor, you simply change the sequence. So what I'll do is I'll copy this entirely and create a function for it ever. The blue Me dispensed to do it here and then white our TV now in our TV. All we're going to do is they're going toe reverses segments, so he becomes nine. This becomes three. This become six on district girls, see, and let's just rotate it and give us direction, bitch, Let that's very clear and then you come from. I can see the stepper motor is rotating in a positive direction. Whenever you buy any stepper motor, look out for its stepping angle. I don't have a separate maternity Fashion has off now, but look for the stepping angle. First, it will be shown like seven point for degree or 15 degree or somewhere also have a small separate off or sitting about four point indignance looking for the stepping angle first, and then accordingly. I don't your program. Remember the sequence given once will rotate the state park in one stepping angle, either forward or livers. And whenever you give the supply or whenever the new sequence in a positive direction, then the direction of the motor will change. You change the spirit of the water. Let's try reverse direction. Let's change the belittle 100 milliseconds and start off 1000 villages 1000 milliseconds distorting like this If I got a golf on, Thanks for getting with. I didn't Milliseconds studio, so it depends upon the speech. Are the really given in which window sequences I started investing? Same thing can be done for forwards and slow rivers. Let's make it after beauty are followed. Stop it on display. So that's it for the separable train confessing. I hope you'll enjoy doing decisions on if you do encounter some problems. Are any issues while doing your separable train traversing? Please off your question. Happy learning, Barbara 32. Program Downloading Using Nuvoton ICSP Programmer: there. So far, we have seen a lot off different microcontroller simulations. But we haven't yet seen the actual program downloading how it used to be done in the hardware and how you can use it. No, See, there are a lot of aspects to this particular point that there are a number of different microcontroller devices which can be used on but you can use for your experimentation. So there is a P 89 c 51 which is very popular, which is back mill now owned by microchip. There Now there is one for by next week, which is be it 95 already too on this particle of microcontroller be attend if I haven't already too is also supporting the on Chippo programmed already or in circuit program on the similar terms we use of one microcontroller from a company called Move on So no vote on the blue seven h easier off type two is the microcontroller that we use the wardens seven it is or if I do, is a complete 88 9 s file compatible microcontroller. But the beauty about this would on controller over here the beautiful than wardens controller are two things First X Prize. Despite look second, the hood on controller is also capable to perform or toe download the program through in circuit cereal. Now in circuit cereal programming meant sport. We do not need any kind of external programmer to download the flash File the hex file into this microcontroller. The futures are all the same. The 17 052 has, as you can see into the data shoot it has. It's the same for different microcontroller, just like its survival being an instruction said completely compatible. The lamest to 56 bites The flash is 16 k It gave Porky, depending upon which device you have, the point here is it supports. I speak function, which we can use to download the program onto the microphone. I'm going to demonstrate you the same thing right now. Over here. No, I have a microcontroller board over here. This is a very simple microcontroller board which has a new vote on. I see onto it. If you can see it's no vote on w seven. It easier if I to. This is a very simple board. I will also share you the design off this board, which contents power supply. Here onto this side there is a 705 voltage regulator which is a plus five alter regulator. You can take supply from nine volts 12 world. Through this Jack and this regulator will generate the Five World For you. This is the microcontroller I have connected on the pullup resistors to all four ports. Although not required on all four ports, we require it only on board zero and then on to this board we simply have these bark strips are connectors taken out for all four parks from port 0123 to all of them so that you can interface this whipped any external hardware? As you can see, the port zero numbers are labeled here 0.0 to 0.72 point 22.73 point 0 to 3.7 and 1.21 point seven like that. Moreover, for program downloading, we have this artist a true to section over here. So this is the next 23 twic on deserved for capacitors used. And this is the deepening connector which you can use to connect to PC and download the court Now I have no such board over here, which is connected to the computer using the serial port on the computer. The serial port will appear. Either that's calm, zero or come one. If you're using a laptop, then you need to use USB two other structure to convert in order to interface this kind of kit. So I have an led board over here, which is blinking something interface with Board zero. I'll now try to write Donor Program Forage, and we'll download it on today controller. So just let's look at the school that I'm talking about. Over here I have a lot of different core. So which are there in the experimentation that we haven't performing? Let's choose one off the court over here, so I just chose this project. I want a little. Blinken just led in triplets in programs, so they stoop. Any living thing program All led. That's the project file I have. So it has. Let's make it 40 Let's make it four. So let's make all of them on and off with the low two seconds, for example, over here. So I just do this and then I will build the target. If I go into this folder expels Creative if you're using a newer version off it, so let's close this project. Let's create a new project this time I'll do it on their stop so that you will get a clear idea about it. They have a new hold them very well located a new project, Then just save it Here. Choose the controller, Toby. Microchips. It's nine c 51 You'd be if 95 1 then take a new file is the core. Save it in, twitch at something Nazi. Then go to the dog adoptions, check the clock or put create X file at this file to source Group over here. So here in the object folder you will find. So my leading point, you just added this see file and then you can build it once a village and go to a dead stop in a little folder in objects that is this X. Now, to download this onto the controller, I will use the software I have chosen the I see here to be the new seven h l chose wciv interviews it off the blue 70 0 to be just like with selected close and reopen it. New vote on I'll speak. I see people. I asked me by comport here, wrenches comport on w seven. It is zero five. Don't be, then, Lord file there. I'll just lure the finally drama My led folder objects Next, and then I'll start the abduction button here. That's another started the objective. But in here, all I need to do is I need to be said microcontroller compress here today, said the controller. So I will click update chip here and then eventually conduct we sit with him, so just failed to do it in time book. The program has been uploaded, and if you can see the open no, the evidence will blink 40 we have used, and a delay of two seconds is there. So it's just build it once again and lives lower that file in the Gore Tex abduction. So let's see the awkward Now their leaders are on for two seconds, then off for two seconds on for two seconds off. For Corsicans like that, you can interface any Barre fell into your hardware. This is just one precision for what arm microcontroller. It requires this award on my SP. I secure utility on the downloading and everything becomes very simple. It itch so you can experiment with the microcontroller that you have and see for Delta. Thank you for watching this video. 33. Conclusion: Hi. This congratulations and operating this course, taking on blank walls and competing all the assignments included in itch by sitting in front of a computer because a lot of dedication and commitment you have exactly shown packed. So congratulations. I hope you're on this or all the concepts that we have covered into this course nicely. I'm completed all the exercises. Do not forget to donor the resources provided with discourse. Your maximum engine on. Thank you.