Comment #1 on issue 154 by sebastien.lelong: USB RAM locations (BDT & Data)
http://code.google.com/p/jallib/issues/detail?id=154
Jim Robertson (newfound) from Microchip forums suggest the following:
"""
The only thing that I have that may save a little time is a complete
PIC18F USB list that defines the buffer descriptor locations.
if (target_chip ==PIC_18F2450) | (target_chip == PIC_18F2455) |
(target_chip == PIC_18F2458) | (target_chip == PIC_18F2550) |
(target_chip == PIC_18F2553)| (target_chip == PIC_18F4450) |
(target_chip == PIC_18F4455) | (target_chip == PIC_18F4458) |
(target_chip == PIC_18F4550) | (target_chip == PIC_18F4553) then
const USB_BASE_ADDRESS = 0x400
end if
if (target_chip == PIC_18F13K50) | (target_chip == PIC_18F14K50) then
const USB_BASE_ADDRESS = 0x200
end if
if (target_chip == PIC_18F24J50) | (target_chip == PIC_18F25J50) |
(target_chip == PIC_18F26J50) | (target_chip == PIC_18F44J50) |
(target_chip == PIC_18F45J50) | (target_chip == PIC_18F46J50) then
const USB_BASE_ADDRESS = 0x400
//#define PLLEN_REQD
end if
if (target_chip == PIC_18F26J53) | (target_chip == PIC_18F27J53) |
(target_chip == PIC_18F46J53) | (target_chip == PIC_18F47J53) then
const USB_BASE_ADDRESS = 0xd00
//#define PLLEN_REQD
end if
if (target_chip == PIC_18F65J50) | (target_chip == PIC_18F66J50) |
(target_chip == PIC_18F66J55) | (target_chip == PIC_18F67J50) |
(target_chip == PIC_18F85J50) | (target_chip == PIC_18F86J50) |
(target_chip == PIC_18F66J55) | (target_chip == PIC_18F67J50) then
const USB_BASE_ADDRESS = 0x400
//#define PLLEN_REQD
//#define USE_ALT_ANCON
end if
Note that there is some logic to the groupings as there tends to be one or
two non USB related features that can be included for each generic family.
I left some examples commented out.
This might save an hour to two's work and it gives the full list of all
PIC18 USB parts.
"""
If new PICs arrive, they won't be supported whereas if logic is based on
some information in device files, they could be. That should remain an
option. In any case, I'd suggest that, if not explicitely supported,
compiling USB stack against a PIC should miserably fail if not included in
this logic:
if target == ... then
base = ...
elsif target == ... then
base = ...
elif ...
...
else
_error "This PIC isn't supported by USB stack"
end if
Seb
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.