Using a voltage regulator introduce some complication. You will feed 9 volts to your inputs and this will demage your pic. You need to isolate in same way your pic (both input and output) see the attached suggestion. (remember that all the input must be pulled up)
Cheers
Al.
Bookmarks