CPUMemoryIO-1IO-2 Address BUS Data BUS Control BUS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Memory Map 01230123 IO Map 8bytes 2bytes IO-1 IO-2 A3~A0 D7~D0.

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

Basic Microprocessor Timing
8086 [2] Ahad. Internal! External? 8086 vs _bit Data Bus 20_bit Address 8_bit Data Bus 20_bit Address Only external bus of 8088 is.
11-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL I/O System Design.
The Intel 8255 Programmable Peripheral Interface chip is used to give the microprocessor (8088) access to programmable input/ output devices. It has three.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
OUTPUT INTERFACE – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
Memory & IO Interfacing to CPU
Memory –Random Access Memory Read/Write, volatile –Read-Only Memory Program, non-volatile Programable ROM Erasable PROM –UV EPROM –Electrical EPROM –Flash.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
kashanu.ac.ir Microprocessors 6-1 I/O Devices Switches, LED, LCD Lec note 6.
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Engineering 4862 Microprocessors Lecture 23 Cheng Li EN-4012
Introduction to Microprocessors (CS 45) Session Microprocessor - 2.
The 8085 Microprocessor Architecture. Contents The 8085 and its Buses. The address and data bus ALU Flag Register Machine cycle Memory Interfacing The.
MEMORY ORGANIZATION Memory Hierarchy Main Memory Auxiliary Memory
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
INPUT-OUTPUT ORGANIZATION
Microcomputer & Interfacing Lecture 2
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
CPU Interfacing Memory.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Lecture 06: Memory Address Decoding
CprE 211 Break-out Board Layout
MCS-51 Hardware Interfacing
Port Mapped I/O.
Basic I/O Interface A Course in Microprocessor
By, Prof. Tambe S. S. S.N.D. College of Engineering and Research Center Department of Electrical Engineering.
8086/8088 Hardware Specifications Power supply:  +5V with tolerance of ±10%;  360mA. Input characteristics:  Logic 0 – 0.8V maximum, ±10μA maximum;
Computer Architecture Lecture 9 by Engineer A. Lecturer Aymen Hasan AlAwady 10/2/2014 University of Kufa - Information Technology Research and Development.
Chapter 11Chapter 12 Memory system designI/O system design Objectives: The importance of bus buffering How the 8088 addresses (accesses) memory - I/O ports.
8086/8088 Hardware System. Typical Microprocessor Memory System CPU Memory Control Address Data.
Microprocessor Microprocessor (cont..) It is a 16 bit μp has a 20 bit address bus can access upto 220 memory locations ( 1 MB). It can support.
Programmable Peripheral Interface Parallel port Interface 8255
Computer Architecture Lecture 6 by Engineer A. Lecturer Aymen Hasan AlAwady 1/12/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
EE3721 Computer System Principles
I/O AND THE 8255; ISA BUS INTERFACING
CIT 673 Created by Suriyong1 Micro controller hardware architechture.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
ENEE 440 Chapter PPI 8255 Register Select -CS A1 A0 REGISTER R/W PORT A R/W PORT B R/W PORT C R/W CR W 1 X X8255 NOT.
EE365 - Microprocessors period 26 10/23/00 D. R. Schertz # Parallel Ports.
Khaled A. Al-Utaibi  I/O Ports  I/O Space VS Memory Space  80x86 I/O Instructions − Direct I/O Instructions − Indirect I/O Instructions.
I/O Interface. INTRO TO I/O INTERFACE I/O instructions (IN, INS, OUT, and OUTS) are explained. Also isolated (direct or I/O mapped I/O) and memory-mapped.
1 Expanded Modes, Bus, External Memory Today: First Hour: Expanded Modes, Bus, Timing –Section of Huang’s Textbook –In-class Activity #1 Second.
The System Bus. Conceptual CPU Block Diagram Datapath Regs Buses ALU Control Unit Bus Interface IR etc. PC etc. Control Signals Status Signals PSR System.
Chapter Microcontroller
8255:Programmable Peripheral Interface
8085 Microprocessor: Architecture & Support Components.
1 Bringing it all together: Exploring the EVB Today: First Hour: Bringing it all together by exploring the EVB –Section of Huang’s Textbook.
ECE 447 Fall 2009 Lecture 12: TI MSP430 External LCD.
Vishwakarma government engineering college Prepare by. Hardik Jolapara( ) LCD Interfacing with ATmega16.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
NAM S.B MDLAB. Electronic Engineering, KNU 1 Microcomputer system design.
ECE 447: Lecture 3 Microcontroller Programming in C.
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.
Intel 8255A PPI EEE 365 [FALL 2014] LECTURE ATANU K SAHA BRAC UNIVERSITY.
8255 Programmable Peripheral Interface
Input/Output Ports and Interfacing
TI ARM I/O Programming Chapter 2
Interfacing I/O Devices
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
The 8255 Programmable Peripheral Interface
CH2 : Memory & IO map design
Parallel communication interface 8255
Analog-to-Digital Converters
Programmable Peripheral Interface
External Read Cycle How fast does The RAM have to Be? 7 osc. Cycles
8253.
Presentation transcript:

