Hey guys, I'd like to get USB going on 18f67j50.
I am having trouble getting the correct frequency. I have a 20mhz
crystal, but I would prefer internal osc if possible. I can't even get
serial to work at 48mhz OSC.
I had a look at the fuses which seem to be wrong compared to the
datasheet, and I don't see any USBPLL either.
pragma fuse_def PLLDIV:0 0xE { -- pll div
P1 = 0xE -- no divide (4mhz input)
P2 = 0xC -- divide by 2 (8mhz input)
P3 = 0xA -- divide by 3 (12mhz
input)
P4 = 0x8 -- divide by 4 (16mhz
input)
P5 = 0x3;0x6 -- divide by 5 (20mhz
input)
P6 = 0x4 -- divide by 6 (24mhz
input)
P10 = 0x2 -- divide by 10 (40mhz
input)
P12 = 0x0 -- divide by 12 (48mhz
input)
}
include 18f67j50 -- target PICmicro
--
-- This program assumes that a 20 MHz resonator or crystal
-- is connected to pins OSC1 and OSC2.
-- (unspecified configuration bits may cause a different frequency!)(
pragma target clock 48_000_000 -- oscillator frequency
-- configuration memory settings (fuses)
pragma target OSC HS_PLL -- HS crystal or resonator
pragma target PLLDIV P5 -- / 5
pragma target CPUDIV P2 -- / 2
pragma target WDT disabled -- no watchdog
pragma target XINST disabled -- not supported by JalV2
--
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.