LCD Display. Other I/O. LCD display Flash ROM SPI EPROM Keyboard (PS/2) UART connectors DAC ADC. 2-line, 16 character LCD display

Similar documents
CS/EE 3710 Computer Architecture Lab Checkpoint #2 Datapath Infrastructure

ELCT501 Digital System Design Winter Tutorial #11 FPGA Complete Design Flow with LCD Example

CS/EE National Semiconductor CR16 Compact RISC Processor Baseline ISA and Beyond. CR16 Architecture

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

EITF35 - Introduction to the Structured VLSI Design (Fall 2016) Interfacing Keyboard with FPGA Board. (FPGA Interfacing) Teacher: Dr.

Controller Command Description

MicroToys Guide: PS/2 Mouse N. Pinckney April 2005

Lecture 25 March 23, 2012 Introduction to Serial Communications

EE445L Fall 2010 Final Version A Page 1 of 10

Memories: a practical primer


Microcontroller and Embedded Systems:

Serial Communications

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

EECS 373 Midterm 2 Fall 2018

PRACTICAL DESIGN TECHNIQUES FOR SENSOR SIGNAL CONDITIONING

To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM).

Basic Organization Memory Cell Operation. CSCI 4717 Computer Architecture. ROM Uses. Random Access Memory. Semiconductor Memory Types

EE 308 Spring Using the 9S12 SPI

Memory Supplement for Section 3.6 of the textbook

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

More on the 9S12 SPI Using the Dallas Semiconductor DS1302 Real Time Clock with the 9S12 SPI

Reading Spartan-3A Device DNA

Interface DAC to a PC. Control Word of MC1480 DAC (or DAC 808) 8255 Design Example. Engineering 4862 Microprocessors

If the display shift operation is used on a 20 x 4 display, the addressing is shifted as follows:

CHAPTER TWELVE - Memory Devices

Chapter Operation Pinout Operation 35

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Embedded Systems and Software. LCD Displays

Serial Communication Prof. James L. Frankel Harvard University. Version of 2:30 PM 6-Oct-2015 Copyright 2015 James L. Frankel. All rights reserved.

Fig.12.5 Serial Data Line during Serial Communication

Chapter 5 Internal Memory

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

Microcontroller & Interfacing

Computer Organization. 8th Edition. Chapter 5 Internal Memory

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

Chapter 4 Main Memory

UART TO SPI SPECIFICATION

COMP asynchronous buses April 5, 2016

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

Using the FADC250 Module (V1C - 5/5/14)

Microprocessor Architecture. mywbut.com 1

ECSE-2610 Computer Components & Operations (COCO)

Laboratory Finite State Machines and Serial Communication

A microprocessor-based system

FPGA.

Embedded Systems and Software

Chapter 5 Embedded Soft Core Processors

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

PARALLEL COMMUNICATIONS

8051 Microcontroller

Dragon12 LCD Displays Hantronix_CLD.PDF data sheet (Dragon12 CD-ROM) Dragon12 LCD Display. The Dragon12 board has a 16 character x 2 line display

Dragon12 LCD Displays Huang Sections 7.8 Hantronix_CLD.PDF data sheet (Dragon12 CD-ROM) ATD_10B8C Block User Guide. Dragon12 LCD Display

IP-48DAC channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL Version 1.

Problem Set 10 Solutions

FSM Design Problem (10 points)

I also provide a purpose-built ADC/DAC board to support the lab experiment. This analogue I/O board in only needed for Part 3 and 4 of VERI.

COMP 273 Winter asynchronous I/O April 5, 2012

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

Review for Exam III. Analog/Digital Converters. The MC9S12 has two 10-bit successive approximation A/D converters - can be used in 8-bit mode

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

Introduction to ARM LPC2148 Microcontroller

Interfacing a PS/2 Keyboard

Serial Communication. Simplex Half-Duplex Duplex

MCP 1200 Evaluation Board Guidance

The EE 109 LCD Shield

Asynchronous Data Transfer

19.1. Unit 19. Serial Communications

Preliminary information technical changes reserved

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

The EE 109 LCD Shield

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

Dallas Semiconductor DS1307 Real Time Clock. The DS 1307 is a real-time clock with 56 bytes of NV (nonvolatile)

FPGA Interfacing of HD44780 Based LCD Using Delayed Finite State Machine (FSM)

