This week has a heavy focus on starting the firmware design of the project. Our PCB designs are currently in the process of being manufactured, which gives us time to start firmware while we wait for these hardware components to be delivered. A planning meeting was mid-last week to go over how the firmware of the project is going to be structured, the results of which can be seen below:
In short, the firmware will consist of four separate components, that will work together to power the dynamic keycaps. First is a serial protocol to quickly communicate changes in legend to each keycap in the macropad. This will use an SPI library to send messages from the main controller to the keycaps.
Shown above is a block diagram of the STM32F401 series microcontroller. This is will be the main controller used on the central PCB in our macropad, and will do all the communication between the macropad and the computer, as well as between the macropad and the keycap displays. SPI will be used to send information from the pins shown in the diagram to the display driver chips.
Second, a glyph library that stores information on how to display characters on the embedded screens. This library will be used to turn characters into rows of bits to be sent to the displays in each keycap.
Shown above is an example of the glyph library, showing an 8x8 font being upscaled to 32x32. The plan is to use this library to display 32x32 bit images of each character in a centered 40x40 square on each display. Since the displays being used are 72x40, this maximizes the space being utilized on the screen for the greatest readability possible.
Third, a set of SSD1306 OLED display driver commands are needed to actually drive the glyphs to the displays, and lastly the top level of the firmware stack will be QMK. QMK will act a the middle man between the main macropad controller and the computer that the macropad is connected to. This QMK firmware will use the glyph library in conjunction with handling layer switching and key press events to make the macropad functional.
Work will continue on each piece of the firmware through the coming weeks, however some efforts will shift back to hardware once the PCBs arrive and soldering work can begin.
Comments