Question regarding ic / microcontroller chips

Discussion in 'Microcontrollers and Programming' started by krappleby, Jan 8, 2017.

  1. krappleby

    krappleby

    Joined:
    Jan 8, 2017
    Messages:
    3
    Likes Received:
    0
    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..
     
    krappleby, Jan 8, 2017
    #1
    1. Advertisements

  2. krappleby

    Minder

    Joined:
    Apr 24, 2015
    Messages:
    1,738
    Likes Received:
    360
    Location:
    Canadian Midwest
    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.
     
    Minder, Jan 8, 2017
    #2
    1. Advertisements

  3. krappleby

    hexreader

    Joined:
    Apr 21, 2011
    Messages:
    74
    Likes Received:
    9
    Location:
    England
    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
     
    hexreader, Jan 8, 2017
    #3
  4. krappleby

    krappleby

    Joined:
    Jan 8, 2017
    Messages:
    3
    Likes Received:
    0
    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??
     
    krappleby, Jan 8, 2017
    #4
  5. krappleby

    hexreader

    Joined:
    Apr 21, 2011
    Messages:
    74
    Likes Received:
    9
    Location:
    England
    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.
     
    hexreader, Jan 8, 2017
    #5
  6. krappleby

    krappleby

    Joined:
    Jan 8, 2017
    Messages:
    3
    Likes Received:
    0
    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..
     
    krappleby, Jan 8, 2017
    #6
  7. krappleby

    BobK

    Joined:
    Jan 5, 2010
    Messages:
    6,142
    Likes Received:
    1,160
    Location:
    Worcester, MA
    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
     
    BobK, Jan 9, 2017
    #7
    chopnhack likes this.
  8. krappleby

    tedstruk

    Joined:
    Jan 7, 2012
    Messages:
    307
    Likes Received:
    5
    Location:
    Toledo Washington
    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)
     
    tedstruk, Jan 10, 2017
    #8
  9. krappleby

    chopnhack

    Joined:
    Apr 28, 2014
    Messages:
    1,544
    Likes Received:
    342
    Location:
    Florida, USA
    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?
     
    chopnhack, Jan 10, 2017
    #9
  10. krappleby

    Harald Kapp Moderator Moderator

    Joined:
    Nov 17, 2011
    Messages:
    6,898
    Likes Received:
    1,117
    Location:
    Germany-Europe-Earth-Sol System-Milky Way-Laniakea
    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).


    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.
     
    Harald Kapp, Jan 10, 2017
    #10
    Amar Dhore and chopnhack like this.
  11. krappleby

    Pyramid

    Joined:
    Jan 17, 2017
    Messages:
    24
    Likes Received:
    5

    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.
     
    Pyramid, Jan 19, 2017
    #11
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Guest

    Question About IC Chips

    Guest, Mar 28, 2005, in forum: Electronic Basics
    Replies:
    67
    Views:
    1,438
    Terry Given
    Apr 3, 2005
  2. Pete Holland Jr.

    They Call Me Mr. Chips--A Question About IC's

    Pete Holland Jr., Oct 26, 2005, in forum: Electronic Basics
    Replies:
    2
    Views:
    453
    Benjamin Todd
    Oct 26, 2005
  3. Guest

    Question About IC Chips

    Guest, Mar 28, 2005, in forum: Electronic Components
    Replies:
    53
    Views:
    1,039
    Terry Given
    Apr 3, 2005
  4. Guest

    Question About IC Chips

    Guest, Mar 28, 2005, in forum: Electronic Design
    Replies:
    64
    Views:
    1,065
    Terry Given
    Apr 3, 2005
  5. Guest

    Question About IC Chips

    Guest, Mar 28, 2005, in forum: Electronic Equipment
    Replies:
    46
    Views:
    1,113
    Terry Given
    Apr 3, 2005
  6. Rodoz

    regarding Texas instruments DLP chips.

    Rodoz, Dec 16, 2005, in forum: Electronic Repair
    Replies:
    1
    Views:
    351
    Jason D.
    Dec 16, 2005
  7. ilan
    Replies:
    0
    Views:
    472
  8. ilan

    Regarding CY7C63001A USB microcontroller

    ilan, May 11, 2007, in forum: Electronic Design
    Replies:
    0
    Views:
    653
Loading...