Most Bootloaders use the PIC internal USART or bit-bang technique to communicate with the PC. Doing so would tie up one or two PIC pins.
However, the author of this article in Circuitcellar came up with a clever solution that use the MCLR pin for communication. What? Using the reset pin to download the hex file?
The article make a very good read.
You can get more information and download the full text at the following link.
Most Bootloaders use the PIC internal USART or bit-bang technique to communicate with the PC. Doing so would tie up one or two PIC pins.
However, the author of this article in Circuitcellar came up with a clever solution that use the MCLR pin for communication. The article make a very good read.
A clever idea, but the slow speed rather detracts from the point of a bootloader?. It also has the drawback that it's write only, so you can't even verify it's received the code correctly.
Many people fail to realize those pins could easily be dual purpose... That is, they could be used for normal circuit I/O when not being used for the bootloader process...
Many people fail to realize those pins could easily be dual purpose... That is, they could be used for normal circuit I/O when not being used for the bootloader process...
The cunning bit is that MCLR pin retains the reset function. When the target is running downloaded user program code, the PIC is NOT under the bootloader control. The bootloader must be able to stop the PIC and load in a new program. The only way to do that is to use the MCLR reset feature.