cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-F446RE interfacing with PS2 Keyboard

Professor_Berlin
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

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 on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

8 REPLIES 8

@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 ...

SofLit
ST Employee

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 on "Accept as Solution" on the reply which solved your issue or answered your question.

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.

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

 


@Professor_Berlin wrote:

I'm really curious about how to interface the PS2 Keyboard with the STM32.


Exactly the same way you'd go about interfacing it to a PIC or an 8051 - or any other microcontroller!

http://www.8052mcu.com/forum/read/160143

 

Yes I will be using RTOS. If you have any documentation or a sample code for the interface please share it with me.

 

Do you have any experience working with RTOS?

I would suggest that you get the basics working before adding the extra concerns of an RTOS ...

You could work through this series of videos:

https://www.youtube.com/playlist?list=PLnMKNibPkDnGtuIl5v0CvC81Am7SKpj02

It's based on a NUCLEO-F401RE board, but you should be able to get the idea ...

 

Or maybe get yourself a NUCLEO-F401RE board to follow exactly?