0% found this document useful (0 votes)
6 views15 pages

Atharv 1100

The document introduces a cutting-edge water level indicator that utilizes advanced sensor technology to provide real-time data on water levels, enhancing efficiency and conservation. It outlines the technical components, including microprocessors and general-purpose registers, and describes the functionality of the water level indicator in preventing overflow and optimizing water usage. The conclusion emphasizes the importance of such technology in addressing global water scarcity challenges.

Uploaded by

atharvmiraje39
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views15 pages

Atharv 1100

The document introduces a cutting-edge water level indicator that utilizes advanced sensor technology to provide real-time data on water levels, enhancing efficiency and conservation. It outlines the technical components, including microprocessors and general-purpose registers, and describes the functionality of the water level indicator in preventing overflow and optimizing water usage. The conclusion emphasizes the importance of such technology in addressing global water scarcity challenges.

Uploaded by

atharvmiraje39
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Index

 Introduction:-

In a world where access to clean water is increasingly vital, a


reliable water level indicator stands as a beacon of efficiency
and conservation. As communities grapple with water scarcity
and infrastructure challenges, the need for precise monitoring
tools becomes paramount. Introducing our solution: a cutting-
edge water level indicator designed to revolutionize how we
manage this precious resource.
At its core, our water level indicator combines advanced sensor
technology with user-friendly interface, providing real-time data
on water levels in tanks, reservoirs, and wells.
At its core, our water level
indicator combines advanced sensor technology with user-
friendly interface, providing real-time data on water levels in
tanks, reservoirs, and wells. Gone are the days of guesswork and
manual measurements; our system offers accuracy and
convenience, empowering users to make informed decisions and
optimize water usage.
ABSTRACT:-

 Microprocessor:
A microprocessor is a controlling unit of a micro-computer
fabricated on a small chip capable of performing ALU
(Arithmetic Logic Unit) operations and communicating with
other devices connected to it. Microprocessor consists of
register, control array, and control unit.

 Block Diagrame Of Microprocessor:-


 BASIC THEORY:-

Water Level Indicator Water level indicator definition: A water


level indicator is a system that relays information back to a
control panel to indicate whether a body of water has a high or
low water level. Some water level indicators use a combination
of probe sensors or float switches to sense water levels.
The Automatic water level controller
ensures no overflows or dry running of pump there by saves
electricity and water. Avoid seepage of roofs and walls due to
overflowing tanks. Fully automatic, saves man power. Consume
very little energy, ideal for continuous operation.
 FUNCTION USE IN PROGRAM:-

1)Model Small: -. Model small tells the assembler that you


intend to use the small memory model - one code segment, one
data segment and one stack segment - and the values of the
segment registers are never changed.

2) Segmentation is the process in which the main memory of the


computer is divided into different segments and each segment
has its own base address. It is basically used to enhance the
speed of execution of the computer system, so that processor is
able to fetch and execute the data from the memory easily and
fast.

3) Need for Segmentation: - The Bus Interface Unit (BIU)


contains four 16-bit special purpose registers (mentioned below)
called as Segment Registers.

4) Code segment register (CS): - is used for addressing memory


location in the code segment of the memory, where the
executable program is stored.

5) Data segment register (DS): - points to the data segment of


the memory where the data is stored.
6) Extra Segment Register (ES): - also refers to a segment in the
memory which is another data segment in the memory.

7) Stack Segment Register (SS): - is used for addressing stack


segment of the memory. The stack segment is that segment of
memory which is used to store stack data.

8) The number of address lines in 8086 is 20, 8086 BIU will


send 20bit address, so as to access one of the 1MB memory
locations. The four segment registers actually contain the upper
16 bits of the starting addresses of the four memory segments of
64 KB each with which the 8086 is working at that instant of
time. A segment is a logical unit of memory that may be up to
64 kilobytes long. Each segment is made up of contiguous
memory locations. It is independent, separately addressable unit.
Starting address will always be changing. It will not be fixed.
Note that the 8086 does not work the whole 1MB memory at
any given time. However, it works only with four 64KB
segments within the whole 1MB memory. Below is the one way
of positioning four 64 kilobyte segments within the 1M byte
memory space of an 8086.
GENERAL PURPOSE REGISTER:-

 AX: - This is the accumulator. It is 16-bit registers, but it is


