You are on page 1of 64

Embedded Systems / LINUX SOFT

Dept. Of Electronics & Communication, KITE, Jaipur 1

Embedded Systems / LINUX SOFT

1. INTRODUCTION
1.1 What is Embedded System : An embedded system is a special-purpose system in which the computer is completely encapsulated by the device it controls. Unlike a general-purpose computer, such as a personal computer, an embedded system performs predefined tasks, usually with very specific requirements. Since the system is dedicated to a specific task, design engineers can optimize it, reducing the size and cost of the product. Embedded systems are often mass-produced, so the cost savings may be multiplied by millions of items. Handheld computers or PDAs are generally considered embedded devices because of the nature of their hardware design, even though they are more expandable in software terms. This line of definition continues to blur as devices expand. 1.1.1 Examples of embedded systems automatic teller machines (ATMs) avionics, such as inertial guidance systems, flight control hardware/software and other integrated systems in aircraft and missiles cellular telephones and telephone switches computer equipment such as routers and printers engine controllers and antilock brake controllers for automobiles home automation products, like thermostats, air conditioners, sprinklers, and security monitoring systems handheld calculators household appliances, including microwave ovens, washing machines, television sets, DVD players/recorders medical equipment handheld computers videogame consoles

Dept. Of Electronics & Communication, KITE, Jaipur 1

Embedded Systems / LINUX SOFT


The first recognizably modern embedded system was the Apollo Guidance Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. Each flight to the moon had two. They ran the inertial guidance systems of both the command module and LEM. At the project's inception, the Apollo guidance computer was considered the riskiest item in the Apollo project. The use of the then new monolithic integrated circuits, to reduce the size and weight, increased this risk. The first mass-produced embedded system was the Autonetics D-17 guidance computer for the Minuteman missile, released in 1961. It was built from discrete transistor logic and had a hard disk for main memory. When the Minuteman II went into production in 1966, the D-17 was replaced with a new computer that was the first high-volume use of integrated circuits. This program alone reduced prices on quad nand gate ICs from 1.1.2 Characteristics: Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. Some also have real-time performance constraints that must be met, for reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs. For high volume systems such as portable music players or mobile phones, minimizing cost is usually the primary design consideration. Engineers typically select hardware that is just good enough to implement the necessary functions. For example, a digital set-top box for satellite television has to process large amounts of data every second, but most of the processing is done by custom integrated circuits. The embedded CPU "sets up" this process, and displays menu graphics, etc. for the set-top's look and feel. The software written for embedded systems is often called firmware, and is stored in ROM or Flash memory chips rather than a disk drive. It often runs with limited hardware resources: small or no keyboard, screen, and little RAM memory.

Dept. Of Electronics & Communication, KITE, Jaipur 2

Embedded Systems / LINUX SOFT


Embedded systems reside in machines that are expected to run continuously for years without errors and in some cases recover by them if an error occurs. Therefore the Software is usually developed and tested more carefully than that for Personal computers, and unreliable mechanical moving parts such as Disk drives, switches or buttons are avoided. Recovery from errors may be achieved with techniques such as a watchdog timer that resets the computer unless the software periodically notifies the watchdog. 1.1.3 User interfaces: Embedded systems range from no user interface at all - dedicated only to one task - to full user Interfaces similar to desktop operating systems in devices such as PDAs. In between are devices with small character- or digitonly displays and a few buttons. Therefore usability considerations vary widely. On larger screens, a touch-screen or screen-edge soft buttons also provides good flexibility while minimizing space used. The advantage of this system is that the meaning of the buttons can change with the screen, and selection can be very close to the natural behavior of pointing at what's desired. 1.2 Computer Requirements: Implementation In particular, they must guarantee real time operation reactive to external events, conform to size and weight limits, budget power and cooling consumption, satisfy safety and reliability requirements, and meet tight cost targets. 1.2.1 Real time/reactive operation: Real time system operation means that the correctness of a computation depends, in part, on the time at which it is delivered. The Signal Processing and Mission Critical example systems have a significant requirement for real time operation in order to meet external I/O and control stability requirements. Reactive computation means that the software executes in response to external events. These events may be periodic, in which case scheduling of events to guarantee performance may be possible. On the other hand, many events may be a periodic, in

Dept. Of Electronics & Communication, KITE, Jaipur 3

Embedded Systems / LINUX SOFT


which case the maximum event arrival rate must be estimated in order to accommodate worst case situations. Most embedded systems have a significant reactive component. Design challenge: Worst case design analyses without undue pessimism in the face of hardware with statistical performance characteristics (e.g., cache memory). 1.2.2 Small size, low weight: In transportation and portable systems, weight may be critical for fuel economy or human endurance. Among the examples, the Mission Critical system has much more stringent size and weight requirements than the others because of its use in a flight vehicle, although all examples have restrictions of this type. Design challenges: Non-rectangular, non-planar geometries. Packaging and integration of digital, analog, and power circuits to reduce size. 1.2.3 Safe and reliable: Some systems have obvious risks associated with failure. In mission-critical applications such as aircraft flight control, severe personal injury or equipment damage could result from a failure of the embedded computer. However, many embedded systems that could cause personal or property damage. This vulnerability is often resolved at the system level. Design challenge: Low-cost reliability with minimal redundancy.

1.3 Harsh Environment: Many embedded systems do not operate in a controlled environment. Problems are excessive heat, protection from vibration, shock, lightning, power supply fluctuations, water, corrosion, fire, and general physical abuse. For example, in the Mission Critical example application the computer must function for a guaranteed, but brief, period of time even under non-survivable fire conditions.

Dept. Of Electronics & Communication, KITE, Jaipur 4

Embedded Systems / LINUX SOFT


Design challenges: Accurate thermal modeling. De-rating components differently for each design, depending on operating 1.3.1 Cost sensitivity: Even though embedded computers have stringent requirements, cost is almost always an issue (even increasingly for military systems). Design challenge: Variable "design margin" to permit tradeoff between product robustness and aggressive cost optimization. System-level requirements In order to be competitive in the marketplace, embedded systems require that the designers take into account the entire system when making design decisions. 1.3.2 End-product utility: The utility of the end product is the goal when designing an embedded system, not the capability of the embedded computer itself. Embedded products are typically sold on the basis of capabilities, features, and system cost rather than which CPU is used in them or cost/performance of that CPU. Firstly, software is used to coordinate the mechanisms and define their functionality, often at the level of control system equations or finite state machines. Finally, computer hardware is made available as infrastructure to execute the software and interface it to the external world. Design challenge: Software- and I/O-driven hardware synthesis (as opposed to hardware-driven software compilation/synthesis). 1.3.3 System safety & reliability: The mechanical safety backups are activated when the computer system loses control in order to safely shut down system operation. A bigger and more difficult issue at the system level is software safety and reliability. While software doesn't normally "break" in the sense of hardware, it may be so complex that a set of environment.

Dept. Of Electronics & Communication, KITE, Jaipur 5

Embedded Systems / LINUX SOFT


unexpected circumstances can cause software failures leading to unsafe situations. This is a difficult problem that will take many years to address, and may not be properly appreciated by non-computer engineers and managers involved in system design decisions. Design challenges: Reliable software. Cheap, available systems using unreliable components. Electronic vs. non-electronic design tradeoffs. Controlling physical system Distributed system tradeoffs among analog, power, mechanical, network, and digital hardware plus software. 1.3.4 Power management A less pervasive system-level issue, but one that is still common, is a need for power management to either minimize heat production or conserve battery power. Design challenge: Ultra-low power design for long-term battery operation.

1.4 Life cycle support: First a need or opportunity to deploy new technology is identified. Then a product concept is developed. Concurrent product and manufacturing process design, production, and deployment follow this. But in many embedded systems, the designer must see past deployment and take into account support, maintenance, upgrades, and system retirement issues in order to actually create a profitable design. Some of the issues affecting this life-cycle profitability are discussed below. 1.4.1 Component acquisition: Because an embedded system may be more application-driven than a typical technology-driven desktop computer design, there may be more leeway in component selection. For example, the cost of a component generally decreases with quantity, so design decisions for multiple designs should be coordinated to share common components to the benefit of all.

Dept. Of Electronics & Communication, KITE, Jaipur 6

Embedded Systems / LINUX SOFT


Design challenge: Life cycle, cross-design component cost models and optimization rather than simple per-unit cost. 1.4.2 System certification: As need changes design of system changes, so recertification is required. One strategy to minimize the cost of system recertification is to delay all design changes until major system upgrades occur. This is a partitioning problem affected by potential design changes, technology insertion strategies, and regulatory requirements. Design challenge: Partitioning/synthesis to minimize recertification costs.

1.4.1 Life Cycle Support

1.4.3 Logistics and repair A failure of the computer can cause the entire system to be unusable until the computer is repaired. In many cases embedded systems must be repairable in a few minutes to a few hours, which imply that spare components and maintenance personnel must be located close to the system. A fast repair time may also imply that extensive diagnosis and data collection capabilities must be built into the system, which may be at odds with keeping production costs low. Because of the long system lifetimes of many embedded systems, proliferation of design variations can cause

Dept. Of Electronics & Communication, KITE, Jaipur 7

Embedded Systems / LINUX SOFT


significant logistics expenses. For example, if a component design is changed it can force changes in spare component inventory, maintenance test equipment, maintenance procedures, and maintenance training. Design challenge: Designs optimized to minimize spares inventory. High-coverage diagnosis and self-test at system level, not just digital component level. 1.4.4 Upgrades: Because of the long life of many embedded systems, upgrades to electronic components and software may be used to update functionality and extend the life of the embedded system with respect to competing with replacement equipment. While it may often be the case that an electronics upgrade involves completely replacing circuit boards, it is important to realize that the rest of the system will remain unchanged. Therefore, any special behaviors, interfaces, and undocumented features must be taken into account when performing the upgrade. Also, upgrades may be subject to recertification requirements. Design challenge: Ensuring complete interface, timing, and functionality compatibility when upgrading designs. 1.4.5 Long-term component availability: When embedded systems are more than a few years old, some electronic components may no longer be available for production of new equipment or replacements. This problem can be especially troublesome with obsolete processors and small-sized dynamic memory chips. Design challenge: Cost-effectively update old designs to incorporate new components.

Dept. Of Electronics & Communication, KITE, Jaipur 8

Embedded Systems / LINUX SOFT 2. BASIC EELECTRONICS COMPONENTS

2.1 Parallel port 2.1.1 Parallel port basics: In computers, ports are used mainly for two reasons: Device control and communication. We can program PC's Parallel ports for both. Parallel ports are mainly meant for connecting the printer to the PC. But we can program this port for many more applications beyond that. Parallel ports are easy to program and faster compared to the serial ports. But main disadvantage is it needs more number of transmission lines. Because of this reason parallel ports are not used in long distance communications. Let us know the basic difference between working of parallel port and serial port. In serial ports, there will be two data lines: One transmission and one receive line. To send a data in serial port, it has to be sent one bit after another with some extra bits like start bit, stop bit and parity bit to detect errors. But in parallel port, all the 8 bits of a byte will be sent to the port at a time and an indication will be sent in another line. There will be some data lines, some control and some handshaking lines in parallel port. If three bytes of data 01000101 10011100 10110011 is to be sent to the port, following figures will explain how they are sent to the serial and parallel ports respectively. We can understand why parallel port communication is faster compared to that of serial. In the PC there will be D-25 type of female connector having 25 pins and in the printer; there will be a 36-pin Centronics connector. Connecting cable will combine these connecters using following convention. Pin structure of D-25 and Centronics connecters are explained bellow.

Dept. Of Electronics & Communication, KITE, Jaipur 9

Embedded Systems / LINUX SOFT

2.1.1 Connectors
Normally, data, control and status registers will have following addresses. We need these addresses in programming. Register Data register (Base Address + 0) Status register (Base Address + 1) Control register (Base Address + 2) Note: All the parallel ports do not have bidirectional capability. Earlier parallel ports had only output enabled in data pins since printers only inputs data. But latter, to make parallel port capable of communicating with other devises, bidirectional ports are introduced. By default, data port is output port. To enable the bidirectional property of the port, we need to set the bit 5 of control register. LPT1 0x378 0x379 0x37a LPT2 0x278 0x279 0x27a

To know the details of parallel ports available in your computer, follow this procedure: Right click on My Computer, go to "Properties".

Dept. Of Electronics & Communication, KITE, Jaipur 10

Embedded Systems / LINUX SOFT

Select the tab Hardware, Click Device manager. You will get a tree structure of devices. In that Expand "Ports (Com1 & LPT)".

Double Click on the ECP Printer Port (LPT1) or any other port if available.

LPT

You will get details of LPT port. Make sure that "Use this Port (enable)" is selected.

Select tab recourses. In that you will get the address range of port. To start programming, you will need a D-25 type Male connector. Its pin structures can be found in the connector as follows:

2.1.2 Pins

2.1.2 Programming the Parallel Port in DOS:

Dept. Of Electronics & Communication, KITE, Jaipur 11

Embedded Systems / LINUX SOFT


To start programming the port, we will use DOS. In DOS we have commands to access the port directly. But, these programs will not work on the systems based on Windows XP, Windows NT or higher versions. For security reasons, higher versions of the windows do not allow accessing the port directly. To program the parallel port in these systems, we need to write kernel mode driver. When we want to find out whether particular pin of the port is high or low, we need to input the value of corresponding register as a byte. In that, we have to find out whether the corresponding bit is high or low using bitwise operators. We can't access the pins individually. So, you need to know basic bitwise operations. Main bitwise operators that we need are bitwise AND '&' and bitwise OR '|'. To make a particular bit in a byte high without affecting other bits, write a byte with corresponding bit 1 and all other bits 0; OR it with original byte. Similarly, to make particular bit low, write a byte with corresponding bit 0 and all other bits 1; AND it with original byte. In Turbo C, there are following functions used for accessing the port: outportb( PORTID, data); data = inportb( PORTID); outport( PORTID, data); data = inport( PORTID);

outport() function sends a word to port, inport() reads a word from the port. outportb() sends a byte to port and inportb() reads a byte from the port. If you include DOS.H header, these functions will be considured as macro, otherwise as functions. Function inport() will return a word having lower byte as data at PORTID and higher byte as data at PORTID+2. So, we can use this function to read status and control registers together. inportb() function returns byte at PORTID. outport() writes the lower byte to PORTID and higher byte to PORTID+1. So this can be used to write data and control together. outportb() function write the data to PORTID. outport() and outportb() returns nothing. Let us start with inputting first. Here is an example program, copy it and run in Turbo C or Borland C without anything connected to parallel port. Then you should see

Dept. Of Electronics & Communication, KITE, Jaipur 12

Embedded Systems / LINUX SOFT


data available in status register and pin numbers 10, 11, 12, 13 and 15 of the parallel port. Pin 11 (active low) is 0 and all other pins are 1 means it is OK. To understand bitwise operations: you want to find data in pin 15, value of (data & 0x08) will be 0x08 if bit 3 of register is high, 0therwise.

bit data :

no.

7654 XXXX

3210 1XXX (0x08 ) low) data

bit :

no. XXXX

7654 0XXX

3210 (0x08 )

& with : 0000 1000 )

& with : 0000 1000

