problems with 18f27j53 and usb
Moderators: David Barker, Jerry Messina
problems with 18f27j53 and usb
I've just realised I should have posted this as a new thread
I have a pcb that is designed for both 3v3 and 5 v with a jumper to select between the voltages, I have a 10uf ceramic on pin6(VDDcore)
If I fit an 18f2553 with the following config then it works and connects to the usb
Device = 18F2553
Clock = 48
Config
PLLDIV = 5,
CPUDIV = OSC1_PLL2,
USBDIV = 2,
FOSC = ECPLLIO_EC,
LVP = OFF,
VREGEN = ON
If I then fit the 18f27j53 and use the following config then it can flash an led at the correct rate but wont connect to the usb, I get "usb device not recognised" in windows
Device = 18F27j53
Clock = 48
Config
PLLDIV = 5,
CPUDIV = OSC1,
OSC = ECPLL,
CLKOEC = OFF,
CFGPLLEN = ON
I'm just wondering if I've messed up the config and the usb osc is wrong or something is missing.
Does anyone know if this is the correct setting for a 20MHz input from a clock source.
I have a pcb that is designed for both 3v3 and 5 v with a jumper to select between the voltages, I have a 10uf ceramic on pin6(VDDcore)
If I fit an 18f2553 with the following config then it works and connects to the usb
Device = 18F2553
Clock = 48
Config
PLLDIV = 5,
CPUDIV = OSC1_PLL2,
USBDIV = 2,
FOSC = ECPLLIO_EC,
LVP = OFF,
VREGEN = ON
If I then fit the 18f27j53 and use the following config then it can flash an led at the correct rate but wont connect to the usb, I get "usb device not recognised" in windows
Device = 18F27j53
Clock = 48
Config
PLLDIV = 5,
CPUDIV = OSC1,
OSC = ECPLL,
CLKOEC = OFF,
CFGPLLEN = ON
I'm just wondering if I've messed up the config and the usb osc is wrong or something is missing.
Does anyone know if this is the correct setting for a 20MHz input from a clock source.
Hmmm..
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Looks about right to me but I haven't personally used this mode on this device.
As a quick test; have you tried just using the internal osc on the 18F27J53? On this device you can safely run Full speed USB off the internal 8Mhz oscillator, which is how I've been running it. Might give you some confidence about the board/chip.
Also which USB stack are you using? If you are not using Jerry's 1.42 stack it is well worth using (and may be necessary)!
Regards,
Rangerbob
As a quick test; have you tried just using the internal osc on the 18F27J53? On this device you can safely run Full speed USB off the internal 8Mhz oscillator, which is how I've been running it. Might give you some confidence about the board/chip.
Code: Select all
Device = 18F27J53
Clock = 48
Public Config
OSC = INTOSCPLLO, ' internal osc 8MHz
PLLDIV = 2, ' usb 48MHz
CPUDIV = OSC1, ' 48MHz cpu clock
FCMEN = OFF,
IESO = OFF,
WDTEN = OFF,
WDTPS = 2048,
STVREN = ON,
XINST = OFF
'DEBUG = OFF
Regards,
Rangerbob
PS. I have some known working test code up on the wiki here:
http://www.sfcompiler.co.uk/wiki/pmwiki ... er.IntRTCC which uses this device that might be worth trying (uses internal osc).
http://www.sfcompiler.co.uk/wiki/pmwiki ... er.IntRTCC which uses this device that might be worth trying (uses internal osc).