Easy HID Command -Response application


Results 1 to 26 of 26

Threaded View

  1. #22
    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 15:19.

Similar Threads

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