You are on page 1of 48

Microcontroller Based Bidirectional Routing System

Panchkula Engineering College

MOULI (BARWALA) HARYANA

Submitted To: Mrs. POOJA MITTAL H.O.D Training & placement Deptt.

Submitted By:DEEPAK KUMAR SINGH 6510102 (Branch ECE 4th + Sem)

Guided By:-

Department of Electronics & Communication Engineering

INDEX
1. 2. a. 3. 4. 6. 7. 8. 9. Company Profile Introduction to the Project Bidirectional Person Counter Circuit Diagram b. Microcontroller Pin Diagram Components List Comparison of Microprocessor & Microcontroller Embedded System Power Supply Embedded C Programming Program of the Project

Some of the points which we want to high light for your kind knowledge about our organization
Only one This is the fact that there is no Industry in the Northern India available offering skill learning real Projects for Electrical, ECE & Computer Science, Electronics and Instruments, Mechanical Engineering for Engineering Colleges and Polytechnics students related to their field except DEEKSHA ENGINEERING SERVICES PVT. LTD. Some of the facts It is the premier, reliable, genuine, truthful, sincere and leading organization, incorporating Industrial manufacturing twenty years old units. Their main resources are experienced and qualified Engineers, Technocrats, Professionals, Academicians, and Scientists apart from updated labs and workshops. Mission Vision and Objectives 1. To provide a platform for individuals, professionals, R&D Organizations, Engineering & Software companies and to utilize the Indian youth for their potential. 2. To provide educational, research and Practical skill training in this right direction and to capture opportunity for creating a talent pool of professionals from various fields who can contribute for the growth and prosperity of various disciplines. 3. To act as Resource Centre for retrieving and dissemination facility to the pass out engineers by having regular interaction with various Industries, Research institutes & Laboratories. 4. To act as Project Development Centre by providing / promoting development of various projects & Training Kits and its usage related to latest tools and technologies. 5. To offer constancy Services for Entrepreneurship & Self employment from concept to commissioning level including investment opportunities, project selection, project report preparation, Market surveys and setting-up entire project along with Technology Transfer as per requirements.

Software & Embedded Technology Development


Seeing the need of modern society and time DEEKSHA engineering has taken a major initiative to promote Software development to be used in various fields such as instrumentation, embedded technology, computer engineering and its usage in related to latest tools and technologies. In this direction it has setup a development center with latest tools and best manpower through in-house and by outsourcing the projects, so as to make substantial contribution to the world of Information and Software(s). Trouble Shooting & Fault Finding
DEEKSHA engineering have started various courses for the candidates who wants to go in the field of Research & development and maintenance with a view to provide trained and ready to work trained manpower to the Industries and Service-sector with a vision. Special lectures and work-shops are also arranged through experts in various fields.

Creativity, innovation and diversity of thought DEEKSHA engineering supports creativity and innovation. In an evolving industry with so many look-alikes, we have managed to set ourselves apart through creativity, innovation and diversity of thought. We value thought-leaders, not hierarchy. We welcome new ideas and help our people deliver services with a difference. We roll up our sleeves and attack our problems with all the passion, resources and innovation the situation Distance Programs It conducts lectures, seminars, workshops and conducting events to provide expert guidance and latest technological trends, information, tips for fault findings through our expert faculty members and inviting eminent guest member experts of different and diversified fields working in fields of Electronic, Communication, Instrumentation, Electrical, Computers, Soft-wares, Banking experts, Ecology & environment, Career & guidance as Industrialists, Professors, Entrepreneurs, Managers, NGOs and Technocrats Career guidance & Job Placements As finding and retaining human talent becomes more and more mission critical to the industry, attraction, management and retention of talent has become an integral part of the business boardroom strategy. In turn, this has led to outsourced HR services being no longer about just identifying the right candidates and placing them. This evolution places new demands and poses new challenges for organizations, which were hitherto providing outsourced HR services; so people of DEEKSHA engineering keeps an eagles eye and provide guidance & help the candidates in choosing the career, while running career, vocational and training courses to create a pool of talented, hard working coming out engineers and help them to be placed in various Industries working in the field of Electronic, Communication, Instrumentation, Electrical, Computer and Soft-wares.

CERTIFICATE

This is to certify that the work presented in the training report entitled Bidirectional Routing System is a bonafide record of the work in progress at Panchkula Engineering College. The project work is an authentic
record of our own work and is being carried out under the supervision and guidance of
Er. Kumar Rajender Department(ECE)

ACKNOWLEDGEMENT

We gratefully acknowledge the efforts of Er. Kumar Rajender(ECE), faculty and lab staff of in completing our major project. Their guidance, constructive criticism and timely review on thesis and project have resulted in completion of project. We are extending a special thanks to Er. Nivedita__for imparting us with technical support.

Introduction to the UP/Down Counter Microcontroller Based (AT89S51)


In this project we are demonstrating an Up and down counter using AT89s51. We are using two switches to set the direction of count. We have interfaced two seven segment displays with the microcontroller to display the decimal digits. Once we switch on the project the microcontroller will display zeros on both the seven segment displays. Now if we press the up key the microcontroller will increment the count and display it on two seven segment displays and the microcontroller will keep on incrementing the display until we release the up key. If the counter reaches 99 then it will roll over from 99 to zero and then start incrementing from zero to 99 again. If we release the key then the counter will halt at that count. Now if we press the decrement key the microcontroller will start decrementing the count. Now it will go on decrementing until we release the down key. If we hold the down key and the counter comes down to zero then the counter will roll over to 99 and then start decrementing from 99. Here we have used two BCD to seven segment converters for interfacing both the seven segment displays with the microcontroller. The BCD to seven segment converters used here are CD4511. We send the BCD code, of the digit to be displayed on the seven segment display, on the CD4511 and this converter now converts this BCD code to the corresponding seven segment data that the seven segment displays could understand. The seven segment displays used here are of common cathode type, which means that cathodes of all the seven segments in the seven segment display are shorted to each other internally. And it is available to us with two pins externally. We have connected one resistance with one of these two pins of each seven segment display. This resistance is used to limit the current following through the seven segment display and also to control the intensity of the seven segment display. Microcontroller AT89S51 is serving as the brain of this project, which is a family member of 8051 Microcontroller family. This Microcontroller is manufactured by ATMEL Corporation.

