Sie sind auf Seite 1von 52

CHAPTER 2 LITERATURE SURVEY

2.1 EMBEDDED SYSTEMS


An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions, often with real-time computing constraints. It is usually embedded as part of a complete device including hardware and mechanical parts. In contrast, a general-purpose computer, such as a personal computer, can do many different tasks depending on programming. Embedded systems control many of the common devices in use today. Since the embedded system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product, or increasing the reliability and performance. Some embedded systems are mass-produced, benefiting from economics of scale. Physically, embedded systems range from portable devices such as digital watches and mp4 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power stations. Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure. In general, "embedded system" is not an exactly defined term, as many systems have some element of programmability. For example, handheld computers share some elements with embedded systems such as the operating systems and microprocessors which power them but are not truly embedded systems, because they allow different applications to be loaded and peripherals to be connected.

2.2 Characteristics
1. 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 reasons such as safety and usability;

others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs. 2. Embedded systems are not always standalone devices. Many embedded systems consist of small, computerized parts within a larger device that serves a more general purpose. For example, the features an embedded system for tuning the strings, but the overall purpose of the Robot Guitar is, of course, to play music. Similarly, an embedded system in automobiles provides a specific function as a subsystem of the car itself. 3. The program instructions written for embedded systems are referred to as firmware, and are stored in read-only memory or flash memory chips. They run with limited computer hardware resources: little memory, small or non-existent keyboard and/or screen.

Fig 2.1 4

CHAPTER 3 DESIGN METHEDOLOGY


MICRO CONTROLLERS:
The micro controller, nowadays, is an indispensable device for electrical/electronic engineers and also for technicians in the area, because of its versatility and its enormous application. .Born of parallel developments in computer

architecture and integrated circuit fabrication, the microprocessor or computer on chip first becomes a commercial reality in 1971.with the introduction of the 4 bit 4004 by a small, unknown company by the name of Intel corporation. Other, well established, semiconductor firms soon followed Intels pioneering technology so that by the late 1970s we could choose from a half dozen or so micro processor type. The 1970s also saw the growth of the number of personal computer users from a Handful of hobbyists and hackers to millions of business, industrial, governmental, defense, and educational and private users now enjoying the advantages of inexpensive computing. A bye product of microprocessor development was the micro controller. The same fabrication techniques and programming concepts that make possible general-purpose microprocessor also yielded the micro controller. Among the applications of a micro controller we can mention industrial automation, mobile telephones, radios, microwave ovens and VCRs. Besides, the present trend in digital electronics is toward restricting to micro controllers and chips that concentrate a great quantity of logical circuits, like PLDs (Programmable Logic Devices) and GALs (Gate Array Logic). In dedicated systems, the micro controller is the best solution, because it is cheap and easy to manage.

8051 Micro Controller:


Despite its relatively old age, the 8051 is one of the most popular micro controllers in use today. Many derivative micro controllers have since been developed that are based on--and compatible with--the 8051.

5 In this project we are going to develop radar kind of security system for border areas. The main thing in this project is to detect the persons or objects with in the area. To detect objects we used ultrasonic sensors which can be used within 3 meters of range. In real time we can go with high end sensors. Microcontroller IC AT89S52: Description of AT89S52:

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8Kbytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density non-volatile memory technology and is compatible with the industry-standard 80C51 instruction set and pin-out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional non-volatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is 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 interrupt or hardware reset.

BLOCKDIAGRAM:

PIN DIAGRAM:

Pin Description VCC: Supply voltage. GND: Ground. Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 can also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code

bytes during program verification. External pull-ups are required during program verification. Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the following table. Port Pin P1.0 P1.1 P1.5 P1.6 P1.7 Alternate Functions T2 (external count input to Timer/Counter 2), clock out T2EX (Timer/Counter 2 capture/reload trigger and direction control) MOSI (used for In-System Programming) MISO (used for In-System Programming) SCK (used for In-System Programming) Port 1 also receives the low-order address bytes during Flash programming and verification. Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX

@DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89S52, as shown in the following table. P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 RXD (serial input port) TXD ( serial output port) INT0 (external interrupt 0) INT1 (external interrupt 1) T0 (timer 0 external input) T1 (timer 1 external input) WR (external data memory write strobe) RD (external data memory read strobe)

Port 3 also receives some control signals for Flash programming and verification. RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 96 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8E) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled.

ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALEdisable bit has no effect if the microcontroller is in external execution mode. PSEN Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.

EA/VPP External Access Enable EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped

to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier. Special Function Registers A map of the on-chip memory area called the Special Function Register (SFR) space is shown in Table 1. Note that not all of the addresses are occupied, and unoccupied addresses may not be implemented on the chip. Read accesses to these addresses will in general return random data, and write accesses will have an indeterminate effect. User software should not write 1s to these unlisted locations, since they may be used in future products to invoke new features. In that case, the reset or inactive values of the new bits will always be 0. Timer 2 Registers Control and status bits are contained in registers T2CON and T2MOD for Timer 2. The register pair (RCAP2H, RCAP2L) is the Capture/Reload registers for Timer 2 in 16-bit capture mode or 16-bit autoreload mode.

Interrupt Registers The individual interrupt enable bits are in the IE register. Two priorities can be set for each of the six interrupt sources in the IP register.

Dual Data Pointer Registers To facilitate accessing both internal and external data memory, two banks of 16-bit Data Pointer Registers are provided: DP0 at SFR address locations 82H-83H and DP1 at 84H-85H. Bit DPS = 0 in SFR AUXR1 selects DP0 and DPS = 1 selects DP1. The user should always initialize the DPS bit to the appropriate value before accessing the respective Data Pointer Register. Power-off Flag The Power-off Flag (POF) is located at bit 4 (PCON.4) in the PCON SFR. POF is set to 1 during power up. It can be set and rest under software control and is not affected by reset. Memory Organization MCS-51 devices have a separate address space for Program and Data Memory. Up to 64K bytes each of external Program and Data Memory can be addressed. Program Memory If the EA pin is connected to GND, all program fetches are directed to external memory. On the AT89S52, if EA is connected to VCC, program fetches to addresses 0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H through FFFFH are to external memory. Data Memory The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. This means that the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space. When an instruction accesses an internal location above address 7FH, the address mode used in the

instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions which use direct addressing access of the SFR space. For example, the following direct addressing instruction accesses the SFR at location 0A0H (which is P2). (MOV 0A0H, #data) Instructions that use indirect addressing access the upper 128 bytes of RAM. For example, the following indirect addressing instruction, where R0 contains 0A0H, accesses the data byte at address 0A0H, rather than P2 (whose address is 0A0H). (MOV @R0, #data) Note that stack operations are examples of indirect addressing, so the upper 128 bytes of data RAM are available as stack space. Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can be configured for use as an on-chip oscillator, as shown in Figure 11. 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 12. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low-time specifications must be observed.

Ultrasonic sensor
Ultrasonic sensors (also known as tranceivers when they both send and receive) work on a principle similar to radar or sonar which evaluate attributes of a target by interpreting the echoes from radio or sound waves respectively. Ultrasonic sensors generate high frequency sound waves and

evaluate the echo which is received back by the sensor. Sensors calculate the time interval between sending the signal and receiving the echo to determine the distance to an object. This technology can be used for measuring: wind speed and direction (anemometer), fullness of a tank and speed through air or water. For measuring speed or direction a device uses multiple detectors and calculates the speed from the relative distances to particulates in the air or water. To measure the amount of liquid in a tank, the sensor measures the distance to the surface of the fluid. Further applications include: humidifiers, sonar, medical ultrasonography, burglar alarms and non-destructive testing. Systems typically use a transducer which generates sound waves in the ultrasonic range, above 20,000 hertz, by turning electrical energy into sound, then upon receiving the echo turn the sound waves into electrical energy which can be measured and displayed.
The technology is limited by the shapes of surfaces and the density or consistency of the material. For example foam on the surface of a fluid in a tank could distort a reading. An ultrasonic transducer is a device that converts energy into ultrasound, or sound waves above the normal range of human hearing. While technically a dog whistle is an ultrasonic transducer that converts mechanical energy in the form of air pressure into ultrasonic sound waves, the term is more apt to be used to refer to piezoelectric transducers that convert electrical energy into sound. Piezoelectric crystals have the property of changing size when a voltage is applied, thus applying an alternating current (AC) across them causes them to oscillate at very high frequencies, thus producing very high frequency sound waves. The location at which a transducer focuses the sound, can be determined by the active transducer area and shape, the ultrasound frequency and the sound velocity of the propagation medium. The example shows the sound fields of an unfocused and a focusing ultrasonic transducer in water.

Since piezoelectric crystals generate a voltage when force is applied to them, the same crystal can be used as an ultrasonic detector. Some systems use separate transmitter and receiver components while others combine both in a single piezoelectric transceiver. Alternative methods for creating and detecting ultrasound include magnetostriction and capacitive actuation. Medical ultrasonic transducers (probes) come in a variety of different shapes and sizes for use in making pictures of different parts of the body. The transducer may be passed over the surface of the body or inserted into a body opening such as the rectum or vagina. Clinicians who perform ultrasound-guided procedures often use a probe positioning system to hold the ultrasonic transducer. Ultrasonic sensors are used to detect the presence of targets and to measure the distance to targets in many automated factories and process plants. Sensors with an on or off digital output are 15 available for detecting the presence of objects, and sensors with an analog output which varies proportionally to the sensor to target separation distance are commercially available. Because ultrasonic sensors use sound rather than light for detection, they work in applications where photoelectric sensors may not. Ultrasonics are a great solution for clear object detection and for liquid level measurement, applications that photoelectrics struggle with because of target translucence. Target color and/or reflectivity don't affect ultrasonic sensors which can operate reliably in high-glare environments. Other types of transducers are used in commercially available ultrasonic cleaning devices. An ultrasonic transducer is affixed to a stainless steel pan which is filled with a solvent (frequently water or isopropanol) and a square wave is applied to it, imparting vibrational energy on the liquid.

Advantages of Ultrasonic Sensors:


When used for sensing functions, the ultrasonic method has unique advantages over conventional sensors: Discrete distances to moving objects can be detected and measured.

Less affected by target materials and surfaces, and not affected by color. Solidstate units have virtually unlimited, maintenance free life. Can detect small objects over long operating distances.

Resistance to external disturbances such as vibration, infrared radiation, ambient noise, and EMI radiation.

16

They are used in a wide range of applications including: computer monitors, television, instrument panels, aircraft cockpit displays, signal, etc. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones. LCDs have displaced cathode ray tube (CRT) displays in most applications. They are usually more compact, lightweight, portable, less expensive, more reliable, and easier on the eyes. They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they cannot suffer image burn-in. LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical power consumption enables it to be used in battery-powered electronic equipment. It is an electronically-modulated optical device made up of any number of pixels filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in colour or monochrome. The earliest discovery leading to the development of LCD technology, the discovery of liquid crystals, dates from 1888. By 2008, worldwide sales of televisions with LCD screens had surpassed the sale of CRT units.

Each pixel of an LCD typically consists of a layer of molecules aligned between two transparent electrodes, and two polarizing filters the axes of transmission of which are (in most of the cases) perpendicular to each other. With no actual liquid crystal between the polarizing filters, light passing through the first filter would be blocked by the second (crossed) polarizer. In most of the cases the liquid crystal has double refraction The surface of the electrodes that are in contact with the liquid crystal material are treated so as to align the liquid crystal molecules in a particular direction. This treatment typically consists of a thin polymer layer that is unidirectionally rubbed using, for example, a cloth. The direction of the liquid crystal alignment is then defined by the direction of rubbing. Electrodes are made of a transparent conductor called Indium Tin Oxide (ITO). Before applying an electric field, the orientation of the liquid crystal molecules is determined by the alignment at the surfaces of electrodes. In a twisted nomadic device (still the most common liquid crystal device), the surface alignment directions at the two electrodes are perpendicular to each other, and so the molecules arrange themselves in a helical structure, or twist. This reduces the rotation of the polarization of the incident light, and the device appears grey. If the applied voltage is large enough, the liquid crystal molecules in the center of the layer are almost completely untwisted and the polarization of the incident light is not rotated as it passes through the liquid crystal layer. This light will then be mainly polarized perpendicular to the second filter, and thus be blocked and the pixel will appear black. By controlling the voltage applied across the liquid crystal layer in each pixel, light can be allowed to pass through in varying amounts

thus constituting different levels of gray. This electric field also controls (reduces) the double refraction properties of the liquid crystal.

LCD with top polarizer removed from device and placed on top, such that the top and bottom polarizers are parallel. The optical effect of a twisted nematic device in the voltage-on state is far less dependent on variations in the device thickness than that in the voltageoff state. Because of this, these devices are usually operated between crossed polarizer such that they appear bright with no voltage (the eye is much more sensitive to variations in the dark state than the bright state). These devices can also be operated between parallel polarizer, in which case the bright and dark states are reversed. The voltage-off dark state in this configuration appears blotchy, however, because of small variations of thickness across the device. Both the liquid crystal material and the alignment layer material contain ionic compounds. If an electric field of one particular polarity is applied for a long period of time, this ionic material is attracted to the surfaces and degrades the device performance. This is avoided either by applying an alternating current or by reversing the polarity of the electric field as the device is addressed (the response of the liquid crystal layer is identical, regardless of the polarity of the applied field).

When a large number of pixels are needed in a display, it is not technically possible to drive each directly since then each pixel would require independent electrodes. Instead, the display is multiplexed. In a multiplexed display, electrodes on one side of the display are grouped and wired together (typically in columns), and each group gets its own voltage source. On the other side, the electrodes are also grouped (typically in rows), with each group getting a voltage sink. The groups are designed so each pixel has a unique, unshared combination of source and sink. The electronics, or the software driving the electronics then turns on sinks in sequence, and drives sources for the pixels of each sink.

Illumination
As LCD panels produce no light of their own, they require an external lighting mechanism to be easily visible. On most displays, this consists of a cold cathode fluorescent lamp that is situated behind the LCD panel. Passive-matrix displays are usually not backlit, but active-matrix displays almost always are, with a few exceptions such as the display in the original Game boy Advance. Recently, two types of LED backlit LCD displays have appeared in some televisions as an alternative to conventional backlit LCDs. In one scheme, the LEDs are used to backlight the entire LCD panel. In another scheme, a set of green red and blue LEDs is used to illuminate a small cluster of pixels, which can improve contrast and black level in some situations. For example, the LEDs in one section of the screen can be dimmed to produce a dark section of the image while the LEDs in another section are kept bright. Both schemes also allows for a slimmer panel than on conventional displays

Passive-matrix and active-matrix addressed LCDs

LCDs with a small number of segments, such as those used in digital watches and pocket calculators, have individual electrical contacts for each segment. An external dedicated circuit supplies an electric charge to control each segment. This display structure is unwieldy for more than a few display elements. Small monochrome displays such as those found in personal organizers, electronic weighing scales, older laptop screens, and the original Gameboy have a passive-matrix structure employing super-twisted nematic (STN) or double-layer STN (DSTN) technologythe latter of which addresses a colour-shifting problem with the formerand colour-STN (CSTN) wherein colour is added by using an internal filter. Each row or column of the display has a single electrical circuit. The pixels are addressed one at a time by row and column addresses. This type of display is called passivematrix addressed because the pixel must retain its state between refreshes without the benefit of a steady electrical charge. As the number of pixels (and, correspondingly, columns and rows) increases, this type of display becomes less feasible. Very slow response times and poor contrast are

typical of passive-matrix addressed LCDs. Colour passive-matrix displays exist, although they are limited to 16 colours. Monochrome passive-matrix LCDs was standard in most early laptops (although a few used plasma displays). The commercially unsuccessful Macintosh Portable (released in 1989) was one of the first to use an activematrix display (though still monochrome), but passive-matrix was the norm until the mid-1990s, when colour active-matrix became standard on all laptops. High-resolution colour displays such as modern LCD computer monitors and televisions use an active matrix structure. A matrix of thin-film transistors (TFTs) is added to the polarizing and colour filters. Each pixel has its own dedicated transistor, allowing each column line to access one pixel. When a row line is activated, all of the column lines are connected to a row of pixels and the correct voltage is driven onto all of the column lines. The row line is then deactivated and the next row line is activated. All of the row lines are activated in sequence during a refresh operation. Active-matrix addressed displays look "brighter" and "sharper" than passive-matrix addressed displays of the same size, and generally have quicker response

Active matrix technologies

A Casio 1.8 in colour TFT liquid crystal display which equips the Sony Cyber-shot DSC-P93A digital compact cameras Main articles: Thin film transistor liquid crystal display and Active-matrix liquid crystal display

Twisted nematic (TN) Twisted nematic displays contain liquid crystal elements which twist and untwist at varying degrees to allow light to pass through. When no voltage is applied to a TN liquid crystal cell, the light is polarized to pass through the cell. In proportion to the voltage applied, the LC cells twist up to 90 degrees changing the polarization and blocking the light's path. By properly adjusting the level of the voltage almost any grey level or transmission can be achieved. In-plane switching (IPS) In-plane switching is an LCD technology which aligns the liquid crystal cells in a horizontal direction. In this method, the electrical field is applied through each end of the crystal, but this requires two transistors for each pixel instead of the single transistor needed for a standard thin-film transistor

(TFT) display. Before LGEnhanced IPS was introduced in 2009, the additional transistors resulted in blocking more transmission area, thus requiring a brighter backlight, which consumed more power, and made this type of display less desirable for notebook computers. This newer, lower power technology can be found in the Apple iMac, iPad, and iPhone 4, as well as the Hewlett-Packard Elite Book 8740w. Currently Panasonic is using an enhanced version eIPS for their large size LCD-TV products. Advanced fringe field switching (AFFS) Known as fringe field switching (FFS) until 2003, advanced fringe field switching is a technology similar to IPS or S-IPS offering superior performance and colour gamut with high luminosity. AFFS is developed by HYDIS TECHNOLOGIES CO.,LTD, Korea (formally Hyundai Electronics, LCD Task Force). AFFS-applied notebook applications minimize colour distortion while maintaining its superior wide viewing angle for a professional display. Colour shift and deviation caused by light leakage is corrected by optimizing the white gamut which also enhances white/grey reproduction. In 2004, HYDIS TECHNOLOGIES CO., LTD licenses AFFS patent to Japan's Hitachi Displays. Hitachi is using AFFS to manufacture high end panels in their product line. In 2006, HYDIS also licenses AFFS to Sanyo Epson Imaging Devices Corporation. HYDIS introduced AFFS+ which improved outdoor readability in 2007. Vertical alignment (VA) Vertical alignment displays are a form of LCDs in which the liquid crystal material naturally exists in a vertical state removing the need for extra transistors (as in IPS). When no voltage is applied, the liquid crystal cell

remains perpendicular to the substrate creating a black display. When voltage is applied, the liquid crystal cells shift to a horizontal position, parallel to the substrate, allowing light to pass through and create a white display. VA liquid crystal displays provide some of the same advantages as IPS panels, particularly an improved viewing angle and improved black level. Blue Phase mode Blue Phase Mode LCD Blue phase LCDs do not require a liquid crystal top layer. Blue phase LCDs are relatively new to the market, and very expensive because of the low volume of production. They provide a higher refresh rate than normal LCDs, but normal LCDs are still cheaper to make and actually provide better colours and a sharper image]

