
Originally Posted by
Bruce
The PBP default config settings for this PIC are;
device pic16F887, intrc_osc_noclkout, wdt_on, mclr_on, lvp_off, protect_off
So, it's actually running on the internal oscillator.
And the PIC default setting of OSCCAL (for the internal oscillator) is for 4MHz.
Define OSC 20 forces PBP tro assume it's running at 20MHz, but its actually running on
the 4MHz internal osc, so Define OSC 20 screws the timing .. when it's running at 4MHz.
For it to work as expected, at 20MHz, you would need to connect an external 20MHz
crystal (or resonator), and change config settings to;
device pic16F887, hs_osc, wdt_on, mclr_on, lvp_off, protect_off.
Then use the DEFINE OSC 20.
See Bruce,
We need your book 
Can I get that on Amazon ?
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