Scans and encodes up to a 64-key keyboard. DB 1 DB 2 DB 3 DB 4 DB 5 DB 6 DB 7 V SS. display information.

Similar documents
8 X 8 KEYBOARD INTERFACE (WITHOUT INTERRUPT SIGNAL)

PHYS 3322 Modern Laboratory Methods I Digital Devices

Contents Circuits... 1

Today 3/8/11 Lecture 8 Sequential Logic, Clocks, and Displays

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Vorne Industries. 2000B Series Buffered Display Users Manual Industrial Drive Itasca, IL (630) Telefax (630)

IMS B007 A transputer based graphics board

IT T35 Digital system desigm y - ii /s - iii

0 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 1 1 Stop bits. 11-bit Serial Data format

S6B CH SEGMENT DRIVER FOR DOT MATRIX LCD

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

64CH SEGMENT DRIVER FOR DOT MATRIX LCD

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

CHAPTER1: Digital Logic Circuits

A * Rockwell. R6500 Microcomputer System DATA SHEET CRT CONTROLLER (CRTC) r- r- 31 O PART NUMBER R FEATURES DESCRIPTION O 30-4 O O

Physics 217A LAB 4 Spring 2016 Shift Registers Tri-State Bus. Part I

Final Exam review: chapter 4 and 5. Supplement 3 and 4

EE Chip list. Page 1

Registers and Counters

82C55A CHMOS PROGRAMMABLE PERIPHERAL INTERFACE

University of Victoria. Department of Electrical and Computer Engineering. CENG 290 Digital Design I Lab Manual

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

Chapter 9 MSI Logic Circuits

Programmable Logic Design Techniques II

Laboratory 9 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

TV Character Generator

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

VU Mobile Powered by S NO Group

Point System (for instructor and TA use only)

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

M66004SP/FP M66004SP/FP MITSUBISHI DIGITAL ASSP ASSP 16-DIGIT 5X7-SEGMENT VFD CONTROLLER 16-DIGIT 5 7-SEGMENT VFD CONTROLLER

T 2 : WR = 0, AD 7 -AD 0 (μp Internal Reg.) T 3 : WR = 1,, M(AB) AD 7 -AD 0 or BDB

For Teacher's Use Only Q Total No. Marks. Q No Q No Q No

Chapter 2. Digital Circuits

Interfacing Analog to Digital Data Converters. A/D D/A Converter 1

ME 515 Mechatronics. Introduction to Digital Electronics

Lab #6: Combinational Circuits Design

Chapter 4: One-Shots, Counters, and Clocks

The University of Texas at Dallas Department of Computer Science CS 4141: Digital Systems Lab

Registers and Counters

UNIT V 8051 Microcontroller based Systems Design

Digital Blocks Semiconductor IP

Chapter 7 Memory and Programmable Logic

Laboratory Exercise 4

Data Sheet. Electronic displays

SignalTap Plus System Analyzer

Digital Electronics II 2016 Imperial College London Page 1 of 8

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

8.1 INTRODUCTION... VIII OVERVIEW... VIII-1

Chapter 18. DRAM Circuitry Discussion. Block Diagram Description. DRAM Circuitry 113

VFD Driver/Controller IC

LATCHES & FLIP-FLOP. Chapter 7

TRANSFER BETWEEN REGISTERS and THREE STATE LOGIC

Experiment 8 Introduction to Latches and Flip-Flops and registers

Thiscontrolerdatasheetwasdownloadedfrom htp:/ HD66750S

NS8050U MICROWIRE PLUSTM Interface

Combinational vs Sequential

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

Chapter 6 Registers and Counters

HD66766 Rev. 1.0 / 30 November 2001 HD (132 x 176-dot Graphics LCD Controller/Driver for 65K Colors)

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

CHW 261: Logic Design

Analog-to-Digital Converter

EECS 270 Midterm 2 Exam Closed book portion Fall 2014

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Slide 1. Flip-Flops. Cross-NOR SR flip-flop S R Q Q. hold reset set not used. Cross-NAND SR flip-flop S R Q Q. not used reset set hold 1 Q.

