Author Topic: Powering a microcontroller from an output pin of another microcontroller  (Read 1481 times)

0 Members and 1 Guest are viewing this topic.

Offline JoePTopic starter

  • Contributor
  • Posts: 37
  • Country: gb
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
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Powering a microcontroller from an output pin of another microcontroller
« Reply #1 on: November 06, 2018, 07:15:01 am »
why not use the reset pin?
 

Offline JoePTopic starter

  • Contributor
  • Posts: 37
  • Country: gb
Re: Powering a microcontroller from an output pin of another microcontroller
« Reply #2 on: November 06, 2018, 07:26:18 am »
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.1520009189
It says nothing about a reset pin though.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Powering a microcontroller from an output pin of another microcontroller
« Reply #3 on: November 06, 2018, 07:37:40 am »
RA3, MCLR for pics, pulling him low resets the device unless you have set the fuses to use it as an input.
 
The following users thanked this post: JoeP

Offline JoePTopic starter

  • Contributor
  • Posts: 37
  • Country: gb
Re: Powering a microcontroller from an output pin of another microcontroller
« Reply #4 on: November 06, 2018, 07:44:07 am »
Aah, ok. Unfortunately I'm using it as an input.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12875
Re: Powering a microcontroller from an output pin of another microcontroller
« Reply #5 on: November 06, 2018, 08:30:00 am »
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.
« Last Edit: November 06, 2018, 08:32:57 am by Ian.M »
 
The following users thanked this post: JoeP

Offline JoePTopic starter

  • Contributor
  • Posts: 37
  • Country: gb
Re: Powering a microcontroller from an output pin of another microcontroller
« Reply #6 on: November 06, 2018, 05:35:01 pm »
Great, thank you. I will pull all the inputs low, then pull vdd low.
 

Offline brybot

  • Contributor
  • Posts: 20
  • Country: us
Re: Powering a microcontroller from an output pin of another microcontroller
« Reply #7 on: November 06, 2018, 10:28:51 pm »
Great, thank you. I will pull all the inputs low, then pull vdd low.

Beware, in that configuration your inputs may sink current through protection diodes. In that sense, they won't truly be "off".
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 759
  • Country: us
Re: Powering a microcontroller from an output pin of another microcontroller
« Reply #8 on: November 07, 2018, 01:38:23 am »
Dave his a video on the EEVBLOG 831   

This shows how you can power (unintentionally) a micro by pushing power into an input pun.
 

Offline TomS_

  • Frequent Contributor
  • **
  • Posts: 835
  • Country: gb
Re: Powering a microcontroller from an output pin of another microcontroller
« Reply #9 on: November 07, 2018, 07:24:35 pm »
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.

Perhaps something like a 74HC245? Take pin 19 high and the output pins will go tri-state.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf