Patent ID: 6915416

Claim:
A microcontroller integrated circuit (IC) comprising: a program memory for storing a program to be executed; a program counter coupled to the program memory for selecting address locations in said memory; a program counter copy register for storing a program memory address pointed to by said program counter as a return address from a debug monitor routine; instruction execution circuitry coupled to the program memory for executing instructions received from said memory; a breakpoint address register for storing a breakpoint address; address compare circuitry for comparing a value in said program counter to a value in said breakpoint address register, said compare circuitry providing a breakpoint signal upon detection of a valid breakpoint address comparison; and a multiplexer interposed between said program memory and said program execution circuitry, said multiplexer comprising circuitry for inserting a debug instruction into the instruction execution circuitry upon receipt of said breakpoint signal, wherein said debug instruction is substituted for an instruction in a program memory address pointed to by said program counter.