1 ECE243 I/O Hardware. 2 ECE243 Basic Components.

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

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.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
Programmable Interval Timer
COMP3221: Microprocessors and Embedded Systems Lecture 17: Computer Buses and Parallel Input/Output (I) Lecturer: Hui.
Chapter 2 Microprocessor Bus Transfers. Big- and Little-Endian Ordering Bit-endian processor architecture –High-order-byte-first (H-O-B-F) map the highest-order.
Serial I/O - Programmable Communication Interface
HD44780 LCD programming From the Hardware Side Design and implementation details on the way to a valid SPI-LCD interface driver.
4-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL Hardware Detail of Intel.
680XX Hardware Interface Outline Goal Reading
1 COMP541 Interrupts, DMA, Serial I/O Montek Singh April 24, 2007.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
CPEN Digital System Design Chapter 9 – Computer Design
EECS 470 Cache and Memory Systems Lecture 14 Coverage: Chapter 5.
1 ECE243 Input/Output (I/O) Software. 2 ECE243 Memory Mapped Devices.
Input/Output and Communication
Interface circuits I/O interface consists of the circuitry required to connect an I/O device to a computer bus. Side of the interface which connects to.
INPUT-OUTPUT ORGANIZATION
MODES OF Details of Pins Pin 1 –Connected Ground Pins 2-16 –acts as both input/output. Outputs address at the first part of the cycle and outputs.
Computer Architecture Lecture 08 Fasih ur Rehman.
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
Spring EE 437 Lillevik 437s06-l2 University of Portland School of Engineering Advanced Computer Architecture Lecture 2 NSD with MUX and ROM Class.
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
Universal Asynchronous Receiver/Transmitter (UART)
Top Level View of Computer Function and Interconnection.
ECE 545—Digital System Design with VHDL Lecture 3
Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
MODES OF Details of Pins Pin 1GND –Connected Ground Pins 2-16 AD14-AD0–acts as both input/output. Outputs address at the first part of the cycle.
8279 KEYBOARD AND DISPLAY INTERFACING
EEE440 Computer Architecture
1 Synchronous Serial IO Send a separate clock line with data –SPI (serial peripheral interface) protocol –I 2 C (or I2C) protocol Encode a clock with data.
Registers Page 1. Page 2 What is a Register?  A Register is a collection of flip-flops with some common function or characteristic  Control signals.
Fall EE 333 Lillevik 333f06-l23 University of Portland School of Engineering Computer Organization Lecture 23 RAID Input/output design RS232 serial.
8085. Microcomputer Major components of the computer - the processor, the control unit, one or more memory ICs, one or more I/O ICs, and the clock Major.
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
PPI-8255.
8279 KEYBOARD AND DISPLAY INTERFACING
MACHINE CYCLE AND T-STATE
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
1 To write any register, we need register address and a write signal A 3-bit write address is decoded if write signal is present One of the eight registers.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
Networked Embedded Systems Pengyu Zhang EE107 Spring 2016 Lecture 8 Serial Buses.
8251 USART.
Gandhinagar Institute of Technology
8 085Microprocessor Temp Reg (8) Accumulator (A reg) Flag flip flops(8) Instruction Register (8) Arithmetic Logic Unit ALU Instruction Decoder and Machine.
Class Exercise 1B.
Registers and Counters
Input/Output and Communication
CPU Sequencing 6/30/2018.
EE3541 Introduction to Microprocessors
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Basics of digital systems
Dr. Michael Nasief Lecture 2
..
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Computer Organization and Design
Serial Communication Interface: Using 8251
LOAD.DATATYPE ADDRESS  VALUE STORE.DATATYPE ADDRESS, VALUE
Levels in Processor Design
CSC 220: Computer Organization
Levels in Processor Design
Levels in Processor Design
Levels in Processor Design
Costas Foudas, Imperial College, Rm: 508, x47590
CPU Sequencing 7/20/2019.
Presentation transcript:

1 ECE243 I/O Hardware

2 ECE243 Basic Components

3 MULTIPLEXER selectout 0In1 1In2 MUX In1 In2 out select

4 DECODER Example: a 2->4 decoder In(1)In(0)Out(3)Out(2)Out(1)Out(0) decoder in out Can be used to match a specific value: eg., in==2? decoder match in out

5 TRI STATE INTERFACE aka tri-state buffer used for attaching to shared wires –eg a bus Z = “high impedence” –ie no impact on outgoing wire EnableInOut /1Z enable out in Dev0 Dev1 What if: 0 1?

6 PULL DOWN LINE normally made with a pull-up resistor resistor connected to power –pulls the line ‘up’ to 1 by default devices can pull the line ‘down’ to 0 –like pulling the stop wire on a TTC bus Vdd DEV 00

7 PASS TRANSISTOR EnableInOut /1Z In Out Enable ==

8 D/Q Flip Flop eg., rising edge triggered Like posing for a picture –Set-up time say cheese and hold the pose –Hold-time like taking a long exposure shot at night Q is set to D’s value –when clk goes from low to high D must be stable for setup-time seconds –before the clock edge D must remain stable for hold-time seconds –after clock edge D Q clk in out clock D clk Q Setup time hold time

9 REGISTER stores an N-bit value is composed of N flip flops value is read/written in parallel Register in out clock N N D Q clk D Q In(0) In(N-1) Out(N-1) Out(0) =

10 SHIFT REGISTER stores an N-bit value composed of N flip flops value is read/written 1-bit at a time (serial) Shift Reg. in out clock 1 1 D Q clk D Q In = D Q clk

11 ECE243 I/O Implementation

12 NIOS Bus addr: only upper 30 bits: A31-A2 byte enable: four wires, be3-be0 –encodes two things: A1,A0 and word/halfword/byte –each wire indicates whether that byte is valid ME: master enable: one wire –do nothing if zero (avoid interpreting transient values) Ack: device sets this to one to ack processor request IRQ: set to one to request an interrupt Address A31-A2 DataOut Do31-Do0 DataIn Di31-Di0 ByteEnable be3-be0 R/!W ME ACK IRQ IRQ31-IRQ CPU

13 BYTE-ENABLE Examples a31-a2 a1-a0be3-be0di31-di0 Ldw 0b Ldb 0b Ldb 0b Ldb 0b Ldb 0b Ldh 0b Ldh 0b

14 STEPS for a LOAD (protocol): 1) CPU: –set addr, byte-enable, R/!W to 1; –then set ME to 1 2) dev/mem: –set DataIn to value –set ACK to 1 3) CPU –read DataIn lines –set ME to 0 4) dev/mem: –set ACK to 0

15 STEPS for a store 1) CPU: –set addr, byte-enable, DataOut, R/!W to 0; –then set ME to 1 2) dev/mem: –use DataOut values to update state –set ACK to 1 3) CPU –set ME to 0 4) dev/mem: –set ACK to 0

16 Timing Diagram: Read ME DataOut 31-0 DataIn 31-0 Address 31-2 ByteEnable 3-0 Ack

17 Timing Diagram: Write ME DataOut 31-0 DataIn 31-0 Address 31-2 ByteEnable 3-0 Ack

18 IMAGINARY I/O DEVICE.equ MYDEVICE, 0xffabc0 0(MYDEVICE): 8bit input register 4(MYDEVICE): 8bit output register Note: 0xffabc0 >> 2 = 0x3feaf0 0xffabc4 >> 2 = 0x3feaf1

19 READING A DEVICE REG:.equ MYDEVICE, 0xffabc0 movia r8, MYDEVICE ldwio r9,0(r8) Addr A31-a2 R/!W Data BE3-0 ME ACK BUS register from outside world

20 WRITING A DEVICE REG:.equ MYDEVICE, 0xffabc0 movia r8, MYDEVICE stwio r9,4(r8) Addr A31-a2 R/!W Data BE3-0 ME ACK BUS en register to outside world

21 PARALLEL INTERFACE RECALL:.equ JP1, 0x (JP1): DR data in/out (8 bits) 4(JP1): DDR data direction register, each bit configures data pin as in or out (8 bits) 0 means inp, 1 means out 0x >> 2 = 0x x >> 2 = 0x

22 PARALLEL INTERFACE JP1portA: 0(0x ): DR # 0x >> 2 = 0x (0x ): DDR # 0x >> 2 = 0x Addr A31-a2 R/!W Data (bit5) BE3-0 ME ACK D Q DDR bit5 EN D Q DR reg bit5 EN Vdd pin5

23 Serial Interface Problem: single pin, but read/write bytes Solution: use shift registers shift register input register (8bits) rcv clock Input line from outside world /8 /1 shift register input register (8bits) send clock output line to outside world /8 /1 Serial Input: Serial Output:

24 Serial Interface: RS232 UART CPU send receive ground Control lines bus motherboard External Device Rs-232 (serial) cable clock

25 SYNCHRONIZATION: each side has its own clock this causes problems: –clocks may not be exactly same speed ie., there is a frequency difference –clocks may be out-of-sync ie., there is a phase difference hardware has to handle these difficulties

26 SERIAL TRANSMISSION 1.Both sides agree on a configuration: –baud rate (bits per second) –number of bits per group (7 or 8) is the MS-bit a parity bit? (odd or even) –number of stop bits (1, 2…) normally one’s 2.Can then send frames of bits –start bit: normally a zero –frame: 1 start bit + bit group + stop bits –expect a new bit every period period = 1 / baud-rate

27 PARITY: Even parity: –the number of bits that are one is even Odd parity: –the number of bits that are one is odd Parity bit: –a bit that is added to ensure even or odd parity –typically the MSbit Ex: what is the parity bit for _ –even parity: –odd parity: Parity bit can be used to detect errors –Eg., if expecting even parity and get odd parity

28 EXAMPLE CONFIGURATION: –Baud rate: 1Kbaud = 1000 bits/s –#bits = 8 (includes parity bit) –parity? = yes, even –# stop bits = 2 send ascii char: –assume sends LSbit first

29 EFFECTIVE DATA RATE of 1k bits/s, some are wasted: –start bits, stop bits, parity bits Effective data rate: –the bit rate of non-wasted bits Ex: what is the eff data rate from prev slide?