-> 0000 1000 (0x08 -> bit 3 is high

-> 0000 0000 (0x00 -> bit 3 is

Dept. Of Electronics & Communication, KITE, Jaipur 13

Embedded Systems / LINUX SOFT

2.1.3 Interfacing of Seven Segment with Parallel port: Apparatus: Seven segment C-5611, Parallel Port Connector cord, Jumper Wires Bread Board. Procedure: 1. Open windows 98 as OS 2. Connect the male connector of the parallel port cord to the PC 3. Now connect the Female Connector of cord with seven segment C-5611 as shown in table. Table 2.1.1: Connection between Seven Segment and Female Connector

Seven No.

Segment 1 2 3 4 5 6 7 8 9 10

Pin Female Connector Pin No. 6 5 19 4 9 3 2 20 7 8

Dept. Of Electronics & Communication, KITE, Jaipur 14

Embedded Systems / LINUX SOFT


Table 2.1.2: Relationship of decimal No. , Segment Display And Hexadecimal Equivalent

2.1.3 Pin Out of seven segment

2.2 Relays A relay is usually that an is electromechanical device

actuated by an electrical current. The current flowing in one circuit causes the opening or closing of another circuit. Relays are like remote control switches and are used in many applications because of their relative simplicity, long life, and proven high reliability. They are used in a wide variety of applications throughout industry, such as in telephone exchanges, digital computers and automation systems.

Dept. Of Electronics & Communication, KITE, Jaipur 15

Embedded Systems / LINUX SOFT

2.2.1 How do relays work? All relays contain a sensing unit, the electric coil, which is powered by AC or DC current. When the applied current or voltage exceeds a threshold value, the coil activates the armature, which operates either to close the open contacts or to open the closed contacts. When a power is supplied to the coil, it generates a magnetic force that actuates the switch mechanism. The magnetic force is, in effect, relaying the action from one circuit to another. The first circuit is called the control circuit; the second is called the load circuit.

2.2 example

Dept. Of Electronics & Communication, KITE, Jaipur 16

Embedded Systems / LINUX SOFT


2.2.2 Types of Relays: There are two basic classifications of relays: 1. Electromechanical Relay 2. Solid State Relay. Electromechanical relays have moving parts, whereas solid state relays have no moving parts. Advantages of Electromechanical relays include lower cost, no heat sink is required, multiple poles are available, and they can switch AC or DC with equal ease. 1. Electromechanical Relays a. General Purpose Relay : The general-purpose relay is rated by the amount of current its switch contacts can handle. Most versions of the general-purpose relay have one to eight poles and can be single or double throw. These are found in computers, copy machines, and other consumer electronic equipment and appliances.

2.2.1 b. Power Relay: or double-pole units. The power relay is capable of handling larger power loads 10-50 amperes or more. They are usually single-pole

2.2.2

Dept. Of Electronics & Communication, KITE, Jaipur 17

Embedded Systems / LINUX SOFT


c. Time-Delay Relay : The contacts might not open or close until some time interval after the coil has been energized. This is called delay-on-operate. Delay-on-release means that the contacts will remain in their actuated position until some interval after the power has been removed from the coil. 2 Solid State Relays:

2.2.3 These active semiconductor devices use light instead of magnetism to actuate a switch. The light comes from an LED, or light emitting diode. When control power is applied to the devices output, the light is turned on and shines across an open space. On the load side of this space, a part of the device senses the presence of the light, and triggers a solid state switch that either opens or closes the circuit under control. Often, solid state relays are used where the circuit under control must be protected from the introduction of electrical noises. Advantages of Solid State Relays include low EMI/RFI, long life, no moving parts, no contact bounce, and fast response. The drawback to using a solid state relay is that it can only accomplish single pole switching.

2.2.3 Applications:-

Dept. Of Electronics & Communication, KITE, Jaipur 18

Embedded Systems / LINUX SOFT


General Purpose Relays:HVAC, Appliances, Security, Pool & Spa, Industrial Controls, Office Equipment Low Signal Relays:Telecommunications, Datacom, CP/OA, Security Power Relays:HVAC, Motor Office Automation, Process Control, Automotive, Energy Management Systems, Drives/Controls, Appliance Controls Solid State Relays:Industrial Control, Motors, Timers Signal Relays:Telecommunications, Instrumentation, Test Equipment.

2.3 L293D
2.3.1 Description: The L293D is a monolithic integrated high voltage, high current four channel vriver designed to accept standard DTL or TTL logic levels and drive inductive loads (such as relays solenoids, DC and stepping motors) and switching power transistors. To simplify use as two bridges is pair of channels is equipped with an enable input. Aspirate supply input is provided form the logic, allowing operation at a low voltage and internal clamp diodes are included. This device is suitable for use in switching applications at frequencies up to 5 KHz. The L293D is assembled in a 16 lead plastic package which has 4 center pins connected together and used for heat sinking.

Dept. Of Electronics & Communication, KITE, Jaipur 19

Embedded Systems / LINUX SOFT

2.3.1 Block Diagram

2.3.2 Connection Diagram :

Dept. Of Electronics & Communication, KITE, Jaipur 20

Embedded Systems / LINUX SOFT


2.3.2 Absolute Maximum Rating :

2.3.3 Switching Times :

Table 2.3.4: Truth Table:

Dept. Of Electronics & Communication, KITE, Jaipur 21

Embedded Systems / LINUX SOFT 2.4 LM324:


2.4.1 Features: 2-kV ESD Protection (K-Suffix Devices) Wide Supply Range: Single Supply . . . 3 V to 32 V(26 V for LM2902) or Dual Supplies . . . 1.5 V to _16 V(13 V for LM2902) Supply Voltage . . . 0.8 mA Typ Common-Mode Input Voltage Range Includes Ground, Allowing Direct Sensing Low Input Bias and Offset Parameters: Input Offset Voltage . . . 3 mV Typ Input Offset Current . . . 2 nA Typ Input Bias Current . . . 20 nA Typ Differential Input Voltage Range Equal to

Low Supply-Current Drain Independent of

Near Ground

A Versions . . . 2 mV Typ

A Versions . . . 15 nA Typ Maximum-Rated Supply Voltage . . . 32 V(26 V for LM2902) Open-Loop Differential Voltage Amplification . . . 100 V/mV Typ 2.4.2 Description: These devices consist of four independent high-gain frequency-compensated operational amplifiers that are designed specifically to operate from a single supply over a wide range of voltages. Operation from split supplies also is possible if the difference between the two supplies is 3 V to 32 V (3 V to 26 V for the LM2902), and VCC is at least1.5 V more positive than the input common-mode voltage. The low supply-current drain is independent of the magnitude of the supply voltage.

Dept. Of Electronics & Communication, KITE, Jaipur 22

Embedded Systems / LINUX SOFT

Applications include transducer amplifiers, dc amplification blocks, and all the Conventional operational-amplifier circuits that now can be more easily implemented in single-supply-voltage systems. For example, the LM124 can be operated directly from the standard 5-V supply that is used in digital systems and easily provides the required interface electronics without requiring additional 15-V supplies.

2.4.1 Pin Diagram LM324

2.5 AT89C2051 2.5.1 Description: The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2 Kbytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high density nonvolatile memory technology and is compatible with the industry standard MCS-51 instruction set and pinout. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2 Kbytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 is

Dept. Of Electronics & Communication, KITE, Jaipur 23

Embedded Systems / LINUX SOFT


designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power Down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset 2.5.2 Features: Compatible with MCS-51Products Kbytes of Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles 2.7 V to 6 V Operating Range Fully Static Operation: 0 Hz to 24 MHz Two-Level Program Memory Lock 128 x 8-Bit Internal RAM 15 Programmable I/O Lines Two 16-Bit Timer/Counters Six Interrupt Sources Programmable Serial UART Channel Direct LED Drive Outputs On-Chip Analog Comparator Low Power Idle and Power Down Modes

Dept. Of Electronics & Communication, KITE, Jaipur 24

Embedded Systems / LINUX SOFT

2.5.1

Pin Diagram

Dept. Of Electronics & Communication, KITE, Jaipur 25

Embedded Systems / LINUX SOFT

2.5.2 Block Diagram

Dept. Of Electronics & Communication, KITE, Jaipur 26

Embedded Systems / LINUX SOFT

2.5.3 Pin Description: 2.5.4 Port 1: Port 1 is an 8-bit bidirectional I/O port. Port pins P1.2 to P1.7 provide internal pull-ups. P1.0 and P1.1 require external pullups.P1.0 and P1.1 also serve as the positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip precision analog comparator. The Port 1 output buffers can sink 20 mA and can drive LED displays directly. When 1s are written to Port 1 pins, they can be used as inputs. When pins P1.2 to P1.7 are used as inputs and are externally pulled low, they will source current (IIL) because of the internal pullups. Port 1 also receives code data during Flash programming and program verification. 2.5.5 Port 3: Port 3 pins P3.0 to P3.5, P3.7 are seven bidirectional I/O pins with internal pullups. P3.6 is hard-wired as an input to the outputof the on-chip comparator and is not accessible as a general purpose I/O pin. The Port 3 output buffers can sink 20 mA. When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C2051 as listed below: VCC Supply voltage. GND Ground.

Port 3 also receives some control signals for Flash programming and programming verification. RST Reset input. All I/O pins are reset to 1s as soon as RST

Dept. Of Electronics & Communication, KITE, Jaipur 27

Embedded Systems / LINUX SOFT


goes high. Holding the RST pin high for two machine cycles while the oscillator is running resets the device. Each machine cycle takes 12 oscillator or clock cycles. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. 2.5.6 Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2. There are no requirements on the duty cycle of the external clock signal, sincethe input to the internal clocking circuitry is through a divideby- two flipflop, but minimum and maximum voltage high and low time specifications must be observed.

2.5.3 Oscillator Connections Notes: C1, C2 = 30 pF 10 pF for Crystals C1, C2 = 40 pF 10 pF for Ceramic Resonators

Dept. Of Electronics & Communication, KITE, Jaipur 28

Embedded Systems / LINUX SOFT

3. START VISION
Vision includes a project manager which makes it easy to design applications for an ARM based microcontroller. You need to perform the following steps to create a new project: Start Vision and Create a project file. Select a CPU from the Device Database. Create a new source file and add this source file to the project. Add and configure the startup code for the Device. Set tool options for target hardware. Build project and create a HEX file for Device programming.

The section provides a step-by-step tutorial that shows you how to create a simple Vision project. 3.1 Create a Project File: To create a new project file select from the Vision menu Project New Project. This opens a standard Windows dialog that asks you for the new project file name.We suggest that you use a separate folder for each project. You can simply use the icon Create New Folder in this dialog to get a new empty folder. Then select this folder and enter the file name for the new project, i.e. Project1. Vision creates a new project file with the name PROJECT1.UV2 which contains a default target and file group name. You can see these names in the Project Workspace Files. 3.2 Select a Device: When you create a new project Vision asks you to select a CPU for your project. The Select Device dialog box shows the Vision device database. Just select the microcontroller you use. We are using for our examples the Philips 80C51RD+ controller. This selection sets necessary tool options for the 80C51RD+ device and simplifies in this way the tool configuration.

Dept. Of Electronics & Communication, KITE, Jaipur 29

Embedded Systems / LINUX SOFT

Note: You may select the Extended Linker (LX51) and Extended Assembler (AX51) in this dialog. The extended Linker and Assembler is available in the Keil Professional Developer's Kit and gives you additional features such as variable banking or user class names. When you create a new project, Vision may automatically add the correct device specific CPU startup code for you. On some devices, the Vision environment needs additional parameters that you have to enter manually. Please carefully read the information provided under Description in this dialog, since it might have additional instructions for the device configuration. Once you have selected a CPU from the device database you can open the user manuals for that device in the Project Workspace Books page. These user manuals are part of the Keil Development Tools CD-ROM that should be present in your CD drive.

Dept. Of Electronics & Communication, KITE, Jaipur 30

Embedded Systems / LINUX SOFT

3.3 Create New Source Files: You may create a new source file with the menu option File New. This opens an empty editor window where you can enter your source code. Vision enables the C color syntax highlighting when you save your file with the dialog File Save As under a filename with the extension *.C. We are saving our example file under the name MAIN.C.

Once you have created your source file you can add this file to your project. Vision offers several ways to add source files to a project. For example, you can select

Dept. Of Electronics & Communication, KITE, Jaipur 31

Embedded Systems / LINUX SOFT


the file group in the Project Workspace Files page and click with the right mouse key to open a local menu. The option Add Files opens the standard files dialog. Select the file MAIN.C you have just created.

3.4 Add and Configure the Startup Code: The STARTUP.A51 file is the startup code for the most 8051 CPU variants. The startup code clears the data memory and initializes hardware and reentrant stack pointers. In addition, some 8051 derivatives require a CPU initialization code that needs to match the configuration of your hardware design. For example, the Philips 8051RD+ offers you on-chip xdata RAM that should be enabled in the startup code. Since you need to modify that file to match your target hardware, you should copy the STARTUP.A51 file from the folder C:\KEIL\C51\LIB to your project folder. Group Project Files File group allow you to organize large projects. For the CPU startup code and other system configuration files you may create a own file group in the Project Components,

Dept. Of Electronics & Communication, KITE, Jaipur 32

Embedded Systems / LINUX SOFT

Environment, Books dialog box. Use the New (Insert) button to create a file group named System Files. In the project window you may drag and drop the STARTUP.A51 file to this new file group.

Now, the Project Workspace Files lists all items of your project. To open a file for editing, double click on the file name in the Project Workspace. You may need to configure the startup STARTUP.A51 in the editor.

Dept. Of Electronics & Communication, KITE, Jaipur 33

Embedded Systems / LINUX SOFT

3.5 Set Tool Options for Target: Vision lets you set options for your target hardware. The dialog Options for Target opens via the toolbar icon or via the Project - Options for Target menu item. In the Target tab you specify all relevant parameters of your target hardware and the onchip components of the device you have selected. The following the settings for our example are shown.

Dept. Of Electronics & Communication, KITE, Jaipur 34

Embedded Systems / LINUX SOFT


3.6 Testing Programs with the Vision Debugger: Now you may modify existing source code or add new source files to the project. The Build Target toolbar button translates only modified or new source files and generates the executable file. Vision maintains a file dependency list and knows all include files used within a source file. Even the tool options are saved in the file dependency list, so that Vision rebuilds files only when needed. With the Rebuild Target command, all source files are translated, regardless of modifications. After you have tested your application, it might be required to create an Intel HEX file and to download the application software into the physical device using a Flash programming utility. Vision creates HEX files with each build process when Create HEX file under Options for Target Output is enabled. The Merge32K Hexfile option is available for Code Banking Applications when you have selected the Extended Linker LX51. You may start your Flash programming utility after the make process when you specify the program under the option Run User Program #1. 3.7 D.C Motor Program : #include<at89x51.h> unsigned pwlevel(unsigned int speed) { if(speed>=0 && speed <=100) return 0xFE; if(speed>100 && speed <=200) return 0xFC; if(speed>200 && speed <=300) return 0xF8; if(speed>300 && speed <400) return 0xF0; if(speed>400 && speed <=500) return 0xE0; if(speed>500 && speed <=600)

Dept. Of Electronics & Communication, KITE, Jaipur 35

Embedded Systems / LINUX SOFT


return 0xC0; if(speed>600 && speed <=700) return 0x80; if(speed>700 && speed <=800) return 0x00; }

void delay(unsigned int a) { unsigned int i; for(i=0;i<a;i++) { } } void clockwise(unsigned int pulse) { unsigned int i; while(P1_4==1) { P3=0x55; if(P1_2==0) if(pulse>=2) { pulse=pulse-10; P2=0xF7; delay(500); P2=0xFB; delay(500); P2=0xFD;

Dept. Of Electronics & Communication, KITE, Jaipur 36

Embedded Systems / LINUX SOFT


delay(500); P2=0xFE; delay(500); P2=pwlevel(pulse); } else { P2=0xff; delay(10000); P2=0x00; delay(10000); P2=pwlevel(pulse); } if(P1_3==0) if(pulse<800) { pulse=pulse+10; P2=0xFE; delay(500); P2=0xFD; delay(500); P2=0xFB; delay(500); P2=0xF7; delay(500); P2=pwlevel(pulse); } else { P2=0xff;

Dept. Of Electronics & Communication, KITE, Jaipur 37

Embedded Systems / LINUX SOFT

delay(10000); P2=0x00; delay(10000); P2=pwlevel(pulse); } for(i=pulse;i>0;i--) P1_6=P1_7=1; for(i=800-pulse;i>0;i--) P1_6=P1_7=0; } } void Anticlockwise(unsigned int pulse) { unsigned int i; while(P1_5==1) { P3=0xAA; if(P1_2==0) if(pulse>=2) { pulse=pulse-10; P2=0xF7; delay(500); P2=0xFB; delay(500); P2=0xFD; delay(500); P2=0xFE;

Dept. Of Electronics & Communication, KITE, Jaipur 38

Embedded Systems / LINUX SOFT


delay(500); P2=pwlevel(pulse); } else { P2=0xff; delay(10000); P2=0x00; delay(10000); P2=pwlevel(pulse); } if(P1_3==0) if(pulse<800) { pulse=pulse+10; P2=0xFE; delay(500); P2=0xFD; delay(500); P2=0xFB; delay(500); P2=0xF7; delay(500); P2=pwlevel(pulse); } else { P2=0xff; delay(10000);

Dept. Of Electronics & Communication, KITE, Jaipur 39

Embedded Systems / LINUX SOFT


P2=0x00; delay(10000); P2=pwlevel(pulse); } for(i=pulse;i>0;i--) P1_6=P1_7=1; for(i=800-pulse;i>0;i--) P1_6=P1_7=0; } } void main() { unsigned int pulse =800; P1_0=P1_1=P1_2=P1_3=P1_4=P1_5=1; while(1) { if(P1_0==0) { clockwise(pulse); } if(P1_1==0) { Anticlockwise(pulse); } else {

Dept. Of Electronics & Communication, KITE, Jaipur 40

Embedded Systems / LINUX SOFT


P3=0x00; P2=0xFE; delay(5000); P2=0xFD delay(5000); P2=0xFB delay(5000); P2=0xF7 delay(5000); P2=0xEF delay(5000); P2=0xDF delay(5000); P2=0xBF delay(5000); P2=0x7F delay(5000); } } } 3.8 Stepper Motor: #include<at89x51.h> void delay(unsigned int a) { int i; for(i=0;i<a;i++) { } ; ; ; ; ; ; ;

Dept. Of Electronics & Communication, KITE, Jaipur 41

Embedded Systems / LINUX SOFT


} cw() { P2=P3=0x01; delay(30); P2=P3=0x02; delay(30); P2=P3=0x04; delay(30); P2=P3=0x08; delay(30); } acw() { P2=P3=0x08; delay(30); P2=P3=0x04; delay(30); P2=P3=0x02; delay(30); P2=P3=0x01; delay(30); } void main() { P1_0=1; P1_1=1; while(1)

Dept. Of Electronics & Communication, KITE, Jaipur 42

Embedded Systems / LINUX SOFT


{ if(P1_0==0) cw(); else if(P1_1==0) acw(); } }

Dept. Of Electronics & Communication, KITE, Jaipur 43

Embedded Systems / LINUX SOFT

4. ROBOTICS
4.1 Introduction to Robotics In practical usage, a Robot is a mechanical device which performs automated physical tasks, either according to direct human supervision, a pre-defined program, or a set of general guidelines using artificial intelligence techniques. Robots are typically used to do the tasks that are too dirty, dangerous, difficult, repetitive or dull for humans. This usually takes the form of industrial robots used in manufacturing lines. Other applications include toxic waste cleanup, underwater and space exploration, mining, search and rescue, and mine finding. Recently however, robots are finding their way into the consumer market with uses in entertainment, vacuum cleaning, and lawn mowing. A robot may include a feedback-driven connection between sense and action, not under direct human control, although it may have a human override function. The action may take the form of electro-magnetic motors or actuators (also called effectors) that move an arm, open and close grips, or propel the robot. The step by step control and feedback is provided by a computer program run on either an external or embedded computer or a microcontroller. By this definition, a robot may include nearly all automated devices. Ask a number of people to describe a robot and most of them will answer they look like a human. Interestingly a robot that looks like a human is probably the most difficult robot to make. It is usually a waste of time and not the most sensible thing to model a robot after a human being. A robot needs to be above all functional and designed with qualities that suit its primary tasks. It depends on the task at hand whether the robot is big, small, is able to move or nailed to the ground. Each and every task means different qualities, form and function; a robot needs to be designed with the task in mind.

