Escolar Documentos
Profissional Documentos
Cultura Documentos
Ultrasonic principle:
Ultrasonic sensors emit short, high-frequency sound pulses at regular intervals.
These propagate in the air at the velocity of sound. If they strike an object, then
they are reflected back as echo signals to the sensor, which itself computes the
distance to the target based on the time-span between emitting the signal and
receiving the echo.
Ultrasonic principle
not by the intensity of the sound, ultrasonic sensors are excellent at suppressing
background interference.
Virtually all materials which reflect sound can be detected, regardless of their
ultrasonic sensor.
Ultrasonic sensors can see through dust-laden air and ink mists. Even thin
deposits on the sensor membrane do not impair its function.
Sensors with a blind zone of only 20 mm and an extremely thin beam spread are
making entirely new applications possible today: Fill level measurement in wells
of microtiter plates and test tubes, as well as the detection of small bottles in
the packaging industry, can be implemented with ease. Even thin wires are
reliably detected.
8051 Microcontroller
The below figure shows a simplified schematic of all circuits within the microcontroller,
which is connected to one of its pins. It states to all the pins except those of the P0 port
that do not have pull-up resistors built-in.
Output pin
A logic 0 is applied to a bit of the register P, then the output FE transistor is turned on,
therefore connects the appropriate pin to ground.
Output pin
Input pin
A logic 1 is applied to a bit of the P register. The output field effect transistor is turned
off, and the appropriate pin remains connected to the power supply voltage, over a pull-
up resistor of high resistance.
Input Pin
The pin diagram of 8051 microcontroller consists of 40 pins as shown below. A total of
32 pins are set away into four Ports such as P0, P1, P2 and P3. Where, each port
contains 8 pins. Therefore, the microcontroller 8051s pin diagram and explanation is
given below.
Port1 (Pin1 to Pin8): Port1 includes pin1.0 to pin1.7 and these pins can be
configured as input or output pins.
Pin 9 (RST): Reset pin is used to Reset 8051 Microcontroller by giving a
positive pulse to this Pin.
Port3 (Pin 10 to 17): The Port3 Pins are similar to port1 pins and can be
used as universal Input or output pins. These pins dual-function Pins and the
function of each Pin is given as:
Pin 10 (RXD): RXD pin is a Serial Asynchronous Communication Input
or Serial synchronous Communication Output.
Pin 11 (TXD): Serial Asynchronous Communication Output or Serial
Synchronous Communication clock Output.
Pin 12 (INT0): Input of Interrupt 0
Pin 13 (INT1): Input of Interrupt 1
Pin 14 (T0): Input of Counter 0 clock
Pin 15 (T1): Input of Counter 1 clock
Pin 16 (WR): Writing Signal to write content on external RAM.
Pin 17 (RD): Reading Signal to read contents of external RAM.
Pin 18 and 19 (XTAL2, XTAL1): X2 and X1 pins are input output pins for
the oscillator. These pins are used to connect an internal oscillator to the
microcontroller.
Pin 20 (GND): Pin 20 is a ground pin.
Port2 (Pin 21 to Pin28): Port2 includes pin21 to pin28 which can be
configured as Input Output Pins. But, this is only possible when we dont use any
external memory. If we use external memory, then these pins will work as high
order address bus (A8 to A15).
Pin 29 (PSEN): This pin is used to enable external program memory. If we
use an external ROM for storing the program, then logic 0 appears on it, which
indicates Micro controller to read data from the memory.
Pin 30 (ALE): Address Latch Enable pin is an active high-output signal. If we
use multiple memory chips, then this pin is used to distinguish between them.
This Pin also gives program pulse input during programming of EPROM.
Pin 31 (EA): If we have to use multiple memories then the application of
logic 1 to this pin instructs the Microcontroller to read data from both memories:
first internal and then external.
Port 0 (Pin 32 to 39): Similar to the port 2 and 3 pins, these pins can be
used as input output pins when we dont use any external memory. When ALE or
Pin 30 is at 1, then this port is used as data bus: when the ALE pin is at 0, then
this port is used as a lower order address bus (A0 to A7)
Pin40 (VCC): This VCC pin is used for power supply.
PORT 2:
Port-2 we use for higher external address byte or a normal input/output port. The I/O
operation is similar to Port-1. Port-2 latch remains stable when Port-2 pin are used for
external memory access.
Here again due to internal pull-up there is limited current driving capability.
PORT 3:
Following are the alternate functions of port 3:
P3.0RXD
P3.1 TXD
P3.2 INT0 BAR
P3.3 INT1 BAR
P3.4 T0
P3.5 T1
P3.6 WR BAR
P3.7 RD BAR
It works as an IO port same like Port 2 as well as it can do lots
of alternate work which are discuss above. Only alternate function of port 3
makes its architecture different than other ports.
BLOCK FUNCTIONS
LCD:A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated
optical device that uses the light-modulating properties of liquid crystals. Liquid crystals do
not emit light directly, instead using a backlight or reflector to produce images in color
or monochrome.[1] LCDs are available to display arbitrary images (as in a general-purpose
computer display) or fixed images with low information content, which can be displayed or
hidden, such as preset words, digits, and 7-segment displays, as in a digital clock. They use
the same basic technology, except that arbitrary images are made up of a large number of
small pixels, while other displays have larger elements.
MICROCONTROLLER:
A highly integrated single chip computer or a cpu with all the peripherals like RAM, ROM, I/O ports,
timers, ADCs etc on the same chip. For ex: Motorolas 6811, intels 8051, zilogs z8 and pic 16X etc
FUNCTION GENERATOR:
A function generator produces different waveforms of adjustable
frequency. The common outputwaveforms are the sine, square,
triangular and saw tooth waves. The frequency may be adjusted,
from a fraction of a Hertz to several hundred kHz lie various
outputs of the generator can bemade available at the same time.
For example, the generator can provide a square wave to testthe
linearity of a rectifier and simultaneously provide a saw tooth to
drive the horizontal
deflection amplifier of the CRO to provide a visual display.
Amplifier Gain
The introduction to the amplifier gain can be said to be the relationship that exists between the
signal measured at the output with the signal measured at the input. There are three different
kinds of amplifier gain which can be measured and these are: Voltage Gain ( Av ), Current
Gain ( Ai ) and Power Gain ( Ap ) depending upon the quantity being measured with examples
of these different types of gains are given below.
Amplifier Gain of the Input Signal
Note that for the Power Gain you can also divide the power obtained at the output with the power
obtained at the input. Also when calculating the gain of an amplifier, the subscripts v, i and p are
used to denote the type of signal gain being used.
The power Gain or power level of the amplifier can also be expressed in Decibels, (dB). The Bel
(B) is a logarithmic unit (base 10) of measurement that has no units. Since the Bel is too large a
unit of measure, it is prefixed with deci making it Decibels instead with one decibel being one
tenth (1/10th) of a Bel. To calculate the gain of the amplifier in Decibels or dB, we can use the
following expressions.
Voltage Gain in dB: av = 20 log Av
Current Gain in dB: ai = 20 log Ai
Power Gain in dB: ap = 10 log Ap
Note that the DC power gain of an amplifier is equal to ten times the common log of the output
to input ratio, where as voltage and current gains are 20 times the common log of the ratio. Note
however, that 20dB is not twice as much power as 10dB because of the log scale.
Also, a positive value of dB represents a Gain and a negative value of dB represents
a Loss within the amplifier. For example, an amplifier gain of +3dB indicates that the amplifiers
output signal has doubled, (x2) while an amplifier gain of -3dB indicates that the signal has
halved, (x0.5) or in other words a loss.
The -3dB point of an amplifier is called the half-power point which is -3dB down from
maximum, taking 0dB as the maximum output value.
Comparator
In electronics, a comparator is a device that compares two voltages or currents and outputs a digital
signal indicating which is larger. It has two analog input terminals v+ and v- and one binary digital
output Vo. The output is ideally
A comparator consists of a specialized high-gain differential amplifier. They are commonly used
in devices that measure and digitize analog signals, such as analog-to-digital converters(ADCs),
as well as relaxation oscillators.
Target:-The object whose distance is to be measured in the atmosphere is termed as target. In addition,
objects that absorb sound or have a soft or irregular surface, such as a stuffed animal, may not reflect
enough sound to be detected accurately. The sensor will detect the surface of water, however it is not
rated for outdoor use or continual use in a wet environment. Condensation on its transducers may affect
performance and lifespan of the device.
3. Copy the example to the Right into the new window. This file will
toggle Ports 1 and 2 with a delay.
ORG 0H
MOV A, #55H
AGAIN:
MOV P1, A
MOV P2, A
ACALL DELAY
CPL A
SJMP AGAIN
DELAY:
MOV R3, #200
OUTER: MOV R2, #0255
INNER: DJNZ R2, INNER
DJNZ R3, OUTER
RET
END
4. Step through the code by pressing F11 on the Keyboard. The Parallel Port 1 Box should change as
you completely step through the code.
5. To exit out, Click on Debug Menu and Select Start/Stop Debug Session