USBSERVICE + serout2 problem


Closed Thread
Results 1 to 40 of 52

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    I am not at a place to test this to see if it makes a difference or not...

    I (for no good reason) have this after all DEFINES and Variable declarations.
    Code:
    Include	"cdc_desc.bas"	' Include the CDC descriptors
    INCLUDE "USB_ASM_Service.pbp"  ' USB Init and Service interrupt routines
    Which is where your first USBInt is...

    And maybe for the other ISR.
    From USB_ASM_SERVICE.pbp
    To use other high priority interrupts you can add the define *
    '* DEFINE INT_HOOK handlers *
    '* handlers will be called on each high priority interrupt *
    '* The handlers must be ASM Interrupt compatible
    Dave
    Always wear safety glasses while programming.

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

    Default

    I can easily do the test, moved the includes just before the start of the main program with the same result, does not enumerate . Still work like a charm the old way though.

    Tomorrow I will get my 18F4550 board out and try.

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

    Default

    I could not get the CDC demo to run on my 18F4550 board, (though, 3 years ago it was running fine... but since then I changed PBP, MCS and PMLAB versions...). I however did no progress regarding the 13K50 issue in three weeks, I just can't figure what's wrong, what to modify, or where to look for. Is there a need to enable an hardware timer to run the interrupt?

    Unfortunately the same apply for running more than one interrupt-based routine from Darrel, using the DEFINE INT_HOOK handlers. I have not been able to find any example for it, and I don't really understand how to makes it work.

    Any help would be greatly appreciated
    Last edited by aberco; - 16th September 2010 at 16:59.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Which version of PBP are you currently using?
    Dave
    Always wear safety glasses while programming.

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

    Default

    I'm running PBP 2.60 in MCS 4.0.0.0, in conjunction with MPLAB 8.53.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Some things have changed with PBP 2.6. Maybe that is the problem?
    Have you seen this?
    http://www.picbasic.co.uk/forum/show...0301#post80301
    Dave
    Always wear safety glasses while programming.

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

    Default

    Yes I know this post was my starting point.

    Copy the PBP\USB18 folder to a new location.
    You do not want any files left over from previous versions of PBP, so don't try to copy it into an existing project folder.

    Open and compile cdc_demo.bas with the proper chip selected.
    Program the chip and test. Done deal.
    That is exactly what I did, and it does work.

    It is when I add Darrel USB_ASM_Service.pbp and remove the original USBINIT/USBSERVICE that the PIC does not enumerate anymore...

    A last resort idea would be to USBSERVICE using a Timer0 interrupt, but Darrel solution adds more fancy controls such as the ability to know if the link is established, or if Tx/Rx operations are available/possible. This would be a nice addition to prevent any USB buffer fill and lock-up of the PIC.

    (PS. I tried to send a private message to Darrel about 3 weeks ago but had no reply).
    Last edited by aberco; - 16th September 2010 at 17:56.

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