Commercial manufacturers like LDT offers the HSI-88, that permits 31 S88 modules divided in three connectors with the advantage that use his own protocol and only sends the changes in the inputs
This circuit has just two connectors but that uses its same protocol as the LDT.
You have to consider the polarity of the S88 connectors and use reed or optocoupled detectors.
You also have to consider in which connector is installed, S88 Left or S88 Right to put it in Windigipet, RR&Co, etc.
Download the manual and the design of the printed circuit board
To program the PIC use this HEX file