Datasheet
Frequently Asked Questions (FAQ)
2013 Microchip Technology Inc. DS52085A-page 89
Q: When using a 16-bit device, unexpected Reset occurred. How do I determine
what caused it?
A: Consider the following:
- Ensure the Watchdog Timer is disabled in the configuration bits.
- To determine a Reset source, check the RCON register.
- Handle traps/interrupts in an interrupt service routine (ISR). You should include
trap.c style code, i.e.,
void __attribute__((__interrupt__))
_OscillatorFail(void);
:
void __attribute__((__interrupt__))
_AltOscillatorFail(void);
:
void __attribute__((__interrupt__))
_OscillatorFail(void)
{
INTCON1bits.OSCFAIL = 0; //Clear the trap flag
while (1);
}
:
void __attribute__((__interrupt__))
_AltOscillatorFail(void)
{
INTCON1bits.OSCFAIL = 0;
while (1);
}
:
Q: How can I manually download the firmware?
A: For an active project that uses the emulator:
- Select File>Project Properties
to open the Properties window.
- Click on the “Real ICE” category and select “Firmware” from the drop-down
Option Categories.
- Uncheck “Use Latest Firmware” and browse for the Firmware File at location:
<install path>MPLABX/mplab_ide/mplablibs/modules/
ext/REALICE.jar.
- Select the .jam file you want and click OK. Click Reset.