I followed the documentation on the Diolan's web site . I changed the project to be programmed to an PIC18F4550 and not a PIC18F4455 as it was originally written.
The compilation succeed and I was able to program the bootloader into the PIC18F4550's flash. I used PIckit3 and MPLABV8 to do it.
I did not encrypt my application using the encoder, I just tried to write it to memory without encrypt it. So, I copied and paste my .hex file application to the bin folder where the fw_update is. I opened the console and typed:
fw_update -e -w -v -vid 0x04D8 -pid 0xFF04 -ix example.hex
The followed message appears:
U2IO flash erasing: FAILED.
Device is not found.
Does someone have some advice or tip of what it is happening ?
My Windows 10 is not recognizing my USB device, neither before nor after the bootloader programming. It always inform: "USB device not recognized".
Below is picture of the schematic of my device:
Good observation, I saw at the datasheet that minimum value of CUSB is 220nF and there is no maximum and typical values.The hardware was not made by me, but I put the capacitor of 470nF, based on the PICDEM™ FS USB DEMONSTRATION BOARD of microchip. The Windowa 10 stopped to inform that the device was not connected, but at the device manager it is still with a yellow exclamation(But this time in HID USB). The error mentioned before still happens.
So, I did the following changes on the bootloder code:
In source files where was originally #include "P18F4455.INC" I changed to #include "P18F4550.INC"
On the Header files, I remove "P18F4455.INC" and put "P18F4550.INC instead that I downloaded from here.
My application code is edited on the project by its configuration bits this way:
CPU System Clock Postscaler was: [OSC1/OSC2 Src:/4][96 MHz PLL Src: /6]
Power Up Timer: Enabled
The others I left default. And this configuration works when I run my application without the bootloader.
But, when I will compiled the bootloader, I did not configure the configuration bits, the checkbox "Configuration Bits set in code" is selected as is said in the documents.
I found on the bootloader's file usb_desc.inc that :
#ifndef BOOTLOADER_VID #define BOOTLOADER_VID 0x0000 ; MUST BE VALID Vendor ID #endif #ifndef BOOTLOADER_PID #define BOOTLOADER_PID 0x0000 ; MUST BE VALID Product ID #endif
So I changed my command line in the prompt to:
fw_update -e -w -v -vid 0x0000 -pid 0x0000 -ix principal.hex
But it still not working.