As I kept adding peripherals to a 66 pin PIC project , i realized i was going to end up with loads of connectors, or run out of usable IO pins .. So I scaled down to 44 pic PIC and I2C keeping interrupt provisions for the control and comms inputs. This MCP23017 I2C expander circuit provided the answer. Thought I would share, I still have a few things to code , but basic digits (TM1637) and Encoders work okay (ish)