Skip to content

microchip-pic-avr-examples/dspic33A-where-was-i

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

dsPIC33A Where-was-I

Summary

This code example demonstrates how to identify the source of a trap. There are a couple of approaches to achieve this:

  1. Using the PCTRAP register, which provides the address that caused the trap.
  2. Analyzing the stack.

If the PCTRAP register is available on the device, it is recommended to use it to find the address of the source code that caused the trap.

Related Documentation

Software Used

Hardware Used

Operation

Open any serial terminal application and set the configuration as shown in the figure

image

Program the device and you will see the output as follows image