Professional Documents
Culture Documents
Microcontroller Based Trainer Kit: Prepared By: - Vrushank Shah Rushvi Rajan Krina Patel
Microcontroller Based Trainer Kit: Prepared By: - Vrushank Shah Rushvi Rajan Krina Patel
Trainer Kit
Prepared By:
- Vrushank Shah
Rushvi Rajan
Krina Patel
What Is Trainer Kit ?
S ————►
E A 8051
N D
S 40
C
O PIN
R DIP
LCD
DISPLAY
<
8051 <
<
<
< <
<
<
<
<
P0.0 ————►
P0.1 ————►
Led
<
8051
^^^^^^ ^^^^^^
P0.0 ^^^^^^
P0.1 ^^^^^^
P0.2 ^^^^^^
P0.3 ^^^^^^
P0.4 ^^^^^^
P0.5 ^^^^^^
P0.6 ^^^^^^
P0.7 ^^^^^^
Key Board
• Keyboards are the input devices and is
generally organized in a matrix of rows
and columns.
• When a key is pressed row makes a
contact with column, otherwise there is no
connection.
• Figure shows a 4×4 matrix keyboard
LCD
• It is an Intelligent Alphanumeric display which can be
used to display numbers, characters, and graphics.
• It has 14 pins as shown in pin diagram.
• Display contains 2 internal byte wide registers, one for
command (RS=0) and one for display (RS=1).
• There are certain commands to be send to the Lcd for
making some setting such as clear screen, force the
cursor to home position and blink the cursor.
• R/W pin is set to 1 for reading and to 0 for writing.
• EN pin is set to 1 for enabling display.
• DB0-DB7 are pins for 8-bit data bus.
Interfacing Lcd with 8051
8051
P1.0 D0
4×16 Character LCD Display
P1.7 D7
E RS R/W Gnd Vee Vcc
P2.0
P2.1 +5v
P2.2
^^^^^^
10k
Real Time Clock
• RTC is widely used device that provides
accurate time and date for many
applications.Figure shows interfacing of
RTC chip DS12887 to 8051.
• It has a total of 128 bytes of non volatile
RAM.
• It uses 14 bytes of RAM for clock calender
and control registers and other 114 bytes
of RAM for general purpose data storage.
RTC interfacing with 8051
VCC
8051
RST crystal
SDA
SCL
DS1307
SQW\OUT
GND
VCC Primary Power Supply
1 Minutes
2 Hours
3 Day of Month
4 Date
5 Month
6 Year
7 Control Register
8 56×8
3FH RAM
ADC
• ADC0808 allows us to monitor upto 8 different analog
inputs using a single chip.
• 8 analog input s are multiplexed and selected using 3
address pins(A,B,C).
• SOC and EOC are for start of conversion and End of
conversion
• OE is for output Enable.
• IN0-IN7 pins are for analog inputs and D0-D7 are for
digital outputs.
• ADC converts analog data to digital by using Succesive
Approximation Method.
Interfacing of ADC+5vto 8051
Vcc
P2.6 RD(OE) Vref(+)
P2.5 o 2.56V
WR(SC)
P0.1 D0
}
IN0
ADC From Sensors
0808 output
8051
P0.7 D7
ALE IN7
P2.4
P2.3 INTR(EOC)
Vref(-)
P2.0
P2.2
P2.1
A B C
Digital to Analog convertor
• For Digital to Analog Conversion,
DAC0808 is used
• DAC0808 employs two methods for
converting Digital signal to Analog signal
1. binary weighted
2. R/2R Ladder Network
Interfacing DAC
+5V
to 8051
+5v
R1
8051 Vcc ^^^^^^
P1.0 D0 R3
Vref (+) ^^^^^^
Out - R2 Vout
^^^^^^
P1.7 D7 +
Vref(-) C2
Vee Gnd
Comp
c1
-12V
Sensors
• Sensors are the devices capable of converting
the physical data such as temperature, light
Intensity and pressure into the corresponding
voltage.
• TEMPERATURE SENSORS:
Thus Temperature Sensors are the devices
whose output voltage is proportional to input
temperature. In such sensors 0۬۬°C is set to 0
mv and for each degree change the output
voltage changes by 10mv.
figure shows LM35 temperature Sensor
• LM35 operates in a temperature range of -55°C to
+150°c.
• These device do not require any external
calibration, since it is internally calibrated.
• Signal Conditioning:
ø The output of all kind of sensors are in the form of
voltage,current,charge,capacitance and resistance.
ø However, we need to convert these signals to voltage in
order to send it to ADC. This conversion is commonly
called signal conditioning.
ø Signal conditioning may be current-to-voltage conversion or
it may be simply a signal amplication. These may be done
using a simple opamp circuit.
8255 programmable peripheral I/O
• 8051 Microcontroller has only 32 pins for
I/O which doesn’t meet our requirement of
interfacing all of the modules, these leads
to use 8255 PPI.
• 8255 is basically programmable peripheral
I/O which increases the I/O capability of
8051 upto 3 times i.e. 8 port pins of 8051
is converted to 24 port pins at 8255
output.
• Figure shows pins diagram of 8255 PPI
How To Proceed ?
• Initially we interfaced LED, 7-segment and
Keyboard and check programme which is
the purpose of trainer Kit.
• In these way we go step by step for each
module interface and accomplish the goal
of making a well-functioning Trainer Kit.
• Finally we add some features by
interfacing Sensors for temperature
controlling and RTC for a Digital clock.
Applications: