What is IC programming in PCB assembly

Types of ICs That Require Programming

Several categories of ICs commonly used in PCB Designs require some form of programming:

Microcontrollers (MCUs)

Microcontrollers are essentially small computers on a chip. They contain a processor, memory, and I/O all in one package. MCUs are used extensively in embedded systems and IoT devices to run the main application software. Popular MCU architectures include:

  • 8-bit (ex. Microchip PIC, Atmel AVR)
  • 16-bit (ex. TI MSP430)
  • 32-bit (ex. ARM Cortex-M)

The MCU’s flash memory needs to be programmed with the compiled application code. This is typically done after the MCU is soldered to the PCB.

Field-Programmable Gate Arrays (FPGAs)

FPGAs contain a grid of programmable logic blocks and routing channels that can be configured to create custom digital circuits. Rather than running software, FPGAs are programmed with a hardware description language (HDL) like Verilog or VHDL. The HDL code is synthesized into a bitstream that is used to configure the FPGA fabric. Common FPGA families include:

  • Xilinx (Virtex, Kintex, Artix, Spartan)
  • Intel/Altera (Stratix, Arria, Cyclone, MAX)
  • Microchip/Microsemi (PolarFire, IGLOO, SmartFusion)
  • Lattice (ECP, CrossLink, iCE40)

Complex Programmable Logic Devices (CPLDs)

CPLDs are similar to FPGAs but at a smaller scale in terms of logic capacity and complexity. They are often used for simpler glue logic, interface bridging, and I/O expansion. Popular CPLDs include:

  • Xilinx CoolRunner
  • Altera MAX
  • Lattice MachXO

Like FPGAs, CPLDs are programmed using an HDL to create the desired combinatorial and sequential logic as well as I/O behavior.

Flash Memory

Dedicated flash memory ICs are used to store larger amounts of non-volatile data than is practical in an MCU’s on-chip flash. Common packages are:

  • NOR flash – Faster, Code execution
  • NAND flash – Higher density, Cheaper
  • eMMC – Managed NAND flash

Flash memory ICs have their own internal controller and require a device-specifIC programming algorithm to write data. This is often done by an MCU on the PCB itself. Secure flash ICs may also include authentication steps.

Power Management ICs

Some power management ICs like DC/DC converters, Voltage Regulators, and battery chargers support a degree of programmability. Common parameters to customize include:

  • Output voltage set point
  • Soft-start slew rate
  • Switching frequency
  • Sleep/standby modes
  • Protection thresholds

This allows a single IC to be used in different designs with varying power requirements. The IC is typically programmed via an I2C interface.

Request PCB manufacturing & Assembly Quote Now

IC Programming Methods

The way an IC is programmed depends on the particular device and where in the manufacturing process the programming is done. Common programming methods include:

In-System Programming (ISP)

With ISP, the IC is programmed after it is already soldered onto the PCB. A header or test points on the PCB provide access to the IC’s programming interface. This allows the PCB to be assembled with blank ICs and then programmed at a later stage.

Advantages of ISP include:

  • Simpler logistics (no pre-programming)
  • More flexibility to make code changes
  • Potential to re-program if needed

Disadvantages include:

  • Requires extra connections on PCB
  • Takes more time in production
  • Risk of damaging PCB during programming

In-Circuit Serial Programming (ICSP)

ICSP is a vendor-specific protocol used by Microchip for ISP of their PIC MCUs. It uses a 5- or 6-wire interface for bidirectional serial communication. The signals are:

  • MCLR (Master Clear Reset)
  • VDD
  • GND
  • PGC (Programming Clock)
  • PGD (Programming Data)
  • Aux pin (for LVP)

Other MCU vendors have similar ISP protocols but under different names and with minor differences in the pinout and command set.

JTAG

JTAG (Joint Test Action Group) is a standard interface used for ISP that is especially common for FPGAs and CPLDs. JTAG was originally developed for boundary scan testing but is also widely used for device programming and debugging.

The JTAG interface uses 4 signals:

  • TDI (Test Data In)
  • TDO (Test Data Out)
  • TCK (Test Clock)
  • TMS (Test Mode Select)

Devices are connected in a daisy chain between TDI and TDO. During programming, the bitstream is serially shifted in through TDI.

SWD

SWD (Serial Wire Debug) is a 2-wire interface used for programming and debugging ARM Cortex-M MCUs. It is a newer alternative to the original 5-wire JTAG interface. The signals are:

  • SWDIO (bidirectional data)
  • SWCLK (clock)

