It is unlikely that a new C program will run properly on the device, even
though the program is valid. All Microchip 8-bit devices must be configured to ensure
correct operation. Some configuration settings affect fundamental operation of the
device, such as those for the instruction clock.
CAUTION:
- Not setting the Configuration
Bits can prevent even blinking an LED. Even if the TRIS register is set up and a
value is written to the port, there are several things that can prevent such
seemingly simple program from working.
- Ensure that the device's
Configuration registers are set up correctly. Also, the user must make sure that
every bit in these registers is explicitly specified, not leaving them in their
default state. All the configuration features are described in the device data
sheet. If the Configuration Bits that specify the oscillator source are wrong,
for example, the device clock cannot be running.
- For more information, refer to
the MPLAB XC8 C Compiler User’s Guide.