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.

Slides:



Advertisements
Similar presentations
Lab 11 : Memory System Fundamentals :
Advertisements

I/O Organization popo.
Lab 08: SR Flip Flop Fundamentals:
Lab 9: Matrix Keypad : ”No Key Press” Analysis Slide #2 Slide #3 ”Press and Hold Key 5” Analysis.
The 8051 Microcontroller and Embedded Systems
Chapter 7 Henry Hexmoor Registers and RTL
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
Input and Output CS 215 Lecture #20.
Programmable Interval Timer
The 8085 Microprocessor Architecture
Microprocessor and Microcontroller
ABNIAC The following slide presentation is to acquaint the student with ABNIAC. The version used for presentation is the Java version, which can be found.
Henry Hexmoor1 Chapter 7 Henry Hexmoor Registers and RTL.
Spring EE 316 Computer Engineering Junior Lab LCD modules.
Other I/O LCD display Flash ROM Keyboard (PS/2) UART connectors.
Spring EE 316 Computer Engineering Junior Lab LCD modules, PROMs, Serial Ports.
Computer System Overview
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Lab 5 :JK Flip Flop and Counter Fundamentals:
Counters and Registers
16x2 LCD Module on DE2-115 數位電路實驗 TA: 吳柏辰 Author: Trumen.
HD44780 LCD programming From the Hardware Side
Some Useful Circuits Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
ORG ; FOUR INT 21H and INT 10H Programming and Macros Dec Hex Bin
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.
Rabie A. Ramadan Lecture 3
The 8253 Programmable Interval Timer
MICROPROCESSOR INPUT/OUTPUT
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay2 The D FlipFlop A 1-bit register is called a D flipflop. When.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 4 The Von Neumann Model Basic components Instruction processing.
Chapter 14 Introduction to Microprocessors. 2 Microcomputer A self-contained computer system that consists of CPU (central processing unit), memory (RAM.
PIT Programming Examples Working with the modes of PIT.
EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
8279 KEYBOARD AND DISPLAY INTERFACING
EE 316 Computer Engineering Junior Lab Serial Ports, LCD Displays & PROMs.
9-1 EE 319K Introduction to Microcontrollers Lecture 9:I/O Synchronization; LCD Interfacing; Implementing Local Variables using a Stack Frame; Parameter.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
Introduction to Microprocessors
Chapter 10 Glass Bliss Using the Parallel Master Port to communicate with Alphanumeric LCD displays.
8279 KEYBOARD AND DISPLAY INTERFACING
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
Department of Electronic & Electrical Engineering LCD character display (parallel interface). How to interface a LCD character display to a PIC.
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
KEYBOARD/DISPLAY CONTROLLER - INTEL Features of 8279 The important features of 8279 are, Simultaneous keyboard and display operations. Scanned keyboard.
Buffering Techniques Greg Stitt ECE Department University of Florida.
CEng3361 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2011 Recitation 06.
INT. TO EMBEDDED SYSTEMS DEVELOPMENT
The 8085 Microprocessor Architecture
REGISTER TRANSFER LANGUAGE (RTL)
Clocks A clock is a free-running signal with a cycle time.
LCD and Keyboard Interfacing
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
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 Interfacing
LCD and Keyboard Sepehr Naimi
Registers.
HD44780 LCD programming From the Hardware Side
HD44780 LCD programming From the Hardware Side
LCD and Keyboard Interfacing
LCD (LIQUID CRISTAL DISPLAY) SCREENS
Registers and Counters
Registers Today we’ll see some common sequential devices: counters and registers. They’re good examples of sequential analysis and design. They are also.
Digital Electronics and Logic Design
Presentation transcript:

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 Character “A” : The “Shift Display” Command : Multiple Data Write Operations: Display “AB”: ROM Based Electronic Billboard System : ROM Based Electronic Billboard System Timing : Viewable DDRAM : Off-Screen DDRAM : DDRAM Cylinder Effect : DMD Sample Program : DMD Custom Characters :

DMD Display Command Register ROM Data Commands DMD HELLO Lab 12 : DMD Basics : Dot Matrix Displays with Hitachi HD44780 controller (or DMD) understand various commands and can easily be programmed to display scrolling messages. Many electronic products use this type of display as an electronic billboard to display messages. WORLD HELLO WORLD HELLO WORLD HELL WORL HEL WOR HE WO H W CounterROM The DMD display can be connected to a ROM. The ROM contains the DMD codes. The counter cycles the address bus to send the codes to the display. HELL0 W0RLD HELL0 W0RLD HELL W0RL HEL W0R HE W0 H W DMD Display The DMD accepts 2 types of codes. Data codes (ASCII) and command codes (commands like “Shift Message”). The ROM stores a mix of data and commands which makes up the DMD message. Here is the HELLO WORLD sample program. Initialize the display: Use top line : Auto move cursor. HELLO WORLD Shift the message to the right HELLO WORLD HELLO WORLD HELL WORL HEL WOR HE WO H W Write next data on the bottom line : Slide #2

S I O1O0 S Z I0I1 >Clk Command Register Data Registers : Display Data RAM : DDRAM Character Generator ROM : CGROM CGRAM 8 Bit Data Bus 8 Tri-State Buffers 8 Bit Mux/DeMux 000F ERSR/WDB7DB0 Lab 12: Data Write Operation: Character “A”: Display the character “A”: Step 1: the computer sends the code to the data bus (DB0…DB7) Computer writes code for “A” Step 2: the computer sets R/W (Read Write) to 0. This enables the input buffers and transfers the data bus to MUX. Step 3: the computer sets RS (Register Select) to 1. This selects channel 1 of Mux/DeMux. The Mux passes the data bus to the CGROM. 0 HiZ 1 Step 4: The CGROM retrieves the pixel pattern for character A and gets ready to transfer it to DDRAM. Step 5: The computer provides a clock pulse to the E (enable) input. This clocks the DDRAM registers and completes the write operation. A A ROM can be used to send codes to the DMD. However, the DMD was designed to work with a computer system. Let’s look at the computer interface A Slide #3

Lab 12: Shift Display Command: Shift Display Right : Step 1: the computer sends the code to the data bus (DB0…DB7) Computer writes “Shift Display Right” command Step 2: the computer sets R/W (Read Write) to 0. This enables the input buffers and transfers the data bus to MUX. Step 3: the computer sets RS (Register Select) to 0. This selects channel 0 of Mux/DeMux. The Mux passes the data bus to the Command Register. 0 HiZ 0 Step 4: The computer provides a clock pulse to the E (enable) input. This clock the Command Register and transfers the command. S I O1O0 S Z I0I1 >Clk Command Register Data Registers : Display Data RAM : DDRAM Character Generator ROM : CGROM CGRAM 8 Bit Data Bus 8 Tri-State Buffers 8 Bit Mux/DeMux 000F ERSR/WDB7DB0 A Let’s assume that the character “A” has been written and is being displayed. We would like to shift the character one position to the right. The DMD has a “Shift Display Right” command Step 5: The DMD displays executes the shift command. A Slide #4

S I O1O0 S Z I0I1 >Clk Command Register Data Registers : Display Data RAM : DDRAM Character Generator ROM : CGROM CGRAM 8 Bit Data Bus 8 Tri-State Buffers 8 Bit Mux/DeMux 000F ERSR/WDB7DB0 Lab 12: Multiple Data Write Operations: Display “AB”: Display the character “A”: Here are all the steps… When a computer needs to display a message (more than one character) it must send several data characters one after the other. The computer must give the DMD display enough time to finish one data write operation before it can start another Computer writes code for “A” 0 HiZ 1 A A Display the character “B”: Before the “B” character can be displayed the computer must wait until the DMD finishes displaying the letter “A”. The computer must read the DMD Busy Flag (BF). BF=1 means DMD is busy and not ready for a new data write operation. Here are all the steps… 01 HiZ Computer reads the Busy Flag BF A IF BF=1 then the computer must repeat the BF read operation until it finds BF=0. At this time it can proceed with the data write operation of character “B” Computer writes code for “B” 0 HiZ 1 B B Slide #5

CounterROM DMD Display Lab 12: ROM Based Electronic Billboard System The DMD display was designed to be used with a computer system. The computer writes data/command codes and then reads the Busy Flag to see if the DMD is ready for the next write operation. A ROM based system can write data and command codes but it cannot read the Busy Flag! To make a ROM based system work it is necessary that the DMD be given enough time to complete a write operation before beginning the next write operation. According to the Hitachi data sheets the slowest write operation takes 1.64 milliseconds. Many other DMD operations execute in microseconds. The ROM based electronic billboard system uses a clock with a clock rate of 12 PPS (or a period of 83 milliseconds). This means that the ROM sends out the code for one write operation and then waits 83 milliseconds to send out the code for the next write operation. At this transfer rate it is NOT necessary to read the Busy Flag and the system works error free! The only disadvantage is that you cannot go any faster than 83 milliseconds per transfer. A computer, on the other hand, can speed up the transfers whenever necessary. This can be useful to give the illusion that an entire word (several characters) can appear on the display at once (instead of 1 character at a time). A computer has more control over the display than a ROM based electronic billboard system. A computer based electronic billboard system is like a car with a variable gas pedal in it. It can go fast or slow whenever necessary. AB 83 milliseconds later Slide #6

Lab 12: ROM Based Electronic Billboard System Timing: ROM Data Command Register DB0DB1DB2DB3DB4DB5DB6DB7 >Ck ERS Command RS=1 RS=0 R/W 256X9 Q8 Q7 Q6 Q5 Q4 Q3 Q2 Q1 Q0 A1 A2 A3 A4 A5 A6 A7 A0 Q20 Q21 Q22 Q23 Q24 Q25 Q26 Q27 Q28 Q29 Q32 Q19 Q0 >Clk Meg PPS Counter R/W of DMD: The ROM cannot read the Busy Flag. The read mode is not required. Q8 of ROM: Q8=1 for data write and Q8=0 for command write. Q20 of Counter: DMD E requires a negative edge to complete a write operation. Q20 frequency = Meg PPS/2 21 = PPS Q20 period= 1/ = 83 milliSec. Q20 Q21 Q22 Q28 Counter timing diagram. The counter changes the address of the ROM at every negative edge of Q20 Old 8 bit addressNew 8 bit address The ROM also changes the data bus at each negative edge of Q20. When the data bus is changing you should NOT clock the DMD (input E). The inverter ensures the DMD is not clocked when the data bus is changing. Here is how it works… NewOld The positive edge on Q20 passes through the inverter and becomes a negative edge which clocks the DMD. The DMD is clocked when address and data bus are stable (in the middle of the yellow zone). Slide #7

Lab 12: Viewable DDRAM : DDRAM (Display Data RAM) is the memory which stores the data that is viewed by the user of the DMD. It displays 2 lines of 16 characters. It also has 24 off-screen characters. The off-screen character will be explained later. Data Command Register DB0DB1DB2DB3DB4DB5DB6DB7 >Ck ERS Command RS=1 RS=0 R/W Each character position is assigned an address. Line 1 (top) addresses begin at 00 HEX and ends at 27 HEX. Line 2 (bottom) addresses begin at 40 HEX and ends at 67 HEX. The addresses are in hex and can easily be converted to binary if you remember: 1 hex numeral = 4 bit binary. Viewable : 16 CharactersOff-Screen : 24 Characters A0B0C0D0E0F A4B4C4D4E4F To display the word “Hello” in the middle of line 1 you would write the command “Set DDRAM address =05H” and then write the data characters “Hello”. DDRAM Add=05 Hello To display the word “World” in the middle of line 2 you would write the command “Set DDRAM address =45H” and then write the data characters “World”. DDRAM Add=45 World Slide #8

Viewable : 16 Characters A0B0C0D0E0F A4B4C4D4E4F Off-Screen : Lab 12: Off-Screen DDRAM : The off-screen DDRAM characters can be used to store display data and then later scroll it into view. It is like a holding area for messages. While the user pauses to read the on-screen message the delay can be used to write off-screen. Data Command Register DB0DB1DB2DB3DB4DB5DB6DB7 >Ck ERS Command RS=1 RS=0 R/W DDRAM Add=00 Hello DDRAM Add=40 orld Write the message “Hello World” in the viewable area of the DMD display. Write the message “Good Day” off-screen. DDRAM Add=10 Good DDRAM Add=50 Day The user will see the message “Hello World” and it will seem like the system has paused. The pause is actually the time taken to write “Good Day” off-screen. The “Shift Display Left” command will be used to move the “Good Day” message into view while scrolling “Hello World” out of view. Shift Display Left W Viewable : 16 Characters Shift Display Left Viewable : 16 Characters Shift Display Left Viewable : 16 Characters Shift Display Left Viewable : 16 Characters Shift Display Left Viewable : 16 Characters Shift Display Left Viewable : 16 Characters A0B0C0D0E0F A4B4C4D4E4F Hello orld Good DayW Off-Screen The “Shift Display Left” command moves the message left one character position. Five “Shift Display Left” commands are needed to move “Hello World” off screen. The “Shift Display Left” command moves the message to the left but actually moves the Viewable Window to the right. To make the message “Hello World” re-appear you would need to use 5 “Shift Display Right” commands. Slide #9

A 4A 0B B A 4A 0B 0C B 4C A 4A Viewable : 16 CharactersOff-Screen : 24 Characters A0B0C0D0E0F A4B4C4D4E4F Lab 12: DDRAM Cylinder Effect: DDRAM memory is laid out like a cylinder. Cut out the entire rectangle representing DDRAM and fold it back into a loop Spin the cylinder and you can see more DDRAM addresses B 0C B 4C A 4A Spin it more and eventually you reach the last address 27 and 67. GoodDay G o od D a y 27 and 67 are actually next to 00 and 40 in memory. This means if you write a message off screen at the end of the first line it is next to a message written at address 00. The “Shift Display Right” command can bring both messages into view. Viewable Characters! Slide #10

ROM Data Command Register DB0DB1DB2DB3DB4DB5DB6DB7 >Ck ERS Command RS=1 RS=0 R/W Q8 Q7 Q6 Q5 Q4 Q3 Q2 Q1 Q0 A1 A2 A3 A4 A5 A6 A7 A0 Q20 Q21 Q22 Q23 Q24 Q25 Q26 Q27 Q28 Q29 Q32 Q19 Q0 >Clk Meg PPS Counter Lab 12: DMD Sample Program : The ROM will be loaded with a “Sample Program”. Sample Program Address 0 Address 8 The counter will start at 0 and cycle forward. Each new count state generates a new address for the ROM and a new code is written to the DMD display. From DMD command Summary Sheet in Chapter (38) Set Display Mode (Display Function) DL sets the Data Bus size. N sets the number of lines to be used. F sets the Dot Matrix Font. (1 st command) 0010 * * F NDL DL = 1 : Use an 8 bit Data Bus. N = 1 : Use 2 lines of the display F =0 : 5x7 Dot Matrix Font (01) Clear Display Clears display and returns cursor to home position (DDRAM address = 00H) (06) Set the data write mode I/DS I/D sets the CURSOR/DISPLAY move direction. The CURSOR/DISPLAY will automatically move to the next DDRAM/CGRAM address after each data write. S specifies to shift the display or to move the cursor. I/D = 1 : Increment the DDRAM address S = 0 : Move the cursor after data write. Display Freeze (0C) C D = 1 : Turn the entire display ON. C = 0 : Turn the cursor OFF Set Display/Cursor On/Off D sets display On/Off. C sets cursor On/Off. B enables the character at the cursor position to Blink/Not Blink. 0000BCD10 B= 0 :DO NOT Blink the character at the cursor position (C0) C = 40 Hex (Line 2, first position) Set DDRAM Address Sets the starting DDRAM address. The DDRAM ASCII/Jap/Custom characters are sent to this starting address after this setting. 01ADD (7 bit address) T = 54 Hex = “T” (see the CGROM table) 8 bit code for ASCII/JAP/Custom Characters CGRAM/DDRAM Data Write Writes data into DDRAM or CGRAM. Used after address has been set. The address pointer is inc/dec automatically T = 65 Hex = “e” (see the CGROM table) 8 bit code for ASCII/JAP/Custom Characters CGRAM/DDRAM Data Write Writes data into DDRAM or CGRAM. Used after address has been set. The address pointer is inc/dec automatically. 1 e T = 73 Hex = “s” (see the CGROM table) 8 bit code for ASCII/JAP/Custom Characters CGRAM/DDRAM Data Write Writes data into DDRAM or CGRAM. Used after address has been set. The address pointer is inc/dec automatically. 1 es T = 74 Hex = “t” (see the CGROM table) 8 bit code for ASCII/JAP/Custom Characters CGRAM/DDRAM Data Write Writes data into DDRAM or CGRAM. Used after address has been set. The address pointer is inc/dec automatically. 1 est C 0C Command Register The first 5 codes in ROM (begin with 0xx) are DMD commands they are needed to initialize the display. While these codes are being executed the user will see nothing appear on the display. This initialization sequence is necessary and must be done before the message can be displayed. The last four codes in ROM (begin with 1xx) are ASCII data. They spell out the test message. Slide #11

Data Command Register DB0DB1DB2DB3DB4DB5DB6DB7 >Ck ERS Command RS=1 RS=0 R/W CGRAM-3DDRAM Pixels Lab 12: DMD Custom Characters : Custom characters are user defined. DMD displays have 8 custom characters. A custom character is initialized once and then accessed as many times as necessary. A happy face character will be created and displayed. Step 1: The face will be saved into CGRAM-3. Use the “CGRAM Address Set” command to inform the DMD display that the next data transfers are pixel layouts that belong in CGRAM. This command prevents the DMD from transferring the data to DDRAM as ASCII data. CGRAM Address Set = 058 = (6 bit address is 18 hex for CG3) Set CGRAM-3 Step 2: Use data write operations to fill in the pixel layout of the happy face. Remember each row is made up of 5 dots(pixels). The character is made up of 7 rows (+ 1 cursor row) of 5 pixels. It will take 8 data write operations to define the face. Remember data writes now go to CGRAM. Logic 0 = pixel off Logic 1 = pixel on Step 3: To access the character you must issue a DDRAM Address Set command. This will cause subsequent data transfers to be sent to DDRAM and stop data transfers to CGRAM. The face character can be accessed at address 03 (see chapter 12 for details). We will display it on the bottom line DDRAM add. = Cursor row ROM A E 100 0C0 103 Slide #12