PIC18F Limitations
  • General Debug Limitations.
  • General Programming Limitations.
  • The SLEEP instruction cannot be used when debugging.
  • The Watchdog Timer (WDT) cannot be used when debugging.
  • You cannot view the stack even though you can access it.
  • You must connect the AVDD and AVSS pins for the device to program.
  • You cannot single step through an interrupt. Due to hardware restrictions, the debugger/emulator cannot jump to the interrupt vector memory location in Single Step mode.
  • Breakpoint can corrupt Shadow registers. Shadow register values can be trashed if a breakpoint is set inside a routine where they are used. If you need to use a breakpoint in this situation, store values elsewhere.
  • Data breakpoints do not halt on the STKPTR register. The data comparator in the silicon does not have access to the STKPTR register, so breaks on stack pointer will not occur.
  • Corrupted value for 16-bit mode TMR1H when single stepping. If you change the value of TMR1H in 16-bit mode, the register should only change when writing to TMR1L, however, this does not happen in Single Step mode when TMR1L is listed in the Watch window.
    Since TMR1L is listed in the Watch window, it is being read from the debugger/emulator on every step. Therefore, once you change TMR1H, on the next step, a read of TMR1L is being performed (because it is listed in the Watch window) which overwrites the changed value of TMR1H.
    TMR1H is only updated upon a read or write of TMR1L in the silicon.
  • Trace and Log macros within tight loops do not work when using I/O PORT Trace. The workaround is to use NOP instructions within the loop (EM).
© 2025 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.