Other I/O LCD display Flash ROM Keyboard (PS/2) UART connectors.

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

Lab 12 : Liquid Crystal Displays: Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 DMD Basics : Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Data Write the.
Review: Interrupts & Timers
Addressing Modes (Week4)
Programmable Interval Timer
Programmable Keyboard/ Display Interface: 8279
The 8085 Microprocessor Architecture
HD44780 LCD programming From the Hardware Side Design and implementation details on the way to a valid SPI-LCD interface driver.
Henry Hexmoor1 Chapter 7 Henry Hexmoor Registers and RTL.
EE 316 Computer Engineering Junior Lab Word Mastermind.
EE 316 Computer Engineering Junior Lab PS/2 Keyboard.
Display Technology  Images stolen from various locations on the web...
1 COMP541 Keyboard Interface Montek Singh April 9, 2007.
CS150 Project Checkpoint 1. Controller Interface Dreamkatz Controller Interface 1. The N64 Controller 2. Physical interface 3. Communication protocol.
Chapter 7 Interupts DMA Channels Context Switching.
Basic Input/Output Operations
COMP541 Input Devices: Keyboards, Mice and Joysticks
EE 316 Computer Engineering Junior Lab Digital Hangman.
Practical Session No. 10 Input &Output (I/O). I/O Devices Input/output (I/O) devices provide the means to interact with the “outside world”. An I/O device.
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.
Lecture 7 Lecture 7: Hardware/Software Systems on the XUP Board ECE 412: Microcomputer Laboratory.
1 Keyboard Controller Design By Tamas Kasza Digital System Design 2 (ECE 5572) Summer 2003 Presentation for.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Keyboard Interface Anselmo Lastra.
PS2 Keyboard Interface Using Spartan-3 Starter Kit Board
INPUT-OUTPUT ORGANIZATION
HD44780 LCD programming From the Hardware Side
Serial Communication Lab 12 Module M21.1. Asynchronous Serial I/O ASCII code 54H = (“T”) sent with odd parity.
1 COMP541 Input Devices: Keyboards, Mice and Joysticks Montek Singh Apr 16, 2012.
Computer Organization
System Calls 1.
Digilent System Board Capabilities Serial Port (RS-232) Parallel Port 1 Pushbutton Hint: Good for a reset button Connected to a clock input. See Digilent.
created by :Gaurav Shrivastava
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Microcode Source: Digital Computer Electronics (Malvino and Brown)
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
CDR- Digital Audio Recorder/Player Brian Cowdrey Mike Ingoldby Gaurav Raje Jeff Swetnam.
8279 KEYBOARD AND DISPLAY INTERFACING
9-1 EE 319K Introduction to Microcontrollers Lecture 9:I/O Synchronization; LCD Interfacing; Implementing Local Variables using a Stack Frame; Parameter.
Practical Session 11 Computer Architecture and Assembly Language Input &Output (I/O)
CHAPTER 4 The Central Processing Unit. Chapter Overview Microprocessors Replacing and Upgrading a CPU.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
1 COMP541 Input Devices: Keyboards, Mice and Joysticks Montek Singh Apr 6, 2015.
8279 KEYBOARD AND DISPLAY INTERFACING
PS/2 Mouse/Keyboard Port
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
The Spartan®-3E FPGA Starter Kit board. A computer mouse is designed mainly to detect two-dimensional motion on a surface. Its internal circuit measures.
Practical Session 12 Input &Output (I/O). I/O Device Input / Output (I/O) devices Input / Output (I/O) devices provide the means to interact with the.
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
10/15: Lecture Topics Input/Output –Types of I/O Devices –How devices communicate with the rest of the system communicating with the processor communicating.
KEYBOARD/DISPLAY CONTROLLER - INTEL Features of 8279 The important features of 8279 are, Simultaneous keyboard and display operations. Scanned keyboard.
Practical Session 11 Computer Architecture and Assembly Language Input &Output (I/O)
Serial I/O Port.
Chapter 6 Input/Output Organization
COURSE OUTCOMES OF Microprocessor and programming
The 8085 Microprocessor Architecture
REGISTER TRANSFER LANGUAGE (RTL)
COMP541 Input Devices: Keyboards, Mice and Joysticks
The 8085 Microprocessor Architecture
COMP541 Input Devices: Keyboards, Mice and Joysticks
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Asynchronous Serial Communications
Datapaths For the rest of the semester, we’ll focus on computer architecture: how to assemble the combinational and sequential components we’ve studied.
LCD and Keyboard Sepehr Naimi
Computer Architecture and Assembly Language
Recall: ROM example Here are three functions, V2V1V0, implemented with an 8 x 3 ROM. Blue crosses (X) indicate connections between decoder outputs and.
HD44780 LCD programming From the Hardware Side
HD44780 LCD programming From the Hardware Side
The 8085 Microprocessor Architecture
8279 – Programmable Keyboard/Display Interface
Presentation transcript:

Other I/O LCD display Flash ROM Keyboard (PS/2) UART connectors

LCD Display  2-line, 16 character LCD display 4-bit interface Relatively easy to use once you have it mapped into your processor’s memory-mapped I/O Send characters to it, they show up on the screen Not fast! Scrolling at half-second intervals is about as fast as you can go and still have a clear display

LCD

LCD Control

LCD Data  Three memory areas inside LCD DD RAM – memory to hold the characters being displayed Two rows of 16 characters to display Also 24 extras per line that can be scrolled CG ROM – Pre-defined character map 192 pre-defined characters CG RAM – RAM to hold 8 custom characters 5x8 bit character/glyphs

DD RAM  DD RAM – memory to hold the characters being displayed Data written to each of these locations is the 8-bit address of a character in the CG ROM/RAM

CG ROM/RAM  For example, 8’h53 = S Note the Japanese kana characters…  Also, notice the 8 (memory mapped) CG RAM locations Addresses 8’h00 to 8’h07

CG RAM  This example is custom character 0’h03 Note that there are 8 rows in custom character 3 So, it takes 8 writes to make a custom character Row address is incremented automatically…

Operation Overview  Pick an LCD screen location Write an 8-bit character address to that location Then it shows up on the screen  Pick a CG RAM location Write 8 bytes starting at that location Now you can use that new custom character  Do it all with just a four-bit interface… Lots of little nibble writes….

Command Set  Commands are sent upper-nibble first

Command Set

 Commands are sent upper-nibble first

Write Timing

Memory Mapped I/O  So, as a practical matter, the easiest way to deal with the LCD is to map the interface to a memory-mapped location Now you can, under program control, change the values on the data and control wires Your Processor en I/O Reg Writing to the address of the LCD Reg will update its value

Initialization Remember, this display is SLOW compared to 50MHz!!!

Configuration

Using the Display

Remember timing!  The LCD_E enable pulse must be high for at least 230ns (12 clock cycles at 50MHz)  The two nibbles must be separated by 1μs (50 cycles)  Two different commands must be separated by 40μs (2000 cycles) But, these are easily done in an assembly language program… (as are the even longer configuration delays)

Strata Flash  16 MByte (8 Mword) flash ROM Designed to hold configuration data for the Spartan part But, can be used for general non-volatile data

Strata Flash  Some data lines are shared with the LCD But, if you don’t read back from the LCD they can both work together

Writing to the Strata Flash  Tricky!  Luckily, there is reference design on the Xilinx web site that implements a Flash programmer You can use this to load data to your board See class web site for documentation and examples

Xilinx Flash Project

Reading from the Flash  Not as tricky But, the flash has a 75ns access time So, it will take four 50MHz cycles to read data Each cycle is 20ns Set SF_oe and SF_ce active (low) and wait for four cycles (80ns) before grabbing return data… As usual map the flash into your processor’s memory-mapped address space

Xilinx Example

PS/2 Keyboard Interface  Standard keyboard interface Serial protocol similar to UART, but with its own clock When you press a key, the keyboard sends a “make code” (one, sometimes two, bytes) When you release the key, the keyboard sends a “break code” (two, sometimes three, bytes) Collectively, these are known as “scan codes”

PS/2 Keyboard Interface

Codes are sent LSb first with Odd parity Note that 11 bits are sent for each code start, 8-data, odd parity, stop kHz

Scan Codes

ASCII codes

PS/2 Things to Keep in Mind When you press and hold a key, the make code is sent every 100ms or so If no key is pressed, both clk and data are in their idle state Probably want a PS/2 controller that grabs codes and puts them in a register that can be read by your program (memory mapped I/O) Probably want to set a bit that says “new code” that gets cleared when the code is read

PS/2 Mouse Whenever the mouse moves it Sends three bytes. Status tells you state of buttons sign of X and Y, and overflow for X and Y

UART Two main parts: Connectors Voltage translator You provide the UART circuit! (See 3700 UART for details)

UART Basics 9600 * 8 = 76.8kHz 50MHz/651 = kHz

UART Basics

Use rcv-req as a flag to be read by your program? Assert xmt-req by your program to initiate send? 50MHz clock

Summary  All I/O can be mapped into your memory space You have lots of room left over in the addressable space if you use block RAMs only  Control the devices under program control Some memory locations will be data, some will be control Writing or reading these locations will have I/O side effects  Think about how your program will interact with I/O

Memory Map I/O Switches/LEDs UART Code/Data Flash ROM? Code/Data FFF FFF 8000 BFFF C000 FFFF 16k words (32k bytes) Top two address bits define regions? Word addresses 4k additional words Block RAM Frame buffer? Glyphs?