Microchip Pic24f Serial Boot Loader

Microchip just published their USB-MSD Programmer firmware. This open source project allows a board to enumerate as a USB Mass Storage device. Programming is as simple as copying a .hex file to the “drive”.

  1. Microchip Pic24f Serial Bootloader
  2. Pic18f Bootloader

A Serial Bootloader for PIC24F Devices Author: Brant Ivey Microchip Technology Inc. FIGURE 1: BOOTLOADER FUNCTIONAL BLOCK DIAGRAM UxRX UxTX Bootloader Firmware INTRODUCTION One of the advantages of Microchip’s PIC® microcontrollers with self-programmable enhanced Flash memory is the ability to implement a bootloader.

  • Is there a built-in serial number in PIC chip? Ask Question 10. Questions: Does PIC has a built-in serial number? If the answer is No, is there a easy way to upload a code with unique serial number to each chip when I order the chip from Microchip? If you get your PICs programmed by the Microchip or a distributor, you can usually get.
  • Microchip Serial Bootloader AN1310 1.05 can be downloaded from our software library for free. This download was scanned by our built-in antivirus and was rated as safe. This PC program can be installed on 32-bit versions of Windows XP/Vista/7/8/10.
  • PIC24FJ Serial Bootloader example. PIC24F Serial Bootloader Demo.zip (39.24 KB) - downloaded 938 times #1. List Solutions Only 16 Replies Related Threads. I was using microchip app example only I am not sure if that application example is not working. But they have used interrupt in application for timer.
  • An introductory course in microcontrollers, with accompanying book and software libraries Microcontrollers. Programming and communication - Flash your PIC24 with the bootloader, then connect it via a serial link to your PC. With the PLL used to produce a 16 MHz F CY for PIC24F devices and 40 MHz F CY for the PIC24H.
  • AN1157 A Serial Bootloader for PIC24F Devices This application note describes a serial bootloader for 16-bit PIC24F devices using the UART module as a communication channel.
  • Microchip Serial Bootloader AN1310 Download Downloading Microchip Serial Bootloader AN1310 1.0 When the bootloader firmware is activated, a host PC can use a serial protocol to read, write and verify updates to the microcontroller's application firmware.

This code is what’s running on the $10 Xpress board that they released last month which includes a PIC18F25K50 to serve as a PICkit On Board (PKOB) programmer for the actual target micro; a PIC16F18855. In its stock version, the XPRESS-Loader firmware programs any PIC16F188xx chips that have a row size of 32 words. But it should be possible to tweak this package to program any chips that use the 8-bit LVP-ICSP protocol.

Now, this may seem like small potatoes at first look: it requires two microcontrollers on your board and is capable of programming just a small subset of the vast PIC inventory. But in our minds it’s the USB-MSD that is killer since it doesn’t require any software or drivers on the computer side of things. That’s a big invitation for all kinds of hacks. But there should be even more on the way from the Xpress team before too long.

It turns out the microcontroller [Voja Antonic] chose to use on the Hackaday | Belgrade badge is the 25k50. Since hearing about the Xpress board we’ve been talking to some of the PIC engineers and they are exploring a loader that will program onto the same chip. This means device upgrades without special hardware or drivers – perfect for badge hacking at a conference. This can be done with a precompiled hex, one created on MPLAB X, MPLAB Xpress, or others. We’ll keep you updated if we hear more on that part of the project.

Active1 year, 5 months ago
$begingroup$

I have tens of PIC16 chips. I would like to retrieve some kind of unique serial number from the chip for identification purposes. I know it can be done manually. But it's tedious.

Questions:

  1. Does PIC has a built-in serial number?
  2. If the answer is No, is there a easy way to upload a code with unique serial number to each chip when I order the chip from Microchip?
mlamMicrochip Pic24f Serial Boot Loadermlam
1804 gold badges8 silver badges18 bronze badges
$endgroup$

3 Answers

