2
\$\begingroup\$

Suppose that there is a normal microcontroller with i2c port (for example Arduino or Raspberry pi) that we want to extend its i/o ports to hundreds or even thousands. What ways are there to extend the microcontroller? there are some solutions which some people says:

Solution 1: connecting 9 pins of micro to a DEMUX (for example 1-256 DEMUX, 8 bit for address and 1 bit for data) so we have 256 I/O lines. but by this solution we can set only 1 line of 256 lines using the address lines; how to access all 256 pins to read and write from/to them simultaneously?

Solution 2: using i2c GPIO chips. but GPIO chips have limited number of pins (for example 100 pins); how to use them for hundreds or even thousands pins?

Solution 3: i think (but i dont know is it possible in electronic industry or not?) by creating a microcontroller like a cpu chip in the shape of surface with thousands pins.

Please simply help me about these 3 solutions and if there are other solutions.

\$\endgroup\$
15
  • 3
    \$\begingroup\$ A suitable recommendation cannot be made until your give full details of the application. We do specific questions here only, not universally broad ones. \$\endgroup\$ Oct 7, 2020 at 21:46
  • 2
    \$\begingroup\$ chain FPGA's with Gigabit LVDS Links... so you might get some 1000 I/O Pins in a usable fashion \$\endgroup\$
    – schnedan
    Oct 7, 2020 at 21:50
  • 2
    \$\begingroup\$ The goal is not a spec. Is this 5V logic low speed or high speed or analog? or switch sensing? 1 of or high volume? SMD ot THT? \$\endgroup\$ Oct 7, 2020 at 22:19
  • 1
    \$\begingroup\$ @sadeghyeganehzadeh you need to use the edit button to add that to your question, and indeed, you need to define the sort of signals which must be handled. There just isn't any call today for complex purely digital circuits on breadboards, so it's unclear what practical purpose this would have on a large scale, or in a digitial-only version on a small scale. \$\endgroup\$ Oct 7, 2020 at 22:24
  • 2
    \$\begingroup\$ @sadeghyeganehzadeh typically by wiring together eval boards, modifying previous versions of the product, making test boards for a subset, or being really really careful in reading the data sheets and putting together a custom PCB try at the whole thing, which hedges any of the uncertain bets with footprints that give options for changes. If a breadboard is used, whatever connections to it that are actually needed are specifically made. There's no need to have magic virtual presence of software insight into every row, one debugs by strategy. \$\endgroup\$ Oct 7, 2020 at 22:55

1 Answer 1

5
\$\begingroup\$

how to access all 256 pins to read and write from/to them simultaneously?

Not at all. Simultaneity requires the same amount of inputs, and you have less.

Normally, you'd just use a parallel-to-serial shift register as input, or a serial-to-parallel shift register as output here, if you need to interact with all pins regularly, instead of just selected ones.

Solution 2: using i2c GPIO chips. but GPIO chips have limited number of pins (for example 100 pins); how to use them for hundreds or even thousands pins?

Basically, same idea, you have a serial bus (I²C) and some logic that glues IOs to them. There's large IO expanders. For thousands of pins, they might be a bit small, but you'd get pretty far.

Solution 3: i think (but i dont know is it possible in electronic industry or not?) by creating a microcontroller like a cpu chip in the shape of surface with thousands pins.

Well, that's commonly done with high-pincount FPGAs. It's not one of the most exciting things you can do with an FPGA, but "digital glue" really is one of the main use cases for FPGAs.

If you're building a couple hundred thousands of these, or need to be really energy-efficient (albeit switching thousands of pins - sounds unlikely), then you might look into getting someone to design custom silicon chips for you.


But: none of this is something that's universally applicable. It all depends on what your input and outputs need to do (voltages, currents, stability, speed) and how often and in which patterns you need to access them. You'll need to go in much more application detail and write down definite specs before anyone could give a recommendation.

\$\endgroup\$
15
  • \$\begingroup\$ i want to to connect all lines of 1 or multiple breadboards to a micro and have access to and control all of them. what is your recommendation? \$\endgroup\$ Oct 7, 2020 at 22:11
  • 3
    \$\begingroup\$ And what will those breadboards do? We had someone insistently a ask the same thing last month, he couldn't give a practical requirement... Realistically, you don't do that. You give a reasonable number of GPIOs on a connector next to the breadboard, or you move the entire project into an FPGA where you can compile in a logic analyzer to monitor anything you chose. \$\endgroup\$ Oct 7, 2020 at 22:20
  • 2
    \$\begingroup\$ To read or write what exactly? At what speed? For what sort of purpose? And this belongs as an edit to your actual question. \$\endgroup\$ Oct 7, 2020 at 22:37
  • 1
    \$\begingroup\$ How do you "read" an LED or a resistor? You haven't yet defined what exactly you need this system to be able to do, electrically speaking. And for the umpteenth time, you need to be editing this into your question. \$\endgroup\$ Oct 7, 2020 at 22:52
  • 1
    \$\begingroup\$ @sadeghyeganehzadeh "analogRead" implies that what you've asked for in your question (many GPIOs) is not the same as you want (many ADC inputs). That's a way harder problem, and you'd really need to multiplex analog voltages, and that requires much better design. I'll go with "that's not going to happen on any breadboard". Also, you've still not told us how fast and often you need to read analog voltages, and that's the key question here. You don't seem to have put much thought about requirements, so I don't know what to answer here. \$\endgroup\$ Oct 8, 2020 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.