SlideShare a Scribd company logo
THE 8051
MICROCONTROLLER :
I/O INTERFACING
Presented by:-
Abhinav Shubham(131046)
&
Tanmay Kapoor(131053)
11/27/2015
TOPICS OF
DISCUSSION:-
What is IO interfacing?
Recapitulation of PIN Configuration of 8051
Devices to be interfaced
How they are interfaced?
Queries…
11/27/2015
WHAT IS IO INTERFACING
 Input-output interface provides a method for transferring information between
internal storage and external I/O devices.
 Peripherals connected to a microcontroller need special communication links
for interfacing them with the CPU. The purpose of the communication link is to
resolve the differences that exist between the CPU and each peripheral.
The major differences are:
Peripherals are electromechanical and electromagnetic devices and their
manner of operation is different from the operation of the CPU and memory,
which are electronic devices. Therefore, a conversion of signal values may be
required.
The data transfer rate of peripherals is usually slower than the transfer rate of
the CPU, and consequently, a synchronization mechanism may be needed,
etc…..
11/27/2015
PIN CONFIGURATION OF 8051
11/27/2015
Each
port0,port1,port2,
port3 are bidirectional
and 8-bit I/O ports.
Above data for ATMEL
AT89S51
DEVICES WE WILL BE
INTERFACING:-
 LEDS
 LCD
 KEYBOARD
11/27/2015
INTERFACING LEDS
• Connection -Port 0 is connected to eight LEDs,
each of them is connected to 5V through a 330
ohm resistor. Port 1 is connected to a DIP switch
and a 10Kohm resistor
• Condition - Corresponding led should light up
when switch is pressed , i.e. if Switch at P1.0 is
pressed then LED at P0.0 should light up.
11/27/2015
INTERFACING
LEDS(CONTD.)
11/27/2015
CONSIDER…
11/27/2015
HOW TO PROGRAM ?? ..
ASSEMBLY LANGUAGE
LOOP:
mov p1,#0ffh ; To
configure
port1 for input.
mov a,p1
mov p0,a
sjmp LOOP ; Stay in infinite
loop
C LANGUAGE
void main()
unsigned char S;
P1= 0xff; //port1 as input
P0= 0x00; //port0 as output
{
while (1)
{
S=P1; //switch value
P0=P1; //display on led
}
}
11/27/2015
INTERFACING LCD
• LCD is finding widespread use replacing LED
• The declining prices of LCD
• Ability to display numbers, characters and graphics
• Incorporation of a refreshing controller(graphics
controller, e.g. HD44780) within the LCD, there by
relieving the CPU of an additional task.
• LCD is far better than 7 segment display as it has far
better graphics.
• Ease of programming for characters and graphics
11/27/2015
PIN OUT
(LCD)
,16*2
DISPLAY
,
5*7
MATRIX
11/27/2015
11/27/2015
LCD CONNECTIONS
 To send a command :-
 Specify command to
data pins.
 Make R/W=0 (write
operation)
Make RS=0 (select
command register)
Give a H-to-L pulse to
E(enable pin).
 To send data:-
 Write data to data pins
 R/W =0 (write operation)
 Make RS=1 (select data
register)
 Give a H-to-L pulse to
