2015-12-21, 22:46:24
Try setting fcy to 4000000. From the datasheet:
Quote:The processor clock source is divided by two to produce the internal instruction cycle clock, FCY.