CS/EE Prerequsites. Hardware Infrastructure. Class Goal CS/EE Computer Design Lab. Computer Design Lab Fall 2010

CS/EE Computer Design Lab Fall 2010 CS/EE T Th 3:40pm-5:00pm Lectures in WEB 110, Labs in MEB 3133 (DSL) Instructor: Erik Brunvand

Serial communication

Dragon12 LCD Displays Hantronix_CLD.PDF data sheet (Dragon12 CD-ROM) Dragon12 LCD Display. The Dragon12 board has a 16 character x 2 line display

User Manual. IP BiSerial BA4. Bidirectional Serial Data Interface IP Module

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

Memory Expansion. Lecture Embedded Systems

Systems Programming. Lecture 4 Z16 Architecture and Programming

Topics. Interfacing chips

AT89S8252 Development Board V1.0. Manual

PROJECT REPORT - UART

INTRODUCTION TO FLEXIO

PT100 Temperature Module for UniOP

DEV-1 HamStack Development Board

App Note Application Note: Addressing Multiple FPAAs Using a SPI Interface

The Memory Hierarchy Part I

RT USB3000 Technical Description and User Manual. Revision 4.1.

Lab 5: EBI and ADC: Digital Voltmeter

Concepts of Serial Communication

Ch 4. Standard Single Purpose Processors: Peripherals

SECTION 5 RESETS AND INTERRUPTS

Topic 3. ARM Cortex M3(i) Memory Management and Access. Department of Electronics Academic Year 14/15. (ver )

Internal Memory. Computer Architecture. Outline. Memory Hierarchy. Semiconductor Memory Types. Copyright 2000 N. AYDIN. All rights reserved.

CoE3DJ4 Digital Systems Design. Chapter 5: Serial Port Operation

The Concept of Sample Rate. Digitized amplitude and time

Transcription:

Other I/O LCD display Flash ROM SPI EPROM Keyboard (PS/2) UART connectors DAC ADC 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 1

LCD LCD Control 2

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 3

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 For example, 8 h53 = S Note the Japanese kana characters Also, notice the 8 CG RAM locations Addresses 8 h00 to 8 h07 CG ROM/RAM 4

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. 5

Command Set Commands are sent upper-nibble first Command Set 6

Command Set Command Set Commands are sent upper-nibble first 7

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 I/O Reg en Writing to the address of the LCD Reg will update its value 8

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

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) 10

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 11

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 in the xilinx examples directory www.eng.utah.edu/~3710/xilinx-docs/examples s3esk_picoblaze_nor_flash_programmer Xilinx Flash Project 12

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 13

Xilinx Example Read Waveforms 75ns 14

Page Mode Read 75ns 25ns SPI Serial Flash 16Mbit SPI serial protocol Mostly used for Xilinx configuration But, you can use it for data if you want to You can program it using the Impact tool As with all Flash reading is (relatively) easy, writing is more complex In this case, reading one byte takes 40 clock ticks 15

SPI Serial Flash Serial Output Two pins: Clk and Data New data presented at Data pin on every clock Looks like a shift register 16

SPI Serial Flash 17

SPI Serial Flash 32 clocks before data starts coming back (runs up to 75MHz) Then 8 more ticks to get the data (MSB first) 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 18

PS/2 Keyboard Interface PS/2 Keyboard Interface 20-30 khz Codes are sent LSB first with Odd parity Note that 11 bits are sent for each code start, 8-data, odd parity, stop 19

Scan Codes (Make Codes) Break codes are the same, but prefixed with 0xF0 for example Q break code is 0xF0 0x15, is E0 F0 74 ASCII codes 20

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 21

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 = 76.805kHz 22

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

Digital to Analog Converter Four-channel 12-bit DAC Serial SPI protocol - up to 50MHz 32-bit data format SPI ADC 24

SPI ADC Other SPI Parts Remember to disable the other SPI devices 25

Analog Capture Programmable scaling pre-amplifier 14-bit ADC SPI interface to both of them Analog to Digital Converter 26

SPI to Pre-amp SPI to ADC 27

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 Might need custom FSMs to actually talk to the I/O 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 Remember to consider timing! Think about how your program will interact with I/O Memory Map Word addresses FFFF 8000 7FFF C000 BFFF 4000 3FFF 0000 I/O Switches/LEDs UART Flash ROM? Code/Data Code/Data Top two address bits define regions? Glyphs? Block RAM Frame buffer? 4k additional words 16k words (32k bytes) 28