Thanks Dave!
Now it makes a lot more sense!
I noticed you did not use "OSCCON=%01110000"?
Second does anything change if you are using a 20 MHz Resonator?
Just seems like you should be putting in a multipication factor some place?
Thanks, Ed
Thanks Dave!
Now it makes a lot more sense!
I noticed you did not use "OSCCON=%01110000"?
Second does anything change if you are using a 20 MHz Resonator?
Just seems like you should be putting in a multipication factor some place?
Thanks, Ed
I used "OSCCON=%01110000" in the first code, the one for the internal setup. It is not needed when using the external.
When using a 20MHz external the first config line will look like this
@ __CONFIG _CONFIG1H, _HS_OSC_1H & _FSCM_OFF_1H & _RC_OSC_1H
The HSPLL_OSC_1H is the multiplier. All this chip can do is multiply by four.
Now you will want to try over-clocking. Water cooled PICs![]()
Dave
Always wear safety glasses while programming.
Thanks Dave!
Very interesting! So if I understand correctly, a 20 MHz external crystal with your line of code (thank you for this) will give an internal CPU speed of 40 MHz? By the way I like your idea of a "water cooled" PIC!
Just curious since I have been away from all this for so long, in the past when you programmed your PIC you would have to specify either XT or HS depending upon what frequency resonator you used. It appears this is now "built-in" with a default of XT? (__CONFIG _CONFIG1H, _XT_OSC_1H).
It is correct to assume with HSPLL the multiplier is always X4?
Best, Ed
When using a 20MHz external the first config line will look like this
@ __CONFIG _CONFIG1H, _HS_OSC_1H & _FSCM_OFF_1H & _RC_OSC_1H
And then this
DEFINE OSC 20
"HSPLL" would try to make the running speed 80MHz... I have my doubts if it would work. I have heard some folks tell of these running at 64MHz (and they did not use water...) but the data sheet claims 40MHz is the limit....
With this chip, yes.It is correct to assume with HSPLL the multiplier is always X4?
From the data sheet
Table 2-1 and table 2-2 are also worth looking at. 2-1 is for resonators without built in capacitors and 2-2 is for crystals. If resonators that have built in capacitors are used, even if they are 4MHz use "HS".2. XT Crystal/Resonator
3. HS High-Speed Crystal/Resonator
Dave
Always wear safety glasses while programming.
Hi Dave,If resonators that have built in capacitors are used, even if they are 4MHz use "HS".
I never heard about that one, where did you ferret out that little tidbit ?
Is it because the resonators exhibit lower impedance, and thus require more power ? I seldom use the low freq resonators, but I will put that away in my memory bank for the future.
Thanks
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Well...
I have always used the 3 pin resonators with built in capacitors and way back when I knew less than I do now.....
Making the transition from the Stamp, I was using a 20MHz with the 887, wanted to go with a little less power so I popped in a 4MHz and did not even think about changing the config. It worked fine.
Then stuff like this from the data sheets
When operating below 3V VDD, or when
using certain ceramic resonators at any
voltage, it may be necessary to use the
HS mode or switch to a crystal oscillator.
Dave
Always wear safety glasses while programming.
RTFDS,
Still never saw that, probably never read beyond what I already knewinside the box. It makes perfect sense, esp. as it pertains to 3v operation. Anyway, thanks for pointing that out.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks