HID USB on 18F87J50


Closed Thread
Results 1 to 40 of 57

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default Re: HID USB on 18F87J50

    I haven't tried this specific PIC yet. I try to stay away of Sims
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default Re: HID USB on 18F87J50

    OK, I'm getting closer.
    I think I can make USB work on it.

    What a screwy chip.
    DT

  3. #3
    Join Date
    Aug 2011
    Posts
    457

    Default Re: HID USB on 18F87J50

    This is all very interesting. Care to share what you've been able to find out so far?

    How is this chip different than the others?

  4. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530

    Default Re: HID USB on 18F87J50

    Quote Originally Posted by tumbleweed View Post
    How is this chip different than the others?
    I am sure Darrel will share more.

    But one way it is a bit odd, is it shares addresses for SFR's. See: 5.3.5.1 Shared Address SFRs . You have to set the ADSHR bit in the WDTCON register to access the alternate locations.

  5. #5
    Join Date
    Aug 2011
    Posts
    457

    Default Re: HID USB on 18F87J50

    But one way it is a bit odd, is it shares addresses for SFR's. See: 5.3.5.1 Shared Address SFRs
    Yeh, I've seen that "feature" in a number of the J series parts, not just the J50.

    It doesn't seem to have anything to do with USB register access, though.

  6. #6
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530

    Default Re: HID USB on 18F87J50

    Darrel talks about it in post 19 of this thread:

    There is something seriously messed up with these chips. And it's all Microchip.

    The SFR's from address F40h to F5Fh cannot be accessed with either the MOVFF opcode or indirectly through the FSR's.
    They can only be accessed by setting BSR to bank15 and using "banked" opcodes like movf, movwf, bcf etc.

    I realize that those SFR's are outside of the ACCESS bank, but that should not affect MOVFF or indirect addressing thru FSR's.

    That range of SFR's contains many of the USB modules registers.
    Other USB module registers such as UCON USTAT etc that reside in the access bank can be written/read with all 3 methods FSR, MOVFF and banked. So it's not related to the USB module itself.

    The USB libraries rely heavily on MOVFF and FSR's.

    I have found nothing in the errata or datasheet that mentions this behavior.
    And in due time, we will see his work around!

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default Re: HID USB on 18F87J50

    WOW, I've been chasing my tail, and apparently for not.

    The MPASM that comes with MPLAB 8.73a was generating incorrect opcodes for the banked instructions.
    This was making me think things were happening in the chip that should not have been happening.

    The actual silicon in the xxJ50's is not the problem.

    There is a new version MPLAB 8.76 which has fixed the errors.
    Compile your USB programs using the new assembler, and walla, working USB.

    There are other chips that will be affected by the problem, and it's not only USB that will be affected, so it is recommended that everyone with PBP 2.60 or later upgrade MPLAB to a version higher than 8.73a.
    DT

  8. #8
    Join Date
    Sep 2009
    Posts
    755

    Thumbs up Re: HID USB on 18F87J50

    I'll give it try tomorrow.
    Thanks Darrell

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default Re: HID USB on 18F87J50

    And obviously, it doesn't seems Microchip have documented that bug... or again, I'm blind
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  10. #10
    Join Date
    Sep 2009
    Posts
    755

    Default Re: HID USB on 18F87J50

    I just recompile CDC from last attempt and it is working. Now just to try HID with VB6.
    You save my butt, again

  11. #11
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default Re: HID USB on 18F87J50

    I think it's time to retire one of my signature quotes ...

    Name:  Tellit.gif
Views: 1131
Size:  901 Bytes

    They don't always do what you tell them.

    But I'm definitely keeping this one ...

    Name:  Upgrade.gif
Views: 1142
Size:  497 Bytes
    DT

  12. #12
    Join Date
    Sep 2009
    Posts
    755

    Default Re: HID USB on 18F87J50

    Maybe is screwy, but it have everything I need for this project, and it's cheep. Thank you

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