USBSERVICE + serout2 problem


Closed Thread
Results 1 to 40 of 52

Hybrid View

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

  2. #2
    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.

  3. #3
    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.

  4. #4
    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.

  5. #5
    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 16:56.

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

    Default

    Darrel has been out of town. He is sorta back now so maybe he will be able to help now.
    Dave
    Always wear safety glasses while programming.

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

    Default

    Ok, I tried some debug attempt with some LED blink, which show me that the interrupt handler "DoUSBSERVICE" within Darrel's routine is not called.

    This is what should do the USBSERVICE. Is there something to do to link this handler to an interrupt? should I configure a timer for this? I have deactivated the watchdog timer if that could explain why the handler is not working...
    I do not understand what triggers this interrupt. I've tried to call it manually within the USBIN loop using a GOSUB, but that does not help getting the PIC to enumerate...
    Last edited by aberco; - 16th September 2010 at 21:54.

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