Accepts any USB Keyboard and outputs serial data for every keypress
The product is a USB Host which accepts any USB Keyboard at its USB port and decodes the button presses. The data is output as serial TTL UART at 9600 baud rate for easy interfacing with various applications. The output is suitable for 3V or 5V level microcontroller applications.
Various Keyboard with USB Interface Supported
Apart from standard full size keyboard, The decoder also supports custom made or small numeric keypads.
Note: RX-IN pin and other pins are not used in this application, leave it floating. Below you can see, we have provided holes for mounting header of 2.54mm pitch if required.
Output Data Format
There can be three type of key types by user
Case#1: Simple ASCII keys - Single Byte Output
The output is simple ASCII values for each key as shown below. If Caps lock is ON, all values are capital and if Shift+key is pressed the character is upper case just like in PC. For enter key, its CR+LF type two byte output like shown below, else all output keys are of single byte.
Case#2: ALT+<KEY> or CTRL+<KEY> or Special Keys
See below on pressing
CTRL+C gives out 0x02 and 0x043 where 0x02 is code for Control Key followed by Key value 0x43 for ASCII 'C'.
ALT+C gives out 0x01 and 0x43 where 0x01 is code fr Alter Key followed by Key value 0x43 for ASCII 'C'.
If any special keys except ASCII Key on keyboard like arrow key is pressed it gives out value as 0x00 following by key value like below arrow key value of 0x52. If same arrow key was combined with CTRL then the output would be 0x02+0x52 or with ALT would be 0x01+0x52.
Case #3 CTRL+ALT+DEL - Key Combinations
Decoder supports 3 key combination also just like windows. You can combine the third key with any other key on keyboard. So output would be 0x01+0x02+<KEY CODE>, Also windows GUI key is supported, it always gives out 0x03 value which cannot be combined with any other key.