k. Is JTAG protocol difficult to implement? Is programming PIC24 and PIC32 difficult?

JTAG is a relatively simple protocol. It can be implemented by a function that transfers data between a PC with programmer and a PIC24 or PIC32 microcontroller in one or both directions at the same time. However, making a PIC24 and PIC32 programmer is much more than just implementing JTAG protocol. PIC32 microcontrollers can only be programed indirectly through SRAM. A new PIC32 program has to be loaded to SRAM and then transferred to flash RAM using the microcontroller CPE instructions. There is also a faster option that requires loading a special program called “Program Executive” to the microcontroller’s SRAM first, and then using it to load a user program to the flash RAM.

Both procedures are can be perceived as parts of the second layer of programming protocols for PIC24 and PIC32 microcontrollers. Therefore it is not a bad idea to implement an SDK to speed-up development of new JTAG programmers.