Professional Documents
Culture Documents
Introduction:
LCD
TEMPERATURE POWER
SENSOR SUPPLY1
ADC MICROCONTROLLER
UNIT SWITCH PANEL
SOCKET
ISOLATOR
POWER
RELAY AMPLIFIER SUPPLY2
Interfacing with switches (keypad):
Interfacing with keypad makes instrument menu driven user friendly.
This will help to the user to select the preset temperature and also to
move to the measurement stage.
Interfacing with LCD
LCD makes this instrument user friendly by displaying everything on the
display. It is an intelligent LCD module, as it has inbuilt controller which
convert the alphabet and digit into its ASCII code and then display it by
its own i.e. we do not required to specify which LCD combination must
glow for a particular alphabet or digit.
Interfacing with Analog to Digital Converter
The analog to digital converter takes the input from the sensor which is in
analog form. It takes 0V for 0 digital level and take 5V for 1 digital level.
555 Timer is used to provide clock to ADC.
Temperature Sensor:
For continuous temperature monitoring applications, time response is less
concern, sensors that remain in place for long periods can achieve a
relatively steady state because actual temperature changes slowly.
The sensor type most commonly used for medical applications is the
thermistor. A thermistor is a thermally sensitive resistor, whose resistance
alters markedly with changes of its ambient temperature. Thermistors are
composites of selected metal oxides characterized by large negative
temperature-coefficients and high sensitivity i.e. resistance decreases with
increasing temperature. In practice, a thermistor designed for use in a
body temperature probe might consist of a small bead of semiconductor
material sealed into the tip of a thin glass envelope for protection.
Platinum leads are fused into the bead and led out of the envelope. The
bead material could consist of a mixture of nickel, cobalt and manganese
oxides fused together in a furnace. A typical bead resistance might be
2000 ohms at 20 degrees Celsius which would fall to 1400 ohms at 40
degree Celsius, the variation of the thermistor resistance with temperature
is inherently non linear. Thermistor sensors now in use clinically are
typically specified as accurate to within 0.2oC to 37oC.
Thermistors are non-linear. In addition, the outputs of these sensors are
not linearly proportional to any temperature scale. Early monolithic
sensor such as LM 3911, LM134 and LM135 over come these difficulties
but their outputs are related to Kelvin temperature scale.
In this circuit LM35 precision centigrade temperature has been used as
temperature sensor.
Switching of 220V device:
ON/OFF switching of a 220V device is controlled by the Microcontroller.
Device is isolated from Microcontroller by optocoupler and is connected
through Relay. Switching of mains is done, by using relays. Temperature
is compared with the preset desired value. If temperature is greater than
the required value then the relay corresponding to the ‘AC’ is made ON
by the MCU and the relay corresponding to the ‘HEATER’ is made OFF
by the MCU. If the temperature is less than the desired temperature then
reverse is done by the MCU.
Microcontroller Unit:
LCD Module:
Switching Circuit:
S. No. Component Specification Qty.
1. PCB Designed 1
2. Base 6 Pin 2
3. Optocoupler 817 2
4. Resistance 470Ω 2
5. Transistor 369 2
6. Relay 12V 2
7. Extension 2 pin 1
Keypad Module:
General Description
The LM35 series are precision integrated-circuit temperature sensors,
whose output voltage is linearly proportional to the Celsius (Centigrade)
temperature. The LM35 thus has an advantage over linear temperature
sensors calibrated in ° Kelvin, as the user is not required to subtract a
large constant voltage from its output to obtain convenient Centigrade
scaling. The LM35 does not require any external calibration or trimming
to provide typical accuracies of ±1⁄4°C at room temperature and ±3⁄4°C
over a full −55 to +150°C temperature range. Low cost is assured by
trimming and calibration at the wafer level. The LM35’s low output
impedance, linear output, and precise inherent calibration make
interfacing to readout or control circuitry especially easy. It can be used
with single power supplies, or with plus and minus supplies. As it draws
only 60 μA from its supply, it has very low self-heating, less than 0.1°C
in still air. The LM35 is rated to operate over a −55° to +150°C
temperature range, while the LM35C is rated for a −40° to +110°C range
(−10° with improved accuracy). The LM35 series is available packaged
in hermetic TO-46 transistor packages, while the LM35C, LM35CA, and
LM35D are also available in the plastic TO-92 transistor package. The
LM35D is also available in an 8-lead surface mount small outline
package and a plastic TO-220 package.
Features:
• Calibrated directly in ° Celsius (Centigrade)
• Linear + 10.0 mV/°C scale factor
• 0.5°C accuracy guarantee able (at +25°C)
• Rated for full −55° to +150°C range
• Suitable for remote applications
• Low cost due to wafer-level trimming
• Operates from 4 to 30 volts
• Less than 60 μA current drain
• Low self-heating, 0.08°C in still air
• Nonlinearity only ±1⁄4°C typical
• Low impedance output, 0.1 W for 1 mA load
Typical Applications:
Basic Centigrade temperature sensor
(+2°C to +150°C)
Architecture of ADC0808
Clock input
The clock input to the ADC is provided by using a 555 TIMER. The
LM555 is a highly stable device for generating accurate time delays or
oscillation. Additional terminals are provided for triggering or resetting if
desired. For astable operation as an oscillator, the free running frequency
and duty cycle are accurately controlled with two external resistors and
one capacitor. The circuit may be triggered and reset on falling
waveforms, and the output circuit can source or ink up to 200mA or drive
TTL circuits.
Astable Operation
As in the triggered mode, the charge and discharge times, and therefore
the frequency are independent of the supply voltage.
Thus the total period is
1 1.44
f = = ………4
T ( RA + 2 RB ) C
The duty cycle is the ratio of the time during which the output is high to
the total time period T.
555Timer:
The 8-pin 555 timer must be one of the most useful ICs ever made and it
is used in many projects. With just a few external components it can be
used to build many circuits, not all of them involve timing!
A popular version is the NE555 and this is suitable in most cases where a
'555 timer' is specified. The 556 is a dual version of the 555 housed in a
14-pin package, the two timers (A and B) share the same power supply
pins. The circuit diagrams on this page show a 555, but they could all be
adapted to use one half of a 556.
Low power versions of the 555 are made, such as the ICM7555, but these
should only be used when specified (to increase battery life) because their
maximum output current of about 20mA (with a 9V supply) is too low for
many standard 555 circuits. The ICM7555 has the same pin arrangement
as a standard 555.
The circuit symbol for a 555 (and 556) is a box with the pins arranged to
suit the circuit diagram: for example 555 pin 8 at the top for the +Vs
supply, 555 pin 3 output on the right. Usually just the pin numbers are
used and they are not labeled with their function.
The 555 and 556 can be used with a supply voltage (Vs) in the range 4.5
to 15V (18V absolute maximum).
Standard 555 and 556 ICs create a significant 'glitch' on the supply when
their output changes state. This is rarely a problem in simple circuits with
no other ICs, but in more complex circuits a smoothing capacitor (eg
100µF) should be connected across the +Vs and 0V supply near the 555
or 556.
The input and output pin functions are described briefly below and there
are fuller explanations covering the various circuits:
Inputs of 555/556
Trigger input: when < 1/3 Vs ('active low') this makes the output high
(+Vs). It monitors the discharging of the timing capacitor in an astable
circuit. It has a high input impedance > 2M .
Threshold input: when > 2/3 Vs ('active high') this makes the output low
(0V)*. It monitors the charging of the timing capacitor in astable and
monostable circuits. It has a high input impedance > 10M .
* providing the trigger input is > 1/3 Vs, otherwise the trigger input will
override the threshold input and hold the output high (+Vs).
Reset input: when less than about 0.7V ('active low') this makes the
output low (0V), overriding other inputs. When not required it should be
connected to +Vs. It has an input impedance of about 10k .
Control input: this can be used to adjust the threshold voltage which is
set internally to be 2/3 Vs. Usually this function is not required and the
control input is connected to 0V with a 0.01µF capacitor to eliminate
electrical noise. It can be left unconnected if noise is not a problem.
The discharge pin is not an input, but it is listed here for convenience. It
is connected to 0V when the timer output is low and is used to discharge
the timing capacitor in astable and monostable circuits.
Output of 555/556
The output of a standard 555 or 556 can sink and source up to 200mA.
This is more than most ICs and it is sufficient to supply many output
transducers directly, including LEDs (with a resistor in series), low
current lamps, piezo transducers, loudspeakers (with a capacitor in
series), relay coils (with diode protection) and some motors (with diode
protection). The output voltage does not quite reach 0V and +Vs,
especially if a large current is flowing.
The ability to both sink and source current means that two devices can be
connected to the output so that one is on when the output is low and the
other is on when the output is high. The diagram shows two LEDs
connected in this way. This arrangement is used in the Disco Lights
project to make the LEDs flash alternately.
555 astable output, a square wave
(Tm and Ts may be different)
555/556 Astable
An astable circuit produces a
'square wave', this is a digital
waveform with sharp transitions
between low (0V) and high (+Vs).
Note that the durations of the low
and high states may be different.
The circuit is called an astable
because it is not stable in any 555 astable circuit
The time period (T) of the square wave is the time for one complete
cycle, but it is usually better to consider frequency (f) which is the
number of cycles per second.
1.4
T = 0.7 × (R1 + 2R2) × C1 and f =
(R1 + 2R2) × C1
For a standard astable circuit Tm cannot be less than Ts, but this is not
too restricting because the output can both sink and source current. For
example an LED can be made to flash briefly with long gaps by
connecting it (with its resistor) between +Vs and the output. This way the
LED is on during Ts, so brief flashes are achieved with R1 larger than
R2, making Ts short and Tm long. If Tm must be less than Ts a diode can
be added to the circuit as explained under duty cycle below.
555 astable frequencies
R2 = 10k R2 = 100k R2 = 1M
C1
Choosing R1, R2 and R1 = 1k R1 = 10k R1 = 100k
C1 0.001µF 68kHz 6.8kHz 680Hz
R1 and R2 should be in the 0.01µF 6.8kHz 680Hz 68Hz
0.1µF 680Hz 68Hz 6.8Hz
range 1k to 1M . It is
1µF 68Hz 6.8Hz 0.68Hz
best to choose C1 first 0.68Hz 0.068Hz
10µF 6.8Hz
(41 per min.) (4 per min.)
because capacitors are
available in just a few values.
• Choose C1 to suit the frequency range you require (use the table as
a guide).
• Choose R2 to give the frequency (f) you require. Assume that R1
is much smaller than R2 (so that Tm and Ts are almost equal), then
you can use:
0.7
R2 =
f × C1
• Choose R1 to be about a tenth of R2 (1k min.) unless you want
the mark time Tm to be significantly longer than the space time Ts.
• If you wish to use a variable resistor it is best to make it R2.
• If R1 is variable it must have a fixed resistor of at least 1k in
series
(this is not required for R2 if it is variable).
Astable operation
With the output high (+Vs) the capacitor C1 is charged by current
flowing through R1 and R2. The threshold and trigger inputs monitor the
capacitor voltage and when it reaches 2/3Vs (threshold voltage) the output
becomes low and the discharge pin is connected to 0V.
The capacitor now discharges with current flowing through R2 into the
discharge pin. When the voltage falls to 1/3Vs (trigger voltage) the output
becomes high again and the discharge pin is disconnected, allowing the
capacitor to start charging again.
An astable can be used to provide the clock signal for circuits such as
counters.
A low frequency astable (< 10Hz) can be used to flash an LED on and
off, higher frequency flashes are too fast to be seen clearly. Driving a
loudspeaker or piezo transducer with a low frequency of less than 20Hz
will produce a series of 'clicks' (one for each low/high transition) and this
can be used to make a simple metronome.
Duty cycle
For a standard 555/556 astable circuit the mark time (Tm) must be greater
than the space time (Ts), so the duty cycle must be at least 50%:
Tm R1 + R2
Duty cycle = =
Tm + Ts R1 + 2R2
555/556 Monostable
A monostable circuit produces a single output pulse when triggered. It is
called a monostable because it is stable in just one state: 'output low'. The
'output high' state is temporary.
The duration of the pulse is called the time period (T) and this is
determined by resistor R1 and capacitor C1:
Why 1.1? The capacitor charges to 2/3 = 67% so it is a bit longer than the
time constant (R1 × C1) which is the time taken to charge to 63%.
• Choose C1 first (there are relatively few values available).
• Choose R1 to give the time period you need. R1 should be in the
range 1k to 1M , so use a fixed resistor of at least 1k in series if
R1 is variable.
• Beware that electrolytic capacitor values are not accurate, errors of
at least 20% are common.
• Beware that electrolytic capacitors leak charge which substantially
increases the time period if you are using a high value resistor - use
the formula as only a very rough guide!
Monostable operation
The timing period is triggered (started) when the trigger input (555 pin 2)
is less than 1/3 Vs, this makes the output high (+Vs) and the capacitor C1
starts to charge through resistor R1. Once the time period has started
further trigger pulses are ignored.
The threshold input (555 pin 6) monitors the voltage across C1 and when
this reaches 2/3 Vs the time period is over and the output becomes low. At
the same time discharge (555 pin 7) is connected to 0V, discharging the
capacitor ready for the next trigger.
The reset input (555 pin 4) overrides all other inputs and the timing may
be cancelled at any time by connecting reset to 0V, this instantly makes
the output low and discharges the capacitor. If the reset function is not
required the reset pin should be connected to +Vs.
OPTOISOLATOR
IC (MCT- 2E)
POWER AMPLIFIER
USING BC369
TRANSISTOR
ELECTROMAGNETIC
RELAY
SOCKET
Optocoupler:
It has one IR LED and a photo- transistor. One pin of the LED is connected to the
MCU to get a signal (0 or 1) and the pin is given ground. When the signal from the
MCU is 0, then LED emits light. This light will turn on the NPN transistor. Emitter of
the transistor is grounded. Collector is connected to the PNP transistor whose emitter
is connected to Vcc and collector to the relay.
The purpose of using the optocouplers is to pass the supply from the
PC/MCU to the appliances & is for isolation of the port of the PC/MCU
from an external hardware. The voltage signal from the PC/MCU is being
converted into light by the LED and then further converted into voltage
by the phototransistor. This ensures that there is no physical connection
between the PC and the appliances. The signal from the PC/MCU is
coupled only through light so that if in any case the external hardware (
in this case :appliances) produces an error voltage it will not be passed
over to the port of the PC/MCU and will not damage the internal
circuitry of the PC/MCU.
Optocoupler Operation:
Optocouplers are good devices for conveying analog information
across a power supply isolation barrier, they operate over a wide
temperature range and are often safety agency approved they do,
however, have many unique operating considerations.
Optocouplers are current input and current output devices. The
input LED is excited by changes in drive current and maintains a
relatively constant forward voltage. The output is a current which is
proportional to the input current. The output current can easily be
converted to a voltage through a pull-up or load resistor.
Applications:
• AC mains detection
• Reed relay driving
• Switch mode power supply feedback
• Telephone ring detection
• Logic ground isolation
• Logic coupling with high frequency noise rejection.
Features:
• Interfaces with common logic families
• Input-output coupling capacitance < 0.5 pF
• Industry Standard Dual-in line 6-pin package
• 5300 VRMS isolation test voltage
• Lead-free component
Optocoupler (817)
Description
The HCPL-817 contains a light emitting diode optically coupled to a
phototransistor. It is packaged in a 4-pin DIP package and available in
wide-lead spacing option. Input-output isolation voltage is 5000 Vrms.
Response time (tr), is typically 4 ms and minimum CTR (Current transfer
ratio) is 50% at input current of 5 mA.
Electromagnetic Relay
Electromagnetic Relay
Normally closed
Normally open
Changeover
Relay Contacts
The spring sets (contacts) can be a mixture of N.O. N.C. and C.O.
various coil operating voltages (ac and dc) are available. The actual
contact points on the spring sets are available for high current and low
current operation.
NO normally open: The contacts are open until the coil of the relay is
energized, whereupon they are closed to complete the outside circuit
NC normally closed: The contacts are closed until the coil of the relay is
energized, whereupon they are opened to break the outside circuit,
switching it off.
Many relays have multiple contacts, half of which are NO and half
NC. Relays are electromagnetic devices which have a certain amount of
inductance .When they are turned off; the collapse of the magnetic field
can produce a momentary “spike” of high reverse voltage that can wreck
a transistor or integrated circuit. Therefore a reverse biased diode is
placed in parallel to short out the voltage spike, thereby protecting the
circuit.
POWER SUPPLY
Power supplies are designed to convert high voltage AC mains to a
suitable low voltage supply for electronics circuits and other devices.
A power supply can be broken down into a series of blocks, each of
which performs a particular function.
AC.
2. Rectifier – converts AC to DC, but the DC output is varying.
ripple.
4. Regulator – eliminates ripple by setting DC output to a fixed
voltage.
TRANSFORMER
Transformer
Turns ratio = Vp = Np
Vs Ns
And Power Out = Power In
Vs × Is = Vp × Ip
Where
BRIDGE RECTIFIER
A bridge rectifier can be made using four individual diodes, but it is also
called a full-wave rectifier because it uses all AC wave (both positive and
diode uses 0.7V when conducting and there are always two diodes
the maximum current they can pass and the maximum reverse voltage
they can withstand (this must be at least three times the supply RMS
voltage so the rectifier can withstand the peak voltages). In this alternate
pairs of diodes conduct, changing over the connections so the alternating
SMOOTHING
Smoothing is performed by a large value electrolytic capacitor
connected across the DC supply to act as a reservoir, supplying current to
the output when the varying DC voltage from the rectifier is falling.
The diagram shows the unsmoothed varying DC (dotted line) and the
smoothed DC (solid line). The capacitor charges quickly near the peak of
the varying DC, and then discharges as it supplies current to the output.
Note that smoothing significantly increases the average DC voltage to
almost the peak value (1.4 × RMS value). For example 6V RMS AC is
rectified to full wave DC of about 4.6V RMS (1.4V is lost in the
bridge rectifier), with smoothing this increases to almost the peak value
giving 1.4 × 4.6 = 6.4V smooth DC.
Smoothing is not perfect due to the capacitor voltage falling a little as it
discharges, giving a small ripple voltage. For many circuits a ripple
which is 10% of the supply voltage is satisfactory and the equation
below gives the required value for the smoothing capacitor. A larger
capacitor will give fewer ripples. The capacitor value must be doubled
when smoothing half-wave DC.
Smoothing capacitor for 10% ripple, C = 5 × Io
Vs × f
Where
Vs = supply voltage in volts (V), this is the peak value of the unsmoothed
DC
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V)
or variable output voltages. They are also rated by the maximum current
they can pass. Negative voltage regulators are available, mainly for use in
dual supplies. Most regulators include some automatic protection from
excessive current (‘overload protection') and overheating (‘thermal
protection'). Many of the fixed voltage regulator ICs has 3 leads and look
like power transistors, such as the 7805 +5V 1A regulator shown on the
right. They include a hole for attaching a heat sink if necessary.
The low voltage AC output is suitable for lamps, heaters and special AC
motors. It is not suitable for electronic circuits unless they include a
rectifier and a smoothing capacitor.
• Transformer + Rectifier
The varying DC output is suitable for lamps, heaters and standard motors.
It is not suitable for electronic circuits unless they include a smoothing
capacitor.
• Transformer + Rectifier + Smoothing
GND
J 1 D 2 1 0 0 0 u f
3
2 g n d C 1
3
1 V
D 3
D 4
The Microcontroller:
In our day to day life the role of micro-controllers has been immense.
no ROM and no I/O ports on the chip itself. For this reason they are
external RAM, ROM, and I/O ports make the system bulkier and much
more expensive, they have the advantage of versatility such that the
designer can decide on the amount of RAM, ROM and I/o ports needed
to fit the task at hand. This is the not the case with microcontrollers. A
amount of RAM, ROM, I/O ports, and timers are all embedded together
on the chip: therefore, the designer cannot add any external memory, I/O,
or timer to it. The fixed amount of on chip RAM, ROM, and number of
which cost and space are critical. In many applications, for example a TV
remote control, there is no need for the computing power of a 486 or even
power it consumes, and the price per unit are much more critical
require some I/O operations to read signals and turn on and off certain
have gone as far as integrating an ADC and other peripherals into the
microcontrollers.
performs one task only: namely, get data and print it. Contrasting this
run. Of course the reason a PC can perform myriad tasks is that it has
software into RAM and lets the CPU run it. In an embedded system, there
printer, modem, disk controller, sound card, CD-ROM driver, mouse and
performs only one task. For example, inside every mouse there is a
Introduction to 8051:
ROM, two timers, one serial port, and four ports (8-bit) all on a single
chip. The 8051 is an 8-bit processor, meaning the CPU can work on only
8- bit pieces to be processed by the CPU. The 8051 has a total of four I/O
ports, each 8- bit wide. Although 8051 can have a maximum of 64K bytes
allowed other manufacturers to make any flavor of the 8051 they please
with the condition that they remain code compatible with the 8051. This
has led to many versions of the 8051 with different speeds and amount of
important to know that although there are different flavors of the 8051,
they are all compatible with the original 8051 as far as the instructions are
concerned. This means that if you write your program for one, it will run
Corporation, Infineon.
This popular 8051 chip has on-chip ROM in the form of flash memory.
This is ideal for fast development since flash memory can be erased in
However, a ROM eraser is not needed. Notice that in flash memory you
must erase the entire contents of ROM in order to program it again. The
PROM burner does this erasing of flash itself and this is why a separate
burner is not needed. To eliminate the need for a PROM burner Atmel is
Hardware features
40 pin Ic.
4 Kbytes of Flash.
128 Bytes of RAM.
32 I/O lines.
Two16-Bit Timer/Counters.
Five Vector.
Two-Level Interrupt Architecture.
Full Duplex Serial Port.
On Chip Oscillator and Clock Circuitry.
Software features
Bit Manipulations
Single Instruction Manipulation
Separate Program And Data Memory
4 Bank Of Temporary Registers
Direct, Indirect, Register and Relative Addressing.
In addition, the AT89C51 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 hardware reset.
The Atmel Flash devices are ideal for developing, since they can be
reprogrammed easy and fast. If we need more code space for our
application, particularly for developing 89Cxx projects with C language.
Atmel offers a broad range of microcontrollers based on the 8051
architecture, with on-chip Flash program memory.
Pin description:
The 89C51 have a total of 40 pins that are dedicated for various functions
such as I/O, RD, WR, address and interrupts. Out of 40 pins, a total of 32
pins are set aside for the four ports P0, P1, P2, and P3, where each port
takes 8 pins. The rest of the pins are designated as V cc, GND, XTAL1,
XTAL, RST, EA, and PSEN. All these pins except PSEN and ALE are
used by all members of the 8051 and 8031 families. In other words, they
the microcontroller is of the 8051 or the 8031 family. The other two pins,
Vcc
+5V.
GND
Pin 20 is the ground.
Oscillator Characteristics:
Oscillator Connections
It must be noted that there are various speeds of the 8051 family. Speed
crystal oscillator and is powered up, we can observe the frequency on the
RST
Pin 9 is the reset pin. It is an input and is active high (normally low).
Upon applying a high pulse to this pin, the microcontroller will reset and
lost. Notice that the value of Program Counter is 0000 upon reset, forcing
the CPU to fetch the first code from ROM memory location 0000. This
means that we must place the first line of source code in ROM location
0000 that is where the CPU wakes up and expects to find the first
go low.
EA
All the 8051 family members come with on-chip ROM to store programs.
In such cases, the EA pin is connected to the Vcc. For family members
such as 8031 and 8032 in which there is no on-chip ROM, code is stored
8031 the EA pin must be connected to ground to indicate that the code is
stored externally. EA, which stands for “external access,” is pin number
machine cycle.
ALE
address and data through port 0 to save pins. The ALE pin is used for de-
74LS373 chip.
The four ports P0, P1, P2, and P3 each use 8 pins, making
them 8-bit ports. All the ports upon RESET are configured as output,
ready to be used as output ports. To use any of these as input port, it must
be programmed.
Port 0
used for input or output. To use the pins of port 0 as both input and
output ports, each pin must be connected externally to a 10K-ohm
Port 1
Port 2
Port 2 occupies a total of 8 pins (pins 21 to 28). It can be
used as input or output. Just like P1, port 2 does not need any pull-
Port 3
used as input or output. P3 does not need any pull-up resistors, the
port upon reset, this is not the way it is most commonly used. Port
listed below:
1. Internal ROM
The 89C51 has 4K bytes of on-chip ROM. This 4K
fetch code bytes from external memory. Code bytes can also be
program counter doesn’t care where the code is: the circuit
external ROM.
2. Internal RAM
The 1289 bytes of RAM inside the 8051 are assigned
1 6 G n d
1 6 1 5
1 5 V c c
1 4 D 7
1 4 1 3
1 3 D 6
1 2 D 5
1 2 1 1
1 1 D 4
1 0 D 3
1 0 9
9 D 2
8 D 1
8 7
7 D 0
6 E
3
6 5
5 R / W
4 R S
4 3
3 C o n t r a 2s t
2 V c c
2 1
1 G n d
1
31
EA/VPP 33pF 22uF
9
30 RST
ALE/PROG 18 33pF
XTAL2
29 XTAL1 19 16
8.2 K
PSEN 15 16
AT89C51
8 VCC 15
17 P1.7 14
P3.7/RD 7 14
16 P1.6 13
P3.6/WR 6 13
15 P1.5 12
P3.5/T1 5 12
14 P1.4 11
P3.4/TO 4 11
13 P1.3 10
P3.3/INT1 3 9 10
12 P1.2 9
P3.2/INTO 2 8
11 P1.1 8
P3.1/TXD 1 7
10 P1.0 7
P3.0/RXD 6
5 6
28 32 4 5
27 P2.7/A15 P0.7/AD7 33 4
P2.6/A14 P0.6/AD6 3
26 34 2 3
25 P2.5/A13 P0.5/AD5 35 2
P2.4/A12 P0.4/AD4 1
24 36 1
23 P2.3/A11 P0.3/AD3 37
22 P2.2/A10 P0.2/AD2 38
21 P2.1/A9 P0.1/AD1 39
P2.0/A8 P0.0/AD0
3 1
VCC
VCC
(HEX) Register
1 Clear the display screen
2 Return home
4 Decrement cursor(shift cursor to left)
6 Increment cursor(shift cursor to right)
7 Shift display right
8 Shift display left
9 Display off, cursor off
A Display off, cursor on
C Display on, cursor off
E Display on, cursor blinking
F Display on, cursor blinking
10 Shift cursor position to left
14 Shift cursor position to right
18 Shift the entire display to left
1C Shift the entire display to right
80 Force cursor to the beginning of 1st line
C0 Force cursor to the beginning of 2nd line
38 2 line and 5×7 matrix
Interfacing circuit of Microcontroller & ADC along with
LCD:
5. Name the file with extension (.asm for assembly language code & .c
for embedded C language code).
6. Click the Save Button
Adding File to the Project
1. Expand Target 1 in the Tree Menu