Let's find out together what makes a PIC Tick!

Main Menu

Libraries for MCP23S08 & MCP23008 Expanders

Started by AlbertoFS, May 01, 2023, 12:09 PM

Previous topic - Next topic


Software libraries for MCP23S08/MCP23008 expanders. These allow them to be used with all PICs.
73's de EA3AGV


It is an update of the MCP23008/MCP23S08 expanders software libraries.

I have simplified the configuration so that the user cannot make mistakes. The user must configure 3 parameters only [Inputs or outputs]/[Inputs polarity]/[PullUps resistors]. Now the library is more easy to use and there more controls that make the code more secure.
I have written a simpler solution to get around the crazy double interrupt.
By interrupt, reading of the port is carried out with a delay of 35mS to avoid the bounces of the input sensors.
Several interrupts can be achieved even if a sensor is left in the closed position.
The user will just need to overcome the initialization of the expander. Any fault will indicate the need to check the wiring.
73's de EA3AGV