Asynchronous counters

EKT 121/4 ELEKTRONIK DIGIT 1

Logic Design. Flip Flops, Registers and Counters

LM16X21A Dot Matrix LCD Unit

VGA Port. Chapter 5. Pin 5 Pin 10. Pin 1. Pin 6. Pin 11. Pin 15. DB15 VGA Connector (front view) DB15 Connector. Red (R12) Green (T12) Blue (R11)

SPI Serial Communication and Nokia 5110 LCD Screen

64CH SEGMENT DRIVER FOR DOT MATRIX LCD INTRODUCTION FEATURES 100 QFP-1420C

Digital Circuits 4: Sequential Circuits

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

COMP2611: Computer Organization. Introduction to Digital Logic

The Nexys 4 Number Cruncher. Electrical and Computer Engineering Department

Serial In/Serial Left/Serial Out Operation

DT9834 Series High-Performance Multifunction USB Data Acquisition Modules

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

DIGITAL ELECTRONICS MCQs

Sequential Logic Basics

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

PCA8534A. 1. General description. 2. Features and benefits. Automotive LCD driver for low multiplex rates

DXP-xMAP General List-Mode Specification

Chapter 9 Introduction to Sequential Logic

Chapter 3: Sequential Logic Systems

TABLE 3. MIB COUNTER INPUT Register (Write Only) TABLE 4. MIB STATUS Register (Read Only)

EECS150 - Digital Design Lecture 12 - Video Interfacing. Recap and Outline

OBSOLETE FUNCTIONAL BLOCK DIAGRAM 256-COLOR/GAMMA PALETTE RAM. RED 256 x 10. GREEN 256 x 10 CONTROL REGISTERS PIXEL MASK REGISTER TEST REGISTERS MODE

ECE 372 Microcontroller Design

Experiment # 4 Counters and Logic Analyzer

PCF8534A. 1. General description. 2. Features and benefits. Universal LCD driver for low multiplex rates

Features of the 745T-20C: Applications of the 745T-20C: Model 745T-20C 20 Channel Digital Delay Generator

Decade Counters Mod-5 counter: Decade Counter:

List of the CMOS 4000 series Dual tri-input NOR Gate and Inverter Quad 2-input NOR gate Dual 4-input NOR gate

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Transcription:

Programmable Keyboard/Display Interface - 8279 A programmable keyboard and display interfacing chip. Scans and encodes up to a 64-key keyboard. Controls up to a 16-digit numerical display. Keyboard has a built-in FIFO 8 character buffer. The display is controlled from an internal 16x8 RAM that stores the coded display information. RL 2 RL 3 CLK IRQ RL 4 RL 5 RL 6 RL 7 RESET RD WR DB 0 DB 1 DB 2 DB 3 DB 4 DB 5 DB 6 DB 7 V SS V CC RL 1 RL 0 CNTL/STB 8279 SHIFT SL 3 SL 2 SL 1 SL 0 OUT B 0 OUT B 1 OUT B 2 OUT B 3 OUT A 0 OUT A 1 OUT A 2 OUT A 3 BD CS A 0 1 (April 14, 2002)

Pinout Definition 8279 A0: Selects data (0) or control/status (1) for reads and writes between micro and 8279. BD: Output that blanks the displays. CLK: Used internally for timing. Max is 3 MHz. CN/ST: Control/strobe, connected to the control key on the keyboard. CS: Chip select that enables programming, reading the keyboard, etc. DB 7 -DB 0 : Consists of bidirectional pins that connect to data bus on micro. IRQ: Interrupt request, becomes 1 when a key is pressed, data is available. OUT A 3 -A 0 /B 3 -B 0 : Outputs that sends data to the most significant/least significant nibble of display. RD(WR): Connects to micro s IORC or RD signal, reads data/status registers. RESET: Connects to system RESET. RL 7 -RL 0 : Return lines are inputs used to sense key depression in the keyboard matrix. Shift: Shift connects to Shift key on keyboard. SL 3 -SL 0 : Scan line outputs scan both the keyboard and displays. 2 (April 14, 2002)

8279 Interfaced to the 8088 D 0 -D 7 Decoded at 10H (data) 11H (control) Wait2 RD WR 3.0 MHz RESET O1 O2 O3 O4 O5 O6 O7 O8 DB 0 DB 1 DB 2 DB 3 DB 4 DB 5 DB 6 DB 7 RD WR CS CLK RESET A 0 IRQ 8279 RL 0 RL 1 RL 2 RL 3 RL 4 RL 5 RL 6 RL 7 SHIFT CN/ST BD SL 3 SL 2 SL 1 SL 0 OB 0 OB 1 OB 2 OB 3 OA 0 OA 1 OA 2 OA 3 16L8 Introduces 2 wait states to work with 8MHz 8088 IO/M A0 A 1 I1 A 2 I2 A 3 I3 A 4 I4 A 5 I5 A 6 A I6 7 I7 I8 I9 I10 3 (April 14, 2002)

Keyboard Interface of 8279 D 0 -D 7 64 Key Matrix (Normally open switches) RL 0 RL 1 RL 2 RL 3 RL 4 RL 5 RL 6 RL 7 SHIFT CN/ST BD SL 0 8279 DB 0 DB 1 DB 2 DB 3 DB 4 DB 5 DB 6 DB 7 RD WR CS CLK RESET SL 1 SL 2 SL 3 OB 0 OB 1 OB 2 OB 3 OA 0 OA 1 OA 2 OA 3 A 0 IRQ O 1 O 2 O 3 O 4 O 5 O 6 O 7 O 8 16L8 RD WR Wait2 3.0 MHz RESET A0 A 1 I A 1 2 I A 2 3 I3 A 4 I4 A 5 I5 A 6 A I6 7 I7 I8 IO/M I9 I10 7 6 5 4 3 2 1 0 74ALS138 G2B G2A G1 C B A 10K 4 (April 14, 2002)

Keyboard Interface of 8279 The keyboard matrix can be any size from 2x2 to 8x8. Pins SL 2 -SL 0 sequentially scan each column through a counting operation. The 74LS138 drives 0 s on one line at a time. The 8279 scans RL pins synchronously with the scan. RL pins incorporate internal pull-ups, no need for external resistor pullups. Unlike the 82C55, the 8279 must be programmed fi rst. D 7 D 6 D 5 Function Purpose 0 0 0 Mode set Selects the number of display positions, type of key scan... 0 0 1 Clock Programs internal clk, sets scan and debounce times. 0 1 0 Read FIFO Selects type of FIFO read and address of the read. 0 1 1 Read Display Selects type of display read and address of the read. 1 0 0 Write Display Selects type of write and the address of the write. 1 0 1 Display write inhibit Allows half-bytes to be blanked. 1 1 0 Clear Clears the display or FIFO 1 1 1 End interrupt Clears the IRQ signal to the microprocessor. The fi rst 3 bits of # sent to control port selects one of 8 control words. 5 (April 14, 2002)

Keyboard Interface of 8279 First three bits given below select one of 8 control registers (opcode). 000DDMMM Mode set: Opcode 000. DD sets displays mode. MMM sets keyboard mode. DD fi eld selects either: 8- or 16-digit display Whether new data are entered to the rightmost or leftmost display position. DD Function 00 8-digit display with left entry 01 16-digit display with left entry 10 8-digit display with right entry 11 16-digit display with right entry 6 (April 14, 2002)

Keyboard Interface of 8279 MMM fi eld: DD Function 000 Encoded keyboard with 2-key lockout 001 Decoded keyboard with 2-key lockout 010 Encoded keyboard with N-key rollover 011 Decoded keyboard with N-key rollover 100 Encoded sensor matrix 101 Decoded sensor matrix 110 Strobed keyboard, encoded display scan 111 Strobed keyboard, decoded display scan Encoded: Sl outputs are active-high, follow binary bit pattern 0-7 or 0-15. Decoded: SL outputs are active-low (only one low at any time). Pattern output: 1110, 1101, 1011, 0111. Strobed: An active high pulse on the CN/ST input pin strobes data from the RL pins into an internal FIFO for reading by micro later. 2-key lockout/n-key rollover: Prevents 2 keys from being recognized if pressed simultaneously/accepts all keys pressed from 1st to last. 7 (April 14, 2002)

Interface of 8279 001PPPPP The clock command word programs the internal clock driver. The code PPPPP divides the clock input pin (CLK) to achieve the desired operating frequency, e.g. 100KHz requires 01010 for a 1 MHz CLK input. 010Z0AAA The read FIFO control word selects the address (AAA) of a keystroke from the FIFO buffer (000 to 111). Z selects auto-increment for the address. 011ZAAAA The display read control word selects the read address of one of the display RAM positions for reading through the data port. 100ZAAAA Selects write address -- Z selects auto-increment so subsequent writes go to subsequent display positions. 8 (April 14, 2002)

Interface of 8279 1010WWBB The display write inhibit control word inhibits writing to either the leftmost 4 bits of the display (left W) or rightmost 4 bits. BB works similarly except that they blank (turn off) half of the output pins. 1100CCFA The clear control word clears the display, FIFO or both Bit F clears FIFO and the display RAM status, and sets address pointer to 000. If CC are 00 or 01, all display RAM locations become 00000000. If CC is 10, --> 00100000, if CC is 11, --> 11111111. 1110E000 End of Interrupt control word is issued to clear IRQ pin in sensor matrix mode. 1) Clock must be programmed fi rst. If 3.0 MHz drives CLK input, PPPPP is programmed to 30 or 11110. 9 (April 14, 2002)

Interface of 8279 2) Keyboard type is programmed next. The previous example illustrates an encoded keyboard, external decoder used to drive matrix. 3) Program the FIFO. Once done, a procedure is needed to read data from the keyboard. To determine if a character has been typed, the FIFO status register is checked. When this control port is addressed by the IN instruction, the contents of the FIFO status word is copied into register AL: 7 D FIFO Status Register 6 5 4 3 2 1 0 S/E O U F N N N Display unavail. Multiple keys pressed? Full and overrun? # characters in FIFO FIFO full? Read when empty? 10 (April 14, 2002)

Interface of 8279 Code given in text for reading keyboard. Data returned from 8279 contains raw data that need to be translated to ASCII: 7 CT Scanned Keyboard Code 6 5 4 3 2 1 0 SH Scan Return Strobed Keyboard Code 7 6 5 4 3 2 1 0 RL 7 RL 6 RL 5 RL 4 RL 3 RL 2 RL 1 RL 0 Row and column number are given the rightmost 6 bits (scan/return). This can be converted to ASCII using the XLAT instruction with an ASCII code lookup table. The CT and SH indicate whether the control or shift keys were pressed. The Strobed Keyboard code is just the state of the RL x bits at the time a 1 was strobed on the strobe input pin. 11 (April 14, 2002)

Six Digit Display Interface of 8279 RD WR Wait2 3.0 MHz RESET A 0 A 1 I A 1 2 I A 2 3 I3 A 4 I4 A 5 I5 A 6 A I6 7 I7 I8 IO/M I9 I10 D 0 -D 7 O 1 O 2 O 3 O 4 O 5 O 6 O 7 O 8 A 0 8279 DB 0 DB 1 DB 2 DB 3 DB 4 DB 5 DB 6 DB 7 RD WR CS CLK RESET IRQ RL 0 RL 1 RL 2 RL 3 RL 4 RL 5 RL 6 RL 7 SHIFT CN/ST BD SL 0 SL 1 SL 2 SL 3 OB 0 OB 1 OB 2 OB 3 OA 0 OA 1 OA 2 OA 3 A B C G1 G2A G2B 0 1 2 3 4 5 6 7 Vcc 7 16L8 74ALS138 Buf 2003A 12 (April 14, 2002)

Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in of counting in binary or BCD with a maximum frequency of 10MHz. Used for controlling real-time events such as real-time clock, events counter, and motor speed and direction control. Usually decoded at port address 40H-43H and has following functions: Generates a basic timer interrupt that occurs at approximately 18.2Hz. Interrupts the micro at interrupt vector 8 for a clock tick. Causes DRAM memory system to be refreshed. Programmed with 15us on the PC/XT. Provides a timing source to the internal speaker and other devices. 13 (April 14, 2002)

