cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407VG with PS/2 Keyboard - project

mich
Associate
Posted on February 17, 2016 at 11:48

Hi,

I'm second year student at UTP in Poland. I have to do project based on STM32F407VG. It's just simply communication with keyboard. But I have problem - power on my keyboard. I read that to power PS/2 I have to get 5V and max. 300mA. What i research that 5V output power its ok for my STM. But, I still dont have respone from keyboard. Can someone help me solve this?

#keyboard #stm32f4 #ps/2
3 REPLIES 3
mark239955_stm1
Associate II
Posted on February 17, 2016 at 12:17

Many of the GPIO pins on the STM32F407 are 5V-tolerant; double-check in the user manual that the pins that you’re using are 5V tolerant.

“5V tolerant� means that a pin can safely read a 5V digital signal without burning out, but they can’t transmit at 5V and many keyboards may not respond to 3.3V signals.

 

You will need a level translator to convert the 3.3V logic out of the STM32 into 5V logic signals.

 

There are many ways to do this, including transistors, an op-amp, or a purpose-built level translator IC.

 

If I recall correctly, the data line is bidirectional so you will also need to deal with that.
Posted on February 17, 2016 at 15:00

Diagram the pins and connections used. Show the code you are using to read and clock the keyboard.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mich
Associate
Posted on February 17, 2016 at 22:12

Hi, thanks for reply 🙂 I figured out and I get power to keyboard by 5V pin, I check this and its 4.8V. But I have problem with pressing button on keyboard. If I do that, clock line is not falling. Here is code:

http://pastebin.com/M1d7aMW8

Thank's guys for support me !