Powering a microcontroller from an output pin of another microcontroller - Page 1
Forum section: electronics / beginners

author: JoeP
author_rank: Contributor
timestamp: November 06, 2018, 07:08:59 am
content: I'm running out of pins on a microcontroller and need a way to turn off all its output pins from a single input pin. Could I use Vdd as this pin? Is there a reason why I shouldn't do this, and are there any issues this could cause? It would happen very infrequently, but for long periods of time. Would it damage the chip or will it be fine?Thanks, Joe

author: Rerouter
author_rank: Super Contributor
timestamp: November 06, 2018, 07:15:01 am
content: why not use the reset pin?

author: JoeP
author_rank: Contributor
timestamp: November 06, 2018, 07:26:18 am
content: I don't know whether mine's got one? The datasheet is here:http://www.farnell.com/datasheets/2137994.pdf?_ga=2.11177268.1643568016.1539016190-2008006305.1520009189It says nothing about a reset pin though.

author: Rerouter
author_rank: Super Contributor
timestamp: November 06, 2018, 07:37:40 am
content: RA3, MCLR for pics, pulling him low resets the device unless you have set the fuses to use it as an input.

author: JoeP
author_rank: Contributor
timestamp: November 06, 2018, 07:44:07 am
content: Aah, ok. Unfortunately I'm using it as an input.

author: Ian.M
author_rank: Super Contributor
timestamp: November 06, 2018, 08:30:00 am
content: It depends on your definition of 'turn off'. If you disconnect Vdd from the supply then pull it down to 0V, the PIC will be off and all the I/O pins will effectively be pulled low via their upper internal protection diodes. If you don't pull Vdd down, if any pin has more than about 2V feeding into it from any source, the MCU will probably continue to run (to some extent - normal operation *NOT* guaranteed), powered from its inputs via their protection diodes.If you need all pins Hi-Z, then you *NEED* that /MCLR pin available so you can hold the PIC in Reset (unless you monitor another input and set all other pins as input when its asserted in code).If all I/Os low with Vdd pulled down doesn't meet your requirements, you'll either have to be more efficient in your pin usage, multiplexing some uses to free up a pin, or you'll need to go up to a 28 pin part with similar features.

author: JoeP
author_rank: Contributor
timestamp: November 06, 2018, 05:35:01 pm
content: Great, thank you. I will pull all the inputs low, then pull vdd low.

author: brybot
author_rank: Contributor
timestamp: November 06, 2018, 10:28:51 pm
content: Quote from: JoeP on November 06, 2018, 05:35:01 pmBeware, in that configuration your inputs may sink current through protection diodes. In that sense, they won't truly be "off".

author: JustMeHere
author_rank: Frequent Contributor
timestamp: November 07, 2018, 01:38:23 am
content: Dave his a video on the EEVBLOG 831This shows how you can power (unintentionally) a micro by pushing power into an input pun.

author: TomS_
author_rank: Frequent Contributor
timestamp: November 07, 2018, 07:24:35 pm
content: Quote from: JoeP on November 06, 2018, 07:08:59 amPerhaps something like a 74HC245? Take pin 19 high and the output pins will go tri-state.