EasyManuals Logo

Microchip Technology MPLAB PICkit 4 User Manual

Microchip Technology MPLAB PICkit 4
85 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #37 background imageLoading...
Page #37 background image
When using a 16-bit device, an unexpected Reset occurred. How do I determine what caused it?
Some things to consider:
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, for
example,
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);
}
:
Use ASSERTs. For example: ASSERT (IPL==7)
Frequently Asked Questions
© 2020 Microchip Technology Inc.
User Guide
DS50002751D-page 37

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Microchip Technology MPLAB PICkit 4 and is the answer not in the manual?

Microchip Technology MPLAB PICkit 4 Specifications

General IconGeneral
BrandMicrochip Technology
ModelMPLAB PICkit 4
CategoryComputer Accessories
LanguageEnglish

Related product manuals