When you set
'DEFINE OSC 20'
You are not "telling" the chip to run at 20MHz, you are telling PBP that
the chip is running at 20MHz (rather than 4MHz), and to adjust all pertinent
timing accordingly.
If the chip is actually running at 4MHz and you have DEFINE OSC 20, all the PBP PAUSES (and a lot of other timing, such as SERIN) will be off by a factor of 5. PBP uses a default define of 4MHz, so if you are actually running at 4MHz, you don't have to change this define. PAUSE 1000 will give a 1 second delay. If the PIC is actually running at 20MHz, then a PAUSE 1000 will give a 200 millisecond delay.
If you are running at any speed other than 4MHz, then you change the define accordingly.
Bookmarks