Skip to main content
Graduate
April 15, 2024
Solved

NUCLEO-F446RE interfacing with PS2 Keyboard

  • April 15, 2024
  • 2 replies
  • 3060 views

Hello,

I'm new to STM32 MCU and have just started learning about them. I want to interface the PS2 keyboard with the NUCLEO-F446RE board. I don't know what hardware will I require to do it. Will I be requiring any adapter board for it?

Please help me.

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello,

    Don't know what do you need behind that: learning about PS2 protocol or just using an external Keyboard no matter its interface?

    If case 1, I think you need to google it: Ex: https://github.com/ppelikan/stm32-ps2-touchpad/tree/main/touchpad

    If case 2: I suggest you to use USB keyboard and USB-OTG interface of your MCU. Unfortunately, NUCLEO-F446RE doesn't have that USB connector on it but NUCLEO-F446ZE have (in USB-HID mode). 

     

    2 replies

    Super User
    April 15, 2024

    @Professor_Berlin wrote:

    I'm new to STM32 MCU and have just started learning about them. 


    Are you familiar with any other microcontroller(s)?

     


    @Professor_Berlin wrote:

    I want to interface the PS2 keyboard 


    Are you familiar with interfacing to PS/2 keyboards? Do you know how the interface works?

     

    Before jumping into legacy interfaces like PS/2, I'd suggest you start by gaining familiarity with the STM32 and its basic features:

    • Blinking an LED just using GPIO
    • Blinking an LED just using timers
    • Reading a switch via GPIO
    • Using a UART
    • Using the debugger

    These are all things you'll need in order to support PS/2 ...

    Graduate
    April 16, 2024

    Hello @Andrew Neil,

    As you mentioned I have covered most of the basics of the STM32 MCUs in the past few months. I got my hands on the PIC MCU, 8051 and now I have moved to the STMs. And in my journey I like the STMs the most.

    Now I'm really curious about how to interface the PS2 Keyboard with the STM32. I saw a couple of youtube videos as well as read posts on multiple forums about it. But I didn't found anything.

    Please guide me through it. I will be really benificial for me.

    Thank you.

    Super User
    April 16, 2024

    We've done this, with few GPIOs and interrupt. On a F446 too, but custom board. Do you plan to use a RTOS?

     

    mƎALLEmAnswer
    Technical Moderator
    April 15, 2024

    Hello,

    Don't know what do you need behind that: learning about PS2 protocol or just using an external Keyboard no matter its interface?

    If case 1, I think you need to google it: Ex: https://github.com/ppelikan/stm32-ps2-touchpad/tree/main/touchpad

    If case 2: I suggest you to use USB keyboard and USB-OTG interface of your MCU. Unfortunately, NUCLEO-F446RE doesn't have that USB connector on it but NUCLEO-F446ZE have (in USB-HID mode).