background image

8

By using the make and break commands in Key Number Mode, any 
sequence that can by manually typed on a keyboard can be produced 
with the USB-ASC232.  Use this Key Number Mode to emulate single 
keystrokes or even combinations such as Ctrl+F1, or Shift-Alt+F5. 

Additional Key Number Mode Control Commands

The  USB-ASC232  features  two  additional  commands  for  keyboard 
action.  The first command provides a way to clear the keyboard buffer 
and is useful for ensuring that no keys are stuck in the “ON” state.  The 
second  command  allows  for  the  polling  of  the  keyboard  status  LED 
states.  This polling command is useful for checking shift case changes, 
or  for  making  sure  of  the  Num  Lock  state  before  using  Num  Lock 
affected keys.

0x38

  -  USB  Buffer  Clear  Command.    Sending  0x38  to  the 

USB-ASC232 serial port results in the device’s internal USB keyboard 
buffer being cleared.  Use of this command ensures that all made keys 
currently in the keyboard buffer are released.   

0x7F

 - Status LED Read Command. Sending a code 0x7F to the USB-

ASC232 serial port results in the return of a character in the range of ASCII 
“0”  -  “7”.    The  USB-ASC232  response  character  reflects  the  current 
state of the Scroll Lock, Caps Lock, and Num Lock LEDs on the computer 
system as listed in the chart below.

ASCII Response

Scroll Lock Status Caps Lock Status

Num Lock Status

“0”

Off

Off

Off

“1”

Off

Off

On

“2”

Off

On

Off

“3’

Off

On

On

“4”

On

Off

Off

“5”

On

Off

On

“6”

On

On

Off

“7”

On

On

On

11

[W2]  -  The  most  significant  bit  of  the  scroll  wheel  movement 
magnitude.

[W1] - Bit 1 of the three bit value for scroll wheel movement.

[W0] - Least significant bit of the scroll wheel movement value.

[1] - Bit 3 of this #4 byte is  always “1”. Sending “0” for this bit will 
cause the entire mouse control packet to be ignored.

[MM] - State of the middle mouse button.  Set to 1 for middle 
mouse button on, 0 for the button to be off.

[MR] - State of the right mouse button.  Set to 1 for right mouse 
button on, 0 for the button to be off.

[ML]  -  State  of  the  left  mouse  button.    Set  to  1  for  left  mouse 
button on, 0 for the button to be off.

NOTES - When sending this 4 byte mouse command packet, the 
three bytes following the first 0x00 byte should be sent with no 
more  than  50msec  between  the  bytes.    The  0x00  must  always 
be followed by 3 additional bytes to complete the mouse control 
packet  and  avoid  any  confusion  between  mouse  control  and 
keystroke commands.

The  scroll  wheel  magnitude  command  is  a  4  bit  signed  value 
located in bits Ws through W0, and in the range of 0x00 to 0x07 
for up movement, 0x0F to 0x08 for down movement.

The three mouse button bits command the states of the mouse 
buttons as seen by the target computer.  A “1” in the respective 
bit  indicates  the  mouse  button  is  on,  while  a  “0”  indicates  the 
button is not on.  Be sure to release any mouse buttons that were 
in the on state at a later time once  the mouse button task has 
completed.

Summary of Contents for USB-ASC232

Page 1: ...l Toll Free 888 690 9080 Phone 540 465 4677 Fax 540 465 4678 Monday through Friday 8 00 am to 5 00 pm EST sales hagstromelectronics com www hagstromelectronics com 1986 Junction Road Strasburg VA 2265...

Page 2: ...the assembly testing and burn in of your USB ASC232 to ensure its performance If you have any questions please send us an email or give us a call Support is available Monday through Friday 8 00 am to...

Page 3: ...onics com 17 2 CONTENTS Operating Voltage 5 Volts DC 5 Powered from USB port Operating Current Less than 100 ma Operating Temp 0 to 70 Degrees C PC Interface USB Target Computer RS 232 Serial Source C...

Page 4: ...decimal 65 is received in this mode a capital A character will be produced as a keystroke on the computer at the USB end of the cable RS 232 characters received which are out of the 0x00 to 0x7f range...

Page 5: ...to an extended ASCII character set character values 0x80 to 0xFF When an RS 232 byte is received in this mode it produces a USB keystroke on the PC which corresponds to the following table Parity may...

Page 6: ...one none none none 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1...

Page 7: ...if someone was physically holding that key on a keyboard Each time a make is sent for a key a corresponding break release of that key must be done at a later time to deactivate it The break code for a...

Page 8: ...es shown above to produce the make and break actions for the corresponding key 12 When sending a mouse control packet for cursor movement only be sure to send all 0 values for the scroll wheel and mou...

Page 9: ...Status 0 Off Off Off 1 Off Off On 2 Off On Off 3 Off On On 4 On Off Off 5 On Off On 6 On On Off 7 On On On 11 W2 The most significant bit of the scroll wheel movement magnitude W1 Bit 1 of the three b...

Page 10: ...L Alt make 112 Make F1 240 Break F1 188 Break L Alt 186 Break L Ctrl The example above assumes that the handshaking USB ASC232 is seen as not busy before sending the next command byte to the unit Prod...

Page 11: ...L Alt make 112 Make F1 240 Break F1 188 Break L Alt 186 Break L Ctrl The example above assumes that the handshaking USB ASC232 is seen as not busy before sending the next command byte to the unit Prod...

Page 12: ...onse Scroll Lock Status Caps Lock Status Num Lock Status 0 Off Off Off 1 Off Off On 2 Off On Off 3 Off On On 4 On Off Off 5 On Off On 6 On On Off 7 On On On 11 W2 The most significant bit of the scrol...

Page 13: ...es shown above to produce the make and break actions for the corresponding key 12 When sending a mouse control packet for cursor movement only be sure to send all 0 values for the scroll wheel and mou...

Page 14: ...if someone was physically holding that key on a keyboard Each time a make is sent for a key a corresponding break release of that key must be done at a later time to deactivate it The break code for a...

Page 15: ...E 9F none none none none none 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD...

Page 16: ...to an extended ASCII character set character values 0x80 to 0xFF When an RS 232 byte is received in this mode it produces a USB keystroke on the PC which corresponds to the following table Parity may...

Page 17: ...decimal 65 is received in this mode a capital A character will be produced as a keystroke on the computer at the USB end of the cable RS 232 characters received which are out of the 0x00 to 0x7f range...

Page 18: ...onics com 17 2 CONTENTS Operating Voltage 5 Volts DC 5 Powered from USB port Operating Current Less than 100 ma Operating Temp 0 to 70 Degrees C PC Interface USB Target Computer RS 232 Serial Source C...

Page 19: ...the assembly testing and burn in of your USB ASC232 to ensure its performance If you have any questions please send us an email or give us a call Support is available Monday through Friday 8 00 am to...

Page 20: ...l Toll Free 888 690 9080 Phone 540 465 4677 Fax 540 465 4678 Monday through Friday 8 00 am to 5 00 pm EST sales hagstromelectronics com www hagstromelectronics com 1986 Junction Road Strasburg VA 2265...

Reviews: