Firmware Updates in the Field

All microcontroller based applications include the microcontroller code called firmware but it is surprising how many people forget that they may need to update it when their products are scattered at customer locations. This may be because (heaven forbid) that they discover a bug in the system that needs to be corrected or, more commonly, that the product needs new features in response to customer feedback or competitor’s actions. So how do we simplify firmware updates?


The first step is obviously to choose a microcontroller that can be programmed in circuit, which fortunately includes most modern flash based microcontrollers. It surprises me how many people still use older microcontrollers such as PIC16C series because they haven’t updated to use later PIC16F devices. Not only are flash based microcontrollers in system programmable but they are much cheaper, run faster and use less power, but we can all be guilty of “if it ain’t broke, don’t fix it” syndrome!

Right, we have a microcontroller that can programmed in system so the next thing to consider is the In System Programmer (ISP) connection. Again, it should be obvious that this should be as easy to access as possible but many people seem to forget this, with the result that they have to take the PCB out, remove other components or in extreme cases dismantle the whole system. Ideally, it should be external but this is not always possible or desirable but removing a lid or access panel should be all that is required to access the ISP connector.

The next consideration is the connector layout. At Kanda, we have had to produce many different types of custom connector to enable ISP programmers to be connected to the customers unique layout, including edge connectors and RJ45 jacks. In most cases, it is better to stick with a connector that will fit the standard programmer ISP format, for example, AVR programmers all support 3 x 2 0.1″ (2.54mm) pin headers and PIC programmers use 5 or 6 way single 0.1″ pin headers.

The last consideration is data storage. All microcontrollers have to be erased before they are programmed, although the data (EEPROM) memory can be preserved either by setting a fuse/configuration byte on the microcontroller or by the ISP programmer itself. What you shouldn’t do is store product specific data in EEPROM and also expect to be able to add new data to it. Once you have device data such as serial numbers or calibration data stored in the EEPROM, you must always preserve it. This means that any extra settings you want to add should not use the EEPROM and instead will need to be stored in flash memory.

What sort of ISP programmer is best for field updates? At Kanda, we have customers who have products in widely different environments from industrial kitchens, to hotels and literally in the field, with things like electric fence controllers. We also have clients who want unskilled or semi-skilled employees, distributors or service engineers to be able to update product firmware without much understanding or making mistakes, For both these reasons, simple operation and difficult environments, laptop based ISP programmers are not the best solution.

The alternative is a hand held unit, as simple as possible and Kanda produce the simplest programmers on the market – press one button and wait for LED to flash, green for success or red for fail, as easy as that. Although we do produce a version which can store 8 programs so operator has to set a rotary switch as well!

We produce handheld programmers for AVR and PIC microcontrollers, as well as serial EEPROMs, so click the links below for more information. Incidently, a lot of people use them in production as well because of the low skill level required, freedom from mistakes and to avoid having a PC on the line.

PIC Handheld Programmer

AVR Handheld Programmer

Serial EEPROM Handheld Programmer

Leave a Reply