Hi azmax100,

FYI it really should work with either MPASM or the PM assembler. Look in your 16F628.INC and see if all config options are the same for both the PM & MPASM config settings.

It may be that you have some config options set different in the MPASM config line.

For example - say your 16F628.INC file has something like this

Code:
  NOLIST
    ifdef PM_USED
        LIST
        include 'M16F62x.INC'   ; PM header
        device  pic16F628, hs_osc, wdt_on, pwrt_on, mclr_off, lvp_off, protect_off
        XALL
        NOLIST
    else
        LIST
        LIST p = 16F628, r = dec, w = -302
        INCLUDE "P16F628.INC"   ; MPASM  Header
        __config _XT_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
        NOLIST
    endif
        LIST
Now let's say you're using the default PM assembler & not MPASM. When you compile, PBP knows you're using the PM assembler, so it uses these configuration settings --

device pic16F628, hs_osc, wdt_on, pwrt_on, mclr_off, lvp_off, protect_off

With a 20MHz crystal, you want/need the hs_osc setting. If you do not have a pull-up resistor on the PIC /MCLR pin, you also want the mclr_off setting.

Why? Because HS_OSC provides a higher drive level required by the higher speed 20MHz crystal. XT_OSC provides a lower drive level, which may or may not work.

MCLR_OFF turns OFF the external reset function on the /MCLR pin, so the external pull-up resistor isn't necessary.

Now, let's say you have no external pull-up, and you're using the 20MHz crystal, and you switch to use the MPASM asembler.

Again, when you compile, PBP will now know you're using the MPASM assembler, and it will now use the config settings shown above that look like this --

__config _XT_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF

Now it doesn't work because you have _XT_OSC (which doesn't provide enough drive to work with your 20MHz crystal), and you have the reset function enabled for the /MCLR pin with no pull-up to Vcc, and /MCLR is floating.

That would for sure cause erratic behaviour.

Just FYI. Config settings make a BIG difference.