CPUMemoryIO-1IO-2 Address BUS Data BUS Control BUS Memory Map IO Map 8bytes 2bytes IO-1 IO-2 A3~A0 D7~D0 A3~A0 A1~A0 기본개념

CPUIO-1 A1 A0 /IORQ /CS control data D7 D6 D5 D4 D3 D2 D1 D0 R/W A1 A0 unsigned char *port; port = (unsigned char *)0x0; *port = 0x12; D7 D6 D5 D4 D3 D2 D1 D Address Decoder /IO1_CS Control Register Write

CPUIO-1 A1 A0 /IORQ /CS control data D7 D6 D5 D4 D3 D2 D1 D0 R/W A1 A0 unsigned char *port; unsigned char data; port = (unsigned char *)0x1; Data = *port; D7 D6 D5 D4 D3 D2 D1 D Address Decoder /IO1_CS Data Register Read Address Decoder 는 1)Logic Gate 로 구현 2)Nx2N Decoder 로 구현 3)PAL 이나 CPLD 로 구현

void port_init(void) { unsigned char *port; port =(unsigned char *) 0x03; *(port) = 0x90; // PA input, PB output, PC output } unsigned char getData_DIP(void) { unsigned char *port, data; port =(unsigned char *)0x00; data = *(port); return data; } main() { unsigned char DIP_data; port_init(); DIP_data = getData_DIP(); printf(“%0x”,DIP_data);// 이므로 97 출력 } D7D6D5D4D3D2D1D Mode 0 PA Input PC(up) Output PC(low) Output PB Output 강의노트 입력장치 인터페이스 Control Register

void port_init(void) { unsigned char *port; port =(unsigned char *) 0x03; *(port) = 0x80; // PA input, PB output, PC output } void set_LED(unsigned char data) { unsigned char *port; port =(unsigned char *)0x00; *(port) = data; } main() { port_init(); set_LED(0x0F); } D7D6D5D4D3D2D1D Mode 0 PA Output PC(up) Output PC(low) Output PB Output 강의노트 출력장치 인터페이스 Control Register

void port_init(void) { unsigned char *port; port =(unsigned char *) 0x03; *(port) = 0x80; // PA input, PB output, PC output } void set_LED(unsigned char data) { unsigned char *port; port =(unsigned char *)0x00; *(port) = data; } main() { port_init(); set_LED(0x3F); // 7-segment 에 0 이 표시됨 } D7D6D5D4D3D2D1D Mode 0 PA Output PC(up) Output PC(low) Output PB Output 강의노트 출력장치 인터페이스 Control Register

8051 실습보드 P0[7:0], P2[7:0], ALE, /WR, /RD AD[7:0], A[15:8], ALE, /WR, /RD Character LCD PORTA[7:0] D0 D1 D2 D3 D4 D5 D6 D7 CPLD LCD_EN LCD_RS LCD_RW E RS R/W CPLD Logic (Verilog HDL) void clearscreen_lcd(void) { xdata unsigned char *pcode; // for External Memory pcode =(unsigned char xdata *)0xF000; *(pcode) = 0x00;// LCD_RS = 0; pcode = (unsigned char xdata *)0xF300; *(pcode) = CLEAR_DISPLAY; pcode = (unsigned char xdata *)0xF100; *(pcode) = 0x01;// LCD_EN = 1; *(pcode) = 0x00;// LCD_EN = 0; } Address (A0) RS(address) R/W E Valid Data 140nS D0-D7 void PutChar(unsigned char c) { pcode = (unsigned char xdata *)0xF000; *(pcode) = 0x01;// LCD_RS = 1; pcode = (unsigned char xdata *)0xF300; *(pcode) = c; pcode = (unsigned char xdata *)0xF100; *(pcode) = 0x01;// LCD_EN = 1; *(pcode) = 0x00;// LCD_EN = 0; }

8051 P0[7:0], P2[7:0] AD[7:0], A[15:8] Character LCD PORTA[7:0] D0 D1 D2 D3 D4 D5 D6 D7 CPLD LCD_EN (LCD_CON[1]) LCD_RS (LCD_CON[2]) LCD_RW (LCD_CON[0]) E RS R/W Address (A0) RS(address) R/W E Valid Data 140nS D0-D7 P0[0] P0[7:0] if(A[15:8] == 8’hF3) P0[7:0] 은 AD[7:0] 과 같음 P2[7:0] 은 A[15:8] 과 같음