KEYBOARD USB HID
Moderator: Benj
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
KEYBOARD USB HID
Good use Flowcode 6.Estou problem with the USB HID simulation in WINDOW 10. Do not recognize the window 10 of the following message. "FAULT DISPOSITIVO.Como DESCRIPTOR REQUEST do I solve? Thanks
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: KEYBOARD USB HID
Have you made sure your clock settings (OSC settings in configuration and clock speed in project options) match and are correct? The 20MHz clock speed looks suspicious when checking the configuration settings and the table on page 31 of the data sheet.
Also, what hardware are you using? Do you have a 220nF capacitor connected between Vusb pin (14 for PDIP/SOIC) and ground?
Also, what hardware are you using? Do you have a 220nF capacitor connected between Vusb pin (14 for PDIP/SOIC) and ground?
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
Re: KEYBOARD USB HID
Hello thank you for me responder.Eu made the settings the same as this example of BEN modified for forum.Alterei mate only the crystal to 20mhz.Utilizo breadboard.
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
Re: KEYBOARD USB HID
Este é o programa teste que modifiquei para meu uso.
- Attachments
-
- ZX Spectrum.fcf
- (13 KiB) Downloaded 589 times
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
Re: KEYBOARD USB HID
Hello fortunately managed to make my funcionar.O error in hardware design was lack of capacitor 470 to terra.Muito thank you for answering me. KERSING
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
Re: KEYBOARD USB HID
My question is now shipping a value in education "SENDDATADIRECT" which seems to be a DO STRING.Como to send word "A" .Escrevo eg SENDDATADIRECT "0x04" But in string format?
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
Re: KEYBOARD USB HID
I write as STRING or HEX?
KeyPress Code KeyPress Code
A 0x04 X 0x1B
B 0x05 Y 0x1C
C 0x06 Z 0x1D
D 0x07 Carriage Return 0x28
E 0x08 Tab 0x2B
F 0x09 Caps Lock 0x39
G 0x0A Scroll Lock 0x47
H 0x0B Num Lock 0x53
I 0x0C / 0x54
J 0x0D * 0x55
K 0x0E - 0x56
L 0x0F + 0x57
M 0x10 1 0x59
N 0x11 2 0x5A
O 0x12 3 0x5B
P 0x13 4 0x5C
Q 0x14 5 0x5D
R 0x15 6 0x5E
S 0x16 7 0x5F
T 0x17 8 0x60
U 0x18 9 0x61
V 0x19 0 0x62
W 0x1A \ 0x64
KeyPress Code KeyPress Code
A 0x04 X 0x1B
B 0x05 Y 0x1C
C 0x06 Z 0x1D
D 0x07 Carriage Return 0x28
E 0x08 Tab 0x2B
F 0x09 Caps Lock 0x39
G 0x0A Scroll Lock 0x47
H 0x0B Num Lock 0x53
I 0x0C / 0x54
J 0x0D * 0x55
K 0x0E - 0x56
L 0x0F + 0x57
M 0x10 1 0x59
N 0x11 2 0x5A
O 0x12 3 0x5B
P 0x13 4 0x5C
Q 0x14 5 0x5D
R 0x15 6 0x5E
S 0x16 7 0x5F
T 0x17 8 0x60
U 0x18 9 0x61
V 0x19 0 0x62
W 0x1A \ 0x64
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: KEYBOARD USB HID
Hello,
Perhaps these files would help.
http://www.matrixtsl.com/wiki/index.php ... 7a31b97c2a
The keyboard is a bit strange you have 8 bytes from the micro to the PC for the key scan code (2 bytes for modifiers such as shift or control and 6 bytes for alphanumeric keys) and one byte from the PC to the micro for status LEDs caps lock etc.
The key scan code is send as 8 bytes to allow multiple key combinations to be pressed or held at once.
Perhaps these files would help.
http://www.matrixtsl.com/wiki/index.php ... 7a31b97c2a
The keyboard is a bit strange you have 8 bytes from the micro to the PC for the key scan code (2 bytes for modifiers such as shift or control and 6 bytes for alphanumeric keys) and one byte from the PC to the micro for status LEDs caps lock etc.
The key scan code is send as 8 bytes to allow multiple key combinations to be pressed or held at once.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
Re: KEYBOARD USB HID
Hello everyone I am raising this topic i know that it has all the features released,but i am wanting to emulate a keyboard HID and i need the ENTER key.Is it possible someone having the key value
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: KEYBOARD USB HID
Hello,
This should give you an enter key.
Data[2] = 0x28
Taken from here, under the Keyboard section.
http://www.freebsddiary.org/APC/usb_hid_usages.php
It is listed in my Keyboard Scan Codes Excel document but is listed as Carriage Return so I missed it at first.
This should give you an enter key.
Data[2] = 0x28
Taken from here, under the Keyboard section.
http://www.freebsddiary.org/APC/usb_hid_usages.php
It is listed in my Keyboard Scan Codes Excel document but is listed as Carriage Return so I missed it at first.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 150
- Joined: Mon Oct 15, 2012 5:19 pm
- Has thanked: 12 times
- Been thanked: 18 times
- Contact:
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: KEYBOARD USB HID
Hello,
i would like to modify the attached FC6 program so it will send ten lines of predefined (fixed) text to my computer.
The attached file is taken from the USB HID component examples. What it does is just to send a line of text every 5 seconds.
I tried to modify the program but i am missing something.
Any thoughts about it?
Thanks in advance
George
i would like to modify the attached FC6 program so it will send ten lines of predefined (fixed) text to my computer.
The attached file is taken from the USB HID component examples. What it does is just to send a line of text every 5 seconds.
I tried to modify the program but i am missing something.
Any thoughts about it?
Thanks in advance
George
- Attachments
-
- USB_HID_Keyboard (2).fcfx
- (23.39 KiB) Downloaded 235 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: KEYBOARD USB HID
Hi George,
It looks to me like you're close though I haven't spotted anything incorrect yet. Are you getting anything out of it at the moment?
Maybe the CheckRx needs to be in the loop after the KeyUp macro?
It looks to me like you're close though I haven't spotted anything incorrect yet. Are you getting anything out of it at the moment?
Maybe the CheckRx needs to be in the loop after the KeyUp macro?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: KEYBOARD USB HID
Benj wrote:Hi George,
It looks to me like you're close though I haven't spotted anything incorrect yet. Are you getting anything out of it at the moment?
Maybe the CheckRx needs to be in the loop after the KeyUp macro?
Hi Benj,
At the moment i get only the "Hello From Your USB Keyboard Device! 12345\n" text every 5 seconds.
It looks like this:
Hello From Your USB Keyboard Device! 12345
Delay 5s
Hello From Your USB Keyboard Device! 12345
Delay 5s
Hello From Your USB Keyboard Device! 12345
Delay 5s
Hello From Your USB Keyboard Device! 12345
Delay 5s..
I would like to modify the program so i will take 10 different lines of text. For example:
Text for line 1
Delay 5s
Text for line 2
Delay 5s
Text for line 3
Delay 5s
Text for line 4
Delay 5s
Text for line 5
Delay 5s
Text for line 6
Delay 5s
Text for line 7
Delay 5s
Text for line 8
Delay 5s
Text for line 9
Delay 5s
Text for line 10
Delay 5s
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: KEYBOARD USB HID
This should hopefully help.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: KEYBOARD USB HID
Benj wrote:This should hopefully help.
Thank you very much Benj! That was exactly what i was looking for!
George