Maker Pro
Maker Pro

Question regarding ic / microcontroller chips

krappleby

Jan 8, 2017
3
Joined
Jan 8, 2017
Messages
3
Hi,

my name is keith,

i have a question regarding chips

ok here goes,

if you had 2 microcontrollers in a circuit and both are connected to the same system in exactly the same way.. how would you turn one off an one one. at any time..

easiest way to ask this, is if there is no 5v supply to the main supply line is the chip innactive.. inother words lets say we have for arguments sake a 4 pin chip.. +5v, RC, RS, D1.

and there are two chips, both conected to
RC. RS, D1.

the only difference is that the +5v line is connected seperately (say through a relay)

now if we activate the +5 line on chip one.. and send data to it in order to progRAM THE CHIP down the RC channel. will only chip 1 recieve the data, Or will chip 2 also update.. if we send a signal to D1 (digital input) will only chip 1 pick it up, or will chip two pick it up too..

What im looking to do is to have 2 seperate chips, with two seperate functions, but have only one active at a time. can this be done..

basicallly.

to completely deactivate a chip, do you just need to remove the +5v power to it.. and it becomes dead????

cheers
bit long winded, hope i have explained..
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
It is conceivable to do this, not sure why, but if the impedance of each source was sufficiently high it might work.
Another method could be to hold one in reset, when the other operated.
If actually performing programming then it would be advisable to remove power on the other IC.
M.
 

hexreader

Apr 21, 2011
135
Joined
Apr 21, 2011
Messages
135
What you suggest will not work. A micro-controller will usually power itself through I/O lines, even if you kill the +5V supply.

What you may be able to do, is to assert a reset signal on one chip, which will cause most pins to go high impedance. With luck, this will leave the other controller free to work the signal lines.

Depends on which micro-controllers you are using, and how you are using them.

Ooops ... Minder got there first
 

krappleby

Jan 8, 2017
3
Joined
Jan 8, 2017
Messages
3
ok.. but wont the reset line reset the data on the chip..

for example. if the first chip is programmed, and i use the reset on it to use the other chip. wont that reset the data in the first chip??
 

hexreader

Apr 21, 2011
135
Joined
Apr 21, 2011
Messages
135
No...

Reset simply starts the firmware program from scratch (usually address zero)

Any RAM data will be retained, unless the firmware resets it.

It will certainly cause less data loss than power down would.
 

krappleby

Jan 8, 2017
3
Joined
Jan 8, 2017
Messages
3
ok, thanks..

so here is another question..

is there a chip on the market, that would do the following.

pin1 +5v
Pin 2 GND

pin 3 = signal in1
pin 4 = singal out 1

pin 5 = signal in 2
pin 6 = signal out 2

etc

as many pins as is needed

if power is supplied to pin 1, then all other pins act as through put, so any data to pin 3 would go to pin 4, etc
data to pin 5 would go to pin 6
etc

this in a way would help select the chip to be used, as a sort of safety mechanism.. A but like multi input transistor / or better yet a multi input relay
if power is comming in pin 1 then allow power to flow between all joined pins, 3-4 5-6 7-8 etc.. if no power in then do not allow pins to connect so no power out.. on them pins..
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
A transparent latch operates somewhat like your description. It has ins and outs and an enable input. When the enable is high, the outs pass through the data from the ins. When the enable is low, the last value of the outs is frozen and changes to the inputs are ignored.

Do not think about powering logic on and off to control where signals go, you use logic for this.

For example, your original problem can be resolved easily with a single AND gate for each micro. One of the inputs is the enable and the other is the data. If you enable the gate for uP 1 by setting the enable input high, the second input will be passed along to the uP. If the enable is low, the output of the AND remains low.

Bob
 

tedstruk

Jan 7, 2012
476
Joined
Jan 7, 2012
Messages
476
I've heard that before Mr.BobK.
teach said,
"ins and outs are arbitrary. Any high impedence opens the box. Low impedence doesn't change anything. " The program in the eprom is the stuff that doesn't change.(I think)
 

chopnhack

Apr 28, 2014
1,576
Joined
Apr 28, 2014
Messages
1,576
It is conceivable to do this, not sure why, but if the impedance of each source was sufficiently high it might work.
Of course it would matter what is connected to these pins in common. There is a chance to damage the μcu during the change over. As mentioned, programming and logic gates would be key to operating this system.

Can you not get everything you need out of one μcu?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
This is a classic example of a shared bus (also called a party line) where several bus members (aka chips) share one or more common signal lines.
To avoid bus contention it is essential that at any time no two outputs try to access the same signal line. A common method of isolating the bus members is by using tri-state bus drivers for outputs. Depending on the architecture of the chips used, holding one chip /microcontroller) in reset may work if the pins of the chip are configured as inputs during reset as is often the case with general purpose ports.
However, this may not always be the case as a pin may have a dedicated output function. The datasheet of the respective chips can tell you this.
Note that apart from tri-state drivers other technologies exist (e.g. wired-AND, wired-OR or by using additinal gates as proposed by Bob in post #7).


"ins and outs are arbitrary. Any high impedence opens the box. Low impedence doesn't change anything. " The program in the eprom is the stuff that doesn't change.(I think)
Can you elaborate on this? It's not all too clear to me.
When controlling logic states typically the notion of logic high and logic low is used (binary 1 and 0 in most cases). High impedance is not a defined logic state but a physical state of an output driver (tri-state) which will generally not be used as a logic signal. Rather tri-state outputs are used to allow multiple members to share a common signal (see above).
Note that it is possible, but rarely done, to evaluate this high impedance state e.g. by checking for a voltage between logic high and logic low using an analog comparator. Generally this state is avoided, however, because the inputs of other bus members connected to such a signal will 'see' an illegal signal. Consequently these inputs will result in undefined behavior of the logic chip. One chip may take this signal as high, another as low, a third one may get into oscillations etc.
If there is a chance that all members driving such a signal can be high-impedance at the same time, typically a pull-up resistor (or pull-down resistor) is used to ensure a clear logic high (or logic low) in that situation.
Also logic gate input can be made insensitive against input voltages within the otherwise forbidden range by employing a Schmitt-trigger characteristic.
 

Pyramid

Jan 17, 2017
24
Joined
Jan 17, 2017
Messages
24
Hi,

my name is keith,

i have a question regarding chips

ok here goes,

if you had 2 microcontrollers in a circuit and both are connected to the same system in exactly the same way.. how would you turn one off an one one. at any time..

easiest way to ask this, is if there is no 5v supply to the main supply line is the chip innactive.. inother words lets say we have for arguments sake a 4 pin chip.. +5v, RC, RS, D1.

and there are two chips, both conected to
RC. RS, D1.

the only difference is that the +5v line is connected seperately (say through a relay)

now if we activate the +5 line on chip one.. and send data to it in order to progRAM THE CHIP down the RC channel. will only chip 1 recieve the data, Or will chip 2 also update.. if we send a signal to D1 (digital input) will only chip 1 pick it up, or will chip two pick it up too..

What im looking to do is to have 2 seperate chips, with two seperate functions, but have only one active at a time. can this be done..

basicallly.

to completely deactivate a chip, do you just need to remove the +5v power to it.. and it becomes dead????

cheers
bit long winded, hope i have explained..


Probably the easiest way to do what you want to accomplish is to put both functions into a single microcontroller and jump between the two software routines to execute the 2 different functions. The uP can monitor a port pin that changes level from an external source when each function is needed and jump between the two code segments when it needs to change tasks. Trying to do this with 2 hardware chips would not be practical IMHO.
 
Top