4.2 Different types of Robot:

Dept. Of Electronics & Communication, KITE, Jaipur 44

Embedded Systems / LINUX SOFT

4.2.1 Mobile Robots: Mobile robots are able to move, usually they perform task such as search areas. A prime example is the Mars Explorer, specifically designed to roam the mars surface. Mobile robots are a great help to such collapsed building for survivors Mobile robots are used for task where people cannot go. Mars Explorer image needs to be searched. Either because it is too dangerous of because people cannot reach the area that

4.2.2 Stationary Robots:

Robots are not only used to explore areas or imitate a human being. Most robots perform repeating tasks without ever moving an inch. Most robots are working in industry settings. Especially dull and repeating tasks are suitable for robots. A robot never grows tired; it will perform its duty day and night without ever complaining. In case the tasks at hand are done, the robots will be reprogrammed to perform other tasks.

Dept. Of Electronics & Communication, KITE, Jaipur 45

Embedded Systems / LINUX SOFT


4.2.3 Autonomous Robots:

Autonomous robots are self supporting or in other words self contained. In a way they rely on their own brains. Autonomous robots run a program that gives them the opportunity to decide on the action to perform depending on their surroundings. At times these robots even learn new behavior. They start out with a short routine and adapt this routine to be more successful at the task they perform. The most successful routine will be repeated as such their behavior is shaped. Autonomous robots can learn to walk or avoid obstacles they find in their way. Think about a six legged robot, at first the legs move ad random, after a little while the robot adjust its program and performs a pattern which enables it to move in a direction.

Dept. Of Electronics & Communication, KITE, Jaipur 46

Embedded Systems / LINUX SOFT


4.2.4 Remote-control Robots: An autonomous robot is despite its autonomous not a very clever or intelligent unit. The memory and brain capacity is usually limited. An autonomous robot can be compared to an insect in that respect. In case a robot needs to perform more complicated yet undetermined tasks an autonomous robot is not the right choice. Complicated tasks are still best performed by human beings with real brainpower. A person can guide a robot by remote control. A person can perform difficult and Dante 2, a NASA robot usually dangerous tasks without being at the spot where designed to explore the tasks are performed. To detonate a bomb it is safer to volcanoes via remote send the robot to the danger area. control.

4.2.5 Biology: Robots are often modeled after nature. A lot of BEAM robots look remarkably like insects. Insects are easy to build in mechanical form. Not just the mechanics are in inspiration also the limited behavior can easily be programmed in a limited amount of memory and processing power. Two basic ways of using effectors are to move the robot around (locomotion) or to move other objects around (manipulation). This distinction divides robotics into two mostly separate categories: mobile robotics (moving) and manipulator robotics (grabbing).Joints connect parts of manipulators. The most common joint types are: rotary (rotation around a fixed axis) prismatic (linear movement) A parallel robot is one whose arms (primary axes) have three concurrent prismatic joints or both prismatic and rotary joints. Degrees of freedom (DOF) means axes of

Dept. Of Electronics & Communication, KITE, Jaipur 47

Embedded Systems / LINUX SOFT