$begingroup$
  1. No

  2. Is possible, but I don't know what quantities are required, i.e. if they'll do it for tens of devices. We always had batches of at least 1000 parts. It's just like preprogramming with your software, but you indicate at which location(s) the unique ID should be programmed. You'll need to supply the starting ID, and the format (BCD, binary, LSD/MSD first, ...).

Download

Note that this number resides in normal program memory, and it will be erased if you erase the part for reprogramming.

edit
The reason controllers most often don't have this at chip level is that it's expensive: the programming is done by lasering, which is an extra production step. Mass-programmed microcontrollers can easily have the unique ID programmed with the software, and this doesn't require an extra step.

An alternative would be an SSN (Silicon Serial Number) like the Maxim DS2411. These are also laser-programmed, so not cheap either, but you avoid the extra logistic steps, where there can always go something wrong. I've known it happen.
(another edit) Mike suggests a MAC address chip as an alternative. These are EEPROMs which have a unique ID (MAC addresses are globally unique) programmed in a part of the device which is write protected. The rest of the part can be used as normal EEPROM, like for storing device parameters. The EEPROMs appear to be a lot cheaper than the SSN, while serving the same function.

see also
Method for assigning unique per-board addresses

Community
stevenvhstevenvh
134k16 gold badges426 silver badges637 bronze badges
$endgroup$$begingroup$

As Steven said, PICs don't have unique serial numbers built into them at manufacturing time. Let's be clear that we're talking about a number that would vary between two chips of the identical model.

Most PICs do have a chip ID encoded into them. This can be read by a PIC programmer to determine the type of PIC it is connected to. As far as I can tell, only the 12 bit core PICs don't have such a chip ID. All the other PIC can be identified electrically, although there are quite a number of differing ways they have to be put into programming mode and then the chip ID read out. PIC programmer software that can identify a arbitrary PIC is not trivial.

If you really meant serial number, then this has to be programmed into the part after production. We have done this many times. During the production test process when the firmware is programmed into the PIC, you set it up to also get a unique serial number and program that in too. One easy way is to start with a master HEX file as produced by the firmware tools. This contains a blank serial number. You write a small program that grabs a new serial number according to whatever your strategy is, reads the master HEX file, substitutes the new serial number for the blank one, and writes out a temporary HEX file. The temporary HEX file is used to program the part, then deleted.

For better robustness, you store the serial number state in EEPROM in the production jig, not in a disk file. The system asks the jig for a new number, and this jig is designed to never give out the same number twice. When it's assiged serial number range is exhausted, it refuses to work. This is especially useful if you have a remote manufacturer building units for you. This way if they mess up something on the computer and restore from backup, it won't also reset the serial number range. Yes, this has actually happened.

If the serial number is to be read from outside, then the user ID locations that most PICs have might be the appropriate place to store it. These differ from general program memory or EEPROM in that they can be read even when the chip is code protected.

If you get your PICs programmed by the Microchip or a distributor, you can usually get them serialized in some way. However, factory programming is only for mature high volume products. If you think you'll be upgrading the firmware regularly, then don't use factory programming. The lead times are long and you'll be stuck with old versions in the pipeline. Your device will have to be tested after it is built anyway, so adding a step to program the PIC is usually very little extra burden.

Olin LathropPic18f4550 bootloaderOlin Lathrop
287k32 gold badges359 silver badges809 bronze badges
$endgroup$$begingroup$

Microchip Pic24f Serial Bootloader

  1. Some do.
  2. From the datasheet:

    The PIC16(L)F15324/44 devices are individually 7encoded during final manufacturing with a Microchip Unique Identifier, or MUI. The MUI cannot be erased by a Bulk Erase command or any other user-accessible means. This feature allows for manufacturing traceability of Microchip Technology devices in applications where this is a required. It may also be used by the application manufacturer for a number of functions that require unverified unique identification, such as:

    • Tracking the device
    • Unique serial number. The MUI consists of nine program words.

Pic18f Bootloader

edit

  1. Look at Microchips line of Unique ID Chip Products Only a few pennies each. Small packages, I2C communications and a small amount of EEPROM.
D DuckD Duck
$endgroup$

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