1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Large number of devices

Discussion in 'Embedded' started by akiriwas, May 11, 2005.

  1. akiriwas

    akiriwas Guest

    I have a rather strange question. I've googled for a bit and haven't
    found anything. I'd be happy to read any books recommended or look at
    any sites recommended if that would help. Is there any techniques,
    ICs, etc that are used to interface a microcontroller with a large
    number of devices, such as 512 or 1024? I've been looking at I^2C for
    a bit and borrow some books on the interface. I like it. It provides
    addressing of up to 127 different devices in normal mode and more using
    the extended addressing. However, with this, it appears there would
    not be any way of having any of the devices "contact" the
    microcontroller, unless of course the device become an I^2C master and
    the entire circuit became a multi-master circuit. Are there better
    ways to handle this? I'm not always great at explaining things in a
    post, Ill clarify anything that needs clarified if need be. Thanks.
     
    akiriwas, May 11, 2005
    #1
    1. Advertisements

  2. On 10 May, in article
    <>
    Other than the fact that this to me SOUNDS like a homework question
    I will put a few comments. All of which assumed a WIRED connection.
    Have you considered that even with 512 devices how long the communications
    bus is going to be and why should they all be on ONE bus?

    If the distance is only 1 inch (25mm) between each device then the total
    distance is 512 inches = 14.22 yards (approxiamately 13 metres). Of course
    for 1024 devices it will be at least double that.

    Your first quetion is how are you going to drive and receive the signals
    for that and greater distances, let alone sort out the loading issues
    involved.
    Most I2C devices have most of the address hardcoded into the device so
    what devices are you going to add or is this just a hypothetical
    homework question.

    Anyway what is wrong with having more than one I2C bus?
    How they communicate back depends on many things

    Frequency of updates back from each device and the total

    How much of the time is used for the master to talk to the devices.

    What speeds and data throughputs are you trying to achieve

    How much does the remote device need to actually do to tell the master
    it has data and how long can the data be held in the remote device
    be held for before it is overwritten.

    Ever considered interupting the master to say data is available.

    This sounds like a complex design being approached from the wrong way, or
    a hypothetical homework question.
     
    Paul Carpenter, May 11, 2005
    #2
    1. Advertisements

  3. akiriwas

    akiriwas Guest

    I realize there are a lot of homework questions posted on here so I
    appreciate the response. Although there is no reason to believe me, I
    can assure you this is not a homework question. I'm currently a
    computer science graduate students which means I read papers, grade
    papers and basically code 25 hours a day. We don't get to play with
    anything 'real' in CS, so this is really just a pet project of mine
    that I've been thinking about for a while. I guess I'm still at the
    'is it possible?' stage.

    There are a few projects I've seen that do similar things with a large
    number of devices, but they may not use a single bus. I guess that's
    what I'm asking is how do they do projects like these. Here's one I
    found from some kids at MIT. http://web.mit.edu/storborg/ddf/ They
    created a dance floor with 512 individually controller tiles that could
    change color as well as provided touch sensors back to the main
    computer.

    Granted, this is a HUGE project and not the same type of thing, but it
    is a large number of devices. You mentioned that I should possibly
    interrupt the master to say that data is available, I had thought about
    this, but wouldn't this require somewhere on the order of 512 or so
    different interrupt lines? Doesn't seem right, but then again I'm
    guessing there is some more intelligent way to do it that I'm not
    getting.

    As I said before, this is a pet project, not a homework assignment and
    I am probably attacking it from the completely wrong direction. Any
    help you could still give would be great, and thanks again.
     
    akiriwas, May 11, 2005
    #3
  4. On 11 May, in article
    <>
    They are primarily using a tiered design some form of USB or USB tree of
    cables, talking to micros that then talk to a group of other devices.
    I would not fancy dealing with processing all the individual lights and
    sensors all directly back to one host, it would be a nightmare of cabling
    and control.
    Depending on how the communications is organised groups of devices
    can share the same 'interupt' by open-collector/drain, then use some
    method to interrogate each group to find which one(s) have interrupted.
    The interrogation is either by scanning each device in THAT group or
    by some means of daisy chaining to send a signal or global command back
    for the device to identify itself., first device in the chain is the only
    one to respond.
    The first thing is to break down the remote devices into what they have to
    do and how much data and how often the data is going BOTH ways. Grouping
    suitable devices together onto their own module/bus/network, which is dealt
    with wither as a sperate bus to a host or via distributed processing
    (micro) onto another bus or several busses back to a central point.

    Hopefully each stage limits its data throughput to be manageable by the
    overall system.

    When systems get larger like this it is always better to deal with it
    by splitting out the functions and processing as much as possible as
    close to the input/output in question.
     
    Paul Carpenter, May 11, 2005
    #4
  5. akiriwas

    Lanarcam Guest

    What can of device do you want to connect?
    Would a CAN or an Ethernet network be adequate?
     
    Lanarcam, May 11, 2005
    #5
  6. akiriwas

    CBFalconer Guest

    Your article has no context whatsoever. This is why we quote the
    relevant portions of previous messages in Usenet. Each message
    should stand completely on its own, inasmuch as there is no
    guarantee that any previous messages are (or ever have been)
    available to the reader.

    This is why the broken google interface is creating so much havoc.
    See my sig below for a way of using it fairly intelligently. Even
    better, install a newsreader, such as Netscape, Mozilla,
    Thunderbird, Xnews. Even Outlook Express (ugh) is better.
     
    CBFalconer, May 11, 2005
    #6
  7. I can certainly tell you some ways to do it, but I've no idea if they
    apply all that well. One thing you haven't mentioned is how often
    this communication is likely to happen, how much information is likely
    to be involved when it does, whether or not all these devices will be
    on a single, large board or spread out over a planet, whether or not
    these communications between devices can be serialized or if there
    must be at least some that can go on in parallel, if you can accept
    having to have data passed along in order to get it to a destination
    or not, ... let alone cost issues, size issues, power limitations,
    etc.
    I haven't looked or examined the page, but it's certainly possible
    that each time square has four edges and four links to the adjacent
    squares. If so, each tile would perhaps be responsible for passing
    along information sent to it to another neighbor.
    I can document a technique that will allow a thousand devices to share
    a common communication bus, each and every one of them operating
    asynchronously, able to talk directly to any other intended device,
    etc. A technique I've already used over merely four wires to allow
    many tens of devices never originally designed to do so to then share
    a single serial link to a PC in our testing lab. But again, I've no
    idea whether or not it would help in your application as you haven't
    provided enough details for that.

    An idea could include wiring Tx/RX serial links so that the TX goes to
    the RX of the neighbor on the right while the RX line comes from the
    TX line of the neighbor on the left; with each device responsible for
    passing along communications while inserting its own into the stream
    and/or removing messages to itself. Whether this would be of any use
    at all in your case, I don't know. If you have tiny, infrequent
    messages, it may work okay.

    Another idea is to share a common, open drain/collector line used to
    signal the desire to gain ownership of a communication bus (with any
    number of wires you want to dedicate to it) and a second, similarly
    open drain/collector line/wire used to arbitrate who gains ownership
    through some scheme you devise. This is slightly abstract at this
    point, but I can detail out the required timings given the minimum
    time needed to sample the lines and the variability in that sampling
    time for each asynchronous processor, etc. It can be managed. But
    again, it's not much good if there is constant contention. The
    arbitration time may very well choke it.

    Of course, it can be done similar to the methods used by transputers,
    with several (four) links laid out into a grid. You can use other
    numbers of links in any topology you want, as well.

    None of the above requires a thousand, separate interrupt lines. And
    I've only begun to suggest some. Use your imagination!
    Tell more about the details, then.

    Jon
     
    Jonathan Kirwan, May 11, 2005
    #7
    1. Advertisements

Ask a Question

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.