divided into two 8-bit registers. These registers are AH and
AL. AX generally used for arithmetic or logical instructions,
but it is not mandatory in 8086.

 BX: - BX is another register pair consisting of BH and BL.


This register is used to store the offset values.

 CX: - CX is generally used as control register. It has two


parts CH and CL. For different looping and counting purposes
these are used.

 DX: - DX is data register. The two parts are DH and DL. This
register can be used in Multiplication, Input/output addressing
etc.

 PROC: - The PROC statement defines a procedure. specifies


the name of the procedure. Specifies that the procedure is a
standard procedure function.

 ORG: - ORG is merely an indication on where to put the next


piece of code/data, related to the current segment. It is of no
use to use it for fixed addresses, for the eventual address
depends on the segment which is not known at assembly time.
 RET: - The ret instruction transfers control to the return
address located on the stack. This address is usually placed on
the stack by a call instruction. Issue the ret instruction within
the called procedure to resume execution flow at the
instruction following the call.

 LOOP: - The LOOP instruction is mainly used to simulate the


different loops in HLL. The Loop instructions use the CX
register to indicate the loop count. Note that the ECX register
can be used as a loop counter in 32- bit mode. However, in
this case, one has to use the instruction LOOPD instead of
LOOP.

 MUL: - The MUL (Multiply) instruction handles unsigned


data and the IMUL (Integer Multiply) handles signed data.

 ADD: - ADD Instruction. The ADD instruction performs an


addition on both the first source register's contents and the
second source. register's contents, and stores the result in the
destination register. Its syntax is: ADD $destination register's
address, first source register's address, $second source
register's address.

 SUB: - The SUB instruction subtracts the value of Operand2


or imm12 from the value. In certain circumstances, the
assembler can substitute one instruction for another. Be aware
of this when reading disassembly listings.
ALGORITHM:-

1) START
2)In the program the integer ‘n’ value is fixed as 5 number,
3) Put AL to stored operand size for multiplication.
4) Also, BL to use for indexed address .
5) Read the integer as AL register and assign it to a variable .
6) Copy the AL value as BL register (that is 5).
7) And take BL value by subtracting 1 from the value(i.e.: BL =
BL -1).
8) For the next value, create the CL to create loop for
updated value.
9) Now multiply the AL and BL value up to 1
(E.g. :5*4*3*2*1).
10) The final value at the end of all the multiplication till 1 is
the factorial (i.e.: 120).
11) END.
FLOWCHART:-
SOURCE CODE:-

DATA SEGMENT
msg1 db 10,13,"The water level is: $"
msg2 db 10,13,"Switch ON motor. $"
msg3 db 10,13,"Switch OFF motor. $"
msg4 db 10,13,"Water overflow! $"
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START: mov AX,@data ;intialize data segment
mov DS,AX

mov CL,1H
L1: lea DX,msg1 ;displaying water level message
mov AH,9H
int 21H

add CL,30H ;ASCII adjust before displaying


mov DL,CL
mov AH,2H ;display
int 21H
sub CL,30H ;ASCII adjust after displaying
cmp CL,8H ;switch off motor
je off ;jump to off if = 8

cmp CL,1H ;switch on motor


je on ;jump to on if = 1

back: inc CL ;increase water level by 1


cmp CL,8H ;check if water level is overflowing
jle l1

jmp exit

on: lea DX,msg2


mov AH,9h
int 21H
jmp back

off: lea DX,msg3


mov AH,9h
int 21H
lea DX,msg4 ;displaying overflow
mov AH,9H
int 21H
jmp back
exit: mov AH,4CH
int 21H

CODE ENDS
END START.
OUTPUT:-
CONCLUSION:-

This Program stores an info into the int data type. After the
successful execution the code will find the accurate level of the
water.
The water level indicator represents a pivotal advancement in
water management technology. By providing accurate and real-
time data on water levels, this innovative solution offers tangible
benefits for communities, industries, and individuals alike. From
optimizing water usage and preventing wastage to enhancing
infrastructure resilience and promoting conservation efforts, the
impact of the water level indicator extends far beyond its
technical specifications. As we continue to confront global
challenges related to water scarcity and quality, embracing such
tools is essential in safeguarding this vital resource for future
generations.
References:-

You might also like