movement. The human arm has seven Degrees of Freedom. A "6 DOF" arm is highly flexible. Proprioceptive sensors sense the robot's actuators (e.g., shaft encoders, joint angle sensors). Proprioception is one of the most important senses of the human body. Alternately, robot has been used as the general term for a mechanical man, or an automaton resembling an animal, either real or imaginary. It has come to be applied to many machines which directly replace a human or animal in work or play. In this way, a robot can be seen as a form of biomimicry. Lack of anthropomorphism is perhaps what makes us reluctant to refer to the highly complex modern washer-dryer as a robot. However, in modern understanding, the term implies a degree of autonomy that would exclude many automatic machine tools from being called robots. It is the search for ever more highly autonomous robots which is the major focus of robotics research and which drives much work in artificial intelligence. The term robot is also often used to refer to sophisticated mechanical devices that are remotely controlled by human beings, such as waldoes and ROVs, even though these devices are not autonomous 4.3 Interesting points about Robotics: Building robots involves the development of a wide range of skills, including creative thinking, design, mechanics, electronics and programming - all of which are highly valued in industry. Our interest in the subject could lead us into an exciting and fulfilling career at the cutting edge of technology!

Dept. Of Electronics & Communication, KITE, Jaipur 48

Embedded Systems / LINUX SOFT

4.3.1Robot Before the 1960s, robot usually meant a manlike mechanical device (mechanical man or humanoid) capable of performing human tasks or behaving in a human manner. Today robots come in all shapes and sizes, including small robots made of LEGO, and larger wheeled robots that play robot football with a full-size ball. What many robots have in common is that they perform tasks that are too dull, dirty, delicate or dangerous for people. Usually, we also expect them to be autonomous, that is, to work using their own sensors and intelligence, without the constant need for a human to control them. Looked at this way, a radio controlled aero plane is not a robot, nor are the radio controlled combat robots that appear on television. However, there is no clear dividing line between fully autonomous robots and human-controlled machines. For example, the robots that perform space missions on planets like Mars may get instructions from humans on Earth, but since it can take about ten minutes for messages to get back and forth, the robot has to be autonomous during that time.

Dept. Of Electronics & Communication, KITE, Jaipur 49

Embedded Systems / LINUX SOFT

4.3.1 Where did the word robot originate? The word robot was introduced in 1920 in a play by Karel Capek called R.U.R. or Rossum's Universal Robots. Robot comes from the Czech word robota, meaning forced labour or drudgery. In the play, human-like mechanical creatures produced in Rossum's factory are docile slaves. Since they are just machines, the robots are badly treated by humans. One day a misguided scientist gives them emotions, and the robots revolt, kill nearly all humans and take over the world. However, because they are unable to reproduce themselves, the robots are doomed to die. 4.3.2 What are the Laws of Robotics? The term robotics was coined in the 1940s by science fiction writer Isaac Asimov. In a series of stories and novels, he imagined a world in which mechanical beings were mankind's devoted helpmates. They were constrained to obey what have become known as Asimov's Laws of Robotics: A robot may not injure a human being, or, through inaction, allow a human being to come to harm. A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.

Dept. Of Electronics & Communication, KITE, Jaipur 50

Embedded Systems / LINUX SOFT


4.3.3 What was the first practical robot? A prototype industrial robot arm named Unimate (designed by George Devol and Joseph Engelberger) was sold to General Motors in 1959. It plucked hot automobile parts out of a die-casting machine and quenched them in water. The 1960s and 1970s saw a revolution in manufacturing as robots replaced humans for many repetitive jobs. However, these robots were not intelligent by todays standards. Usually they were programmed by humans training their movements, and they had very little decision-making capabilities. There are still many robots like this in factories today, but the trend is towards more intelligent general-purpose robots that can do more than just paint a panel or screw in a bolt. 4.3.4 What can't robots do? It is very difficult to give a robot the ability to perform a wide variety of tasks, move around in cluttered surroundings, recognize objects in the real world, understand normal speech, and think for itself. These are exciting areas of current research in robotics and artificial intelligence. For example, the robot shown here has the problem of deciding where to cross the river. How can it make this decision? How would you do it? Perhaps you have come across a similar situation before. Perhaps you could look it up in a guide book. Perhaps you would reason that B is better than C because the water is likely to be shallower? Perhaps you would choose A, because you tried it before. All these ways of making decisions come very naturally to humans, but they are very difficult to program into robots. Another great problem in robotics is getting them to understand language. This is very important in problem-solving. For example, the four cards below have a letter on one side and a number on the other. If a card has a vowel (a, e, i, o, u) on one side then it has

Dept. Of Electronics & Communication, KITE, Jaipur 51

Embedded Systems / LINUX SOFT


an even number on the other. Which cards do you have to turn over to see if this is true? Think about your answer, and then point to a card to turn it over.

Now consider the following cards where the rule is every time I go to Paris I go by plane. Which cards have to be turned over to test this? Again, think about your answer before turning the card over.

The answer to the first question is that you have to turn over the E to see if it has an even number on the back and you have to turn over the 7 to check that it does not have a vowel on the back. In an experiment, only 12% of people got this second part right (did you?). The answer to the second question is much easier. Of course you have to turn over the Paris card to check that it has the word plane on the back, but now its much more obvious that you have to turn over the train card to make sure it does not have Paris on the back. In the experiment mentioned above, 60% of people got the second part right. These problems are logically the same, so the experimenters drew the conclusion that the meaning of the symbols is an important part of problem solving. Since robots have very poor language capabilities, their ability to use this kind of reasoning is very limited. Another of the great problems in robotics is getting them to see. Although it is easy to put a camera on a robot, it is much more difficult to get the robot to understand what is in an image. Most humans have miraculously good vision. We are able to resolve great ambiguity in scenes. It has proved much more difficult to get robots to understand

Dept. Of Electronics & Communication, KITE, Jaipur 52

Embedded Systems / LINUX SOFT


what is in their universe, and machine vision remains one of the big unsolved problems in robotics research. There are other problems in robotics that make progress slow. For example, your body is covered with skin, and this contains millions of sensors that allow you to do many fantastically precise things. For example, try typing at a computer with gloves on. The lack of touch feedback will make it very difficult. Also your muscles enable you to have very fine control. Even if you are rather clumsy, you are probably much better at manipulating objects than the average robot. Most people would not let a robot dust their favorite china. 4.4 Will robots ever be as good as humans? Many futurists believe that robots will eventually and inevitably become more capable than humans, but some experts in artificial intelligence assert that machines will never be able to develop the consciousness and emotions needed for reasoning and creativity. Nonetheless, there are already commercially available robots that can live in our houses and do basic chores for us. Robots are very good at processing certain kinds of information, and they are ideally suited to answering the telephone and being controlled over the Internet. The International RoboCup Federation has set itself the challenge of having a team of humanoid robot football players beat the human world champions by 2050. Can you image that? It means that robots will have to become as nimble and skilful as Beckham. It will require the invention of many new materials for example, a human soccer player could be badly hurt if it clashed with a robot made of metal. It will also require an enormous improvement in machine vision. If you play sports such as football, tennis, or even snooker, next time you play think about the huge amount of information that comes through your eyes.

Dept. Of Electronics & Communication, KITE, Jaipur 53

Embedded Systems / LINUX SOFT


4.5 Will robots take over from humans? This is a popular science fiction theme, and the answer depends on whether robots will ever attain consciousness and emotions. In stories like 2001: A Space Odyssey and Terminator, humans always find a way to outwit intelligent machines that try to take over control. That's fiction, however, and fact is often stranger than fiction! The suggestion that robots will take over because they might become more intelligent than humans overlooks one critical fact: the people who have power in human societies are usually not the most intelligent in the obvious, intellectual way. They have different kinds of human intelligence, including the ability to understand other people, and to influence their behavior. The sensible answer to the question as to whether robots will take over is that they probably wont in the near future. There are many reasons for this. The first is that the robots of today have puny brains compared to humans, and they do not have the ability to organise in the same way as humans. Our societies are very complex and allow us to achieve many very advanced things. It is unlikely that robots could overtake us in the near future. Even so, it is something that we should keep an eye on, since all scientists have a responsibility not to do things that damage society. However, for the most part, robots play a very positive role in our societies, and we can expect them to be used in many ways that make life better for us all.

Dept. Of Electronics & Communication, KITE, Jaipur 54

Embedded Systems / LINUX SOFT


4.6 Project:

AUTONOMOUS ROBOT Autonomous robots run a program that gives them the opportunity to decide on Autonomous robots are self supporting or in other words self contained. In a way they rely on their own brains to perform depending on their surroundings. At times these robots even learn new behavior. They start out with a short routine and adapt this routine to be more successful at the task they perform. The most successful routine will be repeated as such their behavior is shaped. Autonomous robots can learn to walk or avoid obstacles they find in their way. Think about a four legged robot, at first the legs move ad random, after a little while the robot adjust its program and performs a pattern which enables it to move in a direction The program we develop is as follows:

void display(unsigned short path1); void main() { unsigned short path=1; int i=0; char txt[5]; Lcd_Init(&PORTC); Lcd_Cmd(Lcd_CLEAR); Lcd_Out(1, 1, "Autonomous Robot"); // Initialize LCD connected to PORTC

Lcd_Cmd(Lcd_CURSOR_OFF); // Turn cursor off

Dept. Of Electronics & Communication, KITE, Jaipur 55

Embedded Systems / LINUX SOFT


while(1) { Lcd_Cmd(LCD_CLEAR); Lcd_Out(1,1, "SELECT PATH"); Delay_ms(100); if(PORTA.f0) { path=1; display(Path); PORTB.f0=1; PORTB.f1=0; PORTB.f2=1; PORTB.f3=0; Delay_ms(10000); PORTB.f0=0; PORTB.f1=1; PORTB.f2=0; PORTB.f3=1; Delay_ms(10000); PORTB.f0=0; PORTB.f1=0; PORTB.f2=0; PORTB.f3=0; }

Dept. Of Electronics & Communication, KITE, Jaipur 56

Embedded Systems / LINUX SOFT


if(PORTA.f1) { path=2; display(path); PORTB.f0=0; PORTB.f1=1; PORTB.f2=0; PORTB.f3=1; Delay_ms(10000); PORTB.f0=1; PORTB.f1=0; PORTB.f2=1; PORTB.f3=0; Delay_ms(10000); PORTB.f0=0; PORTB.f1=0; PORTB.f2=0; PORTB.f3=0;

} if(PORTA.f2) { path=3; display(path);

PORTB.f0=1; PORTB.f1=0;

Dept. Of Electronics & Communication, KITE, Jaipur 57

Embedded Systems / LINUX SOFT


PORTB.f2=1; PORTB.f3=0; Delay_ms(10000); PORTB.f0=0; PORTB.f1=1; PORTB.f2=0; PORTB.f3=1; Delay_ms(10000); PORTB.f0=0; PORTB.f1=0; PORTB.f2=0; PORTB.f3=0; } if(PORTA.f3) { path=4; display(path); PORTB.f0=1; PORTB.f1=0; PORTB.f2=1; PORTB.f3=0; Delay_ms(10000); PORTB.f0=0; PORTB.f1=1; PORTB.f2=0; PORTB.f3=1; Delay_ms(10000);

Dept. Of Electronics & Communication, KITE, Jaipur 58

Embedded Systems / LINUX SOFT


PORTB.f0=0; PORTB.f1=0; PORTB.f2=0; PORTB.f3=0; } } }

void display(unsigned short path1) { char txt[5]; ShortToStr(path1,txt); Lcd_Cmd(Lcd_CLEAR); Lcd_Out(1, 1, "Autonomous Robot"); Lcd_Out(2, 1, "Path"); Lcd_Out(2, 6, txt); }

Dept. Of Electronics & Communication, KITE, Jaipur 59

Embedded Systems / LINUX SOFT

CONCLUSION
An engineer must have a good practical as well as theoretical knowledge. He must be technically sound as book knowledge is incomplete. The technical training was an educative as well as interactive. We learned how to make the people learn. Technical lectures presented by the professional technicians related to topics like Robotics, Assembly language were really interesting and healthy to learn the industrial trends. The additional activities such as a session on Aptitude questions and presentations related to the topics provided the chance for overall development of an engineer. It made us learn about the importance of teamwork. Linux Soft center is a true platform to initiate the step towards professionalism in an engineers life. I am thankful to all the faculty members and Linux soft in charge for supporting my work and for providing a right track.

Dept. Of Electronics & Communication, KITE, Jaipur 60

Embedded Systems / LINUX SOFT

REFERENCES : http://www.societyofrobots.com http://www.wikipedia.com http://www.epanorma.net http://www.electronicsteacher.com Embedded Systems Muhammad Ali Mazidi Data Sheets

Dept. Of Electronics & Communication, KITE, Jaipur 61

Embedded Systems / LINUX SOFT BIO DATA

Iam Manish Sharma B.E (E&C) final year student pursing Degree from Kautilya Inst.Of Tech. Engg. ,sitapura, Jaipur .I belong to a Rural village Jatwara in Karouli District. I got 78.83% in Secondary, and 71% in Senior Secondary both of which I have completed from Rajasthan Board, Ajmer . In B.E My aggregate percentage till fifth Sem is 72% my field of interst is Digital Electronics and Communication Engineering. playing cricket and music are my hobbies. Hard working and punctuality are my strong points where as loose temper is my negative point.

Dept. Of Electronics & Communication, KITE, Jaipur 62

Embedded Systems / LINUX SOFT

Dept. Of Electronics & Communication, KITE, Jaipur 63

You might also like