8254 Functional Description Internal structure D0 D1 D2 D3 D4 D5 D6 D7 RD WR A0 A1 CS VCC GND 8254 CLK 1 OUT 1 GATE 1 CLK 2 OUT 2 GATE 2 D 0 -D 7 CLK 1 OUT 1 GATE 1 CLK 1 RD WR A0 A1 CS Date Bus Transfer Read/ Write Logic Control Word Register Cnter 0 Cnter 1 CLK 0 OUT 0 GATE 0 OUT 1 GATE 1 Internal Bus Cnter 2 CLK 2 OUT 2 GATE 2 14 (April 14, 2002)

8254 Pin Definitions A 1, A 0 :The address inputs select one of the four internal registers with the 8254 as follows: A 1 A 0 Function 0 0 Counter 0 0 1 Counter 1 1 0 Counter 2 1 1 Control Word CLK: The clock input is the timing source for each of the internal counters. It is often connected to the PCLK signal from the bus controller. CS: Chip Select enables the 8254 for programming, and reading and writing. G: The gate input controls the operation of the counter in some modes. OUT: A counter output is where the wave-form generated by the timer is available. RD/WR: Read/Write causes data to be read/written from the 8254 and often connects to the IORC/IOWC. 15 (April 14, 2002)

8254 Programming Each counter is individually programmed by writing a control word, followed by the initial count. The control word allows the programmer to select the counter, model of operation, binary or BCD count and type of operation (read/write). 7 6 5 4 3 2 1 0 SC1 SC0 RW1RW0 M2 M1 M0 BCD Selects a BCD when 1 Selects the mode (mode 0 -- 5) Selects Counter 00 = Counter 0 01 = Counter 1 10 = Counter 2 11 = read-back command Read/write control 00 = counter latch command 01 = read/write least-signficant byte only 10 = read/write most-significant byte only 11 = read/write least-significant byte first, followed by the most-significant byte 16 (April 14, 2002)

8254 Programming Each counter may be programmed with a count of 1 to FFFFH. Minimum count is 1 all modes except 2 and 3 with minimum count of 2. Each counter has a program control word used to select the way the counter operates. If two bytes are programmed, then the fi rst byte (LSB) stops the count, and the second byte (MSB) starts the counter with the new count. There are 6 modes of operation for each counter: Mode 0: An events counter enabled with G. The output becomes a logic 0 when the control word is written and remains there until N plus the number of programmed counts. N 1 2 3 4 5 6 7 CLK OUT Count of 7 loaded 17 (April 14, 2002)

8254 Modes Mode 1: One-shot mode. The G input triggers the counter to output a 0 pulse for count clocks. Counter reloaded if G is pulsed again. 1 2 3 4 5 CLK GATE OUT Trigger with count of 5 Mode 2: Counter generates a series of pulses 1 clock pulse wide. The seperation between pulses is determined by the count. The cycle is repeated until reprogrammed or G pin set to 0. 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 CLK OUT Count of 5 loaded 18 (April 14, 2002)

8254 Modes Mode 3: Generates a continuous square-wave with G set to 1. If count is even, 50% duty cycle otherwise OUT is high 1 cycle longer. 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 CLK OUT Count of 6 loaded Mode 4: Software triggered one-shot (G must be 1). 1 2 3 4 5 6 7 8 CLK OUT Trigger with count of 8 Mode 5: Hardware triggered one-shot. G controls similar to Mode 1. 19 (April 14, 2002)