Free Trials

Download a free trial to find out which Altium software best suits your needs

How to Buy

Contact your local sales office to get started on improving your design environment

Downloads

Download the latest in PCB design and EDA software

  • PCB DESIGN SOFTWARE
  • Altium Designer

    Complete Environment for Schematic + Layout

  • CircuitStudio

    Entry Level, Professional PCB Design Tool

  • CircuitMaker

    Community Based PCB Design Tool

  • NEXUS

    Agile PCB Design For Teams

  • CLOUD PLATFORM
  • Altium 365

    Connecting PCB Design to the Manufacturing Floor

  • COMPONENT MANAGEMENT
  • Altium Concord Pro

    Complete Solution for Library Management

  • Octopart

    Extensive, Easy-to-Use Component Database

  • PRODUCT EXTENSIONS
  • PDN Analyzer

    Natural and Effortless Power Distribution Network Analysis

  • See All Extensions
  • EMBEDDED
  • TASKING

    World-Renowned Technology for Embedded Systems Development

  • TRAININGS
  • Live Courses

    Learn best practices with instructional training available worldwide

  • On-Demand Courses

    Gain comprehensive knowledge without leaving your home or office

  • ONLINE VIEWER
  • Altium 365 Viewer

    View & Share electronic designs in your browser

  • Altium Designer 20

    The most powerful, modern and easy-to-use PCB design tool for professional use

    ALTIUMLIVE

    Annual PCB Design Summit

    • Forum

      Where Altium users and enthusiasts can interact with each other

    • Blog

      Our blog about things that interest us and hopefully you too

    • Ideas

      Submit ideas and vote for new features you want in Altium tools

    • Bug Crunch

      Help make the software better by submitting bugs and voting on what's important

    • Wall

      A stream of events on AltiumLive you follow by participating in or subscribing to

    • Beta Program

      Information about participating in our Beta program and getting early access to Altium tools

    All Resources

    Explore the latest content from blog posts to social media and technical white papers gathered together for your convenience

    Downloads

    Take a look at what download options are available to best suit your needs

    How to Buy

    Contact your local sales office to get started improving your design environment

    • Documentation

      The documentation area is where you can find extensive, versioned information about our software online, for free.

    • Training & Events

      View the schedule and register for training events all around the world and online

    • Design Content

      Browse our vast library of free design content including components, templates and reference designs

    • Webinars

      Attend a live webinar online or get instant access to our on demand series of webinars

    • Support

      Get your questions answered with our variety of direct support and self-service options

    • Technical Papers

      Stay up to date with the latest technology and industry trends with our complete collection of technical white papers.

    • Video Library

      Quick and to-the-point video tutorials to get you started with Altium Designer

    How to Expand Input and Output for a Microcontroller

    Altium Designer
    |  November 9, 2018

    Microcontroller with input or output limit

    When working through practice boards and schematics very early on in my education, I remember more than once thinking about simply increasing the board size so that I could fit my components properly and make routing easier. It definitely would not have helped, and I’m glad I persevered in finding solutions through the challenges, but there are still times in my career where I’ve looked at the necessities of devices and wished I could just make their boards bigger.

    The same applies for microcontroller input and output. Unfortunately, there’s no belt to loosen when a microcontroller hits its input or output limit. In applications where you need to interface with a number of sensors and solenoids, the input/output (I/O) pins may be insufficient. In such situations, there are a number of options available, each with its own set of implications.

    Use a Higher Pin-Count Microcontroller

    I/O pins in a microcontroller are often grouped in ports. A single port may consist of 8 to 32 individual I/O pins, depending on the microcontroller architecture. Upgrading the microcontroller to a higher pin count seems like the simplest solution. However, choosing a higher pin-count microcontroller usually involves increased component costs. Furthermore, depending on the type of migration, the underlying firmware may be greatly affected.

     

    I/O pin variation with microcontrollers, pwm output and analog input

    I/O pin varies with different microcontrollers.

    When upgrading within the same family of microcontrollers, firmware modifications are minor or unnecessary. However, an upgrade from an 8-bit microcontroller( like the PIC18F25K20) to a 32-bit ARM-based microcontroller (like the LPC1768) involves coding the firmware for an entirely different architecture with a separate set of development tools.

    In general, 32-bit microcontrollers cost several times more than 8-bit microcontrollers. Therefore, upgrading simply for the sake of more I/O pins may be an overkill.

    Use 7400 Series Logic IC

    To avoid porting your firmware to an entirely new platform, there are a few integrated circuit (IC) options in the 7400 series logic family that are excellent for I/O expansion. For instance, the 74HC4051 is a 3:8 CMOS multiplexer/demultiplexer that can also be used for analog signals. Of course, using multiplexers does not entirely solve the problem of limited I/O pin on the microcontroller, as every single IC would occupy 3 pins.

    Cascade connection in TPIC6C595 with an analog-to-digital converter

    TPIC6C595 open drain output shift registers in cascade connection.

    A more elegant solution is to use serial clocking shift registers like the 74HC595 for output and 74HC165 for input. These ICs can be cascaded to each other with the limitation being the latency to shift the bytes to all the ICs. Using shift registers only involves three I/O pins on the microcontroller, regardless of the number of ICs.

    I2C Expansion GPIO IC

    You can also use I2C expansion GPIO chip to increase the limit of I/O pins on the PCB. As the name implies, the microcontroller interfaces with the expander chip using I2C protocol. The advantage of using an I2C expander is the ability to configure individual pins as input or output using the provided command.

    You can also connect multiple I2C expanders by setting the hardware address pin to a unique address on each IC. I2C expanders usually have special interrupt functions where an interrupt can be generated if the input pin changes from its previous state. The microcontroller polls the I2C expander for the new input values only when the interrupt is triggered.

    In a way, the interrupt driven polling method is more efficient than constantly shifting the values from cascaded shift registers to check value changes.

    PCB Layout Consideration

    Both cascaded shift registers and I2C expanders required clock and data signals between the microcontroller and IC. It is important for interfacing signals to be routed closed to each other with equal lengths to prevent glitches from occurring in the clocking signal. The traces should also be kept away from other high-speed signals to prevent cross-coupling issues.

    You can use multiple net routing features in Altium Designer® to ensure the connections are positioned in accordance with the best practices. Not sure what’s the best option for your I/O pin constrained design? Talk to an expert at Altium.

    About Author

    About Author

    PCB Design Tools for Electronics Design and DFM. Information for EDA Leaders.

    most recent articles

    Back to Home