MCP23017 Went Through Shortage Hell, Lost Two Inputs

Showing two MCP23017 expanders soldered onto a PCB

The MCP23017, a 16-bit I2C GPIO expander, has always been a tasty chip. With 16 GPIOs addressable over I2C, proper push/pull outputs, software-enabled pull-ups, eight addresses, maskable interrupts for all pins, and reasonably low price, there’s a reason it’s so popular. No doubt due in part to that popularity, it’s been consistently out of stock during the past year and a half, as those of us unlucky enough to rely on it in our projects will testify.

Now, the chip is back in stock, with 23,000 of them to go around on Mouser alone, but there’s a catch. Apparently, the lengthy out-of-stock period has taken a heavy toll on the IC. Whether it’s the recession or perhaps the gas shortages, the gist is — the MCP23017 now a 14/16-bit expander, with two of the pins (GPA7 and GPB7) losing their input capabilities. The chips look the same, are called the same, and act mostly the same — if you don’t download the latest version of the datasheet (Revision D), you’d never know that there’s been a change. This kind of update is bound to cause a special kind of a debugging evening for a hobbyist, and makes the chip way less suitable for quite a few applications.

It’s baffling to think about such a change happening nearly 20 years after the chip was initially released, and we wonder what could have caused it. This applies to the I2C version specifically — the SPI counterpart, MCP23S17, stays unaffected. Perhaps, using a microcontroller or shift registers for your GPIO expansion isn’t as unattractive of an option after all. Microcontroller GPIO errata are at least expected to happen, and shift registers seem to have stayed the same since the dawn of time.

The reasons for MCP23017 silicon getting cut in such a way, we might never know. At least now, hopefully, this change will be less of a bitter surprise to those of us happy to just see the chip back in stock — and for hackers who have already restocked their MCP23017 hoards, may your shelved boards magically turn out to have a compatible pinout.

