Need type of chip(s) to sequentially check inputs

Discussion in 'Embedded Systems and Microcontrollers' started by Solar Granulation, Aug 8, 2010.

  1. Solar Granulation

    Thread Starter New Member

    Aug 8, 2010
    5
    0
    Hello all!

    I'm not sure how to phrase this question, so please bear with me. This uncertainty has also made it hard to know how to look for answers, so I sincerely apologise if I've missed something obvious.

    I'd also like to say that I've long held a wish to study this field more deeply, but have never found the time. Now I have a project I'd like to get off the ground but am held back by my lack of knowledge.

    Anyway, on to the matter at hand.

    The device I want to build would have a bank of outputs and a separate bank of inputs. Each output will, sequentially and only one at a time, emit a 'high' voltage state before returning to a 'low' state.

    I hope to be able to check, in a likewise sequential manner, all inputs while a given output is 'high'. An output may be crosslinked to an arbitrary subset of inputs. Please consider these examples.

    'o' = low output, 'O' = high output, 'i' = low input, 'I' = high input
    Code ( (Unknown Language)):
    1.  
    2. o o O o
    3. + + [B]+[/B] + i
    4. + + [B]+[/B] [B]+[/B] I
    5. + + + + i
    6. + + + + i
    7.  
    Here the third output is crosslinked to the second input, which would obviously be easy to trace.

    Code ( (Unknown Language)):
    1.  
    2. o o O o
    3. + + [B]+[/B] + i
    4. + + [B]+ +[/B] I
    5. + + [B]+[/B] + i
    6. + + [B]+ +[/B] I
    7.  
    Here the third output is crosslinked to BOTH the second and fourth input. This situation brings up the issue that I am trying to solve.

    It's important that I be able to detect the signal on both connected input points. I can not risk the signal shorting to one input and failing to register on another (the actual grid would be much larger, as well). I have considered using a variety of resistance values, but there is another solution that I would prefer to find a way to implement.

    That solution would be to sequentially connect and disconnect each input, checking the voltage on each one independently. That is to say that I would like to be able to cycle through them, opening and closing the inputs so that the voltage is never divided and never shorts.

    Is there a type of chip that can do this? Is it possible to open and close a pin, for instance, so that a current can be prevented from travelling across it?

    I do hope that my question is clear. As I have indicated I fear that I lack the vocabulary to properly and clearly express the problem. Please, let me know if I have been unclear.

    I would be most grateful for any advice.
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    What do you want to build?

    What is its function?
     
  3. Solar Granulation

    Thread Starter New Member

    Aug 8, 2010
    5
    0
    Oh, sorry!

    It's an idea for a new type of DIY touch panel. Basically it would consist of two sets of wires, at right angles to each other. One set, on the Y axis for example, will be live while the other set, on the X axis, will be neutral. The two sets of wires would be narrowly separated on the Z axis so that depressing one layer of wires will create electrical contacts with wires on the other set. There are various other details but those are the salient points.

    Naturally, I therefore want to be able to activate individual wires on the Y axis and read individual wires on the X axis, so as to plot coordinates. We're fairly sure that we have the mechanics of the device figured out, but I'm looking for chips to drive it.

    It might be worth mentioning, I suppose, that I do have a fair old bit of coding experience, although mostly C++ and PHP. I'm collaborating on this with an electronics engineer, but his studies date back to the 1980s and didn't cover microcontrollers and such.
     
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Activate the Y wires sequentially, and monitor which X wires are 'ON' each time one Y wire is activated. I don't have a specific chip in mind but a microcontroller would do the job fine.
     
  5. Solar Granulation

    Thread Starter New Member

    Aug 8, 2010
    5
    0
    That was an early idea, yes. But after much discussion with my colleague involving the possible use of resistive wire or discrete resistors, I decided that the ideal would be to individually open and close connections to the wires on the X axis. This is in order to avoid the problems of divided voltages and shorts when one live Y wire contacts multiple X wires.

    To which end I'm really hoping to identify a chip that can open and close input-pins on command.
     
  6. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    I'm not clear on whether the contact points are resistive, or are just shorts between a row and a column. And do you require operation when multiple contacts are activated in an arbitrary pattern? Or could you be sure that any multiples would be in the same row, or the same column? If the matrix can be connected in any pattern at all, I don't think what you want can be achieved. There would just be too much ambiguity in the connections.

    I think that lots of microcontrollers can "open and close input-pins on command". Certainly PIC processors can.
     
  7. Solar Granulation

    Thread Starter New Member

    Aug 8, 2010
    5
    0
    If it's okay, I'd like to concentrate on this part of your post, please, John. Could I be very cheeky and ask for a pointer to some documentation on how that might be achieved?

    Sorry if this seems rude, but my colleague is hesitant to share too many of the technical specifics at this point and I'm trying to respect that. Although eventually we'll open-source the project, if it's successful.
     
  8. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    I'd make this more complicated if I could, but unfortunately it's very simple. This is done on a PIC processor by use of what's called the "TRIS register". Each output port, usually 8 bits wide, has an associated TRIS register where each bit corresponds to a bit of the port. Set it high and the port pin is an input and is high imedance: set it low and the pin is an output which can be set high or low. See here:
    http://ww1.microchip.com/downloads/en/DeviceDoc/41202F-print.pdf

    Look at section 4.1 of the file, which describes Port A of the PIC16F684 (which is actually only 6 bits wide, though it works like other ports).

    I'm sure other processors have similar features. It's pretty basic in microcontroller-land.
     
  9. Solar Granulation

    Thread Starter New Member

    Aug 8, 2010
    5
    0
    Thank you, John, that's very interesting!

    I'm having trouble determining the exact electrical behaviour this would generate, it seems to suggest that setting a pin to output will emit a current. I suppose some diodes may be in order!

    Thank you, this looks like a very useful informational hook for me!
     
Loading...