Here is the classic peripheral device for a single board computer: LED 7segment display and a hexadecimal keyboard.
Of course I can use the classic keyboard matrix and some 7segment displays, a bunch of resistors and transistors and solder a vintage one. Yes, I can, and it's easy. Instead I have used the cheap LED+key module from China. Its type is QYF-TM1638. This is it:
You can buy it on eBay or AliExpress for about 3 USD.
It provides the modern LED display driver and keyboard scanner. It has a serial interface - not an UART, but some kind of SPI with bidirectional data line.
You need three pins to connect this module: strobe pin (output from CPU), clock pin (output from CPU) and data (bidir). So there was a problem: How to achieve a bidir interface in the OMEN Alpha?
I have used the 82C55 parallel interface, port C. Port C can be split into two groups (higher and lower half, PC7-PC4 and PC3-PC0), which can be configured as input or output independently. Ports A and B has the same direction for the whole port.
So I have set the lower half of port C as output for STB and CLK, and the upper one I can switch between input and output. Data pin DIO is connected to port C pin 7.
Here is a source code for the driver. It is not optimized, straightforward and rather ugly, but it works!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.