Difference between revisions of "More debugging tips"
From Mech
Jump to navigationJump to searchLine 7: | Line 7: | ||
<b>Runs with ICD unit attached |
<b>Runs only with ICD unit attached</b> |
||
*Make sure you are not in debugger mode. Try adding the NOBROWNOUT fuse at the top of your code. |
*Make sure you are not in debugger mode. Try adding the NOBROWNOUT fuse at the top of your code. |
Revision as of 13:46, 19 January 2008
Use your LEDs
- Indicate phases of program operation by illuminating LEDs. In particular a lot of electrical faults cause the PIC to resst. The first thing your code should do is illuminate a "startup LED" for 100mS. If you see that LED flashing repeatedly, you'll know your PIC is reseting.
Why is my PIC reseting?
- Often from spikes. Add more 1uF capacitors near your digital chips, especially H-bridges.
Runs only with ICD unit attached
- Make sure you are not in debugger mode. Try adding the NOBROWNOUT fuse at the top of your code.