I am sorry but this is not correct as you designed it.
Now the only way is to add the resistors to ground from all the relative PIC inputs. And do add 10K resistors. Not more than that because of noise that can distrurb the input. Better change the 2K to 100 ohms too.
The usual practice is to have Pull Ups and then the opto drive to ground the input. If you want the input high then just reverse the byte your read from the port in software. Easy task.
Also note that in 886, there are Pull-Ups only on Port B and not on Port A.
Ioannis
Bookmarks