Simple keyboard for GPIO?

(Wladimir van der Laan) #1

Neither the HiFive1 nor the Unleashed board (without expansion) have USB support. Does anyone know of any QWERTY keyboards that can be used with GPIO pins, that have a simple, documented serial protocol?

(Jonathan Neuschäfer) #2

Linux has a driver (configured via devicetree) that bitbangs the PS/2 keyboard protocol given two GPIO pins at 5V. All GPIOs on the HiFive Unleashed are at 1.8V (see section 5.2 in the getting started guide), so you’d need level-shifters that can handle pull-ups. Looking at the page, this does seem feasible.

For the HiFive1, the situation looks similar, except that the level shifters are already built in, and you need different software because Linux can’t run there.

The timing is fortunately not that tight, at 10.0–16.7 kHz.

(Wladimir van der Laan) #3

Thanks, that’s really useful information!

Would be interesting project to try to get the PS/2 to work at a direct I/O level.