完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
一位同事发现了一个奇怪的事情发生在一个新设计的板上,当他通过MPLAB-X通过ICSP编程闪存:板是通过自己的电源供电,当他通过ICPIT3启动ICSP编程时,车载高压电源转换器突然开始运行。现在,这个转换器在引脚RB10上有一个使能线(PIC引脚23),它也是模拟引脚AN10,并且这条线主动驱动光耦合器。即,光耦合器的LED与它的阴极连接到地上,并用它的阳极连接到PIC。光耦合器隔离输出驱动MOSFET的栅极,该栅极被一个39 K电阻拉低至-12V。这意味着为了激活高压转换器,PIC输出必须DRIV。E电流通过LED从引脚上的高电压水平。我们对此感到困惑,因为我们理解PIC出来的复位与端口B引脚配置为模拟输入,直到运行代码已设置寄存器为数字。但是输入不能驱动光耦的LED,对吗?那么在通过ICSP系统编程闪存时有什么奇怪的事情发生吗?我们已经将ICSP连接到以下引脚:ICSP引脚1:MCLR(PIC引脚7)ICSP引脚4:PGED1(PIC引脚16)ICSP引脚5:PGEC1(PIC引脚15),PIC上没有这些引脚的替代用途。因此,在通过ICSP编程时有什么特别的事情可以解释这种行为吗?我附上故障信号的电路图的一个切口。
以上来自于百度翻译 以下为原文 A colleague found a weird thing happening on a newly designed board when he was programming flash via ICSP from MPLAB-X: The board was powered through its own power supply and when he started the ICSP programming through PicKit3 an on-board high voltage power converter suddenly started operating.... Now, this converter has an enable line on pin RB10 (PIC pin 23), which is also analog pin AN10, and this line actively drives an opto-coupler. I.e. the opto-coupler LED is connected to ground with its cathode and to the PIC with its anode. The opto-coupler isolated output drives the gate of a MOSFET which is pulled down to -12V by a 39K resistor. This means that in order for it to activate the high voltage converter the PIC output must drive current through the LED from a high voltage level on the pin. We were baffled about this since we understood that the PIC comes out of reset with the port B pins configured as analog inputs until running code has set the register as digital. But an input should not be able to drive the LED of an opto-coupler, right? So is there something strange happening while programming flash through the ICSP system? We have connected ICSP to the following pins: ICSP pin 1: MCLR (PIC pin 7) ICSP pin 4: PGED1 (PIC pin 16) ICSP pin 5: PGEC1 (PIC pin 15) There is no alternate use for these pins on the PIC. So is there something special happening whilst programming through ICSP that can explain this behavior? I attach a cutout of the circuit diagram of the trouble signal. Attached Image(s) |
|
相关推荐
6个回答
|
|
你是说“编程”还是“重置后”?一些引脚(不幸地)在ICSP操作期间改变它们的状态…
以上来自于百度翻译 以下为原文 Do you mean "while programming" or "after coming out of reset"? Some pins are known (sadly) to change their state during ICSP operations... |
|
|
|
我问,这就是答案:1)如果编程是与板电源连接,然后一旦实际编程开始,然后板开关模式电源开始运行拉功率从0.3 A到2.5 A. 2),如果板电源关闭,而编程闪光灯,然后这样做。当然不会发生,闪光灯被编程了。在这种情况下,我们假定PACKIT3根据需要为设备提供电源,因为它确实起作用。3)当电路板运行时,没有注意到这种伪转换器的启动,引脚似乎动作灵敏。您知道哪一个引脚是这样的吗?也许双模式(模拟和数字)引脚?
以上来自于百度翻译 以下为原文 I asked and this is the answer: 1) If the programming is done with board power connected then as soon as the actual programming starts then the board switched mode power supply starts operating pulling power from 0.3 A to 2.5 A... 2) If the board is powered off while programming flash then this does not happen (of course) and the flash is programmed. In this case we assume the PicKit3 supplies power to the device as needed since it does work. 3) When the board runs there is no notice of this bogus converter start, the pins seems to act sensibly. Do you know which pins are behaving like this? Maybe dual mode (analog and digital) pins? |
|
|
|
我明白了,这是有道理的。我不确定,我似乎记得“一些端口”可能会受到影响,而且不久前就有一个线程…
以上来自于百度翻译 以下为原文 I see, makes some sense then. I am not sure, I seem to remember that "some ports" could be affected, and there was a thread not long ago... |
|
|
|
我在很多图片上看到了这种情况。在PIC24S上,PICTIT3工厂称为编程执行程序,它执行实际编程。它将SPI1模块路由到ICSP引脚,但是有时在重新路由中存在硅错误,因此SDO1引脚在编程期间开始切换。类似地,在一些用ICSP编程到JTAG接口的PIC32上,TDO引脚在编程过程中开始切换,看起来不像B10应该受到影响。但是,这个引脚确实是JTAG引脚之一。
以上来自于百度翻译 以下为原文 I've seen this happening on a number of PICs. On PIC24s, PICkit3 plants a program called programming executive which does actual programming. It re-routes SPI1 module to the ICSP pins, but sometimes there are silicon bugs in the re-routing, so SDO1 pin starts toggling during programming. Similarly, on some PIC32s, which are programmed with ICSP-to-JTAG interface, TDO pin starts toggling during the programming. Doesn't look like B10 should be affected. But, this pin is indeed one of the JTAG pins. |
|
|
|
好的,我们现在在它上挂了一个示波器,它是0V开始,然后当编程开始通过PICTIT3,它跳到2V左右,并保持这样。我清楚地驱动了光耦合器……我重新设计了一个旧的电路板,把所有的通孔和废弃的部件都用表面安装的等效物或改进的功能集成电路S替换掉。我也扔掉了旧的微控制器,使用了PIC24FJ256GB206,这是我们在许多OTE中使用的。我现在必须把这个敏感的信号移到另一个管脚…
以上来自于百度翻译 以下为原文 OK, we now hooked an oscilloscope on that pin and it is 0V to start with and then when the programming starts via the PicKit3 it jumps up to 2V or thereabouts and stays so. Clearly driving the opto-coupler.... I have redesigned an old board and ripped out all the through-hole and obsolete components replacing them with surface mount equivalents or improved functional IC:s. And I threw out the old microcontroller too and used a PIC24FJ256GB206, which we use in many other current boards. Seems like I have to move this sensitive signal to another pin.... |
|
|
|
跟踪:我们把信号从RB10移动到未使用的引脚1(R5),并相应地修改固件。现在不再有高电压转换器的流氓开关!:)
以上来自于百度翻译 以下为原文 Follow-up: We moved the signal from RB10 to unused pin #1 (RE5) and modified the firmware accordingly. Now no more rogue switch-on of the high voltage converter! :) |
|
|
|
只有小组成员才能发言,加入小组>>
5243 浏览 9 评论
2035 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3208 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2258 浏览 5 评论
778浏览 1评论
669浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
597浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
679浏览 0评论
577浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 07:36 , Processed in 1.423226 second(s), Total 88, Slave 72 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号