Actually, the DEFINE OSCCON_1K 1 ' Set OSCCON for 1K device, should be DEFINE OSCCON_2K 1 ' Set OSCCON for 2K device. Compiles and works properly either way though.