Serial-HID

From ElectroDragon
Jump to navigation Jump to search

Mode Setup

  • All Jumper off: Mode 0
  • #1 Jumper on: Mode 1
  • #2 Jumper on: Mode 2
  • #3 Jumper on: Mode 3
  • #4 Jumper on: High speed mode

Mode 0

  • This mode only supports the conversion of characters corresponding to visible ASCII codes (such as a-z, 0-9, @, #, $, etc.) into standard USB key values.
  • Special function: If the received serial data packet encounters 0x1B, the data after 0x1B in the current packet will be discarded, and 0x1B will be converted into the enter key.

Mode 1

  • This mode only supports the conversion of characters corresponding to visible ASCII codes (such as a-z, 0-9, @, #, $, etc.) into standard USB key values.

Mode 2

  • This mode only supports the conversion of characters corresponding to visible ASCII codes (such as a-z, 0-9, @, #, $, etc.) into standard USB key values.
  • Special function: If the received serial data packet encounters 0x28, it will convert 0x28 into the enter key.

Mode 3

  • This mode is a transparent transmission mode, which is not only used to transmit visible ASCII characters. Standard USB full keyboard function can be realized in this mode.
  • Every 8 bytes of serial data form a packet, and after every 8 bytes received by the chip, it is directly packaged and uploaded through the USB port. That is, the chip is in the transparent transmission mode, and the serial port data is not analyzed and converted, and directly uploaded in a packet of 8 bytes. Therefore, the serial port data must be sent according to the standard USB keyboard data packet.
  • For example, if "A" is pressed, the serial port will send data packets: 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00;
  • For example, if the analog "A" is released, the serial port sends data packets as: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00;
  • For example, if you press "A+SHIFT" simultaneously, the serial port will send data packets: 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00;


Please refer to datasheet of modes