External Oscillator

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

Post Reply
drewappling
Posts: 14
Joined: Fri Feb 06, 2009 2:26 pm
Location: Spokane, WA

External Oscillator

Post by drewappling » Fri Feb 06, 2009 2:39 pm

Hello everyone,
This is my first post on here and I hoped it wouldn't be to ask a question.
I am having a with the 18f4550 and an external oscillator I have the circuit built with a 20mhz crystal and 2 22pf caps. I used the schematic posted on eegeek.net
http://eegeek.net/images/stories/PIC/18 ... _basic.png
The problem I am having is that I am unable to get the 18f4550 to work with an external crystal. Running programs off of the internal oscillator works fine but when attempting use the crystal it just locks up.
This even happens with the code generated from EasyHID.
I'm using the following code for setting up the 18f4550

Code: Select all

// device and clock...                                                                                                                                                                                                                                         
Device = 18f4550
Clock = 48
Config
    FOSC = HSPLL_HS,
    PLLDIV = 2,
    CPUDIV = OSC2_PLL3,
    USBDIV = 2
Const Threshold = 200
I am also having problems with using the 18f4553 with EasyHID when changing device to 18f4553 I receive massive declaration errors. It seems like the include file is missing alot of information.

Thanks for the help.

Drew

Mikeclx
Posts: 20
Joined: Mon Feb 09, 2009 5:36 am
Location: New Zealand

I use 18F4550 all the time

Post by Mikeclx » Mon Feb 09, 2009 6:04 am

this is my config

Device = 18F4550
Clock = 48

Config
PLLDIV = 5,
CPUDIV = OSC1_PLL2,
USBDIV = 2,
FOSC = HSPLL_HS,
VREGEN = ON,
MCLRE = off


I use Resonators with built in caps rather than crystal... less board space... never had an issue with them they just work.. but should work with Xtal

Post Reply