HiStIt整个事情对我来说是很熟悉的。我在想象一条生产线,包括一些PCBA的PIC编程,在运行了一个诊断,不仅在编程的PIC上,而且在整个PCBA上。已经有了类似的事情。所以:-在任何生产设备上的应用程序代码。E不易发生变化,所以在I/D部门控制下的程序员PIC的闪光灯中填充它就足够了。-为了能够编程只访问MCLR、PGC和PGD的PIC,它必须使用高电压编程。你必须按照规范来执行这个协议,包括MCLR管脚的受控高压电源。为了运行某种诊断/校准,你需要程序员PIC和目标PIC之间的通信通道。正如已经提出的那样,您需要使用PGC和PGD管脚来实现这种通信,因为您不能访问其他人。在编程和测试阶段,能够控制PCBA的功率也很有趣。NETE,必须在解耦和噪声滤波方面非常谨慎。程序员必须有2个操作阶段:1 -从自己的有效负载编程目标PIC(用目标应用的二进制图像的闪存表)。2——编程切换到测试模式。释放MCLR线路并将PGC和PGD线路切换到通信模式。3 -最有可能还必须输出一个输出(与工业硬件兼容)发出一个好的/坏的板,因此生产线可以将坏的信号从出口路径中除掉。目标PIC应用程序必须包括D。IAGNONTIS/校准支持,使用PGC和PGD线的通信信道的形式,因此它可以与程序员/ TEST交换诊断命令和数据。作为最终产品的安全特征,应用程序应该只接受诊断/校准的开始。在一个POR或MCLR之后的一个给定的时间间隔中,我将排除任何基于Bootloader的目标PIC(生产设备)的解决方案,这通常意味着稍微大一点的PIC,每一块板的成本稍高一些,这通常超出了大规模生产的范围。对…最好
以上来自于百度翻译
以下为原文
Hi
This whole thing feels quite familiar to me.
I'm imagining a production line that includes the programming of a PIC in some PCBA, and after runs a diagnostic not only on the programmed PIC but on the whole PCBA.
Already been fighting something alike.
So:
- The application code on any production device is not prone to frequent changes, so stuffing it in the FLASH of the programmer PIC under the I&D department control would be good enough.
- To be able to program a PIC with only access to MCLR, PGC and PGD, it must use high voltage programming. You have to implement this protocol as per the specification, including a controlled high voltage supply for the MCLR pin.
- For running some kind of diagnostics/calibration you will need a communications channel between the programmer PIC and the target PIC. As already suggested you need to implement this communication using the PGC and PGD pins as you don't have access to others.
- It might also be interesting to be able to control the power to the PCBA during the programming and testing phases.
- All this must be able to operate on an industrial environment, so great care must be used on decoupling and noise filtering.
The programmer must have 2 operation stages:
1 - Program the target PIC from its own payload (a flash table with the binary image of the target application).
2 - After programming switch to test mode. Release the MCLR line and switch the PGC and PGD lines to communication mode.
3 - Most probably it must also have an output (compatible with industrial hardware) signaling a good/bad board, so the production line can ditch the bad ones from the exit path.
The target PIC application must include the diagnostic/calibration support, on the form of a communication channel using the PGC and PGD lines, so it can exchange diagnostic commands and data with the programmer/tester.
As a safety feature for the final product, the application program should only accept the start of the diagnostic/calibration process during a given time interval after a POR or MCLR.
I would exclude any bootloader based solution for the target PIC (production device) has this usually means a slightly bigger PIC with a slightly higher cost per board, something that is usually out of scope on mass production.
Just my 2 cents....
Best regards
Jorge