I have taken the attached code from a development board (EASYPIC6) to a prototype board and it is running 38 times slower in the prototype board than the development board. The prototype uses the same code, the same MCU (18F4550) and the same XTAL (8 MHz) so don't understand why it would run 38 times slower. How do I know it is 38 times slower?...I have some blinking LEDs at the beginning of each routine for test purposes and a heartbeat LED in the main loop that are coded to be on for only 0.5 secs (which they do in the development board), but they are on for 19 secs in the prototype. Hence 19/0.5 = 38 times slower.

Can anyone look at this code and give me any ideas why this code would run 38 times slower in the prototype? I checked to make sure the 18F2550.inc file had the configs commented out, since they are set by this code.

Post Note: Adding the code made this posting exceed the 10,000 characer limit. I will try to post the code in another posting.