Unable to get 18F25K50 and new USB stack working


+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,322
    Thumbs Up
    Received: 19
    Given: 0
    Total Downloaded
    1.01 GB

    0 Not allowed!

    Default Unable to get 18F25K50 and new USB stack working

    Help Please. Has anyone managed to get the 18F25K50 or 18F45K50 to work with the new USB stack? I have been trying for several days with the USB stack from V3.5.9.2 of the compiler.

    The mosue demo compiles and works fine with 18F14K50. I changed the device to 18F25K50, added the config from an older working project to USB_Defs.inc and added a conditional compile to the USB_System.inc to take care of the register change for the USB interrupt priority bit

    Code:
    $ifdef USB_SERVICE                  ' Are we using the low priority interrupt?
        $ifdef _device = _18F25K50 Or _device = _18f45k50
            IPR3bits_USBIP = 0
        $else
            IPR2bits_USBIP = 0         ' Yes. So USB Interrupt Priority set to Low        
        $endif
    $endif
    The programme compiles OK but Windows will not recognise the device. I have studied the various inc files and tried but I cannot see anything amiss. The Board is being powered from PicKit 2 and the hardware is OK as it still works with the hex file from an old project.
    Last edited by See_Mos; 2nd March 2017 at 09:50.
    My RAM is failing

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,136
    Thumbs Up
    Received: 66
    Given: 26
    Total Downloaded
    3.61 GB

    0 Not allowed!

    Default Re: Unable to get 18F25K50 and new USB stack working

    Windows not recognizing the device is often caused by an inadequate descriptor file or the speed/stability of the interface
    But why do you use the new stack, the stack implemented in the compiler works just fine with me

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    2,354
    Thumbs Up
    Received: 83
    Given: 183
    Total Downloaded
    5.30 GB

    0 Not allowed!

    Default Re: Unable to get 18F25K50 and new USB stack working

    I agree the USB support provided by the compiler is fine (and supports CDC which the new stack does not) but the new stack does offer several advantages -

    a. it's newer so it no doubt includes Microchip USB bug fixes
    b. the descriptor format is much closer to Microchip and others, so easier to port.
    c. more flexible access
    d. it "feels" better

    Anyway, thats just me. getting back to the original post. You need to be absolutly sure that the clock going to the USB engine is 48Mhz (assuming you want full speed). Find a USB project for 25K50 that uses full speed USB and compare configs. Also ensure that you run Device configurer (the check USB button in Fuse configurator) as a cross check.

    I'll have a quick look at the datasheet and see if anything jumps out.
    George.

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,136
    Thumbs Up
    Received: 66
    Given: 26
    Total Downloaded
    3.61 GB

    0 Not allowed!

    Default Re: Unable to get 18F25K50 and new USB stack working

    Sorry to disagree.
    -It's not much newer, if you look at the datetimestamp of the files it's 2012, so I doubt if the newest insights are incorporated
    -The descriptors are only slightly different in structure, the main difference is the way other files are included (they should yield in a valid descriptor else Windows would never accept them)
    -The USB_Defs.inc is horrible because it only supports a limited number of devices (and yours is NOT one of them). Imho it's really bad software architecture to include the device-specific configuration to a framework.
    -Why do you have more flexible access, to what?
    -Feeling better is subjective, so I won't discuss that.

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,596
    Thumbs Up
    Received: 341
    Given: 162
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Re: Unable to get 18F25K50 and new USB stack working

    But the very reason I added the USB stack written in BASIC, and open source, was so that users could alter it, and adjust it, as they liked. And maybe add to it!!!!!

    The device support I added was purely in the fuses, so these will require altering anyway if any other crystal is used etc...

    They were placed there to show how it worked, so users could adjust it as they liked.

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    2,354
    Thumbs Up
    Received: 83
    Given: 183
    Total Downloaded
    5.30 GB

    0 Not allowed!

    Default Re: Unable to get 18F25K50 and new USB stack working

    It's not much newer, if you look at the datetimestamp of the files it's 2012, so I doubt if the newest insights are incorporated
    The datastamp may have changed but theres nothing in "whats new" to suggest bug fixes.

    The descriptors are only slightly different in structure, the main difference is the way other files are included (they should yield in a valid descriptor else Windows would never accept them)
    I guess slightly is a matter of opinion. Descriptor files are difficult enough already, anything that makes porting easier is like a straw to a drowning man. As an example, try modifying the old style keyboard descriptor to a media keybord.

    The USB_Defs.inc is horrible because it only supports a limited number of devices (and yours is NOT one of them). Imho it's really bad software architecture to include the device-specific configuration to a framework.
    I think the idea is you add the device/Xtal that you intend to use, with some examples for the less experienced.

    Why do you have more flexible access, to what?
    HID_WriteArray/HID_ReadArray and HID_TxReport/HID_RxReport

    Feeling better is subjective, so I won't discuss that.
    Point taken. If the native USB commands do the job for you then that's fine. I say vive la difference.

    I see now that Les has responded and as usual hit it on the head, the thing I forgot, open source. I also forgot that it shows a timer being used instead of USBInit, hell it's worth it just for that.
    George.

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #7
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,136
    Thumbs Up
    Received: 66
    Given: 26
    Total Downloaded
    3.61 GB

    0 Not allowed!

    Default Re: Unable to get 18F25K50 and new USB stack working

    I'm happy with the native USB implementation since the only thing I do is HID. Les surely did a really fine job.
    I would not dare to touch the basic files in the new sample because, although I know a little of USB, the idea just frightens me.

    I withdraw my remarks, probable a bit too hasty.

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #8
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,322
    Thumbs Up
    Received: 19
    Given: 0
    Total Downloaded
    1.01 GB

    0 Not allowed!

    Default Re: Unable to get 18F25K50 and new USB stack working

    I wanted to use the USB stack because it is newer than the original commands and it is a challenge to make it work.

    I forgot to mention that I need HID. I have added a working fuse config from an old USB project to USB_Defs.inc and modified the system.inc and everything compiles OK.

    When my head stops buzzing I'll have another go, it's probably something simple that I have missed, or forgotten.
    My RAM is failing

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  17. #9
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,560
    Thumbs Up
    Received: 76
    Given: 33
    Total Downloaded
    6.56 GB

    0 Not allowed!

    Default Re: Unable to get 18F25K50 and new USB stack working

    Quote Originally Posted by Les View Post
    The device support I added was purely in the fuses, so these will require altering anyway if any other crystal is used etc...
    In fact I added a few devices to that list that I was going to make use off. Not only. Using same system for projects with different devices if needs be.
    Regards

    Joseph

  18. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. [SOLVED !] USB HID: Unable to reset USB
    By psrainey in forum USB Module
    Replies: 4
    Last Post: 30th August 2017, 14:33
  2. New stack USB Commands?
    By towlerg in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 4th November 2013, 18:20
  3. USB HID Stack
    By i2tzk in forum USB Module
    Replies: 18
    Last Post: 4th February 2013, 22:00
  4. PDS USB stack
    By dmTulsa in forum USB Module
    Replies: 18
    Last Post: 29th January 2013, 15:59
  5. USB code HID Stack
    By Dave-S in forum USB Module
    Replies: 1
    Last Post: 3rd November 2012, 14:34

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts