Easy HID Command -Response application


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    No, there's nothing in the USB_ASM_Service.pbp file to change.
    But you'll need to edit the report size in the Descriptor file, and the arrays in your program.

    If you were using DT_HID, you could do it all in your main program.
    DT

  2. #2

    Default

    Mabe i mis understand something i have a file in my project called DESCUSBProject witch acording to me is the file i need to change but i i understand corectly it is already setted to use 64 bytes but as soon as i try to send more than 8 my device shows a conection but no data comes through below a part of the descriptor file
    Code:
    #define	EP0_BUFF_SIZE		64	; 8, 16, 32, or 64
    #define	MAX_NUM_INT		1	; For tracking Alternate Setting
    #define	MAX_EP_NUMBER		1	; UEP1
    #define	NUM_CONFIGURATIONS	1
    #define	NUM_INTERFACES		1
    
    #define	MODE_PP			    _PPBM0
    #define	UCFG_VAL		    _PUEN|_TRINT|_FS|MODE_PP	; Full-speed
    
    ; DEVICE CLASS USAGE
    #define USB_USE_HID
    
    ; HID
    ; Endpoints Allocation
    #define	HID_INTF_ID		  0x00
    #define	HID_UEP			  UEP1
    #define	HID_BD_OUT		  ep1Bo
    #define	HID_INT_OUT_EP_SIZE	  64
    #define	HID_BD_IN		  ep1Bi
    #define	HID_INT_IN_EP_SIZE	  64
    #define	HID_NUM_OF_DSC		  1

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Assuming it's a descriptor file from EasyHID, and you have PBP 2.50 or prior.

    A little further down in the file you'll find a ReportDescriptor1.
    Inside that, there's an *** INPUT REPORT *** and *** OUTPUT REPORT ***
    And each of those has a ...

    Code:
        ; report count (number of fields)
        retlw    0x95
        retlw    0x08
    The 0x08 needs to be changed to match your array size.
    Only 8, 16, 32 or 64 are valid.

    hth,
    DT

  4. #4

    Default

    Thank you i entered it in hex and everything works

  5. #5
    Join Date
    Dec 2006
    Posts
    32

    Default

    Hi guys,

    Quick question to Darrel if you see this thread

    Im using the USB_ASM_Service interupts which runs perfect for keeping my USB connection alive (as not using it with using LCDOUT in my main loop where no matter what I tried it killed the USB link even when I used your instant interupt 18 file.)
    Now I need to use the HPWM and found the info referring to setting the new duty cycle which works, but what im having problems with is this:

    I need to adjust the duty cycle based on user settings etc and updating the duty cycle in the main loop is way to slow (LCDOUT pauses slow the main loop down to much) so I added it as a hook using your INT_HOOK but I realised that the interupt only fires when the USB is plugged in (seems pretty obvious really as thats what the USB service file was created for lol) but I need it running all the time and have tried to insert your instant interupts again into the project, and after commenting out 2 lines which were in both files of yours, it assembles fine but when squirted into the pic and run it just hangs.

    I was just wondering if you have any tips on using both your instant interupts and the USB service interupt file.

    i'll keep plodding on with it in case I manage to work it out myself, but any info would be appreciated.


    Update:

    Ive managed to get the USB working by commenting out the:
    Code:
     DEFINE INTHAND _DoUSBSERVICE
    in the USB ASM Service file and adding it to here
    Code:
    asm
    INT_LIST  macro  ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler     USB_INT,     _DoUSBSERVICE, PBP, yes
            INT_Handler     INT_INT,     _MyPWM,   PBP,  yes
        endm
        INT_CREATE             ; Creates the Low Priority interrupt processor
    ENDASM
    
    @    INT_ENABLE  INT_INT
    And it works fine BUT this is where im really getting lost. (Noticed that because its enabled in the USB ASM service file, I dont need to add it using the INT_ENABLE command.)
    IF I set my interupt (the _MyPWM) to INT_INT it sends the LCD screen nuts BUT I can sort of see the counter im testing with changing, but when I try any other interupts it just sits there (Tried TMR0_INT and a fair few others with no luck as they either dont run the interupt or the LCD screen gets garbled)

    Will keep plodding on and hopefully work out whats wrong.
    Last edited by Mark J; - 22nd September 2010 at 14:19.

  6. #6
    Join Date
    Dec 2007
    Location
    Paris
    Posts
    101

    Default

    I'm in the same boat... it is possible to use Darrel interrupt routines with his new USB HID package, DT_HID260. It sort of replaces the USB_ASM_Service routine, and is very well designed.
    Would love to do the same with CDC profile
    Last edited by aberco; - 22nd September 2010 at 14:30.

  7. #7
    Join Date
    Dec 2006
    Posts
    32

    Default

    Quote Originally Posted by aberco View Post
    I'm in the same boat... it is possible to use Darrel interrupt routines with his new USB HID package, DT_HID260.
    Would love to do the same with CDC profile
    Hmm. Will have to look at the DT_HID as remember seeing it previously and completely forgot about it. Fingers crossed it'll sort some problems out etc.

Similar Threads

  1. USB hid maker help please.
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd April 2013, 14:49
  2. i cant get 18f2550 work as HID
    By Ahmadabuomar in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 13th October 2009, 16:39
  3. Unusual Interrupts Application Problem
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th May 2009, 11:55
  4. Hid Maker FS Problems
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th April 2009, 21:27
  5. Making your own HID descriptor file
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th April 2005, 12:35

Members who have read this thread : 0

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