E(enable pin).Data is written
on positive edge of enable
signal.
11/27/2015
ANOTHER ASPECT TO BE TAKEN
CARE OF…. BUSY FLAG(D7-PIN)
• Some delay is needed for LCD to successfully process the
command or data(processing time of lcd).
• So, before data to be written, check if lcd is busy(check the D7-
pin status(if 1 then busy)
• Reading the Busy flag.
• Select command register (RS=0)
• Select read operation (R/W=1)
• Send enable signal (E=1)
• Read the flag
11/27/2015
KEYBOARD
INTERFACING
• Keypad(keyboard) is a widely used input device with lots of
application in our everyday life.
• From a simple telephone to keyboard of a computer, ATM,
electronic lock, elevator, etc., keypad is used to take input
from the user for further processing.
• Keypad is organized as a matrix of switches in rows and
column.
11/27/2015
SO HOW DOES KEYPADS
WORK??..
11/27/2015
 It’s a matrix of rows and
columns(here 4*4)
 Rows and columns intersect at
16 points.(when pressed)
 One of them are connected to
power supply and other one
grounded…
CONNECTIONS TO
PORTS
11/27/2015
Initially all the rows are set to
zero by the controller and the
columns are scanned to check
if any key is pressed. In case
no key is pressed the output of
all the columns will be high.
Whenever a key is pressed the
row and column corresponding
to the key will get short, resulting
in the output of the
corresponding column goes to
low (since we have made all the
rows zero). This gives the
column number of the pressed
key.
Once the column number is detected,
the controller set’s all the rows to
high. Now one by one each row is set
to zero by controller and the earlier
detected column is checked if it
becomes zero. The row
corresponding to which the column
gets zero is the row number of the
digit.
THANK YOU!!!
11/27/2015

More Related Content

What's hot

8085 instruction set
8085 instruction set8085 instruction set
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
Srikrishna Thota
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
Aarav Soni
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
KanchanPatil34
 
I o ports.ppt
I o ports.pptI o ports.ppt
I o ports.ppt
Pradeep V Dev
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
Monica Gunjal
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
Ankit Bhatnagar
 
TMS320C5x
TMS320C5xTMS320C5x
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
Poojith Chowdhary
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
SARITHA REDDY
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
DEPARTMENT OF PHYSICS
 
Timing diagram 8085 microprocessor
Timing diagram 8085 microprocessorTiming diagram 8085 microprocessor
Timing diagram 8085 microprocessor
Velalar College of Engineering and Technology
 
Interfacing external memory in 8051
Interfacing external memory in 8051Interfacing external memory in 8051
Interfacing external memory in 8051
ssuser3a47cb
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
anishgoel
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
Sudhanshu Janwadkar
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
Unit4.tms320c54x
Unit4.tms320c54xUnit4.tms320c54x
Pin diagram 8085
Pin diagram 8085 Pin diagram 8085
Pin diagram 8085
Siddhesh Palkar
 
Multipliers in VLSI
Multipliers in VLSIMultipliers in VLSI
Multipliers in VLSI
Kiranmai Sony
 

What's hot (20)

8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
I o ports.ppt
I o ports.pptI o ports.ppt
I o ports.ppt
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
 
TMS320C5x
TMS320C5xTMS320C5x
TMS320C5x
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
 
Timing diagram 8085 microprocessor
Timing diagram 8085 microprocessorTiming diagram 8085 microprocessor
Timing diagram 8085 microprocessor
 
Interfacing external memory in 8051
Interfacing external memory in 8051Interfacing external memory in 8051
Interfacing external memory in 8051
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
Unit4.tms320c54x
Unit4.tms320c54xUnit4.tms320c54x
Unit4.tms320c54x
 
Pin diagram 8085
Pin diagram 8085 Pin diagram 8085
Pin diagram 8085
 
Multipliers in VLSI
Multipliers in VLSIMultipliers in VLSI
Multipliers in VLSI
 

Similar to 8051 io interface

Unit 5
Unit 5Unit 5
Unit 5
tamilnesaner
 
8051.pdf
8051.pdf8051.pdf
Embeded system by Mitesh Kumar
Embeded system by Mitesh KumarEmbeded system by Mitesh Kumar
Embeded system by Mitesh Kumar
Mitesh Kumar
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
thokalpv
 
microcontroller and embedded system
microcontroller and embedded systemmicrocontroller and embedded system
microcontroller and embedded systempradeep rana
 
Ppt embedded
Ppt embeddedPpt embedded
Ppt embedded
karan bansal
 
8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt
notagain0712
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
Chirag Lakhani
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdf
satyamsinha37
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
Amandeep Alag
 
Calculator design with lcd using fpga
Calculator design with lcd using fpgaCalculator design with lcd using fpga
Calculator design with lcd using fpga
Hossam Hassan
 
1913523 vanshika
1913523 vanshika1913523 vanshika
1913523 vanshika
VANSHIKAKUSHWAH
 
Class8
Class8Class8
I Ointerface in mp
I Ointerface in mpI Ointerface in mp
I Ointerface in mpAisu
 
Galil ioc7007 catalog
Galil ioc7007 catalogGalil ioc7007 catalog
Galil ioc7007 catalog
Electromate
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
MeghdeepSingh
 
embedded system
embedded systemembedded system
embedded system
Vivek Ranjan
 
Embedded System
Embedded SystemEmbedded System
Embedded System
Richa Arora
 
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptxUnit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
SamarpitaBakshi
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
Sadiq Rahim
 

Similar to 8051 io interface (20)

Unit 5
Unit 5Unit 5
Unit 5
 
8051.pdf
8051.pdf8051.pdf
8051.pdf
 
Embeded system by Mitesh Kumar
Embeded system by Mitesh KumarEmbeded system by Mitesh Kumar
Embeded system by Mitesh Kumar
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
microcontroller and embedded system
microcontroller and embedded systemmicrocontroller and embedded system
microcontroller and embedded system
 
Ppt embedded
Ppt embeddedPpt embedded
Ppt embedded
 
8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdf
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 
Calculator design with lcd using fpga
Calculator design with lcd using fpgaCalculator design with lcd using fpga
Calculator design with lcd using fpga
 
1913523 vanshika
1913523 vanshika1913523 vanshika
1913523 vanshika
 
Class8
Class8Class8
Class8
 
I Ointerface in mp
I Ointerface in mpI Ointerface in mp
I Ointerface in mp
 
Galil ioc7007 catalog
Galil ioc7007 catalogGalil ioc7007 catalog
Galil ioc7007 catalog
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 
embedded system
embedded systemembedded system
embedded system
 
Embedded System
Embedded SystemEmbedded System
Embedded System
 
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptxUnit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 

Recently uploaded

CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 

Recently uploaded (20)

CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 

8051 io interface

  • 1. THE 8051 MICROCONTROLLER : I/O INTERFACING Presented by:- Abhinav Shubham(131046) & Tanmay Kapoor(131053) 11/27/2015
  • 2. TOPICS OF DISCUSSION:- What is IO interfacing? Recapitulation of PIN Configuration of 8051 Devices to be interfaced How they are interfaced? Queries… 11/27/2015
  • 3. WHAT IS IO INTERFACING  Input-output interface provides a method for transferring information between internal storage and external I/O devices.  Peripherals connected to a microcontroller need special communication links for interfacing them with the CPU. The purpose of the communication link is to resolve the differences that exist between the CPU and each peripheral. The major differences are: Peripherals are electromechanical and electromagnetic devices and their manner of operation is different from the operation of the CPU and memory, which are electronic devices. Therefore, a conversion of signal values may be required. The data transfer rate of peripherals is usually slower than the transfer rate of the CPU, and consequently, a synchronization mechanism may be needed, etc….. 11/27/2015
  • 4. PIN CONFIGURATION OF 8051 11/27/2015 Each port0,port1,port2, port3 are bidirectional and 8-bit I/O ports. Above data for ATMEL AT89S51
  • 5. DEVICES WE WILL BE INTERFACING:-  LEDS  LCD  KEYBOARD 11/27/2015
  • 6. INTERFACING LEDS • Connection -Port 0 is connected to eight LEDs, each of them is connected to 5V through a 330 ohm resistor. Port 1 is connected to a DIP switch and a 10Kohm resistor • Condition - Corresponding led should light up when switch is pressed , i.e. if Switch at P1.0 is pressed then LED at P0.0 should light up. 11/27/2015
  • 9. HOW TO PROGRAM ?? .. ASSEMBLY LANGUAGE LOOP: mov p1,#0ffh ; To configure port1 for input. mov a,p1 mov p0,a sjmp LOOP ; Stay in infinite loop C LANGUAGE void main() unsigned char S; P1= 0xff; //port1 as input P0= 0x00; //port0 as output { while (1) { S=P1; //switch value P0=P1; //display on led } } 11/27/2015
  • 10. INTERFACING LCD • LCD is finding widespread use replacing LED • The declining prices of LCD • Ability to display numbers, characters and graphics • Incorporation of a refreshing controller(graphics controller, e.g. HD44780) within the LCD, there by relieving the CPU of an additional task. • LCD is far better than 7 segment display as it has far better graphics. • Ease of programming for characters and graphics 11/27/2015
  • 13. LCD CONNECTIONS  To send a command :-  Specify command to data pins.  Make R/W=0 (write operation) Make RS=0 (select command register) Give a H-to-L pulse to E(enable pin).  To send data:-  Write data to data pins  R/W =0 (write operation)  Make RS=1 (select data register)  Give a H-to-L pulse to E(enable pin).Data is written on positive edge of enable signal. 11/27/2015
  • 14. ANOTHER ASPECT TO BE TAKEN CARE OF…. BUSY FLAG(D7-PIN) • Some delay is needed for LCD to successfully process the command or data(processing time of lcd). • So, before data to be written, check if lcd is busy(check the D7- pin status(if 1 then busy) • Reading the Busy flag. • Select command register (RS=0) • Select read operation (R/W=1) • Send enable signal (E=1) • Read the flag 11/27/2015
  • 15. KEYBOARD INTERFACING • Keypad(keyboard) is a widely used input device with lots of application in our everyday life. • From a simple telephone to keyboard of a computer, ATM, electronic lock, elevator, etc., keypad is used to take input from the user for further processing. • Keypad is organized as a matrix of switches in rows and column. 11/27/2015
  • 16. SO HOW DOES KEYPADS WORK??.. 11/27/2015  It’s a matrix of rows and columns(here 4*4)  Rows and columns intersect at 16 points.(when pressed)  One of them are connected to power supply and other one grounded…
  • 17. CONNECTIONS TO PORTS 11/27/2015 Initially all the rows are set to zero by the controller and the columns are scanned to check if any key is pressed. In case no key is pressed the output of all the columns will be high. Whenever a key is pressed the row and column corresponding to the key will get short, resulting in the output of the corresponding column goes to low (since we have made all the rows zero). This gives the column number of the pressed key. Once the column number is detected, the controller set’s all the rows to high. Now one by one each row is set to zero by controller and the earlier detected column is checked if it becomes zero. The row corresponding to which the column gets zero is the row number of the digit.

Editor's Notes

  1. Note- port1 used as output, port2 used as control port of lcd