Shop OBEX P1 Docs P2 Docs Learn Events
P2 Keyboard / Mouse Drivers? — Parallax Forums

P2 Keyboard / Mouse Drivers?

Fred777Fred777 Posts: 19
edited 2021-12-27 12:22 in Propeller 2

Hello all,
Has anybody made Keyboard and Mouse drivers PS/2 and/or USB drivers (for use with flexprop)?
I can't find anything in the p2 github repository.

Cheers,
Fred

Comments

  • pik33pik33 Posts: 2,350
    edited 2021-12-27 13:00

    There are USB keyboard and mouse driver topic on this forum but I cannot find the topic now. You can also find this driver in Tetris (Quickbyte) and "Console emulation" topic (in the attached code)
    This driver is still work in progress. The problem for me was no hub support so I cannot attach a small RPi keyboard. It contains a hub inside. That's why I made the interface using a Pi Zero, which converts USB keyboard/mouse reports to serial data and sends it to P2 via UART.

  • Hi fred777,
    I did some tests and started on a PS/2 Keyboard routine in flexbasic but never got around to finish it.
    Maybe you use it as a start - but be warned:

    • It is only a test to display key codes so the proggy just waits for a key to be pressed
    • Not all keys are supported yet
    • Only reads keys, can't send keyboard commands
    • I am sure the algorithm is horrible and buggy
  • garryj's P2 USB Host keyboard/mouse driver was coded for Rev.A Silicon.
    I have tried updating it to Rev.B silicon but have had no joy so far.
    Still trying to find what's broken.....

  • Cluso99Cluso99 Posts: 18,069

    Garry's code works on RevB silicon - it works on my RetroBlade2. See his thread from this post onwards. Note that you need a pin to signal between cogs!

    https://forums.parallax.com/discussion/comment/1509532/#Comment_1509532

  • Fred777Fred777 Posts: 19
    edited 2021-12-29 12:53

    Great! - thanks for all that feedback.
    How do you find that stuff? I tried searching for "USB" but the "P2 Hosted USB Keyboard/Mouse" conversation does not show up ????

  • try this search in google " usb garryj site:parallax.com"

Sign In or Register to comment.