To make the Microcontroller work properly certain pins of Microcontroller are required to be connected in a particular manner. These pins are pin no. 9, pin no. 18, pin no. 19, pin no. 20, pin no. 31 & pin no. 40 and are described below: Pin no. 9 of the microcontroller is Reset pin. This pin has to be kept high for certain period of the time initially after power ON and then it has to be connected to the Ground terminal, only then the Microcontroller will start functioning and executing the code from 0000 Hex memory location. The minimum period of time for which the reset pin has to be kept high is 4 sec. To assure that the Reset pin be kept high for 4 sec and then connected to the Low, a reset circuit is employed which comprises of a 10 F capacitor and a 8.2KOhms resistance. This RC circuit provides proper Reset time to the Microcontroller. Pin no. 18 and 19 of the microcontroller AT89S51 are crystal out. AT89S51 has an internal Oscillator circuit to generate clock pulse for its CPU, but an external crystal has to be connected to these pins Now this crystal determines the clock frequency of the CPU. The maximum value of the crystal that can be used with the microcontroller depends upon the microcontroller that we are going to use. Here the microcontroller we are using supports a maximum crystal frequency of 24 MHz, but any crystal lower then this frequency can be used with it. And here a 12 MHz crystal is connected to the pin no. 18 and 19 of the microcontroller, which provides clock frequency to the microcontrollers internal circuitry. Capacitors of 33pF each are also connected to the pin 18 and pin 19 to remove the external noise. Pin no. 20 of the microcontroller is the ground pin and is connected to the ground. Pin no. 40 of the Microcontroller is the supply pin and is connected to +5V supply. Pin no. 31 is the external Access pin. This is an active low pin. This pin is activated whenever we have to access the program written in the external memory of the Microcontroller. Whenever we have to access the program written in the internal memory of the Microcontroller then we will deactivate this pin. So here EA is connected to +5V supply.

Circuit Diagram

Microcontroller Based UP/DOWN Counter


+5V Pin 2 of 8051 Pin 3 of 8051 +5V Pin 4 of 8051 Pin 1 of 8051 1 2 3 4 5 6 7 8 4511 LSB 16 15 14 13 12 11 10 9 40 U2 B C LT BL LE D A G nd Vcc f g a b c d e +5V Pin Pin Pin Pin Pin Pin Pin 9 of FND 10 of FND 7 of FND 6 of FND 4 of FND 2 of FND 1 of FND 39 38 37 36 35 34 33 32 1 2 3 4 5 6 7 8 U1 P 0 .0 /A D 0 P 0 .1 /A D 1 P 0 .2 /A D 2 P 0 .3 /A D 3 P 0 .4 /A D 4 P 0 .5 /A D 5 P 0 .6 /A D 6 P 0 .7 /A D 7 P 1 .0 P 1 .1 P 1 .2 P 1 .3 P 1 .4 P 1 .5 P 1 .6 P 1 .7

P 2 .0 /A 8 P 2 .1 /A 9 P 2 .2 /A 1 0 P 2 .3 /A 1 1 P 2 .4 /A 1 2 P 2 .5 /A 1 3 P 2 .6 /A 1 4 P 2 .7 /A 1 5 P 3 .0 /R XD P 3 .1 /T XD P 3 .2 /IN T O P 3 .3 /IN T 1 P 3 .4 /T O P 3 .5 /T 1 P 3 .6 /W R P 3 .7 /R D PSEN A L E /P R O G

21 22 23 24 25 26 27 28 10 11 12 13 14 15 16 17 29 30

SW 1 1 1 SW 2

VCC

2 UP D own

R2

270E

270E

R3 C 2 33pF Y1 12M H z C 3 33pF

9 8 7 6

C O M C a th o d e F N D C O M C a th o d e F N D MSB LSB 1 2 3 4 5 1 2 3 4 5

10

10

9 8 7 6

Pin 6 of 8051 Pin 7 of 8051 +5V Pin 8 of 8051 Pin 5 of 8051

1 2 3 4 5 6 7 8

B C LT BL LE D A G nd

4511 ML S B MSB

Vcc f g a b c d e

16 15 14 13 12 11 10 9

10uF R1 8 .2 K

+5V

E A /V P P AT89S51

Pin Pin Pin Pin Pin Pin Pin

9 of FND 10 of FND 7 of FND 6 of FND 4 of FND 2 of FND 1 of FND

20

GND

U3

19 18 XTA L1 9 XTA L2 R ST 31

+5V

+5V

C1

Microcontroller Pin diagram

Components List
1. 2. 3. 4. 5. 6. 7 8. 9. 10 11. Microcontroller AT89S51 IC- CD 4511 Common Cathode Seven Segment Display Crystal 12 MHz Micro Switch Capacitor 33pf Electrolytic 10 F Resistor 8.2K Resistor 270 IC Pin Base 40-pin IC Pin Base 16-pin 1 2 2 1 2 2 1 1 2 1 2

COMPARISON OF MICROPROCESSOR & MICROCONTROLLER


By Microprocessor is meant the general- purpose Microprocessor Intels x86 family (8086, 80286, 80386, 80846 and the Pentium) or Motorolas 680x0 family (68000, 68010, 68020, 68040, etc) these Microprocessors contain no RAM, no ROM and no I/O ports on the chip itself. For this reason, they are commonly referred to as general purpose microprocessor. A system designer using a general purpose microprocessor such as the Pentium or the 68040 must add RAM, ROM and I/O ports and timer externally to make them functional. Although the addition of external RAM, ROM and I/O ports makes these systems bulkier and much more expensive, they have the advantages versatility such that the designer can decide on the amount of RAM, ROM, I/O ports needed to fit the task at hand. This is not the case with microcontroller. A microcontroller has a CPU Microprocessor in addition to fixed amount of RAM, ROM, I/O ports and timer on a single chip. Therefore the designer can not add any external memory I/O or timer to it and the fixed amount of on chip ROM, RAM, I/O ports in microcontroller makes them ideal for many applications cost and space are critical.

Comparison of Microprocessor & Microcontroller Microcontrollers vs. Microprocessors: Microcontroller differs from a microprocessor in many ways. First and the most important is its functionality. In order for a microprocessor to be used, other components such as memory, or components for receiving and sending data must be added to it. In short that means that microprocessor is the very heart of the computer. On the other hand, microcontroller is designed to be all of that in one. No other external components are needed for its application because all necessary peripherals are already built into it

By Microprocessor is meant the general- purpose Microprocessor Intels x86 family (8086, 80286, 80386, 80846 and the Pentium) or Motorolas 680x0 family (68000, 68010, 68020, 68040, etc) These Microprocessors contain no RAM, no ROM and no I/O ports on the chip itself. For this reason, they are commonly referred to as general purpose microprocessor. A system designer using a general purpose microprocessor such as the Pentium or the 68040 must add RAM, ROM and I/O ports and timer externally to make them functional. Although the addition of external RAM, ROM and I/O ports makes these systems bulkier and much more expensive, they have the advantages versatility such that the designer can decide on the amount of RAM, ROM, I/O ports needed to fit the task at hand. This is not the case with microcontroller. A microcontroller has a CPU Microprocessor in addition to fixed amount of RAM, ROM, I/O ports and timer on a single chip. Therefore the designer can not add any external memory I/O or timer to it and the fixed amount of on chip ROM, RAM, I/O ports in microcontroller makes them ideal for many applications cost and space are critical. What is a Microcontroller
The best way to explain what a microcontroller is is to start with your computer. Your desktop computer (or laptop) is comprised of multiple parts, a CPU (such as a Pentium or Celeron), some RAM, a hard disk, a keyboard and mouse and a monitor screen. Programs are stored on the hard disk and run on the CPU, with temporary data stored in RAM. You can run multiple programs at a time by having one 'master program' called an operating system (such as Linux, Windows or Mac OS X) and that master program keeps track of things for you.