Military use of LCD monitors


LCD monitors have been adopted by the United States of America military instead of CRT displays because they are smaller, lighter and more efficient, although monochrome plasma displays are also used, notably for their M1 Abrams tanks. For use with night vision imaging systems a US military LCD monitor must be compliant with MIL-L-3009 (formerly MIL-L85762A). These LCD monitors go through extensive certification so that they pass the standards for the military. These include MIL-STD-901D High Shock (Sea Vessels), MIL-STD-167B - Vibration (Sea Vessels), MILSTD-810F Field Environmental Conditions (Ground Vehicles and Systems), MIL-STD-461E/F Frequency EMI/RFI (Electromagnetic MIL-STD-740B Interference/Radio Interference),

Airborne/Structure borne Noise, and TEMPEST - Telecommunications Electronics Material Protected from Emanating Spurious Transmissions.

Quality control
Some LCD panels have defective transistors, causing permanently lit or unlit pixels which are commonly referred to as stuck pixels or dead pixels respectively. Unlike integrated circuits (ICs), LCD panels with a few defective transistors are usually still usable. It is claimed that it is economically prohibitive to discard a panel with just a few defective pixels because LCD panels are much larger than ICs, but this has never been proven. Manufacturers' policies for the acceptable number of defective pixels vary greatly. At one point, Samsung held a zero-tolerance policy for LCD monitors sold in Korea. Currently, though, Samsung adheres to the less restrictive ISO 13406-2 standard other companies have been known to tolerate as many as 11 dead pixels in their policies. Dead pixel policies are often hotly debated between manufacturers and customers. To regulate the acceptability of defects and to protect the end user, ISO released the ISO 13406-2 standard. However, not every LCD manufacturer conforms to the ISO standard and the ISO standard is quite often interpreted in different ways. LCD panels are more likely to have defects than most ICs due to their larger size. For example, a 300 mm SVGA LCD has 8 defects and a 150 mm wafer has only 3 defects. However, 134 of the 137 dies on the wafer will be acceptable, whereas rejection of the LCD panel would be a 0% yield. Due to competition between manufacturers quality control has been improved. An SVGA LCD panel with 4 defective pixels is usually considered defective and customers can request an exchange for a new one. Some manufacturers, notably in South Korea where some of the largest LCD panel manufacturers,

