Patent ID: 7185162

Claim:
In a microcontroller having a processor, a control ROM, a RAM memory, a test/control interface and a non-volatile program memory, said microcontroller comprising an independent integrated circuit, a method of programming said non-volatile program memory, comprising: transferring data within said microcontroller from said processor to said RAM memory according to an invoke instruction stored in said non-volatile program memory, said invoke instruction comprising a part of a user program; and executing said user program to copy said data from said RAM memory within the microcontroller to said non-volatile program memory within said microcontroller, wherein said user program is executed on the fly during a normal operation of said microcontroller; and upon executing said user program with said test/control interface: at said test/control interface within said microcontroller, receiving instructions and placing said instructions in an instruction queue, wherein an address path, a data path, and a control path, each said path within said microcontroller, for the user program are isolated from said test/control interface within said microcontroller; retrieving a programming mode instruction from said instruction queue within said microcontroller, said programming mode instruction causing said processor to enter a programming mode; and upon entering said programming mode, said processor executing a control program stored in said control ROM to copy instructions from said RAM memory to said non-volatile program memory within said microcontroller.