Wednesday, 7 June 2017

PIC turns on with the Rx pin


If I connect the Rx pin of my PIC18F2550 and GND to another already powered-on circuit, the PIC turns on and starts running code. There is nothing in the datasheet preventing this. Is this normal?


PS: Rx and SDA are connected toghether, but still the PIC shouldnt turn on at all.



Answer



You are parasitically powering your IC through the protection diodes on the Rx IO line.


I'm assuming you have voltage on the Rx line (presumably 3.3V or 5V). This is getting into the PIC Vcc through the protection diodes on the IO pins.


From the PIC18F2550 datasheet:


I/O pins have diode protection to VDD and VSS.


There's not much you can do about this, and having any current flow through the protection diodes is a bad idea (they're not intended for this). You will have to modify your circuit to prevent voltage from being present on any of the PIC pins when the PIC is not powered.


If you can't prevent voltage from being present on the PIC IO lines when it's unpowered, you should clamp the Rx line to Vcc and Gnd with shottky diodes. Since the diodes in the PIC are constructed on the silicon die in the MCU, they are plain-old silicon diodes, with a \$V_{F}\$ of ~0.6v. Since the clamp diodes are schottky, they will begin conducting before the internal diodes on the PIC, so the MCU will be safe.


Of course, if the source driving the Rx line can source enough current to power your whole circuit, you'll wind up simply powering your circuit this way. To compensate you'll need to add a series resistor inline with the Rx line.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...