My dear friends,
I am currently designing a circuit whereby using 16 pins of a micro controller, I would like to trigger 64 outputs using the attached schematic. I plan to do this by using a matrix style connection (8 x

. The schematic only shows this using 6 pins (3 x 3) otherwise it would have been too large to draw. The problem follows:
1. Apart from the resistor needed on the input of the opto to limit the current, what else do I need on the input side to protect the uC as some pins will be sinking current while others will be sourcing it.
2. I will drive everything using a 12V battery but the uC has a 7805v regulator. How do I continue the circuit from the output side of the opto in order to drive a mosfet using 12v? Can you provide a small schematic of how to wire the rest of the circuit from a single opto?
3. The switching from the uC must be very fast. Can you kindly suggest a reliable and robust opto coupler and mosfet? The current that the mosfet will be driving will not be more than 500mA but I do not wish to load the opto coupler.
4. Finally the most important thing, is that the output (of the mosfet) is very clean and that NO VOLTAGE whatsoever is present on the output unless the uC wants to. How do I ensure this life or death situation

?
Thanks for your help
Regards,
X