SWD is a much simpler interface compared to JTAG but only works for a single device (no daisy chaining). It is usually preferred for systems using a single Cortex-M MCU.

SPI

SPI (Serial Peripheral Interface) is a commonly used 4-wire interface for connecting ICs to an MCU. Some ICs also support using SPI for ISP.

The standard SPI signals are:

  • MOSI (Master Out Slave In)
  • MISO (Master In Slave Out)
  • SCK (Serial Clock)
  • CS (Chip Select)

During programming, the programming device acts as the SPI master and shifts out the bitstream through MOSI.

Pre-programming

For large production volumes, it is more efficient to program the ICs prior to PCB Assembly. This is called pre-programming or off-board programming. The advantage is a faster assembly process since the PCB does not need to go through ISP.

However, pre-programming does add some challenges:

  • Requires a socket adapter for the IC
  • Blanket ESD handling before soldering
  • Difficult to make changes later
  • Risk of mixing up programmed/blank ICs

Pre-programming is typically done either by the IC supplier or a programming service provider.

FR2ZfH8kdFPY3W/4/j/17n/0NaztXi015bY3c5jYRyeXiCV8r5ke5tyfl/wACrRb/AI/j/wBe5/8AQ1qjqcscctuGshckxscmVk8v99Dt+Xa33jj8sV5M/jfqYy+Jei/IgsItIW8DQSlpvMvcJ9llixIzfN8zrxgYH+dtbnY1kWUwe62iwSI77tTKJ2l+7I25trx/xNn/AD8ta/Y8VDIe5jafFpaXszQyl7gpJlfs8iKjec25tzr+H/7VXdTS1e0K3LlYfNti5EbSt/rF2rtT+8ePxqrYTI93MqWKxYjkzN57Pvj86T/Z/iOT/wDs1b1B1S3DGATnzbYJEXZN7eYu3+Fs7Tzj2o6h1E0xLVLSFbZy8YPL+W0W9v4m2vVK/i0tr9GuJSs3l22IxbyvmPzJP4kX+In/AMdq9pzq9pAywCCMj92gdn+X+9u21Uu5kS+RBYrM+LbEpnZcMzTbV27W/wBo0dQNUgbT/hurH0iLS0b/AESYyv8AZo1z9nli/d7vmb51/iPP+P3q2CRtP+O2svSpUkPyWK26/Z4DkStL8v8AAvzqvbn/ABoDoTamlm6WX2mTaguVMY8ppd8nlybV2p+f4VNp62y2dstuxaER/IxRkz97c21/fNRai6ItoWtxOWuMIDI0ez9zJuk+RW+6M/zqaycPa2zeSIAY+Ig27Yv8PzbVzR0AzpYtLOpFpJT9o+22z7RbytiT7PsSPzNu3/bz7f7NaV2I2tLwSPtjNvOHfaz7F8ttzbU6/SqDzINQZFsVZvtsCGYzNu8xrfe0nl7f4F4x7543VoXbItpds6b0W3nLpu2b18v5l3dvrQBS0xNOR742jlmb7N5gMTRYXyV2ffXncOfxpNXjsHMP2qXZ/o+oCMeRLN96Nd0nyf3Bz/8As1LYSb3vR9kWDa8GSJG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5nTqWZVZQCrDIPmy8rS/vPT/yLLXPrf64AFWXTQoXCgWVxx/5NUv8AaOu/89dN/wDAK4/+Sqn6nU/r/hg9tHzN/wDeen/kWWj956f+RZawP7R13/nrpv8A4BXH/wAlUf2jrv8Az103/wAArj/5Ko+p1O/9fcHto+Zv/vPT/wAiy0fvPT/yLLWB/aOu/wDPXTf/AACuP/kqj+0dd/566b/4BXH/AMlUfU6n9f8ADB7aPmb/AO89P/IstH7z0/8AIstYH9o67/z103/wCuP/AJKo/tHXf+eum/8AgFcf/JVH1Op3/r7g9tHzN/8Aeen/AJFlo/een/kWWsD+0dd/566b/wCAVx/8lUf2jrv/AD103/wCuP8A5Ko+p1P6/wCGD20fM3/3np/5Flo/een/AJFlrA/tHXf+eum/+AVx/wDJVH9o67/z103/AMArj/5Ko+p1O/8AX3B7aPmb/wC89P8AyLLRiT+7/wCRpKwP7R13/nrpv/gFcf8AyVR/aOu/89dN/wDAK4/+SqPqdTv/AF9we2j5m9hx/CP+/stL+89P/IstYH9o67/z103/AMArj/5Ko/tHXf8Anrpv/gFcf/JVH1Op/X/DB7aPmb/7z0/8iy0fvPT/AMiy1gf2jrv/AD103/wCuP8A5Ko/tHXf+eum/wDgFcf/ACVR9Tqf1/wwe2j5m/8AvPT/AMiy0fvPT/yLLWB/aOu/89dN/wDAK4/+SqP7R13/AJ66b/4BXH/yVR9Tqf1/wwe2j5m/+89P/IstH7z0/wDIstYH9o67/wA9dN/8Arj/AOSqP7R13/nrpv8A4BXH/wAlUfU6n9f8MHto+Zv5fJAHTbn97L/d3/1o/een/kWWueGp65lv3uncn/nzn/ubf+fn2p39o67/AM9dN/8AAK4/+SqPqdTv/X3B7aPmbxDdWVcDnJlauUqy9/rkg2mfTwPazn/+Samg8O380ME39pWi+bFHJt/s0HG9Q2M+fVewlT0k1/XyG6l+h//Z” alt=”” class=”wp-image-136″ >