such as LG, are located, now have "zero defective pixel guarantees", which is an extra screening process which can then determine "A" and "B" grade panels. Many manufacturers would replace a product even with one defective pixel. Even where such guarantees do not exist, the location of defective pixels is important. A display with only a few defective pixels may be unacceptable if the defective pixels are near each other. Manufacturers may also relax their replacement criteria when defective pixels are in the center of the viewing area.

LCD panels also have defects known as clouding (or less commonly mura), which describes the uneven patches of changes in luminance. It is most visible in dark or black areas of displayed scenes.

The most commonly used Character based LCDs are based on Hitachi's HD44780 controller or other which are compatible with HD44580. In this tutorial, we will discuss about character based LCDs, their interfacing with various microcontrollers, various interfaces (8-bit/4-bit), programming, special stuff and tricks you can do with these simple looking LCDs which can give a new look to your application. Pin Description The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4 Line LCDs which have only 1 controller and support at most of 80 characters, whereas LCDs supporting more than 80 characters make use of 2 HD44780 controllers.

Pin No. Name Description Pin no. 1 VSS Power supply (GND) Pin no. 2 VCC Power supply (+5V) Pin no. 3 VEE Contrast adjust Pin no. 4 RS 0 = Instruction input 1 = Data input Pin no. 5 R/W 0 = Write to LCD module 1 = Read from LCD module Pin no. 6 EN Enable signal Pin no. 7 D0 Data bus line 0 (LSB) Pin no. 8 D1 Data bus line

1 Pin no. 9 D2Data bus line 2 Pin no. 10 D3 Data bus line 3 Pin no. 11 D4 Data bus line 4 Pin no. 12 D5 Data bus line 5 Pin no. 13 D6 Data bus line 6 Pin no. 14 D7 Data bus line 7 (MSB)

DDRAM - Display Data RAM Display data RAM (DDRAM) stores display data represented in 8-bit character codes. Its extended capacity is 80 X 8 bits, or 80 characters. The area in display data RAM (DDRAM) that is not used for display can be used as general data RAM. So whatever you send on the DDRAM is actually displayed on the LCD. For LCDs like 1x16, only 16 characters are visible, so whatever you write after 16 chars is written in DDRAM but is not visible to the user. Figures below will show you the DDRAM addresses of 1 Line, 2 Line and 4 Line LCDs.

Figure 2: DDRAM Address for 1 Line LCD

Figure 3: DDRAM Address for 2 Line LCD

Figure 4: DDRAM Address for 4 Line LCD

CGROM - Character Generator ROM

Now you might be thinking that when you send an ascii value to DDRAM, how the character is displayed on LCD? so the answer is CGROM. The character generator ROM generates 5 x 8 dot or 5 x 10 dot character patterns from 8-bit character codes (see Figure 5 and Figure 6 for more details). It can generate 208 5 x 8 dot character patterns and 32 5 x 10 dot character patterns. User defined character patterns are also available by mask-programmed ROM.

Figure 5: LCD characters code map for 5x8 dots

Figure 6: LCD characters code map for 5x10 dots

As you can see in both the code maps, the character code from 0x00 to 0x07 is occupied by the CGRAM characters or the user defined characters. If user wants to display the fourth custom character then the code to display it is 0x03 i.e. when user sends 0x03 code to the LCD DDRAM then the fourth user created character or pattern will be displayed on the LCD.

CGRAM - Character Generator RAM As clear from the name, CGRAM area is used to create custom characters in LCD. In the character generator RAM, the user can rewrite character patterns by program. For 5 x 8 dots, eight character patterns can be written, and for 5 x 10 dots, four character patterns can be written. Later in this tutorial i will explain how to use CGRAM area to make custom character and also making animations to give nice effects to your application.

BF - Busy Flag Busy Flag is an status indicator flag for LCD. When we send a command or data to the LCD for processing, this flag is set (i.e. BF =1) and as soon as the instruction is executed successfully this flag is cleared (BF = 0). This is helpful in producing and exact amount of delay. For the LCD processing. To read Busy Flag, the condition RS = 0 and R/W = 1 must be met and The MSB of the LCD data bus (D7) act as busy flag. When BF = 1 means LCD is busy and will not accept next command or data and BF = 0 means LCD is ready for the next command or data to process.

Instruction Register (IR) and Data Register (DR)

There are two 8-bit registers in HD44780 controller Instruction and Data register. Instruction register corresponds to the register where you send commands to LCD e.g LCD shift command, LCD clear, LCD address etc. and Data register is used for storing data which is to be displayed on LCD. when send the enable signal of the LCD is asserted, the data on the pins is latched in to the data register and data is then moved automatically to the DDRAM and hence is displayed on the LCD. Data Register is not only used for sending data to DDRAM but also for CGRAM, the address where you want to send the data, is decided by the instruction you send to LCD. We will discuss more on LCD instruction set further in this tutorial.

only the instruction register (IR) and the data register (DR) of the LCD can be controlled by the MCU. Before starting the internal operation of the LCD, control information is temporarily stored into these registers to allow interfacing with various MCUs, which operate at different speeds, or various peripheral control devices. The internal operation of the LCD is determined by signals sent from the MCU. These signals, which include register selection signal (RS), read/write signal (R/W), and the data bus (DB0 to DB7), make up the LCD instructions (Table 3). There are four categories of instructions that: Designate LCD functions, such as display format, data length, etc. Set internal RAM addresses Perform data transfer with internal RAM Perform miscellaneous functions

33

Although looking at the table you can make your own commands and test them. Below is a breif list of useful commands which are used frequently while working on the LCD. No. Instruction Hex Decimal 1.Function Set: 8-bit, 1 Line, 5x7 Dots 0x3048 2. Function Set: 8-bit, 2 Line, 5x7 Dots 0x3856 3. Function Set: 4-bit, 1 Line, 5x7 Dots 0x2032 4.Function Set: 4-bit, 2 Line, 5x7 Dot 0x2840 5.Entry Mode 0x066 6. Display off Cursor off (clearing display without clearing DDRAM content) 0x088 7. Display on Cursor on 0x0E14 8 .Display on Cursor off 0x0C12 9. Display on Cursor blinking 0x0F15 10. Shift entire display left 0x1824

12. Shift entire display right 0x1C30 13 .Move cursor left by one character 0x10 16 14.Move cursor right by one character0x1420 15.Clear Display (also clear DDRAM content)0x011 16 .Set DDRAM address or courser position on display 0x80+add*128+add* 17. Set CGRAM address or set pointer to CGRAM location 0x40+add**64+add** * DDRAM address given in LCD basics section see Figure 2,3,4 ** CGRAM address from 0x00 to 0x3F, 0x00 to 0x07 for char1 and so on..

BUZZER: A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or electronic. Typical uses of buzzers and beepers include alarms, timers and confirmation of user input such as a mouse click or keystroke. Introductions A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or electronic. Typical uses of buzzers and beepers include alarms, timers and confirmation of user input such as a mouse click or keystroke. Electromechanical Early devices were based on an electromechanical system identical to an electric bell without the metal gong. Similarly, a relay may be

connected to interrupt its own actuating current, causing the contacts to buzz. Often these units were anchored to a wall or ceiling to use it as a sounding board. The word "buzzer" comes from the rasping noise that electromechanical buzzers made. Electronic A piezoelectric element may be driven by an oscillating electronic circuit or other audio signal source. Sounds commonly used to indicate that a button has been pressed are a click, a ring or a beep. Electronic buzzers find many applications in modern days

Piezoelectric Transducers The conversion of electrical pulses to mechanical vibrations and the conversion of returned mechanical vibrations back into electrical energy is the basis for ultrasonic testing. The active element is the heart of the transducer as it converts the electrical energy to acoustic energy, and vice versa. The active element is basically a piece of polarized material (i.e. some parts of the molecule are positively charged, while other parts of the

molecule are negatively charged) with electrodes attached to two of its opposite faces. When an electric field is applied across the material, the polarized molecules will align themselves with the electric field, resulting in induced dipoles within the molecular or crystal structure of the material. This alignment of molecules will cause the material to change dimensions. This phenomenon is known as electrostriction. In addition, a permanently-polarized material such as quartz (SiO2) or barium titan ate (BaTiO3) will produce an electric field when the material changes dimensions as a result of an imposed mechanical force. This phenomenon is known as the piezoelectric effect. Additional information on why certain materials produce this effect can be found in the linked presentation material, which was produced by the Valpey Fisher Corporation.

