As i remind you're using PIC18F252. Right?!?
If you're using external 20Mhz Crystal or ceramic resonator, be sure that you have set you Programmer to HS oscillator. or include this config fuse line to the top of your program
@ __CONFIG _CONFIG1H, _HS_OSC_1H
if you get any compile error with the above line (overwriting previous address) you must open the 18f252.INC file in the PBP directory an place an ; before the line
__CONFIG _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H
this will skip the factory OSC definition
In some case using 20Mhz ceramic resonator or crystal on BreadBoard can cause you some problems too. If you're using Crystal, try to remove the capacitor on each crystal pin. Seems the ProtoBoard do some capacitive load that can interfer with the crystal itself.
BUT you can also use a lowest frequency resonator or crystal and multiply it, by 4, with the internal PLL of the PIC18f252 to get the frequency you need. For that, you must set HS-PLL config fuse.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks