PICLOADER Reloader v1.01 README WARNING ------- Messing with your PIC's bootloader by not following these directions exactly can render your PIC unusable! If this happens to you, you will need to get someone that owns a PIC programmer to reprogram the bootloader for you. New --- New to this version: I've developed two versions of the reloader. One can be loaded by Rick's bootloader 1.1, and the other can be loaded by the CCS bootloader 1.3. Now you can switch between the two. Also new: the reloader(s) are now compatible with PICLoader (v1.02 and above)! Just be sure to hit "Scan Ports" when done uploading and jumping to the reloader to get PICLoader to detect the mode change. PICLoader must indicate "Found PICLoader reloader" in the port window or else uploading of a new bootloader will fail. You also need to hit "Scan Ports" after the reloading process completes, to make sure PICLoader goes back to "loader" mode instead of "reloader" mode. Another new feature is that the bootloader reloader now checks for the destination address of each byte it is told to program, and protects itself against overwrites. This helps prevent the easy mistake of sending the reloader the wrong hex file from rendering the old bootloader inoperative. Files in this Zip File ---------------------- cloader.c - the CCS C program that does the reloading cloader.lst - the listing output from CCS C ccs_reloader.hex - the hex output file from CCS C; compatible with the CCS bootloader (v1.3) rf_reloader.asm - the listing file converted to MPLAB assembler by CLst2Asm rf_reloader.hex - MPLAB's assembled version of rf_reloader.asm, compatible with Rick's bootloader (v1.1) picldr13.hex - the CCS bootloader v1.3 picldr11.hex - the CCS bootloader v1.1 Intro ----- I was thinking this morning, hey, why bother having people ship back the PICs to have them reprogrammed with a new bootloader for CCS C? Why can't there be a program written which Rick's bootloader will load, and which is ITSELF a bootloader? The answer is, there can be, and I've done it. 1. Rewrote an example bootloader in CCS C to be a Bootloader Reloader 1a. converted the listing file from CCS C to a .asm file [NOTE: since then, I wrote clst2asm to make this automatic!] 1b. modified it by hand to conform to Rick's bootloader 1.1 startup code requirements (nothing at location 0; goto at location 3) [also now automatic with clst2asm] 1c. assembled it with MPLAB 1d. uploaded it to the PIC (that has the stock Bootloader 1.1 on it) using my new PICLoader 2. Ran the new "Bootloader Reloader" and uploaded to it from Hyperterminal a copy of the CCS bootloader (1.31) 3. It worked! 4. confirmed it worked by uploading a stock CCS C .hex file to it, which worked too. Hurray! So, now, I can post "RF_RELOADER.HEX", which is the Bootloader Reloader for Rick's bootloader 1.1, "CCS_RELOADER.HEX" which is the same but can be loaded by the CCS bootloader 1.3, and "PICLDR13.HEX", which is the CCS loader. This stuff is posted here: http://www.yahoogroups.com/minisumomarkiii/ Directions ---------- 0. using PICLoader, PICLdrCmd, or Hyperterminal, upload "RF_RELOADER.HEX" using Rick's Bootloader v1.1 or "CCS_RELOADER.HEX" using the CCS bootloader 1.3x 1. switch to running Hyperterminal at 38400 baud, 8 data bits, 1 stop bit, no parity, XON/XOFF handshaking (Rick's uses no handshaking) (first close PICLoader if it is open) OR do it with PICLoader or PICLdrCmd 1.02 or above! 2. after loading the Bootloader Reloader, hit reset and wait 5 secs for Rick's bootloader to jump to the Bootloader Reloader: E.G.: > PIC>############## > Jumping to user code > Bootloader Reloader v1.01 REPIC> 3. a signon message "Bootloader Reloader v1.01" will appear 4. it is ready for a hex file; on the Hyperterminal Menu, hit Transfer -> Send Text File, then browse to and select "PICLDR13.HEX" 5. # characters will slowly walk across the screen as the transfer occurs; after about 250 spades appear, it will automatically jump to the new bootloader 6. you should see this appear on the screen: > 8K PICLOADER v1.31 > İR.Farmer/R.Perdriau 1999 > No user code loaded > Press ? for help > PIC> 7. you're done! Enjoy! -Pete Skeggs