0
\$\begingroup\$

I've been playing with this data logger board that's based on the Microchip PIC18F2550, but my application requires a lot of analog front-end signal conditioning. I would like to combine everything on one custom board, but I can't tell if it's possible to get the data logger firmware running on a virgin PIC18F2550. The data logger contains a bootloader that allows firmware updates via USB; the firmware .hex is available for download, but no bootloader code is available.

I haven't used microcontrollers before, so I have several questions that I haven't been able to answer from the data logger website or the PIC18F2550 datasheet:

  1. Is the bootloader something that is pre-loaded on the PIC18F2550 by Microchip, or must it be installed by the developer?

  2. If the bootloader is pre-loaded, then I presume all I need is a USB connection to the PIC (as on the original board) and the "Microchip USB HID Bootloader" utility to install firmware the first time. Correct?

  3. If the bootloader is not pre-loaded, then may I use a programmer via the ICSP header to install firmware, without a bootloader? If so, what hardware and software do I need, and what is the process to do this?

Thank you!

Here's the data logger schematic:

Data Logger Schematic

\$\endgroup\$
2
\$\begingroup\$

To answer your questions:

1) The bootloader would be loaded by the developer. 2) Skipped; It's not pre-loaded. 3) Yes, you can use a programmer to load a new program onto the PIC but if you don't include the boot loader then it will be overwritten unless you account for the bootloader or load it on yourself. The hex file you create should start writing to memory after the bootloader's location, and probably needs to be configured to work with the bootloader. The bootloader is provided by Microchip and there are app notes on how to use it. You can also find a compatible programmer on Microchip's website.

One of the reasons for the boot loader is so you don't have to use a programmer. It allows you to connect via USB and load the new hex file without using a programmer.

From the link:

To perform a firmware upgrade first, switch the SW1 to 'A' for bootloader mode and connect it to USB port. Then program the iCP12 with provided firmware (iCP12_xx_Firmware.hex) file using the Microchip USB HID Bootloader application. Disconnect the iCP12 and switch back the SW1 to 'B' for normal operation.

The exe for the HID bootloader application can be found in the iCP12_usbStickPack (software pack) found in the download section from the link you posted (http://www.piccircuit.com/shop/pic-dev-board/119-icp12-usbstick-pic18f2550-io-board.html).

\$\endgroup\$
  • \$\begingroup\$ Thank you. Is the bootloader a generic piece of code provided by Microchip that the developer can choose to use (if in-the-field firmware updates are desired) or not (for one-time programming)? Or, is it something a developer writes or customizes for a specific application? I guess what I'm asking is, can I download the bootloader from Microchip and install it with the developer's firmware, or am I stuck without the developer's custom bootloader code? If I don't care about USB updates, can I install firmware only? \$\endgroup\$ – Eric Page Aug 4 '15 at 2:12
  • \$\begingroup\$ I haven't used it myself, so from what I can tell the bootloader is something that Microchip offers in different flavors. If you wanted to customize it then you probably can, it looks like they give the bootloader source. The firmware probably has some configuration in order to be used with the bootloader but I am not entirely sure. If you search Microchip's website it looks like there are app notes related to this. If you don't care about the USB updating then yes you should be able to just load the firmware using the ICSP header and a programmer. \$\endgroup\$ – DigitalNinja Aug 4 '15 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.