You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.
The AtMega48 drives the two PS/2 ports and the LPT port. It'll need firmware.
There's only 4 KiB flash and 512 bytes RAM so it'll need to be compact!
I propose a basic command/response protocol:
Commands:
0x00 - Reset to serial bootloader (may not implement this)
0x01 - Get keyboard data
0x02 - Get mouse data
0x03 - Get LPT status
0x04 <data...> - Write LPT bytes to buffer
0x05 - Write LPT status bits x
0x06 - Set keyboard LEDs x
Responses:
0x00 - Will reboot
0x01 <data...> - Keyboard data (raw PS/2 Scan Code Set 2)
0x02 <data...> - Mouse data (raw PS/2 mouse data bytes)
0x03 - LPT status
0x04 - Write LPT byte confirmed
0x05 - Write LPT status confirmed
0x06 - Write keyboard LEDs confirmed
This should keep the number of bytes in the Cortex-M4's UART buffer to a minimum (it's only 16 bytes long), and allow the Cortex-M4 to only ask for keyboard data when it's not drawing video.
The AtMega48 will handle keyboard init and mouse init on start-up. It will also handle the handshaking with the printer.
The text was updated successfully, but these errors were encountered:
Ugh. I couldn't face writing C or C++ for AVR so I bought some STM32F0 chips in TSSOP-20 package, and some TSSOP-20 to DIP adaptors.
On the next PCB revision, the PS/2 connectors will be on a riser PCB with the keyboard controller. You can then remove this and fit a USB keyboard controller instead if desired.
thejpster
changed the title
Write the AtMega48 firmware
Write the PS/2 keyboard/mouse controller firmware
Aug 18, 2019
The AtMega48 drives the two PS/2 ports and the LPT port. It'll need firmware.
There's only 4 KiB flash and 512 bytes RAM so it'll need to be compact!
I propose a basic command/response protocol:
Commands:
0x00 - Reset to serial bootloader (may not implement this)
0x01 - Get keyboard data
0x02 - Get mouse data
0x03 - Get LPT status
0x04 <data...> - Write LPT bytes to buffer
0x05 - Write LPT status bits x
0x06 - Set keyboard LEDs x
Responses:
0x00 - Will reboot
0x01 <data...> - Keyboard data (raw PS/2 Scan Code Set 2)
0x02 <data...> - Mouse data (raw PS/2 mouse data bytes)
0x03 - LPT status
0x04 - Write LPT byte confirmed
0x05 - Write LPT status confirmed
0x06 - Write keyboard LEDs confirmed
This should keep the number of bytes in the Cortex-M4's UART buffer to a minimum (it's only 16 bytes long), and allow the Cortex-M4 to only ask for keyboard data when it's not drawing video.
The AtMega48 will handle keyboard init and mouse init on start-up. It will also handle the handshaking with the printer.
The text was updated successfully, but these errors were encountered: