USBSERVICE + serout2 problem


Closed Thread
Results 1 to 40 of 52

Hybrid View

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

    Default

    Yes, it does not matters if I comment USB_ASM_Service.pbp or not. The demo does work perfectly with USBINIT and USBService, but as soon as I comment these I loose USB enumeration.

    I also wish to use USB_ASM_Service.pbp in conjunction with Darrel's SPWM_INT.bas which does not seems possible right now (it gives an INTHAND symbol cannot be refefined error, which is normal because it appears twice). I could do the USBService interrupt with the SPWM interrupt at the same time... I do not have tight frequency requirements for the PWM signal (about 100Hz or more), what I'm interested in is the duty cycle. The main idea of my project is based on controlling the brightness of 3 LEDs by sending serial commands through USB CDC. I have to use the 13K50 for this application, but there's only one ECCP module.

    But first things first, making USB_ASM_Service.pbp work with the demo! Hopefully Darrel can spare a little time to check what is going wrong here.

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

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

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

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

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

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

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