Applications
Annunciate panels

Electronic metronomes Game shows Microwave ovens and other household appliances Sporting events such as basketball games

KEIL Software: Keil development tools for the 8051 Microcontroller Architecture support every level of software developer from the professional applications engineer to the student just learning about embedded software development.

The industry-standard Keil C Compilers, Macro Assemblers, Debuggers, Real-time Kernels, Single-board Computers, and Emulators support all 8051 derivatives and help you get your projects completed on schedule.

When starting a new project, simply select the microcontroller you use from the Device Database and the Vision IDE sets all compiler, assembler, linker, and memory options for you. Numerous example programs are included to help you get started with the most popular embedded 8051 devices. The Keil Vision Debugger accurately simulates on-chip peripherals (IC, CAN, UART, SPI, Interrupts, I/O Ports, A/D Converter, D/A Converter, and PWM Modules) of your 8051 device. Simulation helps you understand hardware configurations and avoids time wasted on setup problems. Additionally, with simulation, you can write and test applications before target hardware is available. When you are ready to begin testing your software application with target hardware, use the MON51, MON390, MONADI, or FlashMON51 Target

Monitors, the ISD51 In-System Debugger, or the ULINK USB-JTAG Adapter to download and test program code on your target system.

The Vision4 IDE is a window-based software development platform that combines a robust and modern editor with a project manager and make facility tool. It integrates all the tools needed to develop embedded applications including C/C++ compiler, macro assembler, linker/locator, and a HEX file generator. Vision4 helps expedite the development process of embedded applications by providing the following:

39 Full-featured source code editor.


Device Database for configuring the development tool.

Project Manager for creating and maintaining your projects. Integrated Make Utility functionality for assembling, compiling, and linking your embedded applications. Dialogs for all development environment settings. True integrated source-level and assembler-level Debugger with highspeed CPU and peripheral Simulator.
Advanced GDI interface for software debugging on target hardware

and for connecting to a Keil ULINK Debug Adapter. Flash programming utility for downloading the application program into Flash ROM. Links to manuals, on-line help, device datasheets, and user guides.

Vision4 offers numerous features and advantages that help the programmer to develop embedded applications quickly and successfully. The Keil tools are easy to use, and are guaranteed to help you achieve your design goals in a timely manner. The Vision4 IDE & Debugger is the central part of the Keil development tool chain. Vision4 offers a Build Mode and a Debug Mode. In Build Mode you maintain the project, the project files, write your code, select the target hardware and device, and generate the application. In Debug Mode you verify and debug your program with the integrated, powerful Simulator or directly on target hardware with the Keil ULINK family of Debug Adapters (or other AGDI drivers), or analyze the application behavior. The Keil ULINK Adapters allow you to download your application into Flash ROM of your target system.

Vision4 provides a menu for selecting commands and a toolbar with command buttons. You can split, tile, hide, open, and move windows even to another physical screen. The last used window layout is saved for each project individually and will be restored the next time the project is used. Vision4 has two operating modes Build Mode and Debug Mode. In both modes you can make changes to the source code. In addition to the menus, commands, and windows presented in the User Interface, the Debug Mode offers these Windows and Dialogs. The following picture shows some of the key Vision4 windows in Debug Mode.

When you use the Keil Vision4, the project development cycle is roughly the same as it is for any other software development project. Create a project, select the target chip from the device database, and configure the tool settings. Create source files in C/C++ or assembly. Build your application with the project manager. Correct errors in source files. Test the linked application. The following block diagram illustrates the complete Vision4 software development cycle. Each component is described below.

Vision4 IDE The Vision4 IDE integrates a project manager, a rich-featured editor with interactive error correction, with option setup, make utility, and on-line help dialogs. Use Vision4 to create your source files and organize them into a project that defines your target application. Vision4 automatically compiles, assembles, and links your embedded application and provides a single focal point for your development efforts. C/C++ Compiler & Macro Assembler Source files are created by the Vision4 IDE and are passed to the C or C++ Compiler or Macro Assembler. The compiler and assembler process source files and create relocatable object files.

Library Manager:
The library manager allows you to create object library from the object files created by the compiler and assembler. Libraries are specially formatted ordered program collections of object modules that may be used by the linker at a later time. When the linker processes a library, only those object modules in the library that are necessary to create the program are used. Linker/Locator The Linker/Locator creates an executable program file using the object modules extracted from libraries and those created by the compiler and assembler. An executable program file (also called absolute object module) contains no relocatable code or data. All code and data reside at fixed memory locations. This executable program file can be used: To program an Flash ROM or other memory devices, With the Vision4 Debugger for simulation and target debugging, With an in-circuit emulator for the program testing.

Vision4 Debugger:
The Vision4 symbolic, source-level debugger is ideally suited for fast, reliable program debugging. The debugger includes a high-speed simulator that lets you simulate an microcontroller system, including on-chip peripherals, and external hardware. The attributes of the chip you use are automatically configured when you select the device from the Device Database. The Vision4 Debugger provides several ways to test your programs on real target hardware.

