1 Ports Paralelos no 8051 Disciplina: Microcontroladores Prof. Remy Eskinazi, MSc CEFET-PE.

Slides:



Advertisements
Similar presentations
The 8051 MicroController In this module, we will be discussing the MCS-51 family of microcontroller, in particular the 8051, which is the generic IC representative.
Advertisements

4/10/2007ESD,USIT,GGSIPU1 I/O Port Programming Port 1 pins 1-8 Port 1 is denoted by P1. –P1.0 ~ P1.7 We use P1 as examples to show the operations on ports.
Chapter 18 The 8051 Microcontroller
Basic Microprocessor Timing
Parul Polytechnic Institute
The Intel 8255 Programmable Peripheral Interface chip is used to give the microprocessor (8088) access to programmable input/ output devices. It has three.
Chapter 4 I/O Port Programming
Autumn 2012C.-S. Shieh, EC, KUAS, Taiwan1 The 8051 Family Microcontroller Chin-Shiuh Shieh Department of Electronic Engineering.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
A Design Example An Exact Calculator. Exact Calculator Manipulating Large Integer Values Operations: – +, -, *, /, %, And, Or, Xor, Not, Power Functions.
Suranaree University Of Technology มทส  2002 Anant Oonsivilai 2002/2/25 Microcomputers and Microprocessors 1 Chapter 4 I/O Port Programming.
Khaled A. Al-Utaibi 8086 Bus Design Khaled A. Al-Utaibi
Memory & IO Interfacing to CPU
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
CHAPTER 4 I/O PORT PROGRAMMING. I/O Port Pins The four 8-bit I/O ports P0, P1, P2 and P3 each uses 8 pins All the ports upon RESET are configured as input,
8086.  The 8086 is Intel’s first 16-bit microprocessor  The 8086 can run at different clock speeds  Standard 8086 – 5 MHz  –10 MHz 
MEMORY ORGANIZATION Memory Hierarchy Main Memory Auxiliary Memory
4-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Hardware Detail of Intel.
Chapter Hardware Connection and Intel Hex File
Microcontroller 8051.
The 8051 Microcontroller Architecture, Programming and Applications
The 8051 Microcontroller architecture
Hardware Summary ECE473/573 Microprocessor System Design, Dr. Shiue.
8051 I/O Interfacing  Need for more ports  PPI 8255  8255 – 8051 Interfacing  Key board Interfacing  LED Interfacing  7 Segment LED Interfacing.
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
Embedded Systems Design 1 Lecture Set 6 I/O Ports.
MICROCONTROLERUL ONIGA ŞTEFAN Curs 1999/ MICROCONTROLERE - Calculator pe un cip deoarece el conţine pe lângă CPU şi memorie şi interfeţe de.
به نام یکتای هستی بخش درس ریزپردازنده یک گروه دکتر ثنایی جلسه اول.
Address Decoding Memory/IO.
MCS-51 Hardware Interfacing
MOBILE OPERATING ROBOT ON EMBEDDED SYSTEM
Input/Output Interface Circuits and LSI Peripheral Devices
An Introduction to Microcontroller (Hardware Specification) Lec note 4
Minimum System Requirements Clock Generator Memory Interfacing.
CHAPTER HARDWARE CONNECTION. Pin Description 8051 family members ◦ e.g., 8751, 89C51, 89C52, DS89C4x0) ◦ Have 40 pins dedicated for various functions.
MCS51 - part 2. Lecture 2 2/17 MCS51 functioning Clock generator Machine & instruction cycles Paralell ports Reset.
Microcontroller Intel 8051 [I/O Ports]. Pin out of the 8051 –40 pin package –32 pins are used for the 4 ports. –V CC / V SS –ALE Address Latch Enable.
CIT 673 Created by Suriyong1 Micro controller hardware architechture.
Presented by Sadhish Prabhu
Chapter Microcontroller
8085 Microprocessor: Architecture & Support Components.
HJD Institute of Technical Education & Research- Kera(Kutch) The 8051 Microcontroller architecture PREPARED BY: RAYMA SOHIL( )
Memory Mapped IO (and the CerfBoard). The problem How many IO pins are available on the 8051? What if you are using interrupts, serial, etc…? We want.
WEATHER MONITORING SYSTEM. User Requirements  Design a weather monitoring system that detects the following parameters  Temperature  Pressure  Relative.
8255 Programmable Peripheral Interface
EEE /INSTR/CS F241 ES C263 Microprocessor Programming and Interfacing
The 8051 Microcontroller architecture
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
EE3541 Introduction to Microprocessors
Hardware Source: ttp:// under
The 8051 Family Microcontroller
Data bus CPU General Purpose microprocessor RAM ROM I/O Port Timer
In The Name Of God Microcontroller 8051
Microprocessors course
Engineering 4862 Microprocessors Lecture 25
(Electrical Engg 6th Semester)
Memory organization On- chip memory Off-chip memory
Example: Addressing modes
The 8051 Microcontroller (8 bit )
Microcontroller 8051 Made By: Arun Branch. 4th Sem. I&C Engg.
The 8051 Microcontroller and Embedded Systems
Programmable Peripheral Interface
First Design Key board R L S.
Hardware Source: ttp:// under
UNIT-VIII 8051 Microcontroller Architecture Register set of 8051
Microprocessors course
The 8051 Microcontroller (8 bit )
CHAPTER HARDWARE CONNECTION.
CHAPTER 4 I/O PORT PROGRAMMING.
Presentation transcript:

1 Ports Paralelos no 8051 Disciplina: Microcontroladores Prof. Remy Eskinazi, MSc CEFET-PE

2 Ports Paralelos no 8051 Port 0 Port Paralelo AD 0 – AD 7 Port 1 Port Paralelo Port2 Port Paralelo A 8 – A 15 Port3 Port Paralelo P3.0 - P3.7 = RX, TX, int0, int1, T0, T1, WR, RD

3 Circuito Interno Genérico O que pode ser feito: –Escrever no pino –Leitura do latch –Leitura do pino D Q Clk Q Vcc Load(L1) Read latch Read pin Write to latch Internal CPU bus M1 Port pin Latch TB1 TB2

4 Escrevendo “1” D Q Clk Q Vcc Load(L1) Read latch Read pin Write to latch Internal CPU bus M1 Port pin Latch 2. Pino de saída é Vcc 1. Escreve “1” no pino 1 0 output 1 TB1 TB2

5 Escrevendo “0” D Q Clk Q Vcc Load(L1) Read latch Read pin Write to latch Internal CPU bus M1 Port pin Latch 2. Pino de saída é GND 1. Escreve “0” no pino 0 1 output 0 TB1 TB2

6 Lendo “1”em um Pino de Entrada D Q Clk Q Vcc Load(L1) Read latch Read pin Write to latch Internal CPU bus M1 Port pin Latch 2. MOV A,P1 external pin=High 1.Escreve “1”para o pino MOV P1,#0FFH Read pin=1 Read latch=0 Write to latch=1 1 TB1 TB2

7 Leitura de Pino ou Leitura de Latch Na leitura dos ports existem duas possibilidades –Leitura do status do pino. ( leitura externa ) MOV A, P1 JNB P2.1, TARGET ; jump if P2.1 is not set JB P2.1, TARGET ; jump if P2.1 is set –Leitura do latch interno do pino. ANL P1, A ; P1 ← P1 AND A ORL P1, A ; P1 ← P1 OR A INC P1 ; increase P1

8 Pinos do Port0 – ( open drain ) D Q Clk Q Read latch Read pin Write to latch Internal CPU bus M1 Port pin Latch TB1 TB2

9 Port0 com Pull-Up

10 ROM Externa D 74LS373 ALE P0.0 P0.7 PSEN A0 A7 D0 D7 P2.0 P2.7 A8 A15 OE OC EA G 8051 ROM

11 Leitura da ROM (1/2) D 74LS373 ALE P0.0 P0.7 PSEN A0 A7 D0 D7 P2.0 P2.7 A8 A12 OE OC EA G 8051 ROM 1. Envia end. P/ ROM latches o end. e envia p/ ROM Address

12 Leitura da ROM (2/2) D 74LS373 ALE P0.0 P0.7 PSEN A0 A7 D0 D7 P2.0 P2.7 A8 A12 OE OC EA G 8051 ROM latches o end. e envia p/ ROM Address 3. ROM envia a instrução

13 Expansão de E/S Paralela Interface Paralela 8255 A0 RD RST WR CS D0 D7 PA0 PA7 PB0 PB7 PC0 PC7 A1 A0Port 00A 01B 10C 11Configura Tabela de configuração

14 Expansão de E/S Paralela A15 A14 A13 A12 A11 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 D7 D6 D5 D4 D3 D2 D1 D0 RD WR RST CS A1 A0 D7 D6 D5 D4 D3 D2 D1 D0 RD WR RST Bus Endereço 8051Port FFFCHA FFFDHB FFFEHC FFFFH Configura

15 A15 A14 A13 A12 A11 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 D7 D6 D5 D4 D3 D2 D1 D0 RD WR RST Bus 8051 ALE P0.0 P P2.0 P2.7 EA LatchLatch RD WR RST PA0 PA7 PB0 PB7 PC0 PC7 CS A1 A0 D7 D6 D5 D4 D3 D2 D1 D0 RD WR RST 8255 Expansão de E/S Paralela

16 Expansão ROM e RAM

17 Aplicativo: Teclado F E D C B A P1.0 P1.3 P1.4 P1.7 0

18 Aplicativo: Teclado Algoritmo: Tecla = Peso + Deslocamento P1.4 = 0 => Peso 0 P1.5 = 0 => Peso 4 P1.6 = 0 => Peso 8 P1.7 = 0 => Peso 12 P1.0 = 0 => deslocamento 0 P1.1 = 0 => deslocamento 1 P1.2 = 0 => deslocamento 2 P1.3 = 0 => deslocamento 3 INICIO P1.4  0 (P1  0EFh) Peso = 0 Subrotina Tecla Tecla? (A  FF?) Shift Bit Esq P1 Peso = Peso+4 Peso = 16? RET Subrotina Tecla P1.0 = 0 ? Tecla = Peso + 0 P1.1= 0 ? Tecla = Peso+ 1 P1.2 = 0 ? Tecla = Peso+2 P1.3 = 0 ? Tecla = Peso+3 RET S S N N A  0FFh