UPC EETAC Bachelor's Degree in Telecommunications Systems and in Network Engineering EEL

Chapter 2 problems

     - D2.15 -

16-key matrix encoder with handshake (FPGA-VHDL)

Problems

D2.14

D2.16


1. Specifications

The idea is to add communication signals to the basic Matrix_encoder_16key to be able to connect this keyboard controller (slave peripheral) to a master device or a microcontroller, like data available (DA) and data acknowledged (D_Ack) in Fig 1. Note that the CLK frequency for scanning keys (MCLK) may be very different to the system CLK (SCLK) running in the computer.

The same project designed programming a μC is in D3.15.

Symbol

Fig 1. Symbol for the proposed top entity  Matrix_encoder_16key_registered with handshake capabilities for buffering and synchronising the matrix encoder to the system CLK (SCLK).

In Fig. 2 we have inferred a circuit to be able to register the code of the key pressed until the computer can read it, thus establishing a kind of handshaking between computer and peripheral (the matrix keyboard) using signals like data available and data acknowledged.

Fig 2. Proposed architecture including project Matrix_encoder_16key as Chip1.

 

Some hints for starting this project at this discussion: state diagram and example of timing diagram.