OK, I'm getting closer.
I think I can make USB work on it.
What a screwy chip.
OK, I'm getting closer.
I think I can make USB work on it.
What a screwy chip.
DT
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?
Yeh, I've seen that "feature" in a number of the J series parts, not just the J50.But one way it is a bit odd, is it shares addresses for SFR's. See: 5.3.5.1 Shared Address SFRs
It doesn't seem to have anything to do with USB register access, though.
Darrel talks about it in post 19 of this thread:
And in due time, we will see his work around!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.
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
I'll give it try tomorrow.
Thanks Darrell
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.
I just recompile CDC from last attempt and it is working. Now just to try HID with VB6.
You save my butt, again![]()
I think it's time to retire one of my signature quotes ...
They don't always do what you tell them.
But I'm definitely keeping this one ...
![]()
DT
Maybe is screwy, but it have everything I need for this project, and it's cheep. Thank you![]()
Bookmarks