USB Keyboard


Closed Thread
Results 1 to 20 of 20

Thread: USB Keyboard

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    755

    Default Re: USB Keyboard

    Along buffer size, you need to change in hid_desc.bas:
    Code:
    ReportDescriptor1
    	retlw   0x05
    	retlw   0x01    ; usage page (generic desktop)
    	retlw   0x09
    	retlw   0x06    ; usage (keyboard)
    	retlw   0xA1
    	retlw   0x01    ; collection (application)
    	retlw   0x05
    	retlw   0x07    ;   usage (Key codes)
    	retlw   0x19
    	retlw   0xE0    ;   usage minimum (224)
    	retlw   0x29
    	retlw   0xE7    ;   usage minimum (231)
    	retlw   0x15
    	retlw   0x00    ;     logical minimum (0)
    	retlw   0x25
    	retlw   0x01    ;     logical maximum (1)
    	retlw   0x75
    	retlw   0x01    ;     report size (1)
    	retlw   0x95
    	retlw   0x08    ;     report count (8)
    	retlw   0x81
    	retlw   0x02    ;     Input (data,variable,absolute)
    	retlw   0x95
    	retlw   0x01    ;     report count (1)
    	retlw   0x75
    	retlw   0x08    ;     report size (8)
    	retlw   0x81
    	retlw   0x01    ;     Input (constant)
    	retlw   0x95
    	retlw   0x05    ;     report count (5)
    	retlw   0x75
    	retlw   0x01    ;     report size (1)
    	retlw   0x05
    	retlw   0x08    ;     usage page (page# for leds)
    	retlw   0x19
    	retlw   0x01    ;     Usage minimum (1)
    	retlw   0x29
    	retlw   0x05    ;     Usage maximum (5)
    	retlw   0x91
    	retlw   0x02    ;     output (data,variable,absolute)
    	retlw   0x95
    	retlw   0x01    ;     report count (1)
    	retlw   0x75
    	retlw   0x03    ;     report size (3)
    	retlw   0x91
    	retlw   0x01    ;     output (constant)
    	retlw   0x95
    	retlw   0x06    ;     report count (6)
    	retlw   0x75
    	retlw   0x08    ;     report size (8)
    	retlw   0x15
    	retlw   0x00    ;     logical minimum (0)
    	retlw   0x25
    	retlw   0x65    ;     logical maximum (101)
    	retlw   0x05
    	retlw   0x07    ;     usage page (keycodes)
    	retlw   0x19
    	retlw   0x00    ;     usage minimum (0)
    	retlw   0x29
    	retlw   0x65    ;     usage maximum (101)
    	retlw   0x81
    	retlw   0x00    ;     input (data, array)	
    	retlw   0xC0    ;   end collection
    EndReportDescriptor1
    If I understand correctly. But I never had any luck with changing descriptor files.

  2. #2
    Join Date
    Sep 2009
    Posts
    755

    Default Re: USB Keyboard

    I think you can find some info in this series:



    Look for nkey roll over descriptor...

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631

    Default Re: USB Keyboard

    if i watch that first video again i could fool myself into believing that one day i might understand usb enough to actually get somewhere with it

    great info pedja089
    Warning I'm not a teacher

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966

    Default Re: USB Keyboard

    very nice instructive videos

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115

    Default Re: USB Keyboard

    Quote Originally Posted by pedja089 View Post
    Along buffer size, you need to change in hid_desc.bas:
    Code:
    ReportDescriptor1
    	retlw   0x05
    	retlw   0x01    ; usage page (generic desktop)
    	retlw   0x09
    	retlw   0x06    ; usage (keyboard)
    	retlw   0xA1
    	retlw   0x01    ; collection (application)
    	retlw   0x05
    	retlw   0x07    ;   usage (Key codes)
    	retlw   0x19
    	retlw   0xE0    ;   usage minimum (224)
    	retlw   0x29
    	retlw   0xE7    ;   usage minimum (231)
    	retlw   0x15
    	retlw   0x00    ;     logical minimum (0)
    	retlw   0x25
    	retlw   0x01    ;     logical maximum (1)
    	retlw   0x75
    	retlw   0x01    ;     report size (1)
    	retlw   0x95
    	retlw   0x08    ;     report count (8)
    	retlw   0x81
    	retlw   0x02    ;     Input (data,variable,absolute)
    	retlw   0x95
    	retlw   0x01    ;     report count (1)
    	retlw   0x75
    	retlw   0x08    ;     report size (8)
    	retlw   0x81
    	retlw   0x01    ;     Input (constant)
    	retlw   0x95
    	retlw   0x05    ;     report count (5)
    	retlw   0x75
    	retlw   0x01    ;     report size (1)
    	retlw   0x05
    	retlw   0x08    ;     usage page (page# for leds)
    	retlw   0x19
    	retlw   0x01    ;     Usage minimum (1)
    	retlw   0x29
    	retlw   0x05    ;     Usage maximum (5)
    	retlw   0x91
    	retlw   0x02    ;     output (data,variable,absolute)
    	retlw   0x95
    	retlw   0x01    ;     report count (1)
    	retlw   0x75
    	retlw   0x03    ;     report size (3)
    	retlw   0x91
    	retlw   0x01    ;     output (constant)
    	retlw   0x95
    	retlw   0x06    ;     report count (6)
    	retlw   0x75
    	retlw   0x08    ;     report size (8)
    	retlw   0x15
    	retlw   0x00    ;     logical minimum (0)
    	retlw   0x25
    	retlw   0x65    ;     logical maximum (101)
    	retlw   0x05
    	retlw   0x07    ;     usage page (keycodes)
    	retlw   0x19
    	retlw   0x00    ;     usage minimum (0)
    	retlw   0x29
    	retlw   0x65    ;     usage maximum (101)
    	retlw   0x81
    	retlw   0x00    ;     input (data, array)	
    	retlw   0xC0    ;   end collection
    EndReportDescriptor1
    If I understand correctly. But I never had any luck with changing descriptor files.
    Me too... There is no documentation of all these parameters...

    Will watch the videos. Thanks for the info each and everyone.
    Ioannis

Similar Threads

  1. PIC18F14K50 USB Keyboard firmware
    By ScumariTec in forum USB
    Replies: 0
    Last Post: - 27th January 2021, 10:29
  2. USB keyboard emulator
    By Toley00 in forum USB
    Replies: 12
    Last Post: - 23rd January 2012, 00:57
  3. One USB keyboard to Two USB Ports
    By picnaut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th June 2009, 00:04
  4. Replies: 17
    Last Post: - 13th June 2008, 21:33
  5. Replies: 3
    Last Post: - 10th April 2008, 10:02

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts