USB keyboard

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
madhavan
Posts: 29
Joined: Fri May 21, 2021 1:22 am

USB keyboard

Post by madhavan »

Hi , I have try with ps2 keyboard connection blue pill but i couldn't succeed .

Now i am trying with USB Keyboard . Arduino Due board will support directly USB keyboard but stm32 dunio core not accepting the Arduino USB keyboard library .

In the Arduino STM32 examples usb keyboard is not coming .

i have followed the
https://github.com/stm32duino/Arduino_C ... s/Keyboard
madhavan
Posts: 29
Joined: Fri May 21, 2021 1:22 am

Re: USB keyboard

Post by madhavan »

Image
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: USB keyboard

Post by mrburnette »

Just thinking...
https://en.wikipedia.org/wiki/PS/2_port

PS2 shows a 5V connectot; bluepill is 3.3V logic.
madhavan
Posts: 29
Joined: Fri May 21, 2021 1:22 am

Re: USB keyboard

Post by madhavan »

i have used the 5v to 3.3v logic voltage shift for PS2 key board .

Atmel SAM3X8E ARM Cortex-M3 CPU. used Arduino Due Board . 2nd USB port can be connected peripherals like USB keyboard or Mouse without shield .

STM32 • ARM® 32-bit Cortex®-M3 CPU Core blue pill having the USB port so it can be used for Keyboard or Some other Peripherals ?.

i could not have clear understanding that Blue pill USB is only Program Loading or Serial Monitor ? .

i have followed the :

https://github.com/stm32duino/Arduino_C ... /libraries


If i am wrong correct me why mine is showing half st32 duino examples ( Full Examples is missing ) as picture attached .
Image
madhavan
Posts: 29
Joined: Fri May 21, 2021 1:22 am

Re: USB keyboard

Post by madhavan »

Image
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: USB keyboard

Post by ag123 »

HID is 'not for beginners', and did you choose "HID (keyboard and mouse)" for the build?
Note that after you choose that, you would lose your "CDC (generic 'Serial' supersede U(S)ART)".
You can only have one or the other, not both.

STM32 (Duino(s)) can make very competent keyboards, including those full-blown ANSI 104 keys ones, e.g. a complete custom 104 keys mechanical keyboard.
But to do that it isn't in simple libraries, you would need to be familiar with USB HID specs and understand how USB works.
https://www.usb.org/hid
USB HID is one of the most complicated protocols, if you don't know how to specify a complete HID report descriptor for a keyboard and mouse and don't know how to program for it, you are too far off from even realizing a HID keyboard.
There are various USB HID keyboard implementations firmware floating around, you may like to google/bing search around for them.
Those may be featured in the various custom hand wired mechanical keyboard sites.
e.g.
https://deskthority.net/
https://geekhack.org/index.php

USB HID isn't just as simple as 'blink a led' nor even for that matter 'run an LCD', it is a complete domain on its own.
USB (HID) is its own world.
Post Reply

Return to “General discussion”