EE552 - DATAD Binary Keyboard Development


Interfacing The Binary Keyboard with a PS/2 and VGA Driver


Since we are only using five bits for input we have to press a combination of keys to represent different characters. The major task in interfacing the keyboard is therefore identifying when a combination is valid for a particular character. To achieve this, valid data is sent only when all keys have been released. To get detailed information as to how this was achieved please view our report
. Below are all the files used for interfacing the keyboard with PS/2 and VGA Drivers. The following is the data available out of this interface. Please Note all data out of the Interface is Active High
1) Eight bit ASCII coded data
2) Five bit data data transmitted from the keyboard once it is validated
3) Two enable signals for loading the VGA and PS/2 Drivers
To demo the binary keyboard on it's own I have interfaced it with a seven segment LED display that displays hexadecimal values corresponding to the character typed. Use led_display.sof to carry out this test. This code was complied for the FLEX10k20 FPGA. Check PIN ASSIGNMENTS here.
You can also view simulation waveforms for our keyboard to PS/2 and VGA driver Interface.

VHDL file Description

Code_pkg.vhd

This package conatins all the components used in the keyboard interface. This components are described briefly below


NorN.vhd

Five input Nor Gate

S_R_latch.vhd

Five input SR flip flop. Inputs used as set signals but uses an internal signal for Reset

RegisterN.vhd

Five bit register with global reset and active high load

Debouncer.vhd

Code for component used for debouncing all input signals

Load_control.vhd

VHDL code used for control length of control signals for the register and the FPGA

Delay.vhd

VHDL code used for controlled signal delay

ASCII_DECODER.vhd

Five bit to eight bit Decoder. Output is eight bit ASCII coded Data

Hex_display.vhd

Five bit to seven segment LED decoder. Output is Hex display of ASCII data

Delay.vhd

VHDL code used for controlled signal delay

Interface.vhd

VHDL that combines all the components to interface display device and the keyboard

hhg_led.vhd

Pacakage that contains components used for interfacing with seven segment LED display.

led_display.vhd

VHDL code for interfacing the keyboard with a seven segment LED display




For more information please email me at : rasugu@ee.ualberta.ca

Submitted by: Derrick Rasugu -  DATAD Binary Keyboard group December 2001