AN851 Release Notes November 2007 General: The AN851 bootloader PC Software and Firmware has been updated from its original release in 2002 to contain support for the newer PIC18Fxxxx and PIC18FxxJxx devices. These release notes contain the additions, fixes, and a FAQ as listed in the sections below: Quick Programmer PC Software v0.1.6: -Updated P1618QP.ini file for newer PIC18Fxxxx devices -Updated P1618QP.ini file for PIC18FxxJxx devices -Added EOF command support -Fixed issue with programming memory sizes > 64k PIC Firmware v0.12: -Added support for newer PIC18Fxxxx & PIC18FxxJxx devices -Added test projects directory that contain an example Assembly language and C18 project for user application code FAQ: Q: What are the differences between the published AN851 application note and this new release? A: The differences are only when using PIC18FxxJxx devices. The user application code will begin at 0x400 instead of 0x200. In addition, the configuration words on a PIC18FxxJxx device cannot be modified by the AN851 bootloader. This means that the last 1088 bytes (0x440) of program memory cannot be used by the user code since this area is neither programmed or erased by the AN851 bootloader. In addition, at the time of this release, PIC18FxxJxx devices do not have a dedicated data EEPROM space, therefore, the boot mode flag is contained in the last row in the second to last block of flash program memory. Q: How is it recommended to build the user application code hex file for use with the Quick Programmer PC Software? A: Build your user application code in MPLAB IDE, then export the program memory region using the File->Export command in MPLAB IDE to export the code region into a hex file. Please note, for PIC18FxxJxx devices be sure to uncheck the configuration bits checkbox since these are not programmed by the AN851 bootloader. After you save the exported hex file, you can load it into the AN851 Quick Programmer PC Software. Q: I am new to AN851 what do I need to do to setup a PIC18F67J10 device? A: There are four main steps for using AN851. These steps are: 1. First read the AN851 Application Note. This can be downloaded from the Microchip website. 2. Program The Bootloader Code Into The Device: -Open up the directory C:\AN851\Fw\Pic18f, this is the default installation path -Open up the boot.mcw MPLAB IDE Workspace -Reconfigure the project to your device by clicking Configure->Select Device->PIC18F67J10 -Comment out the existing device include (.inc) file and insert the one for P18F67J10 in bootload.asm -Select Device Configuration Bit Options by clicking Configure->Configuration Bits -Build the project -Program the device 3. Generate The User Application Code: -Open up the apropriate test project, C:\AN851\Fw\Test Projects, this is the default installation path -Reconfigure the project to your device by clicking Configure->Select Device->PIC18F67J10 -Add and Modify the linker script for your device using the existing one in the project as an example -Build the project -Export the code using the File->Export Command. If the device is a PIC18FXXXX then the user application code starts at 0x200. If the device is a PIC18FXXJXX then the user application code starts at 0x400 and uncheck the configuration bits checkbox. Since the device in this example is a PIC18F67J10 the user application code starts at 0x400. 4. Bootload The User Application Code: -Connect a serial cable from the PC to the device -Open the AN851 Quick Programmer Application by clicking Start->Programs->Microchip->AN851->P1618QP -Try using the Auto Detect Device option -If the device was not detected, check your COM Port. You can change COM ports by right clicking over the existing COM Port field. After selecting a valid COM Port click on the Connect To Device Icon. -Load the hex file generated from the last section by clicking on the Folder icon and then selecting the hex file -Click the write button, this will write the code to the device via the bootloader -If successful, then click on the Green arrow to put the device into run mode -Perform a MCLR reset on your device and the user application code should be running Q: What device configuration bit settings are recommended for using with the PIC18 AN851 bootloader firmware? A: Oscillator - External Crystal (XT/HS Modes) or External Clock (EC Mode) Watch Dog Timer - Disabled Extended CPU - Disabled