Use the Keil ULINK USB-JTAG adapter for Flash downloading and software testing your program via a on-chip debugging system, like the Embedded ICE macro cell that is integrated in many ARM devices. With the Keil AGDI interface, you can connect the Vision4 Debugger front end to your target system, and use other debuggers like Monitor, In-System Debugger, or Emulator 43

Light-emitting diode:
A light-emitting diode is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet and infrared wavelengths, with very high brightness. When a light-emitting diode is forward biased (switched on), electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. An LED is often small in area (less than 1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved robustness, smaller size, faster switching, and greater durability and reliability. LEDs powerful enough for room lighting are relatively expensive and require more precise current and heat management than compact fluorescent lamp sources of comparable output. Light-emitting diodes are used in applications as diverse as replacements for aviation lighting, automotive lighting (particularly brake lamps, turn signals and indicators) as well as in traffic signals. The compact size, the possibility of narrow bandwidth, switching speed, and extreme reliability of LEDs has allowed new text and video displays and sensors to be developed, while their high switching rates are also useful in advanced communications technology. Infrared LEDs are also used in the remote control units of many commercial products including televisions, DVD players, and other domestic appliances.

The LED consists of a chip of semi conducting material doped with impurities to create a p-n junction. As in other diodes, current flows easily from the p-side, or anode, to the nside, or cathode, but not in the reverse direction. Charge-carrierselectrons and holes 44 flow into the junction from electrodes with different voltages. When an electron meets a hole, it falls into a lower energy level, and releases energy in the form of a photon. The wavelength of the light emitted, and thus its color depends on the band gap energy of the materials forming the p-n junction. In silicon or germanium diodes, the electrons and holes recombine by a non- radiative transition which produces no optical emission, because these are indirect band gap materials. The materials used for the LED have a direct band gap with energies corresponding to near-infrared, visible or near-ultraviolet light. LED development began with infrared and red devices made with gallium arsenide. Advances in materials science have enabled making devices with ever-shorter wavelengths, emitting light in a variety of colors. LEDs are usually built on an n-type substrate, with an electrode attached to the p-type layer deposited on its surface. P-type substrates, while less common, occur as well. Many commercial LEDs, especially GaN/InGaN, also use sapphire substrate. Most materials used for LED production have very high refractive indices. This means that much light will be reflected back into the material at the material/air surface interface. Thus, light extraction in LEDs is an important aspect of LED production, subject to much research and development.

FIG 3.11 45

Power Supply: A Rectifier is an electrical device that converts alternating current (AC), which periodically reverses direction, to direct current (DC), current that flows in only one direction, a process known as rectification. Rectifiers have many uses including as components of power supplies and as detectors of radio signals. Rectifiers may be made of solid state diodes, vacuum tube diodes, mercury arc valves, and other components.

A device which performs the opposite function (converting DC to AC) is known as an inverter. When only one diode is used to rectify AC (by blocking the negative or positive portion of the waveform), the difference between the term diode and the term rectifier is merely one of usage, i.e., the term rectifier describes a diode that is being used to convert AC to DC. Almost all rectifiers comprise a number of diodes in a specific arrangement for more efficiently converting AC to DC than is possible with only one diode. Before the development of silicon semiconductor rectifiers, vacuum tube diodes and copper (I) oxide or selenium rectifier stacks were used. Early radio receivers, called crystal radios, used a "cat's whisker" of fine wire pressing on a crystal of galena (lead sulfide) to serve as a point-contact rectifier or "crystal detector". Rectification may occasionally serve in roles other than to generate D.C. current per se. For example, in gas heating systems flame rectification is used to detect presence of flame. Two metal electrodes in the outer layer of the flame provide a current path, and rectification of an applied alternating voltage will happen in the plasma, but only while the flame is present to generate it.

Half-wave rectification

In half wave rectification, either the positive or negative half of the AC wave is passed, while the other half is blocked. Because only one half of the input

waveform reaches the output, it is very inefficient if used for power transfer. Half-wave rectification can be achieved with a single diode in a one-phase supply, or with three diodes in a three-phase supply

Full-wave rectification A full-wave rectifier converts the whole of the input waveform to one of constant polarity (positive or negative) at its output. Full-wave rectification converts both polarities of the input waveform to DC (direct current), and is more efficient. However, in a circuit with a non-center tapped transformer, four diodes are required instead of the one needed for half-wave rectification. (See semiconductors, diode). Four diodes arranged this way are called a diode bridge or bridge rectifier

Circuit diagram

This circuit is a small +5V power supply. The circuit will provide a regulated voltage to the external circuit which may also I am required in any part of the external circuit or the whole external circuit. The best part is that you can also use it to convert AC voltage to DC and then regulate it ,simply You need a transformer to make the AC main drop down to a safe value i.e. 12-15 volts and then us a rectifier to convert AC into DC. 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 overboard. 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 chip code tells the output voltage. Remember that the input voltage must be at least 3V greater than regulator output voltage to otherwise the regulator does not work well.

Pin diagram for 7805

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

Das könnte Ihnen auch gefallen