Translate

Monday, December 24, 2018

MMCedu project - keyboard #2

This article describe little bit more in detail the plan for the keyboard to be used for the MMCEdu project.


Hardware - LED matrix


In order to show the 32 bit memory content, 32 LEDs, put in a layout similar to the one on the magnetic memory core, are used.
Plus there are other LEDs to show :
  • 8 for the input pushbuttons
  • 4 to show the address

We have thus to control a total of 44 LEDs.
There are basically two main ways to control 44 LED :
  • directly
  • in a matrix
Directly means to connect the LEDs to some kind of latch and then update the latch when a change is needed.
Pro : easy - direct - does need very little compute power
Cons : need 44 latches (for example 6 74HC595) plus resistors and eventually transistors if the current needed to control the LEDs is too much for the latch, requires much current to drive all the LEDs

The second method requires much less external components, connecting the 44 LEDs in a 8 X 8 matrix.
Here two latches can control up to 64 LEDs but of course is required some compute power since they need to change the latch content continuously.

Because using a matrix to control many LEDs is quite common, there are special chipset designed to take care of it.
One is the MAX7219.
This chipset allows to control up to 64 LEDs in a 8x8 matrix and the input can be provided via a SPI interface.

Another interesting chipset is the HT16K33. It allows to control a bigger matrix and also has a section used to connect pushbuttons in a matrix and uses an I2C bus to control it.

Hardware - pushbutton reading


For the pushbuttons reading the best solution is to use two input latches and read them at fast interval.
One latch (8 bit) will be connected to the 8 pushbuttons for the byte input.
The second latch will interface the pushbuttons for the operations (read/write/prev/next/reset).
Or, just use the HT16K33 chipset.

Schematic


This is the schematic of the first prototype based on the HT16K33 chipset.
Since I did find it available at LCSC I decided to buy it from it and use the EasyEDA to build a PCB.
Wiring manually 44 LEDS and pushbuttons is not really fun and also the HT16K33 is more easily available in SMD package (and it cost less).
I didn't find any break board for this chip so a PCB is needed anyway, thus why don't design the entire keyboard PCB as piggy back of the Arduino ?
The magnetic memory core board already uses the pass through connectors, so the keyboard can just piggy back on that board and in the end uses only the power supply (5V) and 3 signals, 2 for the I2C and one for the Int signal.
This should not interfere with the signals used by the magnetic core memory board.



This is the first draft of the PCB.


Note !  The schematic shown here is incorrect and I already fix it on the final release, however I have to do some experiments anyway with the produced PCB, even if is not correct.
Further articles will show the final version of schematic and PCB.

No comments:

Post a Comment