IC Programming Hardware

Special programming hardware, often called a programmer or more generically a debug probe, is used to transfer the code/configuration data to the target IC. The programmer interfaces with the IC using one of the previously described programming interfaces (ISP, JTAG, SWD, SPI, etc).

Typical features to look for in a programmer include:

  • Supported devices (MCUs, FPGAs, etc)
  • Host interface (USB, Ethernet, etc)
  • Voltage range
  • Speed
  • Connector options
  • Software compatibility

For pre-programming, an IC socket adapter is used to connect the loose IC to the programmer. There are many types of adapters depending on the IC package (DIP, SOIC, QFP, BGA, etc).

Some example programmers are:

MCU Programmers

  • Segger J-Link (SWD/JTAG)
  • PEmicro Multilink (ARM/NXP)
  • Microchip PICkit (ICSP)
  • STMicro ST-LINK (SWD/JTAG)

FPGA Programmers

  • Xilinx Platform Cable USB II (JTAG)
  • Intel USB Blaster (JTAG)
  • Lattice Diamond Programmer (JTAG)

Universal Programmers

  • Xeltek SuperPro (DIP/PLCC/QFP/SOP/TSOP)
  • HiLo Systems All-100 (DIP/PLCC/SOIC/QFP)

When selecting a programmer, the key considerations are the ICs used in the design, the programming method (ISP/pre-programming), and the production volume.

IC Programming Software

The actual IC programming is controlled from software running on a PC or dedicated machine. The software communicates with the programmer hardware to transfer data and issue commands.

Most IC vendors provide their own programming software that is designed to work with their devices and programmers. Some examples are:

  • Microchip MPLAB IPE
  • TI Code Composer Studio
  • NXP MCUXpresso
  • STMicro STM32CubeProgrammer
  • Xilinx Vivado
  • Intel Quartus Prime
  • Lattice Programmer

These software tools provide a graphical interface for:

  • Selecting the target device
  • Configuring programming options
  • Loading code/bitstream
  • Erasing, programming, verifying
  • Setting security bits

Third-party programmers may have their own software or integrate with the chip vendor’s software. Segger J-Link and PEmicro Multilink are notable for their compatibility with many different MCUs.

For pre-programming, it is common to use an automated system that combines a universal programmer with custom software for managing the programming flow, data files, and production batches.

IC Programming Workflow

The general workflow for IC programming during PCB assembly looks like this:

  1. Software development
  2. Write code/HDL
  3. Compile/synthesize
  4. Debug and test
  5. Generate programming files
  6. Binary (bin, hex)
  7. JEDEC (jed, svf)
  8. POF
  9. SRecord (s19, s28, s37)
  10. Set up programming hardware
  11. Select programmer
  12. Install programming software
  13. Connect to target PCB or socket adapter
  14. Configure programming options
  15. Device selection
  16. Interface protocol and wiring
  17. Voltages
  18. Bitstream encryption
  19. Readback verification
  20. Security/lock bits
  21. Load programming files into software
  22. Execute programming operations
  23. Erase
  24. Blank check
  25. Program
  26. Verify
  27. Secure/encrypt
  28. Validate programmed ICs
  29. Functional test
  30. Boundary scan
  31. Sample QC

When the chips are programmed and verified, the PCBs can proceed to the next stage of the assembly process.

Challenges and Debugging

IC programming is a complex process and it’s not uncommon to run into challenges, especially for new designs. Some issues to watch out for include:

  • Connection problems: Wiring mistakes, poor cable connections, and incorrect pinouts can all cause communication failures between the programmer and target IC. Double check all connections and review datasheets.

  • Wrong device or package: It’s a simple but surprisingly common mistake to select the wrong chip in the programming software. Pay close attention when picking the device and package to avoid mismatches.

  • Incorrect programming files: Using the wrong code or bitstream version can lead to unexpected behavior. Implement clear revision control for software/firmware and make sure the correct files are being loaded.

  • Signal integrity: Long wires, improper termination, inadequate grounding, and excessive loading can degrade the digital signals and cause intermittent programming failures. Keep programming wires as short as possible and follow high-speed design practices.

  • ESD damage: ICs can be damaged by electrostatic discharge if not handled properly. Make sure the programming setup and ICs use proper ESD precautions.

  • Security locks: If a secure MCU is accidentally locked with an unknown key, it may become impossible to reprogram. Be careful when setting security bits and keep track of all keys/passwords.

When encountering a programming error, the first step is to check the basics – connections, power, software setup. From there, use an oscilloscope or logic analyzer to verify the programming signals and refer to the datasheets for expected behavior. Most vendors provide detailed application notes and tutorials for using their chips and programmers.

IC Programming Services

For companies without the necessary equipment or expertise, IC programming can be outsourced to a service provider. Most electronics manufacturing services (EMS) providers offer IC programming as part of their assembly capabilities. There are also dedicated programming houses that specialize in high-volume off-board programming.

Advantages of using a programming service include:

  • No need to invest in programming equipment
  • Access to experienced programming technicians
  • Established processes for data handling and revision control
  • High throughput for large batches
  • Flexibility to support different ICs and packaging

When selecting a programming service, consider:

  • Supported devices and packages
  • Data formats and revision control
  • Programming methods (on-board/off-board)
  • Throughput and turnaround time
  • Pricing structure (per chip, per hour, setup fees)
  • Quality certifications (ISO-9001, IPC, etc)
  • Intellectual property (IP) protection

Expect to provide the service with the following:

  • Bill of Materials (BOM)
  • PCB assembly drawing
  • Schematics
  • Device datasheets
  • Programming files
  • Special instructions

Working closely with the programming service can help ensure a smooth process and minimize the risk of errors.

FAQ

What is the difference between flashing and programming?

Flashing and programming are often used interchangeably, but flashing specifically refers to programming flash memory (like in an MCU), while programming is a more general term that encompasses configuring any type of IC, not just flash-based ones.

Can I program an IC more than once?

This depends on the particular IC. Most flash-based ICs (MCUs, flash memory, CPLDs) can be erased and reprogrammed many times. Mask ROM and antifuse FPGAs can only be programmed once. Always refer to the datasheet for the IC’s programming specifications and limits.

How long does IC programming take?

Programming time varies widely depending on the IC density, programming interface, and method. A small 8-bit MCU might only take a second to program via ISP, while a large FPGA could take several minutes. Off-board programming is generally faster than on-board. The programming software usually provides an estimated time.

What happens if there is a power failure during programming?

If power is interrupted while an IC is being programmed, the programming will fail and the chip may be left in an indeterminate state. Most ICs have a reset or power-on state that is entered if programming is not completed. In some cases, the IC may be “bricked” and not recoverable, though this is rare. It is important to have a stable power supply during programming.

How do I protect my code from being copied?

Most MCUs and FPGAs support some form of code protection or encryption to prevent unauthorized reading or copying of the programmed code. The exact method varies by manufacturer but usually involves setting security bits to lock the chip and/or encrypt the firmware. The protected code cannot be read out externally, only executed by the IC itself.

Conclusion

IC programming is an essential part of the electronics manufacturing process that brings designs to life by customizing off-the-shelf chips. Choosing the right programming method, equipment, and software is critical for an efficient and reliable production flow. Whether programming in-house or outsourcing to a service, taking the time to develop robust IC programming processes can help ensure a successful product.

CATEGORIES:

Uncategorized

Tags:

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Comments

No comments to show.