microcontroller with 80 io port

Discussion in 'Embedded Systems and Microcontrollers' started by solehin robian, Jan 27, 2014.

  1. solehin robian

    Thread Starter New Member

    Jan 27, 2014
    10
    0
    hello there. i am doing an electronic abacus for my project. i use infra red sensor as the input. but i have problem on finding suitable micro controller that has high amount of i/o pin. where at least i need 80 digital i/o pin. can anybody suggest what is the best microcontroller should i use.
    your answer will help me alot.please
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,418
    3,355
    You don't really need a microcontroller with 80 I/O pins. By using multiplexing techniques you can reduce it to 8 x 10 = 18 pins.

    You can also use serial port expanders (shift registers) which would require only 3 or 4 pins interfaced to the MCU.
     
    solehin robian likes this.
  3. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,378
    494
    Or you can use several microcontrollers to feed a main unit.
     
    solehin robian likes this.
  4. solehin robian

    Thread Starter New Member

    Jan 27, 2014
    10
    0
    i have consider about using multiplexer but there is also other problem where there is for 74ls series multiplexer, there is pin a,b and c to be as other signal to select the data from x0 to x7. i kind of confuse here at this a, b and c pins is. can you explain this. please i really need this information. thank you very much
     
  5. solehin robian

    Thread Starter New Member

    Jan 27, 2014
    10
    0
    my supervisor said by using multi controller they will be a problem in term of synchronize all the input like the time delay
     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,418
    3,355
    You could be misinterpreting what your supervisor is saying.
    You can use multiple MCUs instead of multiple shift registers.
     
    solehin robian likes this.
  7. MrChips

    Moderator

    Oct 2, 2009
    12,418
    3,355
    You misunderstand the concept of multiplexing.
    There is no need to use 7400 series multiplexer in order to multiplex I/O pins.

    The concept of multiplexing in this context is referred to as "time division multiplexing".
     
    solehin robian likes this.
  8. solehin robian

    Thread Starter New Member

    Jan 27, 2014
    10
    0
    thank you very much. look like i need to study more on this shift register
     
  9. solehin robian

    Thread Starter New Member

    Jan 27, 2014
    10
    0
    that mean i need to study on mux more. thank you very much
     
  10. solehin robian

    Thread Starter New Member

    Jan 27, 2014
    10
    0
    one other question. is it possible to connect multiple i/o expander to a single mcu?
     
  11. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,378
    494
    Yes. The question is: Do such extenders exist?

    Basically my idea of multiple MCU feeding a main MCU is such extension scheme. The additional MCU are extending the number of I/O pins that the main MCU has. That is all they are doing.

    However, there might be a simpler solution. I have been accused before of using MCU where something else can be used.
     
    solehin robian likes this.
  12. solehin robian

    Thread Starter New Member

    Jan 27, 2014
    10
    0
    thank you very much now i have much more understanding. i will give a try on this solution. your reply give me more knowledge about this world of mcu. thank you very much
     
  13. MrChips

    Moderator

    Oct 2, 2009
    12,418
    3,355
    Before you go any further you should define what you are trying to accomplish.
     
  14. solehin robian

    Thread Starter New Member

    Jan 27, 2014
    10
    0
    actually i want to use 60 ir sensor to detect 60 beads on abacus and 4 push button for user to choose 1 of 4 operation that is addition, subtraction, multiplicatian and division. therefore i need around 70 i/o port including 16 lcd display as the output
     
  15. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    Just in case, from the top of my head, from Microchip, 18F97 or very close to that. Once you find it, look for the package. It is not DIP for sure.
     
  16. MrChips

    Moderator

    Oct 2, 2009
    12,418
    3,355
    I can think of a number of ways to solve this problem.

    The first solution is to use a number of 8-bit parallel-in serial-out shift registers. Eight such chips will allow you to detect 64 inputs.

    If you are going to add extra chips in any case you may as well use microcontrollers (mcu).

    You could use UART communications of mcu in a network where you connect all RXD together and all TXD connector. You use a communications protocol so that each mcu has a unigue address and is commanded to respond only when its address has been received.

    Another solution is to use ISP interface. Each mcu has a separate Slave Select (SS) signal coming from the master mcu.
     
    solehin robian likes this.
  17. russian

    Member

    Sep 1, 2012
    55
    1
    stm32f4 would be pretty close - like 50? 70? digital pins.

    Then you can use i2C 8 bit port extenders - you can have up to 16 port extenders on the same two wires I2C bus. 8x16=128 I belive.
     
    solehin robian likes this.
  18. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Yes, you could use an I2C I/O expander such as the MCP23017 from Microchip. That one has 16 I/O's, so you'd need 4-5 depending on how many I/O's your microcontroller (uC) has. Only need 2 I/O pins from your uC to run multiple I/O expanders.
     
    solehin robian likes this.
  19. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    Right now, sitting on my bench there is a design where 8 bytes of data are serially shifted throug eight 74HC595. The micro in charge (18F4520) is clocked at 40 MHz what makes for a 10 MHz SPI's clock. It works.
     
    Last edited: Jan 31, 2014
  20. solehin robian

    Thread Starter New Member

    Jan 27, 2014
    10
    0
    is it this mcp23017 is compatible to use using pic16f877?
     
Loading...