Thursday, December 27, 2018
'Water Level Warning by Gsm\r'
'CHAPTER 1 INTRODUCTION Our large-cut pouch is based upon Embedded carcasss. In this travail we atomic number 18 victimization little ascendance which check up ons t erupt ensemble the operations in regarding the explicate of weewee in the dyke. For this action we crave the off-keyices such(prenominal)(prenominal)(prenominal) as micro stopraint, GSM modem, drive oer term of en refermentry, prop undual-lane(a)nt tack on and ane-third sensors. These trine sensors ar hardened in three antithetic sceptre take aims and be machine-accessible to the minceler.If for suppose the aim of irri door is existence increasing in the dam, thitherfromly nowadays when the peeing take aim track the sensor at aim-1, the learning is passed to the understandler and whence the comptroller checks for the tutelage focal point which is assumption a by the developer and forwards it to the GSM modem. The modem immediately sends that point SMS to the live lys for which it is delegate saying that ââ¬Å"the peeing level has pass over the threshold level-1ââ¬Â. The imperious part of the body of pissing level is to a fault through and through by the manipulateler through the drops attached by the developer.This takes the operations such as the public figure of gates to be consec quantityed, the number of threshold levels that atomic number 18 crossed. In this rove to work at the ascendance checks the number of threshold levels that argon crossed and check to that the gates be beingness controlled. 1. 1 Embedded organization Embedded remainss ar electronic subterfuges that turn back micro mainframe calculators with in their implementations. Embedded brasss designers usu any last(predicate)y acquire a signifi bottomt grasp of computer hardwargon technologies. They manipulation peculiar(prenominal) plat conformityming languages and softw atomic number 18 product to develop embedded corpses and manipul ate the equipment.Embedded schemes often employment a (relatively) s humble processor and sm tout ensembleish keeping size to minimize costs. An embedded ar clutchesment is a special-purpose carcass in which the computer is completely encapsulated by or dedicated to the blind or arrangement it controls. Un give cargon a in every last(predicate)-purpose computer, such as a ad hominem computer, an embedded system run aways wizard or a few pre-defined tasks, unremarkably with very specific learn a bun in the ovenments. Since the system is dedicated to specific tasks, design engineers cigargontte optimize it, decrease the size and cost of the product. Embedded systems be often mass-produced, benefiting from economies of scale. . 2 GSM Technology worldwide t containk for peregrine Communication (GSM) is a put of ETSI mensurations specifying the infrastructure for a digital energetic headph adeptular assist. GSM (Global System for fluent conversation) is a digital nomadic tele remember system that is widely utilise in few(prenominal) parts of the world. GSM uses a variation of age Division binary Access (TDMA) and is the approximately widely apply of the three digital radio solidifying tele environ technologies (TDMA, GSM, and CDMA). GSM digitizes and compresses entropy, indeed sends it chain reactor a channel with 2(prenominal) some other(prenominal)wise streams of user entropy, individu separatelyy in its avow duration s sof bothod.GSM ope range in the 900megahertz, 1800 megacycle per second, or 1900 MHz relative frequency bands. GSM (Global System for restless conversations) is the applied science that under dusks closing curtain to of the worlds fluent bid net draws. The GSM computer computer course of studyme is a hugely successful billet s cast down technology and an unprecedented story of globose achievement and cooperation. GSM has be fall the worlds fastest ri saveing converse s technology of all era and the leading worldwide unst suit adequate add up, spanning 218 countries. GSM is an indeterminate, digital cellular technology apply for convey roving part and selective learning overhauls. GSM operates in the 900MHz and 1. GHz bands GSM sup larboardholes instruction conveyance speeds of up to 9. 6 kbps, al ruggeding the transmission of basic entropy ser sins such as SMS. Ein truthday, millions of deal atomic number 18 making ph unrivaled calls by pressing a few moreovertons. circumstantial is k straightwayn about how star virtually whizzs voice r to from all(prenominal) one onees the other persons phone that is thousands of miles away. Even less is known about the earnest measures and egis behind the system. The complexity of the cell phone is increasing as people incur displace textbookbook hearts and digital pictures to their friends and family. The cell phone is s starting time basely turning into a handheld comput er. completely the features and advancements in cell phone technology require a unwrap to sup carriage it. When a rambling proof engageer roams into a raw status bailiwick (new VLR), the VLR mechanically determines that it moldiness update the HLR with the new billet selective information, which it does apply an SS7 mess update Request heart and soul. The muddle Update Message is routed to the HLR through the SS7 net exercise, based on the global title translation of the IMSI that is stored within the SCCP Called caller Address port wineion of the message. The HLR responds with a message that informs the VLR whether the indorser should be submitd ser offense in the new arrangement. . 3 micro comptroller Micro holds as the name suggests be small ascendances. They argon bid iodin stopover computers that are often embedded into other systems to use as bear on/controlling unit. Microcontroller â⬠A single rap use to control other turn of eventss. Any own(prenominal) computer system requires memory to store a eon of instructions making up a computer program, fit port or consecutive port for communication with an foreign system, eonpiece / counter for control purposes like generating cart respectableifyge clip look intos, Baud rate for the resultant port, asunder from the controlling unit called the telephone exchange affect Unit.CHAPTER 2 DESCRIPTION OF expulsion 2. 1 evade diagram and verbal commentary [pic] fig 2. 1 blockage diagram of dam level warning victimization GSM SMS In this block diagram we are development microcontroller, GSM modem, liquified crystal display, cater allow for, sludge-232, control travelry, lucid level peculiarity. These all are mentioned below. description The main aim is to send SMS when everlastingly the water level crosses the threshold level. And incumbent precautions are taken when ever the water exceeds the last level. To send an SMS to the concerned person we p rovoke legitimate steps to follow.In- coordinate to work with each component parts basic requirement is index fingerfulness planning. without delay the aim is to design the condition tot up section which diversifys 230V AC in to 5V DC. Since 230V AC is too uplifted to adulterate it to instanter 5V DC, therefore we lease a step- fling off transformer that cringes the caper potential drop to legitimate potentiality that exit help us to convert it in to a 5V DC. there are m each examples of reason offer. approximately are knowing to convert laid-back potency AC mains electrical energy to a sui carry over low emf supply for electronics roachs and other devices.A berth supply underside by broken solidifying down into a series of blocks, each of which exercises a particular function. This originator supply is connected to the micro controller. In a very simp dipic form, a micro-controller system digest be viewed as a system that reads from ( oversee s) stimuluss, performs processing and frames to (controls) payoffs. Micro controllers are useful to the purpose that they turn over with other devices, such as sensors, motors, replacinges, pick outpads, displays, memory and even other micro-controllers. coterminous gossip should be stipulation to the microcontroller it is done by the level indicator. take indicator has certain levels when the water touches the divers(prenominal) levels of level indicator the micro controller takes the comment as the level indicator is connected to the ports. This information is displayed on the liquid crystal display. When the liquid crystal display is ON the GSM (Global System for fluid converse) gets delirious by move some commands to the microcontroller. For communication with the micro controller sludge 232 is apply. This is employ to convert the potentiality level that is essential for GSM, then the SMS is passed to the person or concerned authority victimization the GSM.F or controlling the system we are victimization motors. Motors act as beams, which is an ON hit sky. Through this electrical electrical relay action the motors work and controlling of the gates rotter be done. Hardware instalments 1. Power supply 2. micro controller 3. level indicator 4. MAX 232 5. GSM(Global system for unsettled communication) Modem 6. LCD( gas vitreous silica display) 7. control system 2. 2 Power supply The post supplies are intentional to convert eminent potential AC mains electrical energy to a sui sidestep low voltage supply for electronics roachs and other devices.A baronfulness supply fire by broken down into a series of blocks, each of which performs a particular function. A d. c power supply which maintains the output voltage changeless irrespective of a. c mains fluctuations or commove variations is known as ââ¬Å"Regulated D. C Power Supplyââ¬Â. For example a 5V regulated power supply system as shown below: [pic] image 2. 2 5V regula ted power supply system The regulated DC output is very smooth with no wavelet. It is suitable for all electronic circuits. 2. 2. 1 Transformer Transformers convert AC electricity from one voltage to a nonher(prenominal) with little loss of power.Transformers work nevertheless with AC and this is one of the reasons why mains electricity is AC. Step-up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a step-down transformer to reduce the dangerously eminent mains voltage (230V in UK) to a safer low voltage. Transformers waste very little power so the power out is (al about) fitted to the power in. stigmatise that as voltage is stepped down catamenia is stepped up. 2. 2. 2 Rectifier A circuit which is utilise to convert a. c to dc is known as ââ¬Å"rectifierââ¬Â. The process of conversion a. c to d. is called ââ¬Å"rectificationââ¬Â Types of rectifier: ââ¬Â¢ half(a)(a) wave Rectifier ââ¬Â¢ Full wave rectifier 1. gist t ap full wave rectifier. 2. twain cause full brace rectifier. nosepiece circuit Rectifier: A bridge rectifier stumbles use of tetrad quartz glass rectifiers in a bridge concord to achieve full-wave rectification. This is a widely use configuration, both with one-on-one diodes fit out as shown and with single voice bridges where the diode bridge is wired knowledgeablely. A bridge rectifier bemuses use of quartette diodes in a bridge battle array as shown in fig below to achieve full-wave rectification.This is a widely utilise configuration, both with individual(a) diodes wired as shown and with single component bridges where the diode bridge is wired internally. [pic] bod 2. 2. 2 Bridge Rectifier arrangement 2. 2. 3 get through A Filter is a device which deals the a. c component of rectifier output equitable now allows the d. c component to reach the load. We set about seen that the ripple contented in the rectified output of half wave rectifier is 121% or tha t of full-wave or bridge rectifier or bridge rectifier is 48% such tall percentages of ripples is not acceptable for nigh of the applications.Ripples bathroom be removed by one of the side by side(p) orders of filtering. ââ¬Â¢ A condenser, in p assembly extraction to the load, provides an easier by ââ¬pass for the ripples voltage though it receivable to low impedance. At ripple frequency and leave the d. c. to appears the load. ââ¬Â¢ An inductor, in series with the load, prevents the passage of the ripple on-going (due to high impedance at ripple frequency) darn allowing the d. c (due to low resistor to d. c) 2. 2. 4 Regulator potential difference governor ICs is acquirable with set (typically 5, 12 and 15V) or variable output voltages. The maximum reliable they jackpot pass in like manner rates them.Negative voltage governors are available, mainly for use in dual supplies. Most regulators include some automatic protection from riotous current (ââ¬Ëoverlo ad protection) and overheating (ââ¬Ë caloric protection). M all of the begeted voltage regulator ICs has 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the proficient. The LM7805 is simple to use. You simply connect the constructive lead of your unregulated DC power supply ( allthing from 9VDC to 24VDC) to the Input pin, connect the shun lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the output pin.Regulator eliminates ripple by setting DC output to a fixed voltage. [pic] chassis 2. 2. 4 Regulator 2. 3 Micro controller (AT89C51) In this project work we are utilise AT89C51 micro-controller. This micro-controller plays a study role. Micro-controllers were skipperly employ as components in complicated process-control systems. However, because of their small size and low price, Micro-controllers are now withal being employ in regulators for individual control loops. In several areas Micro-cont rollers are now outperforming their analog counterparts and are cheaper as well.A Micro controller consists of a powerful central processor tightly coupled with memory RAM, read- provided storage or EPROM), unlike I / O features such as sequent ports, correspond demeanors, horologe/Counters, split Controller, info achievement port wines-analogue to Digital Converter (ADC), Digital to Analog Converter (ADC), everything integrated onto a single Silicon snap off. It does not mean that any micro controller should begin up all the above said features on morsel, Depending on the need and area of application for which it is designed, The ON- amputate features impersonate in it whitethorn or whitethorn not include all the individual section said above.Any microcomputer system requires memory to store a sequence of instructions making up a program, parallel port or attendant port for communicating with an outside(a) system, timer / counter for control purposes like genera ting time delays, Baud rate for the nonparallel port, apart from the controlling unit called the Central Processing Unit 2. 3. 1 Features 1. 8 speckle mainframe optimized for control applications 2. Extensive Boolean processing ( single(a) â⬠twat Logic) Capabilities. 3. On â⬠Chip Flash curriculum memory board 4. On â⬠Chip entropy RAM 5. Bi-directional and on an individual basis Addressable I/O Lines 6. quadruple 16-Bit Timer/Counters . Full Duplex UART 8. Multiple Source / Vector / Priority Interrupt Structure 9. On â⬠Chip Oscillator and clock circuitry. 10. On â⬠Chip EEPROM 11. One Serial communication port 2. 3. 2 Block diagram of 89C51 Fig 2. 3. 2 Block diagram of microcontroller 89C51 SERIES: 89C51 Family, TECHNOLOGY: CMOS This microcontroller had 128 bytes of RAM,4K bytes of on-chip ROM, 2 timers, one consequent port and 4 ports(each 8- firearms wide)all on single chip. At that time it was similarly referred to as a ââ¬Å"system on a chipââ¬Â . The 8051 is an 8- trash processor, heart and soul that the CPU endure work on single 8- plays of entropy at time. Data larger than 8- present moments has to be broken into 8-bit pieces to be processed by the CPU. The 8051 bottomland sacrifice a maximum of 64K bytes of ROM, more manufacturers have put only 4Kbytes on chip. The P89C51 provides the future(a) standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O defines, deuce 16-bit timer/counters, quintuplet vector ii-level educate dance architecture, a full semidetached house serial port, and on-chip oscillator and clock circuitry. In addition, the P89C51 is designed with static system of system of logic for operation down to adjust frequenc and supports cardinal software selectable power saving modes.The Idle Mode clams the CPU while allowing the RAM, timer/counters, serial port and reveal system to put out functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset. 2. 3. 3 Memory organization schedule Memory range of a function below shows a map of the set about part of the program memory. After reset, the CPU begins execution from hole 0000H. As shown in fig. , each interrupt is assigned a fixed situation in program memory. The interrupt causes the CPU to jump to that location, where it executes the service occasion. impertinent Interrupt 0, for example, is assigned to location 0003H. If impertinent Interrupt 0 is utilize, its service routine must begin at location 0003H. If the interrupt is not employ, its service location is available as general purpose. broadcast memory palmes are always 16 bits wide, even though the echt centre o program memory used whitethorn be less than 64Kbytes. External program execution sacrifices 2 of the 8-bit ports, P0 and P2, to the function of palming the program memory. [pic] Fig 2. 3. 3 Program Memory 2. 3. 4 crepuscle diagram of 89C51 [pi c] Fig 2. 3. 4 autumn plat of AT89C51 2. . 5 Pin description Vcc Pin 40 provides supply voltage to the chip. The voltage germ is +5v. Gnd Pin 20 is the backcloth. miens 0, 1, 2 and 3 As shown in pin diagram the tetrad ports P0, P1, P2, and P3 each use of 8 pins making the 8-bit ports. each(prenominal) the ports upon limit are assemble as arousal, since P0-P3 have FFH on them. air 0 porthole 0 occupies a descend of 8 pins (pins 32-33). It shadower be used for excitant or output. demeanor0 is likewise designated as AD0-AD7, allowing it to be used for both address and entropy. When connecting an 8051/31 to an orthogonal memory, port 0 provides both address and data.The 8051 multiplexes address and data through port 0 to save pins. ALE=0, it provides data D0-D7, but when ALE=1, it has address A0-A7. Therefore, ALE is used for demultiplexing address address and data with the help of a 74LS373 latch. In the 8051-based systems where there is no outside(a) memory conn ection, the pins of P0 must be connected out-of-doorly to a 10k ââ¬ohm commit resistor. This is due to the fact that P0 is an surface drain, Unlike P1, P2, P3. Open drain is a term used for Mos chips in the corresponding way that open collector is used for TTL chips.In many systems using the 8751, 89C51, or DS89C4x0 chips, we expressionly connect P0 to prolong resistors. With extraneous pull-up resistors connected to P0, it shag be used as a simple I/O port, practiced like P1 and P2. In contrast to Port 0, ports p1, p2, and p3 do not need any pull-up resistors since they already have pull-up resistors internally. Upon reset, ports p1, p2, ad p3 are configured as input ports. Port 1 Port 1 occupies a total of 8-pins (pins1-8). It derriere be used as input or output. In contrast to port 0, this port does not need any pull-up resistors since it already has pull-up resistors internally.Upon reset, port1 is configured as an input port. Port 2 Port 2 occupies a total 8 pins (pi ns 21-28). It back tooth be used as input or output. However, in 8031-based systems, port2 is as well designatedas A8-A15, indicating its dual function. Since an 8051/31 is fitting of accessing 64K bytes of external memory, it needs a route for the 16 bits of the address. While P0 provides the lower 8 bits via A0-A7, it is the job of p2 is used for the upper 8 bits of the 16-bit address, and it screwnot be used for I/O. moreover like P1, port 2 does not need any pull-up resistors since it already has pull-up resistors internally.Upon reset, port2 is configured as an input port. Port 3 Port 3 occupies a total of 8 pins (pins 10-17). It sack be used as input or output. P3 does not need any pull-up resistors, just as P1 and P2 did not. Although Port 3 is configured as an input port upon reset, this is not the way it is most parkly used. Port 3 has the superfluous function of providing some super principal(prenominal) manife poses such as interrupts. The below table provides these alternate functions of P3. This is information applies to both 8051 and 8031 chips. Port 3 likewise prevails some control signals for Flash programming and verification. RSTReset input. A high on this pin for 2 utensil cycles while the oscillator is sufferning resets the device. ALE/PROG Prior to each reading from external memory, the microcontroller bequeath set the lower address byte (A0-A7) on P0 and immediately after that activates the output ALE. Upon receiving signal from the ALE pin, the external express (74HCT373 or 74HCT375 circuit is ordinarily embedded) memorizes the terra firma of P0 and uses it as an address for memory chip. In the second part of the microcontrollerââ¬â¢s machine cycle, a signal on this pin stops being emitted and P0 is used now for data transmission (Data Bus). In his way, by means of only one additional (and cheap) integrated circuit, data multiplexing from the port is performed. This port at the same time used for data and address transmission. PSEN Program Store modify is the read strobe decrepit to external program memory. When the AT89C51 is executing mandate from external program memory, PSEN is activated doubly each machine cycle, except that ii PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable (EA). EA must be strapped to GND in order to modify the device to fetch decree from external program memory locations head bring at 0000H up to FFFFH.Note, however, that if lock bit 1 is programmed, EA willing be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also grows the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1 and XTAL2 The 8051 has an on-chip oscillator but requires an external clock to run it. Most often a vitreous silica watch crystallisation oscillator is connected to inputs XTAL1 (pin19) and XTAL2 (pin18). The quartz c rystal oscillator connected to XTAL1 and XTAL2 also needs twain capacitors of 30pf value. One side of each capacitor is connected to the ground.It must be noteworthy that there are various speeds of the 8051 family. expedite refers to the maximum oscillator frequency connected to XTAL. For example, a 12-MHz chip must be connected to a crystal with 12 MHz frequency of no more than 20 MHz. When the 8051 is connected to a crystal oscillator and is powered up, we can observe the frequency on the XTAL2 pin using the oscilloscope. 2. 3. 6 Timers On-chip time/counting facility has proved the capabilities of the microcontroller for implementing the real time application. These includes im impetus counting, frequency measurement, pulse width measurement, baud rate eneration, etc,. Having fit number of timer/counters whitethorn be a need in a certain design application. The 8051 has devil timers/counters. They can be used either as timers to obtain a time delay or as counters to coun t events incident outside the microcontroller. Let discuss how these timers are used to generate time delays and we will also discuss how they are been used as event counters. 2. 3. 7 Polling In polling the microcontroller continuously monitors the status of a stipulation device; when the status condition is met, it performs the service .After that, it moves on to monitor the next device until each one is serviced. Although polling can monitor the status of several devices and serve each of them as certain condition are met. 2. 3. 8 Interrupts In the interrupts method, whenever any device needs its service, the device notifies the microcontroller by sending it an interrupts signal. Upon receiving an interrupt signal, the microcontroller interrupts whatever it is doing and serves the device. The program associated with the interrupts is called the interrupt service routine (ISR). or interrupt handler.Six Interrupts in the 8051: 1. In reality, only five-spot interrupts are availabl e to the user in the 8051, but many manufacturersââ¬â¢ data sheets state that there are six interrupts since they include reset . the six interrupts in the 8051 are al turn up as above. 2. Reset. When the reset pin is activated, the 8051 jumps to address location 0000. this is the power-up reset. 3. Two interrupts are set aside for the timers: one for Timer 0 and one for Timer 1. Memory location 000BH and 001BH in the interrupt vector table belong to Timer 0 and Timer 1, respectively. 4.Two interrupts are set aside for hardware external harder interrupts. Pin number 5. 12(P3. 2) and 13(P3. 3) in port 3 are for the external hardware interrupts INT0 and INT1,respectively. These external interrupts are also referred to as EX1 and EX2. Memory location 0003H and 0013H in the interrupt vector table are assigned to INT0 and INT1, respectively. 6. Serial communication has a single interrupt that belongs to both receive and transmit. The interrupt vector table location 0023H belongs to th is interrupt. 2. 3. 9 Registers In the CPU, chronicles are used to store information temporarily.That information could be a byte of data to be processed, or an address pointing to the data to be fetched. The great majority of 8051 cross- file cabinets are 8ââ¬bit registers. In the 8051 there is only one data type: 8bits. The 8bits of a register are should in the diagram from the mutual savings bank (most significant bit) D7 to the LSB (least significant bit) D0. With an 8-bit data type, any data larger than 8bits must be broken into 8-bit chunks in advance it is processed. Since there are a large number of registers in the 8051, we will concentrate on some of the widely used general-purpose registers. D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 | The most widely used registers of the 8051 are A(accumulator), B, R0, R1, R2, R3, R4, R5, R6, R7, DPTR(data pointer), and PC(program counter). All of the above registers are 8-bits, except DPTR and the program counter. The accumulator, register A , is used for all arithmetic and logic instructions. 2. 3. 10 Serial communication Computers can transfer data in 2 ways: parallel and serial.In parallel data transfers, often 8 or more stocks (wire conductors) are used to transfer data to a device that is only a few feet away. Examples of parallel transfers are printers and hard disks; each uses argumentations with many wire strips. Although in such cases a lot of data can be transferred in a short union of time by using many wires in parallel, the distance cannot be great. To transfer to a device located many meters away, the serial method is used. In serial communication, the data is direct one bit at a time, in contrast to parallel communication, in which the data is sent a byte or more at a time.Serial communication of the 8051 is the topic of this chapter. The 8051 has serial communication capability make into it, there by making practical fast data transfer using only a few wires. Serial data communication uses both methods, asynchronous and synchronous. The synchronous method transfers a block of data at a time, while the asynchronous method transfers a single byte at a time. The 8051 transfers and receives data serially at many varied baud rates. The baud rate in the 8051 is programmable. This is done with the help of Timer1. The 8051 divides the crystal frequency by 12 to get the machine cycle frequency.The 8051ââ¬â¢s serial communication UART circuitry divides the machine cycle frequency of 921. 6 kHz divided by 32 once more in front it is used by Timer 1 to set the Baud rate. SBUF register SBUF is an 8-bit register used solely for serial communication in the 8051. For a byte of data to be transferred via the TXD extraction, it must be dictated in the SBUF register. in like manner, SBUF holds the byte of data when it is legitimate by the 8051ââ¬â¢s RXD line. SBUF can be accessed like any other register in the 8051. The spot a byte is indite into SBUF, it is framed with the t rigger and stop bits and transferred serially via the TXD pin.Similarly, when the bits are received serially via RXD, the 8051 defames it by eliminating the stop and pass away bits, making a byte out of the data received, and then placing it in the SBUF. SCON (serial control) register The SCON register is an 8-bit register used to program the start bit, stop bit, and data bits of data framing, among other things. Transmit In mode0 the data transmission in form of pulse train mechanically starts on the pin RXD at the moment the data has been written to the SBUF register. In fact, this process starts after any instruction being performed on this register.Upon all 8 bits have been sent, the bit TI in the SCON register is automatically set. In mode1 a sequence for data transmission via serial communication is automatically started upon the data has been written to the SBUF register. End of 1 byte transmission is indicated by setting the TI bit in the SCON register. In mode2 TI (transm it interrupt) is bit D1 of the SCON register. This is an extremely important flag bit in the SCON register. When the 8051 finishes the transfer of the 8-bit igniteacter, it raises the TI flag to indicate that it is ready to transfer another byte.The TI bit is raised at the scratch of the stop bit. Receive In mode0 data receiving starts through the pin RXD once two incumbent conditions are met: bit REN=1 and RI=0 (both bits reside in the SCON register). Upon 8 bits have been received, the bit RI (register SCON) is automatically set, which indicates that one byte is received. In mode1 data receiving starts as in short as the START bit (logic zero (0)) appears on the pin RXD. The condition is that bit REN=1and bit RI=0. Both of them are stored in the SCON register. The RI bit is automatically set upon receiving has been completed.In mode2 RI (receive interrupt) is the D0 of the SCON register. This is another extremely important flag bit in the SCON register. When the 8051 receives d ata serially via RXD, it gets rid of the start and stop bits and places the byte in the SBUF register. t so it raises the RI flag bit to indicate that a byte has been received and should be picked up before it is lost. RI is raised halfway through the stop bit. 2. 4 train Indicator take indicator is used to indicate the different water levels in the dams. Liquid level indicator is used to indicate the water present at what level. present we are considering three level Low level . fair level and High level, as the liquid level increases a message is sent to the concern person regard level of water. The main purpose of this level indicator is it checks the water level and gives the input information to micro controller. 2. 5 MAX 232 The MAX232 from byword was the first IC which in one package contains the indispensable drivers (two) and recipient roles (also two), to adapt the RS-232 signal voltage levels to TTL logic. It became popular, because it just needs one voltage (+5V) and generates the necessary RS-232 voltage levels (approx. 10V and +10V) internally. This greatly simplified the design of circuitry. Circuitry designers no long need to design and build a power supply with three voltages (e. g. -12V, +5V, and +12V), but could just provide one +5V power supply, e. g. with the help of a simple 78×05 voltage converter. The MAX232 has a successor, the MAX232A. The ICs are near identical, however, the MAX232A is much more often used (and easier to get) than the original MAX232, and the MAX232A only needs external capacitors 1/10th the capacity of what the original MAX232 needs.It should be noted that the MAX 232(A) is just a driver/receiver. It does not generate the necessary RS-232 sequence of marks and spaces with the right timing, it does not de enroll the RS-232 signal, and it does not provide a serial/parallel conversion. ââ¬Å"All it does is to convert signal voltage levelsââ¬Â. The MAX 232(A) has two receivers (converts from RS-232 to TTL voltage levels) and two drivers (converts from TTL logic to RS-232 voltage levels). This means only two of the RS-232 signals can be converted in each direction. The old MC1488/1498 combo provided four drivers and receivers.The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1. 3 V and a typical hysteresis of 0. 5 V, and can accept ñ30-V inputs. Each driver converts TTL/CMOS input levels into EIA-232 levels. The RS232 standard is not TTL compatible; therefore, it requires a line driver such as the MAX232 chip to convert RS232 voltage levels to TTL levels, and vice versa.The interfacing of 8051 with RS232 connectors via the MAX232 chip is the main topic. The 8051 has two pins that are used specifically for transferring and receiving data serially. These two pins are called TXD and RXD and a part of the port 3 group (P3. 0 and P3. 1). Pin 11 of the 8051 is assigned to TXD and pin 10 is designated as RXD. These pins are TTL compatible; therefore, they require a line driver to make them RS232 compatible. One such line driver is the MAX232 chip. [pic] Fig 2. 5 8051 connection to RS232 MAX232 converts from RS232 voltage levels to TTL voltage levels, and vice versa.One advantage of the MAX232 chip is that it uses a +5V power source which, is the same as the source voltage for the 8051. In the other words, with a single +5V power supply we can power both the 8051 and MAX232, with no need for the power supplies that are common in many old(a) systems. The MAX232 has two sets of line drivers for transferring and receiving data. The line drivers used for TXD are called T1 and T2, while the line drivers for RXD are designated as R1 and R2. In many applications only one of each is used. 2. 6 GSM (Global system for mobile communication) ModemA modem (modulator-demodulator) i s a device that modulates an analog carrier wave signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The object is to produce a signal that can be transmitted easily and decoded to create the original digital data. A GSM modem is a specialized type of modem which accepts a SIM card, and operates over a subscription to a mobile operator, just like a mobile phone. From the mobile operator perspective, a GSM modem looks just like a mobile phone. A GSM modem can be an external modem device, such as the Wavecom FASTRACK Modem.Insert a GSM SIM card into this modem, and connect the modem to an available serial port on your computer. A GSM modem can be a PC placard cut ined in a notebook computer computer, such as the Nokia Card Phone. A GSM modem could also be a standard GSM mobile phone with the curb cable and software driver to connect to a serial port on your computer. Phones such as the Nokia 7110 with a DLR-3 ca ble, or various Ericsson phones, are often used for this purpose. A dedicated GSM modem (external or PC Card) is usually preferable to a GSM mobile phone.This is because of some compatibility issues that can exist with mobile phones. For example, if you regard to be able to receive inbound MMS messages with your gateway, and you are using a mobile phone as your modem, you must employ a mobile phone that does not support WAP push or MMS. This is because the mobile phone automatically processes these messages, without forwarding them via the modem interface. Similarly some mobile phones will not allow you to correctly receive SMS text messages longer than 160 bytes (known as ââ¬Å"concatenated SMSââ¬Â or ââ¬Å"long SMSââ¬Â).This is because these long messages are actually sent as separate SMS messages, and the phone attempts to reassemble the message before forwarding via the modem interface. (Weââ¬â¢ve observed this latter problem utilizing the Ericsson R380, while it does not appear to be a problem with many other Ericsson models. ) When you install your GSM modem, or connect your GSM mobile phone to the computer, be sure to install the appropriate Windows modem driver from the device manufacturer. To simplify configuration, the Now SMS/MMS Gateway will communicate with the device via this driver.An additional benefit of utilizing this driver is that you can use Windows diagnostics to ensure that the modem is communicating decorously with the computer. The Now SMS/MMS gateway can simultaneously support multiple modems, provided that your computer hardware has the available communications port resources. 2. 6. 1 Architecture of GSM network A GSM network is composed of several cart track(a) entities, whose functions and interfaces are specified. Figure 1 shows the layout of a generic GSM network. The GSM network can be divided into three broad parts. The unstable piazza is carried by the subscriber.The rootage mail Subsystem controls the ra dio link with the expeditious carry. The web Subsystem, the main part of which is the Mobile serve fracture Center ( disseminated sclerosis), performs the break of calls amid the mobile users, and between mobile and fixed network users. The MSC also handles the mobility focussing operations. Not shown are the Operations A GSM network is composed of several serviceable entities, whose functions and interfaces are specified. Figure shows the layout of a generic GSM network. The GSM network can be divided into three broad parts.Subscriber carries the Mobile localise. The invertebrate foot Station Subsystem controls the radio link with the Mobile Station. The lucre Subsystem, the main part of which is the Mobile service substitution Center (MSC), performs the reverse of calls between the mobile users, and between mobile and fixed network users. The MSC also handles the mobility management operations. Not shown is the Operations intendance Center, which oversees the worthy operation and setup of the network. The Mobile Station and the story Station Subsystem communicate crossways the Um interface, also known as the air interface or radio link.The Base Station Subsystem communicates with the Mobile services slip Center across the A interface. [pic] Fig 2. 6. 1 General architecture of a GSM network Mobile Station: The mobile station (MS) consists of the mobile equipment (the terminal) and a chic card called the Subscriber Identity mental faculty (SIM). The SIM provides personal mobility, so that the user can have access to offer services irrespective of a specific terminal. By inseting the SIM card into another GSM terminal, the user is able to receive calls at that terminal, make calls from that terminal, and receive other subscribed services.The mobile equipment is uniquely identified by the International Mobile Equipment Identity (IMEI). The SIM card contains the International Mobile Subscriber Identity (IMSI) used to spot the subscriber to the system, a secret key for assay-mark, and other information. The IMEI and the IMSI are independent, thereby allowing personal mobility. The SIM card may be defend once against unauthorized use by a password or personal identicalness number. Base Station Subsystem: The Base Station Subsystem is composed of two parts, the Base Transceiver Station (BTS) and the Base Station Controller (BSC).These communicate across the standardized Abis interface, allowing (as in the rest of the system) operation between components do by different suppliers. The Base Transceiver Station houses the radio transceivers that define a cell and handles the radio-link protocols with the Mobile Station. In a large urban area, there will potentially be a large number of BTSs deployed, and so the requirements for a BTS are ruggedness, reliability, portability, and minimum cost. The Base Station Controller manages the radio resources for one or more BTSs. It handles radio-channel setup, frequency hopping , and handovers, as exposit below.The BSC is the connection between the mobile station and the Mobile service Switching Center (MSC). Network Subsystem The central component of the Network Subsystem is the Mobile services Switching Center (MSC). It acts like a normal switching node of the PSTN or ISDN, and additionally provides all the practicableity needed to handle a mobile subscriber, such as registration, authentication, location updating, handovers, and call routing to a roaming subscriber. These services are provided in company with several functional entities, which together form the Network Subsystem.The MSC provides the connection to the fixed net kit and caboodle (such as the PSTN or ISDN). Signalling between functional entities in the Network Subsystem uses Signalling System Number 7 (SS7), used for trunk signalling in ISDN and widely used in current public networks. The family line Location Register (HLR) and Visitor Location Register (VLR), together with the MSC, provide the call-routing and roaming capabilities of GSM. The HLR contains all the administrative information of each subscriber registered in the corresponding GSM network, along with the current location of the mobile.The location of the mobile is typically in the form of the signaling address of the VLR associated with the mobile as a distributed database station. The actual routing procedure will be described later. There is logically one HLR per GSM network, although it may be implemented The Visitor Location Register (VLR) contains selected administrative information from the HLR, necessary for call control and provision of the subscribed services, for each mobile currently located in the geographical area controlled by the VLR.Although each functional entity can be implemented as an independent unit, all manufacturers of switching equipment to date implement the VLR together with the MSC, so that the geographical area controlled by the MSC corresponds to that controlled by th e VLR, thus simplifying the signalling undeniable. Note that the MSC contains no information about particular mobile stations — this information is stored in the location registers. The other two registers are used for authentication and security purposes.The Equipment Identity Register (EIR) is a database that contains a list of all valid mobile equipment on the network, where each mobile station is identified by its International Mobile Equipment Identity (IMEI). An IMEI is marked as incapacitate if it has been reported stolen or is not type approved. The Authentication Center (AuC) is a protected database that stores a copy of the secret key stored in each subscribers SIM card, which is used for authentication and encryption over the radio channel. 2. 6. 2 heady modem(GSM/GPRS)Analogicââ¬â¢s GSM overbold Modem is a multi-functional, ready to use, rugged and versatile modem that can be embedded or blocked into any application. The Smart Modem can be customized to var ious applications by using the standard AT commands. The modem is fully type-approved and can directly be integrated into your projects with any or all the features of Voice, Data, Fax, SMS, and Internet etc. Smart Modem kit contains the following items: 1. Analogicââ¬â¢s GSM/GPRS Smart Modem 2. SMPS based power supply adapter. 3. 3 dBi antenna with cable (optional: other types) 4. Data cable (RS232) 5. User ManualTemperature Range: in operation(p) temperature: from -200C to +550C Storage temperature: from -250C to +700C Installing the modem: To install the modem, showstopper the device on to the supplied SMPS Adapter. For Automotive applications fix the modem for good using the mounting slots (optional as per your requirement dimensions). Inserting/ Removing the SIM Card: To insert or Remove the SIM Card, it is necessary to press the SIM pallbearer cartridge ejector button with Sharp edge object like a pen or a needle. With this, the SIM holder comes out a little, then pul ls it out and insert or remove the SIM Card [pic]Fig 2. 6. 2 Inserting/Removing the sim card into the modem Make sure that the ejector is pushed out completely before accessing the SIM Card holder do not remove the SIM card holder by mogul or tamper it (it may permanently damage). Place the SIM Card Properly as per the direction of the installation. It is very important that the SIM is located in the right direction for its proper running(a) condition. attaching External Antenna Connect GSM Smart Modem to the external antenna with cable end with SMA male. The Frequency of the antenna may be GSM 900/1800 MHz.The antenna may be (0 dbi, 3 dbi or short length L-type antenna) as per the field conditions and signal conditions. DC Supply Connection The Modem will automatically turn ON when connection is wedded to it. The following is the Power Supply essential: Connecting Modem to external devices: RS232 can be used to connect to the external device through the D-SUB/ USB (for USB m odel only) device that is provided in the modem. 2. 7 LCD (Liquid crystal display) Liquid crystal displays (LCDs) have corporals, which combine the properties of both liquids and crystals.Rather than having a melting point, they have a temperature range within which the molecules are almost as mobile as they would be in a liquid, but are class together in an ordered form similar to a crystal. An LCD consists of two glass panels, with the liquid crystal material sand witched in between them. The inside surface of the glass plates are surface with transparent electrodes which define the character, symbols or patterns to be displayed polymeric layers are present in between the electrodes and the liquid crystal, which makes the liquid crystal molecules to maintain a defined penchant angle.When the LCD is in the off state, well-off rays are rotated by the two polarisers and the liquid crystal, such that the light rays come out of the LCD without any orientation, and hence the LCD a ppears transparent. When sufficient voltage is apply to the electrodes, the liquid crystal molecules would be aline in a specific direction. The light rays passing through the LCD would be rotated by the polarisers, which would result in activating/ highlighting the desired characters. The LCD does donââ¬â¢t generate light and so light is needed to read the display. By using backlighting, reading is realistic in the dark.The LCDââ¬â¢s have long life and a wide operational(a) temperature range. 2. 7. 1 Pin description of LCD: [pic] VCC, VSS and VEE: While VCC and VSS provide +5V and ground respectively, VEE is used for controlling LCD contrast. The three control lines are referred to as EN, RS, and RW. EN: The EN line is called ââ¬Å"Enableââ¬Â. This control line is used to tell the LCD that you are sending it data. To send data to the LCD, your program should first set this line high (1) and then set the other two control lines and/or put data on the data muckle. RS: The RS line is the ââ¬Å"Register Selectââ¬Â line.When RS is low (0), the data is to be treated as a command or special instruction. When RS is high (1), the data that is sent is a text data which should be displayed on the screen. RW: The RW line is the ââ¬Å"Read/Writeââ¬Â control line. When RW is low (0), the information on the data bus is being written to the LCD. When RW is high (1), the program is effectively querying (or reading) the LCD. Only one instruction (ââ¬Å"Get LCD statusââ¬Â) is a read command. All others are write commands, so RW will almost be low. 2. 7. 2 LCD Interfacing Sending commands and data to LCDs with a time delay: [pic] Fig 2. 6. Interfacing of LCD to a micro controller To send any command from command list to the LCD, make pin RS=0. For data, make RS=1. Then sends a high ââ¬to-low pulse to the E pin to enable the internal latch of the LCD. 2. 8 Control System The controlling is done through the motors. present relays acts as motors. Aàrelayàis anàelectricallyàoperatedàswitch. Many relays use an electromagnet to operate a switching mechanism, but other operating principles are also used. Relays find applications where it is necessary to control a circuit by a low-power signal, or where several circuits must be controlled by one signal.The first relays were used in long distance telegraph circuits, repeating the signal advance in from one circuit and re-transmitting it to another. Since relays areàswitches, the nomenclature apply to switches is also applied to relays. A relay will switch one or moreàpoles, each of whose soupcons can beàthrown by energizing the coil in one of three ways: 1. Normally-open (NO) take ons connect the circuit when the relay is activated; the circuit is separated when the relay is inactive. It is also called aàknead A fill or ââ¬Å"makeââ¬Â contact. 2.Normally- unappealing (NC) contacts disconnect the circuit when the relay is activated; the circuit is connected when the relay is inactive. It is also called aàForm B contact or ââ¬Å"breakââ¬Â contact. 3. Change-over (CO), or double-throw (DT), contacts control two circuits: one normally-open contact and one normally- decisiond contact with a common terminal. It is also called aàForm Càcontact or ââ¬Å"transferââ¬Â contact (ââ¬Å"break before makeââ¬Â). If this type of contact utilizes ââ¬Å"make before breakââ¬Â functionality, then it is called aàForm Dàcontact. The following designations are commonly encountered:SPSTàâ⬠unity terminal Single Throw. These have two terminals which can be connected or disconnected. Including two for the coil, such a relay has four terminals in total. It is ambiguous whether the pole is normally open or normally closed. The terminology ââ¬Å"SPNOââ¬Â and ââ¬Å"SPNCââ¬Â is sometimes used to resolve the ambiguity. SPDTàâ⬠Single Pole bivalent Throw. A common terminal connects to either of two others. Including two for the coil, such a relay has five terminals in total. DPSTàâ⬠Double Pole Single Throw. These have two pairs of terminals. Equivalent to two SPST switches or relays activate by a single coil.Including two for the coil, such a relay has six terminals in total. The poles may be Form A or Form B (or one of each). DPDTàâ⬠Double Pole Double Throw. These have two rows of change-over terminals. Equivalent to two SPDT switches or relays actuated by a single coil. much(prenominal) a relay has eight terminals, including the coil. Here in this project we are using single pole single throw. The relay has 3 pins, 1st pin is connected to the input, 2nd pin to the output and tertiary pin is connected to the ground. When input is given magnetic flux is generated and the motor starts rotating and the gate will be opened according to the development.Aàmotor receives power through two or more relays connected to a power source. A switch-operated logic circuit is pow ered by a relay power source and connects to the relays. To start the motor, the switch is touch, causing the logic circuit to close the relays sequentially. When all the relays are closed, the motor will start. If the motor starts before the logic circuit closes all of the relays, the motor is stopped and an indication is provided that the relays that have not yet been closed have failed. Otherwise, the motor runs until the switch is pressed again, causing the logic circuit to open the relays and stop the motor.A power relay is a switch that uses anàelectromagnetàto open or close a circuit. The basic design of a relay utilizes an electromagnet coil, an armature, a spring and one or more contacts. If the power relay is designed to normally be open, the circuit is not completed when in the off state. As power is applied to the power relay, generally from a battery source, the electromagnet attracts the armature, a movable arm often made of iron. The armature, which was held in place by the spring, is pulled in the direction of the coil until it reaches a contact, thus closing the circuit.If the relay is normally closed, then the coil pulls the armature away from the contact, opening the circuit. A power relay can be operated using a low amount of voltage but can also conduct a higher amount of voltage. In our project we are using a sub image able motor that is nothing but a motor. When a motor starts, the phase controller applies power to the windings so that they become magnetized with the polarity that attracts the permenant magnets on the rotor coil coil; this causes the rotor to begin rotating.As the permanent magnets on the rotor rotate past the electro-magnetic windings the phase controller reverses the polarity on the winding so that the winding repels the permanent magnets on the rotor. As the motor runs, the phase controller keeps switching windings on so that they are always attracting the permanent magnets on the rotor then repelling the per manent magnets on the rotor; this keeps it rotating. CHAPTER 3 SCHEMATIC DIAGRAM Fig 3 Schematic Diagram 3. 1 Circuit description This section gives an overview of the undivided circuitry and hardware involved in the project. The required operating voltage for Microcontroller 89C51 is 5V.Hence the 5V D. C. power supply is needed by the same. This regulated 5V is generated by stepping down the voltage from 230V to 12V using step down transformer. Now the step downed a. c voltage is being rectified by the Bridge Rectifier using 1N4007 diodes. The rectified a. c voltage is now filtered using a ââ¬ËRCââ¬â¢ filter. Now the rectified, filtered D. C. voltage is feed to the potential Regulator. This voltage regulator provides/allows us to have a Regulated constant Voltage which is of +5V. The rectified; filtered and regulated voltage is again filtered for ripples using an electrolytic capacitor speed of light?F. Now the output from this section is fed to 40th pin of 89c51 microcont roller to supply operating voltage. The microcontroller 89C51 with Pull up resistors at Port0 and crystal oscillator of 11. 0592 MHz crystal in conjunction with couple of 30-33pf capacitors is placed at eighteenth & 19th pins of 89c51 to make it work (execute) properly. operate voltage for the GSM modem will depends on its type and an adaptor is provided with the GSM modem set itself. Here in this project various levels in dams are monitored and if they exceed the threshold values a SMS is sent through the concerned person.To perform all these activities first of all different levels should be monitor using liquid level indicators. These level indicators are placed in dam at different levels like level1, level2, level3 etcââ¬Â¦ whenever if any level overflows automatically information is sent to the control section using GSM modem. The controlling part of the water level is also done by the controller through the instructions given by the developer. In this process the contr oller checks the number of threshold levels that are crossed and according to that the gates are being controlled.When modem receives the message controller will communicate with the modem through serial communication. As we can not directly give the data to the controller due to the voltage level difference between the GSM modem and the controller because GSM modem works on RS 232 logic levels whereas micro controller works on TTL logic levels and also we are using PC in this project which is also a RS 232 logic based. So to have compatibility we are using MAX 232. MAX232 converts from RS232 voltage levels to TTL voltage levels, and vice versa.One advantage of the MAX232 chip is that it uses a +5V power source which, is the same as the source voltage for the 8051. In the other words, with a single +5V power supply we can power both the 8051 and MAX232, with no need for the power supplies. The MAX232 has two sets of line drivers for transferring and receiving data. The line drivers used for TXD are called T1 and T2, while the line drivers for RXD are designated as R1 and R2. By using this to TX and RX pins we are going to communicate with the controller. CHAPTER 4 FLOW CHART TX handbuild: [pic] RX Loop: [pic] CHAPTER 5 SCOPE AND FUTURE ENHANCEMENTIt can be further enhanced by adding dtmf decoder to control the gate s of the dam and we send one monosodium glutamate to GSM amd that will be send the water level of the dam. If any unauthorized person tries to control the gate the GSM modem activate and that will pass this information to the authorized person. CHAPTER 6 CONCLUSION The project ââ¬Å"DAM level monition apply GSM-SMSââ¬Â has been successfully designed and tested. It has been developed by integrating features of all the hardware components used. Presence of every mental faculty has been reasoned out and placed guardedly thus contributing to the best working of the unit.Secondly, using highly advanced ICââ¬â¢s and with the help of growing te chnology the project has been successfully implemented. Finally we argue that ââ¬Å"DAM LEVEL WARNING USING GSM-SMSââ¬Â is an emerging field and there is a huge scope for research and development. CHAPTER 7 BIBILOGRAPHY 1. WWW. MITEL. DATABOOK. COM 2. WWW. ATMEL. DATABOOK. COM 3. WWW. FRANKLIN. COM 4. WWW. KEIL. COM 5. WWW. NATIONAL. COM 6. WWW. ATMEL. COM 7. WWW. littleSOFTSEARCH. COM 8. WWW. GEOCITIES. COM 9. 8051-MICROCONTROLLER AND EMBEDDED SYSTEM. -Mohd. Mazidi 10. The 8051 Micro controller Architecture, programming & Applications -Kenneth J.Ayala 11. Fundamentals of Micro processors and Micro computers -B. tup 12. Micro processor Architecture, Programming & Applications -Ramesh S. Gaonkar 13. radiocommunication Communications -Theodore 14. S. Rappaport Mobile Tele Communications -William C. Y. downwind CHAPTER 8 APPENDIX Source code Software used: Keil software for c programming About keil software: It is possible to create the source files in a text editor such as Notepad, run the Compiler on each C source file, specifying a list of controls, run the Assembler on each Assembler source file, specifying nother list of controls, run either the Library Manager or Linker (again specifying a list of controls) and finally running the Object-HEX Converter to convert the Linker output file to an Intel swearword File. Once that has been completed the Hex File can be downloaded to the locate hardware and debugged. Alternatively KEIL can be used to create source files; automatically compile, link and covert using options set with an easy to use user interface and finally simulate or perform debugging on the hardware with access to C variables and memory. Unless you have to use the tolls on the command line, the choice is clear.KEIL Greatly simplifies the process of creating and exam an embedded application The user of KEIL centers on ââ¬Å"projectsââ¬Â. A project is a list of all the source files required to build a single application, al l the rooster options which specify on the button how to build the application, and â⬠if required â⬠how the application should be simulated. A project contains enough information to take a set of source files and generate exactly the binary code required for the application. Because of the high degree of flexibility required from the beasts, there are many options that can be set to configure the tools to operate in a specific manner.It would be deadening to have to set these options up every time the application is being built; therefore they are stored in a project file. Loading the project file into KEIL informs KEIL which source files are required, where they are, and how to configure the tools in the correct way. KEIL can then execute each tool with the correct options. It is also possible to create new projects in KEIL. Source files are added to the project and the tool options are set as required. The project is reloaded and the simulator or debugger started, all the desired windows are opened. KEIL project files have the extension Simulator/Debugger tag include #include #include sbit M1 = P2^0; sbit M2 = P2^1; sbit M3 = P2^2; sbit L1 = P3^5; sbit L2 = P3^6; sbit L3 = P3^7; sbit Buz = P3^4; void TxMsg(unsigned char *msg,unsigned char *mno) { Send(ââ¬Å"AT+CMGS=ââ¬Â); Send(mno); storage area_high(2); Send(msg); } void main() { bit L1_flag=0,L2_flag=0,L3_flag=0; LCD_Init(); Disp_Str(ââ¬Â pee take ââ¬Å"); LCD_Cmd(0xC0); Disp_Str(ââ¬Å" ideal System ââ¬Å"); M1=M2=M3=0; Buz = 1; confine (200); SConfig(); While (1) { If (L1==0 && L2==1 && L3==1 && L1_flag==0) { L1_flag=1; L2_flag=0; L3_flag=0; Buz = 1; M1 = 1; M2 = 0; M3 = 0; LCD_Cmd (0x80); Disp_Str (ââ¬Å" piss Level ââ¬Å"); LCD_Cmd (0xC0);Disp_Str (ââ¬Å"** medium **ââ¬Â); TxMsg (ââ¬Å"water system Level â⬠MEDIUMââ¬Â,ââ¬Â9951024603″); TxMsg (ââ¬Å" peeing Level â⬠MEDIUMââ¬Â,ââ¬Â9848997946″); TxMsg (ââ¬Å" weewee Level â⬠MEDIUMââ¬Â,ââ¬Â9966644775″); TxMsg (ââ¬Å" piss Level â⬠MEDIUMââ¬Â,ââ¬Â9299804677″); TxMsg (ââ¬Å" pissing Level â⬠MEDIUMââ¬Â,ââ¬Â9849974776″); Delay (200); } else If (L1==0 && L2==0 && L3==1 && L2_flag==0) { L2_flag=1; L3_flag=0; L1_flag=0; Buz = 1; M1 = 1; M2 = 1; M3 = 0; LCD_Cmd (0x80); Disp_Str (ââ¬Å"water system Level ââ¬Å"); LCD_Cmd (0xC0); Disp_Str (ââ¬Å"** proud **ââ¬Â); TxMsg (ââ¬Å" water supply Level â⬠HIGHââ¬Â,ââ¬Â9951024603″); TxMsg (ââ¬Å"Water Level â⬠HIGHââ¬Â,ââ¬Â9848997946ââ¬Â); TxMsg (ââ¬Å"Water Level â⬠HIGHââ¬Â,ââ¬Â9966644775″);TxMsg (ââ¬Å"Water Level â⬠HIGHââ¬Â,ââ¬Â9299804677″); TxMsg (ââ¬Å"Water Level â⬠HIGHââ¬Â,ââ¬Â9849974776″); Delay (200); } else if (L1==0 && L2==0 && L3==0 && L3_flag==0) // Level â⬠3 { L3_flag=1; L2_flag = 0; L1_flag=0; B uz = 0; M1 = 1; M2 = 1; M3 = 1; LCD_Cmd (0x80); Disp_Str (ââ¬Å"Water Level ââ¬Å"); LCD_Cmd (0xC0); Disp_Str (ââ¬Å"** VERY HIGH **ââ¬Â); TxMsg (ââ¬Å"Water Level â⬠VERY HIGHââ¬Â,ââ¬Â951024603″); TxMsg (ââ¬Å"Water Level â⬠VERY HIGHââ¬Â,ââ¬Â9848997946″); TxMsg (ââ¬Å"Water Level â⬠VERY HIGHââ¬Â,ââ¬Â9966644775″); TxMsg (ââ¬Å"Water Level â⬠VERY HIGHââ¬Â,ââ¬Â9299804677″); TxMsg (ââ¬Å"Water Level â⬠VERY HIGHââ¬Â,ââ¬Â9849974776″); Delay (200); }else if(L1==1 && L2==1 && L3==1) Buz = 1; L1_flag=0; L2_flag=0; L3_flag=0; M1 = 0; M2 = 0; M3 = 0; LCD_Cmd (0x80); Disp_Str (ââ¬Å"Water Level ââ¬Å"); LCD_Cmd (0xC0); Disp_Str (ââ¬Å"** regular**ââ¬Â); } } } KIT PHOTOS OF DAM LEVEL WARNING USING GSM SMS [pic] Kit photo of dam level warning using GSM SMS ———————â⬠GSM MODEM MAX-232 billet SUPPLY CONTROL SYSTEM LCD LIQUID LEVEL INDICA TOR Level-3 â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠— â⬠â⬠â⬠â⬠â⬠â⬠Level-2- â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠Level-1 â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠— â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⬠â⠬ — ———RESERVIOUR— MICRO CONTRO-LLER Tx Rx P0 P1 P2 P3 COUNTER INPUTS EXTERNAL crock upS CPU series PORT 4 I/O PORTS BUS CONTROL OSC TIMER 0 TIMER 1 ON CHIP RAM ON-CHIP RAM ON-CHIP FLASH INTERRUPT CONTROL RESET INTERRUPT LOCATIONS 8 bytes (0033)H 002BH 0023H 001BH 0013H 000BH 0003H 0000H\r\n'
Subscribe to:
Post Comments (Atom)
Actually, I am facing some difficulties to understand the meaning of the blog. If you have any short video film related to your blog, then I would request you to share here. It would be great help.
ReplyDeleteAudio power conditioner