(c) ALSE 2004 - do not use without prior written permission from ALSE
--------------------------------------------------------------
 Simplest Matrixed Keyboard Encoder - http://www.alse-fr.com
--------------------------------------------------------------

Contact : info@alse-fr.com
Version : 1.0
Date    : Aug 2004
Notes   : This design is very simple and shouldn't be used "as is".

Any question ? please contact us at mailto:info@alse-fr.com
You are also welcome to attend one of our Training Courses
(Altera or Doulos).

Simple version :
 The keyboard is scanned in 8 ms.
 A key pressed is detected (KeyDn) during 2 ms every 8 ms.
 This timing values and the scanning speed can be modified by the Tick1ms rate.

Design notes :

 * The Polarity must be selecting according to pullup/pulldown
   resistors on the Keyboard Lines inputs :
   - Pullup   <=> Polarity = '0'
   - Pulldown <=> Polarity = '1'

 * Verify that your synthesis tools does simplify the "don't care" logic.

 * 33 LCs with Quartus II


Verify the Design
-----------------

We have created a simple testbench and a simulation script.

* Launch ModelSim (any version) ore another simulator.

* File > Change Directory to the /Keybd directory

* do simu.do (for ModelSim)

* Look at the simulation transcript and inspect the waveform...



 ! Have Fun !

  Bert Cuzeau
  Technical Manager ALSE
