Another note on passing current through input diodes - don't do it on pins physically near A/D input pins on 7x devices - it can cause substantial noise and offset problems. I found this the hard way!