65 thoughts on “MCP23017 Went Through Shortage Hell, Lost Two Inputs

        1. I worked at a company where we had to change the features on a consumer electronics device which caused a redesign because the lead time on the packaging change was too long.

          A HARDWARE REDESIGN because of a cardboard box. You’d be surprised how ridiculous companies can be.

        2. Pfft. YOU have no idea what you’re talking about. When we make a package marking change it is a lot of work. We have to update wafersort and final test program names so we can split out the FT data for the product engineers so they can track wafer yield changes separately. We have to regenerate new test limits, in some cases we have to requalify HTOL and HAST, we have to make a new project in our project management tools so that we can separately order leadframes for the two types (you don’t just get to go raiding the leadframe suppliers, because they’re backlogged by months and you order based on project priority and expected sales) and all the pricing and the pricing markdown schedule have to be regenerated, spin the spice models, spin the datasheet, and I don’t even know how they track this in the factory that actually does the package marking because we outsource that and this means a whole new set of orders and inventory management with them as well. It’s not like developing a new core, but it’s a silicon spin and takes just as much work as any other spin.

      1. Sort of my first thought. These are essentially “seconds”. They’ve got a couple hundred chips that maybe had one or two bad transistors on the input of those two pins. But due to the shortages and long lead times, they just put them out there as is.

        There really can’t be any savings to removing input capability on two pins. Even so, the price could be raised. Has to be a mistake. I hope someone grabs a few and de-lids them to see what happened.

        Definitely should have a new part number though. That’s going to be a mess.

    1. There have always been issues with using these ports as inputs. You probably still can, but it is now explicitely stated you shouldn’t.

      Technically, the parts are distinguishable: It is revision C and Revision D.
      You should never assume compatibility between different revisions of the same part.

      Sometimes the same partnumber is used and the part produced by different manufacturers. The functionality is the same, although the specs might not be.
      You should never assume a part of one manufacturer can be used as a drop-in replacement for another.

      You might get away with it almost every single time,but not always…

    2. Perhaps they had a bunch of wafers with one input failed. The failed wafers could be grouped by what failed and have modified microcode and leadframes so that you get a chip with two fewer inputs made from what t would have been waste. Kind of like how Intel is rumored to have made I7, I5 and I3 chips from Xeon wafers…

  1. This is outrageous for them not to change the part number in some way! This is going to burn so many people. Why? The countless purchasing agents just waiting for this to come back in stock so they can start building boards and shipping product again are NEVER going to think that its was changed in some way because of the same part #.

    Hackaday, Now this is some real reporting!

  2. > Perhaps, using a microcontroller […] for your GPIO expansion

    I’m betting 20€ that I’ll donate to a charity of consensus if someone can show that a microchip-produced GPIO expander is not just a packaged PIC microcontroller with factory-burned firmware. I haven’t found a decap of that chip yet.

    1. That would probably be significantly more expensive, since it would require much more silicon (CPU, flash, RAM, etc.) than just making the thing in logic gates, especially 20 years ago.

      Also, it would have to run on an internal oscillator, which would cause an easily detectable current ripple on the power supply, it would introduce a significant delay from the input pin change to the interrupt signal output (datasheet says max. 600ns). Lastly, it would be quite difficult (I’d say impossible) to get a 1uA standby current while monitoring for data and pin changes.

  3. Well the FAE is going to get an ear full. I just released a new product with this chip that uses both pins as inputs. I used it because we had 500 it in our inventory. This change will require a board respin which the tooling alone will cost more then those 500 chips. I guess they don’t want our business.

    What are they thinking!

  4. I’m guessing they remembered they had a failed batch in storage they realized they could unload. Or the first batch after they restarted was faulty; however would work for most use cases.

    Either way they felt like unloading it.

    I wonder how many chips / projects can be replaced by a modern RP2040 chip for example. Poor Arduino is losing a lot to them. Real Raspberry boards are at parity with bottom of the barrel Arduino knockoff boards while boasting much more in compute power/features.

    1. The main difference between them though is the rpi0 is a cortex m0 which is a von Neumann architecture, the arduino uses a modified Harvard which can make it better suited to some applications where the m0 might bottleneck and viceversa in terms of other attributes

        1. Actually I completed my studies on systems architecture, thanks. I think you are the one who needs to go back to studying buddy, and maybe take some personal development courses so you can improve those social skills on not being a prick to people :D

          P.s. The cortex M0 is a Von-Neumann – Go read up on it and stop acting like a total ass with your superiority complex! Wowzers.
          Source A:
          Source B: (Just in case you prefer wiki over the horses mouth)

        2. Johnathan, superiority complex? You’re projecting. Either add something to the conversation or stay quiet. You’re not a white knight, Ron’t not going to ‘be your friend’.

          Ron, go back to school and this time pay attention. Your first link doesn’t say what you seem to think it says. It actually supports what I’ve been telling you. Your second link is to a non-existant page. I’m done trying to educate.

        3. I don’t even know who you are and your first contact with me is to start with hostile comments out of nowhere. Either seek medical help for whatever mental state you’re in that is that is causing you to perceive me as some villain in your mind motivating you to go one whatever personal crusade this is for you, or engage in discussion like a stable minded adult. You haven’t even quoted anything in the source material I gave you that supports your case, and you’ve offered it with nothing but hostility and immature sentiment. So kindly point me to where it says exactly that, which proves what I originally said was explicitly incorrect.

          I said in my original post that the two chips; the Cortex M0 and the AVR (on the original Arduino) were different design paradigms Von Neumann and Modified Harvard and that outside of apples to apples comparisons, they have their advantages in some cases where one may be favorable over the other in those specific use cases – to further expand on what i was saying.

          I’m not claiming one is objectively better than the other, just that they are different and suit different design needs. I don’t understand why this simple statement sparked such random and exaggerated nerd rage from you; to start questioning my educational background with such extreme hostility what you literally have no idea who I even am or anything about me.

          I’ve added to this conversation, you’ve added nothing of substance so far, so kindly stop projecting.
          Unless your next reply to me is either a light apology for being a toxic butthole, and/or actual citations to back up your claim that the M0 isn’t a Von Neumann architecture – Kindly cease.

          FYI, here’s the repaired wiki url since you were too lazy to fix it yourself

  5. From the linked to page: “NOTE: Please be advised that this is a change to the document only the product has not been changed.”

    It looks like the device did not change, meaning it was always 14 bits of input but the docs were wrong all along.

      1. I notice that it’s now automotive qualified, where it wasn’t previously. Automotive testing is a LOT more rigorous, and it’s possible that they could previously get enough chips through that passed all pins but now that they’re trying to supply automotive customers, the yield dropped so much that they gave up trying. So now they see a yield increase, to automotive test specs, but a note in the datasheet that they no longer guarantee those two pins to work.

    1. I think this must be correct – searching before google is polluted by this article gave these as #1 result: , quoting [Jonas]: “Problem confirmed by Microchip support. Don’t use pin 7 of Port A or B as inputs. ;-)”.
      This was 2014, so they took their time – perhaps it’s just buggy input, not entirely broken, but not to spec timings either.

    2. Silicon bug, has been there since the beginning but not mentioned on the datasheet. It did byte me on a product I designed, and it caused us many headaches until it was replicated.

  6. Part of me thinks that changing a chip’s internal functionality without updating the part number should be classed as a crime. Afterall, consider the chaos or outright damage it could cause to an electronic system if someone unknowingly puts in a chip of the old vs new type. Some people might want the old type, others might want the new type, there can be applications where substituting either for the other could be very damaging. Particularly nasty would be in an electromechanical system where one is relying on that, now missing, input channel for an end-stop switch. And imagine if you have a stock of these chips, some old, some new and you don’t know which are which? Furthermore a lot of sellers might actually have old ones in stock, old ones could be getting released by companies that temporarily hoarded them while new oens weren;t being made, a buyer won;t know which sort they are getting. I’ve seen companies change a part number just because a part used to come on grey tape strips and now comes on white, or because it was lead free in pratice but now its officialy lead free too, so why aren’t they changing the number when there is an ACTUAL FUNCTIONALITY CHANGE!

  7. If they want to take shortcuts wit the silicon and change functionality, then sure, if the market will accept it. But to do this without changing the part number is a really silly move.

      1. Luckily for my DomoNode 2.1 I migrated to PCA9555: cheaper, easier to code (registers don’t change meaning) and guarantees pin states at power up (can be quite important). And all IOs are equivalent :)

  8. This reminds me of my IKEA Tundra laminate flooring. Due to flooding and later wear, I have had to replace a part of one room’s floor twice. The same product name and number (I would have never checked that, but if I did, I’d be none the wiser) has had three different connection systems that were incompatible. Twice I have bought half a room’s worth of Tundra then having to buy another half.
    The quality has also gone down: while the first one showed minor wear after rolling a chair over it for 10+ years, the last version is already showing wear after half a year in my bedroom, where I never walk on anything other than soft-soled loafers or barefeet.

  9. Sounds exactly like something they would do. Found a silicon bug in their MCP16312, and they refused acknowledging it despite solid documentation from our side. They kept blaming our design around the chip until I made a video showing the issue on their own evaluation kit for the part. Then they silently made an errata regarding the issue, without even answering our queries as to whether the issue could be recurrent, while publishing said information in the errata.

    Lately we observed some undocumented behavior with some of their LDOs, this time I just designed the part out and didn’t bother dealing with them.

  10. I had just started using the MCP23017 IC when the supply crunch started. Ended up respining the design using the PCA9535 i2C GPIO expander IC. As other have stated it’s cheaper as well.

    1. Yeah, but back then most folks buying just the standalone chip knew the differences. As opposed to a less technical savvy person just buying a complete computer with either already installed.

  11. This is pure unadulterated evil.

    I’ve got dozens of products which use this IC. I wondered why a bunch of parts suddenly showed up in Distribution a few months back. I snatched up 125 of the parts and felt lucky. Just went through my bag full of tubes. Fortunately, I’ve still got a few tubes of Rev C parts but now I’m stuck with the task up updating all my project webpages to add this painful caveat. And the customers who rely on me to deliver consistent products in the future will need explanations.

    Upside is I can probably sell Rev C chips for a huge premium.

    Microchip, you let me down. Different product – needs new part number not some mere update via PCN.

    1. But, but…
      It’s no different than Honda finding out their timing belts were breaking prematurely, so they issued an update to the Owner’s Manuals telling owners to replace the belts every 60,000 miles.

  12. And just yesteday I read a reddit post about somebody finding the hard way why his led were all defect – for the same reason at this post.

    They switched the led polarity and just updated their datasheet, no different part number.

    Except I would be really mad for a scenario like the MCP23017

    1. I remember buying a pack of assorted LEDs at RadioShack. Each one needed to be tested for polarity, as the length of the leads or flat side of the plastic lens could not be trusted. If the plastic was clear enough, one could look in and see the shape of the lead termination.

  13. So I was thinking… why not use RP2040 and control it over SWD?

    It’s a two-wire interface and the it can be clocked pretty high. Think tens of MHz. Via SWD you can read/write to memory to control the hardware registers, meaning you can remotely toggle and read GPIO pins, ADC, configure PWM, measure PWM frequency and/or duty cycle, read temperature, even upload and run a PIO program (to decode multiple rotary encoders, for example). You can even store ingested data in circular memory buffers using DMA and then read them out once in a while.

    You don’t have to add neither crystal (if you don’t need that precise timing) nor flash. If you want better timing cheaply, you could PWM the XIN via a separate line at 27 MHz.

    It might even be possible to drive it via the same clock used for SWD, provided the data line idles high to always reset the protocol when unused. (I am not sure about that, it would need some testing.)

    All you really need to add are 4 decoupling capacitors. Maybe just 2 if you test the design rigorously.

    Sure, it doesn’t idle that well, but that’s nothing a $0.01 P-channel MOSFET wouldn’t solve if you really, really need those μAmps.

  14. even if the initial characterization of this as a change, rather than the admission of a long-running fault that it seems to be was accurate, there are weirder, bigger issues than this buried deeper in revision notes all the time. the entire industry does this. this clearly updated data sheet is rather refreshingly decent.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.