Home - Blog

14 Tips on Designing a PCB Programming and Testing Board

For PCB programming, I believe everyone will have many problems, and it is a very professional technique. We need a complete process to help us perform our tasks. Otherwise, you may have some severe consequences due to the wrong steps. For example, PCB cannot be used frequently and need to work again.


We will discuss the design process of a custom microcontroller and test board in this tutorial. The methods have been simplified for faster build and minimized error margins. By focusing on the microcontroller, you will be able to learn PCB programming without dealing with the complexity.


YouTube video

What is PCB Programming?

Most modern PCBs feature integrated circuitry of some sort. These chip packages (or ICs) and microcontrollers allow engineers and technicians to program the PCB to function in the electronic device it will eventually integrate into. 

Modern-day fridges, washing machines and microwaves are all everyday appliances that use firmware to operate in one capacity or another. Of course, slightly more complex devices, such as single-board computers (SBCs), require more advanced firmware and software. 

Nevertheless, regardless of the complication of the device or its firmware, manufacturers and technicians must have a way to embed the firmware on the PCB. This is where PCB programming comes in.

It typically refers to uploading or flashing coded instructions or firmware onto a PCB during the assembly or manufacturing process. However, it can also refer to planning and designing the layout of the PCB and its components, as well as testing and debugging the PCB.
Ultimately, we could consider any PCB manufacturing or assembly process part involving firmware or software as PCB programming. However, this guide will focus on PCB programming for component functionality and testing.   

PCB Programming Methods

There are three main PCB programming techniques: 

On-board Programming (OBP)

On-board programming describes the direct programming of a PCB’s microcontroller or logical device. Manufacturers and technicians can perform it during or after the assembly process. 

Since an external programmer isn’t necessary, OBP can reduce manufacturing time and streamline inventory management. This is because manufacturers don’t have to mount and dismount PCBs to program them. Moreover, if need be, they can directly modify and update data on the PCB.

Stand-Alone Programming

Stand-alone programming allows manufacturers to program individual components before mounting them onto a PCB. Hence, it is also often referred to as off-board or universal programming. 

Stand-alone programming allows manufacturers to test and ensure that each component is fully functional and working correctly before connecting it to the rest of the assembly. This PCB programming technique is advantageous because it’s flexible and more cost-effective and reliable than other testing methods.

In-Circuit Testing

As the name implies, manufacturers use this method to (mainly) program PCBs for testing or program tests for PCBs. As with stand-alone programming, in-circuit testing is performed on the component level. 

Most ICT systems use probes, with “bed-of-nails” being one of the most well-known types. ICT systems are popular among manufacturers because of their high test and fault coverage, speed, efficiency and convenience.

PCB Programming and Design Software

As we previously mentioned, PCB programming is a broad term. It can refer to coding or programming for the design, fabrication, and testing phases. Consequently, each phase requires its specialized tool or software. The most popular tools for each process are as follows:   

Programming Software

Manufacturers, technicians and hobbyists use the following tools to upload software to microcontrollers (mainly).

Design and Layout

PCB Manufacturers and designers use the following CAD applications to create and automate PCB schematics and layouts:

You can also use the above design and layout software to verify and refine your PCB designs. They include Design for Manufacturability (DFM) features that ensure your designs are ready for fabrication. In addition to these capabilities, they can also allow you to simulate tests and virtually debug your PCBs. 

However, design and testing software is only a fraction of the equation. If you want to fully and comprehensively test your PCB, there are a few other hardware-based tools you should be privy to…

Other PCB Programming and Testing Tools

Other hardware tools and instruments that you can use to test and debug your PCBs include:

  • In-Circuit Debuggers (ICDs)   
  • Multimeters  
  • Logic analyzers
  • Oscilloscopes  
  • In-System Programming Adapters
  • Test Points and Probes  
  • JTAG Boundary Scanning Tools 
  • Automated Test Equipment 
  • Functional Test Systems 
  • Bed-of-Nails Testers   

System Design

1. System / Preliminary Design

In PCB Programming, the primary focus should be understanding the board’s overall design before you begin when you know what component fits where the design process gets much more comfortable.  

The preliminary design comprises two significant steps. First, you should build a diagram of the complete system. Treat this as your design blueprint. The blueprint will guide you on what the inputs and outputs are without going into too many details.

It is to understand how the entire board functions and connects.

Printed Circuit Board with DIP Components.jpg

2. Block Diagram

A block diagram includes one block for every significant component cluster. How these modules are linked, how they interact, and how much voltage flows through each stage.

When all of these blocks are added to the diagram and how much initial energy will be required, add these details to the picture. It will make your job easier by showing if you need any voltage controllers for shifting for every core block.

It would be best if you had shifters for voltage control because two electrical parts are linked through contributor voltage. When these two electrical parts use different energy levels, you need to use a shifter.

3. Select Microcontroller

You can decide what kind of microcontroller to use based on necessary details like cost, availability, properties, etc. You can get all these details from the site of distributors.

Price over performance –Arm Cortex-M is a quality MC because of how cheap they are and the level of performance you can get out of them. Even if you are PCB programming for only 8-bit, you can afford and should use a 32-bit Cortex-M.

Performance – depending on the number of GPIO pins and which uses the serial protocol.

The simplest and cheapest microcontrollers will have 32 pins with different features. The top of the line will have up to 216 pins; however, this might be too complex to work with if you are a beginner.

Leaded Package – This is an excellent feature because the pins of the microcontroller become readily available. The packages that come without being led have the pins tucked below the container. It means it is challenging to reach the nails if you don’t have any test points available. 

PCB Programming– Schematic Circuit Design

To begin with the connector, a regulator to control voltage, an MC chip, and a PCB programming connector.

Printed Circuit Board Schematic Diagram.jpg

4. Capacitors

To do this, we will follow these steps.

1. Begin the design by positioning a capacitor over the input pin that is on the regulator. Place another capacitor on the output pin of the regulator. The first one is for the input voltage, and the second one is for saving charge to pass it to impermanent loads. The second capacitor will also act to create stability with the regulator. Without this, the regulator will fluctuate.

2. Near the supply pins of the MC, you will place capacitors for decoupling. You can consult experts to understand what kind of capacitor to use for this function.

5. Microcontroller Pinout

Microcontroller manufacturers usually configure many different functions on the same pin to reduce the total number of required fasteners.

In the beginning, the use of the nail will start automatically. But these pins can also have alternative functions. Make sure that no two services you need to assign to a pin. 

Small electronics integrated circuit IC on empty printed circuit board ready for hand assembly.jpg

6. RC Oscillators

The clock is a necessary component because it determines that the microcontroller performs the functions in proper sequence at every second. Some microcontrollers that have pre-installed clocks watch timers, also called RC oscillators because they combine the timing of both a capacitor and a resistor. The downside to that is that they have lower precision. Temperature can majorly affect the level of accuracy of oscillation.

For starter kits, they are excellent. But if you are designing something that needs extreme timing accuracy, then these clocks are not advised.

7. Programming Connector

There are only two programming protocols: the JTAG protocol and the Serial Wire Debug protocol.

The SWD only needs five pins to perform clock, i/o, ground, contributor voltage, and reset. If you are looking to design a small board, then this can be the ideal choice.

JTAG connectors can have a large number of pins and suitable for complex programming.

8. Power

The microcontroller needs a contributor voltage to control the components. You can use an external USB charger for this purpose. Calculate the output voltage that feeds in the regulator and the stable output from that to decide what supply is suitable for your design. 1 GPIO pin needs around 24 mA of current, so calculate the source current depending on that. For basic models, the microcontroller can consume up to 300 mA with ease.  

Blue electric current on PCB Printed circuit board.jpg

9. Electrical Rules Check

You can put some errors for pins with the help of colored checks. It will tell you instantly if there are any issues with the board and where that is originating.

The last step is to check that you don’t have any short circuits within bets, pins touching each other, or any pin remaining unconnected.

PCB Layout Design

In this step, you can start placing all the components inside the design of the circuit board. You can then use ‘convert to PCB’ to ensure that the design creates the finalized product with every component in place.

10. Component Placement

This step can check the correct positioning of the parts. If you are using software for PCB design, you can already place components in place. But for better performance of the layout, experts like doing it manually.

Ensure the regulator positions the micro USB connector, and the output is close to the input pin. You can then post the connector for programming in a place you think fits the design. After everything is in place, you can post the resistors, inductors, and the various capacitors we discussed. 

Reasonable design of PCB component placement.jpg

11. PCB Layer Stack

The PCB is a collection of layers stacked over one another. When you have sheets that are capable of conduction, they need to have insulation material between them. You can have a maximum of two of these, preferably at the outsides. As you make the designs more advanced, you can add more conductive layers in even numbers.

12. PCB Wiring

The wiring is generally carried out after component placement. You can do it automatically or manually. The automatic process is not very efficient.

The main principle of routing is that you will need to shorten the height of the traces. It would help if you also lessened how many vias you are using and any 90 degree turns. The higher the power of the evidence, the more critical these principles become.

You can use it through vias if you are trying to reduce the cost of building a prototype. The blind and buried vias tend to be much pricier. The traces should also handle the current flow, or it will melt and cause the board to become damaged.


In the verification, you have to ensure that the design rules are verified and the schema has also been validated.

The DR check will ensure that you have used the right width of trace and left adequate space between marks and the gap between the board and the evidence is correct.

The Drs depends on what circuit board you are designing. So, it would help if you had the right rules before starting the design.

14.Generating Gerbers

After completing verification, you must turn the circuit board design in the standard industry format. This format is known as Gerber. In this format, every layer in the circuit board will have outputs in different files. Silk, assembly, solder mask, paste are the layers. You will also have to create a file that has the positioning details of the components. The manufacturer will use this file when they operate the automatic component placer. You can send these files to the manufacturer of your choice.

PCB Gerber File Generation.jpg


We analyze the PCB design process through custom microcontroller programming. We gave a brief introduction to the process to ensure that you can follow the steps.

If you need more questions about PCB programming, you can contact us on time.

WellPCB has ten years of WellPCB will provide you with quality service and professional technology.

Avatar photo
Emma Lu
Our professional engineering support saves our customers a lot of trouble and loss. >>>>>> After you place the order, our engineer will conduct technical reviews to make sure the parts can be mounted well/correctly on the boards. We will check if the component packages match well with the Gerber footprints, if the part numbers you provided match well with the descriptions, and if the polarity is clearly marked. >>>>> When your design is ready, please send your Gerber and BOM so we can quote and start!