FT200: A Multi-Chip Programming Tool Supporting LabVIEW
For those who have worked on PCBA automatic testing production lines, chip programming is certainly familiar. Typically, after soldering components onto a bare board, functional testing is conducted, which involves programming the chips on the board with existing test programs and then testing whether the input and output logic is normal.So how do we program chips? Generally, one would buy a programmer. For those familiar with STM32, they would know about Jlink and STlink; those using Renesas chips would buy various programmers like E1, E2, etc.; different chips require different programmers. Back in the day, one of our department’s programmers was borrowed around a lot, sometimes even lent out to others. (Although many chip manufacturers actually provided free legitimate programmers at that time.)Assuming the production line has a variety of chips, we need to buy many programmers. After all, there are too many different types of chips. Most of these programmers come with their own software, and when programming chips manually, one has to open different software for each.For example: suppose we have a board with an STM32 chip, and we need to conduct functional testing on it. The automatic testing steps would roughly be as follows:
Control the power supply to power the PCBA board.
Program the corresponding main chip STM32 with the program.
After programming is complete, conduct functional tests, such as button input detection, corresponding functional output detection, like LED detection, and AD/DA detection.
If all functional tests pass, output a qualified report; otherwise, an NG report.
For our friends using LabVIEW for PCBA testing, what matters more is how to use LabVIEW to control the programming process, as other aspects are handled by instruments or devices for detection. Furthermore, if programming is not automated, one must manually select the corresponding software, which is time-consuming and labor-intensive.Now, the common methods for calling programming in LabVIEW that I have used can be roughly categorized as follows:a) Call DLL files. I previously used a TI tool to program TI’s MSP430 chip, where I called a DLL. This DLL was quite tricky because there were many pointers involved, so I later wrapped it slightly using Visual Studio C++ to make it usable. As part of the testing steps, once it reached this step, it would automatically download the programming file. This programmer has an LCD screen and can store the programming file offline.At that time, there were also colleagues from other departments who did not call the DLL but used another method, employing an actuator controlled by LabVIEW to press the GO button on the programmer, achieving the same functionality.These programmers with screens and buttons are generally not cheap, hence there are also cheaper programmers like STlink and Jlink.b) Call command line. This is the most commonly used method, connecting via USB to the computer. The programmer generally provides cmd commands for programming, which can be followed as instructed, and finally, LabVIEW can call this command line. A BAT batch file can also be created for the command line, which LabVIEW can call.For example, to program a certain hex file, the command line operation in the computer CMD is as follows. By checking the returned information, one can determine whether the programming was successful.After programming, it is generally necessary to check whether the program was programmed correctly in the CMD command line using the following command.Typing manually in the CMD command line can be slow, so we usually write a BAT batch file with a .bat extension. Double-clicking it will automatically execute the CMD commands, which is much more convenient. Alternatively, one can find the original manufacturer to provide programming codes for the batch processing.Since we can write BAT batch files, LabVIEW can call this batch processing through the “Execute System Command” function to implement programming, and then through the batch file, return a string indicating successful programming. If the string