The AVR chip has components, too. It has a CPU, some flash storage, some RAM and some EEPROM, all in one little chip!. The CPU is just like the one in a computer, but its much simpler and not nearly as fast (what do you expect for $2.50?) The flash storage is just like the flash storage in your mp3 player or digital camera card, except its used to store programs. Its kinda like the hard disk of the microcontroller, except you can only read from it. The RAM is just like computer RAM. The EEPROM is kinda like flash except you cant run a program from it, but its used as long term storage. The EEPROM doesnt get erased when the chip loses power. So, to recap: The AVR chip runs whatever program is stored in the flash, uses the RAM for temporary storage and the EEPROM for longer term storage. Most computers have a 32-bit CPU running at 1GHz, with 1GB of RAM and 100 GB of storage. The kinds of microcontrollers discussed here run at 10MHz, have 1KB of RAM and 10KB of storage. (On the order of) However, their small size, lower power consumption and low cost make them an excellent choice for many projects!

Basically, a microcontroller is a device which integrates a number of the components of a microprocessor system onto a single microchip and optimized to interact with the outside world through on-board interfaces; i.e. it is a little gadget that houses a microprocessor, ROM (Read Only Memory), RAM (Random Access Memory), I/O (Input Output functions), and various other specialized circuits all in one package. On the other hand, a microprocessor is normally optimized to co-ordinate the flow of information between separate memory and peripheral devices which are located outside itself. Connections to a microprocessor include address, control and data busses that allow it to select one of its peripherals and send to or retrieve data from it. Because a microcontrollers processor and peripherals are built on the same silicon, the devices are self-contained and rarely have any bus structures extending outside their packages. So a microcontroller incorporates onto the same microchip the following:

The CPU core Memory (both ROM and RAM) Some parallel digital I/O

Microcontroller's fundamental components Microcontrollers will also combine other devices such as: A Timer module to allow the microcontroller to perform tasks for certain time periods. A serial I/O port to allow data to flow between the microcontroller and other devices such as a PC or another microcontroller. An ADC to allow the microcontroller to accept analogue input data for processing.

Basic microcontroller architecture

The microcontroller's building blocks explained To illustrate the functions and interconnectivity of the building blocks of the microcontroller, we shall construct the microcontroller block by block: Memory unit Memory is part of the microcontroller whose function is to store data. The easiest way to explain it is to describe it as one big closet with lots of drawers. If we suppose that we marked the drawers in such a way that they can not be confused, any of their contents will then be easily accessible. It is enough to know the designation of the drawer and so its contents will be known to us for sure. Memory components are exactly like that. For a certain input we get the contents of a certain addressed memory location and that's all. Two new concepts are brought to us: addressing and memory location. Memory consists of all memory locations, and addressing is nothing but selecting one of them. This means that we need to select the desired memory location on one hand, and on the other hand we need to wait for the contents of that location. Beside reading from a memory location, memory must also provide for writing onto it. This is done by supplying an additional line called control line. We will designate this line as R/W (read/write). Control line is used in the following way: if r/w=1, reading is done, and if opposite is true then writing is done on the memory location. Memory is the first element, and we need a few operation of our microcontroller. Central Processing Unit The block that will have a built in capability to multiply, divide, subtract, and move its contents from one memory location onto another is called "central processing unit" (CPU). Its memory locations are called registers.

Registers are therefore memory locations whose role is to help with performing various mathematical operations or any other operations with data wherever data can be found. Look at the current situation. We have two independent entities (memory and CPU) which are interconnected, and thus any exchange of data is hindered, as well as its functionality. If, for example, we wish to add the contents of two memory locations and return the result again back to memory, we would need a connection between memory and CPU. Simply stated, we must have some "way" through data goes from one block to another.
Bus That "way" is called "bus". Physically, it represents a group of 8, 16, or more wires There are two types of buses: address and data bus. The first one consists of as many lines as the amount of memory we wish to address, and the other one is as wide as data,

in our case 8 bits or the connection line. First one serves to transmit address from CPU memory, and the second to connect all blocks inside the microcontroller. As far as functionality, the situation has improved, but a new problem has also appeared: we have a unit that's capable of working by itself, but which does not have any contact with the outside world, or with us! In order to remove this deficiency, let's add a block which contains several memory locations whose one end is connected to the data bus, and the other has connection with the output lines on the microcontroller which can be seen as pins on the electronic component.
Input-output unit Those locations we've just added are called "ports". There are several types of ports : input, output or bidirectional ports. When working with ports, first of all it is necessary to choose which port we need to work with, and then to send data to, or take it from the port.

When working with it the port acts like a memory location. Something is simply being written into or read from it, and it could be noticed on the pins of the microcontroller.
Serial communication Beside stated above we've added to the already existing unit the possibility of communication with an outside world. However, this way of communicating has its drawbacks. One of the basic drawbacks is the number of lines which need to be used in order to transfer data. What if it is being transferred to a distance of several kilometers? The number of lines times number of kilometers doesn't promise the economy of the project. It leaves us having to reduce the number of lines in such a way that we don't lessen its functionality. Suppose we are working with three lines only, and that one line is used for sending data, other for receiving, and the third one is used as a reference line for both the input and the output side. In order for this to work, we need to set the rules of exchange of data. These rules are called protocol. Protocol is therefore defined in advance so there wouldn't be any misunderstanding between the sides that are communicating with each other. For example, if one man is speaking in French, and the other in English, it is highly unlikely that they will quickly and effectively understand each other. Let's suppose we have the following protocol. The logical unit "1" is set up on the transmitting line until transfer begins. Once the transfer starts, we lower the transmission line to logical "0" for a period of time (which we will designate as T), so the receiving side will know that it is receiving data, and so it will activate its mechanism for reception. Let's go back now to the transmission side and start putting logic zeros and ones onto the transmitter line in the order from a bit of the lowest value to a bit of the highest value. Let each bit stay on line for a time period which is equal to T, and in the end, or after the 8th bit, let us bring the logical unit "1" back on the line which will mark the end of the transmission of one data. The protocol we've just described is called in

professional literature NRZ (Non-Return to Zero). As we have separate lines for receiving and sending, it is possible to receive and send data (info.) at the same time. So called full-duplex mode block which enables this way of communication is called a serial communication block. Unlike the parallel transmission, data moves here bit by bit, or in a series of bits what defines the term serial communication comes from. After the reception of data we need to read it from the receiving location and store it in memory as opposed to sending where the process is reversed. Data goes from memory through the bus to the sending location, and then to the receiving unit according to the protocol.
Timer unit Since we have the serial communication explained, we can receive, send and process data. However, in order to utilize it in industry we need a few additionally blocks. One of those is the timer block which is significant to us because it can give us information about time, duration, protocol etc. The basic unit of the timer is a free-run counter which is in fact a register whose numeric value increments by one in even intervals, so that by taking its value during periods T1 and T2 and on the basis of their difference we can determine how much time has elapsed. This is a very important part of the microcontroller whose understanding requires most of our time. Watchdog One more thing is requiring our attention is a flawless functioning of the microcontroller during its run-time. Suppose that as a result of some interference (which often does occur in industry) our microcontroller stops executing the program, or worse, it starts working incorrectly. Of course, when this happens with a computer, we simply reset it and it will keep working. However, there is no reset button we can push on the microcontroller and thus solve our problem. To overcome this obstacle, we need to introduce one more block called watchdog. This block is in fact another free-run counter where our program needs to write a zero in every time it executes correctly. In case that program gets "stuck", zero will not be written in, and counter alone will reset the microcontroller upon achieving its maximum value. This will result in executing the program again, and correctly this time around. That is an important element of every program to be reliable without man's supervision. Analog to Digital Converter (ADC) As the peripheral signals usually are substantially different from the ones that microcontroller can understand (zero and one), they have to be converted into a pattern which can be comprehended by a microcontroller. This task is performed by a block for analog to digital conversion or by an ADC. This block is responsible for converting an

