EE 316 Computer Engineering Junior Lab - PowerPoint PPT Presentation

About This Presentation
Title:

EE 316 Computer Engineering Junior Lab

Description:

EE 316 Computer Engineering Junior Lab Digital Hangman Topics Important Specifications for the Digital Hangman game. For details read the project description Serial ... – PowerPoint PPT presentation

Number of Views:202
Avg rating:3.0/5.0
Slides: 11
Provided by: clark180
Category:

less

Transcript and Presenter's Notes

Title: EE 316 Computer Engineering Junior Lab


1
EE 316 Computer Engineering Junior Lab
  • Digital Hangman

2
Topics
  • Important Specifications for the Digital Hangman
    game.
  • For details read the project description
  • Serial Port Software
  • PS/2 Keyboards

3
Digital Hangman
  • Game will be played using a PS/2 keyboard
    attached to hardware
  • The Personal computer will
  • Randomly select word puzzles from a text-file.
  • Display all correctly picked letters and
    positions of unknown letters on the LCD connected
    via a serial port.
  • Keep count of the number of guesses played so
    far.
  • Display messages for the player as specified in
    the game.

4
Operational Characteristics of the LCD Display
  • Short messages (20 or fewer characters)
  • displayed instantly, left justified
  • Long messages (gt20 characters)
  • start at right, scroll right to left
  • scroll at reading rate
  • Remain displayed until next message or clear

5
Software
  • Standard Windows GUI (Windows XP)
  • Must be able to read text-files
  • Must be able to control serial port
  • use the references in the Project assignment
  • there are several classes (Cserial and
    CSerialPort) that are for general use
  • Use them with caution
  • You may want to write your own code too

6
The PS/2 Keyboard
  • PS/2 device interface was developed by IBM.
  • PS/2 port these days use the 6-pin mini-DIN
    connectors.
  • The Data and clock are open-collector with
    pull-up resistors.

http//www.computer-engineering.org/ps2protocol/
7
PS/2 Keyboard, contd..
  • PS/2 devices use bidirectional synchronous serial
    protocol.
  • The device (keypad in this case) generates the
    clock.
  • The clock frequency is 10-16.7 kHz.
  • One byte of data is sent at a time.
  • Each frame from keypad to the PC contains 11
    bits. These bits are
  • 1 start bit. This is always 0.
  • 8 data bits, least significant bit first.
  • 1 Parity bit.
  • 1 stop bit.  This is always 1.

http//www.computer-engineering.org/ps2protocol/
8
Scan code
  • Keyboards consist of a large matrix of keys
  • The keys are monitored or scanned by an on-board
    processor (aka the "keyboard encoder).
  • If a key is pressed, held and released, the
    keypad sends out an 11-bit Scan code (data).
  • There are several scan codes. We will use the
    default code (See Scan code 2) for all modern
    keyboard.

http//www.computer-engineering.org/ps2keyboard/
9
Keyboard to Host communicationThe Make scan
code for Q
1 0 1 0 1 0 0 0
Stop bit 1
Start bit 0
0001 0101 0X15 lt The make scan code for the
Q key
Parity bit
http//www.computer-engineering.org/ps2protocol/
10
References
  • http//www.computer-engineering.org/ps2protocol/
  • http//www.computer-engineering.org/ps2keyboard/
  • http//www.computer-engineering.org/ps2keyboard/sc
    ancodes2.html
Write a Comment
User Comments (0)
About PowerShow.com