Skip to main content
Associate II
April 15, 2024
Solved

NUCLEO-F446RE interfacing with PS2 Keyboard

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.
mƎALLEm
mƎALLEmBest answer
ST 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). 

 

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.

8 replies

Andrew Neil
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 ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate II
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.

Pavel A.
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ƎALLEm
mƎALLEmBest answer
ST 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). 

 

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.