information about some analog value to a binary number and for follow it through to a CPU block so that CPU block can further process it. Finally, the microcontroller is now completed, and all we need to do now is to assemble it into an electronic component where it will access inner blocks through the outside pins. The picture below shows what a microcontroller looks like inside.

Thin lines which lead from the center towards the sides of the microcontroller represent wires connecting inner blocks with the pins on the housing of the microcontroller so called bonding lines. Chart on the following page represents the center section of a microcontroller. For a real application, a microcontroller alone is not enough. Beside a microcontroller, we need a program that would be executed, and a few more elements which make up a

interface

logic

towards

the

elements

of

regulation

Program Program writing is a special field of work with microcontrollers and is called "programming". Try to write a small program in a language that we will make up ourselves first and then would be understood by anyone.

START REGISTER1=MEMORY LOCATION_A REGISTER2=MEMORY LOCATION_B PORTA=REGISTER1 + REGISTER2 END The program adds the contents of two memory locations, and views their sum on port A. The first line of the program stands for moving the contents of memory location "A" into one of the registers of central processing unit. As we need the other data as well, we will also move it into the other register of the central processing unit. The next instruction instructs the central processing unit to add the contents of those two registers and send a result to port A, so that sum of that addition would be visible to the outside world. For a more complex problem, program that works on its solution will be bigger. Programming can be done in several languages such as Assembler, C and Basic which are most commonly used languages. Assembler belongs to lower level languages that are programmed slowly, but take up the least amount of space in memory and gives the best results where the speed of program execution is concerned. As it is the most commonly used language in programming microcontrollers it will be discussed in a later chapter. Programs in C language are easier to be written, easier to be understood, but are slower in executing from assembler programs. Basic is the easiest one to learn, and its instructions are nearest a man's way of reasoning, but like C programming language it is also slower than assembler. In any case, before you make up your mind about one of these languages you need to consider carefully the demands for execution speed, for the size of memory and for the amount of time available for its assembly. After the program is written, we would install the microcontroller into a device and run it. In order to do this we need to add a few more external components necessary for its work. First we must give life to a microcontroller by connecting it to a power supply (power needed for operation of all electronic instruments) and oscillator whose role is similar to the role that heart plays in a human body. Based on its clocks microcontroller executes instructions of a program. As it receives supply microcontroller will perform a small check up on itself, look up the beginning of the program and start

executing it. How the device will work depends on many parameters, the most important of which is the skilfulness of the developer of hardware, and on programmer's expertise in getting the maximum out of the device with his program.

Embedded System
ABSTRACT:An embedded system can be defined as the computing device that has computer hardware, either with software embedded in it as one of its most important component. It may be an independent system or a part of a larger system. The emergence of embedded systems is a recent development. As a scientific discipline it resembles the state of microelectronics (and VLSI design, in particular) around 1980. Todays challenge is similar to back then, except that the stakes are probably higher. Embedded systems will appear in virtually all devices, and intelligent devices have the tendency to oust their "stupid" counterparts from the market place, just like CD players have ousted gramophone players. Thanks to developments in microelectronics, the computing power of the desktop computers is now becoming available on the palmtops. Embedded systems are heterogeneous. Since they are mixtures of hardware and software, trade-off is important design decisions: do we realize a function in hardware or in software? But embedded systems are more heterogeneous than just combining computer science & digital electronics. This paper presents an overview of existing modes of Embedded Systems, architecture & their application. A look has also been given to future deployment of Embedded Systems. 1. INTRODUCTION:An embedded system can be defined as the computing device that has computer hardware with software embedded in it as one of its most important component. It may be either an independent system or a part of a larger system. As its software usually embeds in ROM ,it does not need secondary memories as in a computer. Nearly 99% of the processors manufactured end up in embedded systems. Embedded systems find applications in every industrial segment. Embedded systems can be categorized as stand-alone systems, real-time systems, networked information appliances & mobile devices. Just in the 10 years, such changes have occurred more rapidly that they see more revolutionaries than evolutionary. As these systems have brought about radical changes in Electronics and Computer, they have also begun to impact other human activities. INTRODUCTION TO EMBEDDED SYSTEM:An embedded system is some combination of computer hardware & software, either fixed in capability or

Programmable, that is specifically designed for a Particular kind of application device. Hardware & software that forms a component of some larger system & is expected to function without human intervention. Typically an embedded system consists of a single-board microcomputer with software in ROM, which starts running a dedicated application as soon as power is turned on & does not stop until power is turned off. An embedded system is any device controlled by instructions stored on a chip. These devices are usually controlled by a microprocessor that executes the instructions stored on a Read Only Memory (ROM) chip. Here an example of a chip PIC is shown An embedded system is pre-programmed to perform a dedicated or narrow range of functions as part of a larger system, usually with minimal end-user or operator intervention. The term 'embedded' implies that these chips are an integral part of the system. Broadly speaking, these programmable devices or systems are generally used to perform, control or monitor processes, machinery, environments, equipment and communications tasks. Embedded systems have several things to do at oncerespond to several Events at once; cope with unusual conditions without human intervention, while being subjected to a deadline. In fact a general computer system is made up of numerous embedded systems. If an embedded system is designed well, the existence of the processor & the software could be completely unnoticed by a user of the device.

2. CATEGORIES OF EMBEDDED SYSTEM:2.1 Stand-alone Embedded Systems:As the name implies, stand-alone systems work in stand-alone mode. They take inputs, process them & produce the desired output. The input can be electrical signal from transducers or commands from a human being such as pressing of a button. The output can be electrical signals to drive another system, an LED or LCD display for displaying of information to the users. Embedded Systems used in process control,automobiles,consumer electronic items etc. fall into this category in a process control system, the inputs are from sensors that convert a physical entity such as

temperature or pressure into its equivalent electrical signal. These electrical signals are processed by the system and the appropriate electrical signals are produced. 2.2. Real-time Systems:Embedded Systems in which some specific work has to be done in specific time period are called real-time systems. For example- Consider a system that has to open a valve within 30 milliseconds when the humidity crosses a particular threshold. If the valve is not opened within 30 milliseconds, a catastrophe may occur. Such systems with strict deadline are called hard real-time systems. On the other hand, if we consider a DVD player and we give some command from a remote control, & there is a delay of a milliseconds in executing the command, but this delay wont lead to a serious implication. Such systems are called as soft real-time systems. 2.3 Network Information Appliances:Embedded systems that are provided with network interfaces & accessed by networks such as Local Area Network or the Internet are called networked information appliances. Such embedded systems are connected to a network, typically a network running TCP/IP (Transmission Control Protocol/Internet protocol) protocol suite, such as the Internet or the Companys Intranet. These systems have emerged in recent years. Here are some examples of such systems:-

A networked process control system consists of a number of embedded systems connected as a LAN. Each embedded system can send real-time data to a central location from where entire process control system can be monitored. The monitoring can be done using a web browser such as the Internet Explorer. The door-lock of your home can be a small-embedded system with TCP/IP and HTTP server software running on it. When your children stand in front of the door-lock after they return from school, the web camera in the door-lock will send an alert to your desktop over the Internet and then you can open the door-lock just by clicking the mouse.

3.OVERVIEW OF EMBEDDED SYSTEM ARCHITECTURE:-

Every embedded system consists of custom built hardware built around a Central Processing Unit (CPU). This hardware also contains memory chips onto which software is loaded. The software residing on the memory chip is called the firmware. The embedded system architecture can be represented as a layered architecture as shown in fig-4. The operating system runs above the hardware and the application software run above the operating system. It is not compulsory to have an operating system in every embedded system. For small appliances such as remote control units, air conditioner, toys etc., there is no need for an operating system. For applications involving complex processing, it is advisable to have an operating system. In such a case, you need to integrate the application software with the operating system & then transfer entire software into a memory chip. Once the software is transferred to the memory chip, the software will continue to run for a long time & you dont need to reload the new software.

3.1 Building Block of hardware of an Embedded System:Central Processing Unit (CPU):The CPU is a unit that centrally fetches & processes a set of general-purpose instructions. The CPU instruction set includes instructions for

data transfer operations, ALU operations, stack operations, input &output operations & program control, sequencing & supervising operations. The general-purpose instruction set is always specific to a specific CPU. One example of an older generation Microprocessor is Intel 8085.It is an 8-bit processor. Another is Intel 8086 or 8088, which is a 16-bit processor. The CPU can be of the following:Microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is a low-cost processor. Its main attraction is that on the chip itself, there will be many other components such as memory, ADC etc. on the other hand, microprocessors are more powerful, but you need to use many external computers with them. DSP is mainly used for applications in which signal processing is involved. Processor in the System:An embedded system processor chip or Core can be one of the following. 1. General Purpose Processor (GPP):a) Microprocessor b) Microcontroller c) Embedded processor d) Digital signals processor (DSP) e) Media Processor 2. Application Specific System Processor (ASSP) As Additional Processor 3. Multiprocessor system using General Purpose processors (GPPS) & Application Specific Instruction Processors (ASIPs) 4. GPP core(s) or ASIP core (s) integrated into either an Application Specific Integrated Circuit Circuit (ASIC) or a Very Large Scale Integrated Circuit (VLSI) circuit or an FPGA core integrated with processor unit(s) in a VLSI (ASIC) chip.

Block diagram of Component of the Embedded System Hardware:-

Processor:A processor is the heart of the embedded system. For an embedded system designer, knowledge of microprocessors & Microcontrollers is a prerequisite. A processor has two essential units: 1. Program flow Control Unit (CU) 2. Execution Unit (EU) The CU includes a fetch unit for fetching instruction from the memory. The EU has circuits that implement the instructions pertaining to data transfer operation & data conversion from one form to another. The EU includes the Arithmetic and Logical Unit (ALU) & also the circuits that execute instructions for a program control tasks, say, halt, interrupt, or jump to another set of instructions. It can also execute instructions for a call or branch to another program & for a call to a function. Processors runs the cycle of fetch & execute the instruction defined in the processor instruction set are executing in the sequence that they are fetched from the memory. A processor is mostly in the form of an IC chip; alternatively it could be in core form in an ASIC or at a Soc. Core means a part of the functional circuit on the VLSI chip. A General Purpose Processor is used because of the following:1) Processing by the known instructions Available at redefined general-purpose instruction set result in fast system development. 2) Once the board & input/output interfaces are designed for a GPP, these Can be used for a new system by just changing the embedded software in the Board ROM. 3) Ready availability of a compiler Facilitates embedded software development in high level language. 4) Ready availability of a well tested &

Debugged processor specific APIs & the Codes previously designed for other Applications results in fast development of new system. Microprocessor:A microprocessor is a single VLSI chip that has a CPU &may also have some other units (for eg: floating-point processing arithmetic unit, pipelining &super-scaling units) that are additionally present & that result in faster processing of instructions. Memory:The memory is categorized as Random Access Memory (RAM) and Read Only Memory (ROM). The contents of RAM will be erased if power is switched off. So, the firmware is stored in the ROM. When the power is switched on, the CPU reads the ROM, the program is transferred to RAM and program is executed. Input devices:Unlike the desktops, the I/P devices to an embedded system have very limited capability. There will be keyboard or a mouse, & hence interacting with the embedded system is no easy task. Many embedded systems will have a small keypad-you press one key to give a specific command. A keypad may be used to I/P only the digits. Many embedded system uses in process control do not have any I/P device for user interaction; they take I/Ps from sensors or transducers & produce electrical signals. Output devices:The output devices of the embedded systems also have very limited capability. Some embedded systems will have a few Light Emitting Diodes to indicate the health status of the system modules. A small Liquid Crystal Display (LCD)may also be used to display some important parameters. Communication interfaces:The embedded systems may need to interact with other embedded systems or they may have to transmit data to a desktop. Application-specific circuitry:Sensors, transducers, special processing & control circuitry may be required for an embedded system, depending on its application. The circuitry interacts with the processor to carry out the necessary work. 4. SPECIALITIES OF EMBEDDED SYSTEMS:While designing the embedded systems, developers have to keep the below specialties in mind: 4.1 Performance:Many embedded systems have time constraints. For instance, in a process control system, a constraint can be: if the temperature exceeds 40 degrees, open a valve within 10 milliseconds.

The system meets such deadlines. If the deadlines are missed, it may result in a catastrophe. You can imagine the damage that can be done if such deadlines are not met in a safety system of a nuclear plant. 4.2 Power Consumption:Most of the embedded systems operate through a battery. To reduce the battery drain & avoid frequent recharging of the battery, the power consumption of an embedded system has to be very low. 4.3 Cost:For an embedded system used in safety applications of a nuclear plant or in a spacecraft, cost may not be a very important factor. However, for an embedded system used in consumer electronics or office automation, the cost is of utmost importance. Suppose you have designed a toy in which the electronics will cost US$20. By a careful analysis design, if you can telecom operator will change the algorithm for the calculation of the bill amount. This is very cumbersome, considering that a memory chip will have to replace in thousands of PCO. 4.4 Size:Size is certainly a factor for many embedded systems. We do not like a mobile phone that has to be carried on our backs. The size and the weight (ie.compactness) are the important parameters in embedded systems used in aircraft, missiles etc. because in such cases, every inch & every grain matters. 4.5 Software Up gradation capability:Embedded systems are meant for a very specific task. So, once the software is transferred to the embedded system, the same software will run throughout its life. However, in some cases, it may be necessary its upgrade the software. Consider the example of a Public Call Office (PCO). At the PCO, an embedded system is used which displays the amount to be paid by a telephone user. The amount is calculated by a firmware, based on the calling number & the duration of the call from time to time, the broadband & wireless network, & consumer electronic products. 5. RECENT TRENDS IN EMBEDDED SYSTEMS:In old good days, developing embedded systems was confined to very specialists. Most of the embedded systems are written only in assembly language & hence writing, debugging & maintaining the code were very difficult & time consuming. With the availability of powerful processors & advanced development tools, embedded software development is no longer rocket science. 5.1 Processor Power:The growing importance of embedded systems can be gauged by the availability of processors about 150 varieties of processors are available from around 50 semiconductor vendors. Powerful 8bit, 16- bit, 32-bit and 64-bit micro controllers, & microprocessors are available to cater to the different market segments the clock speed & memory addressing capability of these processors are also increasing. Very powerful digital signal processors are also available for real time analyses of audio and video signals. As a result, the power of desktop computers is now available on palm tops. 5.2 Mobile Devices:Mobile devices such as mobile phones, Personal Digital Assistants, smart phones etc. are a special

category of an embedded system. Though the PDA does many general-purpose tasks, they need to be designed just like the conventional embedded systems. The limitations of the mobile devicesmemory constraints, small size, display etc. are same as those found in the embedded systems. Hence mobile devices are considered as embedded systems. 5.3 Operating Systems:Unlike the desktop on which the options for an operating system are limited, a very of operating systems are available which can be ported on to the embedded system. The advantage of embedding an operating system is that the software development will be very fast & marinating the code is very easy. The software can be developed in a high level language such as C. So time to market the system gets reduced. If real time performance is require a real time operating system can be used. In addition too many commercial embedded operating system open source software campaigned let to development of many open source operating system. The attraction of open source software is that it is free & also the complete source code is available to customize the software as per your application needs. 5.4 Communication Interfaces and Networking Capability:- With the availability of low-cost chips, embedded systems can be provided networking capability through communication interfaces such as Ethernet, 802.11b wireless LAN & infrared. Network enabling of an embedded system has many advantages: it can be accessed over a network for remote control or monitoring. 5.5 Programming Languages:Fig. 6 Development of embedded system was done mostly in assembly languages. However, due to the availability of cross-compilers, most of the development is now done in high-level languages such as C. the object-oriented languages like C++ & Java are now catching up. 5.6 Development Tools:- Availability of a number of tools for development, debugging & testing as well as for modeling the embedded systems is now paving way for the fast development of robust & reliable systems. Development tools such as BREW (Binary Routine Environment for wireless), Wireless Application Protocol (WAP) development tools facilitate easy development of applications for mobile devices 5.7 Programmable Hardware:- PLDs& FPGA pave the way for reducing the components on an embedded system, leading to small, low-cost systems. After developing the prototype of an embedded system, for mass production, FPGA can be developed having all the functionality of the processors, peripherals & application-specific circuitry. 6. APPLICATION AREAS:- In todays world the electronic devices have been dominated. The children need embedded systems to play smart video games & to operate automatic chocolate Vending machines! Young people need embedded systems to borrow smart cards from parents to see movies! Housewives need embedded system for smart Internet compliant home appliances, such as, microwave, television, music system, & so on. Nearly 99%of the processors manufactured end up in embedded systems. The embedded system market is one of the highest growth areas as these systems are used in very market segmentconsumer electronics, office automation, biomedical engineering, wireless communication,& data

communication, military and so on. 6.1 Consumer appliances:At home we use a number of embedded systems that include digital camera, digital diary, DVD player, electronic toy, microwave oven, remote controls for TV & air conditioner etc. Todays hightech car has about 20 embedded systems for transmission control, spark control, navigation etc. Even wristwatches are now becoming embedded systems. 6.2 Industrial automation:- Today a lot of industries use embedded systems for process control. These include pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity generation & transmission. The embedded systems for industrial use are designed to carry out the specific task such as monitoring the temperature, pressure, humidity, voltage, current etc. & then take appropriate action based on monitored levels to control other devices. 6.3 Medical electronics:- Almost every medical equipment in the hospital is an embedded system. This equipments include diagnostic aids such as ECG, EEG, blood pressure measuring devices & X-ray scanners etc. 6.4 Computer Networking:- Computer networking products such as bridges, routers, Integrated Services Digital Networks (ISDN), Asynchronous Transfer Mode & relay switches are the embedded systems that implement the necessary data communication protocols. 6.5 Wireless technologies:- Advances in mobile communications are paving way for many interesting applications using embedded systems. The mobile phone is one of the marvels of the last decade of the 20th century. It is very powerful embedded system that provides voice communication while we are on the move. 6.6 Instrumentation:- Testing & measurement are the fundamental requirements in all scientific and engineering activities. The measuring equipment we use in laboratories to measure parameters such as weight, temperature, voltage, current etc. are all embedded systems. Test equipment such as oscilloscope, logic analyzer, protocol analyzer, radio communication test set etc, are embedded systems built around powerful processors 6.7 Security:- Security of persons and information has always been a major issue. We need to project our homes and offices, & also the information we transmit & store. Developing embedded systems for security applications is one of the most lucrative businesses nowadays. 6.8 Finance:- Financial dealing through cash & cheques are now slowly paving way for transactions using smart cards and ATM (Automatic Teller Machine, also expanded as Any Time Money) machine. Smart card, of the size of a credit card, has a small micro-controller and memory; & it interacts with the smart card reader / ATM machine & acts as an electronic wallet.

7. SPECIFIC APPLICATIONS:-

7.1 AUTOMATIC TELLER MACHINE (ATM):ATM is an electronic device that allows a bank's customers to make cash withdrawals and check their account balances without the need for a human teller. Many ATMs also allow people to deposit cash or cheques, transfer money between their bank accounts or even buy postage stamps. The world's first ATM was developed by De la Rue & installed in Enfield Town in North London on June 27, 1967 by Barclays Bank. The idea of a personal identification number (PIN) stored on a physical card being compared with the PIN entered when retrieving the money was developed by the British engineer James Good fellow in 1965.In modern ATMs, customers identify themselves by using a plastic card with a magnetic stripe, which encodes the customer's account number, & by entering a four-digit pass code (PIN). If the PIN is entered incorrectly for several times in row then the ATM retains the card for a security purpose to avoid the use of card by an unauthorized user. There are ATMs that are accessible to blind and visually impaired peoples. This is one of the great inventions. These are types of ATMs whose keypads are equipped with Braille system. 7.2 EMBEDDED SYSTEM IN A SHOE:The microprocessor embedded in this Adidas running shoe calculates the pressure between the runner's foot & the ground five million times per second & continuously changes the cushioning to match an adjustable comfort level. The computer controls a motor that lengthens & shortens a cable attached to a plastic cushioning element. 7.3 BRAILLE INTERFACE TO MICROCONTROLLER:In todays world mobile phone has become the most simplest and effective way of communication .What to do if we want to send a message to our friend. Simple, we write a sms and send it to our friend. Thats very cool and handy for us. But, what if one of our friends is blind. Being blind does not mean he should be deprived of the simplest facility available on mobile phone.

There should be some way that blind people can also read messages, isnt it? So basically our aim is to enable blind person to read sms.

Next question how is it possible? This is possible through Braille. Braille is a matrix of engraved dots. There is a coding for each English character. Blind person can read the text just by touching it. This comes through training. And Brailles are used in almost all blind school nowadays. Blind person are using it extensively to communicate with mobiles, typewriters and even computers. The message can be transferred to the Braille structure. This is done by interfacing a microcontroller to the mobile through a cable. This uses serial communication. The mobile communicates microcontroller through AT commands .The microcontroller outputs signal to the relay drive circuit. The message is also displayed on the LCD connected to the microcontroller. There are six relays which drive the mechanical structure, consisting of six thick wires. There is encoding for each English alphabet and character. The wires corresponding to the particular alphabet or character is raised up and the blind person can feel it through their fingers. 10. CONCLUSION:An embedded system is closely integrated with the main system It may not interact directly with the environment. Thus embedded systems contain programmed instruction running via processor chips. They perform control, protection & monitoring tasks. In broad terms embedded systems are programmable devices or systems which are generally used to control or monitor things like processes machinery, environmental equipment & communications. The range of embedded system is vast & includes all industrial & commercial sectors. Embedded systems are rapidly becoming a catalyst for change in the computing, data communication, telecommunications, industrial control & entertainment sector. The objective of this study is to enlighten readers about the application of embedded systems; the embedded systems technology; & the impact of the technology on various markets.

Soldering Technique
SOLDERING The electronic depends upon very much on the solder joints. Soldering is an alloying process b/w two meters or soldering as a method of reliable joints is one of the widely used practiced production is one of the widely practiced production techniques. SOLDERING TECHNIQUES:Soldering techniques can be broadly classified into two groups:1. Iron solders or hand manual soldering. 2. Mass soldering or automatic soldering. IRON SOLDERING If the number of PCBs and components to be soldered are less, hands soldering process is used. Following are the tools used. 1. Soldering iron 2. Solder 3. Soldering fluxes 4. Tools 1. Soldering iron It is reasonable priced electrical equipment. It supplies sufficient heat to melt solder by heat transformer. When the iron is applied to connection to be solder, Soldering irons are available in different temperature range. Following are professional use industrial grade. Soldering iron is divided into two groups: a. Soldering iron or pencils. b. Soldering guns A.) Soldering iron or pencil The popular type soldering iron consists of an electrical wire attachment, a heating element, a tip of heat transfer and an insulated handle. The tip is normally of copper because of its high conductivity is often plated nickel soldering iron consists of following parts:1. Soldering element 2. Heating element 3. Insulated handle

PROPER SELECTION OF SOLDERING IRON AND TIP To match soldering take following electrical and mechanical properties are to be considered:MECHANICAL PROPERTIES: D. Length, weight, balance, bi-directional control, safety, artistic look and comfort. ELECTRICAL PROPERTIES:1.) Leakage, grounding 2.) Solder It is the most widely used alloy. It is a genes name representing a host of alloys of low melting metals tin lead, cadmium, bismuth sodium silver and many more. An alloy is not just a mixture but an exact combination of two or more metals to get an entirely new set of desired properties. OTHER SOLDERS:1. Tin lead antimony: It consists of tin content of 30% to 50%. The presence of generally restricts the flow of solder. 2. Tin lead silver: It is an alloy of 97% of PB, 20% of AG and 10% of SN. Tin is added because of poor welding qualities of lead. 3. Tin zinc: It is an electric combination with electric pin at 8.9% of zinc and 91.1% of tin. 4. Tin silver: Tin silver combinations are used in ratio 3.5% silver and 96.5% tin. FLUXES During soldering operations an auxiliary medium is most commonly used to increase the flow properties of molten solders to improve the degree of melting and remove the oxide film from the bare metal which prevents from reforming so that the liquid solder display the flux and react with the base metal to form a bond characteristics of flux are:Should dissolve any oxide on metal surface. It should prevent the re-oxidation of the metal surface. It should easily be displayed by modern solder. It should be provide a liquid cover over the materials made exclude air up to soldering temperature. Residues should be removable after the completion of solder.

The following are the three categories of flux: 1. Active or corrosive fluxes. 2. Medium fluxes. 3. Mild or soft or non corrosive fluxes. VARIOUS SOLDERING TECHNIQUES: Mass soldering or Automatic Soldering. Mass soldering incorporates these techniques by which large no of joints are made simultaneously using a solder bath, bather as the source of heat as well as or refill material or metal. The most important mass soldering techniques employ same for contact with a molten solder path. The major advantage of mass rigorous control is possible Overall the individual storage of soldering. Mass soldering is classified as: Dip soldering Drag soldering Wave soldering Ultrasonic A) Dip Soldering: - It is a process in which the preferred PCB assembly is levered Vertically On to the clean solder Surface until it makes contact and is then immersed in solder both to required depth. B) Drag soldering: - In drag soldering a convey or system used the PCB so that it passes successfully over a floating station or flux dryer or preheating over the surface of a long and narrow solder bath, the board is lowered at small angle to assist solder drainage. C) Wave Soldering:- In wave soldering instead of lowering the board onto the solder bath, solder is pumped out of narrow slot to create a standing wave is solder bath. The boards after passing over used floating and drying sections which are conveyed across the crest of solder wave by a conveyer system which flows a straight path line. I) Double crested II) Flat topped III) Unidirectional flow D) Ultrasonic Soldering: - It permits flux less soldering and timing of non ferrous materials with no charge of residual fluxes causing future corrosion and failure of past soldering, fluxing and consequent post cleaning operations are eliminated. Ultrasonic can be used for soldering of considered very difficult to solder Property such as nickel alloys.

Circuit Description Regulated Power Supply 5V

This circuit is a small +5V power supply, which is useful when experimenting with digital electronics. Small inexpensive wall transformers with variable output voltage are available from any electronics shop and supermarket. Those transformers are easily available, but usually their voltage regulation is very poor, which makes then not very usable for digital circuit experimenter unless a better regulation can be achieved in some way. The following circuit is the answer to the problem. This circuit can give +5V output at about 150 mA current, but it can be increased to 1 A when good cooling is added to 7805 regulator chip. The circuit has over overload and terminal protection. The capacitors must have enough high voltage rating to safely handle the input voltage feed to circuit. The circuit is very easy to build for example into a piece of Vero board.

Pin out of the 7805 regulator IC.


1. Unregulated voltage in 2. Ground 3. Regulated voltage out

Other output voltages If you need other voltages than +5V, you can modify the circuit by replacing the 7805 chips with another regulator with different output voltage from regulator 78xx chip family. The last numbers in the the chip code tells the output voltage. Remember that the input voltage must be at least 3V greater than regulator output voltage ot otherwise the regulator does not work well

Power Supply 5V
Reglutor power Supply

M a in A C

Fuse

Diode-4001

Regulator
1 V IN VOUT 3 +

1 Lamp 4 2 1

7805
2

1 2

+
470-mfd/25V

10K

560 omh

M a in A C

Toggle-Switch

disk-cap

.1/104
10 mfd/16V

1K

LED-Green

GND

Block Diagram of Regulated Power Supply

PCB Layout

Summary of circuit features


1. 2. 3. 4. 5. 6. 7. 8. 9. Brief description of operation: Gives out well regulated +5V output, output current capability of 100 mA Circuit protection: Built-in overheating protection shuts down output when regulator IC gets too hot Circuit complexity: Very simple and easy to build Circuit performance: Very stable +5V output voltage, reliable operation Availability of components: Easy to get, uses only very common basic components Design testing: Based on datasheet example circuit, I have used this circuit successfully as part of many electronics projects Applications: Part of electronics devices, small laboratory power supply Power supply voltage: Unregulated DC 8-18V power supply Power supply current: Needed output current + 5 mA

10.

Component costs: Few dollars for the electronics components + the input transformer cost

List of Components
1. 2. 3. 4. 5. Transformer 9- 0-9 V 500 m a. amp (Guru Make) Silicon Rectifier diodes 4007 Voltage Regulator. 7805 Heat sink for Regulator Electrolytic Capacitor 2200 MFD 25 V (Philips) 470 MFD 25 V (Philips) Electrolytic Capacitor 10 MFD 25V (Philips) Disc type 7. 8. 9. 11. 12. 13. 14. 15. 16. 17 18. 19. 0.01 MFD 25 V 1 4 2 1 1 1 2 2 5 each 3 3 1 1 1 1 One each 1 50gm 1 15x9ench

Resistances W carbon + - 1-% 1 K ohm, 10K ohms, 560 ohms Red LED. Green LED. Fuse Holder with fuse 500 ma. ON/OFF Switch. Neon (indicator) Mains operated Main Cord/Lead 3 pin & 2 pin connector with wires (M/F) Soldering Iran 10watt Solder wire Cater Player Fiber sheet

Circuit Operation
In the bridge circuit, four diodes are connected in the form of a wheat stone bridge, two diametrically opposite junction of the bridge are connected to the secondary of the transformer and the other two are connected to the load. A regulated power supply circuit that is an electronics circuit that is designed to provide a constant voltage of predetermined value across the load terminals irrespective to the mains function. A regulated power supply circuit consists of a transformer to step down the ac mains voltage to the required value. The output of the transformer is fed to the rectifier circuit which converts the ass voltage into pulsating dc voltage. In series with the rectifier, the filter circuit is connected which filters out the pulsating dc voltage into pure dc voltage. Then the output is connected the voltage regulator circuit, which regulates the dc output and converts it into constant dc supply, which can be then fed to the electronics circuits. Regulator will maintain constant voltage across load in spite of change in load current or I/P voltage. As load current increases, the the Zener current decreases so that current through resistance R is constant. Since O/P voltage = Vin-IR and I is constant therefore O/P voltage remains unchanged. The reverse would be true should load current decreases should I/P voltage Vin increase more current will flow through the Zener voltage drop across R,will increase but load voltage would remain constant. The reverse would be true should I/P voltage decrease.

Applications of the Regulated Power Supply


The power supply is the main section of any device or we can say very comfortably that the power supply is the first step of trouble Shooting of any device, because if this section of the device is not ok then that device will not in working order. This is a regulated power supply of (Negative & Positive) Dual Constant Output. This circuit is using Regulators 7805 and 7905, so this is applied where the regulated or constant voltage of +ve & -ve 5Volts is required.

Introduction Embedded C. The use of C language to program microcontrollers is becoming too common. And most of the time its not easy to buld an application in assembly which instead you can make easily in C. So Its important that you know C language for microcontroller which is commonly known as Embedded C. As we are going to use Keil C51 Compiler, hence we also call it Keil C. Keywords: Keil C51 compiler adds few more keywords to the scope C Language: _at_ alien bdata bit code compact data far idata interrupt large pdata _priority_ reentrant sbit sfr sfr16 small _task_ using xdata

data/idata: Description: The variable will be stored in internal data memory of controller. example: CODE: unsigned char data x; //or unsigned char idata y;

bdata: Description: The variable will be stored in bit addressable memory of controller.

example: CODE: unsigned char bdata x; //each bit of the variable x can be accessed as follows x ^ 1 = 1; //1st bit of variable x is set x ^ 0 = 0; //0th bit of variable x is cleared

xdata: Description: The variable will be stored in external RAM memory of controller. example: CODE: unsigned char xdata x;

code: Description: This keyword is used to store a constant variable in code memory. Lets say you have a big string which is not going to change anywhere in program. Wasting ram for such string will be foolish thing. So instead we will make use of the keyword "code" as shown in example below. example: CODE: unsigned char code str="this is a constant string";

pdata: Description: This keyword will store the variable in paged data memory. This keyword is used occasionally. example: CODE: unsigned char pdata x;

_at_: Description: This keyword is used to store a variable on a defined location in ram. example: CODE: unsigned char idata x _at_ 0x30; // variable x will be stored at location 0x30

// in internal data memory

sbit: Description: This keyword is used to define a special bit from SFR (special function register) memory. example: CODE: sbit Port0_0 = 0x80; // Special bit with name Port0_0 is defined at address 0x80

sfr: Description: sfr is used to define an 8-bit special function register from sfr memory. example: CODE: sfr Port1 = 0x90; // Special function register with name Port1 defined at addrress 0x90

sfr16: Description: This keyword is used to define a two sequential 8-bit registers in SFR memory. example: CODE: sfr16 DPTR = 0x82; // 16-bit special function register starting at 0x82 // DPL at 0x82, DPH at 0x83

using: Description: This keyword is used to define register bank for a function. User can specify register bank 0 to 3. example: CODE: void function () using 2{ // code } // Funtion named "function" uses register bank 2 while executing its code

interrupt: Description: This keyword will tells the compiler that function described is an interrupt service routine. C51 compiler supports interrupt functions for 32 interrupts (0-31). Use the interrupt vector address in the following table to determine the interrupt number.

example: CODE: void External_Int0() interrupt 0{ //code }

Memory Models: There are three kind of memory models available for the user: 1. Small: All variables in internal data memory. 2. Compact: Variables in one page, maximum 256 variables (limited due to addressing scheme, memory accessed indirectly using r0 and r1 registers) 3. large: All variables in external ram. variables are accessed using DPTR. Depending on our hardware configuration we can specify the momory models as shown below:

CODE: //For Small Memory model #pragma small //For Compact memory model #pragma compact //For large memory model #pragma large

Program
#include<at89x51.h> main() { unsigned char count=0,msb,lsb,op; unsigned int i; P0=0; P1=0; P2=0xFF; P3=0; while(1) { while(P2_0==0) { count=count+1; if(count==100) { count=0;

} msb=count/10; lsb=count%10; msb=msb<<4; op=msb+lsb; P1=op; for(i=0;i<30000;i++); } while(P2_1==0) { if(count==0) { count=100; } count=count-1; msb=count/10; lsb=count%10; msb=msb<<4; op=msb+lsb; P1=op;

for(i=0;i<30000;i++); } }

You might also like